From 6eb13cff8e0197b7aa832abee915bb9db740361a Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Fri, 31 Mar 2023 18:16:23 +0530 Subject: [PATCH] Merge `main` and `latest-16` to setup `upstream` (#1701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove replication manager and run VTOrc in all e2e tests (#12149) * feat: remove replication manager Signed-off-by: Manan Gupta * test: run VTOrc in all e2e tests (some exceptions) Signed-off-by: Manan Gupta * docs: add summary notes changes Signed-off-by: Manan Gupta * feat: deprecate disable-replication-manager flag Signed-off-by: Manan Gupta * test: fix start vtorc function to be idempotent Signed-off-by: Manan Gupta * docs: fix review comments Signed-off-by: Manan Gupta * feat: fix port used by vtorc Signed-off-by: Manan Gupta * test: really fix the ports issue Signed-off-by: Manan Gupta * test: fix upgrade downgrade test issues with running vtorc Signed-off-by: Manan Gupta * test: run ISP before starting VTOrc Signed-off-by: Manan Gupta * feat: fix flakines in throttler test due to vtorc Signed-off-by: Manan Gupta * test: fix flakiness in vreplication tests Signed-off-by: Manan Gupta --------- Signed-off-by: Manan Gupta * Allow manually kicking off CodeQL (#12200) * Move vtorc from go-sqlite3 to modernc.org/sqlite (#12214) * Move vtorc from go-sqlite3 to modernc.org/sqlite This moves vtorc from the go-sqlite3 library that uses CGO, to use modernc.org/sqlite which is a pure Go implementation. vtorc is the only component we have to build with CGO but it's causing pain for releases since we need to build it against an old Linux for linking against glibc. Using modernc.org/sqlite allows for using Go only again and makes all Vitess components buildable without CGO. In https://datastation.multiprocess.io/blog/2022-05-12-sqlite-in-go-with-and-without-cgo.html someone ran some basic benchmarks. It shows that the pure Go version can be twice as slow, but the usage of vtorc is very limited and we operate on small datasets, so I think the performance impact purely of a somewhat slower sqlite implementation is negligable. None of this is in a hot query serving path or anything like that, so I have little concern performance wise. Signed-off-by: Dirkjan Bussink * Fix error handling in RowToArray Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Update the MySQL version used by our Docker images (#12054) * Change default MySQL version of lite and base to mysql80 instead of mysql57 Signed-off-by: Florent Poinsard * Bump MySQL version to 8.0.31 in install_dependencies.sh Signed-off-by: Florent Poinsard * addition of label to the mysql80 image Signed-off-by: Florent Poinsard * apply review suggestions Signed-off-by: Florent Poinsard * bring back mysql80 label Signed-off-by: Florent Poinsard * add release summary Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Revert "Use ubuntu 20.04 for release builds (#12202)" (#12220) The underlying issue has now been addressed in: https://github.com/vitessio/vitess/pull/12214 This reverts commit 4b3b37d41ec08130d162b5115904108cbb3dc14b. Signed-off-by: Matt Lord * Update release notes summary for the new default MySQL version (#12222) Signed-off-by: Florent Poinsard * Revert changes made in #11960 (#12219) Signed-off-by: Florent Poinsard * Bug fix: Cache filtered out tablets in topology watcher to avoid unnecessary GetTablet calls to topo (#12194) * check filter later in loadTablets. Add tests to confirm expected behavior Signed-off-by: Brian Ramos * remove unnecessary assignment Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Brian Ramos * add some explanation around TestFilterByKeypsaceSkipsIgnoredTablets Signed-off-by: Brian Ramos * simplify filter check logic as well as major test cleanup, using testify where possible Signed-off-by: Brian Ramos --------- Signed-off-by: Brian Ramos Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> * Update Go dependencies (#12215) * Update Go dependencies This updates the Go dependencies to the latest versions before the Vitess 16 freeze so we can start with an up to date list. Also updates vitess-mixin since Dependabot is reporting a bunch of things on that. Signed-off-by: Dirkjan Bussink * Fix deprecated sets.String This is now available using generics. Signed-off-by: Dirkjan Bussink * run make proto Signed-off-by: Florent Poinsard * fix e2e test expectations Signed-off-by: Florent Poinsard --------- Signed-off-by: Dirkjan Bussink Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard * Properly test healthcheck cache response handling. (#12226) Signed-off-by: Matt Lord * vtgate advertised mysql server version to 8.0.31 (#11989) * change vtgate advertised mysql version to 8.0.31 Signed-off-by: Harshit Gangal * refactor keeping mysql advertised version Signed-off-by: Harshit Gangal * refactor sqlparser mysql version to use the mysql_server_version default Signed-off-by: Harshit Gangal * test: update test setup Signed-off-by: Harshit Gangal * test: updated test help output Signed-off-by: Harshit Gangal * added release notes Signed-off-by: Harshit Gangal * feat: remove panic since it is getting triggered from the sidecardb Signed-off-by: Manan Gupta --------- Signed-off-by: Harshit Gangal Signed-off-by: Andres Taylor Signed-off-by: Florent Poinsard Signed-off-by: Manan Gupta Co-authored-by: Andres Taylor Co-authored-by: Florent Poinsard Co-authored-by: Manan Gupta * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL (#12189) * [Gen4] Fix lookup vindexes with `autocommit` enabled (#12172) * test: show that `autocommit` on lookup vindexes is broken when used after a savepoint is created Signed-off-by: Arthur Schreiber * test: rework the test case to show that the problem lies with transactions Signed-off-by: Arthur Schreiber * Correctly handle `autocommit` in the `VIndexLookup` primitive. Signed-off-by: Arthur Schreiber * Copy the `logging` struct so autocommit queries show up correctly in `vexplain` output. Signed-off-by: Arthur Schreiber --------- Signed-off-by: Arthur Schreiber * Add TOC to the summary docs (#12225) * docs: add toc to the summary docs Signed-off-by: Manan Gupta * feat: add link to newly added summary change Signed-off-by: Manan Gupta --------- Signed-off-by: Manan Gupta * feat: bump reported version of main (#12234) Signed-off-by: Manan Gupta * Use consistent type for vreplication id (#12218) * Use consistent type for vreplication id The `_vt.vreplication` table has an `INT` type without `UNSIGNED`, so it maps to the Go `int32` type to have the exact same consistent range. This means that we should use `int32` consistently for everywhere that we use the VReplication identifier. We had int32, uint32 and int used pretty randomly for these which leads to CodeQL flagging these and how this was found. Instead this now converts everything to int32. It's also safe to change the protobuf, since the protobuf wire format for int32, uint32, int64 & uint64 is all compatible and actually uses the same variable int length format. The only exception would be if someone has a VReplication identifier that would not fit in `int32`, but well, this PR shows that in that case we already blow up in unexpected and unknown ways anyway. So it's better to have that explicitly error. Signed-off-by: Dirkjan Bussink * Add support for all integer types for bind variables This ensures we cover all the Go int types to generate bind parameters from. Signed-off-by: Dirkjan Bussink * Regenerate protos for vtadmin Signed-off-by: Dirkjan Bussink * Fix test for using ParseInt Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Fix typecasting issue for workflow types (#12217) * Fix typecasting issue for workflow types This addresses a number of the issues identified by CodeQL around typecasting. We use 32 bit integers for these, so let's make sure we parse and cast then as those everywhere it matters. Signed-off-by: Dirkjan Bussink * Ensure to write to int into query Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Use the correct uint32 type for the GTID file position (#12229) This is defined as uint32 at the protocol level, so better to use that type consistently and also parse it accordingly with `ParseUint` with the right size. Signed-off-by: Dirkjan Bussink * Fix CodeQL identified issues (#12199) This addresses two classes of issues that CodeQL found. One is a not as strict as needed regexp for a domain match, where there's no literal `.` being matched. The other is a user controlled XSS since we run the template with arbitrary user input. Instead we validate if the throttler with that name actually exists before trying to execute the template. On error we also don't reflect the input to avoid the same XSS. Signed-off-by: Dirkjan Bussink * Copy remaining query serving design docs (#12170) * Copy remaining query serving design docs Signed-off-by: Florent Poinsard * Remove duplicate design docs Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Use a working MariaDB mirror for CI (#12253) Signed-off-by: Dirkjan Bussink * Update the release instructions after v16 code freeze (#12245) Signed-off-by: Florent Poinsard * onlineddl_vrepl suite: fix auto_increment flakyness (#12246) * onlineddl_vrepl suite: fix auto_increment flakyness Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * delete all rows before events begin Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Revert default MySQL 80 version to `8.0.30` (#12252) * Revert default MySQL 80 version Signed-off-by: Florent Poinsard * upgrade mysql80 default to 8.0.30 Signed-off-by: Florent Poinsard * Add release notes regarding MySQL upgrade path in the vitess-operator Signed-off-by: Florent Poinsard * Remove unwanted upgrade path step Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Fix additional integer type handling (#12237) * Fix additional integer type handling The tablet uid can be a uint32 everywhere and we can parse it like that with pflag as well. This way we don't have to cast and change the valid range and get correct messages when it's out of range. As well we use a regular int for the port which better matches how Go itself tracks ports and removes a bunch of casts from places where we already using int. Lastly it also fixes some small cases of how we parse to match the type we store it in. Signed-off-by: Dirkjan Bussink * Fix parsing of server id for Zookeeper Signed-off-by: Dirkjan Bussink * Fix help output Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * grpcvtgateconn: add Dial and deprecate DialWithOpts (#12210) Signed-off-by: Matt Layher Signed-off-by: Dirkjan Bussink Co-authored-by: Dirkjan Bussink * Use consistent type port and replication state (#12248) * Use consistent type port and replication state These are used as int32 in the protobuf (and enum maps to int32 for replication state). This means we should also keep using int32 internally if easily possible. Signed-off-by: Dirkjan Bussink * Fix assertions in test Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * evalengine: new evaluation framework (#12247) * evalengine: new evaluation framework Signed-off-by: Vicent Marti * evalengine: add cached_size.go Signed-off-by: Vicent Marti * evalengine: simplify casts in NullSafeHashCodeInPlace Signed-off-by: Vicent Marti * evalengine: fix static warnings Signed-off-by: Vicent Marti * evalengine: remove duplicate branch Signed-off-by: Vicent Marti * planbuilder: update for tuple bind variables Signed-off-by: Vicent Marti * evalengine: fix error in tuple hashing Signed-off-by: Vicent Marti * evalengine: fix LIKE simplification Signed-off-by: Vicent Marti * evalengine: cleanup unused tests and panics Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Examples: Add lib functions to wait for shard states (#12239) * Add lib functions to wait for shard states Signed-off-by: Matt Lord * Fixup region example too Signed-off-by: Matt Lord * Address minor review comments Signed-off-by: Matt Lord * Remove extraneous line change Signed-off-by: Matt Lord * Refactor to remove duplicated files/code Also address shellcheck warnings. Signed-off-by: Matt Lord * Fix tests that run in CI Signed-off-by: Matt Lord * Use more robust location detection Signed-off-by: Matt Lord * Fix backup tests Signed-off-by: Matt Lord * Exit on shard healthy failure Signed-off-by: Matt Lord * Remove unused dups and adjust client_test and Dockerfiles Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * Download mariadb from vitess-resources (#12271) * Download mariadb from vitess-resources Signed-off-by: Florent Poinsard * Use proper mariadb version increment in tests Signed-off-by: Florent Poinsard * Use 10.10.3 instead of LTS Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Workflow Show: display rows copied (#12231) * Display rows copied in Workflow Show Signed-off-by: Rohit Nayak * Fix vtctl tests Signed-off-by: Rohit Nayak --------- Signed-off-by: Rohit Nayak * sqlparser: Add parsing support to spatial POINT expression (#12198) * feat: add parsing support to spatial POINT expression Signed-off-by: Ayman161803 * fix: address formatting issues Signed-off-by: Ayman161803 * fix: address formatting issues Signed-off-by: Ayman <76606666+Ayman161803@users.noreply.github.com> * feat: add canonical test cases for spatial point expression Signed-off-by: Ayman161803 --------- Signed-off-by: Ayman161803 Signed-off-by: Ayman <76606666+Ayman161803@users.noreply.github.com> * fix dual table handling (#12204) * fix planner: be careful when merging subqueries We were not checking dependencies of the outer subquery correctly, before merging with a route. This lead to invalid plans being produced. Signed-off-by: Andres Taylor * fix planner: use tables on lhs when merging subqs When calculating if everything we need is available before merging routes, we now take into account anything coming from the LHS of any joins we are under. Signed-off-by: Andres Taylor * test: add test merging subquery with join Signed-off-by: Andres Taylor * use LHS from the top of the current node when planning RHSs Signed-off-by: Florent Poinsard * added comments Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard * Subquery bugfix (#12254) * fix planner: be careful when merging subqueries We were not checking dependencies of the outer subquery correctly, before merging with a route. This lead to invalid plans being produced. Signed-off-by: Andres Taylor * fix planner: use tables on lhs when merging subqs When calculating if everything we need is available before merging routes, we now take into account anything coming from the LHS of any joins we are under. Signed-off-by: Andres Taylor * test: add test merging subquery with join Signed-off-by: Andres Taylor * use LHS from the top of the current node when planning RHSs Signed-off-by: Florent Poinsard * added comments Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard * feat: fix release script (#12284) Signed-off-by: Manan Gupta * feat: copy release notes from release-16 (#12287) Signed-off-by: Manan Gupta * Remove parallelization from tests that mutate shared state (#12257) Signed-off-by: Andrew Mason Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard * fix dual table handling (#12292) * fix dual table handling Signed-off-by: Andres Taylor * update test expectations Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor * fix: transaction_isolation to be applied at session level (#12281) Signed-off-by: Harshit Gangal * fix linter warnings (#12286) * fix linter warnings Signed-off-by: Andres Taylor * add the same checks in CI as pre-commit Signed-off-by: Andres Taylor * ci: disable revive by default Signed-off-by: Vicent Marti --------- Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti Co-authored-by: Vicent Marti * go/vt/mysqlctl: add configurable read buffer to builtin backups (#12073) * go/vt/mysqlctl: add configurable read buffer to builtin backups Signed-off-by: Max Englander * pr review: use uint Signed-off-by: Max Englander * doc/releasenotes: v16 --builtinbackup-file-read-buffer-size and --builtinbackup-file-write-buffer-size Signed-off-by: Max Englander * update flags txt Signed-off-by: Max Englander * make part of v17 Signed-off-by: Max Englander * Update doc/releasenotes/17_0_0_summary.md Co-authored-by: Deepthi Sigireddi Signed-off-by: Max Englander * improve wording -block Signed-off-by: Max Englander --------- Signed-off-by: Max Englander Signed-off-by: Max Englander Co-authored-by: Deepthi Sigireddi * VReplication Last Error: retry error if it happens after timeout (#12114) * Retry error if it happens after timeout Signed-off-by: Rohit Nayak * Address review comments Signed-off-by: Rohit Nayak * Address review comments Signed-off-by: Rohit Nayak * Improve unit tests Signed-off-by: Rohit Nayak --------- Signed-off-by: Rohit Nayak * fix: added null safe operator precendence rule (#12297) Signed-off-by: Harshit Gangal * Fix aggregation on outer joins (#12298) * fix: aggregation coming from right hand side of left join check for null Signed-off-by: Harshit Gangal * test: added a sum test Signed-off-by: Harshit Gangal * addressed review comments Signed-off-by: Harshit Gangal --------- Signed-off-by: Harshit Gangal * Change SQL error codes to use explicit type (#12249) This ErrorCode type maps to a uint16 to match what MySQL has as the range and parses things accordingly as well. With the explicit type we know better when we use the specific error code. Signed-off-by: Dirkjan Bussink * Fix typecasting alerts inside vtgate engine (#12238) CodeQL reported a few cases in the vtgate engine where we can simplify and make the typecasting more correct. We were double casting for the eval as well which isn't useful, so reduce this to it doing one for the hash code. Signed-off-by: Dirkjan Bussink * Move to independent sets package (#12251) This moves to a separate sets package inside Vitess so we don't break version pinning for k8s like in the Vitess operator. It mostly copies the existing implementation, but simplifies and cleans it up to only copy what we actually use. Signed-off-by: Dirkjan Bussink * SchemaDiff: normalize boolean columns to tinyint(1), and, add TableQualifier hint to force adding a db qualifier to the alter diff. (#12133) * Normalize boolean columns to tinyint(1) Signed-off-by: Rohit Nayak * Properly handle invalid defaults provided for boolean columns Signed-off-by: Rohit Nayak * Use TableQualifier hint to decide whether to use the db qualifier for the tables in create/alter scripts Signed-off-by: Rohit Nayak * Keep current behavior as default and require TableQualifierDeclared to force use of the 'to' desired schema's qualifier Signed-off-by: Rohit Nayak * Fix incorrect renaming of enum in comments Signed-off-by: Rohit Nayak * Additional tests for boolean/tinyint(1) equivalence Signed-off-by: Rohit Nayak * Add tests for create/drop with table qualifiers Signed-off-by: Rohit Nayak --------- Signed-off-by: Rohit Nayak * Allow zero (in) date when setting up internal _vt schema (#12262) * Allow zero (in) date when setting up internal _vt schema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * modify test sto include @@sql_mod query support Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Allow zero (in) date when setting up internal _vt schema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * modify test sto include @@sql_mod query support Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Fix test failures Signed-off-by: Rohit Nayak * Fix failing tests. Minor refactor Signed-off-by: Rohit Nayak * change sql_mode t omost permissive (empty) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * setPermissiveSQLMode Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fixes per review Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add missing mock query Signed-off-by: Rohit Nayak --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Rohit Nayak Co-authored-by: Rohit Nayak * maintainers: add dbussink and rework some sections (#12329) Signed-off-by: Vicent Marti * TableFilter: fix excluded RE listing (#12318) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Internal refactor: LastError as a public struct (#12321) * Refactor LastError as a public struct Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * wording Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * evalengine: it's time for JSON! (#12274) * collations: add max width to charsets Signed-off-by: Vicent Marti * evalengine: add support for JSON built-ins Signed-off-by: Vicent Marti * evalengine: support JSON_ARRAY and JSON_OBJECT Signed-off-by: Vicent Marti * evalengine: JSON object sorting like MySQL Signed-off-by: Vicent Marti * evalengine: add support for CAST(val AS JSON) Signed-off-by: Vicent Marti * evalengine: support TO_BASE64 and FROM_BASE64 Signed-off-by: Vicent Marti * evalengine: support JSON_DEPTH Signed-off-by: Vicent Marti * evalengine: support JSON_LENGTH Signed-off-by: Vicent Marti * evalengine: fix codegen Signed-off-by: Vicent Marti * evalengine: do not wrap `json.Value` Signed-off-by: Vicent Marti * sizegen: fix external type generation Signed-off-by: Vicent Marti * evalengine: support JSON_CONTAINS_PATH Signed-off-by: Vicent Marti * evalengine: support JSON_KEYS Signed-off-by: Vicent Marti * evalengine: fix linter warnings Signed-off-by: Vicent Marti * evalengine: fix evalToJSON semantics Signed-off-by: Vicent Marti * evalengine: fix error wrapping Signed-off-by: Vicent Marti * evalengine: update sizegen Signed-off-by: Vicent Marti * evalengine: @systay review feedback Signed-off-by: Vicent Marti * evalengine: oops! fix bad else/if Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * evalengine: fix bugs with decimal rounding (#12360) Signed-off-by: Vicent Marti * VReplication: ignore GC tables in schema analysis (#12320) * TableFilter: fix excluded RE listing Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * extract GCTableNameExpression Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * VReplication: exclude GC tables when reading schema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * wrap schema analyzis errors for better tracability Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add parsing support for linestring constructor (#12299) * feat: add parsing support to linestring constructor Signed-off-by: Ayman161803 * test: add canonical tests Signed-off-by: Ayman161803 * fix: fix formatting issues Signed-off-by: Ayman161803 * chore: increment shift/reduce conflicts to 4 Signed-off-by: Ayman161803 * fix: fix shift/reduce conflict by adding precendence Signed-off-by: Ayman161803 * fix: update yacc grammar to replace []pointExpr with Exprs Signed-off-by: Ayman161803 * fix: update format function for linestringExpr and select_test_cases Signed-off-by: Ayman161803 --------- Signed-off-by: Ayman161803 * testutils: use a rows parser for test comparisons (#12138) * tesutils: use a rows parser for test comparisons Signed-off-by: Vicent Marti * utils: add license Signed-off-by: Vicent Marti * moved parse_rows to sqltypes to avoid import cycle Signed-off-by: Andres Taylor * concatenate: fix test Signed-off-by: Vicent Marti * sqltypes: fix comparison error with duplicate rows Signed-off-by: Vicent Marti * vexplain: fix undeterministic test comparisons Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti Signed-off-by: Andres Taylor Co-authored-by: Andres Taylor * vtbackup, mysqlctl: detailed backup and restore metrics (#11979) * vtbackup, mysqlctl: detailed backup and restore metrics While backup stats are exposed via `servenv` (which is great!) ideally we would like more fine-grained stats on: * Download last backup. * Decompress last backup. * Catchup to primary with replication. * Compress new backup. * Upload new backup. Signed-off-by: Max Englander * move fakemysqldaemon.go to mysqlctl package Signed-off-by: Max Englander * go/vt/mysqlctl: add backup/restore stats tests Signed-off-by: Max Englander * address pr comments round 1 Signed-off-by: Max Englander * checkpoint Signed-off-by: Max Englander * reorganize metric names Signed-off-by: Max Englander * track bytes processed in backup/restore Signed-off-by: Max Englander * address pr comments: remove 'this file' from comments Signed-off-by: Max Englander * Update go/vt/mysqlctl/backupstats/stats.go Co-authored-by: Deepthi Sigireddi Signed-off-by: Max Englander * Update go/vt/mysqlctl/backupstats/stats.go Co-authored-by: Deepthi Sigireddi Signed-off-by: Max Englander * Update go/vt/mysqlctl/backupstats/stats.go Co-authored-by: Deepthi Sigireddi Signed-off-by: Max Englander * pr review: improve comments Signed-off-by: Max Englander * make stats more expvars-friendly Signed-off-by: Max Englander * -backupstorage.Parameterizer, +backupstorage.BackupStorage.WithParams Signed-off-by: Max Englander * remove deleted field Signed-off-by: Max Englander * Update go/ioutil/meter.go Signed-off-by: Max Englander * Update go/ioutil/meter.go Signed-off-by: Max Englander * Update go/ioutil/meter.go Signed-off-by: Max Englander * -constants.go +release notes Signed-off-by: Max Englander * add stats example to release notes Signed-off-by: Max Englander --------- Signed-off-by: Max Englander Signed-off-by: Max Englander Co-authored-by: Deepthi Sigireddi * VReplication: workflows with multiple streams fail to start on multi-primary setups (#12228) * Handle auto_increment_increment step > 1 while creating multiple vreplication streams Signed-off-by: Rohit Nayak * Enhance e2e test for validating auto_increment step logic Signed-off-by: Rohit Nayak * Add new query to mock db Signed-off-by: Rohit Nayak * Add missing mock for TestEngineExec Signed-off-by: Rohit Nayak * Cleanup Signed-off-by: Rohit Nayak * Fix goimports Signed-off-by: Rohit Nayak * Address review comments Signed-off-by: Rohit Nayak * Use uint16 for auto increment step Signed-off-by: Rohit Nayak * Update comments Signed-off-by: Rohit Nayak --------- Signed-off-by: Rohit Nayak * sqlparser/schemadiff: normalize CAST type case (#12372) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add database name to _vt.views table (#12374) Signed-off-by: Harshit Gangal Co-authored-by: Harshit Gangal * [vtgate planner] Routing & Merging refactor (#12197) * start of extracting routing logic out from Route into an interface Signed-off-by: Andres Taylor * wip - milestone - first plan-test green Signed-off-by: Andres Taylor * wip - single table routes work fine Signed-off-by: Andres Taylor * wip - sequence tables passing Signed-off-by: Andres Taylor * wip - all tests in from_cases.json passing Signed-off-by: Andres Taylor * wip - more work on merge logic Signed-off-by: Andres Taylor * wip - need to switch the routes as well Signed-off-by: Andres Taylor * subquery merging Signed-off-by: Harshit Gangal * dual routing Signed-off-by: Harshit Gangal * wip - make sure to keep inner/outer in the right place Signed-off-by: Andres Taylor * make sure to not forget already seen predicates when merging sharded routes Signed-off-by: Andres Taylor * add merged subqueries to the merged field Signed-off-by: Andres Taylor * dual subquery and none routing change Signed-off-by: Harshit Gangal * handle merging subqueries on IN comparisons Signed-off-by: Andres Taylor * recalculate routing after merging subquery Signed-off-by: Andres Taylor * rename field to make it easier to grokk Signed-off-by: Andres Taylor * better merging logic when merging non-sharded tables Signed-off-by: Andres Taylor * when merging subqueries, we must also copy predicates Signed-off-by: Andres Taylor * copy keyspace when producing NoneRouting Signed-off-by: Andres Taylor * implement Routing methods in TargetedRouting and update OpCode outside of shardedrouting Signed-off-by: Florent Poinsard * Fix targeted routing update params and rest of the dml cases Signed-off-by: Florent Poinsard * Enhanced UpdateRoutingLogic function to detect constant null and None routes Signed-off-by: Florent Poinsard * clean up info schema route mergeing Signed-off-by: Andres Taylor * handle reference tables with alternates Signed-off-by: Andres Taylor * update remaining plan_tests Signed-off-by: Andres Taylor * unify unsharded and reference routing in the same logic Signed-off-by: Andres Taylor * clean up merging.go Signed-off-by: Andres Taylor * build the alternate routes with the correct keyspace Signed-off-by: Andres Taylor * minor fixes after self-review Signed-off-by: Andres Taylor * when missing current keyspace, any valid keyspace can be used Signed-off-by: Andres Taylor * final small changes. I promise Signed-off-by: Andres Taylor * review feedback Signed-off-by: Andres Taylor * tidy up method after review feedback Signed-off-by: Andres Taylor * more cleanup - fix goland warnings in new files Signed-off-by: Andres Taylor * add keyspace information to sequence routing Signed-off-by: Andres Taylor * more cleanups from PR review Signed-off-by: Andres Taylor * more cleanup Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor Signed-off-by: Harshit Gangal Signed-off-by: Florent Poinsard Co-authored-by: Harshit Gangal Co-authored-by: Florent Poinsard * This PR bumps the vitess resrouces release increment from v2 to v4 (#12272) Signed-off-by: Florent Poinsard * Switch to using new Go 1.19 CRL parser (#12315) `x509.ParseCRL` is deprecated, we should use `x509.ParseRevocationList` instead which is new in Go 1.19. Signed-off-by: Dirkjan Bussink * Online DDL: remove legacy "stowaway table" logic (#12288) * Online DDL: remove legacy stowaway table logic Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed column from table definition Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Fix for USING when column names not lower cased (#12378) Signed-off-by: Andres Taylor * Fix bug in vtexplain around JOINs (#12376) Signed-off-by: Andres Taylor * fix help text for backup_storage_number_blocks (#12258) Signed-off-by: Rameez Sajwani * Fix additional typecasting alerts (#12309) * Fix additional typecasting alerts This should solve the remaining valid typecasting alerts from CodeQL. Signed-off-by: Dirkjan Bussink * Fix additional typecasting issues Ran through more of the ParseInt / ParseUint / Atoi calls manually that CodeQL didn't identify and found a bunch more inconsistencies that should be fixed. Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Fix additional casting bugs in the sqlparser This fixes a bunch of additional canonical casing bugs in the parser. See https://github.com/vitessio/vitess/issues/12392 for the list of issues it addresses. Signed-off-by: Dirkjan Bussink * Fixes for local docker environment (#12382) Signed-off-by: Andy Lim * [main] Schema RPC to fetch table/view definition (#12375) (#12397) * feat: proto changes to add new rpc Signed-off-by: Harshit Gangal * feat: vttablet changes in queryservice to implement the new rpc Signed-off-by: Harshit Gangal * added test on tabletserver Signed-off-by: Harshit Gangal * feat: use the new schema rpc in vtgate to get updated view definition Signed-off-by: Harshit Gangal * remove error from getschemaresponse and change the enum name Signed-off-by: Harshit Gangal * updated proto files for vtadmin Signed-off-by: Harshit Gangal * fix e2e test Signed-off-by: Harshit Gangal --------- Signed-off-by: Harshit Gangal Co-authored-by: Harshit Gangal * Bump golang.org/x/net from 0.5.0 to 0.7.0 (#12390) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Move to Go 1.19 atomics (#12391) * Move to Go 1.19 atomics This change moves to Go 1.19 atomics in favor of the version we had in the `sync2` package. The version in that package predates the availability of the new atomics, but for the future we want to use the Go provided ones. On top of that, we can also use the semaphore from `x/sync` instead of a custom one in `sync2`. This cleans up a bunch of additional code from `sync2`. Signed-off-by: Dirkjan Bussink * Don't assume the value is a duration This can be any float, so we need to store the float bits in an atomic uint64 instead (as Go has no atomic floats). Signed-off-by: Dirkjan Bussink * Log actual error if acquiring semaphore fails Signed-off-by: Dirkjan Bussink * Fix overlooked metrics threshold case Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Update additional Go dependencies (#12401) Dependabot does pick up these go.mod files but somehow fails to open PRs for them to update things that are vulnerable. So doing it manually here. Signed-off-by: Dirkjan Bussink * Fix another mixin dep (#12403) Dependabot is still warning about this one and missed this in #12401 Signed-off-by: Dirkjan Bussink * Remove a bunch of debug logging (#12404) This removes a bunch of debug logging that is set for higher log levels. The problem is that many of these are logging user provided values directly which is something CodeQL also alerts on. If someone needs this kind of additional logging level, I think it suffices to modify the code locally to test something rather than always carrying these high log level entries. Signed-off-by: Dirkjan Bussink * Stop launchable integration for unit tests (#12386) * feat: stop launchable integration for unit tests Signed-off-by: Manan Gupta * feat: fix identation for the unit tests Signed-off-by: Manan Gupta * feat: also add name to the unit tests Signed-off-by: Manan Gupta --------- Signed-off-by: Manan Gupta * Makefile: use buildx when GOOS/GOARCH are specified (#12081) Signed-off-by: Max Englander * Auto refresh tables on vtgate Status Page (#12335) * Component: vtgate, Auto Update tables in Status For Vtgate page Signed-off-by: jun * rename function name Signed-off-by: jun * move tableRefreshRate to servenv.RegisterFlags() Signed-off-by: jun * Replace JQuery with Vanilla javascript && set default value 0 as non-refreshing && update e2e .txt flags Signed-off-by: jun * update go/flags/endtoend/*.txt Signed-off-by: jun * update e2e flags txt files Signed-off-by: jun * update --table-refresh-interval tag with proper position Signed-off-by: jun * remove extra space in mysqlctl.txt vtorc.txt repush Signed-off-by: jun --------- Signed-off-by: jun Co-authored-by: jun * (re)Formalize SQLError in VReplication, add underlying wrap/unwrap functionality (#12327) * (re)Formalize SQLError in VReplication, add underlying wrap/unwrap functionality Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * update test to match new UnwrapAll() behavior Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * do not unwrap Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Online DDL: improve retry of vreplication errors with `vitess` `ALTER TABLE` migrations (#12323) * Refactor LastError as a public struct Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Online DDL: use LastError for retrying vreplication streams Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * differentiate between a temrinally failed workflow and one which 'has error' and can be retried Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * wording Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplified hasError() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Fixing `onlineddl_vrepl` flakiness, and adding more tests (#12325) * TableFilter: fix excluded RE listing Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * extract GCTableNameExpression Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * VReplication: exclude GC tables when reading schema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * wrap schema analyzis errors for better tracability Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Refactor LastError as a public struct Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Online DDL: use LastError for retrying vreplication streams Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * refactor UpdateThrottlerTopoConfig Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * onlineddl_vrepl tests: - using topo-based throttler config - break down of throttle-based PRS test - adding --postpone-completion -based PRS test - fixing wait for VReplicatoin status Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * differentiate between a temrinally failed workflow and one which 'has error' and can be retried Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * (re)Formalize SQLError in VReplication, add underlying wrap/unwrap functionality Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * differentiate between a temrinally failed workflow and one which 'has error' and can be retried Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * wording Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplified hasError() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * do not unwrap Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Cleanup vtorc ssl package (#12423) This is not used for anything anymore, so let's remove it. Signed-off-by: Dirkjan Bussink * SidecarDB Init: don't fail on schema init errors (#12328) * Don't fail on schema init errors Signed-off-by: Rohit Nayak * Fix debug var attribute name Signed-off-by: Rohit Nayak * Fix typo in debug var Signed-off-by: Rohit Nayak * Address review comment Signed-off-by: Rohit Nayak * Address review comments Signed-off-by: Rohit Nayak --------- Signed-off-by: Rohit Nayak * [main] Examples: Correct VTAdmin Discovery File Path And Add Check (#12415) (#12430) * Examples: correct VTAdmin discovery file path and add check Signed-off-by: Matt Lord * Remove jq dependency Signed-off-by: Matt Lord * vtadmin examples scripts hardcode localhost Signed-off-by: Matt Lord * Fix errant expectation Signed-off-by: Matt Lord * Adjust healthy shard indicator Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord Co-authored-by: Matt Lord * sqlparser: Tools cleanup (#12407) * tools: fix compilation checks in ast helpers Signed-off-by: Vicent Marti * sqlparser: simplify generation Signed-off-by: Vicent Marti * tools: make sizegen more resilient Signed-off-by: Vicent Marti * tools: fix formatting of all generated code Signed-off-by: Vicent Marti * tools: fix call Signed-off-by: Vicent Marti * tools: review feedback Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Add configuration option for minimum TLS version (#12424) * Add configuration option for minimum TLS version We were hardcoding this to TLS 1.0 which is not considered safe anymore these days and was called out by CodeQL as a security issue. Instead we should default to TLS 1.2 which we do everywhere else, and allow for an option to change it if needed so that we're safe by default here. Signed-off-by: Dirkjan Bussink * Add release notes item Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * VReplication: Use MariaDB Compat JSON Functions (#12434) This is needed to better support importing from MariaDB into Vitess/MySQL. Signed-off-by: Matt Lord Co-authored-by: Matt Lord * Remove are-you-alive example (#12432) Signed-off-by: Florent Poinsard * schemadiff: AlterTableAlgorithmStrategy (#12442) * schemadiff: AlterTableAlgorithmStratgy Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * minor rename Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add release notes summary for views (#12422) (#12425) * Add release notes summary for support views * add link to the documentation * simplify views release notes --------- Signed-off-by: Florent Poinsard * [main] Change `GetSchema` RPC to return `CreateView` instead of `SelectStmt` (#12421) (#12441) * Changed getSchemaRPC to return CreateView instead of SelectStmt Signed-off-by: Florent Poinsard * test: fix expectation Signed-off-by: Harshit Gangal --------- Signed-off-by: Florent Poinsard Signed-off-by: Harshit Gangal Co-authored-by: Florent Poinsard Co-authored-by: Harshit Gangal * Add 128 bit hashing for the evalengine (#12428) * evalengine: 128-bit hashes This adds support for 128 bit hashes. With 128 bit hashes, we have enough entropy so we can remove the need to compare values after hashing. Signed-off-by: Vicent Marti Signed-off-by: Dirkjan Bussink * evalengine: Add support for 128 bit hashing This adds a null safe hashing function for 128 bit hashing and tests it. There's no usage of this yet, but that will be extended in the future. Signed-off-by: Dirkjan Bussink * Address review feedback Signed-off-by: Dirkjan Bussink * Ensure to always initialize hasher Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Vicent Marti Signed-off-by: Dirkjan Bussink Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com> * feat: update the pull request template (#12443) Signed-off-by: Manan Gupta * evalengine: use 128 bit hashing internally (#12452) * evalengine: use 128 bit hashing internally Signed-off-by: Vicent Marti * evalengine: implement hashable for hashable types Signed-off-by: Vicent Marti * evalengine: update sizegen Signed-off-by: Vicent Marti * evalengine: fix error with unsupported collations Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Fix Vtop example and release script (#12457) * examples: should use mysql80 property for vitess image Signed-off-by: deepthi Signed-off-by: Manan Gupta * Use MySQL80 in all examples/operator YAML files Signed-off-by: Florent Poinsard Signed-off-by: Manan Gupta * feat: update release script to update vtadmin image version too Signed-off-by: Manan Gupta * feat: fix vtop example script to use vtctldclient instead Signed-off-by: Manan Gupta * feat: update operator.yaml to the latest version Signed-off-by: Manan Gupta * feat: fix yaml files to not pass deprecated parameters Signed-off-by: Manan Gupta * feat: revert changes made for testing Signed-off-by: Manan Gupta --------- Signed-off-by: deepthi Signed-off-by: Manan Gupta Signed-off-by: Florent Poinsard Co-authored-by: deepthi Co-authored-by: Florent Poinsard * feat: add steps on how to merge during code-freeze (#12444) Signed-off-by: Manan Gupta * [main] GetSchema rpc to streaming api (#12447) (#12459) * GetSchema rpc to streaming api Signed-off-by: Harshit Gangal * addressed review comment Signed-off-by: Harshit Gangal --------- Signed-off-by: Harshit Gangal Signed-off-by: Manan Gupta Co-authored-by: Harshit Gangal Co-authored-by: Manan Gupta * feat: don't keep data for upgrade-downgrade tests (#12465) Signed-off-by: Manan Gupta Co-authored-by: Manan Gupta * Create Views allowed for same keyspace (#12409) (#12454) * restrict views to single keyspace * feat: also create/alter and drop views on MySQL for information-schema-support * feat: do the DMLs for alter and create of view in a transaction so that they can be rolled back in case of MySQL failure * ignore view changes by schema tracker in vttablet when views are enabled * test: fix test expectation * Correct syntax error in defer func of E2E test --------- Signed-off-by: Harshit Gangal Signed-off-by: Manan Gupta Signed-off-by: Florent Poinsard Co-authored-by: Manan Gupta Co-authored-by: Florent Poinsard * Add port to enable vtadmin access. (#12467) Signed-off-by: Andy Lim * Fix scalar aggregation engine primitive for column truncation (#12468) (#12473) * fix: scalar aggregation truncation * test: added scalar aggr engine unit test * remove onecase change --------- Signed-off-by: Harshit Gangal Co-authored-by: Harshit Gangal * Fix `SHOW VSCHEMA TABLES` tests using v17 vtgate that expected `dual` (#12381) (#12466) * Fix SHOW VSCHEMA TABLES tests using v17 vtgate * Fix tests expectations --------- Signed-off-by: Florent Poinsard Signed-off-by: Manan Gupta Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> * examples schema: demi-idempotency via CREATE TABLE IF NOT EXISTS (#12453) * examples schema: demi-idempotency via CREATE TABLE IF NOT EXISTS Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * idempotency: if not exists for all tables under examples/ Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * evalengine: add more coercion paths to Hash128 (#12463) Signed-off-by: Vicent Marti * [misc] Delete `automation*` protos (#12449) * Remove unused automation,automationservice protos and codegen Signed-off-by: Andrew Mason * Release notes Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * BugFix: Unsharded query using a derived table and a dual table (#12484) (#12491) * test: add failing test for a query in an unsharded keyspace using a derived table and reference table * feat: fix logic to check if a single unsharded keyspace is used * feat: fix test output --------- Signed-off-by: Manan Gupta * Make upgrade downgrade job names unique (#12485) Signed-off-by: Florent Poinsard * Add nvm and node to vtadmin-up.sh (#12439) * Add nvm and node Signed-off-by: notfelineit * Update script with PR recommendations Signed-off-by: notfelineit * Push up local changes Signed-off-by: notfelineit * Update examples/common/scripts/vtadmin-up.sh Signed-off-by: Frances Thai <31225471+notfelineit@users.noreply.github.com> * Update examples/common/scripts/vtadmin-up.sh Signed-off-by: Frances Thai <31225471+notfelineit@users.noreply.github.com> --------- Signed-off-by: notfelineit Signed-off-by: Frances Thai <31225471+notfelineit@users.noreply.github.com> * Format vtctldclient GetKeyspace output using cli.MarshalJSON. (#12495) Signed-off-by: Matt Lord * ApplySchema: deprecate '--skip_preflight' flag (#10716) * ApplySchema: deprecate '-skip_preflight' flag Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * warn if --skip_preflight is provided Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * remove -skip_preflight from tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * MarkDeprecated, fix usage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * remove skip_preflight test Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * streamlog: make generic (#12494) * streamlog: make generic Signed-off-by: Vicent Marti * gofmt Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * feat: copy release notes from v16 (#12516) Signed-off-by: Manan Gupta * Upgrade to `go1.20.1` (#12399) * Upgrade to go1.20.1 Signed-off-by: Florent Poinsard * Bump golangci-lint version Signed-off-by: Florent Poinsard * Apply linter suggestions Signed-off-by: Florent Poinsard Signed-off-by: deepthi * fix TestTLSClientVerifyIdentity Signed-off-by: Florent Poinsard * Revert unwanted change in server_test Signed-off-by: Florent Poinsard * handle readtablet error Signed-off-by: Florent Poinsard * skip TestFuzz Signed-off-by: Florent Poinsard * Unskip TestFuzz and fix issue Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard Signed-off-by: deepthi Co-authored-by: deepthi * Fix `vtctldclient`'s Root command to return an error on unknown command (#12481) * Add a Run func to `vtctldclient`'s Root command to return an error on unknown command Closes #12480. Signed-off-by: Andrew Mason * Add test Signed-off-by: Andrew Mason * flags test data Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * Flakes: Use new healthy shard check in vreplication e2e tests (#12502) * Use new healthy shard check in vreplication e2e tests This is needed because checking that there's a primary tablet for the shard in vtgate's healtcheck is no longer a reliable indicator that the shard has a healthy serving primary, because now a primary needs to initialize its sidecar database and wait for that to replicate via semi-sync before it becomes serving and can proceed to perform normal functions. So this delay could cause test flakiness if you required a healthy shard before continuing with the test. Signed-off-by: Matt Lord * Try to address unit test race flakes around log size They looked like this: WARNING: DATA RACE Write at 0x000005bf9b60 by goroutine 27141: github.com/spf13/pflag.newUint64Value() /home/runner/go/pkg/mod/github.com/spf13/pflag@v1.0.5/uint64.go:9 +0x5a github.com/spf13/pflag.(*FlagSet).Uint64Var() /home/runner/go/pkg/mod/github.com/spf13/pflag@v1.0.5/uint64.go:45 +0x55 vitess.io/vitess/go/vt/log.RegisterFlags() /home/runner/work/vitess/vitess/go/vt/log/log.go:81 +0x64 vitess.io/vitess/go/vt/servenv.GetFlagSetFor() /home/runner/work/vitess/vitess/go/vt/servenv/servenv.go:347 +0x183 vitess.io/vitess/go/vt/servenv.ParseFlags() /home/runner/work/vitess/vitess/go/vt/servenv/servenv.go:326 +0x49 ... Previous read at 0x000005bf9b60 by goroutine 27136: 1744 github.com/golang/glog.(*syncBuffer).Write() ... And they most often occurred in the wrangler unit tests, which makes sense because it creates a log of loggers. Signed-off-by: Matt Lord * Revert "Try to address unit test race flakes around log size" This reverts commit 51992b8d8390648f2f22657633aec6f21614b266. Signed-off-by: Matt Lord * Use external cluster vtctld in TestMigrate Signed-off-by: Matt Lord * Use subshell vs command output interpolation Signed-off-by: Matt Lord * Ingnore any config files in mysql alias Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * Improve release process post `v16.0.0 GA` code freeze (#12487) * Update the release instructions document with pre-requisites for release team Signed-off-by: Florent Poinsard * Add Do Not Merge to release Pull Request upon creation Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Block merge if the `Do Not Merge` label is set (#12489) * Block Merge if the label is set Signed-off-by: Florent Poinsard * fix echo syntax Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Forward port: Use COPY algorithm while altering sidecardb tables (#12464) Signed-off-by: Rohit Nayak * Remove some old backwards-compatibilities in online ddl code (#12427) Signed-off-by: Andrew Mason * [healthcheck] Remove deprecated fields from TabletHealth json marshalling (#12429) * Remove deprecated fields from TabletHealth json marshalling Plus, as a bonus, resolve a few TODO comments in the tests Signed-off-by: Andrew Mason * Update vtctld test now that fields are removed Signed-off-by: Andrew Mason * fix merge conflict Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * Added [Twitter] & [Etsy] to ADOPTERS.md (#12508) * Update ADOPTERS.md Added [Twitter] to ADOPTERS. see: https://blog.twitter.com/engineering/en_us/topics/infrastructure/2023/how-we-scaled-reads-on-the-twitter-users-database Signed-off-by: Kevin Purwito * Update ADOPTERS.md Added [Etsy] to ADOPTERS. see: https://www.etsy.com/codeascraft/scaling-etsy-payments-with-vitess-part-1--the-data-model Signed-off-by: Kevin Purwito --------- Signed-off-by: Kevin Purwito * feat: add a known issue into the release notes (#12537) Signed-off-by: Manan Gupta Co-authored-by: Manan Gupta * Online DDL: enforce ALGORITHM=COPY on shadow table (#12521) * Online DDL: enforce ALGORITHM=COPY on shadow table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * unit tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * sqlparser: make ALGORITHM values constants, use in Online DDL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * algorithm format Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * revert change to sql.y Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Fix initialization code to also stop replication to prevent crash (#12534) * feat: fix initialization code to also stop replication Signed-off-by: Manan Gupta * feat: fix tests expectations Signed-off-by: Manan Gupta * feat: fix wrangler tests Signed-off-by: Manan Gupta --------- Signed-off-by: Manan Gupta * Add ENV var to local examples to skip VTAdmin (#12547) This is particularly useful when using the local examples for testing and debugging -- where you are continually creating and destroying clusters -- because building and installing VTAdmin takes a significant amount of time and in these scenarios it is unused. Signed-off-by: Matt Lord * TableGC: fix PURGE race condition (#12505) * Online DDL Executor artifacts a table by renaming it into a HOLD state with a timestamp in the past, rather than a PURGE state, a state which may not even be supported. PURGE not being supported is fine, this is not a bug, just a wasteful state. Technically HOLD may also not be supported; but PURGE is known to always not be supported on MySQL 8.0.23, and so going forward PURGE is going to become extinct. Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * TableGC: do not add PURGE table to in-memory map, if PURGE is not a handled state Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adapted test Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * credit for the tests. Now actually transitioning the table out of PURGE state when PURGE is not a handled state Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename argument back to generic name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * OnlineDDL: mitigate scenario where a migration sees recurring cut-over timeouts (#12451) * Online DDL vitess cut-over: drop sentry table as soon as possible and remove from artifacts column Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * validate HOLD table dropped Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * increase vreplication cut-over threshold to a constant 10sec Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * increase query buffer timeout, to accommodate increased cut-over timeout Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * OnlineDDL: optimizing --singleton-context conflict check (#12539) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Bump dns-packet from 5.3.1 to 5.4.0 in /web/vtadmin (#12545) Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 5.3.1 to 5.4.0. - [Release notes](https://github.com/mafintosh/dns-packet/releases) - [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md) - [Commits](https://github.com/mafintosh/dns-packet/compare/v5.3.1...5.4.0) --- updated-dependencies: - dependency-name: dns-packet dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Remove unused JQuery includes (#12552) This is an old remnant and not used anywhere anymore. Better to remove it then. Signed-off-by: Dirkjan Bussink * schemadiff/OnlineDDL: ExtractConstraintOriginalName understands auto-generated names (#12275) * schemadiff: ExtractConstraintOriginalName understands auto-generated names Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Trigger rebuild Signed-off-by: Rohit Nayak --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Rohit Nayak Co-authored-by: Rohit Nayak * evalengine: Refactorings & fixes (#12554) * evalengine: add a compiler struct Signed-off-by: Vicent Marti * evalengine: refactor arithmetic ops Signed-off-by: Vicent Marti * evalengine: rename type check APIs Signed-off-by: Vicent Marti * evalengine/json: extract APIs Signed-off-by: Vicent Marti * evalengine/bit: add comment for behavior Signed-off-by: Vicent Marti * evalengine/call: make interface an Expr Signed-off-by: Vicent Marti * evalengine/json: extract conversion API Signed-off-by: Vicent Marti * evalengine/compare: fix multi-comparison behavior Signed-off-by: Vicent Marti * evalengine/convert: extract decimal precision API Signed-off-by: Vicent Marti * evalengine/bit: extract error Signed-off-by: Vicent Marti * evalengine/bytes: extract toNumericHex Signed-off-by: Vicent Marti * evalengine/integration: move all tests into their own package Signed-off-by: Vicent Marti * collations: expose the charset package Signed-off-by: Vicent Marti * evalengine: remove unused file Signed-off-by: Vicent Marti * evalengine: add license headers Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * collations: fix sorting in UCA900 collations (#12555) * collations: fix sorting in UCA900 collations When using the fast iterator to _compare_ two strings with an UCA collation, we need to keep in mind that the weights in the collation are in BIG ENDIAN (this is the output format for the weight strings, so we store the weights this way), so comparing them directly will not result in the proper collation order. They need to be byte-swapped before they can be compared with an arithmetic operation! Signed-off-by: Vicent Marti * collations: comment Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Flakes: Address Common Unit Test Races (#12546) * Deflake unit race tests Signed-off-by: Matt Lord * Try to address glog.MaxSize race Signed-off-by: Matt Lord * Test w/o using literal copy of glog.MaxSize value in CI Signed-off-by: Matt Lord * Make the dialer names truly unique Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * vtgate: metrics for prepared stmts (#12141) * go/vt/vtgate: metrics for prepare statements Signed-off-by: Max Englander * docs/releasenotes: v16 metrics for prepare statements Signed-off-by: Max Englander * move to v17 Signed-off-by: Max Englander * v16 => v17 Signed-off-by: Max Englander * remove merge cruft Signed-off-by: Max Englander * pr feedback: -breaking +bug +tests Signed-off-by: Max Englander * fix tests Signed-off-by: Max Englander * re-org Signed-off-by: Max Englander * Update doc/releasenotes/17_0_0_summary.md Co-authored-by: Deepthi Sigireddi Signed-off-by: Max Englander --------- Signed-off-by: Max Englander Signed-off-by: Max Englander Co-authored-by: Deepthi Sigireddi * Fix dubious ownership of git directory in `vitess/base` Docker build (#12530) * Fix dubious ownership of git directory in vitess/base Docker build Signed-off-by: Florent Poinsard * Use consistent method to copy and build vitess between base and lite Signed-off-by: Florent Poinsard * fix all base Dockerfiles Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * collations: upgrade to MySQL 8.0.32 (#12557) * collations: update from MySQL 8.0.32 Signed-off-by: Vicent Marti * collations: use an array to store collations Signed-off-by: Vicent Marti * collations: remove Init from Collation interface Signed-off-by: Vicent Marti * collations: perform eager initialiation and simplify APIs Signed-off-by: Vicent Marti * collations: apply utf8mb3 <-> utf8 in both directions Signed-off-by: Vicent Marti * collations: expose the Binary collation Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Use `MarshalVT`/`UnmarshalVT` instead of `proto.Marshal`/`proto.Unmarshal`. (#12525) * Use `MarshalVT` instead of `proto.Marshal`. Signed-off-by: Arthur Schreiber * Use `UnmarshalVT` instead of `proto.Unmarshal`. Signed-off-by: Arthur Schreiber --------- Signed-off-by: Arthur Schreiber * Prevent bootstrap of ZK from clearing previous dist binaries (#12236) Signed-off-by: Adam Saponara * Examples, Flakes: Wait for Shard's VReplication Engine to Open (#12560) * Examples: wait for shard's vreplication engine to open Signed-off-by: Matt Lord * Minor comment changes Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * Deprecating VExec, part 2 - *post v16* (#12074) * Deprecating VExec, part 2 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * admin web proto Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * empty commit to kick DCO CI Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * delete deprecated vtctld healthcheck flags and associated realtime stats code (#12373) * delete deprecated vtctld healthcheck flags and associated realtime stats code Closes #11973. Signed-off-by: Andrew Mason * update flags endtoend testdata Signed-off-by: Andrew Mason * more cleanup Signed-off-by: Andrew Mason * even moar cleanup Signed-off-by: Andrew Mason * whoops Signed-off-by: Andrew Mason * switch to 404 Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * Throttler: Store Config in Global Keyspace Topo Record (#12520) * Store throttler config in global Keyspace record Signed-off-by: Matt Lord * Fix unit test after ThrottlerConfig in Keyspace Signed-off-by: Matt Lord * Apply changes lost in cherry picks Signed-off-by: Matt Lord * Always wait for a status before the final check. We should not ever make an assumption about how quickly an operation will take. Signed-off-by: Matt Lord * Propagate PartialResult and other errs back to client Signed-off-by: Matt Lord * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vtctlutil.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update go/test/endtoend/onlineddl/vtgate_util.go Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Matt Lord Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Introducing new error counter in VTTablet (#12266) * Adding errorcode dimension to error count metric Signed-off-by: Rameez Sajwani * test fix Signed-off-by: Rameez Sajwani * emitting metric only when count is >= 1 Signed-off-by: Rameez Sajwani * Adding new error counter Signed-off-by: Rameez Sajwani * typo fixes Signed-off-by: Rameez Sajwani * Adding summary Signed-off-by: Rameez Sajwani --------- Signed-off-by: Rameez Sajwani * adding log statment to vtbackup (#12569) * adding log statment to vtbackup Signed-off-by: Rameez Sajwani * renaming context variables Signed-off-by: Rameez Sajwani --------- Signed-off-by: Rameez Sajwani * CI: extend timeouts in onlineddl_vrepl due to slow CI runners (#12583) * CI: extend timeouts in onlineddl_vrepl due to slow CI runners Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * increase even further Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * CI: increase overall test timeouts for all OnlineDDL tests (#12584) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * properly escape sequence table names (#12519) Signed-off-by: Hormoz Kheradmand * evalengine: More cleanup (#12573) * evalengine: fix multi-comparisons Signed-off-by: Vicent Marti * evalengine: add a limit for REPEAT Signed-off-by: Vicent Marti * evalengine: Additional fixes for edge cases This solves edge cases around decimal promotion which follows a conversion to int64 (not uint64) and then is casted to uint64 for all bitwise operations. Also adds a bunch of tests for the hex() function and implemented conversions for non string like types. It also found more bugs in MySQL CASE handling, yay. Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Vicent Marti Signed-off-by: Dirkjan Bussink Co-authored-by: Dirkjan Bussink * sqlparser: add parsing support for polygon spatial datatype (#12377) * feat: add parsing support polygon spatial datatype Signed-off-by: Ayman161803 * fix: fix format issues Signed-off-by: Ayman161803 * fix: fix format issues Signed-off-by: Ayman161803 --------- Signed-off-by: Ayman161803 Signed-off-by: Ayman <76606666+Ayman161803@users.noreply.github.com> * go/vt/vttablet/tabletserver: temporarily skip flaky consolidation test (#12604) * go/vt/vttablet/tabletserver: temporarily comment out flaky consolidation testS Signed-off-by: Max Englander * gofmt Signed-off-by: Max Englander --------- Signed-off-by: Max Englander * SQLError: adding some code comments (#12613) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Purge logs without panicking (#12187) * Purge logs without panicking Signed-off-by: Andrew Mason * Purge logs without panicking Signed-off-by: Andrew Mason * try moving the goroutine to the func itself Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * Add basic metrics to `vttablet` transaction throttler (#12418) * Add basic stats to vttablet tx throttler Signed-off-by: Tim Vaillancourt * test new metrics Signed-off-by: Tim Vaillancourt * reorder Signed-off-by: Tim Vaillancourt * short names Signed-off-by: Tim Vaillancourt * Add max rate Signed-off-by: Tim Vaillancourt * Move NewGaugeFunc to under conditional Signed-off-by: Tim Vaillancourt * Use env Signed-off-by: Tim Vaillancourt * Remove env from TxThrottler struct Signed-off-by: Tim Vaillancourt * Fix tests Signed-off-by: Tim Vaillancourt * PR suggestion Signed-off-by: Tim Vaillancourt * Fix unit test Signed-off-by: Tim Vaillancourt * reorder test vars Signed-off-by: Tim Vaillancourt --------- Signed-off-by: Tim Vaillancourt * go/{vt,flags}: register builtin backup flags with vtbackup (#12558) Signed-off-by: Max Englander * Online DDL: `ready_to_complete` race fix (#12612) * Online DDL: synchronous execution of migrations; fix race vitess submission condition; introduce ready_to_complete_timestamp and WasReadyToComplete Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend test Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * test: check NULL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * typo Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Table GC: remove spammy log entry (#12625) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Fix `panic` when executing a prepare statement with over `65,528` parameters (#12614) * fix type conversion in query.go for the bitMap size Signed-off-by: Florent Poinsard * enhance the TestHighNumberOfParams test Signed-off-by: Florent Poinsard * fix test comment Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Emit per workload labels for existing per table vttablet metrics (#12394) * Emit per workload labels for existing per table vttablet metrics This adds the possibility to configure vttablet (via CLI flag) to also have a workload label for existing per table metrics (query counts, query times, query errors, query rows affected, query rows returned, query error counts). Workload can be any string that makes sense for the client application. For example, API endpoint name, controller, batch job name, application name or something else. This is usefult to be able to gain observability about how the query load is distributed across different workloads. This is achieved with two new CLI flags, namely: * `enable-per-workload-table-metrics`: whether to enable or disable per workload metric collection - disabled by default to preserve the current behavior, thus making the new feature opt-in only. * `workload-label`: a string to look for in query comments to identify the workload running the current query. The workload is obtained by parsing query comments of the form: /* ... =; ... */ For example, if vttablet is started with `--enable-per-workload-table-metrics --workload-label app_name` anda query is issued with a comment like /* ... app_name=shop; ... */ then metrics will look like ``` vttablet_query_counts{plan="Select",table="dual", workload="shop"} 15479 ``` instead of ``` vttablet_query_counts{plan="Select",table="dual"} 15479 ``` Query comment parsing only takes place if `--enable-per-workload-table-metrics` is used, as to not incur parsing performance impact if the user does not want per workload metrics. Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * make linter happy Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * fix flags e2e test Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Address PR comments: * Obtain workload information on the vtgate instead of the vttablet, avoiding double parsing. * Treat workload name as a query directive. * Send workload name from vtgate to vttablet as ExecuteOptions. Additionally, annotate tabletserver's execution span with the workload name to also enrich traces with workload name data, in addition to metrics. Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * A few fixes: 1. Rebuild some files with `make proto`. 2. Protect against nil ExecuteOptions on the tabletserver. Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix flags e2e test Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Address PR comments Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fixes Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix a comment Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix e2e flag test Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Update JS code for protobuf changes. Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix QueryEngine unit test Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix e2e flag test Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Fix spurious tab in comment Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Address PR comment Don't use dual format flag for new flags - stick with - separated ones. Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> --------- Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * Support Custom SidecarDB Names on VTTablets (#12240) * WIP Signed-off-by: Matt Lord * vreplication package Signed-off-by: Matt Lord * Revert OnlineDDL package changes for now Signed-off-by: Matt Lord * Fix unit tests Signed-off-by: Matt Lord * Fix InitShardPrimary / ReparentJournal Signed-off-by: Matt Lord * onlineddl package Signed-off-by: Matt Lord * Shorten/improve exported func name Signed-off-by: Matt Lord * Remaining work Signed-off-by: Matt Lord * Remove redundancy from exported function names Signed-off-by: Matt Lord * Minor changes after self review Signed-off-by: Matt Lord * More testing, more fixes Signed-off-by: Matt Lord * Move from vttablet flag to topo Keyspace record Signed-off-by: Matt Lord * Fix vtctld API unit test Signed-off-by: Matt Lord * Fix TestHelp Signed-off-by: Matt Lord * Update throttler service initialization Signed-off-by: Matt Lord * Use custom sidecar in VReplication e2e tests Signed-off-by: Matt Lord * Make sidecardb name concurrecy safe Signed-off-by: Matt Lord * Fix VDiff2 e2e test and remove other hardecoded sidecar names Signed-off-by: Matt Lord * Adjust throttler initialization Signed-off-by: Matt Lord * Post merge fixes Signed-off-by: Matt Lord * Copy SidecarDBName from global Keyspace object to SrvKeyspace objects This way it can be easily accessed by vtgate, vtctld, etc via their existing ResilentServer SrvKeyspace watchers in their own local cell. Signed-off-by: Matt Lord * Store throttler config in global Keyspace record Signed-off-by: Matt Lord * Update vtadmin protos Signed-off-by: Matt Lord * Fix unit test after ThrottlerConfig in Keyspace Signed-off-by: Matt Lord * SidecarDbName is not needed in SrvKeyspace records Signed-off-by: Matt Lord * Remove sqlparser.ReplaceTableQualifiers from query hot path. Signed-off-by: Matt Lord * Add topo timeout for SHOW VITESS_MIGRATIONS Signed-off-by: Matt Lord * Cache sidecar database identifiers by keyspace Signed-off-by: Matt Lord * Modify onlineddl package 1. Move sidecardb table qualifier mgmt to execQuery() 2. Move e2e test back to tablet flag based throttler config Signed-off-by: Matt Lord * Revert "Fix unit test after ThrottlerConfig in Keyspace" This reverts commit 303db964459f1bd431c5418ce7fb0e10812de4bd. Signed-off-by: Matt Lord * Revert "Store throttler config in global Keyspace record" This reverts commit 1e7c750da4868ee0d0c3b02be412d32730b17127. Signed-off-by: Matt Lord * Finish ThrottlerTopoConfig change rollback Signed-off-by: Matt Lord * Add max identifier length check for --sidecar-db-name flag Signed-off-by: Matt Lord * Move vdiff and vreplication packages to binlogplayer.DBClient.ExecuteFetch() Signed-off-by: Matt Lord * binlogplayer.DBClient: eliminate overhead when default name is used Signed-off-by: Matt Lord * Move keyspace ID look to a helper function In case it needs to be used elsewhere. Signed-off-by: Matt Lord * Minor cleanup Signed-off-by: Matt Lord * Add context for usage in the local examples Signed-off-by: Matt Lord * Correct CreateKeyspace command's sidecardb flag validation Signed-off-by: Matt Lord * Limit overhead for OnlineDDL package Signed-off-by: Matt Lord * Cleanup and improvements after self review Signed-off-by: Matt Lord * Store each keyspace's sidecar db identifier in schema.Tracker Signed-off-by: Matt Lord * Enable custom sidecar db name in schema tracker e2e tests Signed-off-by: Matt Lord * Fix schema.tracker and its tests Signed-off-by: Matt Lord * Better support downgrade tests Signed-off-by: Matt Lord * Always use sqlparser.String() for proper escaping Signed-off-by: Matt Lord * Try to fix Upgrade Downgrade Testing Query Serving (Schema) Signed-off-by: Matt Lord * Minor changes after self review. Signed-off-by: Matt Lord * Mark new flag/functionality as experimental Signed-off-by: Matt Lord * Remove exclamation point from example error msg Signed-off-by: Matt Lord * Fixups after merge Signed-off-by: Matt Lord * More post merge fixes Signed-off-by: Matt Lord * Address review comments Signed-off-by: Matt Lord * Moar knits! Signed-off-by: Matt Lord * Moar knits -- the sequel Signed-off-by: Matt Lord * Deflake schematracker e2e tests They have gotten flakier since the tablet init changes. Signed-off-by: Matt Lord * Add a dedicated in-memory cache for sidecar db idents Signed-off-by: Matt Lord * Improve sidecardb identifier cache Signed-off-by: Matt Lord * More minor improvements Signed-off-by: Matt Lord * Minor tweaks after final self review Signed-off-by: Matt Lord * Minor tidy work Signed-off-by: Matt Lord * Delete entry from cache on srvkeyspace deletion Signed-off-by: Matt Lord * Address review comments. Signed-off-by: Matt Lord * Save me from my nitting! (use vtrpcpb convention) Signed-off-by: Matt Lord * Make IdentifierCache more concurrency-safe than it needs to be (today) Signed-off-by: Matt Lord * Slighly improve code coverage Signed-off-by: Matt Lord * Let caller know if New created a cache or returned inited singleton. Signed-off-by: Matt Lord * Address review comments Signed-off-by: Matt Lord * Use more unique name for unit test Signed-off-by: Matt Lord * Address latest review comments Signed-off-by: Matt Lord * Use lower context for updating keyspace Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * Initialize Tablet with super_read_only mode (#12206) * Adding super read only in cnf file Signed-off-by: Rameez Sajwani * add new init sql file for unit test Signed-off-by: Rameez Sajwani * enable super-readonly by default Signed-off-by: Rameez Sajwani * Fixing some arrangement for super-read-only Signed-off-by: Rameez Sajwani * Fix end to end tests Signed-off-by: Rameez Sajwani * fix rpc_replication issue Signed-off-by: Rameez Sajwani * Fixing backup tests Signed-off-by: Rameez Sajwani * fixing error with spacing in init sql file Signed-off-by: Rameez Sajwani * vtgate end to end fixes Signed-off-by: Rameez Sajwani * some more test fixes Signed-off-by: Rameez Sajwani * fixing flag tests and more Signed-off-by: Rameez Sajwani * fixing schema sql Signed-off-by: Rameez Sajwani * fixing unit tests Signed-off-by: Rameez Sajwani * fixing vttest server test cases Signed-off-by: Rameez Sajwani * fixing more downgrad upgrade test Signed-off-by: Rameez Sajwani * fixing reparent upgrade downgrade test Signed-off-by: Rameez Sajwani * Bug fix for replication position Signed-off-by: Rameez Sajwani * Fixing vtexplain tests Signed-off-by: Rameez Sajwani * Fixing mariadb initialization Signed-off-by: Rameez Sajwani * fixing upgrade downgrade e2e test Signed-off-by: Rameez Sajwani * Fixing assignment of init sql db file Signed-off-by: Rameez Sajwani * code clean up Signed-off-by: Rameez Sajwani * Fixing backup test Signed-off-by: Rameez Sajwani * adding super read only api for sql demon Signed-off-by: Rameez Sajwani * converting read-only calls to super-read-only calls Signed-off-by: Rameez Sajwani * restructure vtexplain code to be more generic Signed-off-by: Rameez Sajwani * forgot to make proto vtadmin Signed-off-by: Rameez Sajwani * Code review part-1 Signed-off-by: Rameez Sajwani * remove code for redolog in test Signed-off-by: Rameez Sajwani * fix ensureDB test Signed-off-by: Rameez Sajwani * code review part-2 Signed-off-by: Rameez Sajwani * Remove setSuperReadOnly checks Signed-off-by: Rameez Sajwani * code review part-3 Signed-off-by: Rameez Sajwani * Try restoring without super_read_only Signed-off-by: Rameez Sajwani * test: simplify vtorc test to not require turning off super-read-only Signed-off-by: Manan Gupta * code review part-4 Signed-off-by: Rameez Sajwani * Fixing typo Signed-off-by: Rameez Sajwani * code review part-5 Signed-off-by: Rameez Sajwani * clean up some code Signed-off-by: Rameez Sajwani * test: fix vtorc test Signed-off-by: Manan Gupta * Code clean up - part 2 Signed-off-by: Rameez Sajwani * Adding summary Signed-off-by: Rameez Sajwani * code cleanup Signed-off-by: Rameez Sajwani * Removing init_testserver to test its dependenciesy Signed-off-by: Rameez Sajwani * fixing downgrade/upgrade and bringing back mariadb check Signed-off-by: Rameez Sajwani * Removing mariadb check from vttest Signed-off-by: Rameez Sajwani * deprecating `use_super_read_only` flag Signed-off-by: Rameez Sajwani * Modify FullStatus test Signed-off-by: Rameez Sajwani * code clean-up Signed-off-by: Rameez Sajwani * code cleanup - part 2 Signed-off-by: Rameez Sajwani * fixing fullstatus test Signed-off-by: Rameez Sajwani * code review feedback Signed-off-by: Rameez Sajwani * fixing summary and some minor cleanup Signed-off-by: Rameez Sajwani * remove extra logging Signed-off-by: Rameez Sajwani * moving init_testserver_db under test folder Signed-off-by: Rameez Sajwani * fixing code comment Signed-off-by: Rameez Sajwani * trying out password db init file for PITR test Signed-off-by: Rameez Sajwani * remove read-only flag from default.cnf Signed-off-by: Rameez Sajwani * Removing QueryTabletWithSuperReadOnlyHandling method Signed-off-by: Rameez Sajwani * moving flag at right place Signed-off-by: Rameez Sajwani * code review feedback Signed-off-by: Rameez Sajwani * fixing require.noerror check Signed-off-by: Rameez Sajwani * code review - part 2 Signed-off-by: Rameez Sajwani * code review phase 3 Signed-off-by: Rameez Sajwani * revert uncommented code Signed-off-by: Rameez Sajwani --------- Signed-off-by: Rameez Sajwani Signed-off-by: Manan Gupta Co-authored-by: Manan Gupta * VSCopy: Enable to copy from all shards in either a specified keyspace or all keyspaces (#11909) * VSCopy: Demonstrate to fail a test case on which the vstream API request doesn't include keyspace and shard Signed-off-by: yoheimuta * VSCopy: Copy from all shards in all keyspaces by specifying only an empty gtid Signed-off-by: yoheimuta * tests: Make TestRowCount stable regardless of the number of keyspaces Signed-off-by: yoheimuta * tests: Cleanup TestCreateAndDropDatabase correctly to stop TestVStreamCopyWithoutKeyspaceShard from failing when running tests together Signed-off-by: yoheimuta * tests: Tweak to fix a comment Signed-off-by: yoheimuta * VSCopy: fix the unit tests when the input vgtid with an empty gtid lacks either keyspace or shard Signed-off-by: yoheimuta * VSCopy: Keyspace wildcard selection lines up with the table wildcard selection Signed-off-by: yoheimuta * VSCopy: Tests the VCopy with multiple keyspaces and resharding Signed-off-by: yoheimuta * VSCopy: Make TestVStreamCopyMultiKeyspaceReshard clearer to check if the streaming two keyspaces works even after reshard Signed-off-by: yoheimuta * VSCopy: Return an invalid argument error if shards are unspecified and gtid is neither 'current' nor empty Signed-off-by: yoheimuta * VSCopy: Add a test description about its purpose and target Signed-off-by: yoheimuta * VSCopy: Remove duplicate literals in the test Signed-off-by: yoheimuta * VSCopy: Retain defaultReplicas variable in the test Signed-off-by: yoheimuta * VSCopy: Explain why we are setting Match to 'customer.*' in the test Signed-off-by: yoheimuta * VSCopy: Remove an unused VStreamFlag for the test Signed-off-by: yoheimuta * VSCopy: Use sentence capitalization in the test Signed-off-by: yoheimuta * VSCopy: Verify that we didn't lose any events or get duplicates of the keyspace being reshareded in the test Signed-off-by: yoheimuta * VSCopy: Return a value instead of a pointer because there is no need to modify the value Signed-off-by: yoheimuta * VSCopy: Add a comment describing what TestVStreamCopyFromAllKeyspacesAndAllShards is doing and why Signed-off-by: yoheimuta * VSCopy: Add a comment describing why we expect these specific numbers of events from VStream API Signed-off-by: yoheimuta * VSCopy: Tweak the test case name Signed-off-by: yoheimuta * VSCopy: Make a utility function to sort COPY_COMPLETED events in the test Signed-off-by: yoheimuta * VSCopy: Replace the matcher with a simpler one in the test Signed-off-by: yoheimuta * VSCopy: Move the print debug call to the FailNow section in the test Signed-off-by: yoheimuta * VSCopy: Use require.NoError in new tests Signed-off-by: yoheimuta * VSCopy: Use require instead of t.Fatalf in the test Signed-off-by: yoheimuta * VSCopy: Apply the reviewer's suggestion to make the error message easier to read Signed-off-by: yoheimuta * VSCopy: Add a comment noting what we're actually testing Signed-off-by: yoheimuta * VSCopy: Correct the test comment and elaborate the special-case Signed-off-by: yoheimuta * VSCopy: Tweak an error message and a comment Signed-off-by: yoheimuta * VSCopy: Adjust to a change in the signature of a test function that was introduced in the main repository Signed-off-by: yoheimuta --------- Signed-off-by: yoheimuta * VSCopy: Ensure that vgtid event includes a complete TableLastPK proto message (#12623) * VSCopy: Add a test to confirm that some vgtid event the client receives from the vstream copy lacks the Fields value Signed-off-by: yoheimuta * VSCopy: Fix a bug to ensure that the vgtid event includes a complete TableLastPK proto message Signed-off-by: yoheimuta * VSCopy: Fix unit tests Signed-off-by: yoheimuta --------- Signed-off-by: yoheimuta * Bump webpack from 5.65.0 to 5.76.1 in /web/vtadmin (#12632) Bumps [webpack](https://github.com/webpack/webpack) from 5.65.0 to 5.76.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.65.0...v5.76.1) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * go/vt/mysqlctl/backupstats: increment *_bytes metric by actual number of bytes (#12501) * go/vt/mysqlctl/backupstats: increment *_bytes metric by actual number of bytes Signed-off-by: Max Englander * add more unit test and try an e2e Signed-off-by: Max Englander * e2e: check backup engine/storage impl. when validating stats Signed-off-by: Max Englander * e2e: check restore stats Signed-off-by: Max Englander * e2e: try proper check of engine Signed-off-by: Max Englander * try to make xb tests work Signed-off-by: Max Englander --------- Signed-off-by: Max Englander * Improve release instructions post `v16.0.0 GA` release (#12538) * add more information on how to do the java release Signed-off-by: Florent Poinsard * add more information regarding the release notes on main Signed-off-by: Florent Poinsard * add launchable step in code freeze Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Flakes: Handle Non-Determinstic Shard Ordering in VGTID (#12637) * Handle non-determinstic shard ordering in vgtid Signed-off-by: Matt Lord * Adjust regexp again non-determinstic part was which shard has the table last pk. Signed-off-by: Matt Lord * More minor tweaks Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * Use atomic.Bool for fakesqldb behavior flags (#12603) Signed-off-by: Matt Lord Signed-off-by: Max Englander Co-authored-by: Matt Lord * evalengine: virtual machine (#12369) * go: add a slices2 package Signed-off-by: Vicent Marti * evalengine: compiler [wip] Signed-off-by: Vicent Marti * evalengine: fix test helpers Signed-off-by: Vicent Marti * evalengine/compiler: Add support for REPEAT Signed-off-by: Dirkjan Bussink * evalengine/compiler: Add support for base64 functions Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement UPPER / LOWER Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement string length functions Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement ASCII() function Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement LIKE support Signed-off-by: Dirkjan Bussink * evalengine/compiler: fix naming for instructions Signed-off-by: Vicent Marti * evalengine/compiler: use new collation API Signed-off-by: Vicent Marti * evalengine/compiler: implement multi-comparisons Signed-off-by: Vicent Marti * evalengine/compiler: implement JSON_ARRAY Signed-off-by: Vicent Marti * Fix issues after rebasing This fixes the compiler for the newly exposed issues after rebasing on top of evalengine fixes. Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement hex() and convert using Signed-off-by: Dirkjan Bussink * evalengine/compiler: implement JSON_OBJECT Signed-off-by: Vicent Marti * compiler: add support for tuple comparisons Signed-off-by: Vicent Marti * evalengine/compiler: arrange in separate files Signed-off-by: Vicent Marti * evalengine/compiler: Implement COLLATION function Signed-off-by: Dirkjan Bussink * evalengine/compiler: Implement CEIL Signed-off-by: Dirkjan Bussink * evalengine/compiler: IS expressions and JSON_KEYS Signed-off-by: Vicent Marti * evalengine: fix IS and CEIL corner cases Signed-off-by: Vicent Marti * evalengine/compiler: implement IN Signed-off-by: Vicent Marti * evalengine/compiler: implement WEIGHT_STRING Signed-off-by: Vicent Marti * evalengine/compiler: optimize null checks Signed-off-by: Vicent Marti * evalengine/compiler: test for runtime errors Signed-off-by: Vicent Marti * evalengine: Add support for FLOOR(). We already had CEIL() and this is very similar, in fact, it's a tiny bit simpler since we don't have to do the add one logic if divmod returns a non zero remainder. Signed-off-by: Dirkjan Bussink * evalengine: Add support for ABS() Since we already have CEIL(), FLOOR() etc. let's add some more numeric operations here to the eval engine. Signed-off-by: Dirkjan Bussink * evalengine: Implement trigonometry functions Signed-off-by: Dirkjan Bussink * evalengine: simplify test case generation Signed-off-by: Vicent Marti * evalengine: add missing headers Signed-off-by: Vicent Marti * evalengine: sizegen Signed-off-by: Vicent Marti * slices2: update licensing Signed-off-by: Vicent Marti * evalengine: add documentation Signed-off-by: Vicent Marti * Move normalization logic as it's test only Signed-off-by: Dirkjan Bussink * evalengine/compiler: Add missing COT to compiler. Signed-off-by: Dirkjan Bussink * evalengine/compiler: Fix flags for arithmatic operations Signed-off-by: Dirkjan Bussink * refactor comparisons Signed-off-by: Andres Taylor * no need to pass in err to method Signed-off-by: Andres Taylor * evalengine/compiler: remove redundant constants Signed-off-by: Vicent Marti * evalengine/compiler: de-duplicate math functions Signed-off-by: Vicent Marti * evalengine: Add additional arithmetic tests and fix edge cases This also fixes how we deal with boolean values so we don't rewrite internal booleans on the stack and update what literal booleans mean accidentally. Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Vicent Marti Signed-off-by: Dirkjan Bussink Signed-off-by: Andres Taylor Co-authored-by: Dirkjan Bussink Co-authored-by: Andres Taylor * Flakes: Handle Non-Deterministic VStream Event Ordering (#12642) * Handle non-determinstic shard ordering in vgtid Part II, electric boogaloo. Signed-off-by: Matt Lord * Ensure that each VGTID has at least one full TableLastPK Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * [gen4 planner] Make sure to not push down expressions when not possible (#12607) * Fix random aggregation to not select Null column Signed-off-by: Florent Poinsard * stop pushing down projections that should be evaluated at the vtgate level Signed-off-by: Andres Taylor * undo changes to AggregateRandom Signed-off-by: Andres Taylor * clean up code Signed-off-by: Andres Taylor * fix executor test mock Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard Signed-off-by: Andres Taylor Co-authored-by: Andres Taylor * feat: add parsing support to geom Collection types (#12608) Signed-off-by: Ayman161803 * Minor cleanup of SidecarDB package (#12652) This addresses some minor things noticed when doing other work. Signed-off-by: Matt Lord * [vtadmin] racy vtexplain (#12635) * serialize vtadmin vtexplain tests Signed-off-by: Andrew Mason * also lock the actual function Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason * Parser: support PURGE BINARY LOGS statement (#12615) * Parser: support PURGE BINARY LOGS statement Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * correct alphabetical order Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Re-organize the `releasenotes` directory into `changelog` (#12566) * Move all release related documents to ./release and add tool to generate READMEs Signed-off-by: Florent Poinsard * Addition of the release.go file Signed-off-by: Florent Poinsard * simplify release.go Signed-off-by: Florent Poinsard * generate the release notes in the proper place Signed-off-by: Florent Poinsard * modify previous mentions of docs/releasenotes Signed-off-by: Florent Poinsard * re-add v17.0.0 summary Signed-off-by: Florent Poinsard * add new release tool to release instruction and ci Signed-off-by: Florent Poinsard * apply review suggestions Signed-off-by: Florent Poinsard * simplify release notes document path Signed-off-by: Florent Poinsard * Apply review suggestions and fix team files Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Mysqld.GetSchema: tolerate tables being dropped while inspecting schema (#12641) * Mysqld.GetSchema: tolerate tables being dropped while inspecting schema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * lack of primary key columns in STATISTICS does not mean table is dropped. It can also mean the table does not have PRIMARY KEY Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * populate validTds rather than rely on nil hints Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * re-introdce earlier check Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use validTds, sync Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * due to many tests consistently failing, trying a different approach: we keep the table, but with empty column/key/fields info Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Always add columns in the `Derived` operator (#12634) * Always add column in the derived operator Signed-off-by: Florent Poinsard * Fix plan tests expectations Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard Signed-off-by: Andres Taylor Co-authored-by: Andres Taylor * Add the vtadmin web directory to the release packages (#12639) Signed-off-by: Florent Poinsard * Refactor: go/vt/vtgate/engine/opcode to reduce `semantics` package dependencies (#12663) * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add new package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * copyright Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * schemadiff: validate views' referenced columns via semantics (#12565) * validate table columns referenced by views Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * validate views' columns Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * support star expression Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed 'TODO' Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename: errs Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * excessive test, removed Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * go mod tidy Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * update to latest mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * avoid setting entity columns in case of error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * dual, not dual2 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * stripped irrelevant comments Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using AllErrorRecorder instead of multierr package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * multierr update Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using FakeSI as table-column model Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename variable Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * clone Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add InvalidStarExprInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Make 'args()' accessible Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using 'go/vt/vtgate/semantics' to analyze view queries. Handling star expression in DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * more test cases Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * typo Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * unexpected error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use ColumnName() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * iterate columns instead of Walk Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplify InvalidColumnReferencedInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * do not use FakeSI, create my own implementation of semantics.SchemaInformation Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add new package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * copyright Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix function comment Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * empty commit to kick CI Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * evalengine: Implement integer division and modulo (#12656) * evalengine: Implement integer division and modulo Signed-off-by: Dirkjan Bussink * evalengine: Implement NOT and logical operations This adds the NOT and generic logical operations to the compiler and fixes a number of existing bugs in the evalengine. Specifically NOT is currently broken as we don't translate it properly. Some main issues are that we need to ensure lazy evaluation for the logical operations but also needing it for arithmetic as well. All cases where we've been pushing the boolean singleton value need to be fixed as well in the compiler, because we inline update things in arithmetic operations and we'd update the singleton value before. It also needs to split parsing into JSON from using an argument as a partial JSON value. This specifically is needed for CAST() with an input string where it should parse it. Additionally, convering a JSON boolean to numeric needs to create a floating point value, not an integer one. Signed-off-by: Dirkjan Bussink * Fix tests Signed-off-by: Dirkjan Bussink * evalengine/compiler: Use helpers where appropriate Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * feat: fix tests Signed-off-by: Manan Gupta * planner: fix predicate simplifier (#12650) * planner: fix predicate simplifier Signed-off-by: Andres Taylor * predicate rewriting: add debug logging Signed-off-by: Andres Taylor * add debug logging to make the code easier to understand Signed-off-by: Andres Taylor * address review feedback Signed-off-by: Andres Taylor * Update go/vt/vtgate/planbuilder/predicate_rewrite_test.go Nicer panic message Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor Signed-off-by: Andres Taylor Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> * [latest-16.0](#1657): CherryPick(#12501): go/vt/mysqlctl/backupstats: increment *_bytes metric by actual number of bytes (#1692) * backport of 1657 * fix conflicts --------- Signed-off-by: Vitess Cherry-Pick Bot Signed-off-by: Max Englander Co-authored-by: Vitess Cherry-Pick Bot Co-authored-by: Max Englander * [planner bugfix] add expressions to HAVING (#12668) * [planner bugfix] add expressions to HAVING When a predicate contains aggregation, it should not be added to the WHERE clause. It should go to the Signed-off-by: Andres Taylor * update test expecteations Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor * Fix a few failing tests Signed-off-by: Rohit Nayak * Fix TestShowWarnings Signed-off-by: Rohit Nayak * Horizon planning on operators (#12506) * Plan horizon on operator for single route Signed-off-by: Florent Poinsard * Optimize code Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * Refactor: go/vt/vtgate/engine/opcode to reduce `semantics` package dependencies (#12663) (#1709) * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies * add new package * copyright --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * combined cherry pick: Schemadiff validate view columns semantics 16 (#1711) * Refactor: go/vt/vtgate/engine/opcode to reduce `semantics` package dependencies (#12663) * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add new package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * copyright Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * schemadiff: validate views' referenced columns via semantics (#12565) * validate table columns referenced by views Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * validate views' columns Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * support star expression Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed 'TODO' Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename: errs Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * excessive test, removed Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * go mod tidy Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * update to latest mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * avoid setting entity columns in case of error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * dual, not dual2 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * stripped irrelevant comments Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using AllErrorRecorder instead of multierr package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * multierr update Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using FakeSI as table-column model Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename variable Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * clone Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add InvalidStarExprInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Make 'args()' accessible Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using 'go/vt/vtgate/semantics' to analyze view queries. Handling star expression in DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * more test cases Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * typo Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * unexpected error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use ColumnName() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * iterate columns instead of Walk Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplify InvalidColumnReferencedInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * do not use FakeSI, create my own implementation of semantics.SchemaInformation Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add new package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * copyright Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix function comment Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * empty commit to kick CI Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * make proto Signed-off-by: Rohit Nayak * Fix merge issue with TestValidateAndEditCreateTableStatement Signed-off-by: Rohit Nayak * Semantics refactor: formalize errors (#12572) * formalize SemanticsError. First up: UnionColumnsDoNotMatchError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add UnsupportedMultiTablesInUpdateError, UnsupportedNaturalJoinError ; refactor error classification Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add UnionWithSQLCalcFoundRowsError; formalize printf Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add MissingInVSchemaError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add NotSequenceTableError, NextWithMultipleTablesError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add LockOnlyWithDualError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add QualifiedOrderInUnionError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add JSONTablesError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add BuggyError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add ColumnNotFoundError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add AmbiguousColumnError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * final cleanup Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * refactor: renaming Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix format Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adapting tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * MissingInVSchemaError: formalize table info Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * formalize UnsupportedNaturalJoinError's join expressoin Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * formalize ColumnNotFoundError's Column Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * semantics feat: add table information to column not found errors Signed-off-by: Andres Taylor * fix unit tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * only add qualifier if the colname didn't already have one Signed-off-by: Andres Taylor * update test expectations Signed-off-by: Andres Taylor * added tests and cleaned up code Signed-off-by: Andres Taylor * [semantic errors] implement vterrors interfaces Signed-off-by: Andres Taylor * semantics: use interfaces to distinguish errors Signed-off-by: Vicent Marti --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti Co-authored-by: Andres Taylor Co-authored-by: Vicent Marti * backport of 1683 (#1698) Signed-off-by: Vitess Cherry-Pick Bot Signed-off-by: Dirkjan Bussink Co-authored-by: Vitess Cherry-Pick Bot * evalengine: misc. cleanups (#12684) * evalengine: misc. cleanups Signed-off-by: Vicent Marti * evalengine/compiler: fix ASM string Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * backport of 1656 (#1689) Signed-off-by: Vitess Cherry-Pick Bot Signed-off-by: Dirkjan Bussink Co-authored-by: Vitess Cherry-Pick Bot * Semantics refactor: formalize errors (#12572) (#1713) * formalize SemanticsError. First up: UnionColumnsDoNotMatchError * add UnsupportedMultiTablesInUpdateError, UnsupportedNaturalJoinError ; refactor error classification * add UnionWithSQLCalcFoundRowsError; formalize printf * add MissingInVSchemaError * add NotSequenceTableError, NextWithMultipleTablesError * add LockOnlyWithDualError * Add QualifiedOrderInUnionError * add JSONTablesError * add BuggyError * Add ColumnNotFoundError * add AmbiguousColumnError * final cleanup * refactor: renaming * fix format * adapting tests * MissingInVSchemaError: formalize table info * formalize UnsupportedNaturalJoinError's join expressoin * formalize ColumnNotFoundError's Column * semantics feat: add table information to column not found errors * fix unit tests * only add qualifier if the colname didn't already have one * update test expectations * added tests and cleaned up code * [semantic errors] implement vterrors interfaces * semantics: use interfaces to distinguish errors --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti Co-authored-by: Andres Taylor Co-authored-by: Vicent Marti * Move to independent sets package (#12251) (#1714) This moves to a separate sets package inside Vitess so we don't break version pinning for k8s like in the Vitess operator. It mostly copies the existing implementation, but simplifies and cleans it up to only copy what we actually use. Signed-off-by: Dirkjan Bussink * make vtadmin protos Signed-off-by: Rohit Nayak * Fix TestSessionConfig Signed-off-by: Rohit Nayak * Fix backupstats tests Signed-off-by: Rohit Nayak * update query-string dep due to reported vulnerability (#12673) * update query-string dep due to reported vulnerability Signed-off-by: Priya Bibra * use older version Signed-off-by: Priya Bibra * fix build err Signed-off-by: Priya Bibra * run prettier Signed-off-by: Priya Bibra --------- Signed-off-by: Priya Bibra * `schemadiff`: multi-error in schema normalization (#12675) * validate table columns referenced by views Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * validate views' columns Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * support star expression Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed 'TODO' Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename: errs Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * excessive test, removed Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * go mod tidy Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * update to latest mutierr Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * avoid setting entity columns in case of error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * dual, not dual2 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * stripped irrelevant comments Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using AllErrorRecorder instead of multierr package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * multierr update Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using FakeSI as table-column model Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * rename variable Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * clone Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add InvalidStarExprInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Make 'args()' accessible Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * using 'go/vt/vtgate/semantics' to analyze view queries. Handling star expression in DUAL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * more test cases Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * typo Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * unexpected error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * use ColumnName() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * iterate columns instead of Walk Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplify InvalidColumnReferencedInViewError Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * do not use FakeSI, create my own implementation of semantics.SchemaInformation Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add new package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * copyright Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix function comment Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * aggregate errors in normalize() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Unwrap logic for go 1.20 error wrapping Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * aggregate errors using go1.20 errors.Join(); aggregate errors on s.ValidateViewReferences Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * collect errors Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * unit tests for Unwrap* functions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * refactor: new 'errors' package Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * `schemadiff`: multi-error in schema normalization (#12675) (#1717) * validate table columns referenced by views * validate views' columns * support star expression * removed 'TODO' * rename: errs * use mutierr * excessive test, removed * go mod tidy * update to latest mutierr * avoid setting entity columns in case of error * grammar * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL * dual, not dual2 * stripped irrelevant comments * using AllErrorRecorder instead of multierr package * multierr update * using FakeSI as table-column model * rename variable * clone * add InvalidStarExprInViewError * Make 'args()' accessible * using 'go/vt/vtgate/semantics' to analyze view queries. Handling star expression in DUAL * more test cases * typo * unexpected error * use ColumnName() * iterate columns instead of Walk * simplify InvalidColumnReferencedInViewError * do not use FakeSI, create my own implementation of semantics.SchemaInformation * Refactor: go/vt/vtgate/engine/opcode to reduce semantics package dependencies * add new package * copyright * fix function comment * aggregate errors in normalize() * Unwrap logic for go 1.20 error wrapping * aggregate errors using go1.20 errors.Join(); aggregate errors on s.ValidateViewReferences * collect errors * unit tests for Unwrap* functions * refactor: new 'errors' package --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Auto upgrade the Golang version (#12585) * initial addition of the go_upgrade tool to detect and bump the golang version Signed-off-by: Florent Poinsard * update go.mod automatically Signed-off-by: Florent Poinsard * fix isSameMajor version issue Signed-off-by: Florent Poinsard * update the bootstrap version automatically Signed-off-by: Florent Poinsard * update the bootstrap docker image changelog Signed-off-by: Florent Poinsard * uncomment code Signed-off-by: Florent Poinsard * addition of workflow Signed-off-by: Florent Poinsard * addition of base to create-pull-request Signed-off-by: Florent Poinsard * test create PR alternative Signed-off-by: Florent Poinsard * add flags and getter methods Signed-off-by: Florent Poinsard * better PR message Signed-off-by: Florent Poinsard * fix no-workflow-update flag and better PR body msg Signed-off-by: Florent Poinsard * fix PR title, branch and body format Signed-off-by: Florent Poinsard * test matrix and pwd path Signed-off-by: Florent Poinsard * enhanced matrix Signed-off-by: Florent Poinsard * update_workflows option Signed-off-by: Florent Poinsard * update workflows independently Signed-off-by: Florent Poinsard * test without matrix Signed-off-by: Florent Poinsard * Add docs to go_upgrade and re-add matrix to the workflow Signed-off-by: Florent Poinsard * support major version upgrade Signed-off-by: Florent Poinsard * do not update bootstrap version if they are the same Signed-off-by: Florent Poinsard * migrate to cobra instead of pflags Signed-off-by: Florent Poinsard * remove redundant comment Signed-off-by: Florent Poinsard * safety net around replaceGoVersionInCodebase to avoid unrequired upgrade Signed-off-by: Florent Poinsard * Remove double negation in workflowUpdate flag Signed-off-by: Florent Poinsard * Use regexp instead of mere string comparison Signed-off-by: Florent Poinsard * Proper regexp for every string comparison Signed-off-by: Florent Poinsard * use better regex Signed-off-by: Florent Poinsard * remove useless flag and improve the auto-PR body description Signed-off-by: Florent Poinsard * add note in the tool usage to run the tool at the root of the repo Signed-off-by: Florent Poinsard * add comment in .github/workflows/update_golang_version.yml Signed-off-by: Florent Poinsard * Apply @mattlord code suggestion Signed-off-by: Florent Poinsard * replace usages of old filename Signed-off-by: Florent Poinsard * Apply suggestions from code review Co-authored-by: Matt Lord Signed-off-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> --------- Signed-off-by: Florent Poinsard Signed-off-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Co-authored-by: Matt Lord * backport of 1712 (#1718) Signed-off-by: Vitess Cherry-Pick Bot Co-authored-by: Vitess Cherry-Pick Bot * Fix handling of table information for missing column (#12705) The change in https://github.com/vitessio/vitess/pull/12572 introduced a subtle bug. When we clone a parsed SQL statement, we don't clone the column information since that's used in the semantic analyzer as a by pointer value. This means that semantic analysis also is not allowed to update / change this column information because it would modify also a previously cloned statement. So we need to introduce an explicit field reference to the table. This also updates the terminology to use column instead of symbol as that's a more common term and also what MySQL uses in it's error messages. Signed-off-by: Dirkjan Bussink * Fix handling of table information for missing column (#1719) The change in https://github.com/vitessio/vitess/pull/12572 introduced a subtle bug. When we clone a parsed SQL statement, we don't clone the column information since that's used in the semantic analyzer as a by pointer value. This means that semantic analysis also is not allowed to update / change this column information because it would modify also a previously cloned statement. So we need to introduce an explicit field reference to the table. This also updates the terminology to use column instead of symbol as that's a more common term and also what MySQL uses in it's error messages. Signed-off-by: Dirkjan Bussink * Fix the returned schema object for broken views (#12713) The logic added in https://github.com/vitessio/vitess/pull/12675 has a small issue. When a view is found that has an error, it's not present anymore when a subsequent `.ToSQL()` call happens, so it looks like the view disappears. We should never have a view disappear since that could potentially break things and lead to unexpected results. Signed-off-by: Dirkjan Bussink * [gen4 planner] Make sure to not push down expressions when not possible (#12607) (#12648) (#1715) * Fix random aggregation to not select Null column * stop pushing down projections that should be evaluated at the vtgate level * undo changes to AggregateRandom * clean up code * fix executor test mock --------- Signed-off-by: Florent Poinsard Signed-off-by: Andres Taylor Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Co-authored-by: Andres Taylor * Fix the returned schema object for broken views (#1720) The logic added in https://github.com/vitessio/vitess/pull/12675 has a small issue. When a view is found that has an error, it's not present anymore when a subsequent `.ToSQL()` call happens, so it looks like the view disappears. We should never have a view disappear since that could potentially break things and lead to unexpected results. Signed-off-by: Dirkjan Bussink * Fixing backup tests flakiness (#12655) * remove unnecessary vtorc process Signed-off-by: Rameez Sajwani * Adding vtorc disabling at right place Signed-off-by: Rameez Sajwani * Adding comments Signed-off-by: Rameez Sajwani --------- Signed-off-by: Rameez Sajwani * fix fullstatus test for backward compat (#12685) Signed-off-by: Rameez Sajwani * Refactor and cleanup treatment of keyspace IDs and KeyRange (#12524) * Refactor and cleanup treatment of keyspace IDs and KeyRange Signed-off-by: Jeremy Cole * Address internal review comments Signed-off-by: Jeremy Cole * Fix apparent bug in KeyRangeContiguous when a or b are full-range Signed-off-by: Jeremy Cole * Add test for bug in comparing "0003" vs "000300" Signed-off-by: Hormoz Kheradmand * Remove trailing zeroes in key.Normalize instead of adding padding Signed-off-by: Jeremy Cole * Address review feedback; test formatting, comments, function naming Signed-off-by: Jeremy Cole * Refactor tests for TestKeyRangesIntersect Signed-off-by: Jeremy Cole * Rename KeyRangesIntersect to KeyRangeIntersect for consistency Signed-off-by: Jeremy Cole * Remove unused KeyRangesOverlap function Signed-off-by: Jeremy Cole * Rename KeyRangeIncludes to KeyRangeContainsKeyRange, clean up and add tests Signed-off-by: Jeremy Cole --------- Signed-off-by: Jeremy Cole Signed-off-by: Hormoz Kheradmand Co-authored-by: Hormoz Kheradmand * Run launchable only on PRs against `main` (#12694) * feat: reenable launchable for unit_tests Signed-off-by: Manan Gupta * feat: only run CI on PRs against main Signed-off-by: Manan Gupta * feat: use base_ref instead of ref Signed-off-by: Manan Gupta --------- Signed-off-by: Manan Gupta * Use new init_db.sql file in all places and update v17.0.0 summary (#12716) * Use new init_db.sql file in all places and update 17 summary regarding this change Signed-off-by: Florent Poinsard * add new line in vitess-mixin/e2e/config/init_db.sql Signed-off-by: Florent Poinsard --------- Signed-off-by: Florent Poinsard * [planner fix] make unknown column an error only for sharded queries (#12704) * [planner fix] make unknown column an error only for sharded queries Signed-off-by: Andres Taylor * review feedback addressed Signed-off-by: Andres Taylor * Add a strict semantic analysis to be used by schemadiff Signed-off-by: Andres Taylor --------- Signed-off-by: Andres Taylor * sqlparser: Add parsing support for wkt funcs (#12651) * feat: add parsing support for wkt funcs Signed-off-by: Ayman161803 * replace string to enum in GeomFromWkt Signed-off-by: Ayman161803 * reduce number of tokens Signed-off-by: Ayman161803 --------- Signed-off-by: Ayman161803 * Use a left join to make sure that tables with tablespace=innodb_system are included in the schema (#12672) * Use a left join to make sure that tables with tablespace=innodb_system are not skipped when loading the schema (fixes #12669) Signed-off-by: Oleksiy Kovyrin * Set tablespace on a test table to see if it breaks vstreamer Signed-off-by: Oleksiy Kovyrin --------- Signed-off-by: Oleksiy Kovyrin * Add read-only token permissions to GitHub Action workflows (#12718) * Workflow templates set read-only permissions Signed-off-by: Pedro Kaj Kjellerup Nacht * Regenerate workflows with read-only permissions Almost all workflows recreated with `make generate_ci_workflows`. Signed-off-by: Pedro Kaj Kjellerup Nacht * restrict permissions in more places Signed-off-by: Florent Poinsard --------- Signed-off-by: Pedro Kaj Kjellerup Nacht Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard * backport of 1633 (#1725) Signed-off-by: Vitess Cherry-Pick Bot Co-authored-by: Vitess Cherry-Pick Bot * Implement logic to handle more JSON conversion (#12733) * Implement logic to handle more JSON conversion This extends the evalengine support to better convert existing types to JSON as appropriate. It also implements the comparison according to https://dev.mysql.com/doc/refman/8.0/en/json.html. Signed-off-by: Dirkjan Bussink * Implement feedback Signed-off-by: Dirkjan Bussink --------- Signed-off-by: Dirkjan Bussink * Add Workflow Update Client Command (#12622) * Add update action to Workflow command Signed-off-by: Matt Lord * Add on-ddl Signed-off-by: Matt Lord * Made on-ddl handling 5.7 compatible Signed-off-by: Matt Lord * Various fixes and improvements Signed-off-by: Matt Lord * Correct/unify Workflow usage output Signed-off-by: Matt Lord * Test fixes Signed-off-by: Matt Lord * Minor changes after self review Signed-off-by: Matt Lord * Move Workflow Update to RPC Signed-off-by: Matt Lord * Modify unit test Signed-off-by: Matt Lord * Thread request through and add method to Fake TMC Signed-off-by: Matt Lord * Use RPC request/response type throughout Signed-off-by: Matt Lord * We don't care about action within callback As the callback will be an RPC that manages everything. For example, DeleteVRWorkflow will delete associated vdiff data etc. Signed-off-by: Matt Lord * Updates after self review Signed-off-by: Matt Lord * Various changes and re-arranging Signed-off-by: Matt Lord * Add tabletmanager unit test Signed-off-by: Matt Lord * Build out test and fix bugs found Signed-off-by: Matt Lord * Minor changes after self review Signed-off-by: Matt Lord * Cleanup in reverse creation order Signed-off-by: Matt Lord * Remove now incorrect unit test addition Signed-off-by: Matt Lord * No final results in show/listall/--dry-run update And remove trailing empty line in update dry run output. Signed-off-by: Matt Lord * Minor unit test improvements Signed-off-by: Matt Lord * Nitty nitter gonna nit Signed-off-by: Matt Lord * Address review comments Signed-off-by: Matt Lord * Use more meaningful const var name Signed-off-by: Matt Lord * Add vtctldclient command for Workflow update Use string slices for cells and tablets. Various other cleanup. Signed-off-by: Matt Lord * Minor changes after quick self review Signed-off-by: Matt Lord * Minor fixes after local testing Signed-off-by: Matt Lord * Update vtctldclient --help output Signed-off-by: Matt Lord * Address review comments Signed-off-by: Matt Lord * Address remaining review comments Signed-off-by: Matt Lord * Being annoyingly pedantic ... halp Signed-off-by: Matt Lord * Missed a spot Signed-off-by: Matt Lord * Minor improvements after final self review Signed-off-by: Matt Lord * One last tiny optimization Signed-off-by: Matt Lord * Since I have to run CI again... I confirmed that we're using nil as the default generally in the vtctldclient code. Signed-off-by: Matt Lord * Re-add missing vtctl[client] check for any provided changes Signed-off-by: Matt Lord * Add full/proper support for Reshard worfklows. It worked, but the way that the error handling was done made it seem like it failed (it ONLY showed the errors from the source primary tablets). Signed-off-by: Matt Lord * Add the most basic e2e test Signed-off-by: Matt Lord * Use require.NotEmpty in new e2e checks Signed-off-by: Matt Lord * Test updating workflow in same relative point Signed-off-by: Matt Lord * Use same ks.wf names Signed-off-by: Matt Lord * Adjust comments and Changed check for shard merges. Signed-off-by: Matt Lord * Minor comment/help output changes on final self review. Signed-off-by: Matt Lord * Trim whitespace on provided cells and tablet types Signed-off-by: Matt Lord * Use topoproto.ParseTabletType for input validation This leaves us with a singular place where this is done throughout the client code and allows us to uniformly change it if needed in the future. Signed-off-by: Matt Lord --------- Signed-off-by: Matt Lord * fix fullstatus test for backward compat (#12685) (#1730) Signed-off-by: Rameez Sajwani * Fixing backup tests flakiness (#12655) (#1729) * remove unnecessary vtorc process * Adding vtorc disabling at right place * Adding comments --------- Signed-off-by: Rameez Sajwani * [ast & semantics] Make more type information available (#12710) * sqlparser: add optional typing to Argument Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti * planbuilder: replace TypeFor with TypeForExpr Signed-off-by: Vicent Marti * sqlparser: replace TypeOf with (*Literal).SQLType() Signed-off-by: Vicent Marti * planbuilder: update tests Signed-off-by: Vicent Marti * update more tests Signed-off-by: Andres Taylor * vtgate: update tests Signed-off-by: Vicent Marti * vreplication: fix tests Signed-off-by: Vicent Marti --------- Signed-off-by: Andres Taylor Signed-off-by: Vicent Marti Co-authored-by: Vicent Marti * vtgate: use collation when hashing query plans (#12728) * vtgate: use collation when hashing query plans Signed-off-by: Vicent Marti * vtgate: fix tests Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * Reset the current lag when closing the replication lag reader. (#12683) * Reset the current lag when closing the replication lag reader. Signed-off-by: Johan Stenberg * Fix tests. Signed-off-by: Johan Stenberg --------- Signed-off-by: Johan Stenberg * go/vt/vtgate: add json and use_fallback opts to numeric_static_map vdx (#12414) * go/vt/vtgate: add json and use_fallback opts to numeric_static_map vdx numeric_static_map supports a json file. In some environments it may be more convenient to set this in the VSchema directly, rather than make the json file available everywhere it needs to be loaded. In addition, it may be useful to have the ability to fallback to a hash lookup when there are keys missing from the json mapping. Co-Authored-By: Jacques Grove Signed-off-by: Max Englander * use fallback_type in numeric static map Signed-off-by: Max Englander * remove unused var Signed-off-by: Max Englander * pr feedback: remove old comment Signed-off-by: Max Englander * pr feedback: rm bad err check, us=>use Signed-off-by: Max Englander --------- Signed-off-by: Max Englander Co-authored-by: Jacques Grove * go/{mysql,sync2,vt}: rework tabletserver consolidator test, modify consolidator result type (#12609) * go/{mysql,sync2,vt}: rework tabletserver consolidator test Signed-off-by: Max Englander * fmt Signed-off-by: Max Englander * slight tweak fake consolidator api Signed-off-by: Max Englander * fix typos and copy-pasta Signed-off-by: Max Englander * go/{sync2,vt}: change consolidator result type from any to *sqltypes.Result Signed-off-by: Max Englander --------- Signed-off-by: Max Englander * evalengine: New integration API (#12724) * evalengine: new APIs for compiler Signed-off-by: Vicent Marti * evalengine: add support for typed bvars Signed-off-by: Vicent Marti * evalengine: use new bvar APIs Signed-off-by: Vicent Marti * evalengine: naming Signed-off-by: Vicent Marti * evalengine: use conn collation during translation Signed-off-by: Vicent Marti * evalengine: only use Fields for typechecking Signed-off-by: Vicent Marti * evalengine/compiler: use a static type Signed-off-by: Vicent Marti * evalengine: embed the vm state in the expression env Signed-off-by: Vicent Marti * evalengine/compiler: push for BVar Signed-off-by: Vicent Marti * evalengine: fix external tests Signed-off-by: Vicent Marti * evalengine/compiler: fix assembly instructions Signed-off-by: Vicent Marti * evalengine: lint warnings Signed-off-by: Vicent Marti --------- Signed-off-by: Vicent Marti * vschema ddl: add grammar to accept qualified tables (#12577) Signed-off-by: Hormoz Kheradmand * [planner bugfix] add expressions to HAVING (#12668) (#1735) (#1739) * [planner bugfix] add expressions to HAVING When a predicate contains aggregation, it should not be added to the WHERE clause. It should go to the * update test expecteations --------- Signed-off-by: Andres Taylor Signed-off-by: Manan Gupta Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Co-authored-by: Andres Taylor * Update the release instructions on how to update the website documentation (#12746) Signed-off-by: Florent Poinsard * backport of 1716 (#1723) Signed-off-by: Vitess Cherry-Pick Bot Signed-off-by: Patrick Reynolds Co-authored-by: Vitess Cherry-Pick Bot Co-authored-by: Patrick Reynolds * feat: regenerate proto files Signed-off-by: Manan Gupta * feat: fix boost files after recent changes Signed-off-by: Manan Gupta * evalengine: fix column (de)serialization Signed-off-by: Vicent Marti * feat: fix unit test outputs Signed-off-by: Manan Gupta * feat: fix duplicated code Signed-off-by: Manan Gupta * feat: fix boost test Signed-off-by: Manan Gupta * Remove spurious extra bracket Signed-off-by: Rohit Nayak * make proto. update golangci-lint to v1.52.2 Signed-off-by: Rohit Nayak --------- Signed-off-by: Manan Gupta Signed-off-by: Dirkjan Bussink Signed-off-by: Florent Poinsard Signed-off-by: Matt Lord Signed-off-by: Brian Ramos Signed-off-by: Harshit Gangal Signed-off-by: Andres Taylor Signed-off-by: Arthur Schreiber Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Matt Layher Signed-off-by: Vicent Marti Signed-off-by: Rohit Nayak Signed-off-by: Ayman161803 Signed-off-by: Ayman <76606666+Ayman161803@users.noreply.github.com> Signed-off-by: Andrew Mason Signed-off-by: Max Englander Signed-off-by: Max Englander Signed-off-by: Rameez Sajwani Signed-off-by: Andy Lim Signed-off-by: dependabot[bot] Signed-off-by: jun Signed-off-by: deepthi Signed-off-by: notfelineit Signed-off-by: Frances Thai <31225471+notfelineit@users.noreply.github.com> Signed-off-by: Kevin Purwito Signed-off-by: Adam Saponara Signed-off-by: Hormoz Kheradmand Signed-off-by: Tim Vaillancourt Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Signed-off-by: yoheimuta Signed-off-by: Andres Taylor Signed-off-by: Vitess Cherry-Pick Bot Signed-off-by: Priya Bibra Signed-off-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Jeremy Cole Signed-off-by: Oleksiy Kovyrin Signed-off-by: Pedro Kaj Kjellerup Nacht Signed-off-by: Johan Stenberg Signed-off-by: Patrick Reynolds Co-authored-by: Dirkjan Bussink Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Co-authored-by: Matt Lord Co-authored-by: Brian Ramos Co-authored-by: Florent Poinsard Co-authored-by: Harshit Gangal Co-authored-by: Andres Taylor Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Arthur Schreiber Co-authored-by: Matt Layher Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com> Co-authored-by: Rohit Nayak <57520317+rohit-nayak-ps@users.noreply.github.com> Co-authored-by: Ayman <76606666+Ayman161803@users.noreply.github.com> Co-authored-by: Andrew Mason Co-authored-by: Vicent Marti Co-authored-by: Max Englander Co-authored-by: Deepthi Sigireddi Co-authored-by: Rohit Nayak Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Rameez Sajwani Co-authored-by: Andy Lim <125596831+andylim-duo@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jwangace <121262788+jwangace@users.noreply.github.com> Co-authored-by: jun Co-authored-by: deepthi Co-authored-by: Frances Thai <31225471+notfelineit@users.noreply.github.com> Co-authored-by: Kevin Purwito Co-authored-by: Max Englander Co-authored-by: Adam Co-authored-by: Hormoz Kheradmand Co-authored-by: Tim Vaillancourt Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Co-authored-by: yohei yoshimuta Co-authored-by: PlanetScale Actions Bot <60239337+planetscale-actions-bot@users.noreply.github.com> Co-authored-by: Vitess Cherry-Pick Bot Co-authored-by: pbibra Co-authored-by: Jeremy Cole Co-authored-by: Hormoz Kheradmand Co-authored-by: Oleksiy Kovyrin Co-authored-by: Pedro Nacht Co-authored-by: Johan Stenberg Co-authored-by: Jacques Grove Co-authored-by: Patrick Reynolds --- .github/pull_request_template.md | 1 + .github/workflows/check_label.yml | 74 + .../workflows/close_stale_pull_requests.yml | 8 +- ...n.yml => cluster_endtoend_backup_pitr.yml} | 0 .github/workflows/codeql_analysis.yml | 27 +- .github/workflows/create_release.yml | 5 +- .github/workflows/sonar_analysis.yml | 11 +- .github/workflows/static_checks_etc.yml | 4 +- .github/workflows/unit_race.yml | 2 + .github/workflows/update_golang_version.yml | 74 + .github/workflows/vtadmin_web_build.yml | 2 + .github/workflows/vtadmin_web_lint.yml | 2 + .github/workflows/vtadmin_web_unit_tests.yml | 2 + .gitignore | 3 +- ADOPTERS.md | 2 + MAINTAINERS.md | 16 +- Makefile | 14 +- bootstrap.sh | 14 +- .../10.0/10.0.0/release_notes.md | 0 .../10.0/10.0.1/release_notes.md | 0 .../10.0/10.0.2/release_notes.md | 0 .../10.0/10.0.3/release_notes.md | 0 .../10.0/10.0.3/summary.md | 0 .../10.0/10.0.4/release_notes.md | 0 .../10.0/10.0.4/summary.md | 0 .../10.0/10.0.5/release_notes.md | 0 .../10.0/10.0.5/summary.md | 0 changelog/10.0/README.md | 18 + .../11.0/11.0.0/release_notes.md | 0 .../11.0/11.0.1/release_notes.md | 0 .../11.0/11.0.2/release_notes.md | 0 .../11.0/11.0.2/summary.md | 0 .../11.0/11.0.3/release_notes.md | 0 .../11.0/11.0.3/summary.md | 0 .../11.0/11.0.4/release_notes.md | 0 .../11.0/11.0.4/summary.md | 0 changelog/11.0/README.md | 15 + .../12.0/12.0.0/release_notes.md | 0 .../12.0/12.0.0/summary.md | 0 .../12.0/12.0.1/release_notes.md | 0 .../12.0/12.0.1/summary.md | 0 .../12.0/12.0.2/release_notes.md | 0 .../12.0/12.0.2/summary.md | 0 .../12.0/12.0.3/release_notes.md | 0 .../12.0/12.0.3/summary.md | 0 .../12.0/12.0.4/release_notes.md | 0 .../12.0/12.0.5/changelog.md | 0 .../12.0/12.0.5/release_notes.md | 2 +- .../12.0/12.0.6/changelog.md | 0 .../12.0/12.0.6/release_notes.md | 2 +- .../12.0/12.0.6/summary.md | 0 changelog/12.0/README.md | 23 + .../13.0/13.0.0/release_notes.md | 0 .../13.0/13.0.0/summary.md | 0 .../13.0/13.0.1/release_notes.md | 0 .../13.0/13.0.2/changelog.md | 0 .../13.0/13.0.2/release_notes.md | 2 +- .../13.0/13.0.2/summary.md | 0 .../13.0/13.0.3/changelog.md | 0 .../13.0/13.0.3/release_notes.md | 2 +- .../13.0/13.0.3/summary.md | 0 changelog/13.0/README.md | 14 + .../14.0/14.0.0/changelog.md | 0 .../14.0/14.0.0/release_notes.md | 2 +- .../14.0/14.0.0/summary.md | 0 .../14.0/14.0.1/changelog.md | 0 .../14.0/14.0.1/release_notes.md | 2 +- .../14.0/14.0.1/summary.md | 0 .../14.0/14.0.2/changelog.md | 0 .../14.0/14.0.2/release_notes.md | 2 +- .../14.0/14.0.2/summary.md | 0 .../14.0/14.0.3/changelog.md | 0 .../14.0/14.0.3/release_notes.md | 2 +- .../14.0/14.0.3/summary.md | 0 changelog/14.0/14.0.4/changelog.md | 43 + changelog/14.0/14.0.4/release_notes.md | 22 + changelog/14.0/14.0.4/summary.md | 14 + changelog/14.0/README.md | 20 + .../15.0/15.0.0/changelog.md | 0 changelog/15.0/15.0.0/release_notes.md | 463 + .../15.0/15.0.0/summary.md | 0 changelog/15.0/15.0.1/changelog.md | 43 + changelog/15.0/15.0.1/release_notes.md | 24 + changelog/15.0/15.0.1/summary.md | 14 + changelog/15.0/15.0.2/changelog.md | 27 + changelog/15.0/15.0.2/release_notes.md | 20 + changelog/15.0/15.0.2/summary.md | 10 + changelog/15.0/README.md | 13 + changelog/15.0/team.md | 5 + changelog/16.0/16.0.0/changelog.md | 449 + changelog/16.0/16.0.0/release_notes.md | 533 + changelog/16.0/16.0.0/summary.md | 524 + changelog/16.0/README.md | 5 + changelog/16.0/team.md | 5 + changelog/17.0/17.0.0/summary.md | 229 + changelog/17.0/README.md | 2 + .../7.0/7.0.0/release_notes.md | 0 .../7.0/7.0.1/release_notes.md | 0 .../7.0/7.0.2/release_notes.md | 0 .../7.0/7.0.3/release_notes.md | 0 changelog/7.0/README.md | 12 + .../8.0/8.0.0/release_notes.md | 0 changelog/8.0/README.md | 3 + .../9.0/9.0.0/release_notes.md | 0 .../9.0/9.0.1/release_notes.md | 0 .../9.0/9.0.2/release_notes.md | 0 changelog/9.0/README.md | 9 + changelog/README.md | 12 + config/init_db.sql | 15 +- config/mycnf/default.cnf | 3 - config/mycnf/mariadb10.cnf | 2 + config/mycnf/mysql57.cnf | 4 + config/mycnf/mysql80.cnf | 5 + config/mycnf/test-suite.cnf | 3 + doc/design-docs/OwnedPrimaryVindexes.md | 43 + doc/internal/ReleaseInstructions.md | 67 +- docker/base/Dockerfile | 2 +- docker/base/Dockerfile.mysql57 | 17 +- docker/base/Dockerfile.percona57 | 2 +- docker/base/Dockerfile.percona80 | 2 +- docker/lite/Dockerfile.mysql57 | 2 +- docker/lite/Dockerfile.mysql80 | 6 +- docker/lite/Dockerfile.percona57 | 2 +- docker/lite/Dockerfile.percona80 | 2 +- docker/lite/Dockerfile.testing | 2 +- docker/lite/Dockerfile.ubi7.mysql57 | 2 +- docker/lite/Dockerfile.ubi7.mysql80 | 2 +- docker/lite/Dockerfile.ubi7.percona57 | 2 +- docker/lite/Dockerfile.ubi7.percona80 | 2 +- docker/lite/Dockerfile.ubi8.arm64.mysql80 | 2 +- docker/lite/Dockerfile.ubi8.mysql80 | 2 +- docker/local/Dockerfile | 6 +- docker/local/install_local_dependencies.sh | 5 +- docker/release.sh | 2 +- docker/vttestserver/Dockerfile.mysql57 | 2 +- docker/vttestserver/Dockerfile.mysql80 | 2 +- examples/are-you-alive/.gitignore | 2 - examples/are-you-alive/Makefile | 15 - examples/are-you-alive/README.md | 91 - examples/are-you-alive/build/dev/Dockerfile | 6 - examples/are-you-alive/build/dev/reflex.conf | 5 - .../are-you-alive/build/release/Dockerfile | 8 - .../are-you-alive/cmd/are-you-alive/main.go | 357 - examples/are-you-alive/docker-compose.yml | 27 - examples/are-you-alive/go.mod | 13 - examples/are-you-alive/go.sum | 503 - examples/are-you-alive/pkg/client/client.go | 347 - examples/are-you-alive/prometheus.yml | 34 - examples/are-you-alive/schemas/README.md | 9 - .../schemas/create_test_table.sql | 6 - examples/are-you-alive/schemas/vschema.json | 18 - examples/backups/create_commerce_schema.sql | 6 +- examples/backups/create_customer_schema.sql | 6 +- examples/common/lib/utils.sh | 4 + examples/common/scripts/vtadmin-up.sh | 25 +- examples/compose/config/init_db.sql | 12 + .../compose/external_db/mysql/commerce.sql | 4 +- examples/compose/tables/create_dinosaurs.sql | 4 +- examples/compose/tables/create_eggs.sql | 4 +- examples/compose/tables/create_messages.sql | 4 +- .../tables/create_messages_message_lookup.sql | 4 +- examples/compose/tables/create_tokens.sql | 4 +- .../tables/create_tokens_token_lookup.sql | 4 +- .../tables/lookup_keyspace_schema_file.sql | 4 +- .../tables/test_keyspace_schema_file.sql | 4 +- .../demo/schema/customer/customer_schema.sql | 8 +- .../demo/schema/product/product_schema.sql | 10 +- examples/local/101_initial_cluster.sh | 6 +- examples/local/create_commerce_schema.sql | 6 +- examples/local/create_commerce_seq.sql | 4 +- examples/local/create_test_table.sql | 2 +- examples/operator/101_initial_cluster.yaml | 34 +- examples/operator/201_customer_tablets.yaml | 14 +- examples/operator/302_new_shards.yaml | 14 +- examples/operator/306_down_shard_0.yaml | 14 +- examples/operator/create_commerce_schema.sql | 6 +- examples/operator/create_commerce_seq.sql | 4 +- examples/operator/pf.sh | 1 + .../region_sharding/create_lookup_schema.sql | 2 +- .../region_sharding/create_main_schema.sql | 2 +- examples/vtexplain/atomicity_schema.sql | 2 +- go.mod | 6 +- go.sum | 6 +- go/boost/dataflow/flownode/internal_filter.go | 22 +- .../dataflow/flownode/internal_filter_test.go | 29 +- .../dataflow/flownode/internal_project.go | 4 +- .../boostplan/operators/ast_to_op.go | 10 +- .../boostplan/operators/offset_binding.go | 40 +- .../boostplan/operators/upquery_test.go | 12 +- .../controller/boostplan/ops_to_flow.go | 2 +- .../controller/boostplan/upquery/upquery.go | 4 +- go/boost/server/instance.go | 3 +- go/boost/topo/watcher/queries.go | 12 +- go/cmd/mysqlctl/mysqlctl.go | 16 +- go/cmd/mysqlctld/mysqlctld.go | 10 +- go/cmd/vtaclcheck/vtaclcheck.go | 3 - go/cmd/vtbackup/vtbackup.go | 36 +- go/cmd/vtcombo/main.go | 4 +- go/cmd/vtctldclient/command/shards.go | 10 +- go/cmd/vtctldclient/command/workflows.go | 122 + go/cmd/vtexplain/vtexplain.go | 5 - go/errors/errors.go | 56 + go/errors/errors_test.go | 99 + go/flags/endtoend/mysqlctl.txt | 3 +- go/flags/endtoend/mysqlctld.txt | 3 +- go/flags/endtoend/vtbackup.txt | 2 +- go/flags/endtoend/vtctld.txt | 4 +- go/flags/endtoend/vtctldclient.txt | 1 + go/flags/endtoend/vtgate.txt | 1 + go/flags/endtoend/vtorc.txt | 1 + go/flags/endtoend/vttablet.txt | 5 +- go/flags/endtoend/vttestserver.txt | 3 +- go/flagutil/sets.go | 3 +- go/mysql/binlog_event_common_test.go | 1 + go/mysql/binlog_event_filepos.go | 6 +- go/mysql/client_test.go | 2 +- go/mysql/collations/env.go | 7 +- go/mysql/collations/remote/collation.go | 6 +- go/mysql/conn.go | 14 +- go/mysql/constants.go | 427 +- go/mysql/endtoend/main_test.go | 2 +- go/mysql/endtoend/query_test.go | 1 + go/mysql/fakesqldb/server.go | 94 +- go/mysql/filepos_gtid.go | 6 +- go/mysql/filepos_gtid_test.go | 4 +- go/mysql/flavor.go | 43 +- go/mysql/flavor_filepos.go | 6 +- go/mysql/flavor_mariadb_test.go | 4 +- go/mysql/flavor_mysql.go | 2 +- go/mysql/flavor_mysql_test.go | 4 +- go/mysql/flavor_mysqlgr.go | 9 +- go/mysql/flavor_mysqlgr_test.go | 6 +- go/mysql/query.go | 2 +- go/mysql/replication_status.go | 30 +- go/mysql/server_flaky_test.go | 2 +- go/mysql/sql_error.go | 27 +- go/mysql/sql_error_test.go | 4 +- go/sets/set.go | 130 + go/slices2/slices.go | 39 + go/sqltypes/bind_variables.go | 45 + go/sqltypes/bind_variables_test.go | 54 + go/sqltypes/named_result.go | 22 + go/sqltypes/result.go | 5 +- go/sqltypes/value.go | 37 + go/streamlog/streamlog.go | 26 +- go/streamlog/streamlog_flaky_test.go | 10 +- go/sync2/consolidator.go | 66 +- go/sync2/consolidator_test.go | 12 +- go/sync2/fake_consolidator.go | 114 + .../backup/pitr/backup_mysqlctld_pitr_test.go | 6 +- .../backup/vtbackup/backup_only_test.go | 68 +- go/test/endtoend/backup/vtbackup/main_test.go | 23 +- .../backup/vtctlbackup/backup_utils.go | 174 +- go/test/endtoend/cellalias/cell_alias_test.go | 6 +- go/test/endtoend/cluster/cluster_process.go | 26 +- go/test/endtoend/cluster/cluster_util.go | 1 + go/test/endtoend/cluster/mysqlctl_process.go | 44 +- go/test/endtoend/cluster/mysqlctld_process.go | 10 +- go/test/endtoend/cluster/vtbackup_process.go | 1 - go/test/endtoend/cluster/vtctl_process.go | 2 +- .../endtoend/cluster/vtctldclient_process.go | 2 +- go/test/endtoend/cluster/vttablet_process.go | 4 +- .../encrypted_replication_test.go | 6 +- .../encrypted_transport_test.go | 6 +- go/test/endtoend/keyspace/keyspace_test.go | 7 +- go/test/endtoend/mysqlctl/mysqlctl_test.go | 6 +- go/test/endtoend/mysqlctld/mysqlctld_test.go | 8 +- .../endtoend/mysqlserver/mysql_server_test.go | 7 +- .../scheduler/onlineddl_scheduler_test.go | 2 +- .../recovery/pitr/shardedpitr_test.go | 83 +- .../recovery/unshardedrecovery/recovery.go | 22 +- .../reparent/newfeaturetest/reparent_test.go | 13 + .../reparent/plannedreparent/reparent_test.go | 21 +- .../endtoend/reparent/prscomplex/main_test.go | 1 - go/test/endtoend/reparent/utils/utils.go | 4 +- .../endtoend/sharded/sharded_keyspace_test.go | 6 +- .../tabletmanager/tablet_health_test.go | 3 - go/test/endtoend/tabletmanager/tablet_test.go | 13 +- .../throttler_topo/throttler_test.go | 3 - go/test/endtoend/topoconncache/main_test.go | 6 +- .../topoconncache/topo_conn_cache_test.go | 4 +- go/test/endtoend/utils/mysql.go | 26 +- go/test/endtoend/utils/mysql_test.go | 59 +- go/test/endtoend/utils/utils.go | 23 +- go/test/endtoend/vault/dbcreds_secret.json | 16 +- go/test/endtoend/vault/vault_test.go | 29 +- go/test/endtoend/vreplication/cluster_test.go | 4 +- .../resharding_workflows_v2_test.go | 27 + .../testdata/config/init_testserver_db.sql | 91 + .../vreplication/vreplication_test.go | 37 +- go/test/endtoend/vreplication/vstream_test.go | 174 +- .../vtgate/errors_as_warnings/main_test.go | 2 +- .../grpc_server_auth_static/main_test.go | 2 +- go/test/endtoend/vtgate/lookup_test.go | 2 +- go/test/endtoend/vtgate/misc_test.go | 2 +- .../queries/aggregation/aggregation_test.go | 10 + .../vtgate/queries/aggregation/schema.sql | 5 + .../vtgate/queries/aggregation/vschema.json | 8 + .../endtoend/vtgate/queries/misc/misc_test.go | 45 + .../queries/normalize/normalize_test.go | 4 +- .../vtgate/queries/vexplain/vexplain_test.go | 2 +- .../schematracker/sharded/st_sharded_test.go | 4 +- .../unsharded/st_unsharded_test.go | 2 +- go/test/endtoend/vtgate/sequence/seq_test.go | 2 +- .../correctness_test.go | 4 +- .../endtoend/vtgate/vschema/vschema_test.go | 2 +- .../vtorc/readtopologyinstance/main_test.go | 24 +- go/test/endtoend/vtorc/utils/utils.go | 22 +- .../internal/sqlparser/Makefile | 33 +- .../internal/sqlparser/redact_query_test.go | 2 +- go/test/go-mysql-server/sql/errors.go | 3 +- go/test/go-mysql-server/sql/errors_test.go | 2 +- .../sql/expression/function/date_test.go | 5 +- .../sql/plan/showwarnings_test.go | 11 +- go/test/go-mysql-server/sql/plan/signal.go | 2 +- go/test/go-mysql-server/sql/session.go | 8 +- go/test/go-mysql-server/sql/session_test.go | 13 +- go/textutil/strings.go | 32 +- go/tools/asthelpergen/equals_gen.go | 4 +- go/tools/codegen/common.go | 11 +- go/tools/go-upgrade/go-upgrade.go | 504 + go/tools/release-notes/release_notes.go | 28 +- go/tools/release-notes/release_notes_test.go | 6 +- go/tools/releases/releases.go | 143 + go/vt/binlog/binlogplayer/binlog_player.go | 50 +- go/vt/dbconfigs/dbconfigs.go | 4 +- go/vt/dbconnpool/connection_pool.go | 3 +- go/vt/discovery/fake_healthcheck.go | 5 +- go/vt/discovery/healthcheck.go | 2 +- go/vt/discovery/healthcheck_test.go | 15 +- go/vt/discovery/tablet_health.go | 45 +- go/vt/discovery/topology_watcher.go | 2 +- go/vt/dtids/dtids.go | 4 +- go/vt/external/golib/sqlutils/sqlutils.go | 22 +- go/vt/key/destination.go | 6 +- go/vt/key/key.go | 413 +- go/vt/key/key_test.go | 1112 +- go/vt/log/log.go | 33 +- go/vt/mysqlctl/backup.go | 32 +- go/vt/mysqlctl/backup_test.go | 25 +- go/vt/mysqlctl/backupengine.go | 12 +- go/vt/mysqlctl/backupstats/stats.go | 2 +- go/vt/mysqlctl/backupstats/stats_test.go | 54 +- go/vt/mysqlctl/binlogs_gtid_test.go | 16 + go/vt/mysqlctl/builtinbackupengine.go | 36 +- go/vt/mysqlctl/cmd.go | 2 +- go/vt/mysqlctl/fakemysqldaemon.go | 22 +- go/vt/mysqlctl/mycnf.go | 10 +- go/vt/mysqlctl/mycnf_flag.go | 2 +- go/vt/mysqlctl/mycnf_gen.go | 2 +- go/vt/mysqlctl/mysql_daemon.go | 5 +- go/vt/mysqlctl/mysqld.go | 27 +- go/vt/mysqlctl/query.go | 4 +- go/vt/mysqlctl/replication.go | 80 +- go/vt/proto/automation/automation.pb.go | 934 - .../proto/automation/automation_vtproto.pb.go | 1968 - .../automationservice/automationservice.pb.go | 109 - .../automationservice_grpc.pb.go | 148 - go/vt/proto/query/query.pb.go | 1524 +- go/vt/proto/query/query_vtproto.pb.go | 43 + .../replicationdata/replicationdata.pb.go | 28 +- .../replicationdata_vtproto.pb.go | 35 + .../tabletmanagerdata/tabletmanagerdata.pb.go | 1377 +- .../tabletmanagerdata_vtproto.pb.go | 780 +- .../tabletmanagerservice.pb.go | 374 +- .../tabletmanagerservice_grpc.pb.go | 74 +- go/vt/proto/topodata/topodata.pb.go | 6 +- go/vt/proto/topodata/topodata_vtproto.pb.go | 2 +- go/vt/proto/vtctldata/vtctldata.pb.go | 1797 +- go/vt/proto/vtctldata/vtctldata_vtproto.pb.go | 583 +- go/vt/proto/vtctlservice/vtctlservice.pb.go | 557 +- .../vtctlservice/vtctlservice_grpc.pb.go | 40 + go/vt/schema/online_ddl_test.go | 3 - go/vt/schemadiff/diff_test.go | 122 +- go/vt/schemadiff/errors.go | 45 + go/vt/schemadiff/schema.go | 164 +- go/vt/schemadiff/schema_test.go | 331 +- go/vt/schemadiff/semantics.go | 75 + go/vt/schemadiff/table.go | 30 + go/vt/schemadiff/table_test.go | 20 +- go/vt/servenv/jquery.go | 24 - go/vt/servenv/servenv.go | 14 +- go/vt/servenv/status.go | 36 +- go/vt/servenv/version.go | 8 +- .../schema/onlineddl/schema_migrations.sql | 3 +- go/vt/sqlparser/analyzer.go | 2 +- go/vt/sqlparser/ast.go | 62 +- go/vt/sqlparser/ast_clone.go | 113 +- go/vt/sqlparser/ast_copy_on_rewrite.go | 204 +- go/vt/sqlparser/ast_equals.go | 198 +- go/vt/sqlparser/ast_format.go | 51 +- go/vt/sqlparser/ast_format_fast.go | 69 +- go/vt/sqlparser/ast_funcs.go | 88 +- go/vt/sqlparser/ast_rewrite.go | 269 +- go/vt/sqlparser/ast_rewriting.go | 11 +- go/vt/sqlparser/ast_test.go | 34 +- go/vt/sqlparser/ast_visit.go | 133 +- go/vt/sqlparser/cached_size.go | 130 +- go/vt/sqlparser/comments.go | 18 + go/vt/sqlparser/constants.go | 22 + go/vt/sqlparser/generate.go | 2 +- go/vt/sqlparser/keywords.go | 19 +- go/vt/sqlparser/normalizer.go | 22 +- go/vt/sqlparser/normalizer_test.go | 67 +- go/vt/sqlparser/parse_test.go | 100 +- go/vt/sqlparser/predicate_rewriting.go | 261 +- go/vt/sqlparser/predicate_rewriting_test.go | 11 +- go/vt/sqlparser/redact_query_test.go | 2 +- go/vt/sqlparser/sql.go | 18884 ++-- go/vt/sqlparser/sql.y | 176 +- go/vt/sqlparser/testdata/select_cases.txt | 300 +- go/vt/sqlparser/testdata/union_cases.txt | 110 +- go/vt/sqlparser/tracked_buffer_test.go | 4 + go/vt/srvtopo/status.go | 4 +- go/vt/tableacl/tableacl.go | 2 +- go/vt/throttler/throttlerlogz.go | 10 +- go/vt/throttler/throttlerlogz_test.go | 2 +- go/vt/throttler/throttlerz.go | 11 +- go/vt/topo/cell_info.go | 12 +- go/vt/topo/cells_aliases.go | 12 +- go/vt/topo/external_vitess_cluster.go | 8 +- go/vt/topo/k8stopo/directory.go | 7 +- go/vt/topo/k8stopo/file.go | 9 - go/vt/topo/k8stopo/server.go | 2 - go/vt/topo/keyspace.go | 8 +- go/vt/topo/replication.go | 6 +- go/vt/topo/shard.go | 12 +- go/vt/topo/srv_keyspace.go | 10 +- go/vt/topo/srv_vschema.go | 10 +- go/vt/topo/tablet.go | 8 +- go/vt/topo/test/watch.go | 16 +- go/vt/topo/topoproto/srvkeyspace.go | 15 +- go/vt/topo/topoproto/tablet.go | 3 +- go/vt/topo/topotests/shard_watch_test.go | 2 +- go/vt/topo/vschema.go | 10 +- go/vt/topo/workflow.go | 8 +- go/vt/topotools/split.go | 4 +- go/vt/topotools/split_test.go | 4 + go/vt/topotools/tablet.go | 1 - go/vt/topotools/vschema_ddl.go | 9 +- go/vt/vitessdriver/driver.go | 7 +- go/vt/vtadmin/api.go | 16 +- go/vt/vtadmin/api_authz_test.go | 21 +- go/vt/vtadmin/api_test.go | 4 - go/vt/vtadmin/cluster/cluster.go | 4 +- .../vtadmin/cluster/cluster_internal_test.go | 2 +- go/vt/vtadmin/cluster/cluster_test.go | 2 +- go/vt/vtadmin/cluster/config.go | 16 +- go/vt/vtadmin/http/shards.go | 2 +- go/vt/vtadmin/rbac/config.go | 2 +- go/vt/vtadmin/rbac/rule.go | 2 +- .../vtadmin/testutil/authztestgen/config.json | 1 + .../fakevtctldclient/vtctldclient.go | 17 + go/vt/vtcombo/tablet_map.go | 10 +- go/vt/vtctl/grpcvtctldclient/client_gen.go | 9 + .../endtoend/init_shard_primary_test.go | 2 + go/vt/vtctl/grpcvtctldserver/server.go | 43 +- go/vt/vtctl/localvtctldclient/client_gen.go | 5 + .../reparentutil/emergency_reparenter.go | 3 +- .../reparentutil/emergency_reparenter_test.go | 2 +- go/vt/vtctl/reparentutil/replication.go | 3 +- go/vt/vtctl/reparentutil/replication_test.go | 3 +- go/vt/vtctl/vdiff2_test.go | 4 +- go/vt/vtctl/vdiff_env_test.go | 31 +- go/vt/vtctl/vtctl.go | 122 +- go/vt/vtctl/vtctldclient/codegen/main.go | 2 +- go/vt/vtctl/workflow/server.go | 59 +- go/vt/vtctl/workflow/stream_migrator.go | 14 +- go/vt/vtctl/workflow/stream_migrator_test.go | 2 +- go/vt/vtctl/workflow/traffic_switcher.go | 16 +- go/vt/vtctl/workflow/vexec/vexec.go | 58 +- go/vt/vtctl/workflow/vreplication_stream.go | 2 +- go/vt/vtctld/api.go | 150 +- go/vt/vtctld/api_test.go | 141 +- go/vt/vtctld/api_utils.go | 500 - go/vt/vtctld/vtctld.go | 17 +- go/vt/vterrors/code.go | 6 +- .../testdata/multi-output/comments-output.txt | 24 +- .../multi-output/deletesharded-output.txt | 24 +- .../testdata/multi-output/gen4-output.txt | 12 +- .../multi-output/insertsharded-output.txt | 8 +- .../multi-output/selectsharded-output.txt | 44 +- .../multi-output/unsharded-output.txt | 8 +- .../multi-output/updatesharded-output.txt | 28 +- go/vt/vtexplain/vtexplain.go | 1 - go/vt/vtexplain/vtexplain_test.go | 10 +- go/vt/vtexplain/vtexplain_vtgate.go | 3 +- go/vt/vtexplain/vtexplain_vttablet.go | 29 +- go/vt/vtgate/endtoend/lookup_test.go | 2 +- go/vt/vtgate/endtoend/main_test.go | 68 +- go/vt/vtgate/endtoend/misc_test.go | 11 + go/vt/vtgate/endtoend/row_count_test.go | 2 + go/vt/vtgate/endtoend/vstream_test.go | 174 +- go/vt/vtgate/engine/concatenate.go | 8 +- go/vt/vtgate/engine/delete_test.go | 5 +- go/vt/vtgate/engine/fake_vcursor_test.go | 8 + go/vt/vtgate/engine/filter.go | 6 +- go/vt/vtgate/engine/filter_test.go | 44 +- go/vt/vtgate/engine/insert.go | 8 +- go/vt/vtgate/engine/limit.go | 15 +- go/vt/vtgate/engine/limit_test.go | 11 +- go/vt/vtgate/engine/memory_sort.go | 15 +- go/vt/vtgate/engine/memory_sort_test.go | 14 +- go/vt/vtgate/engine/opcode/constants.go | 113 + go/vt/vtgate/engine/ordered_aggregate.go | 82 +- go/vt/vtgate/engine/ordered_aggregate_test.go | 1 + go/vt/vtgate/engine/primitive.go | 1 + go/vt/vtgate/engine/projection.go | 30 +- go/vt/vtgate/engine/projection_test.go | 2 +- go/vt/vtgate/engine/pullout_subquery.go | 31 +- go/vt/vtgate/engine/pullout_subquery_test.go | 2 +- go/vt/vtgate/engine/route_test.go | 2 +- go/vt/vtgate/engine/routing.go | 14 +- go/vt/vtgate/engine/scalar_aggregation.go | 1 + .../vtgate/engine/scalar_aggregation_test.go | 1 + go/vt/vtgate/engine/set.go | 3 +- go/vt/vtgate/engine/set_test.go | 3 +- go/vt/vtgate/engine/update.go | 2 +- go/vt/vtgate/engine/update_test.go | 3 +- go/vt/vtgate/engine/vindex_func.go | 2 +- go/vt/vtgate/engine/vindex_lookup.go | 2 +- .../vtgate/evalengine/api_arithmetic_test.go | 2 +- go/vt/vtgate/evalengine/api_compare_test.go | 212 +- go/vt/vtgate/evalengine/api_literal.go | 53 +- go/vt/vtgate/evalengine/api_types.go | 30 +- go/vt/vtgate/evalengine/arena.go | 127 + go/vt/vtgate/evalengine/arithmetic.go | 502 +- go/vt/vtgate/evalengine/cached_size.go | 197 +- go/vt/vtgate/evalengine/compare.go | 116 + go/vt/vtgate/evalengine/compiler.go | 340 + .../vtgate/evalengine/compiler_arithmetic.go | 466 + go/vt/vtgate/evalengine/compiler_asm.go | 2403 + go/vt/vtgate/evalengine/compiler_asm_push.go | 319 + go/vt/vtgate/evalengine/compiler_bit.go | 146 + go/vt/vtgate/evalengine/compiler_compare.go | 504 + go/vt/vtgate/evalengine/compiler_convert.go | 121 + go/vt/vtgate/evalengine/compiler_fn.go | 522 + go/vt/vtgate/evalengine/compiler_json.go | 288 + go/vt/vtgate/evalengine/compiler_logical.go | 74 + go/vt/vtgate/evalengine/compiler_test.go | 330 + go/vt/vtgate/evalengine/eval.go | 34 + go/vt/vtgate/evalengine/eval_bytes.go | 7 + go/vt/vtgate/evalengine/eval_json.go | 68 +- go/vt/vtgate/evalengine/eval_numeric.go | 26 +- go/vt/vtgate/evalengine/expr.go | 3 +- go/vt/vtgate/evalengine/expr_arithmetic.go | 59 +- go/vt/vtgate/evalengine/expr_bit.go | 20 +- go/vt/vtgate/evalengine/expr_bvar.go | 49 +- go/vt/vtgate/evalengine/expr_collate.go | 43 +- go/vt/vtgate/evalengine/expr_column.go | 28 +- go/vt/vtgate/evalengine/expr_compare.go | 122 +- go/vt/vtgate/evalengine/expr_convert.go | 9 +- go/vt/vtgate/evalengine/expr_env.go | 39 +- go/vt/vtgate/evalengine/expr_literal.go | 6 +- go/vt/vtgate/evalengine/expr_logical.go | 117 +- go/vt/vtgate/evalengine/expr_tuple.go | 7 +- go/vt/vtgate/evalengine/fn_base64.go | 62 +- go/vt/vtgate/evalengine/fn_bit.go | 5 +- go/vt/vtgate/evalengine/fn_compare.go | 9 +- go/vt/vtgate/evalengine/fn_hex.go | 11 +- go/vt/vtgate/evalengine/fn_json.go | 37 +- go/vt/vtgate/evalengine/fn_numeric.go | 362 +- go/vt/vtgate/evalengine/fn_string.go | 41 +- go/vt/vtgate/evalengine/format.go | 3 +- .../evalengine/integration/comparison_test.go | 61 +- .../evalengine/integration/fuzz_test.go | 75 +- .../evalengine/internal/decimal/decimal.go | 30 +- .../internal/decimal/decimal_test.go | 26 +- .../evalengine/internal/decimal/helpers.go | 1 - .../internal/json/fastparse/fastparse.go | 264 + .../evalengine/internal/json/helpers.go | 39 + .../vtgate/evalengine/internal/json/parser.go | 220 +- .../evalengine/internal/json/parser_test.go | 6 +- go/vt/vtgate/evalengine/mysql_test.go | 16 +- go/vt/vtgate/evalengine/perf_test.go | 70 + go/vt/vtgate/evalengine/testcases/cases.go | 504 +- go/vt/vtgate/evalengine/testcases/helpers.go | 70 +- go/vt/vtgate/evalengine/testcases/inputs.go | 55 +- go/vt/vtgate/evalengine/translate.go | 201 +- go/vt/vtgate/evalengine/translate_builtin.go | 79 +- go/vt/vtgate/evalengine/translate_card.go | 7 +- go/vt/vtgate/evalengine/translate_convert.go | 2 +- go/vt/vtgate/evalengine/translate_simplify.go | 54 +- go/vt/vtgate/evalengine/translate_test.go | 30 +- go/vt/vtgate/evalengine/vm.go | 107 + go/vt/vtgate/executor.go | 30 +- go/vt/vtgate/executor_dml_test.go | 10 +- go/vt/vtgate/executor_framework_test.go | 10 +- go/vt/vtgate/executor_select_test.go | 86 +- go/vt/vtgate/executor_set_test.go | 6 +- go/vt/vtgate/executor_test.go | 67 +- go/vt/vtgate/executor_vschema_ddl_test.go | 16 +- go/vt/vtgate/grpcvtgateconn/conn.go | 16 +- go/vt/vtgate/insights.go | 50 +- go/vt/vtgate/insights_test.go | 64 +- .../vtgate/planbuilder/aggregation_pushing.go | 12 +- go/vt/vtgate/planbuilder/builder.go | 1 + go/vt/vtgate/planbuilder/dml_planner.go | 3 +- go/vt/vtgate/planbuilder/expr.go | 19 +- .../planbuilder/expression_converter.go | 2 +- .../planbuilder/expression_converter_test.go | 3 +- go/vt/vtgate/planbuilder/filter.go | 44 +- go/vt/vtgate/planbuilder/filtering.go | 8 +- go/vt/vtgate/planbuilder/gen4_planner.go | 38 +- go/vt/vtgate/planbuilder/horizon_planning.go | 45 +- go/vt/vtgate/planbuilder/insert.go | 8 +- .../planbuilder/operator_transformers.go | 18 +- .../planbuilder/operators/SQL_builder.go | 28 +- go/vt/vtgate/planbuilder/operators/derived.go | 2 +- .../planbuilder/operators/dml_planning.go | 2 +- .../planbuilder/operators/horizon_planning.go | 37 +- .../operators/info_schema_planning.go | 21 +- .../vtgate/planbuilder/operators/operator.go | 2 +- .../planbuilder/operators/operator_test.go | 11 +- .../planbuilder/operators/queryprojection.go | 105 +- .../planbuilder/operators/route_planning.go | 6 +- .../planbuilder/operators/sharded_routing.go | 9 +- .../operators/subquery_planning.go | 11 +- go/vt/vtgate/planbuilder/ordered_aggregate.go | 26 +- go/vt/vtgate/planbuilder/postprocess.go | 9 +- .../planbuilder/predicate_rewrite_test.go | 148 + go/vt/vtgate/planbuilder/project.go | 3 +- go/vt/vtgate/planbuilder/projection.go | 5 +- .../vtgate/planbuilder/projection_pushing.go | 3 +- go/vt/vtgate/planbuilder/pullout_subquery.go | 3 +- go/vt/vtgate/planbuilder/rewrite.go | 4 +- go/vt/vtgate/planbuilder/route.go | 11 +- go/vt/vtgate/planbuilder/select.go | 2 +- go/vt/vtgate/planbuilder/show.go | 18 +- go/vt/vtgate/planbuilder/subquery_op.go | 3 +- go/vt/vtgate/planbuilder/system_tables.go | 29 +- .../planbuilder/testdata/aggr_cases.json | 158 +- .../planbuilder/testdata/dml_cases.json | 2 +- .../planbuilder/testdata/filter_cases.json | 8 +- .../planbuilder/testdata/from_cases.json | 92 +- .../testdata/info_schema57_cases.json | 124 +- .../testdata/info_schema80_cases.json | 132 +- .../testdata/postprocess_cases.json | 14 +- .../planbuilder/testdata/select_cases.json | 40 +- .../planbuilder/testdata/symtab_cases.json | 2 +- .../testdata/sysschema_default.json | 12 +- .../planbuilder/testdata/tpch_cases.json | 10 +- .../planbuilder/testdata/union_cases.json | 45 +- .../testdata/unsupported_cases.json | 8 +- .../testdata/vindex_func_cases.json | 4 +- go/vt/vtgate/planbuilder/update_planner.go | 3 +- go/vt/vtgate/planbuilder/vindex_op.go | 4 +- go/vt/vtgate/querylog.go | 7 +- go/vt/vtgate/querylogz.go | 15 +- go/vt/vtgate/querylogz_test.go | 23 +- go/vt/vtgate/queryz_test.go | 18 +- go/vt/vtgate/semantics/analyzer.go | 64 +- go/vt/vtgate/semantics/analyzer_test.go | 245 +- go/vt/vtgate/semantics/binder.go | 35 +- go/vt/vtgate/semantics/boost_extensions.go | 2 +- go/vt/vtgate/semantics/derived_table.go | 2 +- go/vt/vtgate/semantics/errors.go | 376 +- go/vt/vtgate/semantics/real_table.go | 2 +- go/vt/vtgate/semantics/scoper.go | 3 +- go/vt/vtgate/semantics/semantic_state.go | 19 +- go/vt/vtgate/semantics/typer.go | 24 +- go/vt/vtgate/semantics/typer_test.go | 58 + go/vt/vtgate/semantics/vindex_table.go | 2 +- go/vt/vtgate/semantics/vtable.go | 2 +- go/vt/vtgate/simplifier/simplifier_test.go | 2 +- go/vt/vtgate/status.go | 2 +- go/vt/vtgate/vcursor_impl.go | 34 +- go/vt/vtgate/vcursor_impl_test.go | 16 +- go/vt/vtgate/vindexes/cached_size.go | 6 +- go/vt/vtgate/vindexes/numeric_static_map.go | 71 +- .../vindexes/numeric_static_map_test.go | 98 + go/vt/vtgate/vindexes/vschema.go | 8 +- go/vt/vtgate/vschema_stats.go | 2 +- go/vt/vtgate/vstream_manager.go | 61 +- go/vt/vtgate/vstream_manager_test.go | 87 +- go/vt/vtgate/vtgate_test.go | 6 +- go/vt/vtgr/config/vtgr_config.go | 33 + go/vt/vtgr/db/tls.go | 13 +- go/vt/vtgr/ssl/ssl.go | 4 +- go/vt/vtgr/ssl/ssl_test.go | 14 +- go/vt/vtorc/inst/analysis_dao.go | 4 +- go/vt/vtorc/inst/binlog.go | 11 +- go/vt/vtorc/inst/binlog_test.go | 4 +- go/vt/vtorc/inst/instance_binlog.go | 2 +- go/vt/vtorc/inst/instance_dao.go | 8 +- go/vt/vtorc/inst/keyspace_dao.go | 2 +- go/vt/vtorc/logic/tablet_discovery_test.go | 8 +- .../vtorc/logic/topology_recovery_dao_test.go | 1 + go/vt/vtorc/ssl/ssl.go | 166 - go/vt/vtorc/ssl/ssl_test.go | 232 - go/vt/vtorc/test/recovery_analysis.go | 2 +- .../endtoend/framework/eventcatcher.go | 82 +- .../vttablet/endtoend/framework/livequeryz.go | 4 +- go/vt/vttablet/endtoend/misc_test.go | 1 + go/vt/vttablet/faketmclient/fake_client.go | 16 +- go/vt/vttablet/filelogger/filelogger.go | 2 +- go/vt/vttablet/grpctmclient/client.go | 31 +- go/vt/vttablet/grpctmserver/server.go | 20 +- go/vt/vttablet/onlineddl/executor.go | 206 +- go/vt/vttablet/onlineddl/executor_test.go | 36 +- go/vt/vttablet/onlineddl/schema.go | 7 - go/vt/vttablet/onlineddl/vrepl.go | 4 +- go/vt/vttablet/sysloglogger/sysloglogger.go | 9 +- .../sysloglogger/sysloglogger_test.go | 12 +- go/vt/vttablet/tabletmanager/restore.go | 2 +- go/vt/vttablet/tabletmanager/rpc_agent.go | 6 +- .../vttablet/tabletmanager/rpc_replication.go | 48 +- go/vt/vttablet/tabletmanager/rpc_vexec.go | 41 - .../tabletmanager/rpc_vreplication.go | 91 +- .../tabletmanager/rpc_vreplication_test.go | 196 + go/vt/vttablet/tabletmanager/tm_init.go | 5 +- go/vt/vttablet/tabletmanager/tm_init_test.go | 1 + .../tabletmanager/vdiff/controller.go | 4 +- .../tabletmanager/vdiff/framework_test.go | 2 +- .../tabletmanager/vdiff/table_differ.go | 2 +- .../tabletmanager/vdiff/table_plan.go | 3 +- .../tabletmanager/vdiff/workflow_differ.go | 2 +- .../vdiff/workflow_differ_test.go | 5 +- .../tabletmanager/vreplication/controller.go | 9 +- .../vreplication/controller_test.go | 2 +- .../tabletmanager/vreplication/engine.go | 98 +- .../tabletmanager/vreplication/engine_test.go | 1 + .../vreplication/framework_test.go | 8 +- .../vreplication/insert_generator.go | 4 +- .../vreplication/insert_generator_test.go | 4 +- .../tabletmanager/vreplication/stats.go | 4 +- .../tabletmanager/vreplication/stats_test.go | 6 +- .../vreplication/table_plan_builder.go | 2 +- .../tabletmanager/vreplication/utils.go | 6 +- .../tabletmanager/vreplication/vplayer.go | 5 +- .../vreplication/vplayer_flaky_test.go | 4 +- .../tabletmanager/vreplication/vreplicator.go | 23 +- .../vreplication/vreplicator_test.go | 4 +- .../tabletmanager/vreplication/vrlog.go | 11 +- go/vt/vttablet/tabletserver/bench_test.go | 4 +- go/vt/vttablet/tabletserver/controller.go | 4 - go/vt/vttablet/tabletserver/livequeryz.go | 4 +- .../tabletserver/planbuilder/builder.go | 6 +- go/vt/vttablet/tabletserver/query_engine.go | 48 +- .../tabletserver/query_engine_test.go | 228 +- go/vt/vttablet/tabletserver/query_executor.go | 24 +- .../tabletserver/query_executor_test.go | 235 +- go/vt/vttablet/tabletserver/querylogz.go | 15 +- go/vt/vttablet/tabletserver/querylogz_test.go | 23 +- .../tabletserver/repltracker/reader.go | 3 + .../tabletserver/repltracker/reader_test.go | 51 +- .../tabletserver/repltracker/writer_test.go | 23 +- go/vt/vttablet/tabletserver/schema/engine.go | 11 +- .../vttablet/tabletserver/schema/historian.go | 4 +- .../tabletserver/schema/historian_test.go | 3 +- go/vt/vttablet/tabletserver/schema/tracker.go | 4 +- .../vttablet/tabletserver/tabletenv/config.go | 10 +- go/vt/vttablet/tabletserver/tabletserver.go | 11 +- .../tabletserver/tabletserver_test.go | 7 +- go/vt/vttablet/tabletserver/txlogz.go | 3 +- go/vt/vttablet/tabletserver/txlogz_test.go | 2 +- .../tabletserver/txthrottler/tx_throttler.go | 50 +- .../txthrottler/tx_throttler_test.go | 60 +- go/vt/vttablet/tabletserver/vstreamer/copy.go | 2 +- .../tabletserver/vstreamer/planbuilder.go | 4 +- .../tabletserver/vstreamer/uvstreamer.go | 2 +- .../vstreamer/uvstreamer_flaky_test.go | 6 +- .../vstreamer/vstreamer_flaky_test.go | 8 +- go/vt/vttablet/tabletservermock/controller.go | 6 - go/vt/vttablet/tmclient/rpc_client_api.go | 6 +- go/vt/vttablet/tmrpctest/test_tm_rpc.go | 20 +- go/vt/vttablet/vexec/executor.go | 12 - go/vt/vttablet/vexec/vexec.go | 226 - go/vt/vttablet/vexec/vexec_test.go | 270 - go/vt/vttest/local_cluster.go | 24 +- go/vt/wrangler/fake_dbclient_test.go | 1 + go/vt/wrangler/keyspace.go | 2 +- go/vt/wrangler/materializer.go | 16 +- go/vt/wrangler/reparent.go | 3 +- go/vt/wrangler/resharder.go | 10 +- go/vt/wrangler/shard.go | 4 +- go/vt/wrangler/split.go | 5 +- go/vt/wrangler/tablet.go | 9 - go/vt/wrangler/testlib/backup_test.go | 21 +- .../testlib/copy_schema_shard_test.go | 6 +- .../testlib/emergency_reparent_shard_test.go | 11 +- .../testlib/external_reparent_test.go | 12 +- go/vt/wrangler/testlib/permissions_test.go | 6 +- .../testlib/planned_reparent_shard_test.go | 41 +- go/vt/wrangler/testlib/reparent_utils_test.go | 11 +- go/vt/wrangler/testlib/version_test.go | 3 +- go/vt/wrangler/testlib/vtctl_topo_test.go | 2 +- go/vt/wrangler/traffic_switcher.go | 14 +- go/vt/wrangler/traffic_switcher_env_test.go | 4 +- go/vt/wrangler/vdiff.go | 9 +- go/vt/wrangler/vdiff_env_test.go | 34 +- go/vt/wrangler/vdiff_test.go | 15 +- go/vt/wrangler/vexec.go | 173 +- go/vt/wrangler/vexec_plan.go | 55 - go/vt/wrangler/vexec_test.go | 107 +- go/vt/wrangler/workflow.go | 4 +- go/vt/wrangler/wrangler_env_test.go | 52 +- go/vt/zkctl/zkconf.go | 8 +- go/vt/zkctl/zkctl.go | 1 - java/client/pom.xml | 2 +- java/example/pom.xml | 2 +- java/grpc-client/pom.xml | 2 +- java/jdbc/pom.xml | 2 +- java/pom.xml | 2 +- misc/errcheck_excludes.txt | 1 + proto/automation.proto | 97 - proto/automationservice.proto | 33 - proto/query.proto | 4 + proto/replicationdata.proto | 1 + proto/tabletmanagerdata.proto | 24 +- proto/tabletmanagerservice.proto | 3 +- proto/topodata.proto | 2 +- proto/vtctldata.proto | 24 +- proto/vtctlservice.proto | 3 + test.go | 2 +- test/ci_workflow_gen.go | 2 - test/config.json | 56 +- test/templates/cluster_endtoend_test.tpl | 4 +- .../cluster_endtoend_test_docker.tpl | 2 + .../cluster_endtoend_test_mysql57.tpl | 4 +- .../cluster_endtoend_test_self_hosted.tpl | 2 + test/templates/dockerfile.tpl | 2 +- test/templates/unit_test.tpl | 138 +- test/templates/unit_test_self_hosted.tpl | 2 + tools/make-release-packages.sh | 5 +- vitess-mixin/e2e/config/init_db.sql | 11 + vitess-mixin/go.mod | 1 + vitess-mixin/go.sum | 39 +- web/vtadmin/package-lock.json | 166 +- web/vtadmin/package.json | 2 +- web/vtadmin/src/components/inputs/Select.tsx | 21 +- web/vtadmin/src/hooks/api.ts | 81 +- web/vtadmin/src/index.css | 2 + web/vtadmin/src/proto/vtadmin.d.ts | 27625 +++--- web/vtadmin/src/proto/vtadmin.js | 78547 ++++++++-------- web/vtadmin/src/style/fonts.css | 40 + web/vtadmin/src/util/queryString.ts | 8 +- 837 files changed, 91780 insertions(+), 77202 deletions(-) create mode 100644 .github/workflows/check_label.yml rename .github/workflows/{cluster_endtoend_onlineddl_singleton.yml => cluster_endtoend_backup_pitr.yml} (100%) create mode 100644 .github/workflows/update_golang_version.yml rename doc/releasenotes/10_0_0_release_notes.md => changelog/10.0/10.0.0/release_notes.md (100%) rename doc/releasenotes/10_0_1_release_notes.md => changelog/10.0/10.0.1/release_notes.md (100%) rename doc/releasenotes/10_0_2_release_notes.md => changelog/10.0/10.0.2/release_notes.md (100%) rename doc/releasenotes/10_0_3_release_notes.md => changelog/10.0/10.0.3/release_notes.md (100%) rename doc/releasenotes/10_0_3_summary.md => changelog/10.0/10.0.3/summary.md (100%) rename doc/releasenotes/10_0_4_release_notes.md => changelog/10.0/10.0.4/release_notes.md (100%) rename doc/releasenotes/10_0_4_summary.md => changelog/10.0/10.0.4/summary.md (100%) rename doc/releasenotes/10_0_5_release_notes.md => changelog/10.0/10.0.5/release_notes.md (100%) rename doc/releasenotes/10_0_5_summary.md => changelog/10.0/10.0.5/summary.md (100%) create mode 100644 changelog/10.0/README.md rename doc/releasenotes/11_0_0_release_notes.md => changelog/11.0/11.0.0/release_notes.md (100%) rename doc/releasenotes/11_0_1_release_notes.md => changelog/11.0/11.0.1/release_notes.md (100%) rename doc/releasenotes/11_0_2_release_notes.md => changelog/11.0/11.0.2/release_notes.md (100%) rename doc/releasenotes/11_0_2_summary.md => changelog/11.0/11.0.2/summary.md (100%) rename doc/releasenotes/11_0_3_release_notes.md => changelog/11.0/11.0.3/release_notes.md (100%) rename doc/releasenotes/11_0_3_summary.md => changelog/11.0/11.0.3/summary.md (100%) rename doc/releasenotes/11_0_4_release_notes.md => changelog/11.0/11.0.4/release_notes.md (100%) rename doc/releasenotes/11_0_4_summary.md => changelog/11.0/11.0.4/summary.md (100%) create mode 100644 changelog/11.0/README.md rename doc/releasenotes/12_0_0_release_notes.md => changelog/12.0/12.0.0/release_notes.md (100%) rename doc/releasenotes/12_0_0_summary.md => changelog/12.0/12.0.0/summary.md (100%) rename doc/releasenotes/12_0_1_release_notes.md => changelog/12.0/12.0.1/release_notes.md (100%) rename doc/releasenotes/12_0_1_summary.md => changelog/12.0/12.0.1/summary.md (100%) rename doc/releasenotes/12_0_2_release_notes.md => changelog/12.0/12.0.2/release_notes.md (100%) rename doc/releasenotes/12_0_2_summary.md => changelog/12.0/12.0.2/summary.md (100%) rename doc/releasenotes/12_0_3_release_notes.md => changelog/12.0/12.0.3/release_notes.md (100%) rename doc/releasenotes/12_0_3_summary.md => changelog/12.0/12.0.3/summary.md (100%) rename doc/releasenotes/12_0_4_release_notes.md => changelog/12.0/12.0.4/release_notes.md (100%) rename doc/releasenotes/12_0_5_changelog.md => changelog/12.0/12.0.5/changelog.md (100%) rename doc/releasenotes/12_0_5_release_notes.md => changelog/12.0/12.0.5/release_notes.md (92%) rename doc/releasenotes/12_0_6_changelog.md => changelog/12.0/12.0.6/changelog.md (100%) rename doc/releasenotes/12_0_6_release_notes.md => changelog/12.0/12.0.6/release_notes.md (93%) rename doc/releasenotes/12_0_6_summary.md => changelog/12.0/12.0.6/summary.md (100%) create mode 100644 changelog/12.0/README.md rename doc/releasenotes/13_0_0_release_notes.md => changelog/13.0/13.0.0/release_notes.md (100%) rename doc/releasenotes/13_0_0_summary.md => changelog/13.0/13.0.0/summary.md (100%) rename doc/releasenotes/13_0_1_release_notes.md => changelog/13.0/13.0.1/release_notes.md (100%) rename doc/releasenotes/13_0_2_changelog.md => changelog/13.0/13.0.2/changelog.md (100%) rename doc/releasenotes/13_0_2_release_notes.md => changelog/13.0/13.0.2/release_notes.md (93%) rename doc/releasenotes/13_0_2_summary.md => changelog/13.0/13.0.2/summary.md (100%) rename doc/releasenotes/13_0_3_changelog.md => changelog/13.0/13.0.3/changelog.md (100%) rename doc/releasenotes/13_0_3_release_notes.md => changelog/13.0/13.0.3/release_notes.md (93%) rename doc/releasenotes/13_0_3_summary.md => changelog/13.0/13.0.3/summary.md (100%) create mode 100644 changelog/13.0/README.md rename doc/releasenotes/14_0_0_changelog.md => changelog/14.0/14.0.0/changelog.md (100%) rename doc/releasenotes/14_0_0_release_notes.md => changelog/14.0/14.0.0/release_notes.md (99%) rename doc/releasenotes/14_0_0_summary.md => changelog/14.0/14.0.0/summary.md (100%) rename doc/releasenotes/14_0_1_changelog.md => changelog/14.0/14.0.1/changelog.md (100%) rename doc/releasenotes/14_0_1_release_notes.md => changelog/14.0/14.0.1/release_notes.md (94%) rename doc/releasenotes/14_0_1_summary.md => changelog/14.0/14.0.1/summary.md (100%) rename doc/releasenotes/14_0_2_changelog.md => changelog/14.0/14.0.2/changelog.md (100%) rename doc/releasenotes/14_0_2_release_notes.md => changelog/14.0/14.0.2/release_notes.md (95%) rename doc/releasenotes/14_0_2_summary.md => changelog/14.0/14.0.2/summary.md (100%) rename doc/releasenotes/14_0_3_changelog.md => changelog/14.0/14.0.3/changelog.md (100%) rename doc/releasenotes/14_0_3_release_notes.md => changelog/14.0/14.0.3/release_notes.md (93%) rename doc/releasenotes/14_0_3_summary.md => changelog/14.0/14.0.3/summary.md (100%) create mode 100644 changelog/14.0/14.0.4/changelog.md create mode 100644 changelog/14.0/14.0.4/release_notes.md create mode 100644 changelog/14.0/14.0.4/summary.md create mode 100644 changelog/14.0/README.md rename doc/releasenotes/15_0_0_changelog.md => changelog/15.0/15.0.0/changelog.md (100%) create mode 100644 changelog/15.0/15.0.0/release_notes.md rename doc/releasenotes/15_0_0_summary.md => changelog/15.0/15.0.0/summary.md (100%) create mode 100644 changelog/15.0/15.0.1/changelog.md create mode 100644 changelog/15.0/15.0.1/release_notes.md create mode 100644 changelog/15.0/15.0.1/summary.md create mode 100644 changelog/15.0/15.0.2/changelog.md create mode 100644 changelog/15.0/15.0.2/release_notes.md create mode 100644 changelog/15.0/15.0.2/summary.md create mode 100644 changelog/15.0/README.md create mode 100644 changelog/15.0/team.md create mode 100644 changelog/16.0/16.0.0/changelog.md create mode 100644 changelog/16.0/16.0.0/release_notes.md create mode 100644 changelog/16.0/16.0.0/summary.md create mode 100644 changelog/16.0/README.md create mode 100644 changelog/16.0/team.md create mode 100644 changelog/17.0/17.0.0/summary.md create mode 100644 changelog/17.0/README.md rename doc/releasenotes/7_0_0_release_notes.md => changelog/7.0/7.0.0/release_notes.md (100%) rename doc/releasenotes/7_0_1_release_notes.md => changelog/7.0/7.0.1/release_notes.md (100%) rename doc/releasenotes/7_0_2_release_notes.md => changelog/7.0/7.0.2/release_notes.md (100%) rename doc/releasenotes/7_0_3_release_notes.md => changelog/7.0/7.0.3/release_notes.md (100%) create mode 100644 changelog/7.0/README.md rename doc/releasenotes/8_0_0_release_notes.md => changelog/8.0/8.0.0/release_notes.md (100%) create mode 100644 changelog/8.0/README.md rename doc/releasenotes/9_0_0_release_notes.md => changelog/9.0/9.0.0/release_notes.md (100%) rename doc/releasenotes/9_0_1_release_notes.md => changelog/9.0/9.0.1/release_notes.md (100%) rename doc/releasenotes/9_0_2_release_notes.md => changelog/9.0/9.0.2/release_notes.md (100%) create mode 100644 changelog/9.0/README.md create mode 100644 changelog/README.md create mode 100644 doc/design-docs/OwnedPrimaryVindexes.md delete mode 100644 examples/are-you-alive/.gitignore delete mode 100644 examples/are-you-alive/Makefile delete mode 100644 examples/are-you-alive/README.md delete mode 100644 examples/are-you-alive/build/dev/Dockerfile delete mode 100644 examples/are-you-alive/build/dev/reflex.conf delete mode 100644 examples/are-you-alive/build/release/Dockerfile delete mode 100644 examples/are-you-alive/cmd/are-you-alive/main.go delete mode 100644 examples/are-you-alive/docker-compose.yml delete mode 100644 examples/are-you-alive/go.mod delete mode 100644 examples/are-you-alive/go.sum delete mode 100644 examples/are-you-alive/pkg/client/client.go delete mode 100644 examples/are-you-alive/prometheus.yml delete mode 100644 examples/are-you-alive/schemas/README.md delete mode 100644 examples/are-you-alive/schemas/create_test_table.sql delete mode 100644 examples/are-you-alive/schemas/vschema.json create mode 100644 go/errors/errors.go create mode 100644 go/errors/errors_test.go create mode 100644 go/sets/set.go create mode 100644 go/slices2/slices.go create mode 100644 go/sync2/fake_consolidator.go create mode 100644 go/test/endtoend/vreplication/testdata/config/init_testserver_db.sql create mode 100644 go/tools/go-upgrade/go-upgrade.go create mode 100644 go/tools/releases/releases.go delete mode 100644 go/vt/proto/automation/automation.pb.go delete mode 100644 go/vt/proto/automation/automation_vtproto.pb.go delete mode 100644 go/vt/proto/automationservice/automationservice.pb.go delete mode 100644 go/vt/proto/automationservice/automationservice_grpc.pb.go create mode 100644 go/vt/schemadiff/semantics.go delete mode 100644 go/vt/servenv/jquery.go delete mode 100644 go/vt/vtctld/api_utils.go create mode 100644 go/vt/vtgate/engine/opcode/constants.go create mode 100644 go/vt/vtgate/evalengine/arena.go create mode 100644 go/vt/vtgate/evalengine/compiler.go create mode 100644 go/vt/vtgate/evalengine/compiler_arithmetic.go create mode 100644 go/vt/vtgate/evalengine/compiler_asm.go create mode 100644 go/vt/vtgate/evalengine/compiler_asm_push.go create mode 100644 go/vt/vtgate/evalengine/compiler_bit.go create mode 100644 go/vt/vtgate/evalengine/compiler_compare.go create mode 100644 go/vt/vtgate/evalengine/compiler_convert.go create mode 100644 go/vt/vtgate/evalengine/compiler_fn.go create mode 100644 go/vt/vtgate/evalengine/compiler_json.go create mode 100644 go/vt/vtgate/evalengine/compiler_logical.go create mode 100644 go/vt/vtgate/evalengine/compiler_test.go create mode 100644 go/vt/vtgate/evalengine/internal/json/fastparse/fastparse.go create mode 100644 go/vt/vtgate/evalengine/perf_test.go create mode 100644 go/vt/vtgate/evalengine/vm.go create mode 100644 go/vt/vtgate/planbuilder/predicate_rewrite_test.go create mode 100644 go/vt/vtgate/semantics/typer_test.go delete mode 100644 go/vt/vtorc/ssl/ssl.go delete mode 100644 go/vt/vtorc/ssl/ssl_test.go delete mode 100644 go/vt/vttablet/tabletmanager/rpc_vexec.go create mode 100644 go/vt/vttablet/tabletmanager/rpc_vreplication_test.go delete mode 100644 go/vt/vttablet/vexec/executor.go delete mode 100644 go/vt/vttablet/vexec/vexec.go delete mode 100644 go/vt/vttablet/vexec/vexec_test.go delete mode 100644 proto/automation.proto delete mode 100644 proto/automationservice.proto create mode 100644 web/vtadmin/src/style/fonts.css diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d32f01a6668..595995681f9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,6 +20,7 @@ - [ ] "Backport to:" labels have been added if this change should be back-ported - [ ] Tests were added or are not required +- [ ] Did the new or modified tests pass consistently locally and on the CI - [ ] Documentation was added or is not required ## Deployment Notes diff --git a/.github/workflows/check_label.yml b/.github/workflows/check_label.yml new file mode 100644 index 00000000000..8037db1c1cc --- /dev/null +++ b/.github/workflows/check_label.yml @@ -0,0 +1,74 @@ +name: Check Pull Request labels +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +concurrency: + group: format('{0}-{1}', ${{ github.ref }}, 'Check Pull Request labels') + cancel-in-progress: true + +permissions: read-all + +jobs: + check_pull_request_labels: + name: Check Pull Request labels + timeout-minutes: 10 + runs-on: ubuntu-22.04 + if: github.repository == 'vitessio/vitess' + steps: + - name: Release Notes label + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'release notes (needs details)')}}" == "true" ]]; then + echo The "release notes (needs details)" label is set. The changes made in this Pull Request need to be documented in the release notes summary "('./changelog/17.0/17.0.0/summary.md')". Once documented, the "release notes (needs details)" label can be removed. + exit 1 + fi + + - name: Check type and component labels + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + LABELS_JSON="/tmp/labels.json" + # Get labels for this pull request + curl -s \ + -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-type: application/json" \ + "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" \ + > "$LABELS_JSON" + if ! cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'Component:' ; then + echo "Expecting PR to have label 'Component: ...'" + exit 1 + fi + if ! cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'Type:' ; then + echo "Expecting PR to have label 'Type: ...'" + exit 1 + fi + + - name: Check NeedsWebsiteDocsUpdate and NeedsDescriptionUpdate are off + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + LABELS_JSON="/tmp/labels.json" + # Get labels for this pull request + curl -s \ + -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-type: application/json" \ + "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" \ + > "$LABELS_JSON" + if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsDescriptionUpdate' ; then + echo "Expecting PR to not have the NeedsDescriptionUpdate label, please update the PR's description and remove the label." + exit 1 + fi + if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsWebsiteDocsUpdate' ; then + echo "Expecting PR to not have the NeedsWebsiteDocsUpdate label, please update the documentation and remove the label." + exit 1 + fi + + + - name: Do Not Merge label + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'Do Not Merge')}}" == "true" ]]; then + echo "This PR should not be merged. The 'Do Not Merge' label is set. Please unset it if you wish to merge this PR." + exit 1 + fi \ No newline at end of file diff --git a/.github/workflows/close_stale_pull_requests.yml b/.github/workflows/close_stale_pull_requests.yml index 688bbbc35c7..e0201c0104b 100644 --- a/.github/workflows/close_stale_pull_requests.yml +++ b/.github/workflows/close_stale_pull_requests.yml @@ -5,12 +5,14 @@ on: workflow_dispatch: {} -permissions: - pull-requests: write +permissions: read-all jobs: close_stale_pull_requests: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + permissions: + pull-requests: write + steps: - uses: actions/stale@v5 with: diff --git a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml b/.github/workflows/cluster_endtoend_backup_pitr.yml similarity index 100% rename from .github/workflows/cluster_endtoend_onlineddl_singleton.yml rename to .github/workflows/cluster_endtoend_backup_pitr.yml diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml index 592133ff4d3..68dbf7857c2 100644 --- a/.github/workflows/codeql_analysis.yml +++ b/.github/workflows/codeql_analysis.yml @@ -7,11 +7,14 @@ on: - release-**.0 schedule: - cron: '0 0 * * 1' + workflow_dispatch: + +permissions: read-all jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: actions: read contents: read @@ -39,7 +42,7 @@ jobs: # queries: security-extended,security-and-quality - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.20.1 @@ -56,7 +59,7 @@ jobs: sudo rm -rf /etc/mysql # Install mysql80 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 - wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update @@ -78,11 +81,25 @@ jobs: sudo apt-get update sudo apt-get install percona-xtrabackup-24 - - name: Building last release's binaries - timeout-minutes: 10 + - name: Building binaries + timeout-minutes: 30 run: | source build.env make build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 + + - name: Slack Workflow Notification + if: ${{ failure() }} + uses: Gamesight/slack-workflow-status@master + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} + channel: '#codeql' + name: 'CodeQL Workflows' + + - name: Fail if needed + if: ${{ failure() }} + run: | + exit 1 diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index dd723e9c5e8..bc01ecbac44 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -7,10 +7,13 @@ on: release: types: [created] +permissions: read-all + jobs: build: name: Create Release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + permissions: write-all steps: - name: Set up Go diff --git a/.github/workflows/sonar_analysis.yml b/.github/workflows/sonar_analysis.yml index 871e6cc7f83..514cdc13060 100644 --- a/.github/workflows/sonar_analysis.yml +++ b/.github/workflows/sonar_analysis.yml @@ -3,20 +3,21 @@ on: push: branches: - 'sonartest' +permissions: read-all jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.13 + go-version: 1.19 - name: Tune the OS run: | - echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file @@ -25,7 +26,7 @@ jobs: # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get dependencies run: | diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 5193b727af3..07fef3baab7 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -3,6 +3,8 @@ name: Static Code Checks, Etc. on: - push +permissions: read-all + jobs: build: name: Static Code Checks Etc @@ -135,7 +137,7 @@ jobs: test -z "$(git diff-index --name-only HEAD --)" || exit 1 - name: Install golangci-lint - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 + run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2 - name: Install goimports run: | diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 9480fa62b20..2d77c8ae3d9 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -4,6 +4,8 @@ concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'unit_race') cancel-in-progress: true +permissions: read-all + jobs: build: diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml new file mode 100644 index 00000000000..62f917adfd7 --- /dev/null +++ b/.github/workflows/update_golang_version.yml @@ -0,0 +1,74 @@ +name: Update Golang Version + +on: + schedule: + - cron: "0 0 * * *" # Runs every day at midnight UTC + workflow_dispatch: + +jobs: + update_golang_version: + strategy: + matrix: + branch: [ main, release-16.0, release-15.0, release-14.0 ] + name: Update Golang Version + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20.2 + + - name: Check out code + uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + + - name: Detect new version and update codebase + id: detect-and-update + run: | + old_go_version=$(go run ./go/tools/go-upgrade/go-upgrade.go get go-version) + echo "old-go-version=${old_go_version}" >> $GITHUB_OUTPUT + + if [ ${{ matrix.branch }} == "main" ]; then + go run ./go/tools/go-upgrade/go-upgrade.go upgrade --workflow-update=false --main --allow-major-upgrade + else + go run ./go/tools/go-upgrade/go-upgrade.go upgrade --workflow-update=false + fi + + output=$(git status -s) + if [ -z "${output}" ]; then + exit 0 + fi + echo "create-pr=true" >> $GITHUB_OUTPUT + + go_version=$(go run ./go/tools/go-upgrade/go-upgrade.go get go-version) + bootstrap_version=$(go run ./go/tools/go-upgrade/go-upgrade.go get bootstrap-version) + echo "go-version=${go_version}" >> $GITHUB_OUTPUT + echo "bootstrap-version=${bootstrap_version}" >> $GITHUB_OUTPUT + + - name: Create Pull Request + if: steps.detect-and-update.outputs.create-pr == 'true' + uses: peter-evans/create-pull-request@v4 + with: + branch: "upgrade-go-to-${{steps.detect-and-update.outputs.go-version}}-on-${{ matrix.branch }}" + commit-message: "bump go version to go${{steps.detect-and-update.outputs.go-version}}" + signoff: true + delete-branch: true + title: "[${{ matrix.branch }}] Upgrade the Golang version to `go${{steps.detect-and-update.outputs.go-version}}`" + body: | + This Pull Request bumps the Golang version to `go${{steps.detect-and-update.outputs.go-version}}` and the bootstrap version to `${{steps.detect-and-update.outputs.bootstrap-version}}`. + + > Do not trust the bot blindly. A thorough code review must be done to ensure all the files have been correctly modified. + + There are a few manual steps remaining: + - [ ] Make sure you update the Golang version used in the previous and next release branches for the Upgrade/Downgrade tests. + - [ ] Build and Push the bootstrap images to Docker Hub, the bot cannot handle that. + - [ ] Update the `./.github/workflows/*.yml` files with the newer Golang version, the bot cannot handle that due to permissions. + - To accomplish this, run the following: `go run ./go/tools/go-upgrade/go-upgrade.go upgrade workflows --go-to=${{steps.detect-and-update.outputs.go-version}}` + base: ${{ matrix.branch }} + labels: | + Skip CI + go + Benchmark me + Component: General + Type: CI/Build diff --git a/.github/workflows/vtadmin_web_build.yml b/.github/workflows/vtadmin_web_build.yml index 8ff6e53df8c..610a65bb9de 100644 --- a/.github/workflows/vtadmin_web_build.yml +++ b/.github/workflows/vtadmin_web_build.yml @@ -8,6 +8,8 @@ on: - '.github/workflows/vtadmin_web_build.yml' - 'web/vtadmin/**' +permissions: read-all + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/vtadmin_web_lint.yml b/.github/workflows/vtadmin_web_lint.yml index 3f4548c2032..8401dbd8452 100644 --- a/.github/workflows/vtadmin_web_lint.yml +++ b/.github/workflows/vtadmin_web_lint.yml @@ -8,6 +8,8 @@ on: - '.github/workflows/vtadmin_web_lint.yml' - 'web/vtadmin/**' +permissions: read-all + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/vtadmin_web_unit_tests.yml b/.github/workflows/vtadmin_web_unit_tests.yml index c747919376f..2da7245ab25 100644 --- a/.github/workflows/vtadmin_web_unit_tests.yml +++ b/.github/workflows/vtadmin_web_unit_tests.yml @@ -8,6 +8,8 @@ on: - '.github/workflows/vtadmin_web_unit_tests.yml' - 'web/vtadmin/**' +permissions: read-all + jobs: unit-tests: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 25dfe2c63f3..b8345a77d65 100644 --- a/.gitignore +++ b/.gitignore @@ -70,8 +70,7 @@ _test/ /vendor/*/ # release folder -releases - +/releases/ # Local examples /examples/local/vtdataroot diff --git a/ADOPTERS.md b/ADOPTERS.md index d1e5329121f..a254b54e14d 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -3,6 +3,7 @@ This is an alphabetical list of known adopters of Vitess. Some have already gone * [Axon](https://axon.com) * [BetterCloud](https://bettercloud.com) * [CloudSigma](https://www.cloudsigma.com/) +* [Etsy](https://www.etsy.com) * [FlipKart](https://flipkart.com) * [GitHub](https://github.com/) * [HubSpot](https://product.hubspot.com/) @@ -17,5 +18,6 @@ This is an alphabetical list of known adopters of Vitess. Some have already gone * [Slack](https://slack.com) * [Square](https://square.com) * [Stitch Labs](https://stitchlabs.com) +* [Twitter](https://twitter.com) * [Weave](https://www.getweave.com) * [YouTube](https://youtube.com) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 4d09f7eafb6..d75cecd956f 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -8,6 +8,7 @@ The following is the full list, alphabetically ordered. * Dan Kozlowski ([dkhenry](https://github.com/dkhenry)) dan.kozlowski@gmail.com * Deepthi Sigireddi ([deepthi](https://github.com/deepthi)) deepthi@planetscale.com * Derek Perkins ([derekperkins](https://github.com/derekperkins)) derek@nozzle.io +* Dirkjan Bussink ([dbussink](https://github.com/dbussink)) dbussink@planetscale.com * Florent Poinsard ([frouioui](https://github.com/frouioui)) florent@planetscale.com * Frances Thai ([notfelineit](https://github.com/notfelineit)) frances@planetscale.com * Harshit Gangal ([harshit-gangal](https://github.com/harshit-gangal)) harshit.gangal@gmail.com @@ -29,16 +30,25 @@ dkhenry, shlomi-noach, ajm188, vmg, GuptaManan100, frouioui rohit-nayak-ps, deepthi, mattlord ### Parser -systay, harshit-gangal, vmg, GuptaManan100 +systay, harshit-gangal, vmg, GuptaManan100, dbussink + +### Evaluation Engine +vmg ### Planner -systay, harshit-gangal, GuptaManan100, frouioui +systay, harshit-gangal, GuptaManan100, frouioui + +### Query Serving +systay, harshit-gangal, GuptaManan100, frouioui, vmg, dbussink + +### Online DDL +shlomi-noach, dbussink ### Performance vmg ### Cluster Management -deepthi, shlomi-noach, ajm188, GuptaManan100 +deepthi, ajm188, GuptaManan100, dbussink ### Java harshit-gangal diff --git a/Makefile b/Makefile index 8a56737748d..39056227a79 100644 --- a/Makefile +++ b/Makefile @@ -169,14 +169,6 @@ codegen: sqlparser sizegen demo: go install ./examples/demo/demo.go -codegen: asthelpergen sizegen parser - -visitor: asthelpergen - echo "make visitor has been replaced by make asthelpergen" - -asthelpergen: - go generate ./go/vt/sqlparser/... - sizegen: go run ./go/tools/sizegen/sizegen.go \ --in ./go/... \ @@ -285,8 +277,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto # This rule builds the bootstrap images for all flavors. DOCKER_IMAGES_FOR_TEST = mysql57 mysql80 percona57 percona80 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) -BOOTSTRAP_VERSION=14.1 - +BOOTSTRAP_VERSION=15 ensure_bootstrap_version: find docker/ -type f -exec sed -i "s/^\(ARG bootstrap_version\)=.*/\1=${BOOTSTRAP_VERSION}/" {} \; sed -i 's/\(^.*flag.String(\"bootstrap-version\",\) *\"[^\"]\+\"/\1 \"${BOOTSTRAP_VERSION}\"/' test.go @@ -313,6 +304,9 @@ define build_docker_image if grep -q arm64 <<< ${2}; then \ echo "Building docker using arm64 buildx"; \ docker buildx build --platform linux/arm64 -f ${1} -t ${2} --build-arg bootstrap_version=${BOOTSTRAP_VERSION} .; \ + elif [ $$(go env GOOS) != $$(go env GOHOSTOS) ] || [ $$(go env GOARCH) != $$(go env GOHOSTARCH) ]; then \ + echo "Building docker using buildx --platform=$$(go env GOOS)/$$(go env GOARCH)"; \ + docker buildx build --platform "$$(go env GOOS)/$$(go env GOARCH)" -f ${1} -t ${2} --build-arg bootstrap_version=${BOOTSTRAP_VERSION} .; \ else \ echo "Building docker using straight docker build"; \ docker build -f ${1} -t ${2} --build-arg bootstrap_version=${BOOTSTRAP_VERSION} .; \ diff --git a/bootstrap.sh b/bootstrap.sh index 868cc4b4841..4dffa15cb7c 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -28,7 +28,7 @@ BUILD_CONSUL=${BUILD_CONSUL:-1} BUILD_CHROME=${BUILD_CHROME:-1} VITESS_RESOURCES_DOWNLOAD_BASE_URL="https://github.com/vitessio/vitess-resources/releases/download" -VITESS_RESOURCES_RELEASE="v2.0" +VITESS_RESOURCES_RELEASE="v4.0" VITESS_RESOURCES_DOWNLOAD_URL="${VITESS_RESOURCES_DOWNLOAD_BASE_URL}/${VITESS_RESOURCES_RELEASE}" # # 0. Initialization and helper methods. @@ -127,16 +127,14 @@ install_zookeeper() { local version="$1" local dist="$2" zk="zookeeper-$version" - vtzk="vt-zookeeper-$version" # This is how we'd download directly from source: # wget "https://dlcdn.apache.org/zookeeper/$zk/apache-$zk.tar.gz" $VTROOT/tools/wget-retry "${VITESS_RESOURCES_DOWNLOAD_URL}/apache-${zk}.tar.gz" tar -xzf "$dist/apache-$zk.tar.gz" - mv $dist/apache-$zk $dist/$vtzk - mvn -f $dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests - mkdir -p $dist/$vtzk/lib - cp "$dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/$vtzk/lib/$zk-fatjar.jar" - rm -rf "$zk.tar.gz" + mvn -f $dist/apache-$zk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests + mkdir -p $dist/lib + cp "$dist/apache-$zk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/lib/$zk-fatjar.jar" + rm -rf "$dist/apache-$zk" } @@ -270,7 +268,7 @@ install_all() { # zk zk_ver=${ZK_VERSION:-3.8.0} if [ "$BUILD_JAVA" == 1 ] ; then - install_dep "Zookeeper" "$zk_ver" "$VTROOT/dist" install_zookeeper + install_dep "Zookeeper" "$zk_ver" "$VTROOT/dist/vt-zookeeper-$zk_ver" install_zookeeper fi # etcd diff --git a/doc/releasenotes/10_0_0_release_notes.md b/changelog/10.0/10.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_0_release_notes.md rename to changelog/10.0/10.0.0/release_notes.md diff --git a/doc/releasenotes/10_0_1_release_notes.md b/changelog/10.0/10.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_1_release_notes.md rename to changelog/10.0/10.0.1/release_notes.md diff --git a/doc/releasenotes/10_0_2_release_notes.md b/changelog/10.0/10.0.2/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_2_release_notes.md rename to changelog/10.0/10.0.2/release_notes.md diff --git a/doc/releasenotes/10_0_3_release_notes.md b/changelog/10.0/10.0.3/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_3_release_notes.md rename to changelog/10.0/10.0.3/release_notes.md diff --git a/doc/releasenotes/10_0_3_summary.md b/changelog/10.0/10.0.3/summary.md similarity index 100% rename from doc/releasenotes/10_0_3_summary.md rename to changelog/10.0/10.0.3/summary.md diff --git a/doc/releasenotes/10_0_4_release_notes.md b/changelog/10.0/10.0.4/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_4_release_notes.md rename to changelog/10.0/10.0.4/release_notes.md diff --git a/doc/releasenotes/10_0_4_summary.md b/changelog/10.0/10.0.4/summary.md similarity index 100% rename from doc/releasenotes/10_0_4_summary.md rename to changelog/10.0/10.0.4/summary.md diff --git a/doc/releasenotes/10_0_5_release_notes.md b/changelog/10.0/10.0.5/release_notes.md similarity index 100% rename from doc/releasenotes/10_0_5_release_notes.md rename to changelog/10.0/10.0.5/release_notes.md diff --git a/doc/releasenotes/10_0_5_summary.md b/changelog/10.0/10.0.5/summary.md similarity index 100% rename from doc/releasenotes/10_0_5_summary.md rename to changelog/10.0/10.0.5/summary.md diff --git a/changelog/10.0/README.md b/changelog/10.0/README.md new file mode 100644 index 00000000000..304cc933a16 --- /dev/null +++ b/changelog/10.0/README.md @@ -0,0 +1,18 @@ +## v10.0 +* **[10.0.5](10.0.5)** + * [Release Notes](10.0.5/release_notes.md) + +* **[10.0.4](10.0.4)** + * [Release Notes](10.0.4/release_notes.md) + +* **[10.0.3](10.0.3)** + * [Release Notes](10.0.3/release_notes.md) + +* **[10.0.2](10.0.2)** + * [Release Notes](10.0.2/release_notes.md) + +* **[10.0.1](10.0.1)** + * [Release Notes](10.0.1/release_notes.md) + +* **[10.0.0](10.0.0)** + * [Release Notes](10.0.0/release_notes.md) diff --git a/doc/releasenotes/11_0_0_release_notes.md b/changelog/11.0/11.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/11_0_0_release_notes.md rename to changelog/11.0/11.0.0/release_notes.md diff --git a/doc/releasenotes/11_0_1_release_notes.md b/changelog/11.0/11.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/11_0_1_release_notes.md rename to changelog/11.0/11.0.1/release_notes.md diff --git a/doc/releasenotes/11_0_2_release_notes.md b/changelog/11.0/11.0.2/release_notes.md similarity index 100% rename from doc/releasenotes/11_0_2_release_notes.md rename to changelog/11.0/11.0.2/release_notes.md diff --git a/doc/releasenotes/11_0_2_summary.md b/changelog/11.0/11.0.2/summary.md similarity index 100% rename from doc/releasenotes/11_0_2_summary.md rename to changelog/11.0/11.0.2/summary.md diff --git a/doc/releasenotes/11_0_3_release_notes.md b/changelog/11.0/11.0.3/release_notes.md similarity index 100% rename from doc/releasenotes/11_0_3_release_notes.md rename to changelog/11.0/11.0.3/release_notes.md diff --git a/doc/releasenotes/11_0_3_summary.md b/changelog/11.0/11.0.3/summary.md similarity index 100% rename from doc/releasenotes/11_0_3_summary.md rename to changelog/11.0/11.0.3/summary.md diff --git a/doc/releasenotes/11_0_4_release_notes.md b/changelog/11.0/11.0.4/release_notes.md similarity index 100% rename from doc/releasenotes/11_0_4_release_notes.md rename to changelog/11.0/11.0.4/release_notes.md diff --git a/doc/releasenotes/11_0_4_summary.md b/changelog/11.0/11.0.4/summary.md similarity index 100% rename from doc/releasenotes/11_0_4_summary.md rename to changelog/11.0/11.0.4/summary.md diff --git a/changelog/11.0/README.md b/changelog/11.0/README.md new file mode 100644 index 00000000000..51dfb2e5648 --- /dev/null +++ b/changelog/11.0/README.md @@ -0,0 +1,15 @@ +## v11.0 +* **[11.0.4](11.0.4)** + * [Release Notes](11.0.4/release_notes.md) + +* **[11.0.3](11.0.3)** + * [Release Notes](11.0.3/release_notes.md) + +* **[11.0.2](11.0.2)** + * [Release Notes](11.0.2/release_notes.md) + +* **[11.0.1](11.0.1)** + * [Release Notes](11.0.1/release_notes.md) + +* **[11.0.0](11.0.0)** + * [Release Notes](11.0.0/release_notes.md) diff --git a/doc/releasenotes/12_0_0_release_notes.md b/changelog/12.0/12.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/12_0_0_release_notes.md rename to changelog/12.0/12.0.0/release_notes.md diff --git a/doc/releasenotes/12_0_0_summary.md b/changelog/12.0/12.0.0/summary.md similarity index 100% rename from doc/releasenotes/12_0_0_summary.md rename to changelog/12.0/12.0.0/summary.md diff --git a/doc/releasenotes/12_0_1_release_notes.md b/changelog/12.0/12.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/12_0_1_release_notes.md rename to changelog/12.0/12.0.1/release_notes.md diff --git a/doc/releasenotes/12_0_1_summary.md b/changelog/12.0/12.0.1/summary.md similarity index 100% rename from doc/releasenotes/12_0_1_summary.md rename to changelog/12.0/12.0.1/summary.md diff --git a/doc/releasenotes/12_0_2_release_notes.md b/changelog/12.0/12.0.2/release_notes.md similarity index 100% rename from doc/releasenotes/12_0_2_release_notes.md rename to changelog/12.0/12.0.2/release_notes.md diff --git a/doc/releasenotes/12_0_2_summary.md b/changelog/12.0/12.0.2/summary.md similarity index 100% rename from doc/releasenotes/12_0_2_summary.md rename to changelog/12.0/12.0.2/summary.md diff --git a/doc/releasenotes/12_0_3_release_notes.md b/changelog/12.0/12.0.3/release_notes.md similarity index 100% rename from doc/releasenotes/12_0_3_release_notes.md rename to changelog/12.0/12.0.3/release_notes.md diff --git a/doc/releasenotes/12_0_3_summary.md b/changelog/12.0/12.0.3/summary.md similarity index 100% rename from doc/releasenotes/12_0_3_summary.md rename to changelog/12.0/12.0.3/summary.md diff --git a/doc/releasenotes/12_0_4_release_notes.md b/changelog/12.0/12.0.4/release_notes.md similarity index 100% rename from doc/releasenotes/12_0_4_release_notes.md rename to changelog/12.0/12.0.4/release_notes.md diff --git a/doc/releasenotes/12_0_5_changelog.md b/changelog/12.0/12.0.5/changelog.md similarity index 100% rename from doc/releasenotes/12_0_5_changelog.md rename to changelog/12.0/12.0.5/changelog.md diff --git a/doc/releasenotes/12_0_5_release_notes.md b/changelog/12.0/12.0.5/release_notes.md similarity index 92% rename from doc/releasenotes/12_0_5_release_notes.md rename to changelog/12.0/12.0.5/release_notes.md index fc2c613e4da..dbff8a5aade 100644 --- a/doc/releasenotes/12_0_5_release_notes.md +++ b/changelog/12.0/12.0.5/release_notes.md @@ -9,7 +9,7 @@ Below is a summary of this patch release. You can learn more [here](https://go.d > go1.17.12 (released 2022-07-12) includes security fixes to the compress/gzip, encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath packages, as well as bug fixes to the compiler, the go command, the runtime, and the runtime/metrics package. [See the Go 1.17.12 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.17.12+label%3ACherryPickApproved) on our issue tracker for details. ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/12_0_5_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/12.0/12.0.5/changelog.md). The release includes 7 commits (excluding merges) diff --git a/doc/releasenotes/12_0_6_changelog.md b/changelog/12.0/12.0.6/changelog.md similarity index 100% rename from doc/releasenotes/12_0_6_changelog.md rename to changelog/12.0/12.0.6/changelog.md diff --git a/doc/releasenotes/12_0_6_release_notes.md b/changelog/12.0/12.0.6/release_notes.md similarity index 93% rename from doc/releasenotes/12_0_6_release_notes.md rename to changelog/12.0/12.0.6/release_notes.md index 8afbe0a4239..c9c743d95ea 100644 --- a/doc/releasenotes/12_0_6_release_notes.md +++ b/changelog/12.0/12.0.6/release_notes.md @@ -15,7 +15,7 @@ This change is documented on our website [here](https://vitess.io/docs/12.0/over ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/12_0_6_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/12.0/12.0.6/changelog.md). The release includes 11 commits (excluding merges) diff --git a/doc/releasenotes/12_0_6_summary.md b/changelog/12.0/12.0.6/summary.md similarity index 100% rename from doc/releasenotes/12_0_6_summary.md rename to changelog/12.0/12.0.6/summary.md diff --git a/changelog/12.0/README.md b/changelog/12.0/README.md new file mode 100644 index 00000000000..131b2df443d --- /dev/null +++ b/changelog/12.0/README.md @@ -0,0 +1,23 @@ +## v12.0 +* **[12.0.6](12.0.6)** + * [Changelog](12.0.6/changelog.md) + * [Release Notes](12.0.6/release_notes.md) + +* **[12.0.5](12.0.5)** + * [Changelog](12.0.5/changelog.md) + * [Release Notes](12.0.5/release_notes.md) + +* **[12.0.4](12.0.4)** + * [Release Notes](12.0.4/release_notes.md) + +* **[12.0.3](12.0.3)** + * [Release Notes](12.0.3/release_notes.md) + +* **[12.0.2](12.0.2)** + * [Release Notes](12.0.2/release_notes.md) + +* **[12.0.1](12.0.1)** + * [Release Notes](12.0.1/release_notes.md) + +* **[12.0.0](12.0.0)** + * [Release Notes](12.0.0/release_notes.md) diff --git a/doc/releasenotes/13_0_0_release_notes.md b/changelog/13.0/13.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/13_0_0_release_notes.md rename to changelog/13.0/13.0.0/release_notes.md diff --git a/doc/releasenotes/13_0_0_summary.md b/changelog/13.0/13.0.0/summary.md similarity index 100% rename from doc/releasenotes/13_0_0_summary.md rename to changelog/13.0/13.0.0/summary.md diff --git a/doc/releasenotes/13_0_1_release_notes.md b/changelog/13.0/13.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/13_0_1_release_notes.md rename to changelog/13.0/13.0.1/release_notes.md diff --git a/doc/releasenotes/13_0_2_changelog.md b/changelog/13.0/13.0.2/changelog.md similarity index 100% rename from doc/releasenotes/13_0_2_changelog.md rename to changelog/13.0/13.0.2/changelog.md diff --git a/doc/releasenotes/13_0_2_release_notes.md b/changelog/13.0/13.0.2/release_notes.md similarity index 93% rename from doc/releasenotes/13_0_2_release_notes.md rename to changelog/13.0/13.0.2/release_notes.md index 310eb5e633a..12692031e2a 100644 --- a/doc/releasenotes/13_0_2_release_notes.md +++ b/changelog/13.0/13.0.2/release_notes.md @@ -9,7 +9,7 @@ Below is a summary of this patch release. You can learn more [here](https://go.d > go1.17.12 (released 2022-07-12) includes security fixes to the compress/gzip, encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath packages, as well as bug fixes to the compiler, the go command, the runtime, and the runtime/metrics package. [See the Go 1.17.12 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.17.12+label%3ACherryPickApproved) on our issue tracker for details. ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/13_0_2_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/13.0/13.0.2/changelog.md). The release includes 28 commits (excluding merges) Thanks to all our contributors: @GuptaManan100, @aquarapid, @frouioui, @harshit-gangal, @mattlord, @rohit-nayak-ps, @systay, @vitess-bot[bot], @vmg \ No newline at end of file diff --git a/doc/releasenotes/13_0_2_summary.md b/changelog/13.0/13.0.2/summary.md similarity index 100% rename from doc/releasenotes/13_0_2_summary.md rename to changelog/13.0/13.0.2/summary.md diff --git a/doc/releasenotes/13_0_3_changelog.md b/changelog/13.0/13.0.3/changelog.md similarity index 100% rename from doc/releasenotes/13_0_3_changelog.md rename to changelog/13.0/13.0.3/changelog.md diff --git a/doc/releasenotes/13_0_3_release_notes.md b/changelog/13.0/13.0.3/release_notes.md similarity index 93% rename from doc/releasenotes/13_0_3_release_notes.md rename to changelog/13.0/13.0.3/release_notes.md index 3fee980f099..b04c0d69d20 100644 --- a/doc/releasenotes/13_0_3_release_notes.md +++ b/changelog/13.0/13.0.3/release_notes.md @@ -15,7 +15,7 @@ This change is documented on our website [here](https://vitess.io/docs/13.0/over ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/13_0_3_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/13.0/13.0.3/changelog.md). The release includes 17 commits(excluding merges) diff --git a/doc/releasenotes/13_0_3_summary.md b/changelog/13.0/13.0.3/summary.md similarity index 100% rename from doc/releasenotes/13_0_3_summary.md rename to changelog/13.0/13.0.3/summary.md diff --git a/changelog/13.0/README.md b/changelog/13.0/README.md new file mode 100644 index 00000000000..780625ef69a --- /dev/null +++ b/changelog/13.0/README.md @@ -0,0 +1,14 @@ +## v13.0 +* **[13.0.3](13.0.3)** + * [Changelog](13.0.3/changelog.md) + * [Release Notes](13.0.3/release_notes.md) + +* **[13.0.2](13.0.2)** + * [Changelog](13.0.2/changelog.md) + * [Release Notes](13.0.2/release_notes.md) + +* **[13.0.1](13.0.1)** + * [Release Notes](13.0.1/release_notes.md) + +* **[13.0.0](13.0.0)** + * [Release Notes](13.0.0/release_notes.md) diff --git a/doc/releasenotes/14_0_0_changelog.md b/changelog/14.0/14.0.0/changelog.md similarity index 100% rename from doc/releasenotes/14_0_0_changelog.md rename to changelog/14.0/14.0.0/changelog.md diff --git a/doc/releasenotes/14_0_0_release_notes.md b/changelog/14.0/14.0.0/release_notes.md similarity index 99% rename from doc/releasenotes/14_0_0_release_notes.md rename to changelog/14.0/14.0.0/release_notes.md index a7b4bcf4ef0..5f88f6975db 100644 --- a/doc/releasenotes/14_0_0_release_notes.md +++ b/changelog/14.0/14.0.0/release_notes.md @@ -319,7 +319,7 @@ Work has gone into making the advisory locks (`get_lock()`, `release_lock()`, et A long time ago, the sharding column and type were specified at the keyspace level. This syntax is now deprecated and will be removed in v15. ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/14_0_0_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/14.0/14.0.0/changelog.md). The release includes 1101 commits (excluding merges) diff --git a/doc/releasenotes/14_0_0_summary.md b/changelog/14.0/14.0.0/summary.md similarity index 100% rename from doc/releasenotes/14_0_0_summary.md rename to changelog/14.0/14.0.0/summary.md diff --git a/doc/releasenotes/14_0_1_changelog.md b/changelog/14.0/14.0.1/changelog.md similarity index 100% rename from doc/releasenotes/14_0_1_changelog.md rename to changelog/14.0/14.0.1/changelog.md diff --git a/doc/releasenotes/14_0_1_release_notes.md b/changelog/14.0/14.0.1/release_notes.md similarity index 94% rename from doc/releasenotes/14_0_1_release_notes.md rename to changelog/14.0/14.0.1/release_notes.md index 57d68be31c2..639af4fce96 100644 --- a/doc/releasenotes/14_0_1_release_notes.md +++ b/changelog/14.0/14.0.1/release_notes.md @@ -13,7 +13,7 @@ Below is a summary of this patch release. You can learn more [here](https://go.d > go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip, encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath packages, as well as bug fixes to the compiler, the go command, the linker, the runtime, and the runtime/metrics package. [See the Go 1.18.4 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved) on our issue tracker for details. ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/14_0_1_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/14.0/14.0.1/changelog.md). The release includes 25 commits (excluding merges) diff --git a/doc/releasenotes/14_0_1_summary.md b/changelog/14.0/14.0.1/summary.md similarity index 100% rename from doc/releasenotes/14_0_1_summary.md rename to changelog/14.0/14.0.1/summary.md diff --git a/doc/releasenotes/14_0_2_changelog.md b/changelog/14.0/14.0.2/changelog.md similarity index 100% rename from doc/releasenotes/14_0_2_changelog.md rename to changelog/14.0/14.0.2/changelog.md diff --git a/doc/releasenotes/14_0_2_release_notes.md b/changelog/14.0/14.0.2/release_notes.md similarity index 95% rename from doc/releasenotes/14_0_2_release_notes.md rename to changelog/14.0/14.0.2/release_notes.md index d83b940f45c..724673af576 100644 --- a/doc/releasenotes/14_0_2_release_notes.md +++ b/changelog/14.0/14.0.2/release_notes.md @@ -18,7 +18,7 @@ Since the end-of-life of MariaDB 10.2, its Docker image is unavailable, and we d You can find more information on the list of supported databases on our documentation website, [here](https://vitess.io/docs/14.0/overview/supported-databases/). ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/14_0_2_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/14.0/14.0.2/changelog.md). The release includes 23 commits (excluding merges) diff --git a/doc/releasenotes/14_0_2_summary.md b/changelog/14.0/14.0.2/summary.md similarity index 100% rename from doc/releasenotes/14_0_2_summary.md rename to changelog/14.0/14.0.2/summary.md diff --git a/doc/releasenotes/14_0_3_changelog.md b/changelog/14.0/14.0.3/changelog.md similarity index 100% rename from doc/releasenotes/14_0_3_changelog.md rename to changelog/14.0/14.0.3/changelog.md diff --git a/doc/releasenotes/14_0_3_release_notes.md b/changelog/14.0/14.0.3/release_notes.md similarity index 93% rename from doc/releasenotes/14_0_3_release_notes.md rename to changelog/14.0/14.0.3/release_notes.md index 721c47640e2..5d5cc9b871c 100644 --- a/doc/releasenotes/14_0_3_release_notes.md +++ b/changelog/14.0/14.0.3/release_notes.md @@ -12,7 +12,7 @@ This problem could be resolved by restarting the VTOrc so that it discovers all frequently, this posed a greater challenge, since some pods when evicted and rescheduled on a different node, would sometimes fail to be discovered by VTOrc. This has problem has been addressed in this patch by the fix https://github.com/vitessio/vitess/pull/10662. ------------ -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/14_0_3_changelog.md). +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/14.0/14.0.3/changelog.md). The release includes 12 commits (excluding merges) diff --git a/doc/releasenotes/14_0_3_summary.md b/changelog/14.0/14.0.3/summary.md similarity index 100% rename from doc/releasenotes/14_0_3_summary.md rename to changelog/14.0/14.0.3/summary.md diff --git a/changelog/14.0/14.0.4/changelog.md b/changelog/14.0/14.0.4/changelog.md new file mode 100644 index 00000000000..bad71636814 --- /dev/null +++ b/changelog/14.0/14.0.4/changelog.md @@ -0,0 +1,43 @@ +# Changelog of Vitess v14.0.4 + +### Bug fixes +#### Backup and Restore + * Detect redo log location dynamically based on presence [#11555](https://github.com/vitessio/vitess/pull/11555) +#### Build/CI + * Fix the script `check_make_sizegen` [#11465](https://github.com/vitessio/vitess/pull/11465) + * Skip `TestComparisonSemantics` test [#11474](https://github.com/vitessio/vitess/pull/11474) + * Addition of a CI tool to detect dead links in test/config.json [#11668](https://github.com/vitessio/vitess/pull/11668) + * Fix files changes filtering in CI [#11714](https://github.com/vitessio/vitess/pull/11714) +#### Query Serving + * fix: do not rewrite single columns in derived tables [#11419](https://github.com/vitessio/vitess/pull/11419) + * Push down derived tables under route when possible [#11422](https://github.com/vitessio/vitess/pull/11422) + * collations: fix coercion semantics according to 8.0.31 changes [#11487](https://github.com/vitessio/vitess/pull/11487) + * [14.0] Fix JSON functions parsing [#11624](https://github.com/vitessio/vitess/pull/11624) + * [bugfix] Allow VTExplain to handle shards that are not active during resharding [#11640](https://github.com/vitessio/vitess/pull/11640) + * [release-14.0] Do not multiply `AggregateRandom` in JOINs [#11671](https://github.com/vitessio/vitess/pull/11671) + * [14.0] Send errors in stream instead of a grpc error from streaming rpcs when transaction or reserved connection is acquired [#11688](https://github.com/vitessio/vitess/pull/11688) + * Push down derived tables under route when possible [#11786](https://github.com/vitessio/vitess/pull/11786) +### CI/Build +#### Build/CI + * [release-14.0] Remove Launchable in the workflows [#11244](https://github.com/vitessio/vitess/pull/11244) + * [release-14.0] Add automation to change vitess version in the docker-release script (#11682) [#11814](https://github.com/vitessio/vitess/pull/11814) + * Remove Tests from Self-hosted runners [#11838](https://github.com/vitessio/vitess/pull/11838) +#### Governance + * codeowners: have at least two for almost every package [#11639](https://github.com/vitessio/vitess/pull/11639) +#### VReplication + * update jsonparser dependency [#11694](https://github.com/vitessio/vitess/pull/11694) +### Enhancement +#### General + * [release-14.0] Upgrade to `go1.18.7` [#11510](https://github.com/vitessio/vitess/pull/11510) +#### Query Serving + * Improve route merging for queries that have conditions on different vindexes, but can be merged via join predicates. [#10942](https://github.com/vitessio/vitess/pull/10942) +### Release +#### Documentation + * Prepare the release notes summary for `v14.0.4` [#11803](https://github.com/vitessio/vitess/pull/11803) +#### General + * Release of v14.0.3 [#11404](https://github.com/vitessio/vitess/pull/11404) + * Back to dev mode after v14.0.3 [#11405](https://github.com/vitessio/vitess/pull/11405) +### Testing +#### Query Serving + * [V14] Better plan-tests [#11435](https://github.com/vitessio/vitess/pull/11435) + diff --git a/changelog/14.0/14.0.4/release_notes.md b/changelog/14.0/14.0.4/release_notes.md new file mode 100644 index 00000000000..31cbbc26627 --- /dev/null +++ b/changelog/14.0/14.0.4/release_notes.md @@ -0,0 +1,22 @@ +# Release of Vitess v14.0.4 +## Major Changes + +### Upgrade to `go1.18.7` + +Vitess `v14.0.4` now runs on `go1.18.7`. +The patch release of Go, `go1.18.7`, was one of the main reasons for this release as it includes important security fixes to packages used by Vitess. +Below is a summary of this patch release. You can learn more [here](https://go.dev/doc/devel/release#go1.18). + +> go1.18.7 (released 2022-10-04) includes security fixes to the archive/tar, net/http/httputil, and regexp packages, as well as bug fixes to the compiler, the linker, and the go/types package. + +### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). +------------ +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/14.0/14.0.4/changelog.md). + +The release includes 24 commits (excluding merges) + +Thanks to all our contributors: @GuptaManan100, @dbussink, @frouioui, @harshit-gangal, @systay, @vitess-bot[bot] + diff --git a/changelog/14.0/14.0.4/summary.md b/changelog/14.0/14.0.4/summary.md new file mode 100644 index 00000000000..683e4067557 --- /dev/null +++ b/changelog/14.0/14.0.4/summary.md @@ -0,0 +1,14 @@ +## Major Changes + +### Upgrade to `go1.18.7` + +Vitess `v14.0.4` now runs on `go1.18.7`. +The patch release of Go, `go1.18.7`, was one of the main reasons for this release as it includes important security fixes to packages used by Vitess. +Below is a summary of this patch release. You can learn more [here](https://go.dev/doc/devel/release#go1.18). + +> go1.18.7 (released 2022-10-04) includes security fixes to the archive/tar, net/http/httputil, and regexp packages, as well as bug fixes to the compiler, the linker, and the go/types package. + +### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). \ No newline at end of file diff --git a/changelog/14.0/README.md b/changelog/14.0/README.md new file mode 100644 index 00000000000..10f12867483 --- /dev/null +++ b/changelog/14.0/README.md @@ -0,0 +1,20 @@ +## v14.0 +* **[14.0.4](14.0.4)** + * [Changelog](14.0.4/changelog.md) + * [Release Notes](14.0.4/release_notes.md) + +* **[14.0.3](14.0.3)** + * [Changelog](14.0.3/changelog.md) + * [Release Notes](14.0.3/release_notes.md) + +* **[14.0.2](14.0.2)** + * [Changelog](14.0.2/changelog.md) + * [Release Notes](14.0.2/release_notes.md) + +* **[14.0.1](14.0.1)** + * [Changelog](14.0.1/changelog.md) + * [Release Notes](14.0.1/release_notes.md) + +* **[14.0.0](14.0.0)** + * [Changelog](14.0.0/changelog.md) + * [Release Notes](14.0.0/release_notes.md) diff --git a/doc/releasenotes/15_0_0_changelog.md b/changelog/15.0/15.0.0/changelog.md similarity index 100% rename from doc/releasenotes/15_0_0_changelog.md rename to changelog/15.0/15.0.0/changelog.md diff --git a/changelog/15.0/15.0.0/release_notes.md b/changelog/15.0/15.0.0/release_notes.md new file mode 100644 index 00000000000..f60fd0547f1 --- /dev/null +++ b/changelog/15.0/15.0.0/release_notes.md @@ -0,0 +1,463 @@ +# Release of Vitess v15.0.0 +## Summary + +- **[Known Issues](#known-issues)** +- **[Breaking Changes](#breaking-changes)** + - [Flags](#flags) + - [VTTablet Flag Deletions](#vttablet-flag-deletions) + - [Vindex Interface](#vindex-interface) +- **[Deprecations](#deprecations)** + - [LogStats Table and Keyspace Deprecated](#logstats-table-and-keyspace-deprecated) + - [Orchestrator Integration Deprecation](#orchestrator-integration-deprecation) + - [Connection Pool Prefill](#connection-pool-prefill) + - [InitShardPrimary Deprecation](#initshardprimary-deprecation) +- **[Command-Line Syntax Deprecations](#command-line-syntax-deprecations)** + - [VTTablet Startup Flag Deletions](#vttablet-startup-flag-deletions) + - [VTTablet Startup Flag Deprecations](#vttablet-startup-flag-deprecations) + - [VTBackup Flag Deprecations](#vtbackup-flag-deprecations) +- **[VTGate](#vtgate)** + - [vtgate --mysql-server-pool-conn-read-buffers](#vtgate--mysql-server-pool-conn-read-buffers) +- **[VDiff2](#vdiff2)** + - [Resume Workflow](#resume-workflow) +- **[New command line flags and behavior](#new-command-line)** + - [vtctl GetSchema --table-schema-only](#vtctl-getschema--table-schema-only) + - [Support for Additional Compressors and Decompressors During Backup & Restore](#support-for-additional-compressors-and-decompressors-during-backup-&-restore) + - [Independent OLAP and OLTP Transactional Timeouts](#independant-olap-and-oltp-transactional-timeouts) + - [Support for Specifying Group Information in Calls to VTGate](#support-for-specifying-group-information-in-calls-to-vtgate) +- **[Online DDL Changes](#online-ddl-changes)** + - [Concurrent Vitess Migrations](#concurrent-vitess-migrations) + - [VTCtl Command Changes](#vtctl-command-changes) + - [New Syntax](#new-syntax) +- **[Tablet Throttler](#tablet-throttler)** + - [API Changes](#api-changes) +- **[Mysql Compatibility](#mysql-compatibility)** + - [System Settings](#system-settings) + - [Lookup Vindexes](#lookup-vindexes) +- **[Durability Policy](#durability-policy)** + - [Cross Cell](#cross-cell) +- **[New EXPLAIN Format](#new-explain-format)** + - [FORMAT=vtexplain](#formatvtexplain) +- **[VTOrc](#vtorc)** + - [Old UI Removal and Replacement](#old-ui-removal-and-replacement) + - [Configuration Refactor and New Flags](#configuratoin-refactor-and-new-flags) + - [Example Upgrade](#example-upgrade) + - [Default Configuration Files](#default-configuration-files) +- **[Flags Restructure](#flags-restructure)** + - [Flags Diff](#flags-diff) + +## Known Issues + +- [Corrupted results for non-full-group-by queries with JOINs](https://github.com/vitessio/vitess/issues/11625). This can be resolved by using full-group-by queries. + +## Major Changes + +### Breaking Changes + +#### Flags + +- The deprecated `--cpu_profile` flag has been removed. Please use the `--pprof` flag instead. +- The deprecated `--mem-profile-rate` flag has been removed. Please use `--pprof=mem` instead. +- The deprecated `--mutex-profile-fraction` flag has been removed. Please use `--pprof=mutex` instead. +- The deprecated vtgate/vtexplain/vtcombo flag `--planner_version` has been removed. Please use `--planner-version` instead. +- The deprecated flag `--master_connect_retry` has been removed. Please use `--replication_connect_retry` instead. +- `vtctl` commands that take shard names and ranges as positional arguments (e.g. `vtctl Reshard ks.workflow -80 -40,40-80`) need to have their positional arguments separated from their flag arguments by a double-dash separator to avoid the new parsing library from mistaking them as flags (e.g. `vtctl Reshard ks.workflow -- -80 -40,40-80`). +- The `--cell` flag in the `vtgate` binary no longer has a default value. It is a required argument that has to be specified for the binary to run. Please explicitly specify the flag, if dependent on the flag's default value. +- The `--db-config-*-*` VTTablet flags were deprecated in `v3.0.0`. They have now been deleted as part of this release. You must use `--db_dba_*` now. + +#### vttablet Flag Deletions +The following VTTablet flags were deprecated in 7.0. They have now been deleted +- `--queryserver-config-message-conn-pool-size` +- `--queryserver-config-message-conn-pool-prefill-parallelism` +- `--client-found-rows-pool-size` A different existing flag `--queryserver-config-transaction-cap` will be used instead +- `--transaction_shutdown_grace_period` Use `--shutdown_grace_period` instead +- `--queryserver-config-max-dml-rows` +- `--queryserver-config-allowunsafe-dmls` +- `--pool-name-prefix` +- `--enable-autocommit` Autocommit is always allowed + +#### Vindex Interface + +All the vindex interface methods are changed by adding `context.Context` as an input parameter. + +E.g: +```go +Map(vcursor VCursor, .... ) .... + To +Map(ctx context.Context, vcursor VCursor, .... ) .... +``` + +This only affects users who have added their own custom vindex implementation. +They are required to change their implementation with these new interface method expectations. + +### Deprecations + +#### LogStats Table and Keyspace deprecated + +Information about which tables are used was being reported through the `Keyspace` and `Table` fields on LogStats. +For multi-table queries, this output can be confusing, so we have added `TablesUsed`, that is a string array, listing all tables and which keyspace they are on. +`Keyspace` and `Table` fields are deprecated and will be removed in the v16 release of Vitess. + +#### Orchestrator Integration Deprecation + +Orchestrator integration in `vttablet` has been deprecated. It will continue to work in this release but is liable to be removed in future releases. +Consider using VTOrc instead of Orchestrator as VTOrc goes GA in this release. + +#### Connection Pool Prefill + +The connection pool with prefilled connections have been removed. The pool now does lazy connection creation. + +#### InitShardPrimary Deprecation + +The vtcltd command InitShardPrimary has been deprecated. Please use PlannedReparentShard instead. + +### Command-line syntax deprecations + +#### vttablet startup flag deletions +The following VTTablet flags were deprecated in 7.0. They have now been deleted +- --queryserver-config-message-conn-pool-size +- --queryserver-config-message-conn-pool-prefill-parallelism +- --client-found-rows-pool-size --queryserver-config-transaction-cap will be used instead +- --transaction_shutdown_grace_period Use --shutdown_grace_period instead +- --queryserver-config-max-dml-rows +- --queryserver-config-allowunsafe-dmls +- --pool-name-prefix +- --enable-autocommit Autocommit is always allowed + +#### vttablet startup flag deprecations +- `--enable-query-plan-field-caching` has been deprecated. It will be removed in v16. +- `--enable_semi_sync` has been deprecated. It will be removed in v16. Instead, set the correct durability policy using `SetKeyspaceDurabilityPolicy` +- `--queryserver-config-pool-prefill-parallelism`, `--queryserver-config-stream-pool-prefill-parallelism` and `--queryserver-config-transaction-prefill-parallelism` have all been deprecated. They will be removed in v16. +- `--backup_storage_hook` has been deprecated, consider using one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. + +#### vtbackup flag deprecations +- `--backup_storage_hook` has been deprecated, consider using one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. + +### VTGate + +#### vtgate --mysql-server-pool-conn-read-buffers + +`--mysql-server-pool-conn-read-buffers` enables pooling of buffers used to read from incoming +connections, similar to the way pooling happens for write buffers. Defaults to off. + +### VDiff v2 + +#### Resume Workflow + +We introduced the ability to resume a VDiff2 workflow: +``` +$ vtctlclient --server=localhost:15999 VDiff --v2 customer.commerce2customer resume 4c664dc2-eba9-11ec-9ef7-920702940ee0 +VDiff 4c664dc2-eba9-11ec-9ef7-920702940ee0 resumed on target shards, use show to view progress + +$ vtctlclient --server=localhost:15999 VDiff --v2 customer.commerce2customer show last + +VDiff Summary for customer.commerce2customer (4c664dc2-eba9-11ec-9ef7-920702940ee0) +State: completed +RowsCompared: 196 +HasMismatch: false +StartedAt: 2022-06-26 22:44:29 +CompletedAt: 2022-06-26 22:44:31 + +Use "--format=json" for more detailed output. + +$ vtctlclient --server=localhost:15999 VDiff --v2 --format=json customer.commerce2customer show last +{ + "Workflow": "commerce2customer", + "Keyspace": "customer", + "State": "completed", + "UUID": "4c664dc2-eba9-11ec-9ef7-920702940ee0", + "RowsCompared": 196, + "HasMismatch": false, + "Shards": "0", + "StartedAt": "2022-06-26 22:44:29", + "CompletedAt": "2022-06-26 22:44:31" +} +``` + +We leverage this resume capability to automatically restart a VDiff2 workflow that encountered a retryable error. + +We also made a number of other enhancements like progress reporting and features needed to make it a full replacement for VDiff v1. You can see more details in the tracking ticket for the VDiff2 feature complete target: https://github.com/vitessio/vitess/issues/10494 + +Now that VDiff v2 is feature complete in 15.0, we hope to make it GA in 16.0. + +Please see the VDiff2 [documentation](https://vitess.io/docs/15.0/reference/vreplication/vdiff2/) for additional information. + +### New command line flags and behavior + +#### vtctl GetSchema --table-schema-only + +The new flag `--table-schema-only` skips column introspection. `GetSchema` only returns general schema analysis, and specifically it includes the `CREATE TABLE|VIEW` statement in the `schema` field. + +#### Support for additional compressors and decompressors during backup & restore +Backup/Restore now allow you many more options for compression and decompression instead of relying on the default compressor(`pargzip`). +There are some built-in compressors which you can use out-of-the-box. Users will need to evaluate which option works best for their +use-case. Here are the flags that control this feature + +- `--compression-engine-name` +- `--external-compressor` +- `--external-decompressor` +- `--external-compressor-extension` +- `--compression-level` + +`--compression-engine-name` specifies the engine used for compression. It can have one of the following values + +- pargzip (Default) +- pgzip +- lz4 +- zstd +- external + +If you want to use any of the built-in compressors, simply set one of the above values other than `external` for `--compression-engine-name`. The value +specified in `--compression-engine-name` is saved in the backup MANIFEST, which is later read by the restore process to decide which +engine to use for decompression. Default value for engine is 'pargzip'. + +If you would like to use a custom command or external tool for compression/decompression then you need to provide the full command with +arguments to the `--external-compressor` and `--external-decompressor` flags. `--external-compressor-extension` flag also needs to be provided +so that compressed files are created with the correct extension. If the external command is not using any of the built-in compression engines +(i.e. pgzip, pargzip, lz4 or zstd) then you need to set `--compression-engine-name` to value 'external'. + +Please note that if you want to keep the current behavior then you don't need to provide any of these flags. +You can read more about backup & restore [here] (https://vitess.io/docs/15.0/user-guides/operating-vitess/backup-and-restore/). + +If you decided to switch from an external compressor to one of the built-in supported compressors (i.e. pgzip, pargzip, lz4 or zstd) at any point +in the future, you will need to do it in two steps. + +- step #1, set `--external-compressor` and `--external-compressor-extension` flag values to empty and change `--compression-engine-name` to desired value. +- Step #2, after at least one cycle of backup with new configuration, you can set `--external-decompressor` flag value to empty. + +The reason you cannot change all the values together is because the restore process will then have no way to find out which external decompressor +should be used to process the previous backup. Please make sure you have thought out all possible scenarios for restore before transitioning from one +compression engine to another. + +#### Independent OLAP and OLTP transactional timeouts + +`--queryserver-config-olap-transaction-timeout` specifies the timeout applied +to a transaction created within an OLAP workload. The default value is `30` +seconds, but this can be raised, lowered, or set to zero to disable the timeout +altogether. + +Until now, while OLAP queries would bypass the query timeout, transactions +created within an OLAP session would be rolled back +`--queryserver-config-transaction-timeout` seconds after the transaction was +started. + +As of now, OLTP and OLAP transaction timeouts can be configured independently of each +other. + +The main use case is to run queries spanning a long period of time which +require transactional guarantees such as consistency or atomicity. + +#### Support for specifying group information in calls to VTGate + +`--grpc-use-effective-groups` allows non-SSL callers to specify groups information for a caller. +Until now, you could only specify the caller-id for the security context used to authorize queries. +As of now, you can specify the principal of the caller, and any groups they belong to. + +### Online DDL changes + +#### Concurrent vitess migrations + +All Online DDL migrations using the `vitess` strategy are now eligible to run concurrently, given `--allow-concurrent` DDL strategy flag. Until now, only `CREATE`, `DROP` and `REVERT` migrations were eligible, and now `ALTER` migrations are supported, as well. The terms for `ALTER` migrations concurrency: + +- DDL strategy must be `vitess --allow-concurent ...` +- No two migrations can run concurrently on the same table +- No two `ALTER`s will copy table data concurrently +- A concurrent `ALTER` migration will not start if another `ALTER` is running and is not `ready_to_complete` + +The main use case is to run multiple concurrent migrations, all with `--postpone-completion`. All table-copy operations will run sequentially, but no migration will actually cut-over, and eventually all migrations will be `ready_to_complete`, continuously tailing the binary logs and keeping up-to-date. A quick and iterative `ALTER VITESS_MIGRATION '...' COMPLETE` sequence of commands will cut-over all migrations _closely together_ (though not atomically together). + +#### vtctl command changes. +All `online DDL show` commands can now be run with a few additional parameters +- `--order` , order migrations in the output by either ascending or descending order of their `id` fields. +- `--skip` , skip specified number of migrations in the output. +- `--limit` , limit results to a specified number of migrations in the output. + +#### New syntax + +The following is now supported: + +```sql +ALTER VITESS_MIGRATION COMPLETE ALL +``` + +This works on all pending migrations (`queued`, `ready`, `running`) and internally issues a `ALTER VITESS_MIGRATION '' COMPLETE` for each one. The command is useful for completing multiple concurrent migrations (see above) that are open-ended (`--postpone-completion`). + +### Tablet Throttler + +#### API changes + +API endpoint `/debug/vars` now exposes throttler metrics, such as number of hits and errors per app per check type. Example: + +```shell +$ curl -s http://127.0.0.1:15100/debug/vars | jq . | grep Throttler + "ThrottlerAggregatedMysqlSelf": 0.191718, + "ThrottlerAggregatedMysqlShard": 0.960054, + "ThrottlerCheckAnyError": 27, + "ThrottlerCheckAnyMysqlSelfError": 13, + "ThrottlerCheckAnyMysqlSelfTotal": 38, + "ThrottlerCheckAnyMysqlShardError": 14, + "ThrottlerCheckAnyMysqlShardTotal": 42, + "ThrottlerCheckAnyTotal": 80, + "ThrottlerCheckMysqlSelfSecondsSinceHealthy": 0, + "ThrottlerCheckMysqlShardSecondsSinceHealthy": 0, + "ThrottlerProbesLatency": 355523, + "ThrottlerProbesTotal": 74, +``` + +### Mysql Compatibility + +#### System Settings +Vitess has had support for system settings from release 7.0 onwards, but this support came with some caveats. +As soon as a client session changes a default system setting, a mysql connection gets reserved for it. +This can sometimes lead to clients running out of mysql connections. +Users were instructed to minimize the use of this feature and to try to set the desired system settings as defaults in the mysql config. + +With this release, Vitess can handle system settings changes in a much better way and clients can use them more freely. +Vitess now has the ability to pool changed settings without reserving connections for any particular session. + +This feature can be enabled by setting `queryserver-enable-settings-pool` flag on the vttablet. It is disabled by default. +In future releases, we will make this flag enabled by default. + +#### Lookup Vindexes + +Lookup vindexes now support a new parameter `multi_shard_autocommit`. If this is set to `true`, lookup vindex dml queries will be sent as autocommit to all shards instead of being wrapped in a transaction. +This is different from the existing `autocommit` parameter where the query is sent in its own transaction separate from the ongoing transaction if any i.e. begin -> lookup query execs -> commit/rollback + +### Durability Policy + +#### Cross Cell + +A new durability policy `cross_cell` is now supported. `cross_cell` durability policy only allows replica tablets from a different cell than the current primary to +send semi-sync ACKs. This ensures that any committed write exists in at least 2 tablets belonging to different cells. + +### New EXPLAIN format + +#### FORMAT=vtexplain + +With this new `explain` format, you can get an output that is very similar to the command line `vtexplain` app, but from a running `vtgate`, through a MySQL query. + +### VTOrc + +#### Old UI Removal and Replacement + +The old UI that VTOrc inherited from `Orchestrator` has been removed. A replacement UI, more consistent with the other Vitess binaries has been created. +In order to use the new UI, `--port` flag has to be provided. + +Along with the UI, the old APIs have also been deprecated. However, some of them have been ported over to the new UI - + +| Old API | New API | Additional notes | +|----------------------------------|----------------------------------|-----------------------------------------------------------------------| +| `/api/problems` | `/api/problems` | The new API also supports filtering using the keyspace and shard name | +| `/api/disable-global-recoveries` | `/api/disable-global-recoveries` | Functionally remains the same | +| `/api/enable-global-recoveries` | `/api/enable-global-recoveries` | Functionally remains the same | +| `/api/health` | `/debug/health` | Functionally remains the same | +| `/api/replication-analysis` | `/api/replication-analysis` | Functionally remains the same. Output is now JSON format. | + +Apart from these APIs, we also now have `/debug/status`, `/debug/vars` and `/debug/liveness` available in the new UI. + +#### Configuration Refactor and New Flags + +Since VTOrc was forked from `Orchestrator`, it inherited a lot of configurations that don't make sense for the Vitess use-case. +All of such configurations have been removed. + +VTOrc ignores the configurations that it doesn't understand. So old configurations can be kept around on upgrading and won't cause any issues. +They will just be ignored. + +For all the configurations that are kept, flags have been added for them and the flags are the desired way to pass these configurations going forward. +The config file will be deprecated and removed in upcoming releases. The following is a list of all the configurations that are kept and the associated flags added. + +| Configurations Kept | Flags Introduced | +|:-------------------------------------:|:-------------------------------------:| +| SQLite3DataFile | `--sqlite-data-file` | +| InstancePollSeconds | `--instance-poll-time` | +| SnapshotTopologiesIntervalHours | `--snapshot-topology-interval` | +| ReasonableReplicationLagSeconds | `--reasonable-replication-lag` | +| AuditLogFile | `--audit-file-location` | +| AuditToSyslog | `--audit-to-backend` | +| AuditToBackendDB | `--audit-to-syslog` | +| AuditPurgeDays | `--audit-purge-duration` | +| RecoveryPeriodBlockSeconds | `--recovery-period-block-duration` | +| PreventCrossDataCenterPrimaryFailover | `--prevent-cross-cell-failover` | +| LockShardTimeoutSeconds | `--lock-shard-timeout` | +| WaitReplicasTimeoutSeconds | `--wait-replicas-timeout` | +| TopoInformationRefreshSeconds | `--topo-information-refresh-duration` | +| RecoveryPollSeconds | `--recovery-poll-duration` | + +Apart from configurations, some flags from VTOrc have also been removed - +- `sibling` +- `destination` +- `discovery` +- `skip-unresolve` +- `skip-unresolve-check` +- `noop` +- `binlog` +- `statement` +- `grab-election` +- `promotion-rule` +- `skip-continuous-registration` +- `enable-database-update` +- `ignore-raft-setup` +- `tag` + +The ideal way to ensure backward compatibility is to remove the flags listed above while on the previous release. Then upgrade VTOrc. +After upgrading, remove the config file and instead pass the flags that are introduced. + +#### Example Upgrade + +If you are running VTOrc with the flags `--ignore-raft-setup --clusters_to_watch="ks/0" --config="path/to/config"` and the following configuration +```json +{ + "Debug": true, + "ListenAddress": ":6922", + "MySQLTopologyUser": "orc_client_user", + "MySQLTopologyPassword": "orc_client_user_password", + "MySQLReplicaUser": "vt_repl", + "MySQLReplicaPassword": "", + "RecoveryPeriodBlockSeconds": 1, + "InstancePollSeconds": 1, + "PreventCrossDataCenterPrimaryFailover": true +} +``` +First drop the flag `--ignore-raft-setup` while on the previous release. So, you'll be running VTOrc with `--clusters_to_watch="ks/0" --config="path/to/config"` and the same configuration listed above. + +Now you can upgrade your VTOrc version continuing to use the same flags and configurations, and it will continue to work just the same. If you wish to use the new UI, then you can add the `--port` flag as well. + +After upgrading, you can drop the configuration entirely and use the new flags like `--clusters_to_watch="ks/0" --recovery-period-block-duration=1s --instance-poll-time=1s --prevent-cross-cell-failover` + +#### Default Configuration Files + +The default files that VTOrc searches for configurations in have also changed from `"/etc/orchestrator.conf.json", "conf/orchestrator.conf.json", "orchestrator.conf.json"` to +`"/etc/vtorc.conf.json", "conf/vtorc.conf.json", "vtorc.conf.json"`. + +### Flags Restructure + +#### Flags Diff + +In addition to these major streams of work in release-15.0, we have made tremendous progress on [VEP-4, aka The Flag Situation](https://github.com/vitessio/enhancements/blob/main/veps/vep-4.md), reorganizing our code so that Vitess binaries and their flags are +clearly aligned in help text. An immediate win for usability, this positions us well to move on to a [viper](https://github.com/spf13/viper) implementation which will facilitate additional improvements including standardization of flag syntax and runtime configuration reloads. +We are also aligning with industry standards regarding the use of flags, ensuring a seamless experience for users migrating from or integrating with other platforms. +Below are the changes for each binary. +- [mysqlctl](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/mysqlctl.diff) +- [mysqlctld](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/mysqlctld.diff) +- [vtaclcheck](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtaclcheck.diff) +- [vtadmin](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtadmin.diff) +- [vtctlclient](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtctlclient.diff) +- [vtctld](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtctld.diff) +- [vtctldclient](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtctldclient.diff) +- [vtexplain](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtexplain.diff) +- [vtgate](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtgate.diff) +- [vtgtr](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtgtr.diff) +- [vtorc](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vtorc.diff) +- [vttablet](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vttablet.diff) +- [vttestserver](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vttestserver.diff) +- [vttlstest](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/vttlstest.diff) +- [zk](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/zk.diff) +- [zkctl](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/zkctl.diff) +- [zkctld](https://github.com/vitessio/vitess/blob/release-15.0/doc/flags/14.0-to-15.0-transition/zkctld.diff) + +------------ +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/15.0/15.0.0/changelog.md). + +The release includes 595 commits (excluding merges) + +Thanks to all our contributors: @Abirdcfly, @DeathBorn, @GuptaManan100, @K-Kumar-01, @L3o-pold, @Phanatic, @Weijun-H, @ajm188, @arthurschreiber, @arvind-murty, @brirams, @dbussink, @deepthi, @dependabot[bot], @doeg, @frouioui, @harshit-gangal, @mattlord, @maxenglander, @mgale, @notfelineit, @ofiriluz, @olyazavr, @quinox, @rafer, @renatolabs, @rohit-nayak-ps, @rsajwani, @rvrangel, @saunderst, @shlomi-noach, @systay, @vitess-bot[bot], @vmg, @yoheimuta + diff --git a/doc/releasenotes/15_0_0_summary.md b/changelog/15.0/15.0.0/summary.md similarity index 100% rename from doc/releasenotes/15_0_0_summary.md rename to changelog/15.0/15.0.0/summary.md diff --git a/changelog/15.0/15.0.1/changelog.md b/changelog/15.0/15.0.1/changelog.md new file mode 100644 index 00000000000..c44b69b5e8e --- /dev/null +++ b/changelog/15.0/15.0.1/changelog.md @@ -0,0 +1,43 @@ +# Changelog of Vitess v15.0.1 + +### Bug fixes +#### Build/CI + * Docker Image Context Fix [#11628](https://github.com/vitessio/vitess/pull/11628) + * Addition of a CI tool to detect dead links in test/config.json [#11668](https://github.com/vitessio/vitess/pull/11668) + * Fix files changes filtering in CI [#11714](https://github.com/vitessio/vitess/pull/11714) +#### General + * [release-15.0] Fix missing flag usage for vault credentials flags (#11582) [#11583](https://github.com/vitessio/vitess/pull/11583) + * fix vdiff release notes [#11595](https://github.com/vitessio/vitess/pull/11595) +#### Query Serving + * collations: fix coercion semantics according to 8.0.31 changes [#11487](https://github.com/vitessio/vitess/pull/11487) + * [bugfix] Allow VTExplain to handle shards that are not active during resharding [#11640](https://github.com/vitessio/vitess/pull/11640) + * [release-15.0] Do not multiply `AggregateRandom` in JOINs [#11672](https://github.com/vitessio/vitess/pull/11672) + * [15.0] Send errors in stream instead of a grpc error from streaming rpcs when transaction or reserved connection is acquired [#11687](https://github.com/vitessio/vitess/pull/11687) + * improve handling of ORDER BY/HAVING rewriting [#11691](https://github.com/vitessio/vitess/pull/11691) + * [release-15.0] Accept no more data in session state change as ok (#11796) [#11800](https://github.com/vitessio/vitess/pull/11800) + * semantics: Use a BitSet [#11819](https://github.com/vitessio/vitess/pull/11819) +#### VTAdmin + * Add VTAdmin folder to release package [#11683](https://github.com/vitessio/vitess/pull/11683) +#### vtctl + * Switch ApplySchema `--sql` argument to be `StringArray` instead of `StringSlice` [#11790](https://github.com/vitessio/vitess/pull/11790) +### CI/Build +#### Build/CI + * [release-15.0] Remove Launchable in the workflows [#11669](https://github.com/vitessio/vitess/pull/11669) + * Update test runners to run all tests including outside package [#11787](https://github.com/vitessio/vitess/pull/11787) + * [release-15.0] Add automation to change vitess version in the docker-release script (#11682) [#11816](https://github.com/vitessio/vitess/pull/11816) +#### Governance + * codeowners: have at least two for almost every package [#11639](https://github.com/vitessio/vitess/pull/11639) +#### Query Serving + * [release-15.0] Consistent sorting in Online DDL Vrepl suite test (#11821) [#11828](https://github.com/vitessio/vitess/pull/11828) +#### VReplication + * update jsonparser dependency [#11694](https://github.com/vitessio/vitess/pull/11694) +### Release +#### General + * Release of v15.0.0 [#11573](https://github.com/vitessio/vitess/pull/11573) + * Back to dev mode after v15.0.0 [#11574](https://github.com/vitessio/vitess/pull/11574) + * fix anchors for release notes and summary [#11578](https://github.com/vitessio/vitess/pull/11578) + * Mention the `--db-config-*-*` flag in the release notes [#11610](https://github.com/vitessio/vitess/pull/11610) +### Testing +#### Build/CI + * [release-15.0] Use `go1.19.3` in the upgrade/downgrade tests [#11676](https://github.com/vitessio/vitess/pull/11676) + diff --git a/changelog/15.0/15.0.1/release_notes.md b/changelog/15.0/15.0.1/release_notes.md new file mode 100644 index 00000000000..1737f0fd2f8 --- /dev/null +++ b/changelog/15.0/15.0.1/release_notes.md @@ -0,0 +1,24 @@ +# Release of Vitess v15.0.1 +## Major Changes + +### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). + +### VtAdmin web folder is missing while installing Vitess with local method + +When we try to install Vitess locally (https://vitess.io/docs/15.0/get-started/local/#install-vitess) on `v15.0`, we are getting the following error +``` +npm ERR! enoent ENOENT: no such file or directory, open '/home/web/vtadmin/package.json' +``` +This issue is fixed in 15.0.1. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11679), and its fix [here](https://github.com/vitessio/vitess/pull/11683). + +------------ + +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/15.0/15.0.1/changelog.md). + +The release includes 25 commits (excluding merges) + +Thanks to all our contributors: @GuptaManan100, @frouioui, @harshit-gangal, @rsajwani, @vitess-bot[bot] + diff --git a/changelog/15.0/15.0.1/summary.md b/changelog/15.0/15.0.1/summary.md new file mode 100644 index 00000000000..66a5763180f --- /dev/null +++ b/changelog/15.0/15.0.1/summary.md @@ -0,0 +1,14 @@ +## Major Changes + +### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). + +### VtAdmin web folder is missing while installing Vitess with local method + +When we try to install Vitess locally (https://vitess.io/docs/15.0/get-started/local/#install-vitess) on `v15.0`, we are getting the following error +``` +npm ERR! enoent ENOENT: no such file or directory, open '/home/web/vtadmin/package.json' +``` +This issue is fixed in 15.0.1. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11679), and its fix [here](https://github.com/vitessio/vitess/pull/11683). \ No newline at end of file diff --git a/changelog/15.0/15.0.2/changelog.md b/changelog/15.0/15.0.2/changelog.md new file mode 100644 index 00000000000..29aff8fa2f7 --- /dev/null +++ b/changelog/15.0/15.0.2/changelog.md @@ -0,0 +1,27 @@ +# Changelog of Vitess v15.0.2 + +### Bug fixes +#### Query Serving + * Online DDL: fix 'vtctlclient OnlineDDL' template queries [#11889](https://github.com/vitessio/vitess/pull/11889) + * Fix CheckMySQL by setting the correct wanted state [#11895](https://github.com/vitessio/vitess/pull/11895) + * bugfix: allow predicates without dependencies with derived tables to be handled correctly [#11911](https://github.com/vitessio/vitess/pull/11911) + * [release-15.0] Fix sending a ServerLost error when reading a packet fails (#11920) [#11930](https://github.com/vitessio/vitess/pull/11930) + * Skip `TestSubqueriesExists` during upgrade-downgrade tests [#11953](https://github.com/vitessio/vitess/pull/11953) +#### VReplication + * VReplication: Prevent Orphaned VDiff2 Jobs [#11768](https://github.com/vitessio/vitess/pull/11768) +### CI/Build +#### Build/CI + * Fix deprecated usage of set-output [#11844](https://github.com/vitessio/vitess/pull/11844) + * Use `go1.19.4` in the next release upgrade downgrade E2E tests [#11924](https://github.com/vitessio/vitess/pull/11924) +#### TabletManager + * Fix closing the body for HTTP requests [#11842](https://github.com/vitessio/vitess/pull/11842) +### Enhancement +#### General + * Upgrade to `go1.18.9` [#11897](https://github.com/vitessio/vitess/pull/11897) +### Release +#### General + * Release of v15.0.1 [#11847](https://github.com/vitessio/vitess/pull/11847) + * Back to dev mode after v15.0.1 [#11848](https://github.com/vitessio/vitess/pull/11848) + * updating summary and release notes for v15.0.1 [#11852](https://github.com/vitessio/vitess/pull/11852) + * Update the release `15.0.2` summary doc [#11954](https://github.com/vitessio/vitess/pull/11954) + diff --git a/changelog/15.0/15.0.2/release_notes.md b/changelog/15.0/15.0.2/release_notes.md new file mode 100644 index 00000000000..33ece0e1c73 --- /dev/null +++ b/changelog/15.0/15.0.2/release_notes.md @@ -0,0 +1,20 @@ +# Release of Vitess v15.0.2 +## Major Changes + +### Upgrade to `go1.18.9` + +Vitess `v15.0.2` now runs on `go1.18.9`. +The patch release of Go, `go1.18.9`, was one of the main reasons for this release as it includes an important security fixe to `net/http` package, which is use extensively by Vitess. +Below is a summary of this patch release. You can learn more [here](https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU). + +> go1.18.9 (released 2022-12-06) includes security fixes to the net/http and os packages, as well as bug fixes to cgo, the compiler, the runtime, and the crypto/x509 and os/exec packages. + + +------------ + +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/15.0/15.0.2/changelog.md). + +The release includes 14 commits (excluding merges) + +Thanks to all our contributors: @GuptaManan100, @dbussink, @frouioui, @mattlord, @rsajwani, @shlomi-noach, @vitess-bot[bot] + diff --git a/changelog/15.0/15.0.2/summary.md b/changelog/15.0/15.0.2/summary.md new file mode 100644 index 00000000000..6f3346efa47 --- /dev/null +++ b/changelog/15.0/15.0.2/summary.md @@ -0,0 +1,10 @@ +## Major Changes + +### Upgrade to `go1.18.9` + +Vitess `v15.0.2` now runs on `go1.18.9`. +The patch release of Go, `go1.18.9`, was one of the main reasons for this release as it includes an important security fixe to `net/http` package, which is use extensively by Vitess. +Below is a summary of this patch release. You can learn more [here](https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU). + +> go1.18.9 (released 2022-12-06) includes security fixes to the net/http and os packages, as well as bug fixes to cgo, the compiler, the runtime, and the crypto/x509 and os/exec packages. + diff --git a/changelog/15.0/README.md b/changelog/15.0/README.md new file mode 100644 index 00000000000..f6985e8252b --- /dev/null +++ b/changelog/15.0/README.md @@ -0,0 +1,13 @@ +## v15.0 +The dedicated team for this release can be found [here](team.md). +* **[15.0.2](15.0.2)** + * [Changelog](15.0.2/changelog.md) + * [Release Notes](15.0.2/release_notes.md) + +* **[15.0.1](15.0.1)** + * [Changelog](15.0.1/changelog.md) + * [Release Notes](15.0.1/release_notes.md) + +* **[15.0.0](15.0.0)** + * [Changelog](15.0.0/changelog.md) + * [Release Notes](15.0.0/release_notes.md) diff --git a/changelog/15.0/team.md b/changelog/15.0/team.md new file mode 100644 index 00000000000..b8cbdf809bf --- /dev/null +++ b/changelog/15.0/team.md @@ -0,0 +1,5 @@ +## Release Team for v15 + +- **Lead:** Rameez Sajwani ([rsajwani](https://github.com/rsajwani)) rameez@planetscale.com +- **Shadow:** Manan Gupta ([GuptaManan100](https://github.com/GuptaManan100)) manan@planetscale.com +- **Mentor:** Florent Poinsard ([frouioui](https://github.com/frouioui)) florent@planetscale.com \ No newline at end of file diff --git a/changelog/16.0/16.0.0/changelog.md b/changelog/16.0/16.0.0/changelog.md new file mode 100644 index 00000000000..0849e143a05 --- /dev/null +++ b/changelog/16.0/16.0.0/changelog.md @@ -0,0 +1,449 @@ +# Changelog of Vitess v16.0.0 + +### Announcement +#### Governance + * Move inactive maintainers to "Past" section, change Areas to include more active maintainers [#11744](https://github.com/vitessio/vitess/pull/11744) + * add frances to maintainers [#11865](https://github.com/vitessio/vitess/pull/11865) + * add Arthur to the maintainers file [#11937](https://github.com/vitessio/vitess/pull/11937) +#### Query Serving + * deprecate V3 planner [#11635](https://github.com/vitessio/vitess/pull/11635) +#### VTAdmin + * [vtadmin] deprecated vtexplain [#12163](https://github.com/vitessio/vitess/pull/12163) +### Bug fixes +#### Backup and Restore + * Detect redo log location dynamically based on presence [#11555](https://github.com/vitessio/vitess/pull/11555) + * [main] mysqlctl: flags should be added to vtbackup (#12048) [#12060](https://github.com/vitessio/vitess/pull/12060) +#### Build/CI + * Fix the script `check_make_sizegen` [#11465](https://github.com/vitessio/vitess/pull/11465) + * Skip `TestComparisonSemantics` test [#11474](https://github.com/vitessio/vitess/pull/11474) + * Docker Image Context Fix [#11628](https://github.com/vitessio/vitess/pull/11628) + * Addition of a CI tool to detect dead links in test/config.json [#11668](https://github.com/vitessio/vitess/pull/11668) + * Fix files changes filtering in CI [#11714](https://github.com/vitessio/vitess/pull/11714) + * Fix `codeql` workflow timeout issue [#11760](https://github.com/vitessio/vitess/pull/11760) + * Trigger OnlineDDL workflow when test data changes [#11827](https://github.com/vitessio/vitess/pull/11827) +#### CLI + * [release-16.0] vtctldclient: Format GetKeyspace output using cli.MarshalJSON (#12495) [#12503](https://github.com/vitessio/vitess/pull/12503) +#### Cluster management + * BugFix: Errant GTID detection for a single replica [#12024](https://github.com/vitessio/vitess/pull/12024) + * BugFix: Fix race in `IsFlagProvided` [#12042](https://github.com/vitessio/vitess/pull/12042) +#### Examples + * Examples: Add lib functions to wait for shard states [#12239](https://github.com/vitessio/vitess/pull/12239) + * Examples: Correct VTAdmin Discovery File Path And Add Check [#12415](https://github.com/vitessio/vitess/pull/12415) + * examples: Fix Vtop example and release script [#12440](https://github.com/vitessio/vitess/pull/12440) + * Fix vtctldclient command in vtop test script and the fix operator example [#12458](https://github.com/vitessio/vitess/pull/12458) + * Open vtadmin-api port in docker-local example to enable vtadmin access [#12467](https://github.com/vitessio/vitess/pull/12467) +#### General + * [main] Stats Flags: include stats flags in the correct binaries (#11450) [#11453](https://github.com/vitessio/vitess/pull/11453) + * Test flags: Update logic for parsing test flags to run unit tests within GoLand and to parse test flags in vtgate to allow running unit tests [#11551](https://github.com/vitessio/vitess/pull/11551) + * Fix missing flag usage for vault credentials flags [#11582](https://github.com/vitessio/vitess/pull/11582) + * fix vdiff release notes [#11595](https://github.com/vitessio/vitess/pull/11595) +#### Observability + * stats/prometheus: normalize labels for single-label implementations [#12057](https://github.com/vitessio/vitess/pull/12057) +#### Online DDL + * Parse binlog variable length encoded columns [#11871](https://github.com/vitessio/vitess/pull/11871) + * Allow zero (in) date when setting up internal _vt schema [#12262](https://github.com/vitessio/vitess/pull/12262) +#### Operator + * [main] Increase the memory limit of the vitess-operator (#11548) [#11550](https://github.com/vitessio/vitess/pull/11550) + * Fix rbac config in the vtop example [#12034](https://github.com/vitessio/vitess/pull/12034) +#### Query Serving + * Fix query list override issue on mysql restart [#11309](https://github.com/vitessio/vitess/pull/11309) + * make MySQL56-flavor schema queries forward-compatible [#11323](https://github.com/vitessio/vitess/pull/11323) + * Plan order by `COUNT(X)` [#11420](https://github.com/vitessio/vitess/pull/11420) + * Fix #11455 - skip vindex operations for `DELETE` statements against unsharded tables [#11461](https://github.com/vitessio/vitess/pull/11461) + * Fix aggregation end-to-end test PRIMARY KEY [#11473](https://github.com/vitessio/vitess/pull/11473) + * collations: fix coercion semantics according to 8.0.31 changes [#11487](https://github.com/vitessio/vitess/pull/11487) + * fix: reserve connection to follow query timeout when outside of transaction [#11490](https://github.com/vitessio/vitess/pull/11490) + * [main] bug fix: using self-referencing columns in HAVING should not overflow (#11499) [#11504](https://github.com/vitessio/vitess/pull/11504) + * Fix `HAVING` rewriting made in #11306 [#11515](https://github.com/vitessio/vitess/pull/11515) + * fix: fail over reconnect in stream execution for connection with transaction [#11517](https://github.com/vitessio/vitess/pull/11517) + * [15.0] Fix: concatenate engine in transaction [#11534](https://github.com/vitessio/vitess/pull/11534) + * [main] Redact bind variables in mysql errors (#11540) [#11545](https://github.com/vitessio/vitess/pull/11545) + * Fix ordering when error happens during stream setup [#11592](https://github.com/vitessio/vitess/pull/11592) + * Do not multiply `AggregateRandom` in `JOIN`s [#11633](https://github.com/vitessio/vitess/pull/11633) + * [bugfix] Allow VTExplain to handle shards that are not active during resharding [#11640](https://github.com/vitessio/vitess/pull/11640) + * Fix generating invalid alter table for comments [#11645](https://github.com/vitessio/vitess/pull/11645) + * sqltypes: handle leading zeroes [#11650](https://github.com/vitessio/vitess/pull/11650) + * Send errors in stream instead of a grpc error from streaming rpcs when transaction or reserved connection is acquired [#11656](https://github.com/vitessio/vitess/pull/11656) + * schemadiff: normalize index option value (string) [#11675](https://github.com/vitessio/vitess/pull/11675) + * improve handling of ORDER BY/HAVING rewriting [#11691](https://github.com/vitessio/vitess/pull/11691) + * query timeout hints in unsharded cases [#11709](https://github.com/vitessio/vitess/pull/11709) + * Online DDL: adding error check; more verbose error messages [#11789](https://github.com/vitessio/vitess/pull/11789) + * Accept no more data in session state change as ok [#11796](https://github.com/vitessio/vitess/pull/11796) + * Fix: return allowed transaction isolation level value on select query [#11804](https://github.com/vitessio/vitess/pull/11804) + * semantics: Use a BitSet [#11819](https://github.com/vitessio/vitess/pull/11819) + * BugFix: Escaping Percentage and Underscore require special handling [#11823](https://github.com/vitessio/vitess/pull/11823) + * Simplify recursive data structure in CFC Vindex [#11843](https://github.com/vitessio/vitess/pull/11843) + * Fix MySQL56 GTID parsing when SID/UUID repeats [#11888](https://github.com/vitessio/vitess/pull/11888) + * Online DDL: fix 'vtctlclient OnlineDDL' template queries [#11889](https://github.com/vitessio/vitess/pull/11889) + * Fix CheckMySQL by setting the correct wanted state [#11895](https://github.com/vitessio/vitess/pull/11895) + * Onlineddl: formalize "immediate operations", respect `--postpone-completion` strategy flag [#11910](https://github.com/vitessio/vitess/pull/11910) + * bugfix: allow predicates without dependencies with derived tables to be handled correctly [#11911](https://github.com/vitessio/vitess/pull/11911) + * Online DDL: ensure message is valid `utf8` in `updateMigrationMessage()` [#11914](https://github.com/vitessio/vitess/pull/11914) + * Fix sending a ServerLost error when reading a packet fails [#11920](https://github.com/vitessio/vitess/pull/11920) + * only expand when we have full information [#11998](https://github.com/vitessio/vitess/pull/11998) + * Remove unnecessary logging [#12000](https://github.com/vitessio/vitess/pull/12000) + * Fix parsing and normalization of floating point types [#12009](https://github.com/vitessio/vitess/pull/12009) + * OnlineDDL: scheduleNextMigration() to only read reviewed migrations [#12014](https://github.com/vitessio/vitess/pull/12014) + * Keywords must be unique and can't be reused [#12044](https://github.com/vitessio/vitess/pull/12044) + * Fix: Date math with Interval keyword [#12082](https://github.com/vitessio/vitess/pull/12082) + * OnlineDDL: support integer-to-enum conversion in `vitess` migrations [#12098](https://github.com/vitessio/vitess/pull/12098) + * Keep the correct case for the charset for canonical string [#12105](https://github.com/vitessio/vitess/pull/12105) + * BugFix: Cast expression translation by evaluation engine [#12111](https://github.com/vitessio/vitess/pull/12111) + * [Gen4] Fix lookup vindexes with `autocommit` enabled [#12172](https://github.com/vitessio/vitess/pull/12172) + * handle system databases other that information_schema correctly [#12175](https://github.com/vitessio/vitess/pull/12175) + * VTGate: Ensure HealthCheck Cache Secondary Maps Stay in Sync With Authoritative Map on Tablet Delete [#12178](https://github.com/vitessio/vitess/pull/12178) + * schemadiff: fix scenario where no tables exist in schema and with just views reading from DUAL [#12189](https://github.com/vitessio/vitess/pull/12189) + * Fix parsing of bitnum values larger than 64 bit [#12191](https://github.com/vitessio/vitess/pull/12191) + * Online DDL: fix deadlock by releasing mutex before calling callback [#12211](https://github.com/vitessio/vitess/pull/12211) + * fix: transaction_isolation to be applied at session level [#12281](https://github.com/vitessio/vitess/pull/12281) + * Fix aggregation on outer joins [#12298](https://github.com/vitessio/vitess/pull/12298) + * [release-16.0] fix: added null safe operator precendence rule (#12297) [#12307](https://github.com/vitessio/vitess/pull/12307) + * Fix for USING when column names not lower cased [#12379](https://github.com/vitessio/vitess/pull/12379) + * [release-16.0] Fix bug in vtexplain around JOINs (#12376) [#12384](https://github.com/vitessio/vitess/pull/12384) + * Fix scalar aggregation engine primitive for column truncation [#12468](https://github.com/vitessio/vitess/pull/12468) + * [release-16.0] BugFix: Unsharded query using a derived table and a dual table [#12484](https://github.com/vitessio/vitess/pull/12484) +#### VReplication + * VReplication: escape identifiers when renaming source tables [#11670](https://github.com/vitessio/vitess/pull/11670) + * VReplication: Prevent Orphaned VDiff2 Jobs [#11768](https://github.com/vitessio/vitess/pull/11768) + * VDiff2: Properly Apply --only_pks Report Flag [#12025](https://github.com/vitessio/vitess/pull/12025) + * VReplication: Improve Error/Status Reporting [#12052](https://github.com/vitessio/vitess/pull/12052) + * VReplication: Propagate Binlog Stream Errors [#12095](https://github.com/vitessio/vitess/pull/12095) + * VReplication: ignore GC tables in schema analysis [#12320](https://github.com/vitessio/vitess/pull/12320) + * Sidecar schema init: use COPY algorithm while altering sidecardb tables [#12436](https://github.com/vitessio/vitess/pull/12436) +#### VTorc + * Fix VTOrc holding locks after shutdown [#11442](https://github.com/vitessio/vitess/pull/11442) + * [15.0] Fix VTOrc to handle multiple failures [#11489](https://github.com/vitessio/vitess/pull/11489) + * VTOrc running PRS when database_instance empty bug fix. [#12019](https://github.com/vitessio/vitess/pull/12019) + * Fix: VTOrc forgetting old instances [#12089](https://github.com/vitessio/vitess/pull/12089) + * Fix insert query of blocked_recovery table in VTOrc [#12091](https://github.com/vitessio/vitess/pull/12091) +#### vtctl + * Switch ApplySchema `--sql` argument to be `StringArray` instead of `StringSlice` [#11790](https://github.com/vitessio/vitess/pull/11790) +#### vtexplain + * Use Gen4 as the default planner version for VTExplain [#12021](https://github.com/vitessio/vitess/pull/12021) +#### vttestserver + * Fix vttestserver run script defaults [#12004](https://github.com/vitessio/vitess/pull/12004) + * Add missing backslash to run.sh script [#12033](https://github.com/vitessio/vitess/pull/12033) +### CI/Build +#### Backup and Restore + * docker/lite: +zstd dep [#11997](https://github.com/vitessio/vitess/pull/11997) +#### Build/CI + * unit test: use require and assert [#11252](https://github.com/vitessio/vitess/pull/11252) + * Skip CI with the `Skip CI` label [#11514](https://github.com/vitessio/vitess/pull/11514) + * Update GitHub Actions workflows to latest versions [#11525](https://github.com/vitessio/vitess/pull/11525) + * Removing SharedPitr_tls and Backup_transfrom test from CI [#11611](https://github.com/vitessio/vitess/pull/11611) + * Add automation to change vitess version in the docker-release script [#11682](https://github.com/vitessio/vitess/pull/11682) + * Fix two additional flaky test sources in endtoend tests [#11743](https://github.com/vitessio/vitess/pull/11743) + * Update latest protobuf [#11782](https://github.com/vitessio/vitess/pull/11782) + * Update test runners to run all tests including outside package [#11787](https://github.com/vitessio/vitess/pull/11787) + * Update to latest etcd release [#11791](https://github.com/vitessio/vitess/pull/11791) + * Migrate to GitHub OIDC based auth for Launchable [#11808](https://github.com/vitessio/vitess/pull/11808) + * Fix the golangci-lint config [#11812](https://github.com/vitessio/vitess/pull/11812) + * Add instructions on how to fix a self-hosted runner running out of disk space [#11839](https://github.com/vitessio/vitess/pull/11839) + * Fix deprecated usage of set-output [#11844](https://github.com/vitessio/vitess/pull/11844) + * update golangci-lint to 1.50.1 [#11873](https://github.com/vitessio/vitess/pull/11873) + * CODEOWNERS: Add vrepl team members for vtgate vstream and tablet picker [#11950](https://github.com/vitessio/vitess/pull/11950) + * Upgrade all the CI runners to Ubuntu 22.04 [#11985](https://github.com/vitessio/vitess/pull/11985) + * Add lauchable to unit tests as well and remove OIDC [#12031](https://github.com/vitessio/vitess/pull/12031) + * consolidating OnlineDDL 'declarative' tests into 'scheduler' tests: part 1 [#12061](https://github.com/vitessio/vitess/pull/12061) + * OnlineDDL CI: remove 'revertible' tests (part 2) [#12192](https://github.com/vitessio/vitess/pull/12192) + * Update vtadmin dependencies [#12201](https://github.com/vitessio/vitess/pull/12201) + * Update Go dependencies [#12215](https://github.com/vitessio/vitess/pull/12215) + * Download mariadb from vitess-resources [#12271](https://github.com/vitessio/vitess/pull/12271) +#### Cluster management + * Endtoend cluster improvements [#11859](https://github.com/vitessio/vitess/pull/11859) + * CI, tabletmanager throttler topo tests: polling until status received [#12107](https://github.com/vitessio/vitess/pull/12107) +#### General + * [deps] go get golang.org/x/text && go mod tidy [#11466](https://github.com/vitessio/vitess/pull/11466) + * Upgrade to `go1.19.3` [#11655](https://github.com/vitessio/vitess/pull/11655) + * Code freeze of release-16.0 [#12232](https://github.com/vitessio/vitess/pull/12232) +#### Governance + * codeowners: have at least two for almost every package [#11639](https://github.com/vitessio/vitess/pull/11639) + * added code owners for go.mod and go.sum files [#11711](https://github.com/vitessio/vitess/pull/11711) + * Add more codeowners to the `/test` directory [#11762](https://github.com/vitessio/vitess/pull/11762) +#### Query Serving + * Consistent sorting in Online DDL Vrepl suite test [#11821](https://github.com/vitessio/vitess/pull/11821) + * Flakes: Properly Test HealthCheck Cache Response Handling [#12226](https://github.com/vitessio/vitess/pull/12226) + * Fix `SHOW VSCHEMA TABLES` tests using v17 vtgate that expected `dual` [#12381](https://github.com/vitessio/vitess/pull/12381) +#### TabletManager + * Update throttler-topo workflow file [#11784](https://github.com/vitessio/vitess/pull/11784) + * Fix closing the body for HTTP requests [#11842](https://github.com/vitessio/vitess/pull/11842) +#### VReplication + * update jsonparser dependency [#11694](https://github.com/vitessio/vitess/pull/11694) +#### VTorc + * Move vtorc runners back to normal github runners [#11482](https://github.com/vitessio/vitess/pull/11482) +### Dependabot +#### Build/CI + * [release-16.0] Bump golang.org/x/net from 0.5.0 to 0.7.0 (#12390) [#12400](https://github.com/vitessio/vitess/pull/12400) + * [release-16.0] Update additional Go dependencies (#12401) [#12402](https://github.com/vitessio/vitess/pull/12402) +#### Java + * build(deps): Bump protobuf-java from 3.19.4 to 3.19.6 in /java [#11439](https://github.com/vitessio/vitess/pull/11439) +#### VTAdmin + * build(deps): Bump @xmldom/xmldom from 0.7.5 to 0.7.8 in /web/vtadmin [#11615](https://github.com/vitessio/vitess/pull/11615) + * build(deps): Bump loader-utils from 1.4.0 to 1.4.1 in /web/vtadmin [#11659](https://github.com/vitessio/vitess/pull/11659) + * build(deps): Bump loader-utils from 1.4.1 to 1.4.2 in /web/vtadmin [#11725](https://github.com/vitessio/vitess/pull/11725) +### Documentation +#### Build/CI + * Update release notes summary for the new default MySQL version [#12222](https://github.com/vitessio/vitess/pull/12222) +#### CLI + * [vtadmin] Do not backtick binary name [#11464](https://github.com/vitessio/vitess/pull/11464) + * [vtctldclient|docs] apply doc feedback based on website PR feedback [#12030](https://github.com/vitessio/vitess/pull/12030) +#### Documentation + * Upgrades the release notes for v15.0.0 [#11567](https://github.com/vitessio/vitess/pull/11567) + * Copy design docs over from website [#12071](https://github.com/vitessio/vitess/pull/12071) +#### Query Serving + * Add release notes summary for views [#12422](https://github.com/vitessio/vitess/pull/12422) +#### VReplication + * Mark VDiff V2 as GA in v16 [#12084](https://github.com/vitessio/vitess/pull/12084) +### Enhancement +#### Authn/z + * VTGate: Set immediate caller id from gRPC static auth username [#12050](https://github.com/vitessio/vitess/pull/12050) +#### Backup and Restore + * Incremental logical backup and point in time recovery [#11097](https://github.com/vitessio/vitess/pull/11097) + * vtbackup: disable redo log before starting replication [#11330](https://github.com/vitessio/vitess/pull/11330) + * remove excessive backup decompression logging [#11479](https://github.com/vitessio/vitess/pull/11479) + * vtbackup: add --disable-redo-log flag (default false) [#11594](https://github.com/vitessio/vitess/pull/11594) + * remove backup_hook from flag help [#12029](https://github.com/vitessio/vitess/pull/12029) +#### Build/CI + * Move CI workflow to use latest community version of mysql 8.0 [#11493](https://github.com/vitessio/vitess/pull/11493) + * Upgrade the `release_notes_label` workflow for `v16.0.0` [#11544](https://github.com/vitessio/vitess/pull/11544) + * CODEOWNERS: Add maintainers to `.github/workflows` and `.github` [#11781](https://github.com/vitessio/vitess/pull/11781) + * Allow override of build git env in docker/base builds [#11968](https://github.com/vitessio/vitess/pull/11968) + * Add vtorc port to vitess local docker run [#12001](https://github.com/vitessio/vitess/pull/12001) + * Update the MySQL version used by our Docker images [#12054](https://github.com/vitessio/vitess/pull/12054) + * Fail CI when a PR is labeled with `NeedsWebsiteDocsUpdate` or `NeedsDescriptionUpdate` [#12062](https://github.com/vitessio/vitess/pull/12062) + * Revert default MySQL 80 version to `8.0.30` [#12252](https://github.com/vitessio/vitess/pull/12252) +#### CLI + * Add GenerateShardRanges to vtctldclient [#11492](https://github.com/vitessio/vitess/pull/11492) + * Properly deprecate flags and fix default for `--cell` [#11501](https://github.com/vitessio/vitess/pull/11501) + * Allow version to be accessible via the -v shorthand [#11512](https://github.com/vitessio/vitess/pull/11512) +#### Cluster management + * Create new api for topo lock shard exists [#11269](https://github.com/vitessio/vitess/pull/11269) + * Deprecating VExec part1: removing client-side references [#11955](https://github.com/vitessio/vitess/pull/11955) +#### Driver + * Implement the RowsColumnTypeScanType interface in the go sql driver [#12007](https://github.com/vitessio/vitess/pull/12007) +#### Examples + * Give all permissions in rbac in examples [#11463](https://github.com/vitessio/vitess/pull/11463) + * Fix Vitess Operator example [#11546](https://github.com/vitessio/vitess/pull/11546) +#### General + * removing unncessary flags across binaries [#11495](https://github.com/vitessio/vitess/pull/11495) + * [release-15.0] Upgrade to `go1.18.7` [#11507](https://github.com/vitessio/vitess/pull/11507) + * vttablet sidecar schema:use schemadiff to reach desired schema on tablet init replacing the withDDL-based approach [#11520](https://github.com/vitessio/vitess/pull/11520) + * Removing redundant flags across binaries [#11522](https://github.com/vitessio/vitess/pull/11522) + * Remove `EnableTracingOpt` and `--grpc_enable_tracing` [#11543](https://github.com/vitessio/vitess/pull/11543) + * Add default lower stack limit [#11569](https://github.com/vitessio/vitess/pull/11569) + * Upgrade to `go1.19.4` [#11905](https://github.com/vitessio/vitess/pull/11905) + * Add structure logging to Vitess [#11960](https://github.com/vitessio/vitess/pull/11960) + * Revert changes made in #11960 [#12219](https://github.com/vitessio/vitess/pull/12219) + * Upgrade `release-16.0` to `go1.20.1` [#12398](https://github.com/vitessio/vitess/pull/12398) +#### Governance + * Add manan and florent to Docker files CODEOWNERS [#11981](https://github.com/vitessio/vitess/pull/11981) +#### Query Serving + * ComBinlogDumpGTID and downstream replication protocol [#10066](https://github.com/vitessio/vitess/pull/10066) + * Document error code in `vtgate/planbuilder` [#10738](https://github.com/vitessio/vitess/pull/10738) + * opt in/out of query consolidation [#11080](https://github.com/vitessio/vitess/pull/11080) + * Online DDL: more (async) log visibility into cut-over phase [#11253](https://github.com/vitessio/vitess/pull/11253) + * optionally disable verify-after-insert behavior of lookup vindexes [#11313](https://github.com/vitessio/vitess/pull/11313) + * resource pool: resource max lifetime timeout [#11337](https://github.com/vitessio/vitess/pull/11337) + * feat: added query timeout to vtgate default and per session [#11429](https://github.com/vitessio/vitess/pull/11429) + * [evalengine] add rewrites for nullif and ifnull [#11431](https://github.com/vitessio/vitess/pull/11431) + * Handle aliasing of collation names [#11433](https://github.com/vitessio/vitess/pull/11433) + * vitess Online DDL atomic cut-over [#11460](https://github.com/vitessio/vitess/pull/11460) + * Keep track of expanded columns in the semantic analysis [#11462](https://github.com/vitessio/vitess/pull/11462) + * feat: deconstruct tuple comparisons so we can use them for routing decisions [#11500](https://github.com/vitessio/vitess/pull/11500) + * Add Gauge For CheckMySQL Running [#11524](https://github.com/vitessio/vitess/pull/11524) + * Optimize List Support In Vindex Functions [#11531](https://github.com/vitessio/vitess/pull/11531) + * add option to disable lookup read lock [#11538](https://github.com/vitessio/vitess/pull/11538) + * [refactor] Predicate push down [#11552](https://github.com/vitessio/vitess/pull/11552) + * planner: better bindvar names for auto-parameterized queries [#11571](https://github.com/vitessio/vitess/pull/11571) + * planner enhancement: nice bindvar names for update [#11581](https://github.com/vitessio/vitess/pull/11581) + * Online DDL: more support for INSTANT DDL [#11591](https://github.com/vitessio/vitess/pull/11591) + * vtgate: route create table statements to vschema keyspace [#11602](https://github.com/vitessio/vitess/pull/11602) + * Dynamic tablet throttler config: enable/disable, set metrics query/threshold [#11604](https://github.com/vitessio/vitess/pull/11604) + * Cleanup copying of proto results to sqltypes.Result [#11607](https://github.com/vitessio/vitess/pull/11607) + * Move horizon planning to operators [#11622](https://github.com/vitessio/vitess/pull/11622) + * normalize more expressions [#11631](https://github.com/vitessio/vitess/pull/11631) + * Fix `OR 1=0` causing queries to scatter [#11653](https://github.com/vitessio/vitess/pull/11653) + * Online DDL: normalize/idempotentize CHECK CONSTRAINTs in ALTER TABLE statement [#11663](https://github.com/vitessio/vitess/pull/11663) + * add support for transaction isolation level and make it vitess aware setting [#11673](https://github.com/vitessio/vitess/pull/11673) + * don't reuse bindvars for LIMIT and OFFSET [#11689](https://github.com/vitessio/vitess/pull/11689) + * Online DDL: more scheduler triggering following successful operations [#11701](https://github.com/vitessio/vitess/pull/11701) + * Add support for transaction access mode [#11704](https://github.com/vitessio/vitess/pull/11704) + * rewrite predicates to expose routing opportunities [#11765](https://github.com/vitessio/vitess/pull/11765) + * find IN route possibility in ORs [#11775](https://github.com/vitessio/vitess/pull/11775) + * [planner] Better AST equality [#11867](https://github.com/vitessio/vitess/pull/11867) + * optimize joins, redirect dml for reference tables [#11875](https://github.com/vitessio/vitess/pull/11875) + * VExplain statement [#11892](https://github.com/vitessio/vitess/pull/11892) + * Simplify `getPlan` and `gen4CompareV3` [#11903](https://github.com/vitessio/vitess/pull/11903) + * Better clone of the VCursor [#11926](https://github.com/vitessio/vitess/pull/11926) + * Better clone of the VCursor [#11926](https://github.com/vitessio/vitess/pull/11926) + * [planner] Schema information on the information_schema views [#11941](https://github.com/vitessio/vitess/pull/11941) + * schemadiff: foreign key validation (tables and columns) [#11944](https://github.com/vitessio/vitess/pull/11944) + * OnlineDDL: support --unsafe-allow-foreign-keys strategy flag [#11976](https://github.com/vitessio/vitess/pull/11976) + * support transaction isolation modification through reserved connection system settings [#11987](https://github.com/vitessio/vitess/pull/11987) + * **unsafe**: Online DDL support for `--unsafe-allow-foreign-keys` strategy flag [#11988](https://github.com/vitessio/vitess/pull/11988) + * vtgate advertised mysql server version to 8.0.31 [#11989](https://github.com/vitessio/vitess/pull/11989) + * schemadiff: normalize `PRIMARY KEY` definition [#12016](https://github.com/vitessio/vitess/pull/12016) + * schemadiff: validate and apply foreign key indexes [#12026](https://github.com/vitessio/vitess/pull/12026) + * OnlineDDL: 'mysql' strategy, managed by the scheduler, but executed via normal MySQL statements [#12027](https://github.com/vitessio/vitess/pull/12027) + * Refactor sqlparser.Rewrite uses [#12059](https://github.com/vitessio/vitess/pull/12059) + * Online DDL: --in-order-completion ddl strategy and logic [#12113](https://github.com/vitessio/vitess/pull/12113) + * schemadiff: TableCharsetCollateStrategy hint [#12137](https://github.com/vitessio/vitess/pull/12137) + * Support BETWEEN in the evalengine [#12150](https://github.com/vitessio/vitess/pull/12150) + * Use schema for the information_schema views [#12171](https://github.com/vitessio/vitess/pull/12171) + * vtgateconn: add DeregisterDialer hook [#12213](https://github.com/vitessio/vitess/pull/12213) + * add database name to _vt.views table [#12368](https://github.com/vitessio/vitess/pull/12368) + * Schema RPC to fetch table/view definition [#12375](https://github.com/vitessio/vitess/pull/12375) + * Change `GetSchema` RPC to return `CreateView` instead of `SelectStmt` [#12421](https://github.com/vitessio/vitess/pull/12421) + * GetSchema rpc to streaming api [#12447](https://github.com/vitessio/vitess/pull/12447) +#### TabletManager + * SidecarDB Init: don't fail on schema init errors [#12328](https://github.com/vitessio/vitess/pull/12328) +#### VReplication + * VReplication Copy Phase: Parallelize Bulk Inserts [#10828](https://github.com/vitessio/vitess/pull/10828) + * VSCopy: Resume the copy phase consistently from given GTID and lastpk [#11103](https://github.com/vitessio/vitess/pull/11103) + * For partial MoveTables, setup reverse shard routing rules on workflow creation [#11415](https://github.com/vitessio/vitess/pull/11415) + * Use unique rows in copy_state to support parallel replication [#11451](https://github.com/vitessio/vitess/pull/11451) + * Log which tablet copy_state optimization failed on [#11521](https://github.com/vitessio/vitess/pull/11521) + * Allow users to control VReplication DDL handling [#11532](https://github.com/vitessio/vitess/pull/11532) + * VReplication: Defer Secondary Index Creation [#11700](https://github.com/vitessio/vitess/pull/11700) + * VSCopy: Send COPY_COMPLETED events when the copy operation is done [#11740](https://github.com/vitessio/vitess/pull/11740) + * Add `VStreamerCount` stat to `vttablet` [#11978](https://github.com/vitessio/vitess/pull/11978) + * VReplication: Use MariaDB Compat JSON Functions [#12420](https://github.com/vitessio/vitess/pull/12420) +#### VTAdmin + * [VTAdmin] `Validate`, `ValidateShard`, `ValidateVersionShard`, `GetFullStatus` [#11438](https://github.com/vitessio/vitess/pull/11438) + * Full Status tab improvements for VTAdmin [#11470](https://github.com/vitessio/vitess/pull/11470) + * [15.0] Add VTGate debug/status page link to VTAdmin [#11541](https://github.com/vitessio/vitess/pull/11541) + * VTAdmin: display workflow type in workflows list [#11685](https://github.com/vitessio/vitess/pull/11685) +#### VTorc + * Timeout Fixes and VTOrc Improvement [#11881](https://github.com/vitessio/vitess/pull/11881) + * Also log error on a failure in DiscoverInstance [#11936](https://github.com/vitessio/vitess/pull/11936) + * VTOrc Code Cleanup - generate_base, replace cluster_name with keyspace and shard. [#12012](https://github.com/vitessio/vitess/pull/12012) + * Move vtorc from go-sqlite3 to modernc.org/sqlite [#12214](https://github.com/vitessio/vitess/pull/12214) +### Feature Request +#### Evalengine + * evalengine: Support built-in MySQL function for string functions and operations [#11185](https://github.com/vitessio/vitess/pull/11185) +#### Query Serving + * Add support for views in vtgate [#11195](https://github.com/vitessio/vitess/pull/11195) + * Add support for Views DDL [#11896](https://github.com/vitessio/vitess/pull/11896) + * notify view change to vtgate [#12115](https://github.com/vitessio/vitess/pull/12115) + * Views Support: Updating Views in VSchema for query serving [#12124](https://github.com/vitessio/vitess/pull/12124) + * Create Views allowed for same keyspace [#12409](https://github.com/vitessio/vitess/pull/12409) +#### web UI + * [VTAdmin] Topology Browser [#11496](https://github.com/vitessio/vitess/pull/11496) +### Internal Cleanup +#### Backup and Restore + * backup: remove deprecated hook support [#12066](https://github.com/vitessio/vitess/pull/12066) +#### Build/CI + * Update all the Go dependencies [#11741](https://github.com/vitessio/vitess/pull/11741) + * Remove building Docker containers with MariaDB [#12040](https://github.com/vitessio/vitess/pull/12040) + * Add TOC to the summary docs [#12225](https://github.com/vitessio/vitess/pull/12225) +#### CLI + * moved missed flags to pflags in vtgate [#11966](https://github.com/vitessio/vitess/pull/11966) + * Migrate missed vtctld flags to pflag and immediately deprecate them [#11974](https://github.com/vitessio/vitess/pull/11974) + * Remove Dead Legacy Workflow Manager Code [#12085](https://github.com/vitessio/vitess/pull/12085) +#### Cluster management + * Adding deprecate message to backup hooks [#11491](https://github.com/vitessio/vitess/pull/11491) + * Orchestrator Integration Removal and `orc_client_user` removal [#11503](https://github.com/vitessio/vitess/pull/11503) + * [15.0] Deprecate InitShardPrimary command [#11557](https://github.com/vitessio/vitess/pull/11557) + * mysqlctl is a command-line client so remove server flags [#12022](https://github.com/vitessio/vitess/pull/12022) + * Remove replication manager and run VTOrc in all e2e tests [#12149](https://github.com/vitessio/vitess/pull/12149) +#### General + * Improve Codeowners File [#11428](https://github.com/vitessio/vitess/pull/11428) + * Remove example script that caused some confusion [#11529](https://github.com/vitessio/vitess/pull/11529) + * Remove unused ioutil2 code [#11661](https://github.com/vitessio/vitess/pull/11661) + * Fix some linter errors [#11773](https://github.com/vitessio/vitess/pull/11773) + * Remove Deprecated flags, code and stats. [#12083](https://github.com/vitessio/vitess/pull/12083) + * Fix release notes on release-16.0 [#12276](https://github.com/vitessio/vitess/pull/12276) + * Fix summary and release notes [#12283](https://github.com/vitessio/vitess/pull/12283) + * Reorder summary in order of importance [#12433](https://github.com/vitessio/vitess/pull/12433) + * release notes: mark dynamic throttler configuration as experimental [#12475](https://github.com/vitessio/vitess/pull/12475) +#### Governance + * Correct minor inaccuracies in governing docs [#11933](https://github.com/vitessio/vitess/pull/11933) +#### Online DDL + * [cleanup] Explicitly include DDLStrategySetting in the sizegen target [#11857](https://github.com/vitessio/vitess/pull/11857) + * OnlineDDL: avoid schema_migrations AUTO_INCREMENT gaps by pre-checking for existing migration [#12169](https://github.com/vitessio/vitess/pull/12169) +#### Query Serving + * [gen4 planner] Operator refactoring [#11498](https://github.com/vitessio/vitess/pull/11498) + * [gen4]: small refactoring around Compact [#11537](https://github.com/vitessio/vitess/pull/11537) + * change CreatePhysicalOperator to use the rewriteBottomUp() functionality [#11542](https://github.com/vitessio/vitess/pull/11542) + * [refactor planner] Columns and predicates on operators [#11606](https://github.com/vitessio/vitess/pull/11606) + * Move initialization of metrics to be static [#11608](https://github.com/vitessio/vitess/pull/11608) + * planner operators refactoring [#11680](https://github.com/vitessio/vitess/pull/11680) + * sqlparser: new Equality API [#11906](https://github.com/vitessio/vitess/pull/11906) + * sqlparser: `QueryMatchesTemplates` uses canonical string [#11990](https://github.com/vitessio/vitess/pull/11990) + * Move more rewriting to SafeRewrite [#12063](https://github.com/vitessio/vitess/pull/12063) + * store transaction isolation level in upper case [#12099](https://github.com/vitessio/vitess/pull/12099) + * Generating copy-on-rewrite logic [#12135](https://github.com/vitessio/vitess/pull/12135) + * Clean up ColumnType uses [#12139](https://github.com/vitessio/vitess/pull/12139) +#### TabletManager + * Table GC: rely on tm state to determine operation mode [#11972](https://github.com/vitessio/vitess/pull/11972) + * Mark VReplicationExec Client Command as Deprecated [#12070](https://github.com/vitessio/vitess/pull/12070) +#### VReplication + * Leverage pFlag's Changed function to detect user specified flag [#11677](https://github.com/vitessio/vitess/pull/11677) + * VReplication: Remove Deprecated V1 Client Commands [#11705](https://github.com/vitessio/vitess/pull/11705) +#### VTAdmin + * move react-scripts to dev dependencies [#11767](https://github.com/vitessio/vitess/pull/11767) +#### web UI + * [vtctld2] Remove vtctld2 UI and vtctld server components that serve the app UI [#11851](https://github.com/vitessio/vitess/pull/11851) +### Performance +#### Cluster management + * Bug fix: Cache filtered out tablets in topology watcher to avoid unnecessary GetTablet calls to topo [#12194](https://github.com/vitessio/vitess/pull/12194) +#### Online DDL + * Speedup DDLs by not reloading table size stats [#11601](https://github.com/vitessio/vitess/pull/11601) +#### Query Serving + * DDL: do not Reload() for 'CREATE TEMPORARY' and 'DROP TEMPORARY' statements [#12144](https://github.com/vitessio/vitess/pull/12144) +#### VReplication + * mysql: Improve MySQL 5.6 GTID parsing performance [#11570](https://github.com/vitessio/vitess/pull/11570) +#### vttestserver + * vttestserver: make tablet_refresh_interval configurable and reduce default value [#11918](https://github.com/vitessio/vitess/pull/11918) +### Release +#### Build/CI + * Improve the release process [#12056](https://github.com/vitessio/vitess/pull/12056) + * Use Ubuntu 20.04 for Release Builds [#12202](https://github.com/vitessio/vitess/pull/12202) + * Use Ubuntu 20.04 for Release Builds [#12202](https://github.com/vitessio/vitess/pull/12202) +#### Documentation + * Fix release notes summary links [#11508](https://github.com/vitessio/vitess/pull/11508) + * Release notes summary of `14.0.4` [#11849](https://github.com/vitessio/vitess/pull/11849) + * Release notes for `v15.0.2` [#11963](https://github.com/vitessio/vitess/pull/11963) +#### General + * Release notes for 15.0.0-rc1 and update SNAPSHOT version to 16.0.0 [#11445](https://github.com/vitessio/vitess/pull/11445) + * fix anchors for release notes and summary [#11578](https://github.com/vitessio/vitess/pull/11578) + * update release notes after 15.0 [#11584](https://github.com/vitessio/vitess/pull/11584) + * Mention the `--db-config-*-*` flag in the release notes [#11610](https://github.com/vitessio/vitess/pull/11610) + * Release notes for 15.0.1 [#11850](https://github.com/vitessio/vitess/pull/11850) + * updating summary and release notes for v15.0.1 [#11852](https://github.com/vitessio/vitess/pull/11852) + * [main] Update the release `15.0.2` summary doc (#11954) [#11956](https://github.com/vitessio/vitess/pull/11956) + * Release of v16.0.0-rc1 [#12235](https://github.com/vitessio/vitess/pull/12235) + * Back to dev mode after v16.0.0-rc1 [#12277](https://github.com/vitessio/vitess/pull/12277) + * [release-16.0] Fix release script for the version in the docker script (#12284) [#12289](https://github.com/vitessio/vitess/pull/12289) + * Code freeze of release-16.0 for v16.0.0 [#12469](https://github.com/vitessio/vitess/pull/12469) +### Testing +#### Backup and Restore + * go/vt/mysqlctl: add compression benchmarks [#11994](https://github.com/vitessio/vitess/pull/11994) +#### Build/CI + * endtoend: fix race when closing vtgate [#11707](https://github.com/vitessio/vitess/pull/11707) + * [ci issue] Tests are running on older versions that do not support the query [#11923](https://github.com/vitessio/vitess/pull/11923) + * consolidating OnlineDDL 'singleton' tests into 'scheduler' tests: part 1 [#12055](https://github.com/vitessio/vitess/pull/12055) + * Internal: Fix Bad Merge [#12087](https://github.com/vitessio/vitess/pull/12087) + * add debug tooling [#12126](https://github.com/vitessio/vitess/pull/12126) + * Remove the semgrep action [#12148](https://github.com/vitessio/vitess/pull/12148) + * CI cleanup: remove onlineddl_declarative, onlineddl_singleton (cleanup part 2) [#12182](https://github.com/vitessio/vitess/pull/12182) + * Online DDL CI: consolidated revertible and revert CI tests (part 1) [#12183](https://github.com/vitessio/vitess/pull/12183) + * Allow manually kicking off CodeQL [#12200](https://github.com/vitessio/vitess/pull/12200) + * Don't keep data in upgrade-downgrade tests [#12462](https://github.com/vitessio/vitess/pull/12462) +#### General + * endtoend: fix dbconfig initialization for endtoend tests [#11609](https://github.com/vitessio/vitess/pull/11609) +#### Online DDL + * Backport to v16: onlineddl_vrepl flakiness and subsequent fixes [#12426](https://github.com/vitessio/vitess/pull/12426) +#### Query Serving + * Add additional unit test with state changes swapped [#11192](https://github.com/vitessio/vitess/pull/11192) + * Use JSON for plan tests [#11430](https://github.com/vitessio/vitess/pull/11430) + * Add a PRIMARY KEY to the aggregation E2E tests [#11459](https://github.com/vitessio/vitess/pull/11459) + * Change the indexes in `TestEmptyTableAggr` to be unique [#11485](https://github.com/vitessio/vitess/pull/11485) + * Readable plan tests [#11708](https://github.com/vitessio/vitess/pull/11708) + * test: deflake TestQueryTimeoutWithTables [#11772](https://github.com/vitessio/vitess/pull/11772) + * more unit tests for QueryMatchesTemplates() [#11894](https://github.com/vitessio/vitess/pull/11894) + * remove e2e test from partial_keyspace config [#12005](https://github.com/vitessio/vitess/pull/12005) +#### VReplication + * VDiff2: Migrate VDiff1 Unit Tests [#11916](https://github.com/vitessio/vitess/pull/11916) + * VReplication: Test Migrations From MariaDB to MySQL [#12036](https://github.com/vitessio/vitess/pull/12036) + diff --git a/changelog/16.0/16.0.0/release_notes.md b/changelog/16.0/16.0.0/release_notes.md new file mode 100644 index 00000000000..a9fdc0b47c0 --- /dev/null +++ b/changelog/16.0/16.0.0/release_notes.md @@ -0,0 +1,533 @@ +# Release of Vitess v16.0.0 +## Summary + +### Table of Contents + +- **[Known Issues](#known-issues)** + - [MySQL & Xtrabackup known issue](#mysql-xtrabackup-ddl) +- **[Major Changes](#major-changes)** + - **[Breaking Changes](#breaking-changes)** + - [VTGate Advertised MySQL Version](#advertised-mysql-version) + - [Default MySQL version on Docker](#default-mysql-version) + - [⚠️ Upgrading to this release with vitess-operator](#upgrading-to-this-release-with-vitess-operator) + - [Flag Deletions and Deprecations](#flag-deletions-and-deprecations) + - [VTCtld](#vtctld-flag-deletions-deprecations) + - [MySQLCtl](#mysqlctl-flag-deletions-deprecations) + - [VTTablet](#vttablet-flag-deletions-deprecations) + - [VTBackup](#vtbackup-flag-deletions-deprecations) + - [VTOrc](#vtorc-flag-deletions-deprecations) + - [`lock-timeout` and `remote_operation_timeout` Changes](#lock-timeout-introduction) + - [Orchestrator Integration Deletion](#orc-integration-removal) + - [vtctld UI Removal](#vtcltd-ui-removal) + - [Query Serving Errors](#qs-errors) + - [Logstats Table and Keyspace removed](#logstats-table-keyspace) + - [Removed Stats](#removed-stats) + - [Deprecated Stats](#deprecated-stats) + - [Normalized labels in the Prometheus Exporter](#normalized-lables) + - **[Replication manager removal and VTOrc becomes mandatory](#repl-manager-removal)** + - **[VReplication](#vreplication)** + - [VStream Copy Resume](#vstream-copy-resume) + - [VDiff2 GA](#vdiff2-ga) + - **[Tablet throttler](#tablet-throttler)** + - **[Incremental backup and point in time recovery](#inc-backup)** + - **[New command line flags and behavior](#new-flag)** + - [VTGate: Support query timeout --query-timeout](#vtgate-query-timeout) + - [VTTablet: VReplication parallel insert workers --vreplication-parallel-insert-workers](#vrepl-parallel-workers) + - [VTTablet: --queryserver-config-pool-conn-max-lifetime](#queryserver-lifetime) + - [vttablet --throttler-config-via-topo](#vttablet-throttler-config) + - [vtctldclient UpdateThrottlerConfig](#vtctldclient-update-throttler) + - [vtctldclient Backup --incremental_from_pos](#vtctldclient-backup) + - [vtctldclient RestoreFromBackup --restore_to_pos](#vtctldclient-restore-from-backup) + - [New `vexplain` command](#new-vexplain-command) + - **[Important bug fixes](#important-bug-fixes)** + - [Corrupted results for non-full-group-by queries with JOINs](#corrupted-results) + - **[Deprecations and Removals](#deprecations-removals)** + - **[MySQL Compatibility](#mysql-compatibility)** + - [Transaction Isolation Level](#transaction-isolation-level) + - [Transaction Access Mode](#transaction-access-mode) + - [Support for views](#support-views) + - **[VTTestServer](#vttestserver)** + - [Performance Improvement](#perf-improvement) +- **[Minor Changes](#minor-changes)** + - **[Backup compression benchmarks](#backup-comp-benchmarks)** +- **[Refactor](#refactor)** + - **[VTTablet sidecar schema maintenance refactor](#vttablet-sidecar-schema)** + +## Known Issues + +### MySQL & Xtrabackup known issue + +There is a known issue with MySQL's INSTANT DDL combined with Percona XtraBackup, that affects users of Vitess 16.0. +The problem is described in https://docs.percona.com/percona-xtrabackup/8.0/em/instant.html, and the immediate impact is you may not be able to backup your database using XtraBackup under certain conditions. + +As of MySQL 8.0.12, the default `ALGORITHM` for InnoDB's `ALTER TABLE` is `INSTANT`. In `8.0.12` only a small number of operations were eligible for `INSTANT`, but MySQL `8.0.29` added support for more common cases. +Unfortunately, the changes in `8.0.29` affect XtraBackup as follows: if you `ALTER TABLE` in MySQL `8.0.29`, and that `ALTER` is eligible for `INSTANT` DDL (e.g. add new table column), then as of that moment, XtraBackup is unable to backup that table, hence your entire database. + +It is important to note that even if you then upgrade your MySQL server to, e.g. `8.0.32`, the table still cannot be backed up. + +Versions where XtraBackup is unable to backup such tables: MySQL `8.0.29` - `8.0.31`. This does not apply to Percona Server flavor. + +The issue is resolved with Percona XtraBackup `8.0.32` combined with MySQL `8.0.32`. + +You might be affected if: + +- You're using MySQL `8.0.29` - `8.0.31` and are using XtraBackup to backup your database +- and, you have issued an `ALTER TABLE`, either directly, or using Online DDL in vitess `v16.0` and below + +A futures Vitess patch release `v16.0.1` will address the issue via Online DDL migrations. + +#### Mitigations + +- Use Percona XtraBackup `8.0.32` combined with MySQL `8.0.32`. To go with this option, you can use the docker image `vitess/lite:v16.0.0-mysql-8.0.32`. +- or, Use a Percona Server flavor +- or, always ensure to add `ALGORITHM=INPLACE` or `ALGORITHM=COPY` to your `ALTER TABLE` statements + +#### Workarounds + +If you have already been affected, these are the options to be able to backup your database: + +- Use `builtin` backups, see https://vitess.io/docs/15.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup/. `builting` backups are not based on XtraBackup. +- Upgrade to MySQL `8.0.32` or above and to Xtrabackup `8.0.32`, or switch to Percona Server. To go with this option, you can use the docker image `vitess/lite:v16.0.0-mysql-8.0.32`. Then rebuild the table directly via: + - `OPTIMIZE TABLE your_table` + - or, `ALTER TABLE your_table ENGINE=INNOB` +- Upgrade to Vitess patch release `v16.0.1`, upgrade to MySQL `8.0.32` or above and to Xtrabackup `8.0.32`, or switch to Percona Server, and rebuild the table via Online DDL: +```shell +$ vtctldclient ApplySchema --skip_preflight --ddl_strategy "vitess" --sql "ALTER TABLE your_table ENGINE=InnoDB" your_keyspace +``` +or +```sql +> SET @@ddl_strategy='vitess'; +> ALTER TABLE your_table ENGINE=InnoDB; +``` + +## Major Changes + +### Breaking Changes + +#### VTGate Advertised MySQL Version + +Since [Pull Request #11989](https://github.com/vitessio/vitess/pull/11989), VTGate advertises MySQL version 8.0.30. This is a breaking change for clients that rely on the VTGate advertised MySQL version and still use MySQL 5.7. +The users can set the `mysql_server_version` flag to advertise the correct version. + +#### Default MySQL version on Docker + +The default major MySQL version used by our `vitess/lite:latest` image is going from `5.7` to `8.0`. Additionally, the patch version of MySQL80 has been upgraded from `8.0.23` to `8.0.30`. +This change was brought by [Pull Request #12252](https://github.com/vitessio/vitess/pull/12252). + +#### ⚠️Upgrading to this release with vitess-operator + +If you are using the vitess-operator and want to remain on MySQL 5.7, **you are required** to use the `vitess/lite:v16.0.0-mysql57` Docker Image, otherwise the `vitess/lite:v16.0.0` image will be on MySQL 80. + +However, if you are running MySQL 8.0 on the vitess-operator, with for instance `vitess/lite:v15.0.2-mysql80`, considering that we are bumping the patch version of MySQL 80 from `8.0.23` to `8.0.30`, you will have to manually upgrade: + +1. Add `innodb_fast_shutdown=0` to your extra cnf in your YAML file. +2. Apply this file. +3. Wait for all the pods to be healthy. +4. Then change your YAML file to use the new Docker Images (`vitess/lite:v16.0.0`, defaults to mysql80). +5. Remove `innodb_fast_shutdown=0` from your extra cnf in your YAML file. +6. Apply this file. + +#### Flag Deletions and Deprecations + +##### VTCtld +With the removal of the vtctld UI, the following vtctld flags have been deprecated: +- `--vtctld_show_topology_crud`: This was a flag that controlled the display of CRUD topology actions in the vtctld UI. The UI is removed, so this flag is no longer necessary. + +The following deprecated flags have also been removed: +- `--enable_realtime_stats` +- `--enable_vtctld_ui` +- `--web_dir` +- `--web_dir2` +- `--workflow_manager_init` +- `--workflow_manager_use_election` +- `--workflow_manager_disable` + +##### MySQLCtld + +The [`mysqlctl` command-line client](https://vitess.io/docs/16.0/reference/programs/mysqlctl/) had some leftover (ignored) server flags after the [v15 pflag work](https://github.com/vitessio/enhancements/blob/main/veps/vep-4.md). Those unused flags have now been removed. If you are using any of the following flags with `mysqlctl` in your scripts or other tooling, they will need to be removed prior to upgrading to v16: +`--port --grpc_auth_static_client_creds --grpc_compression --grpc_initial_conn_window_size --grpc_initial_window_size --grpc_keepalive_time --grpc_keepalive_timeout` + +##### VTTablet + +The following flags were removed in v16: +- `--enable_semi_sync` +- `--backup_storage_hook`, use one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. +- `--init_populate_metadata`, since we have deleted the `local_metadata` and `shard_metadata` sidecar database tables. + +The flag `--disable-replication-manager` is deprecated and will be removed in a future release. + +##### VTBackup + +The VTBackup flag `--backup_storage_hook` has been removed, use one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. + + +##### VTOrc + +The flag `--lock-shard-timeout` has been deprecated. Please use the newly introduced `--lock-timeout` flag instead. More detail [here](#lock-timeout-introduction). + +#### `lock-timeout` and `remote_operation_timeout` Changes + +Before the changes made in [Pull Request #11881](https://github.com/vitessio/vitess/pull/11881), the shard and keyspace locks used to be capped by the `remote_operation_timeout`. This is no longer the case and instead a new flag called `lock-timeout` is introduced. +For backward compatibility, if `lock-timeout` is unspecified and `remote_operation_timeout` flag is provided, then its value will also be used for `lock-timeout`. +The default value for `remote_operation_timeout` has also changed from 30 seconds to 15 seconds. The default for the new flag `lock-timeout` is 45 seconds. + +During upgrades, if the users want to preserve the same behaviour as previous releases, then they should provide the `remote_operation_timeout` flag explicitly before upgrading. +After the upgrade, they should then alter their configuration to also specify `lock-timeout` explicitly. + +#### Orchestrator Integration Deletion + +Orchestrator integration in `vttablet` was deprecated in the previous release and is deleted in this release. +`VTOrc` should be deployed instead. You can read more on [how VTOrc is designed](https://vitess.io/docs/16.0/reference/vtorc/) and on [how to run VTOrc in production](https://vitess.io/docs/16.0/user-guides/configuration-basic/vtorc/). + +#### vtctld web UI Removal +In v13, the vtctld UI was deprecated. As of this release, the `web/vtctld2` directory is deleted and the UI will no longer be included in any Vitess images going forward. All build scripts and the Makefile have been updated to reflect this change, which was done in [Pull Request #11851](https://github.com/vitessio/vitess/pull/11851) + +However, the vtctld HTTP API will remain at `{$vtctld_web_port}/api`. + +#### Query Serving Errors + +In [Pull Request #10738](https://github.com/vitessio/vitess/pull/10738) we are introducing a new way to report errors from Vitess through the query interface. +Errors will now have an error code for each error, which will make it easy to search for more information on the issue. +For instance, the following error: + +``` +aggregate functions take a single argument 'count(user_id, name)' +``` + +Will be transformed into: + +``` +VT03001: aggregate functions take a single argument 'count(user_id, name)' +``` + +The error code `VT03001` can then be used to search or ask for help and report problems. + +If you have code searching for error strings from Vitess, this is a breaking change. +Many error strings have been tweaked. +If your application is searching for specific errors, you might need to update your code. + +#### Logstats Table and Keyspace removed + +Information about which tables are used is now reported by the field TablesUsed added in v15, that is a string array, listing all tables and which keyspace they are in. +The Table/Keyspace fields were deprecated in v15 and are now removed in the v16 release, more information can be found on [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). + +#### Removed Stats + +The stat `QueryRowCounts` is removed in v16 as part of [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). `QueryRowsAffected` and `QueryRowsReturned` can be used instead to gather the same information. + +#### Deprecated Stats + +The stats `QueriesProcessed` and `QueriesRouted` are deprecated in v16 as part of [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). The same information can be inferred from the stats `QueriesProcessedByTable` and `QueriesRoutedByTable` respectively. These stats will be removed in the next release. + +#### Normalized labels in the Prometheus Exporter + +The Prometheus metrics exporter now properly normalizes _all_ label names into their `snake_case` form, as it is idiomatic for Prometheus metrics. Previously, Vitess instances were emitting inconsistent labels for their metrics, with some of them being `CamelCase` and others being `snake_case`. +More information about this change can be found on [Pull Request #12057](https://github.com/vitessio/vitess/pull/12057). + +For example, `vtgate_topology_watcher_errors{Operation="GetTablet"} 0` will become `vtgate_topology_watcher_errors{operation="GetTablet"} 0` + +Some more of these changes are listed here - + +| Previous metric | New Metric | +|-------------------------------------------------------------|-------------------------------------------------------------| +| vtgate_topology_watcher_operations{Operation="AddTablet"} | vtgate_topology_watcher_operations{operation="AddTablet"} | +| vtgate_queries_processed{Plan="Reference"} | vtgate_queries_processed{plan="Reference"} | +| vtgate_queries_routed{Plan="Reference"} | vtgate_queries_routed{plan="Reference"} | +| vttablet_table_allocated_size{Table="corder"} | vttablet_table_allocated_size{table="corder"} | +| vttablet_table_file_size{Table="corder"} | vttablet_table_file_size{table="corder"} | +| vttablet_topology_watcher_errors{Operation="GetTablet"} | vttablet_topology_watcher_errors{operation="GetTablet"} | +| vttablet_topology_watcher_operations{Operation="AddTablet"} | vttablet_topology_watcher_operations{operation="AddTablet"} | + +### Replication manager removal and VTOrc becomes mandatory +VTOrc is now a **required** component of Vitess starting from v16. If the users want Vitess to manage replication, then they must run VTOrc. +Replication manager is removed from vttablets since the responsibility of fixing replication lies entirely with VTOrc now. +The flag `disable-replication-manager` is deprecated and will be removed in a future release. + +### VReplication + +#### VStream Copy Resume + +In [Pull Request #11103](https://github.com/vitessio/vitess/pull/11103) we introduced the ability to resume a `VTGate` [`VStream` copy operation](https://vitess.io/docs/16.0/reference/vreplication/vstream/). This is useful when a [`VStream` copy operation](https://vitess.io/docs/16.0/reference/vreplication/vstream/) is interrupted due to e.g. a network failure or a server restart. The `VStream` copy operation can be resumed by specifying each table's last seen primary key value in the `VStream` request. Please see the [`VStream` docs](https://vitess.io/docs/16.0/reference/vreplication/vstream/) for more details. + +#### VDiff2 GA + +We are marking [VDiff v2](https://vitess.io/docs/16.0/reference/vreplication/vdiff2/) as production-ready in v16. We now recommend that you use v2 rather than v1 going forward. V1 will be deprecated and eventually removed in future releases. +If you wish to use v1 for any reason, you will now need to specify the `--v1` flag. + +### Tablet throttler + +The tablet throttler can now be configured dynamically. Configuration is now found in the topo service, and applies to all tablets in all shards and cells of a given keyspace. +It is possible to enable or disable throttling, and to change the throttling threshold as well as the throttler query. + +Please note that this feature is considered experimental in this release. For backwards compatibility `v16` still supports `vttablet`-based command line flags for throttler configuration. + +More information can be found on [Pull Request #11604](https://github.com/vitessio/vitess/pull/11604). + +### Incremental backup and point in time recovery + +In [Pull Request #11097](https://github.com/vitessio/vitess/pull/11097) we introduced native incremental backup and point in time recovery: + +- It is possible to take an incremental backup, starting with last known (full or incremental) backup, and up to either a specified (GTID) position, or current ("auto") position. +- The backup is done by copying binary logs. The binary logs are rotated as needed. +- It is then possible to restore a backup up to a given point in time (GTID position). This involves finding a restore path consisting of a full backup and zero or more incremental backups, applied up to the given point in time. +- A server restored to a point in time remains in `DRAINED` tablet type, and does not join the replication stream (thus, "frozen" in time). +- It is possible to take incremental backups from different tablets. It is OK to have overlaps in incremental backup contents. The restore process chooses a valid path, and is valid as long as there are no gaps in the backed up binary log content. + +### New command line flags and behavior + +#### VTGate: Support query timeout --query-timeout + +`--query-timeout` allows you to specify a timeout for queries. This timeout is applied to all queries. +It can be overridden by setting the `query_timeout` session variable. +Setting it as query comment directive with `QUERY_TIMEOUT_MS` will override other values. + +#### VTTablet: VReplication parallel insert workers --vreplication-parallel-insert-workers + +`--vreplication-parallel-insert-workers=[integer]` enables parallel bulk inserts during the copy phase +of VReplication (disabled by default). When set to a value greater than 1 the bulk inserts — each +executed as a single transaction from the vstream packet contents — may happen in-parallel and +out-of-order, but the commit of those transactions are still serialized in order. + +Other aspects of the VReplication copy-phase logic are preserved: + + 1. All statements executed when processing a vstream packet occur within a single MySQL transaction. + 2. Writes to `_vt.copy_state` always follow their corresponding inserts from within the vstream packet. + 3. The final `commit` for the vstream packet always follows the corresponding write to `_vt.copy_state`. + 4. The vstream packets are committed in the order seen in the stream. So for any PK1 and PK2, the write to `_vt.copy_state` and `commit` steps (steps 2 and 3 above) for PK1 will both precede the `_vt.copy_state` write and commit steps of PK2. + + Other phases, catchup, fast-forward, and replicating/"running", are unchanged. + +#### VTTablet: --queryserver-config-pool-conn-max-lifetime + +`--queryserver-config-pool-conn-max-lifetime=[integer]` allows you to set a timeout on each connection in the query server connection pool. It chooses a random value between its value and twice its value, and when a connection has lived longer than the chosen value, it'll be removed from the pool the next time it's returned to the pool. + +#### vttablet --throttler-config-via-topo + +The flag `--throttler-config-via-topo` switches throttler configuration from `vttablet`-flags to the topo service. This flag is `false` by default, for backwards compatibility. It will default to `true` in future versions. + +#### vtctldclient UpdateThrottlerConfig + +Tablet throttler configuration is now supported in `topo`. Updating the throttler configuration is done via `vtctldclient UpdateThrottlerConfig` and applies to all tablet in all cells for a given keyspace. + +Examples: + +```shell +# disable throttler; all throttler checks will return with "200 OK" +$ vtctldclient UpdateThrottlerConfig --disable commerce + +# enable throttler; checks are responded with appropriate status per current metrics +$ vtctldclient UpdateThrottlerConfig --enable commerce + +# Both enable and set threshold in same command. Since no query is indicated, we assume the default check for replication lag +$ vtctldclient UpdateThrottlerConfig --enable --threshold 5.0 commerce + +# Change threshold. Does not affect enabled/disabled state of the throttler +$ vtctldclient UpdateThrottlerConfig --threshold 1.5 commerce + +# Use a custom query +$ vtctldclient UpdateThrottlerConfig --custom_query "show global status like 'threads_running'" --check_as_check_self --threshold 50 commerce + +# Restore default query and threshold +$ vtctldclient UpdateThrottlerConfig --custom_query "" --check_as_check_shard --threshold 1.5 commerce +``` + +See https://github.com/vitessio/vitess/pull/11604 + +#### vtctldclient Backup --incremental_from_pos + +The `Backup` command now supports `--incremental_from_pos` flag, which can receive a valid position or the value `auto`. For example: + +```shell +$ vtctlclient -- Backup --incremental_from_pos "MySQL56/16b1039f-22b6-11ed-b765-0a43f95f28a3:1-615" zone1-0000000102 +$ vtctlclient -- Backup --incremental_from_pos "auto" zone1-0000000102 +``` + +When the value is `auto`, the position is evaluated as the last successful backup's `Position`. The idea with incremental backups is to create a contiguous (overlaps allowed) sequence of backups that store all changes from last full backup. + +The incremental backup copies binary log files. It does not take MySQL down nor places any locks. It does not interrupt traffic on the MySQL server. The incremental backup copies complete binlog files. It initially rotates binary logs, then copies anything from the requested position and up to the last completed binary log. + +The backup thus does not necessarily start _exactly_ at the requested position. It starts with the first binary log that has newer entries than requested position. It is OK if the binary logs include transactions prior to the requested position. The restore process will discard any duplicates. + +Normally, you can expect the backups to be precisely contiguous. Consider an `auto` value: due to the nature of log rotation and the fact we copy complete binlog files, the next incremental backup will start with the first binay log not covered by the previous backup, which in itself copied the one previous binlog file in full. Again, it is completely valid to enter any good position. + +The incremental backup fails if it is unable to attain binary logs from given position (ie binary logs have been purged). + +The manifest of an incremental backup has a non-empty `FromPosition` value, and a `Incremental = true` value. + +#### vtctldclient RestoreFromBackup --restore_to_pos + +- `--restore_to_pos`: request to restore the server up to the given position (inclusive) and not one step further. +- `--dry_run`: when `true`, calculate the restore process, if possible, evaluate a path, but exit without actually making any changes to the server. + +Examples: + +```shell +$ vtctlclient -- RestoreFromBackup --restore_to_pos "MySQL56/16b1039f-22b6-11ed-b765-0a43f95f28a3:1-220" zone1-0000000102 +``` + +The restore process seeks a restore _path_: a sequence of backups (handles/manifests) consisting of one full backup followed by zero or more incremental backups, that can bring the server up to the requested position, inclusive. + +The command fails if it cannot evaluate a restore path. Possible reasons: + +- there's gaps in the incremental backups +- existing backups don't reach as far as requested position +- all full backups exceed requested position (so there's no way to get into an ealier position) + +The command outputs the restore path. + +There may be multiple restore paths, the command prefers a path with the least number of backups. This has nothing to say about the amount and size of binary logs involved. + +The `RestoreFromBackup --restore_to_pos` ends with: + +- the restored server in intentionally broken replication setup +- tablet type is `DRAINED` + +#### New `vexplain` command +A new `vexplain` command has been introduced with the following syntax: +``` +VEXPLAIN [ALL|QUERIES|PLAN] explainable_stmt +``` + +This command will help users look at the plan that vtgate comes up with for the given query (`PLAN` type), see all the queries that are executed on all the MySQL instances (`QUERIES` type), and see the vtgate plan along with the MySQL explain output for the executed queries (`ALL` type). + +The formats `VTEXPLAIN` and `VITESS` for `EXPLAIN` queries are deprecated, and these newly introduced commands should be used instead. + +### Important bug fixes + +#### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). + +### Deprecations and Removals + +- The V3 planner is deprecated as of the v16 release, and will be removed in the v17 release of Vitess. + +- The [VReplication v1 commands](https://vitess.io/docs/15.0/reference/vreplication/v1/) — which were deprecated in Vitess 11.0 — have been removed. You will need to use the [VReplication v2 commands](https://vitess.io/docs/16.0/reference/vreplication/v2/) instead. + +- The `vtctlclient VExec` command was removed, having been deprecated since v12. + +- The `vtctlclient VReplicationExec` command has now been deprecated and will be removed in a future release. Please see [#12070](https://github.com/vitessio/vitess/pull/12070) for additional details. + +- `vtctlclient OnlineDDL ... [complete|retry|cancel|cancel-all]` returns empty result on success instead of number of shard affected. + +- The dead legacy Workflow Manager related code was removed in [#12085](https://github.com/vitessio/vitess/pull/12085). This included the following `vtctl` client commands: `WorkflowAction`, `WorkflowCreate`, `WorkflowWait`, `WorkflowStart`, `WorkflowStop`, `WorkflowTree`, `WorkflowDelete`. + +- VTAdmin's `VTExplain` endpoint has been deprecated. Users can use the new `vexplain` query format instead. The endpoint will be deleted in a future release. + +### MySQL Compatibility + +#### Transaction Isolation Level + +In [Pull Request #11704](https://github.com/vitessio/vitess/pull/11704) we are adding support for `set [session] transaction isolation level ` + +```sql +transaction_characteristic: { + ISOLATION LEVEL level + | access_mode +} + +level: { + REPEATABLE READ + | READ COMMITTED + | READ UNCOMMITTED + | SERIALIZABLE +} +``` + +This will set the transaction isolation level for the current session. +This will be applied to any shard where the session will open a transaction. + +#### Transaction Access Mode + +In [Pull Request #11704](https://github.com/vitessio/vitess/pull/11704) we are adding support for `start transaction` with transaction characteristic. + +```sql +START TRANSACTION + [transaction_characteristic [, transaction_characteristic] ...] + +transaction_characteristic: { + WITH CONSISTENT SNAPSHOT + | READ WRITE + | READ ONLY +} +``` + +This will allow users to start a transaction with these characteristics. + +#### Support For Views + +Views sharded support is released as an experimental feature in `v16.0.0`. +Views are not enabled by default in your Vitess cluster, but they can be turned on using the `--enable-views` flag on VTGate, and `--queryserver-enable-views` flag on VTTablet. + +To read more on how views are implemented you can read the [Views Support RFC](https://github.com/vitessio/vitess/issues/11559). +And if you want to learn more on how to use views and its current limitations, you can read the [Views Documentation](https://vitess.io/docs/16.0/reference/compatibility/mysql-compatibility/#views). + +### VTTestServer + +#### Performance Improvement + +Creating a database with vttestserver was taking ~45 seconds. This can be problematic in test environments where testcases do a lot of `create` and `drop` database. +In an effort to minimize the database creation time, in [Pull Request #11918](https://github.com/vitessio/vitess/pull/11918) we have changed the value of `tablet_refresh_interval` to 10s while instantiating vtcombo during vttestserver initialization. We have also made this configurable so that it can be reduced further if desired. +For any production cluster the default value of this flag is still [1 minute](https://vitess.io/docs/16.0/reference/programs/vtgate/). Reducing this value might put more stress on Topo Server (since we now read from Topo server more often) but for testing purposes +this shouldn't be a concern. + +## Minor changes + +### Backup Compression Benchmarks + +Compression benchmarks have been added to the `mysqlctl` package. + +The benchmarks fetch and compress a ~6 GiB tar file containing 3 InnoDB files using different built-in and external compressors. + +Here are sample results from a 2020-era Mac M1 with 16 GiB of memory: + +```sh +$ go test -bench=BenchmarkCompress ./go/vt/mysqlctl -run=NONE -timeout=12h -benchtime=1x -v +goos: darwin +goarch: arm64 +pkg: vitess.io/vitess/go/vt/mysqlctl +BenchmarkCompressLz4Builtin + compression_benchmark_test.go:310: downloading data from https://www.dropbox.com/s/raw/smmgifsooy5qytd/enwiki-20080103-pages-articles.ibd.tar.zst + BenchmarkCompressLz4Builtin-8 1 11737493087 ns/op 577.98 MB/s 2.554 compression-ratio + BenchmarkCompressPargzipBuiltin + BenchmarkCompressPargzipBuiltin-8 1 31083784040 ns/op 218.25 MB/s 2.943 compression-ratio + BenchmarkCompressPgzipBuiltin + BenchmarkCompressPgzipBuiltin-8 1 13325299680 ns/op 509.11 MB/s 2.910 compression-ratio + BenchmarkCompressZstdBuiltin + BenchmarkCompressZstdBuiltin-8 1 18683863911 ns/op 363.09 MB/s 3.150 compression-ratio + BenchmarkCompressZstdExternal + BenchmarkCompressZstdExternal-8 1 10795487675 ns/op 628.41 MB/s 3.093 compression-ratio + BenchmarkCompressZstdExternalFast4 + BenchmarkCompressZstdExternalFast4-8 1 7139319009 ns/op 950.23 MB/s 2.323 compression-ratio + BenchmarkCompressZstdExternalT0 + BenchmarkCompressZstdExternalT0-8 1 4393860434 ns/op 1543.97 MB/s 3.093 compression-ratio + BenchmarkCompressZstdExternalT4 + BenchmarkCompressZstdExternalT4-8 1 4389559744 ns/op 1545.49 MB/s 3.093 compression-ratio + PASS + cleaning up "/var/folders/96/k7gzd7q10zdb749vr02q7sjh0000gn/T/ee7d47b45ef09786c54fa2d7354d2a68.dat" +``` + +## Refactor + +### VTTablet Sidecar Schema Maintenance Refactor + +This is an internal refactor and should not change the behavior of Vitess as seen by users. + +Developers will see a difference though: v16 changes the way we maintain vttablet's sidecar database schema (also referred to as the `_vt` +database). Instead of using the `WithDDL` package, introduced in [PR #6348](https://github.com/vitessio/vitess/pull/6348), we use a +declarative approach. Developers will now have to update the desired schema in the `go/vt/sidecardb/schema` directory. + +The desired schema is specified, one per table. A new module `sidecardb`, compares this to the existing schema and +performs the required `create` or `alter` to reach it. This is done whenever a primary vttablet starts up. + +The sidecar tables `local_metadata` and `shard_metadata` are no longer in use and all references to them are removed as +part of this refactor. They were used previously for Orchestrator support, which has been superseded by `vtorc`. + +------------ +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/16.0/16.0.0/changelog.md). + +The release includes 378 commits (excluding merges) + +Thanks to all our contributors: @EmadMokhtar, @GuptaManan100, @Weijun-H, @WilliamLu99, @ajm188, @arthurschreiber, @arvind-murty, @brendar, @brirams, @dbussink, @deepthi, @dependabot[bot], @draftcode, @ejortegau, @frouioui, @harshit-gangal, @jjh-kim, @johanoskarsson, @kbslvsk, @mattlord, @maxenglander, @mdlayher, @notfelineit, @pbibra, @pudiva, @rohit-nayak-ps, @rsajwani, @shlomi-noach, @systay, @timvaillancourt, @vitess-bot[bot], @vmg, @yoheimuta + diff --git a/changelog/16.0/16.0.0/summary.md b/changelog/16.0/16.0.0/summary.md new file mode 100644 index 00000000000..7a14f2533b7 --- /dev/null +++ b/changelog/16.0/16.0.0/summary.md @@ -0,0 +1,524 @@ +## Summary + +### Table of Contents + +- **[Known Issues](#known-issues)** + - [MySQL & Xtrabackup known issue](#mysql-xtrabackup-ddl) +- **[Major Changes](#major-changes)** + - **[Breaking Changes](#breaking-changes)** + - [VTGate Advertised MySQL Version](#advertised-mysql-version) + - [Default MySQL version on Docker](#default-mysql-version) + - [⚠️ Upgrading to this release with vitess-operator](#upgrading-to-this-release-with-vitess-operator) + - [Flag Deletions and Deprecations](#flag-deletions-and-deprecations) + - [VTCtld](#vtctld-flag-deletions-deprecations) + - [MySQLCtl](#mysqlctl-flag-deletions-deprecations) + - [VTTablet](#vttablet-flag-deletions-deprecations) + - [VTBackup](#vtbackup-flag-deletions-deprecations) + - [VTOrc](#vtorc-flag-deletions-deprecations) + - [`lock-timeout` and `remote_operation_timeout` Changes](#lock-timeout-introduction) + - [Orchestrator Integration Deletion](#orc-integration-removal) + - [vtctld UI Removal](#vtcltd-ui-removal) + - [Query Serving Errors](#qs-errors) + - [Logstats Table and Keyspace removed](#logstats-table-keyspace) + - [Removed Stats](#removed-stats) + - [Deprecated Stats](#deprecated-stats) + - [Normalized labels in the Prometheus Exporter](#normalized-lables) + - **[Replication manager removal and VTOrc becomes mandatory](#repl-manager-removal)** + - **[VReplication](#vreplication)** + - [VStream Copy Resume](#vstream-copy-resume) + - [VDiff2 GA](#vdiff2-ga) + - **[Tablet throttler](#tablet-throttler)** + - **[Incremental backup and point in time recovery](#inc-backup)** + - **[New command line flags and behavior](#new-flag)** + - [VTGate: Support query timeout --query-timeout](#vtgate-query-timeout) + - [VTTablet: VReplication parallel insert workers --vreplication-parallel-insert-workers](#vrepl-parallel-workers) + - [VTTablet: --queryserver-config-pool-conn-max-lifetime](#queryserver-lifetime) + - [vttablet --throttler-config-via-topo](#vttablet-throttler-config) + - [vtctldclient UpdateThrottlerConfig](#vtctldclient-update-throttler) + - [vtctldclient Backup --incremental_from_pos](#vtctldclient-backup) + - [vtctldclient RestoreFromBackup --restore_to_pos](#vtctldclient-restore-from-backup) + - [New `vexplain` command](#new-vexplain-command) + - **[Important bug fixes](#important-bug-fixes)** + - [Corrupted results for non-full-group-by queries with JOINs](#corrupted-results) + - **[Deprecations and Removals](#deprecations-removals)** + - **[MySQL Compatibility](#mysql-compatibility)** + - [Transaction Isolation Level](#transaction-isolation-level) + - [Transaction Access Mode](#transaction-access-mode) + - [Support for views](#support-views) + - **[VTTestServer](#vttestserver)** + - [Performance Improvement](#perf-improvement) +- **[Minor Changes](#minor-changes)** + - **[Backup compression benchmarks](#backup-comp-benchmarks)** +- **[Refactor](#refactor)** + - **[VTTablet sidecar schema maintenance refactor](#vttablet-sidecar-schema)** + +## Known Issues + +### MySQL & Xtrabackup known issue + +There is a known issue with MySQL's INSTANT DDL combined with Percona XtraBackup, that affects users of Vitess 16.0. +The problem is described in https://docs.percona.com/percona-xtrabackup/8.0/em/instant.html, and the immediate impact is you may not be able to backup your database using XtraBackup under certain conditions. + +As of MySQL 8.0.12, the default `ALGORITHM` for InnoDB's `ALTER TABLE` is `INSTANT`. In `8.0.12` only a small number of operations were eligible for `INSTANT`, but MySQL `8.0.29` added support for more common cases. +Unfortunately, the changes in `8.0.29` affect XtraBackup as follows: if you `ALTER TABLE` in MySQL `8.0.29`, and that `ALTER` is eligible for `INSTANT` DDL (e.g. add new table column), then as of that moment, XtraBackup is unable to backup that table, hence your entire database. + +It is important to note that even if you then upgrade your MySQL server to, e.g. `8.0.32`, the table still cannot be backed up. + +Versions where XtraBackup is unable to backup such tables: MySQL `8.0.29` - `8.0.31`. This does not apply to Percona Server flavor. + +The issue is resolved with Percona XtraBackup `8.0.32` combined with MySQL `8.0.32`. + +You might be affected if: + +- You're using MySQL `8.0.29` - `8.0.31` and are using XtraBackup to backup your database +- and, you have issued an `ALTER TABLE`, either directly, or using Online DDL in vitess `v16.0` and below + +A futures Vitess patch release `v16.0.1` will address the issue via Online DDL migrations. + +#### Mitigations + +- Use Percona XtraBackup `8.0.32` combined with MySQL `8.0.32`. To go with this option, you can use the docker image `vitess/lite:v16.0.0-mysql-8.0.32`. +- or, Use a Percona Server flavor +- or, always ensure to add `ALGORITHM=INPLACE` or `ALGORITHM=COPY` to your `ALTER TABLE` statements + +#### Workarounds + +If you have already been affected, these are the options to be able to backup your database: + +- Use `builtin` backups, see https://vitess.io/docs/15.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup/. `builting` backups are not based on XtraBackup. +- Upgrade to MySQL `8.0.32` or above and to Xtrabackup `8.0.32`, or switch to Percona Server. To go with this option, you can use the docker image `vitess/lite:v16.0.0-mysql-8.0.32`. Then rebuild the table directly via: + - `OPTIMIZE TABLE your_table` + - or, `ALTER TABLE your_table ENGINE=INNOB` +- Upgrade to Vitess patch release `v16.0.1`, upgrade to MySQL `8.0.32` or above and to Xtrabackup `8.0.32`, or switch to Percona Server, and rebuild the table via Online DDL: +```shell +$ vtctldclient ApplySchema --skip_preflight --ddl_strategy "vitess" --sql "ALTER TABLE your_table ENGINE=InnoDB" your_keyspace +``` +or +```sql +> SET @@ddl_strategy='vitess'; +> ALTER TABLE your_table ENGINE=InnoDB; +``` + +## Major Changes + +### Breaking Changes + +#### VTGate Advertised MySQL Version + +Since [Pull Request #11989](https://github.com/vitessio/vitess/pull/11989), VTGate advertises MySQL version 8.0.30. This is a breaking change for clients that rely on the VTGate advertised MySQL version and still use MySQL 5.7. +The users can set the `mysql_server_version` flag to advertise the correct version. + +#### Default MySQL version on Docker + +The default major MySQL version used by our `vitess/lite:latest` image is going from `5.7` to `8.0`. Additionally, the patch version of MySQL80 has been upgraded from `8.0.23` to `8.0.30`. +This change was brought by [Pull Request #12252](https://github.com/vitessio/vitess/pull/12252). + +#### ⚠️Upgrading to this release with vitess-operator + +If you are using the vitess-operator and want to remain on MySQL 5.7, **you are required** to use the `vitess/lite:v16.0.0-mysql57` Docker Image, otherwise the `vitess/lite:v16.0.0` image will be on MySQL 80. + +However, if you are running MySQL 8.0 on the vitess-operator, with for instance `vitess/lite:v15.0.2-mysql80`, considering that we are bumping the patch version of MySQL 80 from `8.0.23` to `8.0.30`, you will have to manually upgrade: + +1. Add `innodb_fast_shutdown=0` to your extra cnf in your YAML file. +2. Apply this file. +3. Wait for all the pods to be healthy. +4. Then change your YAML file to use the new Docker Images (`vitess/lite:v16.0.0`, defaults to mysql80). +5. Remove `innodb_fast_shutdown=0` from your extra cnf in your YAML file. +6. Apply this file. + +#### Flag Deletions and Deprecations + +##### VTCtld +With the removal of the vtctld UI, the following vtctld flags have been deprecated: +- `--vtctld_show_topology_crud`: This was a flag that controlled the display of CRUD topology actions in the vtctld UI. The UI is removed, so this flag is no longer necessary. + +The following deprecated flags have also been removed: +- `--enable_realtime_stats` +- `--enable_vtctld_ui` +- `--web_dir` +- `--web_dir2` +- `--workflow_manager_init` +- `--workflow_manager_use_election` +- `--workflow_manager_disable` + +##### MySQLCtld + +The [`mysqlctl` command-line client](https://vitess.io/docs/16.0/reference/programs/mysqlctl/) had some leftover (ignored) server flags after the [v15 pflag work](https://github.com/vitessio/enhancements/blob/main/veps/vep-4.md). Those unused flags have now been removed. If you are using any of the following flags with `mysqlctl` in your scripts or other tooling, they will need to be removed prior to upgrading to v16: +`--port --grpc_auth_static_client_creds --grpc_compression --grpc_initial_conn_window_size --grpc_initial_window_size --grpc_keepalive_time --grpc_keepalive_timeout` + +##### VTTablet + +The following flags were removed in v16: +- `--enable_semi_sync` +- `--backup_storage_hook`, use one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. +- `--init_populate_metadata`, since we have deleted the `local_metadata` and `shard_metadata` sidecar database tables. + +The flag `--disable-replication-manager` is deprecated and will be removed in a future release. + +##### VTBackup + +The VTBackup flag `--backup_storage_hook` has been removed, use one of the builtin compression algorithms or `--external-compressor` and `--external-decompressor` instead. + + +##### VTOrc + +The flag `--lock-shard-timeout` has been deprecated. Please use the newly introduced `--lock-timeout` flag instead. More detail [here](#lock-timeout-introduction). + +#### `lock-timeout` and `remote_operation_timeout` Changes + +Before the changes made in [Pull Request #11881](https://github.com/vitessio/vitess/pull/11881), the shard and keyspace locks used to be capped by the `remote_operation_timeout`. This is no longer the case and instead a new flag called `lock-timeout` is introduced. +For backward compatibility, if `lock-timeout` is unspecified and `remote_operation_timeout` flag is provided, then its value will also be used for `lock-timeout`. +The default value for `remote_operation_timeout` has also changed from 30 seconds to 15 seconds. The default for the new flag `lock-timeout` is 45 seconds. + +During upgrades, if the users want to preserve the same behaviour as previous releases, then they should provide the `remote_operation_timeout` flag explicitly before upgrading. +After the upgrade, they should then alter their configuration to also specify `lock-timeout` explicitly. + +#### Orchestrator Integration Deletion + +Orchestrator integration in `vttablet` was deprecated in the previous release and is deleted in this release. +`VTOrc` should be deployed instead. You can read more on [how VTOrc is designed](https://vitess.io/docs/16.0/reference/vtorc/) and on [how to run VTOrc in production](https://vitess.io/docs/16.0/user-guides/configuration-basic/vtorc/). + +#### vtctld web UI Removal +In v13, the vtctld UI was deprecated. As of this release, the `web/vtctld2` directory is deleted and the UI will no longer be included in any Vitess images going forward. All build scripts and the Makefile have been updated to reflect this change, which was done in [Pull Request #11851](https://github.com/vitessio/vitess/pull/11851) + +However, the vtctld HTTP API will remain at `{$vtctld_web_port}/api`. + +#### Query Serving Errors + +In [Pull Request #10738](https://github.com/vitessio/vitess/pull/10738) we are introducing a new way to report errors from Vitess through the query interface. +Errors will now have an error code for each error, which will make it easy to search for more information on the issue. +For instance, the following error: + +``` +aggregate functions take a single argument 'count(user_id, name)' +``` + +Will be transformed into: + +``` +VT03001: aggregate functions take a single argument 'count(user_id, name)' +``` + +The error code `VT03001` can then be used to search or ask for help and report problems. + +If you have code searching for error strings from Vitess, this is a breaking change. +Many error strings have been tweaked. +If your application is searching for specific errors, you might need to update your code. + +#### Logstats Table and Keyspace removed + +Information about which tables are used is now reported by the field TablesUsed added in v15, that is a string array, listing all tables and which keyspace they are in. +The Table/Keyspace fields were deprecated in v15 and are now removed in the v16 release, more information can be found on [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). + +#### Removed Stats + +The stat `QueryRowCounts` is removed in v16 as part of [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). `QueryRowsAffected` and `QueryRowsReturned` can be used instead to gather the same information. + +#### Deprecated Stats + +The stats `QueriesProcessed` and `QueriesRouted` are deprecated in v16 as part of [Pull Request #12083](https://github.com/vitessio/vitess/pull/12083). The same information can be inferred from the stats `QueriesProcessedByTable` and `QueriesRoutedByTable` respectively. These stats will be removed in the next release. + +#### Normalized labels in the Prometheus Exporter + +The Prometheus metrics exporter now properly normalizes _all_ label names into their `snake_case` form, as it is idiomatic for Prometheus metrics. Previously, Vitess instances were emitting inconsistent labels for their metrics, with some of them being `CamelCase` and others being `snake_case`. +More information about this change can be found on [Pull Request #12057](https://github.com/vitessio/vitess/pull/12057). + +For example, `vtgate_topology_watcher_errors{Operation="GetTablet"} 0` will become `vtgate_topology_watcher_errors{operation="GetTablet"} 0` + +Some more of these changes are listed here - + +| Previous metric | New Metric | +|-------------------------------------------------------------|-------------------------------------------------------------| +| vtgate_topology_watcher_operations{Operation="AddTablet"} | vtgate_topology_watcher_operations{operation="AddTablet"} | +| vtgate_queries_processed{Plan="Reference"} | vtgate_queries_processed{plan="Reference"} | +| vtgate_queries_routed{Plan="Reference"} | vtgate_queries_routed{plan="Reference"} | +| vttablet_table_allocated_size{Table="corder"} | vttablet_table_allocated_size{table="corder"} | +| vttablet_table_file_size{Table="corder"} | vttablet_table_file_size{table="corder"} | +| vttablet_topology_watcher_errors{Operation="GetTablet"} | vttablet_topology_watcher_errors{operation="GetTablet"} | +| vttablet_topology_watcher_operations{Operation="AddTablet"} | vttablet_topology_watcher_operations{operation="AddTablet"} | + +### Replication manager removal and VTOrc becomes mandatory +VTOrc is now a **required** component of Vitess starting from v16. If the users want Vitess to manage replication, then they must run VTOrc. +Replication manager is removed from vttablets since the responsibility of fixing replication lies entirely with VTOrc now. +The flag `disable-replication-manager` is deprecated and will be removed in a future release. + +### VReplication + +#### VStream Copy Resume + +In [Pull Request #11103](https://github.com/vitessio/vitess/pull/11103) we introduced the ability to resume a `VTGate` [`VStream` copy operation](https://vitess.io/docs/16.0/reference/vreplication/vstream/). This is useful when a [`VStream` copy operation](https://vitess.io/docs/16.0/reference/vreplication/vstream/) is interrupted due to e.g. a network failure or a server restart. The `VStream` copy operation can be resumed by specifying each table's last seen primary key value in the `VStream` request. Please see the [`VStream` docs](https://vitess.io/docs/16.0/reference/vreplication/vstream/) for more details. + +#### VDiff2 GA + +We are marking [VDiff v2](https://vitess.io/docs/16.0/reference/vreplication/vdiff2/) as production-ready in v16. We now recommend that you use v2 rather than v1 going forward. V1 will be deprecated and eventually removed in future releases. +If you wish to use v1 for any reason, you will now need to specify the `--v1` flag. + +### Tablet throttler + +The tablet throttler can now be configured dynamically. Configuration is now found in the topo service, and applies to all tablets in all shards and cells of a given keyspace. +It is possible to enable or disable throttling, and to change the throttling threshold as well as the throttler query. + +Please note that this feature is considered experimental in this release. For backwards compatibility `v16` still supports `vttablet`-based command line flags for throttler configuration. + +More information can be found on [Pull Request #11604](https://github.com/vitessio/vitess/pull/11604). + +### Incremental backup and point in time recovery + +In [Pull Request #11097](https://github.com/vitessio/vitess/pull/11097) we introduced native incremental backup and point in time recovery: + +- It is possible to take an incremental backup, starting with last known (full or incremental) backup, and up to either a specified (GTID) position, or current ("auto") position. +- The backup is done by copying binary logs. The binary logs are rotated as needed. +- It is then possible to restore a backup up to a given point in time (GTID position). This involves finding a restore path consisting of a full backup and zero or more incremental backups, applied up to the given point in time. +- A server restored to a point in time remains in `DRAINED` tablet type, and does not join the replication stream (thus, "frozen" in time). +- It is possible to take incremental backups from different tablets. It is OK to have overlaps in incremental backup contents. The restore process chooses a valid path, and is valid as long as there are no gaps in the backed up binary log content. + +### New command line flags and behavior + +#### VTGate: Support query timeout --query-timeout + +`--query-timeout` allows you to specify a timeout for queries. This timeout is applied to all queries. +It can be overridden by setting the `query_timeout` session variable. +Setting it as query comment directive with `QUERY_TIMEOUT_MS` will override other values. + +#### VTTablet: VReplication parallel insert workers --vreplication-parallel-insert-workers + +`--vreplication-parallel-insert-workers=[integer]` enables parallel bulk inserts during the copy phase +of VReplication (disabled by default). When set to a value greater than 1 the bulk inserts — each +executed as a single transaction from the vstream packet contents — may happen in-parallel and +out-of-order, but the commit of those transactions are still serialized in order. + +Other aspects of the VReplication copy-phase logic are preserved: + + 1. All statements executed when processing a vstream packet occur within a single MySQL transaction. + 2. Writes to `_vt.copy_state` always follow their corresponding inserts from within the vstream packet. + 3. The final `commit` for the vstream packet always follows the corresponding write to `_vt.copy_state`. + 4. The vstream packets are committed in the order seen in the stream. So for any PK1 and PK2, the write to `_vt.copy_state` and `commit` steps (steps 2 and 3 above) for PK1 will both precede the `_vt.copy_state` write and commit steps of PK2. + + Other phases, catchup, fast-forward, and replicating/"running", are unchanged. + +#### VTTablet: --queryserver-config-pool-conn-max-lifetime + +`--queryserver-config-pool-conn-max-lifetime=[integer]` allows you to set a timeout on each connection in the query server connection pool. It chooses a random value between its value and twice its value, and when a connection has lived longer than the chosen value, it'll be removed from the pool the next time it's returned to the pool. + +#### vttablet --throttler-config-via-topo + +The flag `--throttler-config-via-topo` switches throttler configuration from `vttablet`-flags to the topo service. This flag is `false` by default, for backwards compatibility. It will default to `true` in future versions. + +#### vtctldclient UpdateThrottlerConfig + +Tablet throttler configuration is now supported in `topo`. Updating the throttler configuration is done via `vtctldclient UpdateThrottlerConfig` and applies to all tablet in all cells for a given keyspace. + +Examples: + +```shell +# disable throttler; all throttler checks will return with "200 OK" +$ vtctldclient UpdateThrottlerConfig --disable commerce + +# enable throttler; checks are responded with appropriate status per current metrics +$ vtctldclient UpdateThrottlerConfig --enable commerce + +# Both enable and set threshold in same command. Since no query is indicated, we assume the default check for replication lag +$ vtctldclient UpdateThrottlerConfig --enable --threshold 5.0 commerce + +# Change threshold. Does not affect enabled/disabled state of the throttler +$ vtctldclient UpdateThrottlerConfig --threshold 1.5 commerce + +# Use a custom query +$ vtctldclient UpdateThrottlerConfig --custom_query "show global status like 'threads_running'" --check_as_check_self --threshold 50 commerce + +# Restore default query and threshold +$ vtctldclient UpdateThrottlerConfig --custom_query "" --check_as_check_shard --threshold 1.5 commerce +``` + +See https://github.com/vitessio/vitess/pull/11604 + +#### vtctldclient Backup --incremental_from_pos + +The `Backup` command now supports `--incremental_from_pos` flag, which can receive a valid position or the value `auto`. For example: + +```shell +$ vtctlclient -- Backup --incremental_from_pos "MySQL56/16b1039f-22b6-11ed-b765-0a43f95f28a3:1-615" zone1-0000000102 +$ vtctlclient -- Backup --incremental_from_pos "auto" zone1-0000000102 +``` + +When the value is `auto`, the position is evaluated as the last successful backup's `Position`. The idea with incremental backups is to create a contiguous (overlaps allowed) sequence of backups that store all changes from last full backup. + +The incremental backup copies binary log files. It does not take MySQL down nor places any locks. It does not interrupt traffic on the MySQL server. The incremental backup copies complete binlog files. It initially rotates binary logs, then copies anything from the requested position and up to the last completed binary log. + +The backup thus does not necessarily start _exactly_ at the requested position. It starts with the first binary log that has newer entries than requested position. It is OK if the binary logs include transactions prior to the requested position. The restore process will discard any duplicates. + +Normally, you can expect the backups to be precisely contiguous. Consider an `auto` value: due to the nature of log rotation and the fact we copy complete binlog files, the next incremental backup will start with the first binay log not covered by the previous backup, which in itself copied the one previous binlog file in full. Again, it is completely valid to enter any good position. + +The incremental backup fails if it is unable to attain binary logs from given position (ie binary logs have been purged). + +The manifest of an incremental backup has a non-empty `FromPosition` value, and a `Incremental = true` value. + +#### vtctldclient RestoreFromBackup --restore_to_pos + +- `--restore_to_pos`: request to restore the server up to the given position (inclusive) and not one step further. +- `--dry_run`: when `true`, calculate the restore process, if possible, evaluate a path, but exit without actually making any changes to the server. + +Examples: + +```shell +$ vtctlclient -- RestoreFromBackup --restore_to_pos "MySQL56/16b1039f-22b6-11ed-b765-0a43f95f28a3:1-220" zone1-0000000102 +``` + +The restore process seeks a restore _path_: a sequence of backups (handles/manifests) consisting of one full backup followed by zero or more incremental backups, that can bring the server up to the requested position, inclusive. + +The command fails if it cannot evaluate a restore path. Possible reasons: + +- there's gaps in the incremental backups +- existing backups don't reach as far as requested position +- all full backups exceed requested position (so there's no way to get into an ealier position) + +The command outputs the restore path. + +There may be multiple restore paths, the command prefers a path with the least number of backups. This has nothing to say about the amount and size of binary logs involved. + +The `RestoreFromBackup --restore_to_pos` ends with: + +- the restored server in intentionally broken replication setup +- tablet type is `DRAINED` + +#### New `vexplain` command +A new `vexplain` command has been introduced with the following syntax: +``` +VEXPLAIN [ALL|QUERIES|PLAN] explainable_stmt +``` + +This command will help users look at the plan that vtgate comes up with for the given query (`PLAN` type), see all the queries that are executed on all the MySQL instances (`QUERIES` type), and see the vtgate plan along with the MySQL explain output for the executed queries (`ALL` type). + +The formats `VTEXPLAIN` and `VITESS` for `EXPLAIN` queries are deprecated, and these newly introduced commands should be used instead. + +### Important bug fixes + +#### Corrupted results for non-full-group-by queries with JOINs + +An issue in versions `<= v14.0.3` and `<= v15.0.0` that generated corrupted results for non-full-group-by queries with a JOIN +is now fixed. The full issue can be found [here](https://github.com/vitessio/vitess/issues/11625), and its fix [here](https://github.com/vitessio/vitess/pull/11633). + +### Deprecations and Removals + +- The V3 planner is deprecated as of the v16 release, and will be removed in the v17 release of Vitess. + +- The [VReplication v1 commands](https://vitess.io/docs/15.0/reference/vreplication/v1/) — which were deprecated in Vitess 11.0 — have been removed. You will need to use the [VReplication v2 commands](https://vitess.io/docs/16.0/reference/vreplication/v2/) instead. + +- The `vtctlclient VExec` command was removed, having been deprecated since v12. + +- The `vtctlclient VReplicationExec` command has now been deprecated and will be removed in a future release. Please see [#12070](https://github.com/vitessio/vitess/pull/12070) for additional details. + +- `vtctlclient OnlineDDL ... [complete|retry|cancel|cancel-all]` returns empty result on success instead of number of shard affected. + +- The dead legacy Workflow Manager related code was removed in [#12085](https://github.com/vitessio/vitess/pull/12085). This included the following `vtctl` client commands: `WorkflowAction`, `WorkflowCreate`, `WorkflowWait`, `WorkflowStart`, `WorkflowStop`, `WorkflowTree`, `WorkflowDelete`. + +- VTAdmin's `VTExplain` endpoint has been deprecated. Users can use the new `vexplain` query format instead. The endpoint will be deleted in a future release. + +### MySQL Compatibility + +#### Transaction Isolation Level + +In [Pull Request #11704](https://github.com/vitessio/vitess/pull/11704) we are adding support for `set [session] transaction isolation level ` + +```sql +transaction_characteristic: { + ISOLATION LEVEL level + | access_mode +} + +level: { + REPEATABLE READ + | READ COMMITTED + | READ UNCOMMITTED + | SERIALIZABLE +} +``` + +This will set the transaction isolation level for the current session. +This will be applied to any shard where the session will open a transaction. + +#### Transaction Access Mode + +In [Pull Request #11704](https://github.com/vitessio/vitess/pull/11704) we are adding support for `start transaction` with transaction characteristic. + +```sql +START TRANSACTION + [transaction_characteristic [, transaction_characteristic] ...] + +transaction_characteristic: { + WITH CONSISTENT SNAPSHOT + | READ WRITE + | READ ONLY +} +``` + +This will allow users to start a transaction with these characteristics. + +#### Support For Views + +Views sharded support is released as an experimental feature in `v16.0.0`. +Views are not enabled by default in your Vitess cluster, but they can be turned on using the `--enable-views` flag on VTGate, and `--queryserver-enable-views` flag on VTTablet. + +To read more on how views are implemented you can read the [Views Support RFC](https://github.com/vitessio/vitess/issues/11559). +And if you want to learn more on how to use views and its current limitations, you can read the [Views Documentation](https://vitess.io/docs/16.0/reference/compatibility/mysql-compatibility/#views). + +### VTTestServer + +#### Performance Improvement + +Creating a database with vttestserver was taking ~45 seconds. This can be problematic in test environments where testcases do a lot of `create` and `drop` database. +In an effort to minimize the database creation time, in [Pull Request #11918](https://github.com/vitessio/vitess/pull/11918) we have changed the value of `tablet_refresh_interval` to 10s while instantiating vtcombo during vttestserver initialization. We have also made this configurable so that it can be reduced further if desired. +For any production cluster the default value of this flag is still [1 minute](https://vitess.io/docs/16.0/reference/programs/vtgate/). Reducing this value might put more stress on Topo Server (since we now read from Topo server more often) but for testing purposes +this shouldn't be a concern. + +## Minor changes + +### Backup Compression Benchmarks + +Compression benchmarks have been added to the `mysqlctl` package. + +The benchmarks fetch and compress a ~6 GiB tar file containing 3 InnoDB files using different built-in and external compressors. + +Here are sample results from a 2020-era Mac M1 with 16 GiB of memory: + +```sh +$ go test -bench=BenchmarkCompress ./go/vt/mysqlctl -run=NONE -timeout=12h -benchtime=1x -v +goos: darwin +goarch: arm64 +pkg: vitess.io/vitess/go/vt/mysqlctl +BenchmarkCompressLz4Builtin + compression_benchmark_test.go:310: downloading data from https://www.dropbox.com/s/raw/smmgifsooy5qytd/enwiki-20080103-pages-articles.ibd.tar.zst + BenchmarkCompressLz4Builtin-8 1 11737493087 ns/op 577.98 MB/s 2.554 compression-ratio + BenchmarkCompressPargzipBuiltin + BenchmarkCompressPargzipBuiltin-8 1 31083784040 ns/op 218.25 MB/s 2.943 compression-ratio + BenchmarkCompressPgzipBuiltin + BenchmarkCompressPgzipBuiltin-8 1 13325299680 ns/op 509.11 MB/s 2.910 compression-ratio + BenchmarkCompressZstdBuiltin + BenchmarkCompressZstdBuiltin-8 1 18683863911 ns/op 363.09 MB/s 3.150 compression-ratio + BenchmarkCompressZstdExternal + BenchmarkCompressZstdExternal-8 1 10795487675 ns/op 628.41 MB/s 3.093 compression-ratio + BenchmarkCompressZstdExternalFast4 + BenchmarkCompressZstdExternalFast4-8 1 7139319009 ns/op 950.23 MB/s 2.323 compression-ratio + BenchmarkCompressZstdExternalT0 + BenchmarkCompressZstdExternalT0-8 1 4393860434 ns/op 1543.97 MB/s 3.093 compression-ratio + BenchmarkCompressZstdExternalT4 + BenchmarkCompressZstdExternalT4-8 1 4389559744 ns/op 1545.49 MB/s 3.093 compression-ratio + PASS + cleaning up "/var/folders/96/k7gzd7q10zdb749vr02q7sjh0000gn/T/ee7d47b45ef09786c54fa2d7354d2a68.dat" +``` + +## Refactor + +### VTTablet Sidecar Schema Maintenance Refactor + +This is an internal refactor and should not change the behavior of Vitess as seen by users. + +Developers will see a difference though: v16 changes the way we maintain vttablet's sidecar database schema (also referred to as the `_vt` +database). Instead of using the `WithDDL` package, introduced in [PR #6348](https://github.com/vitessio/vitess/pull/6348), we use a +declarative approach. Developers will now have to update the desired schema in the `go/vt/sidecardb/schema` directory. + +The desired schema is specified, one per table. A new module `sidecardb`, compares this to the existing schema and +performs the required `create` or `alter` to reach it. This is done whenever a primary vttablet starts up. + +The sidecar tables `local_metadata` and `shard_metadata` are no longer in use and all references to them are removed as +part of this refactor. They were used previously for Orchestrator support, which has been superseded by `vtorc`. diff --git a/changelog/16.0/README.md b/changelog/16.0/README.md new file mode 100644 index 00000000000..342df67eaea --- /dev/null +++ b/changelog/16.0/README.md @@ -0,0 +1,5 @@ +## v16.0 +The dedicated team for this release can be found [here](team.md). +* **[16.0.0](16.0.0)** + * [Changelog](16.0.0/changelog.md) + * [Release Notes](16.0.0/release_notes.md) diff --git a/changelog/16.0/team.md b/changelog/16.0/team.md new file mode 100644 index 00000000000..76b11c38145 --- /dev/null +++ b/changelog/16.0/team.md @@ -0,0 +1,5 @@ +## Release Team for v16 + +- **Lead:** Manan Gupta ([GuptaManan100](https://github.com/GuptaManan100)) manan@planetscale.com +- **Shadow:** Matt Lord ([mattlord](https://github.com/mattlord)) mlord@planetscale.com +- **Mentor:** Florent Poinsard ([frouioui](https://github.com/frouioui)) florent@planetscale.com \ No newline at end of file diff --git a/changelog/17.0/17.0.0/summary.md b/changelog/17.0/17.0.0/summary.md new file mode 100644 index 00000000000..01bde438688 --- /dev/null +++ b/changelog/17.0/17.0.0/summary.md @@ -0,0 +1,229 @@ +## Summary + +### Table of Contents + +- **[Major Changes](#major-changes)** + - **[Breaking Changes](#breaking-changes)** + - [Dedicated stats for VTGate Prepare operations](#dedicated-vtgate-prepare-stats) + - **[New command line flags and behavior](#new-flag)** + - [Builtin backup: read buffering flags](#builtin-backup-read-buffering-flags) + - **[New stats](#new-stats)** + - [Detailed backup and restore stats](#detailed-backup-and-restore-stats) + - [VTtablet Error count with code ](#vttablet-error-count-with-code) + - **[Deprecations and Deletions](#deprecations-and-deletions)** + - [Deprecated Stats](#deprecated-stats) + - **[VTTablet](#vttablet)** + - [VTTablet: Initializing all replicas with super_read_only](#vttablet-initialization) + - [Deprecated Flags](#deprecated-flags) + +## Major Changes + +### Breaking Changes + +#### Default TLS version changed for `vtgr` + +When using TLS with `vtgr`, we now default to TLS 1.2 if no other explicit version is configured. Configuration flags are provided to explicitly configure the minimum TLS version to be used. + +#### Dedicated stats for VTGate Prepare operations + +Prior to v17 Vitess incorrectly combined stats for VTGate Execute and Prepare operations under a single stats key (`Execute`). In v17 Execute and Prepare operations generate stats under independent stats keys. + +Here is a (condensed) example of stats output: + +``` +{ + "VtgateApi": { + "Histograms": { + "Execute.src.primary": { + "500000": 5 + }, + "Prepare.src.primary": { + "100000000": 0 + } + } + }, + "VtgateApiErrorCounts": { + "Execute.src.primary.INVALID_ARGUMENT": 3, + "Execute.src.primary.ALREADY_EXISTS": 1 + } +} +``` + +### New command line flags and behavior + +#### Backup --builtinbackup-file-read-buffer-size and --builtinbackup-file-write-buffer-size + +Prior to v17 the builtin Backup Engine does not use read buffering for restores, and for backups uses a hardcoded write buffer size of 2097152 bytes. + +In v17 these defaults may be tuned with, respectively `--builtinbackup-file-read-buffer-size` and `--builtinbackup-file-write-buffer-size`. + +- `--builtinbackup-file-read-buffer-size`: read files using an IO buffer of this many bytes. Golang defaults are used when set to 0. +- `--builtinbackup-file-write-buffer-size`: write files using an IO buffer of this many bytes. Golang defaults are used when set to 0. (default 2097152) + +These flags are applicable to the following programs: + +- `vtbackup` +- `vtctld` +- `vttablet` +- `vttestserver` + +### New stats + +#### Detailed backup and restore stats + +##### Backup metrics + +Metrics related to backup operations are available in both Vtbackup and VTTablet. + +**BackupBytes, BackupCount, BackupDurationNanoseconds** + +Depending on the Backup Engine and Backup Storage in-use, a backup may be a complex pipeline of operations, including but not limited to: + +* Reading files from disk. +* Compressing files. +* Uploading compress files to cloud object storage. + +These operations are counted and timed, and the number of bytes consumed or produced by each stage of the pipeline are counted as well. + +##### Restore metrics + +Metrics related to restore operations are available in both Vtbackup and VTTablet. + +**RestoreBytes, RestoreCount, RestoreDurationNanoseconds** + +Depending on the Backup Engine and Backup Storage in-use, a restore may be a complex pipeline of operations, including but not limited to: + +* Downloading compressed files from cloud object storage. +* Decompressing files. +* Writing decompressed files to disk. + +These operations are counted and timed, and the number of bytes consumed or produced by each stage of the pipeline are counted as well. + +##### Vtbackup metrics + +Vtbackup exports some metrics which are not available elsewhere. + +**DurationByPhaseSeconds** + +Vtbackup fetches the last backup, restores it to an empty mysql installation, replicates recent changes into that installation, and then takes a backup of that installation. + +_DurationByPhaseSeconds_ exports timings for these individual phases. + +##### Example + +**A snippet of vtbackup metrics after running it against the local example after creating the initial cluster** + +(Processed with `jq` for readability.) + +``` +{ + "BackupBytes": { + "BackupEngine.Builtin.Source:Read": 4777, + "BackupEngine.Builtin.Compressor:Write": 4616, + "BackupEngine.Builtin.Destination:Write": 162, + "BackupStorage.File.File:Write": 163 + }, + "BackupCount": { + "-.-.Backup": 1, + "BackupEngine.Builtin.Source:Open": 161, + "BackupEngine.Builtin.Source:Close": 322, + "BackupEngine.Builtin.Compressor:Close": 161, + "BackupEngine.Builtin.Destination:Open": 161, + "BackupEngine.Builtin.Destination:Close": 322 + }, + "BackupDurationNanoseconds": { + "-.-.Backup": 4188508542, + "BackupEngine.Builtin.Source:Open": 10649832, + "BackupEngine.Builtin.Source:Read": 55901067, + "BackupEngine.Builtin.Source:Close": 960826, + "BackupEngine.Builtin.Compressor:Write": 278358826, + "BackupEngine.Builtin.Compressor:Close": 79358372, + "BackupEngine.Builtin.Destination:Open": 16456627, + "BackupEngine.Builtin.Destination:Write": 11021043, + "BackupEngine.Builtin.Destination:Close": 17144630, + "BackupStorage.File.File:Write": 10743169 + }, + "DurationByPhaseSeconds": { + "InitMySQLd": 2, + "RestoreLastBackup": 6, + "CatchUpReplication": 1, + "TakeNewBackup": 4 + }, + "RestoreBytes": { + "BackupEngine.Builtin.Source:Read": 1095, + "BackupEngine.Builtin.Decompressor:Read": 950, + "BackupEngine.Builtin.Destination:Write": 209, + "BackupStorage.File.File:Read": 1113 + }, + "RestoreCount": { + "-.-.Restore": 1, + "BackupEngine.Builtin.Source:Open": 161, + "BackupEngine.Builtin.Source:Close": 322, + "BackupEngine.Builtin.Decompressor:Close": 161, + "BackupEngine.Builtin.Destination:Open": 161, + "BackupEngine.Builtin.Destination:Close": 322 + }, + "RestoreDurationNanoseconds": { + "-.-.Restore": 6204765541, + "BackupEngine.Builtin.Source:Open": 10542539, + "BackupEngine.Builtin.Source:Read": 104658370, + "BackupEngine.Builtin.Source:Close": 773038, + "BackupEngine.Builtin.Decompressor:Read": 165692120, + "BackupEngine.Builtin.Decompressor:Close": 51040, + "BackupEngine.Builtin.Destination:Open": 22715122, + "BackupEngine.Builtin.Destination:Write": 41679581, + "BackupEngine.Builtin.Destination:Close": 26954624, + "BackupStorage.File.File:Read": 102416075 + }, + "backup_duration_seconds": 4, + "restore_duration_seconds": 6 +} +``` + +Some notes to help understand these metrics: + +* `BackupBytes["BackupStorage.File.File:Write"]` measures how many bytes were read from disk by the `file` Backup Storage implementation during the backup phase. +* `DurationByPhaseSeconds["CatchUpReplication"]` measures how long it took to catch-up replication after the restore phase. +* `DurationByPhaseSeconds["RestoreLastBackup"]` measures to the duration of the restore phase. +* `RestoreDurationNanoseconds["-.-.Restore"]` also measures to the duration of the restore phase. + +#### VTTablet error count with error code + +##### VTTablet Error Count + +We are introducing new error counter `QueryErrorCountsWithCode` for VTTablet. It is similar to existing [QueryErrorCounts](https://github.com/vitessio/vitess/blob/main/go/vt/vttablet/tabletserver/query_engine.go#L174) except it contains errorCode as additional dimension. +We will deprecate `QueryErrorCounts` in v18. + +## Deprecations and Deletions + +* The deprecated `automation` and `automationservice` protobuf definitions and associated client and server packages have been removed. +* Auto-population of DDL revert actions and tables at execution-time has been removed. This is now handled entirely at enqueue-time. +* Backwards-compatibility for failed migrations without a `completed_timestamp` has been removed (see https://github.com/vitessio/vitess/issues/8499). +* The deprecated `Key`, `Name`, `Up`, and `TabletExternallyReparentedTimestamp` fields were removed from the JSON representation of `TabletHealth` structures. + +### Deprecated Stats + +These stats are deprecated in v17. + +| Deprecated stat | Supported alternatives | +|-|-| +| `backup_duration_seconds` | `BackupDurationNanoseconds` | +| `restore_duration_seconds` | `RestoreDurationNanoseconds` | + + +### VTTablet +#### Initializing all replicas with super_read_only +In order to prevent SUPER privileged users like `root` or `vt_dba` from producing errant GTIDs on replicas, all the replica MySQL servers are initialized with the MySQL +global variable `super_read_only` value set to `ON`. During failovers, we set `super_read_only` to `OFF` for the promoted primary tablet. This will allow the +primary to accept writes. All of the shard's tablets, except the current primary, will still have their global variable `super_read_only` set to `ON`. This will make sure that apart from +MySQL replication no other component, offline system or operator can write directly to a replica. + +Reference PR for this change is [PR #12206](https://github.com/vitessio/vitess/pull/12206) + +An important note regarding this change is how the default `init_db.sql` file has changed. +This is even more important if you are running Vitess on the vitess-operator. +You must ensure your `init_db.sql` is up-to-date with the new default for `v17.0.0`. +The default file can be found in `./config/init_db.sql`. + +#### Deprecated Flags +The flag `use_super_read_only` is deprecated and will be removed in a later release. diff --git a/changelog/17.0/README.md b/changelog/17.0/README.md new file mode 100644 index 00000000000..66ade1ffaf4 --- /dev/null +++ b/changelog/17.0/README.md @@ -0,0 +1,2 @@ +## v17.0 +* **[17.0.0](17.0.0)** diff --git a/doc/releasenotes/7_0_0_release_notes.md b/changelog/7.0/7.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/7_0_0_release_notes.md rename to changelog/7.0/7.0.0/release_notes.md diff --git a/doc/releasenotes/7_0_1_release_notes.md b/changelog/7.0/7.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/7_0_1_release_notes.md rename to changelog/7.0/7.0.1/release_notes.md diff --git a/doc/releasenotes/7_0_2_release_notes.md b/changelog/7.0/7.0.2/release_notes.md similarity index 100% rename from doc/releasenotes/7_0_2_release_notes.md rename to changelog/7.0/7.0.2/release_notes.md diff --git a/doc/releasenotes/7_0_3_release_notes.md b/changelog/7.0/7.0.3/release_notes.md similarity index 100% rename from doc/releasenotes/7_0_3_release_notes.md rename to changelog/7.0/7.0.3/release_notes.md diff --git a/changelog/7.0/README.md b/changelog/7.0/README.md new file mode 100644 index 00000000000..7177c6be673 --- /dev/null +++ b/changelog/7.0/README.md @@ -0,0 +1,12 @@ +## v7.0 +* **[7.0.3](7.0.3)** + * [Release Notes](7.0.3/release_notes.md) + +* **[7.0.2](7.0.2)** + * [Release Notes](7.0.2/release_notes.md) + +* **[7.0.1](7.0.1)** + * [Release Notes](7.0.1/release_notes.md) + +* **[7.0.0](7.0.0)** + * [Release Notes](7.0.0/release_notes.md) diff --git a/doc/releasenotes/8_0_0_release_notes.md b/changelog/8.0/8.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/8_0_0_release_notes.md rename to changelog/8.0/8.0.0/release_notes.md diff --git a/changelog/8.0/README.md b/changelog/8.0/README.md new file mode 100644 index 00000000000..fa359e7302f --- /dev/null +++ b/changelog/8.0/README.md @@ -0,0 +1,3 @@ +## v8.0 +* **[8.0.0](8.0.0)** + * [Release Notes](8.0.0/release_notes.md) diff --git a/doc/releasenotes/9_0_0_release_notes.md b/changelog/9.0/9.0.0/release_notes.md similarity index 100% rename from doc/releasenotes/9_0_0_release_notes.md rename to changelog/9.0/9.0.0/release_notes.md diff --git a/doc/releasenotes/9_0_1_release_notes.md b/changelog/9.0/9.0.1/release_notes.md similarity index 100% rename from doc/releasenotes/9_0_1_release_notes.md rename to changelog/9.0/9.0.1/release_notes.md diff --git a/doc/releasenotes/9_0_2_release_notes.md b/changelog/9.0/9.0.2/release_notes.md similarity index 100% rename from doc/releasenotes/9_0_2_release_notes.md rename to changelog/9.0/9.0.2/release_notes.md diff --git a/changelog/9.0/README.md b/changelog/9.0/README.md new file mode 100644 index 00000000000..17f49aa3b47 --- /dev/null +++ b/changelog/9.0/README.md @@ -0,0 +1,9 @@ +## v9.0 +* **[9.0.2](9.0.2)** + * [Release Notes](9.0.2/release_notes.md) + +* **[9.0.1](9.0.1)** + * [Release Notes](9.0.1/release_notes.md) + +* **[9.0.0](9.0.0)** + * [Release Notes](9.0.0/release_notes.md) diff --git a/changelog/README.md b/changelog/README.md new file mode 100644 index 00000000000..97c338f9942 --- /dev/null +++ b/changelog/README.md @@ -0,0 +1,12 @@ +## Releases +* [17.0](17.0) +* [16.0](16.0) +* [15.0](15.0) +* [14.0](14.0) +* [13.0](13.0) +* [12.0](12.0) +* [11.0](11.0) +* [10.0](10.0) +* [9.0](9.0) +* [8.0](8.0) +* [7.0](7.0) \ No newline at end of file diff --git a/config/init_db.sql b/config/init_db.sql index 7be4de6f7ea..d04960633de 100644 --- a/config/init_db.sql +++ b/config/init_db.sql @@ -1,5 +1,4 @@ -# This file is executed immediately after mysql_install_db, -# to initialize a fresh data directory. +# This file is executed immediately after initializing a fresh data directory. ############################################################################### # WARNING: This sql is *NOT* safe for production use, @@ -11,6 +10,12 @@ ############################################################################### # Equivalent of mysql_secure_installation ############################################################################### +# We need to ensure that super_read_only is disabled so that we can execute +# these commands. Note that disabling it does NOT disable read_only. +# We save the current value so that we only re-enable it at the end if it was +# enabled before. +SET @original_super_read_only=IF(@@global.super_read_only=1, 'ON', 'OFF'); +SET GLOBAL super_read_only='OFF'; # Changes during the init db should not make it to the binlog. # They could potentially create errant transactions on replicas. @@ -77,3 +82,9 @@ FLUSH PRIVILEGES; RESET SLAVE ALL; RESET MASTER; + +# custom sql is used to add custom scripts like creating users/passwords. We use it in our tests +# {{custom_sql}} + +# We need to set super_read_only back to what it was before +SET GLOBAL super_read_only=IFNULL(@original_super_read_only, 'ON'); diff --git a/config/mycnf/default.cnf b/config/mycnf/default.cnf index 0a375cb69c7..c17165f9959 100644 --- a/config/mycnf/default.cnf +++ b/config/mycnf/default.cnf @@ -14,9 +14,6 @@ port = {{.MysqlPort}} secure-file-priv = {{.SecureFilePriv}} {{end}} -# all db instances should start in read-only mode - once the db is started and -# fully functional, we'll push it into read-write mode -read-only server-id = {{.ServerID}} # all db instances should skip starting replication threads - that way we can do any diff --git a/config/mycnf/mariadb10.cnf b/config/mycnf/mariadb10.cnf index 1912cd8e154..120bd7b7d00 100644 --- a/config/mycnf/mariadb10.cnf +++ b/config/mycnf/mariadb10.cnf @@ -39,3 +39,5 @@ slave_net_timeout = 60 character_set_server = utf8 collation_server = utf8_general_ci +# All MariaDB instances should start in read-only mode +read-only diff --git a/config/mycnf/mysql57.cnf b/config/mycnf/mysql57.cnf index 7a8c45a187c..44c462749a7 100644 --- a/config/mycnf/mysql57.cnf +++ b/config/mycnf/mysql57.cnf @@ -32,3 +32,7 @@ plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisy rpl_semi_sync_master_timeout = 1000000000000000000 rpl_semi_sync_master_wait_no_slave = 1 +# In order to protect against any errand GTIDs we will start the mysql instance +# in super-read-only mode. +super-read-only + diff --git a/config/mycnf/mysql80.cnf b/config/mycnf/mysql80.cnf index 94a29d79cff..3b1e829fe64 100644 --- a/config/mycnf/mysql80.cnf +++ b/config/mycnf/mysql80.cnf @@ -34,3 +34,8 @@ information_schema_stats_expiry = 3600 # Only retry connecting to the primary 300 times before giving up master_retry_count = 300 + +# In order to protect against any errand GTIDs we will start the mysql instance +# in super-read-only mode. +super-read-only + diff --git a/config/mycnf/test-suite.cnf b/config/mycnf/test-suite.cnf index e57368a41db..e6d0992f6e6 100644 --- a/config/mycnf/test-suite.cnf +++ b/config/mycnf/test-suite.cnf @@ -23,3 +23,6 @@ sql_mode = STRICT_TRANS_TABLES # set a short heartbeat interval in order to detect failures quickly slave_net_timeout = 4 +# Disabling `super-read-only`. `test-suite` is mainly used for `vttestserver`. Since `vttestserver` uses a single MySQL for primary and replicas, +# so it is not possible to run it with `super-read-only`. Therefore, we are disabling it. +super-read-only = false diff --git a/doc/design-docs/OwnedPrimaryVindexes.md b/doc/design-docs/OwnedPrimaryVindexes.md new file mode 100644 index 00000000000..027b82fb502 --- /dev/null +++ b/doc/design-docs/OwnedPrimaryVindexes.md @@ -0,0 +1,43 @@ +# Owned Primary Vindexes + +This document presents a way to allow for owned lookup vindexes to also be the Primary Vindex. + +## Problem statement + +An owned lookup vindex is a vindex for which a mapping is created from the input column value(s) to a keyspace id at the time of insert. This necessarily means that the keyspace id has to be known before this mapping can be created. + +This also means that an owned vindex cannot be the primary vindex. This is because the primary vindex is the one that determines the keyspace id of a row based on the input value. The essential thinking is: if one can compute the keyspace id for a row, then there is no need to store a mapping for it. + +There are, however, situations where these seemingly contradictory situations can co-exist. Here are two use cases: + +1. I want to generate a random keyspace id at the time of row insertion, but I want to remember it for later. +2. I want to use multiple column values to compute a keyspace id, but would like to save a mapping from just one column to the computed keyspace id. This way, the lookup can be used in situations where only the mapped column was provided in the where clause. This is an upcoming use case for those who wish to geo-partition their data based on regions. + +In the above cases, the vindex is capable of generating a keyspace id, and at the same time, it needs to save that data so that it can be used later when `Map` is called. + +## Solution + +In order to support the new use cases, the following changes can be made: + +1. Extend the Vindex API where a vindex can export a `MapNew` function. This function will generate a keyspace ID. +2. Allow owned lookup vindexes that support the `MapNew`function to be the primary vindex. +3. If a `MapNew` function exists for the primary vindex, the insert will call it. Otherwise, it will use the regular `Map` function. +4. If the vindex is owned, then the regular code for an owned vindex is executed, even if it’s the primary vindex. This is because `MapNew` would have returned us the keyspace id for the row. + +Why not a `MapAndCreate` function instead? +A `MapAndCreate` will end up duplicating the work performed by an owned Vindex for the Create part. Having `MapNew` only generate the keyspace id keeps the functionality more orthogonal and composable. + +Why do we need a separate `MapNew` function instead of just reusing the `Map` function? +This is to address the first use case. In the first use case, the `MapNew` function will generate a random keyspace id, whereas the `Map` function will perform the lookup. + +## Resharding + +We currently don’t support resharding through a lookup vindex. This is because a vttablet is not able to read from a lookup table that may be distributed across different keyspaces and shards. Also, performing a lookup for each vreplication row may be a performance bottleneck. + +For the first use case of random keyspace id generation, there is no recourse; Looking up the keyspace id may be the only way to reshard. However, this is currently only a hypothetical use case. So, there’s no need to solve this problem immediately. + +For the second use case, which addresses the geo-partitioning problem, `Map` and `MapNew` have the same implementation. The only difference is that `MapNew` takes multiple columns as input, whereas `Map` takes only one column. + +We have always wanted to extend `Map` to accept multiple columns as input. We now have the opportunity to do so. In such cases, a resharding will be able to use `Map` with all column values as input, thereby avoiding the need to read from lookup tables. + +The VTGate itself can continue to just send the first column's value for the vindex. However, VReplication can use all column values to allow for `Map` to return efficiently. \ No newline at end of file diff --git a/doc/internal/ReleaseInstructions.md b/doc/internal/ReleaseInstructions.md index 05286de9092..b5bab67a44e 100644 --- a/doc/internal/ReleaseInstructions.md +++ b/doc/internal/ReleaseInstructions.md @@ -161,8 +161,9 @@ That includes: > - This includes write access to the Vitess repository and to the Maven repository. - **Preparing and cleaning the release notes summary.** > - One or more Pull Requests have to be submitted in advance to create and update the release summary. - > - The summary files are located in: `./doc/releasenotes/*_*_*_summary.md`. + > - The summary files are located in: `./changelog/*.0/*.*.*/summary.md`. > - The summary file for a release candidate is the same as the one for the GA release. + > - Make sure to run `go run ./go/tools/releases/releases.go` to update the `changelog` directory with the latest release notes. - **Finishing the blog post, and coordinating with the different organizations for cross-posting. Usually CNCF and PlanetScale. This step applies only for GA releases.** > - The blog post must be finished and reviewed. > - A Pull Request on the website repository of Vitess has to be created so we can easily publish the blog during the release day. @@ -170,6 +171,7 @@ That includes: > - As soon as we go into code freeze, if we are doing an RC, create the release branch. > - If we are doing a GA release, do not merge any new Pull Requests. > - The guide on how to do a code freeze is available in the [How To Code Freeze](#how-to-code-freeze) section. + > - It is not advised to merge a PR during code freeze, but if it is deemed necessary by the release lead, then follow the steps in [How To Merge During Code Freeze](#how-to-merge-during-code-freeze) section. - **Create the Vitess release.** > - A guide on how to create a Vitess release is available in the [How to prepare the release of Vitess](#how-to-prepare-the-release-of-vitess) section. > - This step will create a Release Pull Request, it must be reviewed and merged before the release day. The release commit will be used to tag the release. @@ -177,13 +179,30 @@ That includes: > - While the Vitess Operator is located in a different repository, we also need to do a release for it. > - The Operator follows the same cycle: RC1 -> GA -> Patches. > - Documentation for the pre-release of the Vitess Operator is available [here](https://github.com/planetscale/vitess-operator/blob/main/docs/release-process.md#prepare-for-release). +- **Update the release notes on `main`.** + > - One Pull Request against `main` must be created, it will contain the new release notes that we are adding in the Release Pull Request. + > - We open this Pull Request now to avoid waiting on the CI during release day. + > - All future changes to the release notes during the code freeze will need to be ported to both PRs: the one on `main` and the Release Pull Request. +- **Update the website documentation.** + > - We want to open a preparatory **draft** Pull Request to update the documentation. + > - There are several pages we want to update: + > - [The releases page](https://vitess.io/docs/releases/), we must add the new release to the list with all its information and link. The links can be broken (404 error) while we are preparing for the release, this is fine. + > - [The local install page](https://vitess.io/docs/get-started/local/), we must use the proper version increment for this guide and the proper SHA. The SHA will have to be modified once the Release Pull Request and the release is tagged is merged. + > - If we are doing a GA or RC release follow the instructions below: + > - There are two scripts in the website repository in `./tools/{ga|rc}_release.sh`, use them to update the website documentation. The scripts automate: + > - For an RC, we need to create a new version in the sidebar and mark the current version as RC. + > - For a GA, we need to mark the version we are releasing as "Stable" and the next one as "Development". ### Release On the release day, there are several things to do: +- **Merge the Release Pull Request.** + > - During the code freeze, we created a Release Pull Request. It must be merged. - **Tag the Vitess release.** > - A guide on how to tag a version is available in the [How To Release Vitess](#how-to-release-vitess) section. +- **Update the release notes on `main`.** + > - During the code freeze, we created a Pull Request against `main` to update the release notes. It must be merged. - **Create the corresponding Vitess operator release.** > - Applies only to versions greater or equal to `v14.0.0`. > - If we are doing an RC release, then we will need to create the Vitess Operator RC too. If we are doing a GA release, we're also doing a GA release in the Operator. @@ -192,10 +211,9 @@ On the release day, there are several things to do: > - Applies only to GA releases. > - This step is explained in the [Java Packages: Deploy & Release](#java-packages-deploy--release) section. - **Update the website documentation repository.** - > - Applies only to GA and RC releases. - > - There are two scripts in the website repository in `./tools/{ga|rc}_release.sh`, use them to update the website documentation. The scripts automate: - > - For an RC, we need to create a new version in the sidebar and mark the current version as RC. - > - For a GA, we need to mark the version we are releasing as "Stable" and the next one as "Development". + > - Review the Website Pull Request that was opened during the Pre-Release. + > - The git SHA used in [the local install page](https://vitess.io/docs/get-started/local/) should be updated with the new proper SHA for this release. + > - Merge the Pull Request. - **Publish the blog post on the Vitess website.** > - Applies only to GA releases. > - The corresponding Pull Request was created beforehand during the pre-release. Merge it. @@ -205,8 +223,6 @@ On the release day, there are several things to do: > - After a while, those elements will finish their execution and their status will be green. > - This step is even more important for GA releases as we often include a link to _arewefastyet_ in the blog post. > - The benchmarks need to complete before announcing the blog posts or before they get cross-posted. -- **Update the release notes on `main`.** - > - One Pull Request against `main` must be created, it will contain the new release notes. - **Go back to dev mode on the release branch.** > - The version constants across the codebase must be updated to `SNAPSHOT`. - **Build k8s Docker images and publish them** @@ -255,19 +271,21 @@ We need to verify that _arewefastyet_ has finished the benchmark too. 2. Run the following command to generate the release notes: 1. Release Candidate: ```shell - make VERSION="v15.0.0-rc1" FROM="v14.0.3" TO="HEAD" SUMMARY="./doc/releasenotes/15_0_0_summary.md" release-notes + make VERSION="v15.0.0-rc1" FROM="v14.0.3" TO="HEAD" SUMMARY="./changelog/15.0/15.0.0/summary.md" release-notes ``` 2. General Availability: ```shell - make VERSION="v15.0.0-rc1" FROM="v14.0.3" TO="HEAD" SUMMARY="./doc/releasenotes/15_0_0_summary.md" release-notes + make VERSION="v15.0.0-rc1" FROM="v14.0.3" TO="HEAD" SUMMARY="./changelog/15.0/15.0.0/summary.md" release-notes ``` This command will generate the release notes by looking at all the commits between the tag `v14.0.3` and the reference `HEAD`. - It will also use the file located in `./doc/releasenotes/15_0_0_summary.md` to prefix the release notes with a text that the maintainers wrote before the release. + It will also use the file located in `./changelog/15.0/15.0.0/summary.md` to prefix the release notes with a text that the maintainers wrote before the release. Please verify the generated release notes to make sure it is well-formatted and all the bookmarks are generated properly. 3. Follow the instruction prompted by the `create_release` Makefile command's output in order to push the newly created branch and create the Release Pull Request on GitHub. +4. If we are doing an RC release it means we created a new branch from `main`. We need to update `main` with the next SNAPSHOT version. If `main` was on `15.0.0-SNAPSHOT`, we need to update it to `16.0.0-SNAPSHOT`. A simple find and replace in the IDE is sufficient, there only a handful of files that must be changed: `version.go` and several java files. + ### How To Release Vitess This section is divided into two parts: - [Creation of the tags and release notes](#creation-of-the-tags-and-release-notes). @@ -301,7 +319,7 @@ This section is divided into two parts: git tag v15.0.0 && git tag v0.15.0 && git push origin v15.0.0 && git push origin v0.15.0 ``` -4. Create a Pull Request against the `main` branch with the release notes found in `doc/releasenotes/15_0_0_*.md`. +4. Create a Pull Request against the `main` branch with the release notes found in `./changelog/15.0/15.0.0/15_0_0_*.md`. 5. Run the back to dev mode tool. ```shell @@ -354,6 +372,9 @@ git fetch --all git checkout -b release-15.0 origin/main ``` +> Important: after creating the new branch `release-15.0`, we need to create new branch protection rules on the GitHub UI. +> The rules can be copied from the rules that are on the `main` branch. + The new branch will be based on `origin/main`, here `origin` points to `vitessio/vitess`. If we are not doing a release candidate, then the branch already exists and we can checkout on it. Now, if we are doing a GA release, let's update the branch: @@ -370,6 +391,26 @@ Finally, let's run the code freeze script: The script will prompt the command that will allow you to push the code freeze change. Once pushed, open a PR that will be merged on `release-15.0`. +Remember, you should also disable the Launchable integration from the newly created release branch. + +### How To Merge During Code Freeze + +> **Warning:** It is not advised to merge a PR during code-freeze. If it is deemed absolutely necessary, then the following steps can be followed. + +The PR that needs to be merged will be failing on the `Code Freeze` CI. To merge this PR, we'll have to mark this CI action as not required. +You will need administrator privileges on the vitess repository to be able to make this change. + +1. Go to the GitHub repository and click on `Settings`. +2. Under the `Code and automation` section, select `Branches`. +3. Find the branch that you want to merge the PR against and then select `Edit`. +4. Scroll down to find the list of required checks. +5. Within this list find `Code Freeze` and click on the cross next to it to remove it from this list. +6. Save your changes on the bottom of the page. +7. Refresh the page of the PR, and you should be able to merge it. +8. After merging the PR, you need to do 2 more things - + 1. Add `Code Freeze` back as a required check. + 2. Check if the release PR has any merge conflicts. If it does, fix them and push. + ### Java Packages: Deploy & Release > **Warning:** This section's steps need to be executed only when releasing a new major version of Vitess, @@ -382,7 +423,7 @@ The script will prompt the command that will allow you to push the code freeze c git checkout v12.0.0 ``` -2. Run `gpg-agent` to avoid that Maven will constantly prompt you for the password of your private key. +2. Run `gpg-agent` to avoid that Maven will constantly prompt you for the password of your private key. Note that this can print error messages that can be ignored on Mac. ```bash eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info) @@ -401,7 +442,9 @@ The script will prompt the command that will allow you to push the code freeze c > **Warning:** After the deployment, the Java packages will be automatically released. Once released, you cannot delete them. The only option is to upload a newer version (e.g. increment the patch level).

```bash + cd ./java/ mvn clean deploy -P release -DskipTests cd .. ``` + 5. It will take some time for artifacts to appear on [maven directory](https://mvnrepository.com/artifact/io.vitess/vitess-client) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index ee520efa00a..41cec5ff4bb 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" diff --git a/docker/base/Dockerfile.mysql57 b/docker/base/Dockerfile.mysql57 index d05fa944951..965ecd6b098 100644 --- a/docker/base/Dockerfile.mysql57 +++ b/docker/base/Dockerfile.mysql57 @@ -1,21 +1,32 @@ +<<<<<<<< HEAD:go/test/go-mysql-server/internal/sqlparser/Makefile +# Copyright 2019 The Vitess Authors. +# +======== # Copyright 2023 The Vitess Authors. # +>>>>>>>> vitess/main:docker/base/Dockerfile.mysql57 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" +<<<<<<<< HEAD:go/test/go-mysql-server/internal/sqlparser/Makefile +sql.go: sql.y + go run golang.org/x/tools/cmd/goyacc -o sql.go sql.y + gofmt -w sql.go +======== FROM "${image}" +>>>>>>>> vitess/main:docker/base/Dockerfile.mysql57 # Allows some docker builds to disable CGO ARG CGO_ENABLED=0 diff --git a/docker/base/Dockerfile.percona57 b/docker/base/Dockerfile.percona57 index 8dcc5a909e3..fc3a5369ec5 100644 --- a/docker/base/Dockerfile.percona57 +++ b/docker/base/Dockerfile.percona57 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" diff --git a/docker/base/Dockerfile.percona80 b/docker/base/Dockerfile.percona80 index 40918d35378..f8923a94629 100644 --- a/docker/base/Dockerfile.percona80 +++ b/docker/base/Dockerfile.percona80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" diff --git a/docker/lite/Dockerfile.mysql57 b/docker/lite/Dockerfile.mysql57 index 061a1becc19..1f72d5ec244 100644 --- a/docker/lite/Dockerfile.mysql57 +++ b/docker/lite/Dockerfile.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.mysql80 index 7551408810a..3377fba3896 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder @@ -28,10 +28,6 @@ ARG BUILD_NUMBER # Re-copy sources from working tree. COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess -# PS: Setup git to use github_token -RUN --mount=type=secret,id=github_token,mode=044 \ - git config --global --add url."https://x-access-token:$(cat /run/secrets/github_token)@github.com/".insteadOf "https://github.com/" - # Build and install Vitess in a temporary output directory. USER vitess RUN make install PREFIX=/vt/install diff --git a/docker/lite/Dockerfile.percona57 b/docker/lite/Dockerfile.percona57 index 101ed73b5d9..9e270f95cd0 100644 --- a/docker/lite/Dockerfile.percona57 +++ b/docker/lite/Dockerfile.percona57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index ec67e256fbb..58e8d706c2b 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.testing b/docker/lite/Dockerfile.testing index 9c0ffae8458..05f9c951688 100644 --- a/docker/lite/Dockerfile.testing +++ b/docker/lite/Dockerfile.testing @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.mysql57 b/docker/lite/Dockerfile.ubi7.mysql57 index d874dcafc27..ffd3b43c757 100644 --- a/docker/lite/Dockerfile.ubi7.mysql57 +++ b/docker/lite/Dockerfile.ubi7.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.mysql80 b/docker/lite/Dockerfile.ubi7.mysql80 index 83976d9b180..59dcd223760 100644 --- a/docker/lite/Dockerfile.ubi7.mysql80 +++ b/docker/lite/Dockerfile.ubi7.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.percona57 b/docker/lite/Dockerfile.ubi7.percona57 index 08f1b700970..09578713564 100644 --- a/docker/lite/Dockerfile.ubi7.percona57 +++ b/docker/lite/Dockerfile.ubi7.percona57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.percona80 b/docker/lite/Dockerfile.ubi7.percona80 index d1cdd87ab53..b64a30ed331 100644 --- a/docker/lite/Dockerfile.ubi7.percona80 +++ b/docker/lite/Dockerfile.ubi7.percona80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi8.arm64.mysql80 b/docker/lite/Dockerfile.ubi8.arm64.mysql80 index 0f9d88596c9..abfd4c3302b 100644 --- a/docker/lite/Dockerfile.ubi8.arm64.mysql80 +++ b/docker/lite/Dockerfile.ubi8.arm64.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi8.mysql80 b/docker/lite/Dockerfile.ubi8.mysql80 index ba3fe8ec02d..7fd9f63e746 100644 --- a/docker/lite/Dockerfile.ubi8.mysql80 +++ b/docker/lite/Dockerfile.ubi8.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile index d58ece7222f..ef787858ebb 100644 --- a/docker/local/Dockerfile +++ b/docker/local/Dockerfile @@ -1,4 +1,4 @@ -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" @@ -34,6 +34,10 @@ ENV PATH="/var/opt/etcd:${PATH}" RUN mkdir /vt/local COPY examples/local /vt/local +# Copy the vtadmin web app to the correct location and npm install +COPY --chown=vitess:vitess web /web +RUN npm install /web/vtadmin + RUN mkdir /vt/common COPY examples/common /vt/common diff --git a/docker/local/install_local_dependencies.sh b/docker/local/install_local_dependencies.sh index b723ee99452..e570d0dc196 100755 --- a/docker/local/install_local_dependencies.sh +++ b/docker/local/install_local_dependencies.sh @@ -3,7 +3,7 @@ # This is a script that gets run as part of the Dockerfile build # to install dependencies for the vitess/mini image. # -# Usage: install_mini_dependencies.sh +# Usage: install_local_dependencies.sh set -euo pipefail @@ -20,3 +20,6 @@ mkdir -p /var/run/etcd && chown -R vitess:vitess /var/run/etcd # Clean up files we won't need in the final image. rm -rf /var/lib/apt/lists/* + +# Install npm and node dependencies for vtadmin +curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs diff --git a/docker/release.sh b/docker/release.sh index f7c7fc911e8..d73b4ec2054 100755 --- a/docker/release.sh +++ b/docker/release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ex -vt_base_version='v16.0.1-SNAPSHOT' +vt_base_version='v16.0.0' debian_versions='buster bullseye' default_debian_version='bullseye' diff --git a/docker/vttestserver/Dockerfile.mysql57 b/docker/vttestserver/Dockerfile.mysql57 index 436cd705b90..8c9a3c409b3 100644 --- a/docker/vttestserver/Dockerfile.mysql57 +++ b/docker/vttestserver/Dockerfile.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index a2867cf7d4b..a7e62800096 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/examples/are-you-alive/.gitignore b/examples/are-you-alive/.gitignore deleted file mode 100644 index a0ba6e25a73..00000000000 --- a/examples/are-you-alive/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -are-you-alive diff --git a/examples/are-you-alive/Makefile b/examples/are-you-alive/Makefile deleted file mode 100644 index d6cc94e5f39..00000000000 --- a/examples/are-you-alive/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# We are using the public "planetscale-vitess" registry for this -NAME := "us.gcr.io/planetscale-vitess/are-you-alive" -TAG := $$(git log -1 --pretty=%H) -IMG := ${NAME}:${TAG} -LATEST := ${NAME}:latest - -.PHONY: build push - -build: - @docker build -f build/release/Dockerfile -t ${IMG} . - @docker tag ${IMG} ${LATEST} - -push: - @docker push ${IMG} - @docker push ${LATEST} diff --git a/examples/are-you-alive/README.md b/examples/are-you-alive/README.md deleted file mode 100644 index 0404ca98cc7..00000000000 --- a/examples/are-you-alive/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Are You Alive? - -What does it mean to be alive? - -Well we don't know what it means for you, but we know what it means for a Vitess -Cluster! - -This project contains a simulated client application that can be used to measure -the health of a Vitess cluster over time. - -## Design - -For now, there is a specific database schema and vschema that you must apply to -the database that you are using for this test. - -This client application: - -1. Hammers the database with random data (not a load test though). -1. Measures all the important things: - - Client connection errors - - Write latency - - Read latency from primaries - - Read latency from replicas - - Write errors - - Read errors on primaries - - Write errors on replicas - - Errors in other operations on primaries and replicas (e.g. COUNT) - - Latency on other operations on primaries and replicas (e.g. COUNT) - - Data loss (by writing predictable data and testing for that) -1. Reports all these metrics to Prometheus. - -That's it! - -## Usage - -First, [initialize your database with the correct schemas](schemas/README.md). - -Run `are-you-alive --help` for usage. You can use the command line flags to -control the dataset size, whether to target reads at primaries and replicas, your -mysql connection string, and the rate at which to send requests. - -Example: - -``` -./are-you-alive --mysql_connection_string -``` - -Where `` points to the database you are trying to test, -and everything else will be set to defaults. - -## Building - -``` -go build vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive -``` - -## Testing - -First, [install docker compose](https://docs.docker.com/compose/install/) and -make sure it's working. Then run: - -``` -docker-compose build -docker-compose up -``` - -This will create a local mysqld and a local prometheus to scrape the app. It -will also start the app with the `--initialize` flag which tells it to -automatically create the test database. You might have to run this twice to -give mysql a chance to do its first initialization. - -After you run docker compose, navigate to `http://localhost:9090` to see -Prometheus and `http://localhost:8080/metrics` to see the raw metrics being -exported. - -## Test Specific Tablet Types - -Queries can target specific tablet types. In the configuration file you simply -need to, for example, put "@primary" or "@replica" on the ends of your connection -strings. - -## Push to Registry - -If you have push access to the [planetscale public -registry](https://us.gcr.io/planetscale-vitess), you can use the following -commands to build and push the image: - -``` -make build -make push -``` diff --git a/examples/are-you-alive/build/dev/Dockerfile b/examples/are-you-alive/build/dev/Dockerfile deleted file mode 100644 index 3da1845ea23..00000000000 --- a/examples/are-you-alive/build/dev/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM golang:1.14 -RUN go install github.com/cespare/reflex@latest -COPY reflex.conf /reflex.conf -COPY entrypoint.sh /entrypoint.sh -COPY endpoints.yaml /endpoints.yaml -ENTRYPOINT ["/entrypoint.sh"] diff --git a/examples/are-you-alive/build/dev/reflex.conf b/examples/are-you-alive/build/dev/reflex.conf deleted file mode 100644 index 6985f66d979..00000000000 --- a/examples/are-you-alive/build/dev/reflex.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Get all dependencies when go.mod changes. --r '(\.mod$)' -s -- go get vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive/... - -# Rerun "go run" every time a ".go" file changes. --r '(\.go$)' -s -- go run vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive --initialize --endpoints_config /endpoints.yaml diff --git a/examples/are-you-alive/build/release/Dockerfile b/examples/are-you-alive/build/release/Dockerfile deleted file mode 100644 index 55b8c9f66a1..00000000000 --- a/examples/are-you-alive/build/release/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM golang:1.14 AS build -COPY . /go/src/vitess.io/vitess/examples/are-you-alive -RUN go get vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive/... -RUN CGO_ENABLED=0 go install vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive - -FROM debian:stretch-slim AS runtime -COPY --from=build /go/bin/are-you-alive /go/bin/are-you-alive -ENTRYPOINT ["/go/bin/are-you-alive"] diff --git a/examples/are-you-alive/cmd/are-you-alive/main.go b/examples/are-you-alive/cmd/are-you-alive/main.go deleted file mode 100644 index b19e1ebfedf..00000000000 --- a/examples/are-you-alive/cmd/are-you-alive/main.go +++ /dev/null @@ -1,357 +0,0 @@ -package main - -import ( - "database/sql" - "errors" - "flag" - "fmt" - "math/rand" - "net/http" - "os" - "os/signal" - "sync" - - "github.com/go-sql-driver/mysql" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/sirupsen/logrus" - "go.uber.org/ratelimit" - "gopkg.in/yaml.v2" - - "vitess.io/vitess/examples/are-you-alive/pkg/client" -) - -/* -* To measure data loss, we need predictable writes. We do this with "minPage" -* and "maxPage". Once the difference between them is our desired dataset size, -* we can start deleting old records, but we expect to find one record for every -* "page" number between "minPage" and "maxPage". -* -* We don't measure "update loss" with this client right now. - */ - -var ( - maxPage = 0 - minPage = 0 - dataLossEvents = promauto.NewCounterVec(prometheus.CounterOpts{ - Name: "are_you_alive_data_loss_events", - Help: "Data loss events", - }, - []string{"database_name"}, - ) -) - -func writeNextRecord(connectionString string) error { - - // 1. Call monitored client - err := client.Write(connectionString, maxPage) - if err != nil { - // Check to see if this is a duplicate key error. We've seen this - // sometimes happen, and when it does this client app gets stuck in an - // infinite loop of failure to write a duplicate key. It's possible - // that happens because a write is successful but something goes wrong - // before the client receives a response, so the client thinks the write - // failed and does not increment the count. - // - // So when we specifically see a duplicate key error, assume that's what - // happened, bump the count, and move on. - // - // See https://github.com/planetscale/planetscale-operator/issues/1776 - if me, ok := err.(*mysql.MySQLError); ok && me.Number == 1062 { - logrus.WithError(err).Warnf( - "Key '%d' already found, incrementing count", maxPage) - maxPage = maxPage + 1 - return nil - } - - logrus.WithError(err).Error("Error writing record") - return err - } - - // 2. Increment "maxPage" - maxPage = maxPage + 1 - return nil -} - -func readRandomRecord(connectionString string) error { - - // 1. Pick Random Number Between "minPage" and "maxPage" - if minPage == maxPage { - logrus.Warn("Nothing has been inserted yet!") - return nil - } - page := (rand.Int() % (maxPage - minPage)) + minPage - - // 2. Read Record - readID, readMsg, err := client.Read(connectionString, page) - if err != nil { - if err == sql.ErrNoRows { - // This races with deletion, but if our page is greater than minPage - // we know that it should be in there. If it's less than minPage - // assume we are just racing the deletion goroutine and ignore the - // error. - if page <= minPage { - return nil - } - // For replicas, there is a chance we are suffering from replication - // lag, so ignore the missing row if we are a replica. - // TODO: Should we attempt to roughly figure out replication lag in - // this client, at least to catch major failures? We could probably - // multiply delay by the difference between maxCount and the page we - // are trying to read to figure out how long ago the row we were - // trying to write was written. - if client.ParseTabletType(connectionString) == "replica" || - client.ParseTabletType(connectionString) == "rdonly" { - return nil - } - logrus.WithError(err).WithFields(logrus.Fields{ - "page": page, - "minPage": minPage, - "maxPage": maxPage, - }).Error("Query succeeded but record not found, may mean data loss") - dataLossEvents.With( - prometheus.Labels{"database_name": client.ParseDBName(connectionString)}).Inc() - return err - } - logrus.WithError(err).Error("Error reading record") - return err - } - // Add zero here just so the metric exists for this database, even if it's - // zero. - dataLossEvents.With( - prometheus.Labels{"database_name": client.ParseDBName(connectionString)}).Add(0) - logrus.WithFields(logrus.Fields{ - "readID": readID, - "readMsg": readMsg, - }).Debug("Read row!") - - return nil -} - -func runCount(connectionString string) error { - - // 1. Run Count - count, err := client.Count(connectionString) - if err != nil { - logrus.WithError(err).Error("Error counting records") - return err - } - logrus.WithFields(logrus.Fields{ - "count": count, - }).Debug("Counted rows!") - - // 2. Log if COUNT != "minPage" - "maxPage" - return nil -} - -func deleteLastRecordIfNecessary(connectionString string) error { - - // 1. Compare "maxPage" - "minPage" to Desired Dataset Size - if (maxPage - minPage) < *datasetSize { - return nil - } - logrus.WithFields(logrus.Fields{ - "current": maxPage - minPage, - "desired": *datasetSize, - }).Debug("Deleting last record") - - // 2. Delete Record If We Are Above Desired Size - err := client.Delete(connectionString, minPage) - if err != nil { - logrus.WithError(err).Error("Error deleting record") - return err - } - - // 3. Increment "minPage" - minPage = minPage + 1 - return nil -} - -var ( - prometheusMetricsAddress = flag.String( - "prometheus_metrics_address", ":8080", "Address on which to serve prometheus metrics") - debug = flag.Bool("debug", false, "Enable debug logging") - useVtgate = flag.Bool("vtgate", false, "Using vtgate (for @primary and @replica)") - initialize = flag.Bool("initialize", false, "Initialize database (for testing)") - datasetSize = flag.Int("dataset_size", 10, "Number of total records in database") - endpointsConfigFilename = flag.String("endpoints_config", "", "Endpoint and load configuration.") -) - -type runner struct { - connString string - fn func(string) error - errMessage string - opsPerSecond int -} - -func (r *runner) run() { - rl := ratelimit.New(r.opsPerSecond) - for { - _ = rl.Take() - err := r.fn(r.connString) - if err != nil { - logrus.WithError(err).Error(r.errMessage) - } - } -} - -func waitForCtrlC() { - var endWaiter sync.WaitGroup - endWaiter.Add(1) - var signalChannel chan os.Signal - signalChannel = make(chan os.Signal, 1) - signal.Notify(signalChannel, os.Interrupt) - go func() { - <-signalChannel - endWaiter.Done() - }() - endWaiter.Wait() -} - -func runPrometheus() { - http.Handle("/metrics", promhttp.Handler()) - logrus.Fatal(http.ListenAndServe(*prometheusMetricsAddress, nil)) -} - -func loadEndpointsConfig(endpointsConfigFilename string) (endpointsConfig, error) { - if endpointsConfigFilename == "" { - return endpointsConfig{}, errors.New("You must pass an endpoints configuration file") - } - - f, err := os.Open(endpointsConfigFilename) - if err != nil { - return endpointsConfig{}, err - } - defer f.Close() - - var cfg endpointsConfig - decoder := yaml.NewDecoder(f) - err = decoder.Decode(&cfg) - if err != nil { - return endpointsConfig{}, err - } - return cfg, nil -} - -type endpointsConfig struct { - Endpoints []struct { - ConnectionString string `yaml:"connectionString"` - TargetCountsPerSecond int `yaml:"targetCountsPerSecond"` - TargetQueriesPerSecond int `yaml:"targetQueriesPerSecond"` - TargetWritesPerSecond int `yaml:"targetWritesPerSecond"` - } `yaml:"endpoints"` -} - -func main() { - - // 0. Handle Arguments - flag.Parse() - if *debug { - logrus.SetLevel(logrus.DebugLevel) - } - logrus.WithFields(logrus.Fields{ - "endpointsConfigFilename": *endpointsConfigFilename, - "prometheusMetricsAddress": *prometheusMetricsAddress, - "debug": *debug, - }).Debug("Command line arguments") - - var endpoints endpointsConfig - endpoints, err := loadEndpointsConfig(*endpointsConfigFilename) - if err != nil { - logrus.WithError(err).Error("Failed to load endpoints config.") - os.Exit(1) - } - - // 0. Set Up Prometheus Metrics - logrus.Info("Prometheus Go") - go runPrometheus() - - // 1. Pass "interpolateParams" - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - - // We need to pass interpolateParams when using a vtgate because - // prepare is not supported. - // - // See: - // - https://github.com/go-sql-driver/mysql/blob/master/README.md#interpolateparams - // - https://github.com/src-d/go-mysql-server/issues/428 - // - https://github.com/vitessio/vitess/pull/3862 - endpoint.ConnectionString = fmt.Sprintf("%s?interpolateParams=true", endpoint.ConnectionString) - } - - // 2. Initialize Database - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - - if endpoint.TargetWritesPerSecond > 0 { - logrus.Info("Initializing database") - // For local testing, does not initialize vschema - if *initialize { - client.InitializeDatabase(endpoint.ConnectionString, "are_you_alive_messages") - } - client.WipeTestTable(endpoint.ConnectionString, "are_you_alive_messages") - } - } - - // 3. Start Client Goroutines - logrus.Info("Starting client goroutines") - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - - if endpoint.TargetWritesPerSecond > 0 { - writer := runner{ - connString: endpoint.ConnectionString, - fn: writeNextRecord, - errMessage: "Received error writing next record", - opsPerSecond: endpoint.TargetWritesPerSecond, - } - go writer.run() - deleter := runner{ - connString: endpoint.ConnectionString, - fn: deleteLastRecordIfNecessary, - errMessage: "Received error deleting last record", - opsPerSecond: 100, // This is based on target "dataset_size", and will not make a query if not needed. TODO: Actually tune this in a reasonable way after redesigning the schema? - } - go deleter.run() - } - if endpoint.TargetQueriesPerSecond > 0 { - reader := runner{ - connString: endpoint.ConnectionString, - fn: readRandomRecord, - errMessage: "Received error reading record", - opsPerSecond: endpoint.TargetQueriesPerSecond, - } - go reader.run() - } - if endpoint.TargetCountsPerSecond > 0 { - counter := runner{ - connString: endpoint.ConnectionString, - fn: runCount, - errMessage: "Received error running count", - opsPerSecond: endpoint.TargetCountsPerSecond, - } - go counter.run() - } - } - - logrus.Info("Press Ctrl+C to end\n") - waitForCtrlC() - logrus.Info("\n") -} diff --git a/examples/are-you-alive/docker-compose.yml b/examples/are-you-alive/docker-compose.yml deleted file mode 100644 index 700d840b0c2..00000000000 --- a/examples/are-you-alive/docker-compose.yml +++ /dev/null @@ -1,27 +0,0 @@ -# https://www.firehydrant.io/blog/developer-a-go-app-with-docker-compose/ -version: '3' -services: - app: - build: build/dev - image: are-you-alive-dev - volumes: - - .:/go/src/vitess.io/vitess/examples/are-you-alive - working_dir: /go/src/vitess.io/vitess/examples/are-you-alive - depends_on: - - mysql - ports: - - 8080:8080 - prom: - image: quay.io/prometheus/prometheus:v2.0.0 - volumes: - - ./prometheus.yml:/etc/prometheus/prometheus.yml - command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus" - ports: - - 9090:9090 - depends_on: - - app - mysql: - image: mysql:5.7 - environment: - MYSQL_DATABASE: testfixture - MYSQL_ROOT_PASSWORD: mysql diff --git a/examples/are-you-alive/go.mod b/examples/are-you-alive/go.mod deleted file mode 100644 index e3069908616..00000000000 --- a/examples/are-you-alive/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module vitess.io/vitess/examples/are-you-alive - -go 1.14 - -require ( - github.com/go-sql-driver/mysql v1.7.0 - github.com/prometheus/client_golang v1.14.0 - github.com/sirupsen/logrus v1.9.0 - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/ratelimit v0.2.0 - golang.org/x/sys v0.5.0 // indirect - gopkg.in/yaml.v2 v2.4.0 -) diff --git a/examples/are-you-alive/go.sum b/examples/are-you-alive/go.sum deleted file mode 100644 index 9d5e2d8915f..00000000000 --- a/examples/are-you-alive/go.sum +++ /dev/null @@ -1,503 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= -github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= -github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA= -go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/examples/are-you-alive/pkg/client/client.go b/examples/are-you-alive/pkg/client/client.go deleted file mode 100644 index 8c2aff0a924..00000000000 --- a/examples/are-you-alive/pkg/client/client.go +++ /dev/null @@ -1,347 +0,0 @@ -package client - -import ( - "database/sql" - "fmt" - "strings" - - mysql "github.com/go-sql-driver/mysql" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/sirupsen/logrus" -) - -/* - * This package is meant to provide a client that includes prometheus metrics - * for common database issues. - */ - -var ( - defaultBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} - countErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_count_error_latency_seconds", - Help: "Latency to recieve a count error", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) - readErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_read_error_latency_seconds", - Help: "Latency to recieve a read error", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) - deleteErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_delete_error_latency_seconds", - Help: "Latency to recieve a delete error", - Buckets: defaultBuckets, - }, - []string{"database_name"}, - ) - writeErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_write_error_latency_seconds", - Help: "Latency to recieve a write error", - Buckets: defaultBuckets, - }, - []string{"database_name"}, - ) - connectErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_connect_error_latency_seconds", - Help: "Latency to recieve a connect error", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) - countLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_count_latency_seconds", - Help: "Time it takes to count to the database", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) - readLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_read_latency_seconds", - Help: "Time it takes to read to the database", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) - deleteLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_delete_latency_seconds", - Help: "Time it takes to delete to the database", - Buckets: defaultBuckets, - }, - []string{"database_name"}, - ) - writeLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_write_latency_seconds", - Help: "Time it takes to write to the database", - Buckets: defaultBuckets, - }, - []string{"database_name"}, - ) - connectLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "are_you_alive_connect_latency_seconds", - Help: "Time it takes to connect to the database", - Buckets: defaultBuckets, - }, - []string{"database_name", "tablet_type"}, - ) -) - -// ParseDBName extracts the database name from a mysql connection string. -func ParseDBName(connectionString string) string { - mysqlConfig, err := mysql.ParseDSN(connectionString) - if err != nil { - logrus.WithError(err).Fatal("Error parsing DSN!") - } - return mysqlConfig.DBName -} - -// ParseTabletType extracts the tablet type from a vitess specific mysql -// connection string. -// -// See https://vitess.io/docs/faq/queries/ for where these come from. -func ParseTabletType(connectionString string) string { - databaseName := ParseDBName(connectionString) - // for backwards compatibility - // TODO(deepthi): delete after v13.0 - if strings.HasSuffix(databaseName, "@master") { - return "primary" - } else if strings.HasSuffix(databaseName, "@primary") { - return "primary" - } else if strings.HasSuffix(databaseName, "@replica") { - return "replica" - } else if strings.HasSuffix(databaseName, "@rdonly") { - return "rdonly" - } else { - return "default" - } -} - -func openDatabase(connectionString string) (*sql.DB, error) { - databaseName := ParseDBName(connectionString) - tabletType := ParseTabletType(connectionString) - // NOTE: This is probably not measuring open connections. I think they - // connections are created/fetched from the pool when an operation is - // actually performed. We could force this with a ping probably, but for - // now this is here just as a sanity check that this is actually all - // happening locally. We should just see everything complete within - // milliseconds. - labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} - connectTimer := prometheus.NewTimer(connectLatency.With(labels)) - connectErrorTimer := prometheus.NewTimer(connectErrorLatency.With(labels)) - db, err := sql.Open("mysql", connectionString) - if err != nil { - logrus.WithError(err).Error("Error connecting to database") - connectErrorTimer.ObserveDuration() - return nil, err - } - connectTimer.ObserveDuration() - return db, nil -} - -// InitializeDatabase will connect to the given connectionString, drop the -// given tableName, and recreate it with the schema that the rest of the client -// expects. This is not something any normal client would do but is convenient -// here because we are just using this client for monitoring. -func InitializeDatabase(connectionString string, tableName string) error { - - // 0. Create logger - log := logrus.WithField("connection_string", connectionString) - - // 1. Open client to database - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - return err - } - defer db.Close() - - // 2. Delete test table, but continue if it's not there - if _, err := db.Exec(fmt.Sprintf("DROP TABLE %s", tableName)); err != nil { - log.WithError(err).Warn("Error deleting database") - } - - // 3. Create table - createSQL := fmt.Sprintf( - "CREATE TABLE IF NOT EXISTS %s(page INT, message VARCHAR(255) NOT NULL, PRIMARY KEY (page))", tableName) - if _, err := db.Exec(createSQL); err != nil { - log.WithError(err).Error("Error creating database") - return err - } - return nil -} - -// WipeTestTable connects to the database given by connectionString and deletes -// everything in the table given by tableName because this client expects the -// table to be empty. No client would normally do this, but it's convenient for -// testing. -func WipeTestTable(connectionString string, tableName string) error { - - // 0. Create logger - log := logrus.WithField("connection_string", connectionString) - - // 1. Open client to database - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - return err - } - defer db.Close() - - // 2. Clear database - if _, err := db.Exec(fmt.Sprintf("DELETE FROM %s", tableName)); err != nil { - log.WithError(err).Warn("Error clearing table") - } - return nil -} - -// Write will write the record given by page to the test table in the database -// referenced by connectionString. -func Write(connectionString string, page int) error { - - // 0. Create logger - log := logrus.WithField("connection_string", connectionString) - - // 1. Open client to database - databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - return err - } - defer db.Close() - - // 2. Write record - labels := prometheus.Labels{ - "database_name": databaseName} - writeTimer := prometheus.NewTimer(writeLatency.With(labels)) - writeErrorTimer := prometheus.NewTimer(writeErrorLatency.With(labels)) - if _, err := db.Exec("INSERT INTO are_you_alive_messages (page, message) VALUES (?, ?)", page, "foo"); err != nil { - log.WithError(err).Error("Error inserting into database") - writeErrorTimer.ObserveDuration() - return err - } - writeTimer.ObserveDuration() - return nil -} - -// Read will read the record given by page from the test table in the database -// referenced by connectionString. -func Read(connectionString string, page int) (int, string, error) { - - // 0. Create logger - log := logrus.WithField("connection_string", connectionString) - - // 1. Open client to database - databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - return 0, "", err - } - defer db.Close() - - // 2. Read record - tabletType := ParseTabletType(connectionString) - labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} - readTimer := prometheus.NewTimer(readLatency.With(labels)) - readErrorTimer := prometheus.NewTimer(readErrorLatency.With(labels)) - row := db.QueryRow("SELECT * FROM are_you_alive_messages WHERE page=?", page) - var readID int - var readMsg string - if err := row.Scan(&readID, &readMsg); err != nil { - if err == sql.ErrNoRows { - // If our error is just that we didn't find anything, don't treat - // this as an error or a success. Just return and let the caller - // deal with it so we don't mess up our metrics. - return 0, "", err - } - log.WithError(err).Error("Error connecting to database") - readErrorTimer.ObserveDuration() - return 0, "", err - } - logrus.WithFields(logrus.Fields{ - "readId": readID, - "readMsg": readMsg, - }).Debug("Successfully read row") - readTimer.ObserveDuration() - return readID, readMsg, nil -} - -// Count will count all the documents in the test table in the database -// referenced by connectionString. -func Count(connectionString string) (int, error) { - - // 0. Create logger - log := logrus.WithField("connection_string", connectionString) - - // 1. Open client to database - databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - return 0, err - } - defer db.Close() - - // 2. Run Count - tabletType := ParseTabletType(connectionString) - labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} - countTimer := prometheus.NewTimer(countLatency.With(labels)) - countErrorTimer := prometheus.NewTimer(countErrorLatency.With(labels)) - row := db.QueryRow("SELECT COUNT(*) FROM are_you_alive_messages") - var count int - if err := row.Scan(&count); err != nil { - log.WithError(err).Error("Error running count") - countErrorTimer.ObserveDuration() - return 0, err - } - logrus.WithFields(logrus.Fields{ - "count": count, - }).Debug("Successfully ran count") - countTimer.ObserveDuration() - return count, nil -} - -// Delete will delete the record given by page from the test table in the -// database referenced by connectionString. -func Delete(connectionString string, page int) error { - - // 0. Create logger - log := logrus.WithFields(logrus.Fields{ - "connection_string": connectionString, - "page": page, - }) - - // 1. Open client to database - databaseName := ParseDBName(connectionString) - labels := prometheus.Labels{ - "database_name": databaseName} - deleteTimer := prometheus.NewTimer(deleteLatency.With(labels)) - deleteErrorTimer := prometheus.NewTimer(deleteErrorLatency.With(labels)) - db, err := openDatabase(connectionString) - if err != nil { - log.WithError(err).Error("Error opening database") - deleteErrorTimer.ObserveDuration() - return err - } - defer db.Close() - - // 2. Delete record - if _, err := db.Exec("DELETE FROM are_you_alive_messages WHERE page=?", page); err != nil { - log.WithError(err).Error("Error deleting record") - deleteErrorTimer.ObserveDuration() - return err - } - deleteTimer.ObserveDuration() - return nil -} diff --git a/examples/are-you-alive/prometheus.yml b/examples/are-you-alive/prometheus.yml deleted file mode 100644 index d968a28136d..00000000000 --- a/examples/are-you-alive/prometheus.yml +++ /dev/null @@ -1,34 +0,0 @@ -# my global config -global: - scrape_interval: 5s # By default, scrape targets every 5 seconds. - evaluation_interval: 5s # By default, scrape targets every 5 seconds. - # scrape_timeout is set to the global default (10s). - - # Attach these labels to any time series or alerts when communicating with - # external systems (federation, remote storage, Alertmanager). - external_labels: - monitor: 'local-integration-test' - -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. -rule_files: - # - "first.rules" - # - "second.rules" - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: - # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # Override the global default and scrape targets from this job every 5 seconds. - scrape_interval: 5s - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['localhost:9090'] - - job_name: "app" - scrape_interval: "5s" - static_configs: - - targets: ['app:8080'] diff --git a/examples/are-you-alive/schemas/README.md b/examples/are-you-alive/schemas/README.md deleted file mode 100644 index 25a0db86c47..00000000000 --- a/examples/are-you-alive/schemas/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Test Schemas - -MySQL schemas and Vitess schemas that must be applied to your cluster to use -this test helper. They should be applied using `vtctlclient` like this: - -``` -vtctlclient --server "" ApplySchema -- --sql "$(cat create_test_table.sql)" -vtctlclient --server "" ApplyVSchema -- --vschema "$(cat vschema.json)" -``` diff --git a/examples/are-you-alive/schemas/create_test_table.sql b/examples/are-you-alive/schemas/create_test_table.sql deleted file mode 100644 index c382d343529..00000000000 --- a/examples/are-you-alive/schemas/create_test_table.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS are_you_alive_messages ( - page INT, - message VARCHAR(255) NOT NULL, - PRIMARY KEY (page) -) - diff --git a/examples/are-you-alive/schemas/vschema.json b/examples/are-you-alive/schemas/vschema.json deleted file mode 100644 index bf8df1b6e64..00000000000 --- a/examples/are-you-alive/schemas/vschema.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "sharded": true, - "vindexes": { - "hash": { - "type": "hash" - } - }, - "tables": { - "are_you_alive_messages": { - "column_vindexes": [ - { - "column": "page", - "name": "hash" - } - ] - } - } -} diff --git a/examples/backups/create_commerce_schema.sql b/examples/backups/create_commerce_schema.sql index 68c52fefebb..f24689a068f 100644 --- a/examples/backups/create_commerce_schema.sql +++ b/examples/backups/create_commerce_schema.sql @@ -1,11 +1,11 @@ -create table product( +create table if not exists product( sku varbinary(128), description varbinary(128), price bigint, primary key(sku) ) ENGINE=InnoDB; -create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into customer_seq(id, next_id, cache) values(0, 1000, 100); -create table order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into order_seq(id, next_id, cache) values(0, 1000, 100); diff --git a/examples/backups/create_customer_schema.sql b/examples/backups/create_customer_schema.sql index 07a614ffd4b..166a56e4c02 100644 --- a/examples/backups/create_customer_schema.sql +++ b/examples/backups/create_customer_schema.sql @@ -1,13 +1,13 @@ -create table customer( +create table if not exists customer( customer_id bigint not null, email varbinary(128), primary key(customer_id) ) ENGINE=InnoDB; -create table corder( +create table if not exists corder( order_id bigint not null, customer_id bigint, sku varbinary(128), price bigint, primary key(order_id) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/common/lib/utils.sh b/examples/common/lib/utils.sh index 24e776c84a9..842a1a2cec4 100644 --- a/examples/common/lib/utils.sh +++ b/examples/common/lib/utils.sh @@ -117,3 +117,7 @@ function fail() { echo "ERROR: ${1}" exit 1 } + +function output() { + echo -e "$@" +} diff --git a/examples/common/scripts/vtadmin-up.sh b/examples/common/scripts/vtadmin-up.sh index 17407ecb9c5..b6a2564713c 100755 --- a/examples/common/scripts/vtadmin-up.sh +++ b/examples/common/scripts/vtadmin-up.sh @@ -22,7 +22,6 @@ vtadmin \ --rbac \ --rbac-config="${script_dir}/../vtadmin/rbac.yaml" \ --cluster "id=${cluster_name},name=${cluster_name},discovery=staticfile,discovery-staticfile-path=${script_dir}/../vtadmin/discovery.json,tablet-fqdn-tmpl={{ .Tablet.Hostname }}:15{{ .Tablet.Alias.Uid }}" \ - --cluster "id=prod,name=prod,discovery=staticfile,discovery-staticfile-path=./vtadmin/discovery.json,tablet-fqdn-tmpl={{ .Tablet.Hostname }}:15{{ .Tablet.Alias.Uid }}" \ > "${log_dir}/vtadmin-api.out" 2>&1 & vtadmin_api_pid=$! @@ -48,6 +47,30 @@ done # Check one last time [[ $(curl -s "http://localhost:${vtadmin_api_port}/api/clusters") == "${expected_cluster_result}" ]] || fail "vtadmin failed to discover the running example Vitess cluster." +# Download nvm and node +if [[ -z ${NVM_DIR} ]]; then + export NVM_DIR="$HOME/.nvm" +fi + +if [[ -z ${NODE_VERSION} ]]; then + export NODE_VERSION="16" +fi + +output "\nInstalling nvm...\n" + +if [ -d "$NVM_DIR" ]; then + output "\033[1;32mnvm is already installed!\033[0m" +else + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash && output "\033[1;32mnvm is installed!\033[0m" || fail "\033[1;32mnvm failed to install!\033[0m" +fi + +source "$NVM_DIR/nvm.sh" + +output "\nConfiguring Node.js $NODE_VERSION\n" +nvm install "$NODE_VERSION" || fail "Could not install nvm $NODE_VERSION." +nvm use "$NODE_VERSION" || fail "Could not use nvm $NODE_VERSION." +nvm use "$NODE_VERSION" || fail "Could not use nvm $NODE_VERSION." + # As a TODO, it'd be nice to make the assumption that vtadmin-web is already # installed and built (since we assume that `make` has already been run for # other Vitess components.) diff --git a/examples/compose/config/init_db.sql b/examples/compose/config/init_db.sql index d29f16073cd..8239d5ed5ec 100644 --- a/examples/compose/config/init_db.sql +++ b/examples/compose/config/init_db.sql @@ -3,6 +3,12 @@ ############################################################################### # Equivalent of mysql_secure_installation ############################################################################### +# We need to ensure that super_read_only is disabled so that we can execute +# these commands. Note that disabling it does NOT disable read_only. +# We save the current value so that we only re-enable it at the end if it was +# enabled before. +SET @original_super_read_only=IF(@@global.super_read_only=1, 'ON', 'OFF'); +SET GLOBAL super_read_only='OFF'; # Changes during the init db should not make it to the binlog. # They could potentially create errant transactions on replicas. SET sql_log_bin = 0; @@ -67,3 +73,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, FLUSH PRIVILEGES; RESET SLAVE ALL; RESET MASTER; + +# custom sql is used to add custom scripts like creating users/passwords. We use it in our tests +# {{custom_sql}} + +# We need to set super_read_only back to what it was before +SET GLOBAL super_read_only=IFNULL(@original_super_read_only, 'ON'); diff --git a/examples/compose/external_db/mysql/commerce.sql b/examples/compose/external_db/mysql/commerce.sql index 8154d91e7f5..cdb909b021b 100644 --- a/examples/compose/external_db/mysql/commerce.sql +++ b/examples/compose/external_db/mysql/commerce.sql @@ -1,7 +1,7 @@ CREATE DATABASE IF NOT EXISTS commerce; USE commerce; DROP TABLE IF EXISTS users; -CREATE TABLE users ( +CREATE TABLE IF NOT EXISTS users ( device_id BIGINT, first_name VARCHAR(50), last_name VARCHAR(50), @@ -17,4 +17,4 @@ CREATE TABLE users ( LOAD DATA LOCAL INFILE '/docker-entrypoint-initdb.d/dataset.csv' INTO TABLE users FIELDS TERMINATED BY ','; -ALTER TABLE users ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; \ No newline at end of file +ALTER TABLE users ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY; diff --git a/examples/compose/tables/create_dinosaurs.sql b/examples/compose/tables/create_dinosaurs.sql index ee9a5b624da..1887865d204 100644 --- a/examples/compose/tables/create_dinosaurs.sql +++ b/examples/compose/tables/create_dinosaurs.sql @@ -1,6 +1,6 @@ -CREATE TABLE dinosaurs ( +CREATE TABLE IF NOT EXISTS dinosaurs ( id BIGINT UNSIGNED, time_created_ns BIGINT UNSIGNED, name VARCHAR(255), PRIMARY KEY (id) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/create_eggs.sql b/examples/compose/tables/create_eggs.sql index 7e74c50b5a1..e3d982c6315 100644 --- a/examples/compose/tables/create_eggs.sql +++ b/examples/compose/tables/create_eggs.sql @@ -1,6 +1,6 @@ -CREATE TABLE eggs ( +CREATE TABLE IF NOT EXISTS eggs ( id BIGINT UNSIGNED, time_created_ns BIGINT UNSIGNED, species VARCHAR(255), PRIMARY KEY (id) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/create_messages.sql b/examples/compose/tables/create_messages.sql index 44c4cc16e87..2cf58e0f3dc 100644 --- a/examples/compose/tables/create_messages.sql +++ b/examples/compose/tables/create_messages.sql @@ -1,6 +1,6 @@ -CREATE TABLE messages ( +CREATE TABLE IF NOT EXISTS messages ( page BIGINT(20) UNSIGNED, time_created_ns BIGINT(20) UNSIGNED, message VARCHAR(10000), PRIMARY KEY (page, time_created_ns) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/create_messages_message_lookup.sql b/examples/compose/tables/create_messages_message_lookup.sql index 1eb667dac93..da256b3c24b 100644 --- a/examples/compose/tables/create_messages_message_lookup.sql +++ b/examples/compose/tables/create_messages_message_lookup.sql @@ -1,7 +1,7 @@ -CREATE TABLE messages_message_lookup ( +CREATE TABLE IF NOT EXISTS messages_message_lookup ( id BIGINT NOT NULL AUTO_INCREMENT, page BIGINT UNSIGNED, message VARCHAR(1000), PRIMARY KEY (id), UNIQUE KEY idx_message_page (`message`, `page`) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/create_tokens.sql b/examples/compose/tables/create_tokens.sql index 69f1be03dec..0999ef5d278 100644 --- a/examples/compose/tables/create_tokens.sql +++ b/examples/compose/tables/create_tokens.sql @@ -1,6 +1,6 @@ -CREATE TABLE tokens ( +CREATE TABLE IF NOT EXISTS tokens ( page BIGINT(20) UNSIGNED, time_created_ns BIGINT(20) UNSIGNED, token VARCHAR(255) DEFAULT NULL, PRIMARY KEY (page, time_created_ns) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/create_tokens_token_lookup.sql b/examples/compose/tables/create_tokens_token_lookup.sql index d3208fdfc41..d66805e1ab1 100644 --- a/examples/compose/tables/create_tokens_token_lookup.sql +++ b/examples/compose/tables/create_tokens_token_lookup.sql @@ -1,7 +1,7 @@ -CREATE TABLE tokens_token_lookup ( +CREATE TABLE IF NOT EXISTS tokens_token_lookup ( id BIGINT NOT NULL AUTO_INCREMENT, page BIGINT UNSIGNED, token VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY idx_token_page (`token`, `page`) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/examples/compose/tables/lookup_keyspace_schema_file.sql b/examples/compose/tables/lookup_keyspace_schema_file.sql index e9c66144176..37232a050ec 100644 --- a/examples/compose/tables/lookup_keyspace_schema_file.sql +++ b/examples/compose/tables/lookup_keyspace_schema_file.sql @@ -1,4 +1,4 @@ -CREATE TABLE tokens_token_lookup ( +CREATE TABLE IF NOT EXISTS tokens_token_lookup ( id BIGINT NOT NULL AUTO_INCREMENT, page BIGINT UNSIGNED, token VARCHAR(255) DEFAULT NULL, @@ -6,7 +6,7 @@ CREATE TABLE tokens_token_lookup ( UNIQUE KEY idx_token_page (`token`, `page`) ) ENGINE=InnoDB; -CREATE TABLE messages_message_lookup ( +CREATE TABLE IF NOT EXISTS messages_message_lookup ( id BIGINT NOT NULL AUTO_INCREMENT, page BIGINT UNSIGNED, message VARCHAR(1000), diff --git a/examples/compose/tables/test_keyspace_schema_file.sql b/examples/compose/tables/test_keyspace_schema_file.sql index b049e4ef211..cbf7a00c268 100644 --- a/examples/compose/tables/test_keyspace_schema_file.sql +++ b/examples/compose/tables/test_keyspace_schema_file.sql @@ -1,11 +1,11 @@ -CREATE TABLE messages ( +CREATE TABLE IF NOT EXISTS messages ( page BIGINT(20) UNSIGNED, time_created_ns BIGINT(20) UNSIGNED, message VARCHAR(10000), PRIMARY KEY (page, time_created_ns) ) ENGINE=InnoDB; -CREATE TABLE tokens ( +CREATE TABLE IF NOT EXISTS tokens ( page BIGINT(20) UNSIGNED, time_created_ns BIGINT(20) UNSIGNED, token VARCHAR(255) DEFAULT NULL, diff --git a/examples/demo/schema/customer/customer_schema.sql b/examples/demo/schema/customer/customer_schema.sql index aeabb800b10..3e0a604a024 100644 --- a/examples/demo/schema/customer/customer_schema.sql +++ b/examples/demo/schema/customer/customer_schema.sql @@ -1,4 +1,4 @@ -create table customer(customer_id bigint, uname varchar(128), primary key(customer_id)); -create table corder(corder_id bigint, customer_id bigint, product_id bigint, oname varchar(128), primary key(corder_id)); -create table corder_event(corder_event_id bigint, corder_id bigint, ename varchar(128), keyspace_id varbinary(10), primary key(corder_id, corder_event_id)); -create table oname_keyspace_idx(oname varchar(128), corder_id bigint, keyspace_id varbinary(10), primary key(oname, corder_id)); +create table if not exists customer(customer_id bigint, uname varchar(128), primary key(customer_id)); +create table if not exists corder(corder_id bigint, customer_id bigint, product_id bigint, oname varchar(128), primary key(corder_id)); +create table if not exists corder_event(corder_event_id bigint, corder_id bigint, ename varchar(128), keyspace_id varbinary(10), primary key(corder_id, corder_event_id)); +create table if not exists oname_keyspace_idx(oname varchar(128), corder_id bigint, keyspace_id varbinary(10), primary key(oname, corder_id)); diff --git a/examples/demo/schema/product/product_schema.sql b/examples/demo/schema/product/product_schema.sql index 766da1d5838..23fceefe735 100644 --- a/examples/demo/schema/product/product_schema.sql +++ b/examples/demo/schema/product/product_schema.sql @@ -1,8 +1,8 @@ -create table product(product_id bigint auto_increment, pname varchar(128), primary key(product_id)); -create table customer_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists product(product_id bigint auto_increment, pname varchar(128), primary key(product_id)); +create table if not exists customer_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into customer_seq(id, next_id, cache) values(0, 1, 3); -create table corder_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists corder_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into corder_seq(id, next_id, cache) values(0, 1, 3); -create table corder_event_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists corder_event_seq(id bigint, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into corder_event_seq(id, next_id, cache) values(0, 1, 3); -create table corder_keyspace_idx(corder_id bigint not null auto_increment, keyspace_id varbinary(10), primary key(corder_id)); +create table if not exists corder_keyspace_idx(corder_id bigint not null auto_increment, keyspace_id varbinary(10), primary key(corder_id)); diff --git a/examples/local/101_initial_cluster.sh b/examples/local/101_initial_cluster.sh index eb88c856473..73194d6b4d9 100755 --- a/examples/local/101_initial_cluster.sh +++ b/examples/local/101_initial_cluster.sh @@ -71,5 +71,9 @@ vtctldclient ApplyVSchema --vschema-file vschema_commerce_initial.json commerce CELL=zone1 ../common/scripts/vtgate-up.sh # start vtadmin -../common/scripts/vtadmin-up.sh +if [[ -n ${SKIP_VTADMIN} ]]; then + echo -e "\nSkipping VTAdmin! If this is not what you want then please unset the SKIP_VTADMIN env variable in your shell." +else + ../common/scripts/vtadmin-up.sh +fi diff --git a/examples/local/create_commerce_schema.sql b/examples/local/create_commerce_schema.sql index e62e7d2e8bf..d8768d88f82 100644 --- a/examples/local/create_commerce_schema.sql +++ b/examples/local/create_commerce_schema.sql @@ -1,15 +1,15 @@ -create table product( +create table if not exists product( sku varbinary(128), description varbinary(128), price bigint, primary key(sku) ) ENGINE=InnoDB; -create table customer( +create table if not exists customer( customer_id bigint not null auto_increment, email varbinary(128), primary key(customer_id) ) ENGINE=InnoDB; -create table corder( +create table if not exists corder( order_id bigint not null auto_increment, customer_id bigint, sku varbinary(128), diff --git a/examples/local/create_commerce_seq.sql b/examples/local/create_commerce_seq.sql index b4e66c771b6..159323ad8b3 100644 --- a/examples/local/create_commerce_seq.sql +++ b/examples/local/create_commerce_seq.sql @@ -1,4 +1,4 @@ -create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into customer_seq(id, next_id, cache) values(0, 1000, 100); -create table order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into order_seq(id, next_id, cache) values(0, 1000, 100); diff --git a/examples/local/create_test_table.sql b/examples/local/create_test_table.sql index bfb24b766ad..3ce9916900c 100644 --- a/examples/local/create_test_table.sql +++ b/examples/local/create_test_table.sql @@ -1,4 +1,4 @@ -CREATE TABLE messages ( +CREATE TABLE IF NOT EXISTS messages ( page BIGINT(20) UNSIGNED, time_created_ns BIGINT(20) UNSIGNED, message VARCHAR(10000), diff --git a/examples/operator/101_initial_cluster.yaml b/examples/operator/101_initial_cluster.yaml index 325e1291515..19e91fe21b9 100644 --- a/examples/operator/101_initial_cluster.yaml +++ b/examples/operator/101_initial_cluster.yaml @@ -8,14 +8,14 @@ metadata: name: example spec: images: - vtctld: vitess/lite:v16.0.0 - vtadmin: vitess/vtadmin:v16.0.0 - vtgate: vitess/lite:v16.0.0 - vttablet: vitess/lite:v16.0.0 - vtbackup: vitess/lite:v16.0.0 - vtorc: vitess/lite:v16.0.0 + vtctld: vitess/lite:latest + vtadmin: vitess/vtadmin:latest + vtgate: vitess/lite:latest + vttablet: vitess/lite:latest + vtbackup: vitess/lite:latest + vtorc: vitess/lite:latest mysqld: - mysql80Compatible: vitess/lite:v16.0.0 + mysql80Compatible: vitess/lite:latest mysqldExporter: prom/mysqld-exporter:v0.11.0 cells: - name: zone1 @@ -135,6 +135,12 @@ stringData: ############################################################################### # Equivalent of mysql_secure_installation ############################################################################### + # We need to ensure that super_read_only is disabled so that we can execute + # these commands. Note that disabling it does NOT disable read_only. + # We save the current value so that we only re-enable it at the end if it was + # enabled before. + SET @original_super_read_only=IF(@@global.super_read_only=1, 'ON', 'OFF'); + SET GLOBAL super_read_only='OFF'; # Changes during the init db should not make it to the binlog. # They could potentially create errant transactions on replicas. @@ -209,18 +215,16 @@ stringData: SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'vt_filtered'@'localhost'; - # User for Orchestrator (https://github.com/openark/orchestrator). - # TODO: Reenable when the password is randomly generated. - CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_user_password'; - GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD - ON *.* TO 'orc_client_user'@'%'; - GRANT SELECT - ON _vt.* TO 'orc_client_user'@'%'; - FLUSH PRIVILEGES; RESET SLAVE ALL; RESET MASTER; + + # custom sql is used to add custom scripts like creating users/passwords. We use it in our tests + # {{custom_sql}} + + # We need to set super_read_only back to what it was before + SET GLOBAL super_read_only=IFNULL(@original_super_read_only, 'ON'); rbac.yaml: | rules: - resource: "*" diff --git a/examples/operator/201_customer_tablets.yaml b/examples/operator/201_customer_tablets.yaml index 448c8a7190d..d925c348d7b 100644 --- a/examples/operator/201_customer_tablets.yaml +++ b/examples/operator/201_customer_tablets.yaml @@ -4,14 +4,14 @@ metadata: name: example spec: images: - vtctld: vitess/lite:v16.0.0 - vtadmin: vitess/vtadmin:v16.0.0 - vtgate: vitess/lite:v16.0.0 - vttablet: vitess/lite:v16.0.0 - vtbackup: vitess/lite:v16.0.0 - vtorc: vitess/lite:v16.0.0 + vtctld: vitess/lite:latest + vtadmin: vitess/vtadmin:latest + vtgate: vitess/lite:latest + vttablet: vitess/lite:latest + vtbackup: vitess/lite:latest + vtorc: vitess/lite:latest mysqld: - mysql80Compatible: vitess/lite:v16.0.0 + mysql80Compatible: vitess/lite:latest mysqldExporter: prom/mysqld-exporter:v0.11.0 cells: - name: zone1 diff --git a/examples/operator/302_new_shards.yaml b/examples/operator/302_new_shards.yaml index d05d790565a..a86c28b3864 100644 --- a/examples/operator/302_new_shards.yaml +++ b/examples/operator/302_new_shards.yaml @@ -4,14 +4,14 @@ metadata: name: example spec: images: - vtctld: vitess/lite:v16.0.0 - vtadmin: vitess/vtadmin:v16.0.0 - vtgate: vitess/lite:v16.0.0 - vttablet: vitess/lite:v16.0.0 - vtbackup: vitess/lite:v16.0.0 - vtorc: vitess/lite:v16.0.0 + vtctld: vitess/lite:latest + vtadmin: vitess/vtadmin:latest + vtgate: vitess/lite:latest + vttablet: vitess/lite:latest + vtbackup: vitess/lite:latest + vtorc: vitess/lite:latest mysqld: - mysql80Compatible: vitess/lite:v16.0.0 + mysql80Compatible: vitess/lite:latest mysqldExporter: prom/mysqld-exporter:v0.11.0 cells: - name: zone1 diff --git a/examples/operator/306_down_shard_0.yaml b/examples/operator/306_down_shard_0.yaml index 9d31fa0d730..171f00166d0 100644 --- a/examples/operator/306_down_shard_0.yaml +++ b/examples/operator/306_down_shard_0.yaml @@ -4,14 +4,14 @@ metadata: name: example spec: images: - vtctld: vitess/lite:v16.0.0 - vtadmin: vitess/vtadmin:v16.0.0 - vtgate: vitess/lite:v16.0.0 - vttablet: vitess/lite:v16.0.0 - vtbackup: vitess/lite:v16.0.0 - vtorc: vitess/lite:v16.0.0 + vtctld: vitess/lite:latest + vtadmin: vitess/vtadmin:latest + vtgate: vitess/lite:latest + vttablet: vitess/lite:latest + vtbackup: vitess/lite:latest + vtorc: vitess/lite:latest mysqld: - mysql80Compatible: vitess/lite:v16.0.0 + mysql80Compatible: vitess/lite:latest mysqldExporter: prom/mysqld-exporter:v0.11.0 cells: - name: zone1 diff --git a/examples/operator/create_commerce_schema.sql b/examples/operator/create_commerce_schema.sql index e62e7d2e8bf..d8768d88f82 100644 --- a/examples/operator/create_commerce_schema.sql +++ b/examples/operator/create_commerce_schema.sql @@ -1,15 +1,15 @@ -create table product( +create table if not exists product( sku varbinary(128), description varbinary(128), price bigint, primary key(sku) ) ENGINE=InnoDB; -create table customer( +create table if not exists customer( customer_id bigint not null auto_increment, email varbinary(128), primary key(customer_id) ) ENGINE=InnoDB; -create table corder( +create table if not exists corder( order_id bigint not null auto_increment, customer_id bigint, sku varbinary(128), diff --git a/examples/operator/create_commerce_seq.sql b/examples/operator/create_commerce_seq.sql index b4e66c771b6..159323ad8b3 100644 --- a/examples/operator/create_commerce_seq.sql +++ b/examples/operator/create_commerce_seq.sql @@ -1,4 +1,4 @@ -create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into customer_seq(id, next_id, cache) values(0, 1000, 100); -create table order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +create table if not exists order_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; insert into order_seq(id, next_id, cache) values(0, 1000, 100); diff --git a/examples/operator/pf.sh b/examples/operator/pf.sh index c7aaca22a7e..7d784ea2a33 100755 --- a/examples/operator/pf.sh +++ b/examples/operator/pf.sh @@ -9,6 +9,7 @@ process_id3=$! sleep 2 echo "You may point your browser to http://localhost:15000, use the following aliases as shortcuts:" echo 'alias vtctlclient="vtctlclient --server=localhost:15999 --logtostderr"' +echo 'alias vtctldclient="vtctldclient --server=localhost:15999 --logtostderr"' echo 'alias mysql="mysql -h 127.0.0.1 -P 15306 -u user"' echo "Hit Ctrl-C to stop the port forwards" wait $process_id1 diff --git a/examples/region_sharding/create_lookup_schema.sql b/examples/region_sharding/create_lookup_schema.sql index 550a1e399e6..70e7fc7ee8f 100644 --- a/examples/region_sharding/create_lookup_schema.sql +++ b/examples/region_sharding/create_lookup_schema.sql @@ -1,4 +1,4 @@ -CREATE TABLE customer_lookup ( +CREATE TABLE IF NOT EXISTS customer_lookup ( id int NOT NULL, keyspace_id varbinary(128), primary key(id) diff --git a/examples/region_sharding/create_main_schema.sql b/examples/region_sharding/create_main_schema.sql index 6a26ce660e8..9ee4f8d9450 100644 --- a/examples/region_sharding/create_main_schema.sql +++ b/examples/region_sharding/create_main_schema.sql @@ -1,4 +1,4 @@ -CREATE TABLE customer ( +CREATE TABLE IF NOT EXISTS customer ( id int NOT NULL, fullname varbinary(256), nationalid varbinary(256), diff --git a/examples/vtexplain/atomicity_schema.sql b/examples/vtexplain/atomicity_schema.sql index 1bfc40eae4b..fcd93862def 100644 --- a/examples/vtexplain/atomicity_schema.sql +++ b/examples/vtexplain/atomicity_schema.sql @@ -1,4 +1,4 @@ -CREATE TABLE `t1` ( +CREATE TABLE IF NOT EXISTS `t1` ( `c1` bigint unsigned NOT NULL, PRIMARY KEY (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; diff --git a/go.mod b/go.mod index 9d69aec17cb..f7e04db40a3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.19 +go 1.20 require ( cloud.google.com/go/storage v1.29.0 @@ -35,7 +35,6 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/consul/api v1.20.0 github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 @@ -66,6 +65,7 @@ require ( github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.15.0 + github.com/spyzhov/ajson v0.8.0 github.com/stretchr/testify v1.8.2 github.com/tchap/go-patricia v2.3.0+incompatible github.com/tidwall/gjson v1.12.1 @@ -114,6 +114,7 @@ require github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( github.com/cespare/xxhash v1.1.0 github.com/gogo/protobuf v1.3.2 + github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 github.com/kr/pretty v0.3.1 github.com/kr/text v0.2.0 @@ -126,7 +127,6 @@ require ( github.com/segmentio/fasthash v1.0.3 github.com/segmentio/kafka-go v0.4.39 github.com/shopspring/decimal v1.3.1 - github.com/spyzhov/ajson v0.8.0 github.com/tidwall/btree v1.6.0 github.com/twmb/murmur3 v1.1.6 go.opentelemetry.io/otel v1.14.0 diff --git a/go.sum b/go.sum index cbc23ff619e..345eba23c9f 100644 --- a/go.sum +++ b/go.sum @@ -440,9 +440,8 @@ github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -455,7 +454,8 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= diff --git a/go/boost/dataflow/flownode/internal_filter.go b/go/boost/dataflow/flownode/internal_filter.go index d35e13a4428..abb1e7e0d7b 100644 --- a/go/boost/dataflow/flownode/internal_filter.go +++ b/go/boost/dataflow/flownode/internal_filter.go @@ -48,7 +48,6 @@ func (f *Filter) apply(env *evalengine.ExpressionEnv, r sql.Row) bool { func (f *Filter) OnInput(_ *Node, _ processing.Executor, _ dataflow.LocalNodeIdx, rs []sql.Record, _ replay.Context, _ *Map, _ *state.Map) (processing.Result, error) { var newRecords = make([]sql.Record, 0, len(rs)) var env evalengine.ExpressionEnv - env.DefaultCollation = collations.Default() for _, r := range rs { if f.apply(&env, r.Row) { @@ -71,7 +70,6 @@ func (f *Filter) QueryThrough(columns []int, key sql.Row, nodes *Map, states *st var newRecords = make(RowSlice, 0, rows.Len()) var env evalengine.ExpressionEnv - env.DefaultCollation = collations.Default() rows.ForEach(func(r sql.Row) { if f.apply(&env, r) { newRecords = append(newRecords, r) @@ -131,16 +129,10 @@ func NewFilter(src graph.NodeIdx, filter []FilterConditionTuple) *Filter { } } -type fakecolumn int - -func (fc *fakecolumn) ColumnLookup(_ *sqlparser.ColName) (int, error) { - return int(*fc), nil -} -func (fc *fakecolumn) CollationForExpr(_ sqlparser.Expr) collations.ID { - return collations.CollationUtf8mb4ID -} -func (fc *fakecolumn) DefaultCollation() collations.ID { - return collations.CollationUtf8mb4ID +func columnLookup(fakeColumn int) evalengine.ColumnResolver { + return func(name *sqlparser.ColName) (int, error) { + return fakeColumn, nil + } } func NewFilterFromProto(pbfilt *flownodepb.Node_InternalFilter) *Filter { @@ -151,8 +143,10 @@ func NewFilterFromProto(pbfilt *flownodepb.Node_InternalFilter) *Filter { panic(fmt.Errorf("should not fail to deserialize SQL expression %s (%v)", f.Expr, err)) } - transcol := fakecolumn(f.Col) - evalf, err := evalengine.Translate(expr, &transcol) + evalf, err := evalengine.Translate(expr, &evalengine.Config{ + ResolveColumn: columnLookup(f.Col), + Collation: collations.CollationUtf8mb4ID, + }) if err != nil { panic(err) } diff --git a/go/boost/dataflow/flownode/internal_filter_test.go b/go/boost/dataflow/flownode/internal_filter_test.go index 8d45497a36f..4485e00dfb8 100644 --- a/go/boost/dataflow/flownode/internal_filter_test.go +++ b/go/boost/dataflow/flownode/internal_filter_test.go @@ -17,31 +17,26 @@ import ( "vitess.io/vitess/go/vt/vtgate/evalengine" ) -type forceColumn map[string]int - -func (f forceColumn) ColumnLookup(col *sqlparser.ColName) (int, error) { - offset, ok := f[col.Name.Lowered()] - if !ok { - return 0, fmt.Errorf("unexpected column name: %q", col.Name.Lowered()) +func columnLookupFromColMap(colmap map[string]int) evalengine.ColumnResolver { + return func(col *sqlparser.ColName) (int, error) { + offset, ok := colmap[col.Name.Lowered()] + if !ok { + return 0, fmt.Errorf("unexpected column name: %q", col.Name.Lowered()) + } + return offset, nil } - return offset, nil -} - -func (f forceColumn) CollationForExpr(_ sqlparser.Expr) collations.ID { - return collations.CollationUtf8mb4ID -} - -func (f forceColumn) DefaultCollation() collations.ID { - return collations.CollationUtf8mb4ID } func fakeFilter(t *testing.T, expr sqlparser.Expr, columns ...int) FilterConditionTuple { - var colmap = make(forceColumn) + var colmap = make(map[string]int) for n, c := range columns { colmap[fmt.Sprintf("_col%d", n)] = c } - evalexpr, err := evalengine.Translate(expr, colmap) + evalexpr, err := evalengine.Translate(expr, &evalengine.Config{ + ResolveColumn: columnLookupFromColMap(colmap), + Collation: collations.CollationUtf8mb4ID, + }) if err != nil { t.Fatalf("evalengine failed to translate: %v", err) } diff --git a/go/boost/dataflow/flownode/internal_project.go b/go/boost/dataflow/flownode/internal_project.go index 9024d074092..e01430a4d3a 100644 --- a/go/boost/dataflow/flownode/internal_project.go +++ b/go/boost/dataflow/flownode/internal_project.go @@ -81,7 +81,6 @@ func (p *Project) QueryThrough(columns []int, key sql.Row, nodes *Map, states *s result := make(RowSlice, 0, rows.Len()) var env evalengine.ExpressionEnv - env.DefaultCollation = collations.Default() rows.ForEach(func(row sql.Row) { builder := sql.NewRowBuilder(len(proj)) @@ -198,7 +197,6 @@ func (p *Project) OnCommit(_ graph.NodeIdx, remap map[graph.NodeIdx]dataflow.Ind func (p *Project) OnInput(you *Node, ex processing.Executor, from dataflow.LocalNodeIdx, rs []sql.Record, repl replay.Context, domain *Map, states *state.Map) (processing.Result, error) { if emit := p.projections; len(emit) > 0 { var env evalengine.ExpressionEnv - env.DefaultCollation = collations.Default() for i, record := range rs { builder := sql.NewRowBuilder(len(emit)) @@ -333,7 +331,7 @@ func (expr *ProjectedExpr) Type(g *graph.Graph[*Node], src dataflow.IndexPair) ( env.Row = append(env.Row, sqltypes.MakeTrusted(tt.T, nil)) } - tt, err := env.TypeOf(expr.EvalExpr) + tt, err := env.TypeOf(expr.EvalExpr, nil) if err != nil { return sql.Type{}, err } diff --git a/go/boost/server/controller/boostplan/operators/ast_to_op.go b/go/boost/server/controller/boostplan/operators/ast_to_op.go index dfb74dd3326..8633d0f2e09 100644 --- a/go/boost/server/controller/boostplan/operators/ast_to_op.go +++ b/go/boost/server/controller/boostplan/operators/ast_to_op.go @@ -209,7 +209,7 @@ func checkForUnsupported(sel *sqlparser.Select) error { seen := map[string]struct{}{} sqlparser.Rewrite(sel, func(cursor *sqlparser.Cursor) bool { switch cursor.Node().(type) { - case sqlparser.Argument: + case *sqlparser.Argument: switch parent := cursor.Parent().(type) { case *sqlparser.ComparisonExpr: if parent.Operator != sqlparser.EqualOp { @@ -430,7 +430,7 @@ func splitPredicates(expr sqlparser.Expr) (predicates sqlparser.Expr, params []P continue } - if _, ok := comp.Left.(sqlparser.Argument); ok && sqlparser.Equals.Expr(comp.Left, comp.Right) { + if _, ok := comp.Left.(*sqlparser.Argument); ok && sqlparser.Equals.Expr(comp.Left, comp.Right) { // if we are comparing an argument with itself, we can be pretty sure that it's here because of // normalization of literals, and that makes it safe to assume that this comparison will always be true, // since normalization does not treat null-literals as something to normalize @@ -445,8 +445,8 @@ func splitPredicates(expr sqlparser.Expr) (predicates sqlparser.Expr, params []P func extractParam(lft, rgt sqlparser.Expr, op sqlparser.ComparisonExprOperator) *Parameter { if col, cok := lft.(*sqlparser.ColName); cok { switch arg := rgt.(type) { - case sqlparser.Argument: - return &Parameter{Name: string(arg), key: ColumnFromAST(col), Op: op} + case *sqlparser.Argument: + return &Parameter{Name: arg.Name, key: ColumnFromAST(col), Op: op} case sqlparser.ListArg: return &Parameter{Name: string(arg), key: ColumnFromAST(col), Op: op} } @@ -687,7 +687,7 @@ func (conv *Converter) unionToOperator( // UNION can be used inside a query that has parameters, but the parameters cannot exist inside the UNION err := sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { switch node.(type) { - case sqlparser.Argument, sqlparser.ListArg: + case *sqlparser.Argument, sqlparser.ListArg: return false, &UnsupportedError{ AST: node, Type: ParametersInsideUnion, diff --git a/go/boost/server/controller/boostplan/operators/offset_binding.go b/go/boost/server/controller/boostplan/operators/offset_binding.go index b6c18279b65..511c5c7522e 100644 --- a/go/boost/server/controller/boostplan/operators/offset_binding.go +++ b/go/boost/server/controller/boostplan/operators/offset_binding.go @@ -4,7 +4,6 @@ import ( "golang.org/x/exp/slices" "vitess.io/vitess/go/boost/common/dbg" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/semantics" @@ -219,10 +218,6 @@ func getComparisons(expr sqlparser.Expr) (predicates []*sqlparser.ComparisonExpr func (p *Project) PlanOffsets(node *Node, semTable *semantics.SemTable) error { input := node.Ancestors[0] - lu := &lookup{ - node: input, - semTable: semTable, - } for _, col := range p.Columns { ast, err := col.SingleAST() @@ -246,7 +241,11 @@ func (p *Project) PlanOffsets(node *Node, semTable *semantics.SemTable) error { if err != nil { return err } - eexpr, err := evalengine.Translate(newExpr, lu) + eexpr, err := evalengine.Translate(newExpr, &evalengine.Config{ + ResolveColumn: columnLookup(input, semTable), + ResolveType: semTable.TypeForExpr, + Collation: semTable.Collation, + }) if err != nil { return &UnsupportedError{AST: expr, Type: EvalEngineNotSupported} } @@ -356,7 +355,7 @@ func findOffsets(semTable *semantics.SemTable, input *Node) func(cursor *sqlpars } cursor.Replace(&sqlparser.Offset{ V: offset, - Original: sqlparser.String(col), + Original: expr, }) return false default: @@ -452,25 +451,14 @@ func bindUnionSideOffset(columns Columns, node *Node, st *semantics.SemTable) ([ return offsets, nil } -type lookup struct { - node *Node - semTable *semantics.SemTable -} - -func (lu *lookup) ColumnLookup(col *sqlparser.ColName) (int, error) { - for i, column := range lu.node.Columns { - if column.EqualsAST(lu.semTable, col, true) { - return i, nil +func columnLookup(node *Node, semTable *semantics.SemTable) evalengine.ColumnResolver { + return func(expr *sqlparser.ColName) (int, error) { + for i, column := range node.Columns { + if column.EqualsAST(semTable, expr, true) { + return i, nil + } } + dbg.Bug("column not found during lookup") + return -1, nil } - dbg.Bug("column not found during lookup") - return -1, nil -} - -func (lu *lookup) CollationForExpr(expr sqlparser.Expr) collations.ID { - return lu.semTable.CollationForExpr(expr) -} - -func (lu *lookup) DefaultCollation() collations.ID { - return collations.Default() } diff --git a/go/boost/server/controller/boostplan/operators/upquery_test.go b/go/boost/server/controller/boostplan/operators/upquery_test.go index 3a76ad5b700..6e42a37eae2 100644 --- a/go/boost/server/controller/boostplan/operators/upquery_test.go +++ b/go/boost/server/controller/boostplan/operators/upquery_test.go @@ -35,35 +35,35 @@ func TestOpsToAST(t *testing.T) { }{{ query: "select id, id+a, 420 from user", keys: []int{2}, - res: "select ks_user_0.id, ks_user_0.id + ks_user_0.a, 420 as `literal-420`, 0 as `literal-0` from ks.`user` as ks_user_0 where 420 = :vtg0", + res: "select ks_user_0.id, ks_user_0.id + ks_user_0.a, 420 as `literal-420`, 0 as `literal-0` from ks.`user` as ks_user_0 where 420 = :vtg0 /* NULL_TYPE */", get: parent, }, { query: "select u1.id, u2.a from user u1 join user u2 on u1.a = u2.id", keys: []int{2}, res: "select ks_user_0.a, ks_user_0.id, ks_user_1.a " + "from ks.`user` as ks_user_0, ks.`user` as ks_user_1 " + - "where ks_user_0.a = ks_user_1.id and ks_user_1.a = :vtg0", + "where ks_user_0.a = ks_user_1.id and ks_user_1.a = :vtg0 /* NULL_TYPE */", get: grandParent, }, { query: "select u1.id, u1.a, u2.a from user u1 left join user u2 on u1.id = u2.id", keys: []int{1, 3}, res: "select ks_user_0.id, ks_user_1.id, ks_user_0.a, ks_user_1.a " + "from ks.`user` as ks_user_0 left join ks.`user` as ks_user_1 on ks_user_0.id = ks_user_1.id " + - "where ks_user_1.id = :vtg0 and ks_user_1.a = :vtg1", + "where ks_user_1.id = :vtg0 /* NULL_TYPE */ and ks_user_1.a = :vtg1 /* NULL_TYPE */", get: grandParent, }, { query: "select u1.id, u1.a, u2.a from user u1 left join user u2 on u1.id = u2.id", keys: []int{1, 2}, res: "select ks_user_0.id, ks_user_0.a, ks_user_1.a, 0 as `literal-0` " + "from ks.`user` as ks_user_0 left join ks.`user` as ks_user_1 on ks_user_0.id = ks_user_1.id " + - "where ks_user_0.a = :vtg0 and ks_user_1.a = :vtg1", + "where ks_user_0.a = :vtg0 /* NULL_TYPE */ and ks_user_1.a = :vtg1 /* NULL_TYPE */", get: parent, }, { query: "select count(*), a from user join product on user.id = product.id where price = ? group by a", keys: []int{2}, res: "select count(*), ks_user_0.a, ks_product_0.price " + "from ks.`user` as ks_user_0, ks.product as ks_product_0 " + - "where ks_user_0.id = ks_product_0.id and ks_product_0.price = :vtg0 " + + "where ks_user_0.id = ks_product_0.id and ks_product_0.price = :vtg0 /* NULL_TYPE */ " + "group by ks_user_0.a, ks_product_0.price", get: parent, }, { @@ -73,7 +73,7 @@ func TestOpsToAST(t *testing.T) { // since we know from the join that `user.id = product.id`, we can return user.id in place of product.id res: "select ks_user_0.id, ks_user_0.a, ks_user_0.id, ks_product_0.price " + "from ks.`user` as ks_user_0, ks.product as ks_product_0 " + - "where ks_product_0.price = 12 and ks_user_0.id = ks_product_0.id and ks_user_0.id = :vtg0", + "where ks_product_0.price = 12 and ks_user_0.id = ks_product_0.id and ks_user_0.id = :vtg0 /* NULL_TYPE */", get: parent, }, { query: "select user.a, product.price from user left join product on user.id = product.id and a > 12", diff --git a/go/boost/server/controller/boostplan/ops_to_flow.go b/go/boost/server/controller/boostplan/ops_to_flow.go index 80bb7b397e4..0b8e07f33fa 100644 --- a/go/boost/server/controller/boostplan/ops_to_flow.go +++ b/go/boost/server/controller/boostplan/ops_to_flow.go @@ -351,7 +351,7 @@ func makeGroupByOpNode(mig Migration, node *operators.Node, op *operators.GroupB func checkParametersInExpression(ast sqlparser.SQLNode) error { return sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { switch node.(type) { - case sqlparser.Argument, sqlparser.ListArg: + case *sqlparser.Argument, sqlparser.ListArg: return false, &operators.UnsupportedError{ AST: ast, Type: operators.ParameterLocation, diff --git a/go/boost/server/controller/boostplan/upquery/upquery.go b/go/boost/server/controller/boostplan/upquery/upquery.go index b5414067440..92c0ffa0ef8 100644 --- a/go/boost/server/controller/boostplan/upquery/upquery.go +++ b/go/boost/server/controller/boostplan/upquery/upquery.go @@ -115,7 +115,7 @@ func (up *Upquery) cacheSingle(mode config.UpqueryMode) error { sqlparserx.AddSelectPredicate(sel, &sqlparser.ComparisonExpr{ Operator: sqlparser.EqualOp, Left: up.output[key], - Right: sqlparser.Argument(sqlparser.DefaultBindVar(i)), + Right: &sqlparser.Argument{Name: sqlparser.DefaultBindVar(i)}, }) } @@ -137,7 +137,7 @@ func (up *Upquery) buildForMany(keys map[sql.Row]bool) (string, map[string]*quer exprs = append(exprs, &sqlparser.ComparisonExpr{ Operator: sqlparser.EqualOp, Left: up.output[col], - Right: sqlparser.Argument(bv), + Right: &sqlparser.Argument{Name: bv}, }) } diff --git a/go/boost/server/instance.go b/go/boost/server/instance.go index bb3f9cdc81f..9cc1ab5b827 100644 --- a/go/boost/server/instance.go +++ b/go/boost/server/instance.go @@ -12,6 +12,7 @@ import ( "storj.io/drpc/drpcserver" "vitess.io/vitess/go/streamlog" + "vitess.io/vitess/go/vt/vtgate/logstats" "vitess.io/vitess/go/boost/boostrpc/service" "vitess.io/vitess/go/vt/discovery" @@ -64,7 +65,7 @@ func NewBoostInstance(log *zap.Logger, ts *topo.Server, tmc toposerver.TabletMan cfg = config.DefaultConfig() } - vtgate.QueryLogger = streamlog.New("vtboost", 10) + vtgate.QueryLogger = streamlog.New[*logstats.LogStats]("vtboost", 10) tp := toposerver.NewTopoServer(log, ts, tmc, clusterID) instanceID := uuid.New() diff --git a/go/boost/topo/watcher/queries.go b/go/boost/topo/watcher/queries.go index 7e1573099cb..d7264f32128 100644 --- a/go/boost/topo/watcher/queries.go +++ b/go/boost/topo/watcher/queries.go @@ -23,14 +23,14 @@ func GenerateBoundsForQuery(stmt sqlparser.Statement, keySchema []*querypb.Field // Common node types that never contain expressions but create a lot of object // allocations. return false, nil - case sqlparser.Argument: + case *sqlparser.Argument: pos := slices.IndexFunc(keySchema, func(f *querypb.Field) bool { - return f.Name == string(node) && (f.Flags&uint32(querypb.MySqlFlag_MULTIPLE_KEY_FLAG)) == 0 + return f.Name == node.Name && (f.Flags&uint32(querypb.MySqlFlag_MULTIPLE_KEY_FLAG)) == 0 }) if pos < 0 { return false, fmt.Errorf("did not find placeholder in key schema for argument %v", sqlparser.CanonicalString(node)) } - bounds = append(bounds, &vtboostpb.Materialization_Bound{Name: string(node), Pos: int64(pos)}) + bounds = append(bounds, &vtboostpb.Materialization_Bound{Name: node.Name, Pos: int64(pos)}) arguments++ case sqlparser.ListArg: pos := slices.IndexFunc(keySchema, func(f *querypb.Field) bool { @@ -74,14 +74,14 @@ func matchParametrizedQuery(keyOut []*querypb.BindVariable, stmt sqlparser.State // Common node types that never contain expressions but create a lot of object // allocations. return false, nil - case sqlparser.Argument: + case *sqlparser.Argument: if pos == len(bounds) { return false, errMismatch } bound := bounds[pos] pos++ - bv2, ok := bvars[string(node)] + bv2, ok := bvars[node.Name] if !ok { return false, errMismatch } @@ -120,7 +120,7 @@ func matchParametrizedQuery(keyOut []*querypb.BindVariable, stmt sqlparser.State func ParametrizeQuery(q sqlparser.Statement) string { var buf = sqlparser.NewTrackedBuffer(func(buf *sqlparser.TrackedBuffer, node sqlparser.SQLNode) { switch node.(type) { - case sqlparser.Argument, sqlparser.ListArg, *sqlparser.Literal: + case *sqlparser.Argument, sqlparser.ListArg, *sqlparser.Literal: buf.WriteByte('?') case *sqlparser.ParsedComments: default: diff --git a/go/cmd/mysqlctl/mysqlctl.go b/go/cmd/mysqlctl/mysqlctl.go index 02431cf20a6..6873cc2bf56 100644 --- a/go/cmd/mysqlctl/mysqlctl.go +++ b/go/cmd/mysqlctl/mysqlctl.go @@ -39,7 +39,7 @@ import ( var ( mysqlPort = 3306 - tabletUID = uint(41983) + tabletUID = uint32(41983) mysqlSocket string ) @@ -51,7 +51,7 @@ func init() { dbconfigs.RegisterFlags(dbconfigs.Dba) servenv.OnParse(func(fs *pflag.FlagSet) { fs.IntVar(&mysqlPort, "mysql_port", mysqlPort, "MySQL port") - fs.UintVar(&tabletUID, "tablet_uid", tabletUID, "Tablet UID") + fs.Uint32Var(&tabletUID, "tablet_uid", tabletUID, "Tablet UID") fs.StringVar(&mysqlSocket, "mysql_socket", mysqlSocket, "Path to the mysqld socket file") acl.RegisterFlags(fs) @@ -62,7 +62,7 @@ func initConfigCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // Generate my.cnf from scratch and use it to find mysqld. - mysqld, cnf, err := mysqlctl.CreateMysqldAndMycnf(uint32(tabletUID), mysqlSocket, int32(mysqlPort)) + mysqld, cnf, err := mysqlctl.CreateMysqldAndMycnf(tabletUID, mysqlSocket, mysqlPort) if err != nil { return fmt.Errorf("failed to initialize mysql config: %v", err) } @@ -79,7 +79,7 @@ func initCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // Generate my.cnf from scratch and use it to find mysqld. - mysqld, cnf, err := mysqlctl.CreateMysqldAndMycnf(uint32(tabletUID), mysqlSocket, int32(mysqlPort)) + mysqld, cnf, err := mysqlctl.CreateMysqldAndMycnf(tabletUID, mysqlSocket, mysqlPort) if err != nil { return fmt.Errorf("failed to initialize mysql config: %v", err) } @@ -97,7 +97,7 @@ func reinitConfigCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // There ought to be an existing my.cnf, so use it to find mysqld. - mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(uint32(tabletUID)) + mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(tabletUID) if err != nil { return fmt.Errorf("failed to find mysql config: %v", err) } @@ -114,7 +114,7 @@ func shutdownCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // There ought to be an existing my.cnf, so use it to find mysqld. - mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(uint32(tabletUID)) + mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(tabletUID) if err != nil { return fmt.Errorf("failed to find mysql config: %v", err) } @@ -135,7 +135,7 @@ func startCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // There ought to be an existing my.cnf, so use it to find mysqld. - mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(uint32(tabletUID)) + mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(tabletUID) if err != nil { return fmt.Errorf("failed to find mysql config: %v", err) } @@ -155,7 +155,7 @@ func teardownCmd(subFlags *pflag.FlagSet, args []string) error { _ = subFlags.Parse(args) // There ought to be an existing my.cnf, so use it to find mysqld. - mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(uint32(tabletUID)) + mysqld, cnf, err := mysqlctl.OpenMysqldAndMycnf(tabletUID) if err != nil { return fmt.Errorf("failed to find mysql config: %v", err) } diff --git a/go/cmd/mysqlctld/mysqlctld.go b/go/cmd/mysqlctld/mysqlctld.go index 67dfe53757f..39b9ac11490 100644 --- a/go/cmd/mysqlctld/mysqlctld.go +++ b/go/cmd/mysqlctld/mysqlctld.go @@ -41,7 +41,7 @@ var ( cnf *mysqlctl.Mycnf mysqlPort = 3306 - tabletUID = uint(41983) + tabletUID = uint32(41983) mysqlSocket string // mysqlctl init flags @@ -60,7 +60,7 @@ func init() { dbconfigs.RegisterFlags(dbconfigs.Dba) servenv.OnParse(func(fs *pflag.FlagSet) { fs.IntVar(&mysqlPort, "mysql_port", mysqlPort, "MySQL port") - fs.UintVar(&tabletUID, "tablet_uid", tabletUID, "Tablet UID") + fs.Uint32Var(&tabletUID, "tablet_uid", tabletUID, "Tablet UID") fs.StringVar(&mysqlSocket, "mysql_socket", mysqlSocket, "Path to the mysqld socket file") fs.DurationVar(&waitTime, "wait_time", waitTime, "How long to wait for mysqld startup or shutdown") fs.StringVar(&initDBSQLFile, "init_db_sql_file", initDBSQLFile, "Path to .sql file to run after mysqld initialization") @@ -84,13 +84,13 @@ func main() { // Start or Init mysqld as needed. ctx, cancel := context.WithTimeout(context.Background(), waitTime) - mycnfFile := mysqlctl.MycnfFile(uint32(tabletUID)) + mycnfFile := mysqlctl.MycnfFile(tabletUID) if _, statErr := os.Stat(mycnfFile); os.IsNotExist(statErr) { // Generate my.cnf from scratch and use it to find mysqld. log.Infof("mycnf file (%s) doesn't exist, initializing", mycnfFile) var err error - mysqld, cnf, err = mysqlctl.CreateMysqldAndMycnf(uint32(tabletUID), mysqlSocket, int32(mysqlPort)) + mysqld, cnf, err = mysqlctl.CreateMysqldAndMycnf(tabletUID, mysqlSocket, mysqlPort) if err != nil { log.Errorf("failed to initialize mysql config: %v", err) exit.Return(1) @@ -106,7 +106,7 @@ func main() { log.Infof("mycnf file (%s) already exists, starting without init", mycnfFile) var err error - mysqld, cnf, err = mysqlctl.OpenMysqldAndMycnf(uint32(tabletUID)) + mysqld, cnf, err = mysqlctl.OpenMysqldAndMycnf(tabletUID) if err != nil { log.Errorf("failed to find mysql config: %v", err) exit.Return(1) diff --git a/go/cmd/vtaclcheck/vtaclcheck.go b/go/cmd/vtaclcheck/vtaclcheck.go index 05dabbabd9f..74e9261e67b 100644 --- a/go/cmd/vtaclcheck/vtaclcheck.go +++ b/go/cmd/vtaclcheck/vtaclcheck.go @@ -23,7 +23,6 @@ import ( "vitess.io/vitess/go/acl" "vitess.io/vitess/go/exit" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtaclcheck" @@ -62,8 +61,6 @@ func run() error { StaticAuthFile: staticAuthFile, } - log.V(100).Infof("acl_file %s\nstatic_auth_file %s\n", aclFile, staticAuthFile) - if err := vtaclcheck.Init(opts); err != nil { return err } diff --git a/go/cmd/vtbackup/vtbackup.go b/go/cmd/vtbackup/vtbackup.go index df00a7eafcf..ad558f7fd50 100644 --- a/go/cmd/vtbackup/vtbackup.go +++ b/go/cmd/vtbackup/vtbackup.go @@ -259,7 +259,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back }() // Start up mysqld as if we are mysqlctld provisioning a fresh tablet. - mysqld, mycnf, err := mysqlctl.CreateMysqldAndMycnf(tabletAlias.Uid, mysqlSocket, int32(mysqlPort)) + mysqld, mycnf, err := mysqlctl.CreateMysqldAndMycnf(tabletAlias.Uid, mysqlSocket, mysqlPort) if err != nil { return fmt.Errorf("failed to initialize mysql config: %v", err) } @@ -274,9 +274,9 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back defer func() { // Be careful not to use the original context, because we don't want to // skip shutdown just because we timed out waiting for other things. - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - if err := mysqld.Shutdown(ctx, mycnf, false); err != nil { + mysqlShutdownCtx, mysqlShutdownCancel := context.WithTimeout(context.Background(), 30*time.Second) + defer mysqlShutdownCancel() + if err := mysqld.Shutdown(mysqlShutdownCtx, mycnf, false); err != nil { log.Errorf("failed to shutdown mysqld: %v", err) } }() @@ -312,6 +312,19 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back if err := mysqld.ResetReplication(ctx); err != nil { return fmt.Errorf("can't reset replication: %v", err) } + // We need to switch off super_read_only before we create the database. + resetFunc, err := mysqld.SetSuperReadOnly(false) + if err != nil { + return fmt.Errorf("failed to disable super_read_only during backup: %v", err) + } + if resetFunc != nil { + defer func() { + err := resetFunc() + if err != nil { + log.Error("Failed to set super_read_only back to its original value during backup") + } + }() + } cmd := mysqlctl.GenerateInitialBinlogEntry() if err := mysqld.ExecuteSuperQueryList(ctx, []string{cmd}); err != nil { return err @@ -346,9 +359,9 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back var restorePos mysql.Position switch err { case nil: - log.Infof("Successfully restored from backup at replication position %v", restorePos) // if err is nil, we expect backupManifest to be non-nil restorePos = backupManifest.Position + log.Infof("Successfully restored from backup at replication position %v", restorePos) case mysqlctl.ErrNoBackup: // There is no backup found, but we may be taking the initial backup of a shard if !allowFirstBackup { @@ -378,6 +391,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back return fmt.Errorf("error starting replication: %v", err) } + log.Info("get the current primary replication position, and wait until we catch up") // Get the current primary replication position, and wait until we catch up // to that point. We do this instead of looking at ReplicationLag // because that value can @@ -391,8 +405,8 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back var primaryPos mysql.Position err = retryOnError(ctx, func() error { // Add a per-operation timeout so we re-read topo if the primary is unreachable. - opCtx, cancel := context.WithTimeout(ctx, operationTimeout) - defer cancel() + opCtx, optCancel := context.WithTimeout(ctx, operationTimeout) + defer optCancel() pos, err := getPrimaryPosition(opCtx, tmc, topoServer) if err != nil { return fmt.Errorf("can't get the primary replication position: %v", err) @@ -401,9 +415,11 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back return nil }) if err != nil { - return err + return fmt.Errorf("can't get the primary replication position after all retries: %v", err) } + log.Infof("takeBackup: primary position is: %s", primaryPos.String()) + // Remember the time when we fetched the primary position, not when we caught // up to it, so the timestamp on our backup is honest (assuming we make it // to the goal position). @@ -414,7 +430,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back for { select { case <-ctx.Done(): - return ctx.Err() + return fmt.Errorf("error in replication catch up: %v", ctx.Err()) case <-time.After(time.Second): } @@ -535,7 +551,7 @@ func startReplication(ctx context.Context, mysqld mysqlctl.MysqlDaemon, topoServ } // Stop replication (in case we're restarting), set replication source, and start replication. - if err := mysqld.SetReplicationSource(ctx, ti.Tablet.MysqlHostname, int(ti.Tablet.MysqlPort), true /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { + if err := mysqld.SetReplicationSource(ctx, ti.Tablet.MysqlHostname, ti.Tablet.MysqlPort, true /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { return vterrors.Wrap(err, "MysqlDaemon.SetReplicationSource failed") } return nil diff --git a/go/cmd/vtcombo/main.go b/go/cmd/vtcombo/main.go index 52cf2f0c8d2..a6870a017fb 100644 --- a/go/cmd/vtcombo/main.go +++ b/go/cmd/vtcombo/main.go @@ -88,7 +88,7 @@ func startMysqld(uid uint32) (*mysqlctl.Mysqld, *mysqlctl.Mycnf) { var err error if _, statErr := os.Stat(mycnfFile); os.IsNotExist(statErr) { - mysqld, cnf, err = mysqlctl.CreateMysqldAndMycnf(uid, "", int32(*mysqlPort)) + mysqld, cnf, err = mysqlctl.CreateMysqldAndMycnf(uid, "", *mysqlPort) if err != nil { log.Errorf("failed to initialize mysql config :%v", err) exit.Return(1) @@ -317,7 +317,7 @@ type vtcomboMysqld struct { } // SetReplicationSource implements the MysqlDaemon interface -func (mysqld *vtcomboMysqld) SetReplicationSource(ctx context.Context, host string, port int, replicationStopBefore bool, replicationStartAfter bool) error { +func (mysqld *vtcomboMysqld) SetReplicationSource(ctx context.Context, host string, port int32, stopReplicationBefore bool, startReplicationAfter bool) error { return nil } diff --git a/go/cmd/vtctldclient/command/shards.go b/go/cmd/vtctldclient/command/shards.go index a27421a9a87..231a44b3949 100644 --- a/go/cmd/vtctldclient/command/shards.go +++ b/go/cmd/vtctldclient/command/shards.go @@ -61,14 +61,14 @@ that shard.`, DisableFlagsInUseLine: true, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - n, err := strconv.ParseInt(cmd.Flags().Arg(0), 10, 64) + n, err := strconv.Atoi(cmd.Flags().Arg(0)) if err != nil { return err } cli.FinishedParsing(cmd) - shards, err := key.GenerateShardRanges(int(n)) + shards, err := key.GenerateShardRanges(n) if err != nil { return err } @@ -504,7 +504,7 @@ func commandSourceShardAdd(cmd *cobra.Command, args []string) error { return err } - uid, err := strconv.ParseUint(cmd.Flags().Arg(1), 10, 32) + uid, err := strconv.ParseInt(cmd.Flags().Arg(1), 10, 32) if err != nil { return fmt.Errorf("Failed to parse SourceShard uid: %w", err) // nolint } @@ -527,7 +527,7 @@ func commandSourceShardAdd(cmd *cobra.Command, args []string) error { resp, err := client.SourceShardAdd(commandCtx, &vtctldatapb.SourceShardAddRequest{ Keyspace: ks, Shard: shard, - Uid: uint32(uid), + Uid: int32(uid), SourceKeyspace: sks, SourceShard: sshard, KeyRange: kr, @@ -568,7 +568,7 @@ func commandSourceShardDelete(cmd *cobra.Command, args []string) error { resp, err := client.SourceShardDelete(commandCtx, &vtctldatapb.SourceShardDeleteRequest{ Keyspace: ks, Shard: shard, - Uid: uint32(uid), + Uid: int32(uid), }) if err != nil { return err diff --git a/go/cmd/vtctldclient/command/workflows.go b/go/cmd/vtctldclient/command/workflows.go index 136c5c42e4c..f783ce9c307 100644 --- a/go/cmd/vtctldclient/command/workflows.go +++ b/go/cmd/vtctldclient/command/workflows.go @@ -18,11 +18,17 @@ package command import ( "fmt" + "sort" + "strings" "github.com/spf13/cobra" "vitess.io/vitess/go/cmd/vtctldclient/cli" + "vitess.io/vitess/go/textutil" + "vitess.io/vitess/go/vt/topo/topoproto" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) @@ -35,6 +41,59 @@ var ( Args: cobra.ExactArgs(1), RunE: commandGetWorkflows, } + + // Workflow is a parent command for Workflow* sub commands. + Workflow = &cobra.Command{ + Use: "workflow", + Short: "Administer VReplication workflows (Reshard, MoveTables, etc) in the given keyspace", + DisableFlagsInUseLine: true, + Aliases: []string{"Workflow"}, + Args: cobra.ExactArgs(1), + RunE: commandGetWorkflows, + } + + // WorkflowUpdate makes a WorkflowUpdate gRPC call to a vtctld. + WorkflowUpdate = &cobra.Command{ + Use: "update", + Short: "Update the configuration parameters for a VReplication workflow", + Example: `vtctldclient --server=localhost:15999 workflow --keyspace=customer update --workflow=commerce2customer --cells "zone1" --cells "zone2" -c "zone3,zone4" -c "zone5"`, + DisableFlagsInUseLine: true, + Aliases: []string{"Update"}, + Args: cobra.NoArgs, + PreRunE: func(cmd *cobra.Command, args []string) error { + changes := false + if cmd.Flags().Lookup("cells").Changed { // Validate the provided value(s) + changes = true + for i, cell := range workflowUpdateOptions.Cells { // Which only means trimming whitespace + workflowUpdateOptions.Cells[i] = strings.TrimSpace(cell) + } + } else { + workflowUpdateOptions.Cells = textutil.SimulatedNullStringSlice + } + if cmd.Flags().Lookup("tablet-types").Changed { // Validate the provided value(s) + changes = true + for i, tabletType := range workflowUpdateOptions.TabletTypes { + workflowUpdateOptions.TabletTypes[i] = strings.ToUpper(strings.TrimSpace(tabletType)) + if _, err := topoproto.ParseTabletType(workflowUpdateOptions.TabletTypes[i]); err != nil { + return err + } + } + } else { + workflowUpdateOptions.TabletTypes = textutil.SimulatedNullStringSlice + } + if cmd.Flags().Lookup("on-ddl").Changed { // Validate the provided value + changes = true + if _, ok := binlogdatapb.OnDDLAction_value[strings.ToUpper(workflowUpdateOptions.OnDDL)]; !ok { + return fmt.Errorf("invalid on-ddl value: %s", workflowUpdateOptions.OnDDL) + } + } // Simulated NULL will need to be handled in command + if !changes { + return fmt.Errorf("no configuration options specified to update") + } + return nil + }, + RunE: commandWorkflowUpdate, + } ) var getWorkflowsOptions = struct { @@ -65,7 +124,70 @@ func commandGetWorkflows(cmd *cobra.Command, args []string) error { return nil } +var ( + workflowOptions = struct { + Keyspace string + }{} + workflowUpdateOptions = struct { + Workflow string + Cells []string + TabletTypes []string + OnDDL string + }{} +) + +func commandWorkflowUpdate(cmd *cobra.Command, args []string) error { + cli.FinishedParsing(cmd) + + // We've already validated any provided value, if one WAS provided. + // Now we need to do the mapping from the string representation to + // the enum value. + onddl := int32(textutil.SimulatedNullInt) // Simulated NULL when no value provided + if val, ok := binlogdatapb.OnDDLAction_value[strings.ToUpper(workflowUpdateOptions.OnDDL)]; ok { + onddl = val + } + + req := &vtctldatapb.WorkflowUpdateRequest{ + Keyspace: workflowOptions.Keyspace, + TabletRequest: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflowUpdateOptions.Workflow, + Cells: workflowUpdateOptions.Cells, + TabletTypes: workflowUpdateOptions.TabletTypes, + OnDdl: binlogdatapb.OnDDLAction(onddl), + }, + } + + resp, err := client.WorkflowUpdate(commandCtx, req) + if err != nil { + return err + } + + // Sort the inner TabletInfo slice for deterministic output. + sort.Slice(resp.Details, func(i, j int) bool { + return resp.Details[i].Tablet < resp.Details[j].Tablet + }) + + data, err := cli.MarshalJSON(resp) + if err != nil { + return err + } + + fmt.Printf("%s\n", data) + + return nil +} + func init() { GetWorkflows.Flags().BoolVarP(&getWorkflowsOptions.ShowAll, "show-all", "a", false, "Show all workflows instead of just active workflows.") Root.AddCommand(GetWorkflows) + + Workflow.PersistentFlags().StringVarP(&workflowOptions.Keyspace, "keyspace", "k", "", "Keyspace context for the workflow (required)") + Workflow.MarkPersistentFlagRequired("keyspace") + Root.AddCommand(Workflow) + WorkflowUpdate.Flags().StringVarP(&workflowUpdateOptions.Workflow, "workflow", "w", "", "The workflow you want to update (required)") + WorkflowUpdate.MarkFlagRequired("workflow") + WorkflowUpdate.Flags().StringSliceVarP(&workflowUpdateOptions.Cells, "cells", "c", nil, "New Cell(s) or CellAlias(es) (comma-separated) to replicate from") + WorkflowUpdate.Flags().StringSliceVarP(&workflowUpdateOptions.TabletTypes, "tablet-types", "t", nil, "New source tablet types to replicate from (e.g. PRIMARY,REPLICA,RDONLY)") + WorkflowUpdate.Flags().StringVar(&workflowUpdateOptions.OnDDL, "on-ddl", "", "New instruction on what to do when DDL is encountered in the VReplication stream. Possible values are IGNORE, STOP, EXEC, and EXEC_IGNORE") + Workflow.AddCommand(WorkflowUpdate) } diff --git a/go/cmd/vtexplain/vtexplain.go b/go/cmd/vtexplain/vtexplain.go index 54f645df2ab..2fa59dc0476 100644 --- a/go/cmd/vtexplain/vtexplain.go +++ b/go/cmd/vtexplain/vtexplain.go @@ -22,7 +22,6 @@ import ( "vitess.io/vitess/go/acl" "vitess.io/vitess/go/exit" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtexplain" @@ -147,10 +146,6 @@ func parseAndRun() error { Target: dbName, } - log.V(100).Infof("sql %s\n", sql) - log.V(100).Infof("schema %s\n", schema) - log.V(100).Infof("vschema %s\n", vschema) - vte, err := vtexplain.Init(vschema, schema, ksShardMap, opts) if err != nil { return err diff --git a/go/errors/errors.go b/go/errors/errors.go new file mode 100644 index 00000000000..d3349d320ed --- /dev/null +++ b/go/errors/errors.go @@ -0,0 +1,56 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package errors + +// Wrapped is used to unwrap an error created by errors.Join() in Go 1.20 +type Wrapped interface { + Unwrap() []error +} + +// Unwrap unwraps an error created by errors.Join() in Go 1.20, into its components +func Unwrap(err error) []error { + if err == nil { + return nil + } + if u, ok := err.(Wrapped); ok { + return u.Unwrap() + } + return nil +} + +// Unwrap unwraps an error created by errors.Join() in Go 1.20, into its components, recursively +func UnwrapAll(err error) (errs []error) { + if err == nil { + return nil + } + if u, ok := err.(Wrapped); ok { + for _, e := range u.Unwrap() { + errs = append(errs, UnwrapAll(e)...) + } + return errs + } + return []error{err} +} + +// Unwrap unwraps an error created by errors.Join() in Go 1.20, into its components, recursively, +// and returns one (the first) unwrapped error +func UnwrapFirst(err error) error { + if err == nil { + return nil + } + return UnwrapAll(err)[0] +} diff --git a/go/errors/errors_test.go b/go/errors/errors_test.go new file mode 100644 index 00000000000..32f8f916d6e --- /dev/null +++ b/go/errors/errors_test.go @@ -0,0 +1,99 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package errors + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestUnwrap(t *testing.T) { + err1 := errors.New("err1") + err2 := errors.New("err2") + err3 := errors.New("err3") + err4 := errors.New("err4") + + tt := []struct { + name string + err error + expectUnwrap []error + expectUnwrapAll []error + expectUnwrapFirst error + }{ + { + name: "nil", + expectUnwrap: nil, + expectUnwrapAll: nil, + expectUnwrapFirst: nil, + }, + { + name: "single", + err: err1, + expectUnwrap: nil, + expectUnwrapAll: []error{err1}, + expectUnwrapFirst: err1, + }, + { + name: "wrapped nil", + err: errors.Join(nil), + expectUnwrap: nil, + expectUnwrapAll: nil, + expectUnwrapFirst: nil, + }, + { + name: "single wrapped", + err: errors.Join(err1), + expectUnwrap: []error{err1}, + expectUnwrapAll: []error{err1}, + expectUnwrapFirst: err1, + }, + { + name: "flat wrapped", + err: errors.Join(err1, err2, err3, err4), + expectUnwrap: []error{err1, err2, err3, err4}, + expectUnwrapAll: []error{err1, err2, err3, err4}, + expectUnwrapFirst: err1, + }, + { + name: "double wrapped", + err: errors.Join(errors.Join(err1)), + expectUnwrap: []error{errors.Join(err1)}, + expectUnwrapAll: []error{err1}, + expectUnwrapFirst: err1, + }, + { + name: "double nested wrapped", + err: errors.Join(errors.Join(err1, err2), errors.Join(err3, err4)), + expectUnwrap: []error{errors.Join(err1, err2), errors.Join(err3, err4)}, + expectUnwrapAll: []error{err1, err2, err3, err4}, + expectUnwrapFirst: err1, + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + unwrapped := Unwrap(tc.err) + unwrappedAll := UnwrapAll(tc.err) + unwrappedFirst := UnwrapFirst(tc.err) + + assert.Equal(t, tc.expectUnwrap, unwrapped) + assert.Equal(t, tc.expectUnwrapAll, unwrappedAll) + assert.Equal(t, tc.expectUnwrapFirst, unwrappedFirst) + }) + } +} diff --git a/go/flags/endtoend/mysqlctl.txt b/go/flags/endtoend/mysqlctl.txt index c4e48d2832e..353ab4fec03 100644 --- a/go/flags/endtoend/mysqlctl.txt +++ b/go/flags/endtoend/mysqlctl.txt @@ -75,8 +75,9 @@ Global flags: --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --socket_file string Local unix socket file to listen on --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. - --tablet_uid uint Tablet UID (default 41983) + --tablet_uid uint32 Tablet UID (default 41983) --v Level log level for V logs -v, --version print binary version --vmodule vModuleFlag comma-separated list of pattern=N settings for file-filtered logging diff --git a/go/flags/endtoend/mysqlctld.txt b/go/flags/endtoend/mysqlctld.txt index 3ebe8a50000..5bf98a78ddc 100644 --- a/go/flags/endtoend/mysqlctld.txt +++ b/go/flags/endtoend/mysqlctld.txt @@ -86,8 +86,9 @@ Usage of mysqlctld: --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --socket_file string Local unix socket file to listen on --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. - --tablet_uid uint Tablet UID (default 41983) + --tablet_uid uint32 Tablet UID (default 41983) --v Level log level for V logs -v, --version print binary version --vmodule vModuleFlag comma-separated list of pattern=N settings for file-filtered logging diff --git a/go/flags/endtoend/vtbackup.txt b/go/flags/endtoend/vtbackup.txt index 42fb5a50f35..7c9545f7940 100644 --- a/go/flags/endtoend/vtbackup.txt +++ b/go/flags/endtoend/vtbackup.txt @@ -10,7 +10,7 @@ Usage of vtbackup: --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) --backup_storage_compress if set, the backup files will be compressed. (default true) --backup_storage_implementation string Which backup storage implementation to use for creating and restoring backups. - --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, in parallel, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) --builtinbackup-file-read-buffer-size uint read files using an IO buffer of this many bytes. Golang defaults are used when set to 0. --builtinbackup-file-write-buffer-size uint write files using an IO buffer of this many bytes. Golang defaults are used when set to 0. (default 2097152) --builtinbackup_mysqld_timeout duration how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) diff --git a/go/flags/endtoend/vtctld.txt b/go/flags/endtoend/vtctld.txt index e5660a8910f..60dc131bdf9 100644 --- a/go/flags/endtoend/vtctld.txt +++ b/go/flags/endtoend/vtctld.txt @@ -10,7 +10,7 @@ Usage of vtctld: --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) --backup_storage_compress if set, the backup files will be compressed. (default true) --backup_storage_implementation string Which backup storage implementation to use for creating and restoring backups. - --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, in parallel, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) --builtinbackup-file-read-buffer-size uint read files using an IO buffer of this many bytes. Golang defaults are used when set to 0. --builtinbackup-file-write-buffer-size uint write files using an IO buffer of this many bytes. Golang defaults are used when set to 0. (default 2097152) --builtinbackup_mysqld_timeout duration how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) @@ -111,6 +111,7 @@ Usage of vtctld: --stats_drop_variables string Variables to be dropped from the list of exported variables. --stats_emit_period duration Interval between emitting stats to all registered backends (default 1m0s) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_grpc_ca string the server ca to use to validate servers when connecting --tablet_grpc_cert string the cert to use to connect @@ -158,5 +159,4 @@ Usage of vtctld: --v Level log level for V logs -v, --version print binary version --vmodule vModuleFlag comma-separated list of pattern=N settings for file-filtered logging - --vtctl_healthcheck_topology_refresh duration refresh interval for re-reading the topology (default 30s) --vtctld_sanitize_log_messages When true, vtctld sanitizes logging. diff --git a/go/flags/endtoend/vtctldclient.txt b/go/flags/endtoend/vtctldclient.txt index f0d72583097..66b779dad70 100644 --- a/go/flags/endtoend/vtctldclient.txt +++ b/go/flags/endtoend/vtctldclient.txt @@ -90,6 +90,7 @@ Available Commands: ValidateVersionShard Validates that the version on the primary matches all of the replicas. completion Generate the autocompletion script for the specified shell help Help about any command + workflow Administer VReplication workflows (Reshard, MoveTables, etc) in the given keyspace Flags: --action_timeout duration timeout for the total command (default 1h0m0s) diff --git a/go/flags/endtoend/vtgate.txt b/go/flags/endtoend/vtgate.txt index e5e1efbc274..4cc245a46a2 100644 --- a/go/flags/endtoend/vtgate.txt +++ b/go/flags/endtoend/vtgate.txt @@ -178,6 +178,7 @@ Usage of vtgate: --statsd_sample_rate float Sample rate for statsd metrics (default 1) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --stream_buffer_size int the number of bytes sent from vtgate for each stream call. It's recommended to keep this value in sync with vttablet's query-server-config-stream-buffer-size. (default 32768) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_filters strings Specifies a comma-separated list of 'keyspace|shard_name or keyrange' values to filter the tablets to watch. --tablet_grpc_ca string the server ca to use to validate servers when connecting --tablet_grpc_cert string the cert to use to connect diff --git a/go/flags/endtoend/vtorc.txt b/go/flags/endtoend/vtorc.txt index 17cce68ea0d..00e2450b544 100644 --- a/go/flags/endtoend/vtorc.txt +++ b/go/flags/endtoend/vtorc.txt @@ -53,6 +53,7 @@ Usage of vtorc: --stats_drop_variables string Variables to be dropped from the list of exported variables. --stats_emit_period duration Interval between emitting stats to all registered backends (default 1m0s) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_manager_grpc_ca string the server ca to use to validate servers when connecting --tablet_manager_grpc_cert string the cert to use to connect --tablet_manager_grpc_concurrency int concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,AllPrivs,App}) (default 8) diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt index ac603a510d5..69cd82eb2a6 100644 --- a/go/flags/endtoend/vttablet.txt +++ b/go/flags/endtoend/vttablet.txt @@ -11,7 +11,7 @@ Usage of vttablet: --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) --backup_storage_compress if set, the backup files will be compressed. (default true) --backup_storage_implementation string Which backup storage implementation to use for creating and restoring backups. - --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, in parallel, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) --binlog_host string PITR restore parameter: hostname/IP of binlog server. --binlog_password string PITR restore parameter: password of binlog server. --binlog_player_grpc_ca string the server ca to use to validate servers when connecting @@ -94,6 +94,7 @@ Usage of vttablet: --enable-consolidator Synonym to -enable_consolidator (default true) --enable-consolidator-replicas Synonym to -enable_consolidator_replicas --enable-lag-throttler Synonym to -enable_lag_throttler + --enable-per-workload-table-metrics If true, query counts and query error metrics include a label that identifies the workload --enable-tx-throttler Synonym to -enable_tx_throttler --enable_consolidator This option enables the query consolidator. (default true) --enable_consolidator_replicas This option enables the query consolidator only on replicas. @@ -289,6 +290,7 @@ Usage of vttablet: --stream_health_buffer_size uint max streaming health entries to buffer per streaming health client (default 20) --table-acl-config string path to table access checker config file; send SIGHUP to reload this file --table-acl-config-reload-interval duration Ticker to reload ACLs. Duration flag, format e.g.: 30s. Default: do not reload + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implcitly always included) (default "hold,purge,evac,drop") --tablet-path string tablet alias --tablet_config string YAML file config for tablet @@ -355,7 +357,6 @@ Usage of vttablet: --tx_throttler_config string The configuration of the transaction throttler as a text formatted throttlerdata.Configuration protocol buffer message (default "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n") --tx_throttler_healthcheck_cells strings A comma-separated list of cells. Only tabletservers running in these cells will be monitored for replication lag by the transaction throttler. --unhealthy_threshold duration replication lag after which a replica is considered unhealthy (default 2h0m0s) - --use_super_read_only Set super_read_only flag when performing planned failover. --v Level log level for V logs -v, --version print binary version --vmodule vModuleFlag comma-separated list of pattern=N settings for file-filtered logging diff --git a/go/flags/endtoend/vttestserver.txt b/go/flags/endtoend/vttestserver.txt index 71dc115791a..256de63d08b 100644 --- a/go/flags/endtoend/vttestserver.txt +++ b/go/flags/endtoend/vttestserver.txt @@ -5,7 +5,7 @@ Usage of vttestserver: --backup_engine_implementation string Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin") --backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) --backup_storage_compress if set, the backup files will be compressed. (default true) - --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) + --backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, in parallel, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2) --builtinbackup-file-read-buffer-size uint read files using an IO buffer of this many bytes. Golang defaults are used when set to 0. --builtinbackup-file-write-buffer-size uint write files using an IO buffer of this many bytes. Golang defaults are used when set to 0. (default 2097152) --builtinbackup_mysqld_timeout duration how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) @@ -102,6 +102,7 @@ Usage of vttestserver: --sql-max-length-errors int truncate queries in error logs to the given length (default unlimited) --sql-max-length-ui int truncate queries in debug UIs to the given length (default 512) (default 512) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) + --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_hostname string The hostname to use for the tablet otherwise it will be derived from OS' hostname (default "localhost") --tablet_manager_grpc_ca string the server ca to use to validate servers when connecting diff --git a/go/flagutil/sets.go b/go/flagutil/sets.go index 92a7e2c6800..3b1cf8adf6e 100644 --- a/go/flagutil/sets.go +++ b/go/flagutil/sets.go @@ -20,7 +20,8 @@ import ( "strings" "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/util/sets" + + "vitess.io/vitess/go/sets" ) var _ pflag.Value = (*StringSetFlag)(nil) diff --git a/go/mysql/binlog_event_common_test.go b/go/mysql/binlog_event_common_test.go index 28eccaf0ce5..802641a7b82 100644 --- a/go/mysql/binlog_event_common_test.go +++ b/go/mysql/binlog_event_common_test.go @@ -207,6 +207,7 @@ func TestBinlogEventFormat(t *testing.T) { assert.NoError(t, err, "unexpected error: %v", err) assert.True(t, reflect.DeepEqual(got, want), "%#v.Format() = %v, want %v", input, got, want) assert.False(t, input.IsHeartbeat()) + } func TestBinlogEventFormatWrongVersion(t *testing.T) { diff --git a/go/mysql/binlog_event_filepos.go b/go/mysql/binlog_event_filepos.go index ffdce5b0bdb..c4b63ddaf50 100644 --- a/go/mysql/binlog_event_filepos.go +++ b/go/mysql/binlog_event_filepos.go @@ -73,12 +73,12 @@ func (ev *filePosBinlogEvent) StripChecksum(f BinlogFormat) (BinlogEvent, []byte // nextPosition returns the next file position of the binlog. // If no information is available, it returns 0. -func (ev *filePosBinlogEvent) nextPosition(f BinlogFormat) int { +func (ev *filePosBinlogEvent) nextPosition(f BinlogFormat) uint32 { if f.HeaderLength <= 13 { // Dead code. This is just a failsafe. return 0 } - return int(binary.LittleEndian.Uint32(ev.Bytes()[13:17])) + return binary.LittleEndian.Uint32(ev.Bytes()[13:17]) } // rotate implements BinlogEvent.Rotate(). @@ -269,7 +269,7 @@ type filePosGTIDEvent struct { gtid filePosGTID } -func newFilePosGTIDEvent(file string, pos int, timestamp uint32) filePosGTIDEvent { +func newFilePosGTIDEvent(file string, pos uint32, timestamp uint32) filePosGTIDEvent { return filePosGTIDEvent{ filePosFakeEvent: filePosFakeEvent{ timestamp: timestamp, diff --git a/go/mysql/client_test.go b/go/mysql/client_test.go index 9ac11282bdc..f9db5cee523 100644 --- a/go/mysql/client_test.go +++ b/go/mysql/client_test.go @@ -37,7 +37,7 @@ import ( ) // assertSQLError makes sure we get the right error. -func assertSQLError(t *testing.T, err error, code int, sqlState, subtext, query, pattern string) { +func assertSQLError(t *testing.T, err error, code ErrorCode, sqlState, subtext, query, pattern string) { t.Helper() require.Error(t, err, "was expecting SQLError %v / %v / %v but got no error.", code, sqlState, subtext) diff --git a/go/mysql/collations/env.go b/go/mysql/collations/env.go index c6e86375027..52a255b6f41 100644 --- a/go/mysql/collations/env.go +++ b/go/mysql/collations/env.go @@ -194,9 +194,10 @@ func makeEnv(version collver) *Environment { // A few interesting character set values. // See http://dev.mysql.com/doc/internals/en/character-set.html#packet-Protocol::CharacterSet const ( - CollationUtf8ID = 33 - CollationUtf8mb4ID = 255 - CollationBinaryID = 63 + CollationUtf8ID = 33 + CollationUtf8mb4ID = 255 + CollationBinaryID = 63 + CollationUtf8mb4BinID = 46 ) // Binary is the default Binary collation diff --git a/go/mysql/collations/remote/collation.go b/go/mysql/collations/remote/collation.go index 71e1677d4ae..1e81c429794 100644 --- a/go/mysql/collations/remote/collation.go +++ b/go/mysql/collations/remote/collation.go @@ -119,11 +119,11 @@ func (c *Collation) Collate(left, right []byte, isPrefix bool) int { c.sql.WriteString(c.suffix) c.sql.WriteString(")") - var cmp int64 + var cmp int if result := c.performRemoteQuery(); result != nil { - cmp, c.err = result[0].ToInt64() + cmp, c.err = result[0].ToInt() } - return int(cmp) + return cmp } func (c *Collation) performRemoteQuery() []sqltypes.Value { diff --git a/go/mysql/conn.go b/go/mysql/conn.go index 55dee523e83..0f2fcc1bbe1 100644 --- a/go/mysql/conn.go +++ b/go/mysql/conn.go @@ -820,7 +820,7 @@ func (c *Conn) WriteErrorAndLog(format string, args ...interface{}) bool { return c.writeErrorAndLog(ERUnknownComError, SSNetError, format, args...) } -func (c *Conn) writeErrorAndLog(errorCode uint16, sqlState string, format string, args ...any) bool { +func (c *Conn) writeErrorAndLog(errorCode ErrorCode, sqlState string, format string, args ...any) bool { if err := c.writeErrorPacket(errorCode, sqlState, format, args...); err != nil { log.Errorf("Error writing error to %s: %v", c, err) return false @@ -840,12 +840,12 @@ func (c *Conn) writeErrorPacketFromErrorAndLog(err error) bool { // writeErrorPacket writes an error packet. // Server -> Client. // This method returns a generic error, not a SQLError. -func (c *Conn) writeErrorPacket(errorCode uint16, sqlState string, format string, args ...any) error { +func (c *Conn) writeErrorPacket(errorCode ErrorCode, sqlState string, format string, args ...any) error { errorMessage := fmt.Sprintf(format, args...) length := 1 + 2 + 1 + 5 + len(errorMessage) data, pos := c.startEphemeralPacketWithHeader(length) pos = writeByte(data, pos, ErrPacket) - pos = writeUint16(data, pos, errorCode) + pos = writeUint16(data, pos, uint16(errorCode)) pos = writeByte(data, pos, '#') if sqlState == "" { sqlState = SSUnknownSQLState @@ -863,7 +863,7 @@ func (c *Conn) writeErrorPacket(errorCode uint16, sqlState string, format string // See writeErrorPacket for other info. func (c *Conn) writeErrorPacketFromError(err error) error { if se, ok := err.(*SQLError); ok { - return c.writeErrorPacket(uint16(se.Num), se.State, "%v", se.Message) + return c.writeErrorPacket(se.Num, se.State, "%v", se.Message) } return c.writeErrorPacket(ERUnknownError, SSUnknownSQLState, "unknown error: %v", err) @@ -1226,8 +1226,8 @@ func (c *Conn) handleComPrepare(handler Handler, data []byte) (kontinue bool) { paramsCount := uint16(0) _ = sqlparser.Walk(func(node sqlparser.SQLNode) (bool, error) { switch node := node.(type) { - case sqlparser.Argument: - if strings.HasPrefix(string(node), "v") { + case *sqlparser.Argument: + if strings.HasPrefix(node.Name, "v") { paramsCount++ } } @@ -1606,7 +1606,7 @@ func ParseErrorPacket(data []byte) error { // Human readable error message is the rest. msg := string(data[pos:]) - return NewSQLError(int(code), string(sqlState), "%v", msg) + return NewSQLError(ErrorCode(code), string(sqlState), "%v", msg) } // GetTLSClientCerts gets TLS certificates. diff --git a/go/mysql/constants.go b/go/mysql/constants.go index 0d7ddb3abeb..5d747cf860c 100644 --- a/go/mysql/constants.go +++ b/go/mysql/constants.go @@ -17,6 +17,7 @@ limitations under the License. package mysql import ( + "strconv" "strings" "golang.org/x/text/encoding" @@ -283,30 +284,30 @@ const ( // https://dev.mysql.com/doc/mysql-errors/en/client-error-reference.html const ( // CRUnknownError is CR_UNKNOWN_ERROR - CRUnknownError = 2000 + CRUnknownError = ErrorCode(2000) // CRConnectionError is CR_CONNECTION_ERROR // This is returned if a connection via a Unix socket fails. - CRConnectionError = 2002 + CRConnectionError = ErrorCode(2002) // CRConnHostError is CR_CONN_HOST_ERROR // This is returned if a connection via a TCP socket fails. - CRConnHostError = 2003 + CRConnHostError = ErrorCode(2003) // CRUnknownHost is CR_UNKNOWN_HOST // This is returned if the host name cannot be resolved. - CRUnknownHost = 2005 + CRUnknownHost = ErrorCode(2005) // CRServerGone is CR_SERVER_GONE_ERROR. // This is returned if the client tries to send a command but it fails. - CRServerGone = 2006 + CRServerGone = ErrorCode(2006) // CRVersionError is CR_VERSION_ERROR // This is returned if the server versions don't match what we support. - CRVersionError = 2007 + CRVersionError = ErrorCode(2007) // CRServerHandshakeErr is CR_SERVER_HANDSHAKE_ERR - CRServerHandshakeErr = 2012 + CRServerHandshakeErr = ErrorCode(2012) // CRServerLost is CR_SERVER_LOST. // Used when: @@ -314,26 +315,32 @@ const ( // - the client cannot read an initial auth packet. // - the client cannot read a response from the server. // This happens when a running query is killed. - CRServerLost = 2013 + CRServerLost = ErrorCode(2013) // CRCommandsOutOfSync is CR_COMMANDS_OUT_OF_SYNC // Sent when the streaming calls are not done in the right order. - CRCommandsOutOfSync = 2014 + CRCommandsOutOfSync = ErrorCode(2014) // CRNamedPipeStateError is CR_NAMEDPIPESETSTATE_ERROR. // This is the highest possible number for a connection error. - CRNamedPipeStateError = 2018 + CRNamedPipeStateError = ErrorCode(2018) // CRCantReadCharset is CR_CANT_READ_CHARSET - CRCantReadCharset = 2019 + CRCantReadCharset = ErrorCode(2019) // CRSSLConnectionError is CR_SSL_CONNECTION_ERROR - CRSSLConnectionError = 2026 + CRSSLConnectionError = ErrorCode(2026) // CRMalformedPacket is CR_MALFORMED_PACKET - CRMalformedPacket = 2027 + CRMalformedPacket = ErrorCode(2027) ) +type ErrorCode uint16 + +func (e ErrorCode) ToString() string { + return strconv.FormatUint(uint64(e), 10) +} + // Error codes for server-side errors. // Originally found in include/mysql/mysqld_error.h and // https://dev.mysql.com/doc/mysql-errors/en/server-error-reference.html @@ -341,231 +348,231 @@ const ( // See above reference for more information on each code. const ( // Vitess specific errors, (100-999) - ERNotReplica = 100 + ERNotReplica = ErrorCode(100) // unknown - ERUnknownError = 1105 + ERUnknownError = ErrorCode(1105) // internal - ERInternalError = 1815 + ERInternalError = ErrorCode(1815) // unimplemented - ERNotSupportedYet = 1235 - ERUnsupportedPS = 1295 + ERNotSupportedYet = ErrorCode(1235) + ERUnsupportedPS = ErrorCode(1295) // resource exhausted - ERDiskFull = 1021 - EROutOfMemory = 1037 - EROutOfSortMemory = 1038 - ERConCount = 1040 - EROutOfResources = 1041 - ERRecordFileFull = 1114 - ERHostIsBlocked = 1129 - ERCantCreateThread = 1135 - ERTooManyDelayedThreads = 1151 - ERNetPacketTooLarge = 1153 - ERTooManyUserConnections = 1203 - ERLockTableFull = 1206 - ERUserLimitReached = 1226 + ERDiskFull = ErrorCode(1021) + EROutOfMemory = ErrorCode(1037) + EROutOfSortMemory = ErrorCode(1038) + ERConCount = ErrorCode(1040) + EROutOfResources = ErrorCode(1041) + ERRecordFileFull = ErrorCode(1114) + ERHostIsBlocked = ErrorCode(1129) + ERCantCreateThread = ErrorCode(1135) + ERTooManyDelayedThreads = ErrorCode(1151) + ERNetPacketTooLarge = ErrorCode(1153) + ERTooManyUserConnections = ErrorCode(1203) + ERLockTableFull = ErrorCode(1206) + ERUserLimitReached = ErrorCode(1226) // deadline exceeded - ERLockWaitTimeout = 1205 + ERLockWaitTimeout = ErrorCode(1205) // unavailable - ERServerShutdown = 1053 + ERServerShutdown = ErrorCode(1053) // not found - ERDbDropExists = 1008 - ERCantFindFile = 1017 - ERFormNotFound = 1029 - ERKeyNotFound = 1032 - ERBadFieldError = 1054 - ERNoSuchThread = 1094 - ERUnknownTable = 1109 - ERCantFindUDF = 1122 - ERNonExistingGrant = 1141 - ERNoSuchTable = 1146 - ERNonExistingTableGrant = 1147 - ERKeyDoesNotExist = 1176 + ERDbDropExists = ErrorCode(1008) + ERCantFindFile = ErrorCode(1017) + ERFormNotFound = ErrorCode(1029) + ERKeyNotFound = ErrorCode(1032) + ERBadFieldError = ErrorCode(1054) + ERNoSuchThread = ErrorCode(1094) + ERUnknownTable = ErrorCode(1109) + ERCantFindUDF = ErrorCode(1122) + ERNonExistingGrant = ErrorCode(1141) + ERNoSuchTable = ErrorCode(1146) + ERNonExistingTableGrant = ErrorCode(1147) + ERKeyDoesNotExist = ErrorCode(1176) // permissions - ERDBAccessDenied = 1044 - ERAccessDeniedError = 1045 - ERKillDenied = 1095 - ERNoPermissionToCreateUsers = 1211 - ERSpecifiedAccessDenied = 1227 + ERDBAccessDenied = ErrorCode(1044) + ERAccessDeniedError = ErrorCode(1045) + ERKillDenied = ErrorCode(1095) + ERNoPermissionToCreateUsers = ErrorCode(1211) + ERSpecifiedAccessDenied = ErrorCode(1227) // failed precondition - ERNoDb = 1046 - ERNoSuchIndex = 1082 - ERCantDropFieldOrKey = 1091 - ERTableNotLockedForWrite = 1099 - ERTableNotLocked = 1100 - ERTooBigSelect = 1104 - ERNotAllowedCommand = 1148 - ERTooLongString = 1162 - ERDelayedInsertTableLocked = 1165 - ERDupUnique = 1169 - ERRequiresPrimaryKey = 1173 - ERCantDoThisDuringAnTransaction = 1179 - ERReadOnlyTransaction = 1207 - ERCannotAddForeign = 1215 - ERNoReferencedRow = 1216 - ERRowIsReferenced = 1217 - ERCantUpdateWithReadLock = 1223 - ERNoDefault = 1230 - ERMasterFatalReadingBinlog = 1236 - EROperandColumns = 1241 - ERSubqueryNo1Row = 1242 - ERWarnDataOutOfRange = 1264 - ERNonUpdateableTable = 1288 - ERFeatureDisabled = 1289 - EROptionPreventsStatement = 1290 - ERDuplicatedValueInType = 1291 - ERSPDoesNotExist = 1305 - ERNoDefaultForField = 1364 - ErSPNotVarArg = 1414 - ERRowIsReferenced2 = 1451 - ErNoReferencedRow2 = 1452 - ERDupIndex = 1831 - ERInnodbReadOnly = 1874 + ERNoDb = ErrorCode(1046) + ERNoSuchIndex = ErrorCode(1082) + ERCantDropFieldOrKey = ErrorCode(1091) + ERTableNotLockedForWrite = ErrorCode(1099) + ERTableNotLocked = ErrorCode(1100) + ERTooBigSelect = ErrorCode(1104) + ERNotAllowedCommand = ErrorCode(1148) + ERTooLongString = ErrorCode(1162) + ERDelayedInsertTableLocked = ErrorCode(1165) + ERDupUnique = ErrorCode(1169) + ERRequiresPrimaryKey = ErrorCode(1173) + ERCantDoThisDuringAnTransaction = ErrorCode(1179) + ERReadOnlyTransaction = ErrorCode(1207) + ERCannotAddForeign = ErrorCode(1215) + ERNoReferencedRow = ErrorCode(1216) + ERRowIsReferenced = ErrorCode(1217) + ERCantUpdateWithReadLock = ErrorCode(1223) + ERNoDefault = ErrorCode(1230) + ERMasterFatalReadingBinlog = ErrorCode(1236) + EROperandColumns = ErrorCode(1241) + ERSubqueryNo1Row = ErrorCode(1242) + ERWarnDataOutOfRange = ErrorCode(1264) + ERNonUpdateableTable = ErrorCode(1288) + ERFeatureDisabled = ErrorCode(1289) + EROptionPreventsStatement = ErrorCode(1290) + ERDuplicatedValueInType = ErrorCode(1291) + ERSPDoesNotExist = ErrorCode(1305) + ERNoDefaultForField = ErrorCode(1364) + ErSPNotVarArg = ErrorCode(1414) + ERRowIsReferenced2 = ErrorCode(1451) + ErNoReferencedRow2 = ErrorCode(1452) + ERDupIndex = ErrorCode(1831) + ERInnodbReadOnly = ErrorCode(1874) // already exists - ERDbCreateExists = 1007 - ERTableExists = 1050 - ERDupEntry = 1062 - ERFileExists = 1086 - ERUDFExists = 1125 + ERDbCreateExists = ErrorCode(1007) + ERTableExists = ErrorCode(1050) + ERDupEntry = ErrorCode(1062) + ERFileExists = ErrorCode(1086) + ERUDFExists = ErrorCode(1125) // aborted - ERGotSignal = 1078 - ERForcingClose = 1080 - ERAbortingConnection = 1152 - ERLockDeadlock = 1213 + ERGotSignal = ErrorCode(1078) + ERForcingClose = ErrorCode(1080) + ERAbortingConnection = ErrorCode(1152) + ERLockDeadlock = ErrorCode(1213) // invalid arg - ERUnknownComError = 1047 - ERBadNullError = 1048 - ERBadDb = 1049 - ERBadTable = 1051 - ERNonUniq = 1052 - ERWrongFieldWithGroup = 1055 - ERWrongGroupField = 1056 - ERWrongSumSelect = 1057 - ERWrongValueCount = 1058 - ERTooLongIdent = 1059 - ERDupFieldName = 1060 - ERDupKeyName = 1061 - ERWrongFieldSpec = 1063 - ERParseError = 1064 - EREmptyQuery = 1065 - ERNonUniqTable = 1066 - ERInvalidDefault = 1067 - ERMultiplePriKey = 1068 - ERTooManyKeys = 1069 - ERTooManyKeyParts = 1070 - ERTooLongKey = 1071 - ERKeyColumnDoesNotExist = 1072 - ERBlobUsedAsKey = 1073 - ERTooBigFieldLength = 1074 - ERWrongAutoKey = 1075 - ERWrongFieldTerminators = 1083 - ERBlobsAndNoTerminated = 1084 - ERTextFileNotReadable = 1085 - ERWrongSubKey = 1089 - ERCantRemoveAllFields = 1090 - ERUpdateTableUsed = 1093 - ERNoTablesUsed = 1096 - ERTooBigSet = 1097 - ERBlobCantHaveDefault = 1101 - ERWrongDbName = 1102 - ERWrongTableName = 1103 - ERUnknownProcedure = 1106 - ERWrongParamCountToProcedure = 1107 - ERWrongParametersToProcedure = 1108 - ERFieldSpecifiedTwice = 1110 - ERInvalidGroupFuncUse = 1111 - ERTableMustHaveColumns = 1113 - ERUnknownCharacterSet = 1115 - ERTooManyTables = 1116 - ERTooManyFields = 1117 - ERTooBigRowSize = 1118 - ERWrongOuterJoin = 1120 - ERNullColumnInIndex = 1121 - ERFunctionNotDefined = 1128 - ERWrongValueCountOnRow = 1136 - ERInvalidUseOfNull = 1138 - ERRegexpError = 1139 - ERMixOfGroupFuncAndFields = 1140 - ERIllegalGrantForTable = 1144 - ERSyntaxError = 1149 - ERWrongColumnName = 1166 - ERWrongKeyColumn = 1167 - ERBlobKeyWithoutLength = 1170 - ERPrimaryCantHaveNull = 1171 - ERTooManyRows = 1172 - ERLockOrActiveTransaction = 1192 - ERUnknownSystemVariable = 1193 - ERSetConstantsOnly = 1204 - ERWrongArguments = 1210 - ERWrongUsage = 1221 - ERWrongNumberOfColumnsInSelect = 1222 - ERDupArgument = 1225 - ERLocalVariable = 1228 - ERGlobalVariable = 1229 - ERWrongValueForVar = 1231 - ERWrongTypeForVar = 1232 - ERVarCantBeRead = 1233 - ERCantUseOptionHere = 1234 - ERIncorrectGlobalLocalVar = 1238 - ERWrongFKDef = 1239 - ERKeyRefDoNotMatchTableRef = 1240 - ERCyclicReference = 1245 - ERIllegalReference = 1247 - ERDerivedMustHaveAlias = 1248 - ERTableNameNotAllowedHere = 1250 - ERCollationCharsetMismatch = 1253 - ERWarnDataTruncated = 1265 - ERCantAggregate2Collations = 1267 - ERCantAggregate3Collations = 1270 - ERCantAggregateNCollations = 1271 - ERVariableIsNotStruct = 1272 - ERUnknownCollation = 1273 - ERWrongNameForIndex = 1280 - ERWrongNameForCatalog = 1281 - ERBadFTColumn = 1283 - ERTruncatedWrongValue = 1292 - ERTooMuchAutoTimestampCols = 1293 - ERInvalidOnUpdate = 1294 - ERUnknownTimeZone = 1298 - ERInvalidCharacterString = 1300 - ERQueryInterrupted = 1317 - ERTruncatedWrongValueForField = 1366 - ERIllegalValueForType = 1367 - ERDataTooLong = 1406 - ErrWrongValueForType = 1411 - ERForbidSchemaChange = 1450 - ERWrongValue = 1525 - ERDataOutOfRange = 1690 - ERInvalidJSONText = 3140 - ERInvalidJSONTextInParams = 3141 - ERInvalidJSONBinaryData = 3142 - ERInvalidJSONCharset = 3144 - ERInvalidCastToJSON = 3147 - ERJSONValueTooBig = 3150 - ERJSONDocumentTooDeep = 3157 + ERUnknownComError = ErrorCode(1047) + ERBadNullError = ErrorCode(1048) + ERBadDb = ErrorCode(1049) + ERBadTable = ErrorCode(1051) + ERNonUniq = ErrorCode(1052) + ERWrongFieldWithGroup = ErrorCode(1055) + ERWrongGroupField = ErrorCode(1056) + ERWrongSumSelect = ErrorCode(1057) + ERWrongValueCount = ErrorCode(1058) + ERTooLongIdent = ErrorCode(1059) + ERDupFieldName = ErrorCode(1060) + ERDupKeyName = ErrorCode(1061) + ERWrongFieldSpec = ErrorCode(1063) + ERParseError = ErrorCode(1064) + EREmptyQuery = ErrorCode(1065) + ERNonUniqTable = ErrorCode(1066) + ERInvalidDefault = ErrorCode(1067) + ERMultiplePriKey = ErrorCode(1068) + ERTooManyKeys = ErrorCode(1069) + ERTooManyKeyParts = ErrorCode(1070) + ERTooLongKey = ErrorCode(1071) + ERKeyColumnDoesNotExist = ErrorCode(1072) + ERBlobUsedAsKey = ErrorCode(1073) + ERTooBigFieldLength = ErrorCode(1074) + ERWrongAutoKey = ErrorCode(1075) + ERWrongFieldTerminators = ErrorCode(1083) + ERBlobsAndNoTerminated = ErrorCode(1084) + ERTextFileNotReadable = ErrorCode(1085) + ERWrongSubKey = ErrorCode(1089) + ERCantRemoveAllFields = ErrorCode(1090) + ERUpdateTableUsed = ErrorCode(1093) + ERNoTablesUsed = ErrorCode(1096) + ERTooBigSet = ErrorCode(1097) + ERBlobCantHaveDefault = ErrorCode(1101) + ERWrongDbName = ErrorCode(1102) + ERWrongTableName = ErrorCode(1103) + ERUnknownProcedure = ErrorCode(1106) + ERWrongParamCountToProcedure = ErrorCode(1107) + ERWrongParametersToProcedure = ErrorCode(1108) + ERFieldSpecifiedTwice = ErrorCode(1110) + ERInvalidGroupFuncUse = ErrorCode(1111) + ERTableMustHaveColumns = ErrorCode(1113) + ERUnknownCharacterSet = ErrorCode(1115) + ERTooManyTables = ErrorCode(1116) + ERTooManyFields = ErrorCode(1117) + ERTooBigRowSize = ErrorCode(1118) + ERWrongOuterJoin = ErrorCode(1120) + ERNullColumnInIndex = ErrorCode(1121) + ERFunctionNotDefined = ErrorCode(1128) + ERWrongValueCountOnRow = ErrorCode(1136) + ERInvalidUseOfNull = ErrorCode(1138) + ERRegexpError = ErrorCode(1139) + ERMixOfGroupFuncAndFields = ErrorCode(1140) + ERIllegalGrantForTable = ErrorCode(1144) + ERSyntaxError = ErrorCode(1149) + ERWrongColumnName = ErrorCode(1166) + ERWrongKeyColumn = ErrorCode(1167) + ERBlobKeyWithoutLength = ErrorCode(1170) + ERPrimaryCantHaveNull = ErrorCode(1171) + ERTooManyRows = ErrorCode(1172) + ERLockOrActiveTransaction = ErrorCode(1192) + ERUnknownSystemVariable = ErrorCode(1193) + ERSetConstantsOnly = ErrorCode(1204) + ERWrongArguments = ErrorCode(1210) + ERWrongUsage = ErrorCode(1221) + ERWrongNumberOfColumnsInSelect = ErrorCode(1222) + ERDupArgument = ErrorCode(1225) + ERLocalVariable = ErrorCode(1228) + ERGlobalVariable = ErrorCode(1229) + ERWrongValueForVar = ErrorCode(1231) + ERWrongTypeForVar = ErrorCode(1232) + ERVarCantBeRead = ErrorCode(1233) + ERCantUseOptionHere = ErrorCode(1234) + ERIncorrectGlobalLocalVar = ErrorCode(1238) + ERWrongFKDef = ErrorCode(1239) + ERKeyRefDoNotMatchTableRef = ErrorCode(1240) + ERCyclicReference = ErrorCode(1245) + ERIllegalReference = ErrorCode(1247) + ERDerivedMustHaveAlias = ErrorCode(1248) + ERTableNameNotAllowedHere = ErrorCode(1250) + ERCollationCharsetMismatch = ErrorCode(1253) + ERWarnDataTruncated = ErrorCode(1265) + ERCantAggregate2Collations = ErrorCode(1267) + ERCantAggregate3Collations = ErrorCode(1270) + ERCantAggregateNCollations = ErrorCode(1271) + ERVariableIsNotStruct = ErrorCode(1272) + ERUnknownCollation = ErrorCode(1273) + ERWrongNameForIndex = ErrorCode(1280) + ERWrongNameForCatalog = ErrorCode(1281) + ERBadFTColumn = ErrorCode(1283) + ERTruncatedWrongValue = ErrorCode(1292) + ERTooMuchAutoTimestampCols = ErrorCode(1293) + ERInvalidOnUpdate = ErrorCode(1294) + ERUnknownTimeZone = ErrorCode(1298) + ERInvalidCharacterString = ErrorCode(1300) + ERQueryInterrupted = ErrorCode(1317) + ERTruncatedWrongValueForField = ErrorCode(1366) + ERIllegalValueForType = ErrorCode(1367) + ERDataTooLong = ErrorCode(1406) + ErrWrongValueForType = ErrorCode(1411) + ERForbidSchemaChange = ErrorCode(1450) + ERWrongValue = ErrorCode(1525) + ERDataOutOfRange = ErrorCode(1690) + ERInvalidJSONText = ErrorCode(3140) + ERInvalidJSONTextInParams = ErrorCode(3141) + ERInvalidJSONBinaryData = ErrorCode(3142) + ERInvalidJSONCharset = ErrorCode(3144) + ERInvalidCastToJSON = ErrorCode(3147) + ERJSONValueTooBig = ErrorCode(3150) + ERJSONDocumentTooDeep = ErrorCode(3157) // max execution time exceeded - ERQueryTimeout = 3024 + ERQueryTimeout = ErrorCode(3024) - ErrCantCreateGeometryObject = 1416 - ErrGISDataWrongEndianess = 3055 - ErrNotImplementedForCartesianSRS = 3704 - ErrNotImplementedForProjectedSRS = 3705 - ErrNonPositiveRadius = 3706 + ErrCantCreateGeometryObject = ErrorCode(1416) + ErrGISDataWrongEndianess = ErrorCode(3055) + ErrNotImplementedForCartesianSRS = ErrorCode(3704) + ErrNotImplementedForProjectedSRS = ErrorCode(3705) + ErrNonPositiveRadius = ErrorCode(3706) // server not available - ERServerIsntAvailable = 3168 + ERServerIsntAvailable = ErrorCode(3168) ) // Sql states for errors. @@ -754,7 +761,7 @@ func IsSchemaApplyError(err error) bool { return false } -type ReplicationState int +type ReplicationState int32 const ( ReplicationStateUnknown ReplicationState = iota diff --git a/go/mysql/endtoend/main_test.go b/go/mysql/endtoend/main_test.go index b72b466e4a1..9079ff5ef6d 100644 --- a/go/mysql/endtoend/main_test.go +++ b/go/mysql/endtoend/main_test.go @@ -41,7 +41,7 @@ var ( ) // assertSQLError makes sure we get the right error. -func assertSQLError(t *testing.T, err error, code int, sqlState string, subtext string, query string) { +func assertSQLError(t *testing.T, err error, code mysql.ErrorCode, sqlState string, subtext string, query string) { t.Helper() require.Error(t, err, "was expecting SQLError %v / %v / %v but got no error.", code, sqlState, subtext) diff --git a/go/mysql/endtoend/query_test.go b/go/mysql/endtoend/query_test.go index 3d6af6b942e..a30c8ecc030 100644 --- a/go/mysql/endtoend/query_test.go +++ b/go/mysql/endtoend/query_test.go @@ -220,6 +220,7 @@ func readRowsUsingStream(t *testing.T, conn *mysql.Conn, expectedCount int) { for { row, _, err := conn.FetchNext(nil) require.NoError(t, err, "FetchNext failed: %v", err) + if row == nil { // We're done. break diff --git a/go/mysql/fakesqldb/server.go b/go/mysql/fakesqldb/server.go index 5b00b2c2e01..b5952d90ed0 100644 --- a/go/mysql/fakesqldb/server.go +++ b/go/mysql/fakesqldb/server.go @@ -25,6 +25,7 @@ import ( "regexp" "strings" "sync" + "sync/atomic" "testing" "time" @@ -67,7 +68,7 @@ type DB struct { acceptWG sync.WaitGroup // orderMatters is set when the query order matters. - orderMatters bool + orderMatters atomic.Bool // Fields set at runtime. @@ -77,16 +78,16 @@ type DB struct { // Use SetName() to change. name string // isConnFail trigger a panic in the connection handler. - isConnFail bool + isConnFail atomic.Bool // connDelay causes a sleep in the connection handler connDelay time.Duration // shouldClose, if true, tells ComQuery() to close the connection when // processing the next query. This will trigger a MySQL client error with // errno 2013 ("server lost"). - shouldClose bool - // AllowAll: if set to true, ComQuery returns an empty result + shouldClose atomic.Bool + // allowAll: if set to true, ComQuery returns an empty result // for all queries. This flag is used for benchmarking. - AllowAll bool + allowAll atomic.Bool // Handler: interface that allows a caller to override the query handling // implementation. By default it points to the DB itself @@ -122,7 +123,7 @@ type DB struct { // if fakesqldb is asked to serve queries or query patterns that it has not been explicitly told about it will // error out by default. However if you set this flag then any unmatched query results in an empty result - neverFail bool + neverFail atomic.Bool } // QueryHandler is the interface used by the DB to simulate executed queries @@ -216,12 +217,8 @@ func (db *DB) SetName(name string) *DB { } // OrderMatters sets the orderMatters flag. -func (db *DB) OrderMatters() *DB { - db.mu.Lock() - defer db.mu.Unlock() - - db.orderMatters = true - return db +func (db *DB) OrderMatters() { + db.orderMatters.Store(true) } // Close closes the Listener and waits for it to stop accepting. @@ -309,7 +306,7 @@ func (db *DB) NewConnection(c *mysql.Conn) { db.mu.Lock() defer db.mu.Unlock() - if db.isConnFail { + if db.isConnFail.Load() { panic(fmt.Errorf("simulating a connection failure")) } @@ -346,11 +343,11 @@ func (db *DB) WarningCount(c *mysql.Conn) uint16 { // HandleQuery is the default implementation of the QueryHandler interface func (db *DB) HandleQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result) error) error { - if db.AllowAll { + if db.allowAll.Load() { return callback(&sqltypes.Result{}) } - if db.orderMatters { + if db.orderMatters.Load() { result, err := db.comQueryOrdered(query) if err != nil { return err @@ -363,7 +360,7 @@ func (db *DB) HandleQuery(c *mysql.Conn, query string, callback func(*sqltypes.R db.queryCalled[key]++ db.querylog = append(db.querylog, key) // Check if we should close the connection and provoke errno 2013. - if db.shouldClose { + if db.shouldClose.Load() { c.Close() //log error @@ -412,7 +409,7 @@ func (db *DB) HandleQuery(c *mysql.Conn, query string, callback func(*sqltypes.R } } - if db.neverFail { + if db.neverFail.Load() { return callback(&sqltypes.Result{}) } // Nothing matched. @@ -450,10 +447,10 @@ func (db *DB) comQueryOrdered(query string) (*sqltypes.Result, error) { index := db.expectedExecuteFetchIndex if index >= len(db.expectedExecuteFetch) { - if db.neverFail { + if db.neverFail.Load() { return &sqltypes.Result{}, nil } - db.t.Errorf("%v: got unexpected out of bound fetch: %v >= %v", db.name, index, len(db.expectedExecuteFetch)) + db.t.Errorf("%v: got unexpected out of bound fetch: %v >= %v (%s)", db.name, index, len(db.expectedExecuteFetch), query) return nil, errors.New("unexpected out of bound fetch") } @@ -465,7 +462,7 @@ func (db *DB) comQueryOrdered(query string) (*sqltypes.Result, error) { if strings.HasSuffix(expected, "*") { if !strings.HasPrefix(query, expected[0:len(expected)-1]) { - if db.neverFail { + if db.neverFail.Load() { return &sqltypes.Result{}, nil } db.t.Errorf("%v: got unexpected query start (index=%v): %v != %v", db.name, index, query, expected) @@ -473,7 +470,7 @@ func (db *DB) comQueryOrdered(query string) (*sqltypes.Result, error) { } } else { if query != expected { - if db.neverFail { + if db.neverFail.Load() { return &sqltypes.Result{}, nil } db.t.Errorf("%v: got unexpected query (index=%v): %v != %v", db.name, index, query, expected) @@ -629,16 +626,12 @@ func (db *DB) ResetQueryLog() { // EnableConnFail makes connection to this fake DB fail. func (db *DB) EnableConnFail() { - db.mu.Lock() - defer db.mu.Unlock() - db.isConnFail = true + db.isConnFail.Store(true) } // DisableConnFail makes connection to this fake DB success. func (db *DB) DisableConnFail() { - db.mu.Lock() - defer db.mu.Unlock() - db.isConnFail = false + db.isConnFail.Store(false) } // SetConnDelay delays connections to this fake DB for the given duration @@ -650,9 +643,7 @@ func (db *DB) SetConnDelay(d time.Duration) { // EnableShouldClose closes the connection when processing the next query. func (db *DB) EnableShouldClose() { - db.mu.Lock() - defer db.mu.Unlock() - db.shouldClose = true + db.shouldClose.Store(true) } // @@ -757,8 +748,12 @@ func (db *DB) VerifyAllExecutedOrFail() { } } +func (db *DB) SetAllowAll(allowAll bool) { + db.allowAll.Store(allowAll) +} + func (db *DB) SetNeverFail(neverFail bool) { - db.neverFail = neverFail + db.neverFail.Store(neverFail) } func (db *DB) MockQueriesForTable(table string, result *sqltypes.Result) { @@ -783,3 +778,40 @@ func (db *DB) MockQueriesForTable(table string, result *sqltypes.Result) { cols..., )) } + +// GetRejectedQueryResult checks if we should reject the query. +func (db *DB) GetRejectedQueryResult(key string) error { + if err, ok := db.rejectedData[key]; ok { + return err + } + + return nil +} + +// GetQueryResult checks for explicit queries add through AddQuery(). +func (db *DB) GetQueryResult(key string) *ExpectedResult { + result, ok := db.data[key] + if ok { + return result + } + return nil +} + +// GetQueryPatternResult checks if a query matches any pattern previously added using AddQueryPattern(). +func (db *DB) GetQueryPatternResult(key string) (func(string), ExpectedResult, bool, error) { + for _, pat := range db.patternData { + if pat.expr.MatchString(key) { + userCallback, ok := db.queryPatternUserCallback[pat.expr] + if ok { + if pat.err != "" { + return userCallback, ExpectedResult{pat.result, nil}, true, fmt.Errorf(pat.err) + } + return userCallback, ExpectedResult{pat.result, nil}, true, nil + } + + return nil, ExpectedResult{nil, nil}, false, nil + } + } + + return nil, ExpectedResult{nil, nil}, false, nil +} diff --git a/go/mysql/filepos_gtid.go b/go/mysql/filepos_gtid.go index 4047ede2ee1..e5bfd055bee 100644 --- a/go/mysql/filepos_gtid.go +++ b/go/mysql/filepos_gtid.go @@ -33,14 +33,14 @@ func parseFilePosGTID(s string) (GTID, error) { return nil, fmt.Errorf("invalid FilePos GTID (%v): expecting file:pos", s) } - pos, err := strconv.Atoi(parts[1]) + pos, err := strconv.ParseUint(parts[1], 0, 32) if err != nil { return nil, fmt.Errorf("invalid FilePos GTID (%v): expecting pos to be an integer", s) } return filePosGTID{ file: parts[0], - pos: pos, + pos: uint32(pos), }, nil } @@ -56,7 +56,7 @@ func ParseFilePosGTIDSet(s string) (GTIDSet, error) { // filePosGTID implements GTID. type filePosGTID struct { file string - pos int + pos uint32 } // String implements GTID.String(). diff --git a/go/mysql/filepos_gtid_test.go b/go/mysql/filepos_gtid_test.go index b3c98b74669..ec7f9d33142 100644 --- a/go/mysql/filepos_gtid_test.go +++ b/go/mysql/filepos_gtid_test.go @@ -23,7 +23,7 @@ import ( func Test_filePosGTID_String(t *testing.T) { type fields struct { file string - pos int + pos uint32 } tests := []struct { name string @@ -52,7 +52,7 @@ func Test_filePosGTID_String(t *testing.T) { func Test_filePosGTID_ContainsGTID(t *testing.T) { type fields struct { file string - pos int + pos uint32 } type args struct { other GTID diff --git a/go/mysql/flavor.go b/go/mysql/flavor.go index ed6a3fe4b04..eeb8b14b655 100644 --- a/go/mysql/flavor.go +++ b/go/mysql/flavor.go @@ -17,13 +17,12 @@ limitations under the License. package mysql import ( + "context" "errors" "fmt" "strconv" "strings" - "context" - "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" @@ -394,7 +393,7 @@ func (c *Conn) SetReplicationPositionCommands(pos Position) []string { // as the new replication source (without changing any GTID position). // It is guaranteed to be called with replication stopped. // It should not start or stop replication. -func (c *Conn) SetReplicationSourceCommand(params *ConnParams, host string, port int, connectRetry int) string { +func (c *Conn) SetReplicationSourceCommand(params *ConnParams, host string, port int32, connectRetry int) string { args := []string{ fmt.Sprintf("MASTER_HOST = '%s'", host), fmt.Sprintf("MASTER_PORT = %d", port), @@ -458,32 +457,32 @@ func parseReplicationStatus(fields map[string]string) ReplicationStatus { SQLState: ReplicationStatusToState(fields["Slave_SQL_Running"]), LastSQLError: fields["Last_SQL_Error"], } - parseInt, _ := strconv.ParseInt(fields["Master_Port"], 10, 0) - status.SourcePort = int(parseInt) - parseInt, _ = strconv.ParseInt(fields["Connect_Retry"], 10, 0) - status.ConnectRetry = int(parseInt) - parseUint, err := strconv.ParseUint(fields["Seconds_Behind_Master"], 10, 0) + parseInt, _ := strconv.ParseInt(fields["Master_Port"], 10, 32) + status.SourcePort = int32(parseInt) + parseInt, _ = strconv.ParseInt(fields["Connect_Retry"], 10, 32) + status.ConnectRetry = int32(parseInt) + parseUint, err := strconv.ParseUint(fields["Seconds_Behind_Master"], 10, 32) if err != nil { - // we could not parse the value into a valid uint -- most commonly because the value is NULL from the + // we could not parse the value into a valid uint32 -- most commonly because the value is NULL from the // database -- so let's reflect that the underlying value was unknown on our last check status.ReplicationLagUnknown = true } else { status.ReplicationLagUnknown = false - status.ReplicationLagSeconds = uint(parseUint) + status.ReplicationLagSeconds = uint32(parseUint) } - parseUint, _ = strconv.ParseUint(fields["Master_Server_Id"], 10, 0) - status.SourceServerID = uint(parseUint) - parseUint, _ = strconv.ParseUint(fields["SQL_Delay"], 10, 0) - status.SQLDelay = uint(parseUint) + parseUint, _ = strconv.ParseUint(fields["Master_Server_Id"], 10, 32) + status.SourceServerID = uint32(parseUint) + parseUint, _ = strconv.ParseUint(fields["SQL_Delay"], 10, 32) + status.SQLDelay = uint32(parseUint) executedPosStr := fields["Exec_Master_Log_Pos"] file := fields["Relay_Master_Log_File"] if file != "" && executedPosStr != "" { - filePos, err := strconv.Atoi(executedPosStr) + filePos, err := strconv.ParseUint(executedPosStr, 10, 32) if err == nil { status.FilePosition.GTIDSet = filePosGTID{ file: file, - pos: filePos, + pos: uint32(filePos), } } } @@ -491,11 +490,11 @@ func parseReplicationStatus(fields map[string]string) ReplicationStatus { readPosStr := fields["Read_Master_Log_Pos"] file = fields["Master_Log_File"] if file != "" && readPosStr != "" { - fileRelayPos, err := strconv.Atoi(readPosStr) + fileRelayPos, err := strconv.ParseUint(readPosStr, 10, 32) if err == nil { status.RelayLogSourceBinlogEquivalentPosition.GTIDSet = filePosGTID{ file: file, - pos: fileRelayPos, + pos: uint32(fileRelayPos), } } } @@ -503,11 +502,11 @@ func parseReplicationStatus(fields map[string]string) ReplicationStatus { relayPosStr := fields["Relay_Log_Pos"] file = fields["Relay_Log_File"] if file != "" && relayPosStr != "" { - relayFilePos, err := strconv.Atoi(relayPosStr) + relayFilePos, err := strconv.ParseUint(relayPosStr, 10, 32) if err == nil { status.RelayLogFilePosition.GTIDSet = filePosGTID{ file: file, - pos: relayFilePos, + pos: uint32(relayFilePos), } } } @@ -527,11 +526,11 @@ func parsePrimaryStatus(fields map[string]string) PrimaryStatus { fileExecPosStr := fields["Position"] file := fields["File"] if file != "" && fileExecPosStr != "" { - filePos, err := strconv.Atoi(fileExecPosStr) + filePos, err := strconv.ParseUint(fileExecPosStr, 10, 32) if err == nil { status.FilePosition.GTIDSet = filePosGTID{ file: file, - pos: filePos, + pos: uint32(filePos), } } } diff --git a/go/mysql/flavor_filepos.go b/go/mysql/flavor_filepos.go index 13a3a5b8ab7..de9307f126a 100644 --- a/go/mysql/flavor_filepos.go +++ b/go/mysql/flavor_filepos.go @@ -53,14 +53,14 @@ func (flv *filePosFlavor) primaryGTIDSet(c *Conn) (GTIDSet, error) { if err != nil { return nil, err } - pos, err := strconv.Atoi(resultMap["Position"]) + pos, err := strconv.ParseUint(resultMap["Position"], 0, 32) if err != nil { return nil, fmt.Errorf("invalid FilePos GTID (%v): expecting pos to be an integer", resultMap["Position"]) } return filePosGTID{ file: resultMap["File"], - pos: pos, + pos: uint32(pos), }, nil } @@ -126,7 +126,7 @@ func (flv *filePosFlavor) sendBinlogDumpCommand(c *Conn, serverID uint32, binlog } flv.file = rpos.file - return c.WriteComBinlogDump(serverID, rpos.file, uint32(rpos.pos), 0) + return c.WriteComBinlogDump(serverID, rpos.file, rpos.pos, 0) } // readBinlogEvent is part of the Flavor interface. diff --git a/go/mysql/flavor_mariadb_test.go b/go/mysql/flavor_mariadb_test.go index 3739e9294ca..a2741c27148 100644 --- a/go/mysql/flavor_mariadb_test.go +++ b/go/mysql/flavor_mariadb_test.go @@ -30,7 +30,7 @@ func TestMariadbSetReplicationSourceCommand(t *testing.T) { Pass: "password", } host := "localhost" - port := 123 + port := int32(123) connectRetry := 1234 want := `CHANGE MASTER TO MASTER_HOST = 'localhost', @@ -57,7 +57,7 @@ func TestMariadbSetReplicationSourceCommandSSL(t *testing.T) { } params.EnableSSL() host := "localhost" - port := 123 + port := int32(123) connectRetry := 1234 want := `CHANGE MASTER TO MASTER_HOST = 'localhost', diff --git a/go/mysql/flavor_mysql.go b/go/mysql/flavor_mysql.go index ad23854d374..407c14e34b0 100644 --- a/go/mysql/flavor_mysql.go +++ b/go/mysql/flavor_mysql.go @@ -363,7 +363,7 @@ const TablesWithSize80 = `SELECT t.table_name, SUM(i.file_size), SUM(i.allocated_size) FROM information_schema.tables t -INNER JOIN information_schema.innodb_tablespaces i +LEFT JOIN information_schema.innodb_tablespaces i ON i.name LIKE CONCAT(database(), '/%') AND (i.name = CONCAT(t.table_schema, '/', t.table_name) OR i.name LIKE CONCAT(t.table_schema, '/', t.table_name, '#p#%')) WHERE t.table_schema = database() GROUP BY t.table_name, t.table_type, t.create_time, t.table_comment` diff --git a/go/mysql/flavor_mysql_test.go b/go/mysql/flavor_mysql_test.go index 33b98cb4941..75d6a3ebc65 100644 --- a/go/mysql/flavor_mysql_test.go +++ b/go/mysql/flavor_mysql_test.go @@ -29,7 +29,7 @@ func TestMysql56SetReplicationSourceCommand(t *testing.T) { Pass: "password", } host := "localhost" - port := 123 + port := int32(123) connectRetry := 1234 want := `CHANGE MASTER TO MASTER_HOST = 'localhost', @@ -56,7 +56,7 @@ func TestMysql56SetReplicationSourceCommandSSL(t *testing.T) { } params.EnableSSL() host := "localhost" - port := 123 + port := int32(123) connectRetry := 1234 want := `CHANGE MASTER TO MASTER_HOST = 'localhost', diff --git a/go/mysql/flavor_mysqlgr.go b/go/mysql/flavor_mysqlgr.go index 0d05a085802..33bd1e6e3e1 100644 --- a/go/mysql/flavor_mysqlgr.go +++ b/go/mysql/flavor_mysqlgr.go @@ -203,18 +203,17 @@ func (mysqlGRFlavor) status(c *Conn) (ReplicationStatus, error) { } func parsePrimaryGroupMember(res *ReplicationStatus, row []sqltypes.Value) { - res.SourceHost = row[0].ToString() /* MEMBER_HOST */ - memberPort, _ := row[1].ToInt64() /* MEMBER_PORT */ - res.SourcePort = int(memberPort) + res.SourceHost = row[0].ToString() /* MEMBER_HOST */ + res.SourcePort, _ = row[1].ToInt32() /* MEMBER_PORT */ } func parseReplicationApplierLag(res *ReplicationStatus, row []sqltypes.Value) { - lagSec, err := row[0].ToInt64() + lagSec, err := row[0].ToUint32() // if the error is not nil, ReplicationLagSeconds will remain to be MaxUint32 if err == nil { // Only set where there is no error // The value can be NULL when there is no replication applied yet - res.ReplicationLagSeconds = uint(lagSec) + res.ReplicationLagSeconds = lagSec } } diff --git a/go/mysql/flavor_mysqlgr_test.go b/go/mysql/flavor_mysqlgr_test.go index fcc5765a18f..6b15ee5048e 100644 --- a/go/mysql/flavor_mysqlgr_test.go +++ b/go/mysql/flavor_mysqlgr_test.go @@ -32,7 +32,7 @@ func TestMysqlGRParsePrimaryGroupMember(t *testing.T) { } parsePrimaryGroupMember(&res, rows) assert.Equal(t, "host1", res.SourceHost) - assert.Equal(t, 10, res.SourcePort) + assert.Equal(t, int32(10), res.SourcePort) assert.Equal(t, ReplicationStateUnknown, res.IOState) assert.Equal(t, ReplicationStateUnknown, res.SQLState) } @@ -44,10 +44,10 @@ func TestMysqlGRReplicationApplierLagParse(t *testing.T) { } parseReplicationApplierLag(&res, row) // strconv.NumError will leave ReplicationLagSeconds unset - assert.Equal(t, uint(0), res.ReplicationLagSeconds) + assert.Equal(t, uint32(0), res.ReplicationLagSeconds) row = []sqltypes.Value{ sqltypes.MakeTrusted(querypb.Type_INT32, []byte("100")), } parseReplicationApplierLag(&res, row) - assert.Equal(t, uint(100), res.ReplicationLagSeconds) + assert.Equal(t, uint32(100), res.ReplicationLagSeconds) } diff --git a/go/mysql/query.go b/go/mysql/query.go index 0107e7606bc..f8adb91f60f 100644 --- a/go/mysql/query.go +++ b/go/mysql/query.go @@ -573,7 +573,7 @@ func (c *Conn) parseComStmtExecute(prepareData map[uint32]*PrepareData, data []b } if prepare.ParamsCount > 0 { - bitMap, pos, ok = readBytes(payload, pos, int((prepare.ParamsCount+7)/8)) + bitMap, pos, ok = readBytes(payload, pos, (int(prepare.ParamsCount)+7)/8) if !ok { return stmtID, 0, NewSQLError(CRMalformedPacket, SSUnknownSQLState, "reading NULL-bitmap failed") } diff --git a/go/mysql/replication_status.go b/go/mysql/replication_status.go index 8b27342f2bc..ff06d559a56 100644 --- a/go/mysql/replication_status.go +++ b/go/mysql/replication_status.go @@ -47,19 +47,19 @@ type ReplicationStatus struct { RelayLogSourceBinlogEquivalentPosition Position // RelayLogFilePosition stores the position in the relay log file RelayLogFilePosition Position - SourceServerID uint + SourceServerID uint32 IOState ReplicationState LastIOError string SQLState ReplicationState LastSQLError string - ReplicationLagSeconds uint + ReplicationLagSeconds uint32 ReplicationLagUnknown bool SourceHost string - SourcePort int + SourcePort int32 SourceUser string - ConnectRetry int + ConnectRetry int32 SourceUUID SID - SQLDelay uint + SQLDelay uint32 AutoPosition bool UsingGTID bool HasReplicationFilters bool @@ -97,15 +97,15 @@ func ReplicationStatusToProto(s ReplicationStatus) *replicationdatapb.Status { RelayLogPosition: EncodePosition(s.RelayLogPosition), FilePosition: EncodePosition(s.FilePosition), RelayLogSourceBinlogEquivalentPosition: EncodePosition(s.RelayLogSourceBinlogEquivalentPosition), - SourceServerId: uint32(s.SourceServerID), - ReplicationLagSeconds: uint32(s.ReplicationLagSeconds), + SourceServerId: s.SourceServerID, + ReplicationLagSeconds: s.ReplicationLagSeconds, ReplicationLagUnknown: s.ReplicationLagUnknown, - SqlDelay: uint32(s.SQLDelay), + SqlDelay: s.SQLDelay, RelayLogFilePosition: EncodePosition(s.RelayLogFilePosition), SourceHost: s.SourceHost, SourceUser: s.SourceUser, - SourcePort: int32(s.SourcePort), - ConnectRetry: int32(s.ConnectRetry), + SourcePort: s.SourcePort, + ConnectRetry: s.ConnectRetry, SourceUuid: s.SourceUUID.String(), IoState: int32(s.IOState), LastIoError: s.LastIOError, @@ -154,14 +154,14 @@ func ProtoToReplicationStatus(s *replicationdatapb.Status) ReplicationStatus { FilePosition: filePos, RelayLogSourceBinlogEquivalentPosition: fileRelayPos, RelayLogFilePosition: relayFilePos, - SourceServerID: uint(s.SourceServerId), - ReplicationLagSeconds: uint(s.ReplicationLagSeconds), + SourceServerID: s.SourceServerId, + ReplicationLagSeconds: s.ReplicationLagSeconds, ReplicationLagUnknown: s.ReplicationLagUnknown, - SQLDelay: uint(s.SqlDelay), + SQLDelay: s.SqlDelay, SourceHost: s.SourceHost, SourceUser: s.SourceUser, - SourcePort: int(s.SourcePort), - ConnectRetry: int(s.ConnectRetry), + SourcePort: s.SourcePort, + ConnectRetry: s.ConnectRetry, SourceUUID: sid, IOState: ReplicationState(s.IoState), LastIOError: s.LastIoError, diff --git a/go/mysql/server_flaky_test.go b/go/mysql/server_flaky_test.go index 7b2146577a9..ad8c324c96e 100644 --- a/go/mysql/server_flaky_test.go +++ b/go/mysql/server_flaky_test.go @@ -1233,7 +1233,7 @@ func TestErrorCodes(t *testing.T) { // internal vitess errors tests := []struct { err error - code int + code ErrorCode sqlState string text string }{ diff --git a/go/mysql/sql_error.go b/go/mysql/sql_error.go index 19a8ef70ee3..369b486c048 100644 --- a/go/mysql/sql_error.go +++ b/go/mysql/sql_error.go @@ -30,7 +30,7 @@ import ( // SQLError is the error structure returned from calling a db library function type SQLError struct { - Num int + Num ErrorCode State string Message string Query string @@ -39,7 +39,7 @@ type SQLError struct { // NewSQLError creates a new SQLError. // If sqlState is left empty, it will default to "HY000" (general error). // TODO: Should be aligned with vterrors, stack traces and wrapping -func NewSQLError(number int, sqlState string, format string, args ...any) *SQLError { +func NewSQLError(number ErrorCode, sqlState string, format string, args ...any) *SQLError { if sqlState == "" { sqlState = SSUnknownSQLState } @@ -69,7 +69,7 @@ func (se *SQLError) Error() string { } // Number returns the internal MySQL error code. -func (se *SQLError) Number() int { +func (se *SQLError) Number() ErrorCode { return se.Num } @@ -82,6 +82,17 @@ var errExtract = regexp.MustCompile(`.*\(errno ([0-9]*)\) \(sqlstate ([0-9a-zA-Z // NewSQLErrorFromError returns a *SQLError from the provided error. // If it's not the right type, it still tries to get it from a regexp. +// Notes about the `error` return type: +// The function really returns *SQLError or `nil`. Seemingly, the function could just return +// `*SQLError` type. However, it really must return `error`. The reason is the way `golang` +// treats `nil` interfaces vs `nil` implementing values. +// If this function were to return a nil `*SQLError`, the following undesired behavior would happen: +// +// var err error +// err = NewSQLErrorFromError(nil) // returns a nil `*SQLError` +// if err != nil { +// doSomething() // this actually runs +// } func NewSQLErrorFromError(err error) error { if err == nil { return nil @@ -106,7 +117,7 @@ func NewSQLErrorFromError(err error) error { } func extractSQLErrorFromMessage(match []string, msg string) *SQLError { - num, err := strconv.Atoi(match[1]) + num, err := strconv.ParseUint(match[1], 10, 16) if err != nil { return &SQLError{ Num: ERUnknownError, @@ -116,7 +127,7 @@ func extractSQLErrorFromMessage(match []string, msg string) *SQLError { } return &SQLError{ - Num: num, + Num: ErrorCode(num), State: match[2], Message: msg, } @@ -153,7 +164,7 @@ func mapToSQLErrorFromErrorCode(err error, msg string) *SQLError { } type mysqlCode struct { - num int + num ErrorCode state string } @@ -213,7 +224,7 @@ func getStateToMySQLState(state vterrors.State) mysqlCode { // If the state is == 0, an empty string is returned func ConvertStateToMySQLErrorCode(state vterrors.State) string { s := getStateToMySQLState(state) - return strconv.Itoa(s.num) + return s.num.ToString() } // ConvertStateToMySQLState returns MySQL state for the given vterrors.State @@ -243,7 +254,7 @@ func convertToMysqlError(err error) error { var isGRPCOverflowRE = regexp.MustCompile(`.*?grpc: (received|trying to send) message larger than max \(\d+ vs. \d+\)`) -func demuxResourceExhaustedErrors(msg string) int { +func demuxResourceExhaustedErrors(msg string) ErrorCode { switch { case isGRPCOverflowRE.Match([]byte(msg)): return ERNetPacketTooLarge diff --git a/go/mysql/sql_error_test.go b/go/mysql/sql_error_test.go index 0b29735e758..544c5dc94ae 100644 --- a/go/mysql/sql_error_test.go +++ b/go/mysql/sql_error_test.go @@ -29,7 +29,7 @@ import ( func TestDumuxResourceExhaustedErrors(t *testing.T) { type testCase struct { msg string - want int + want ErrorCode } cases := []testCase{ @@ -54,7 +54,7 @@ func TestDumuxResourceExhaustedErrors(t *testing.T) { func TestNewSQLErrorFromError(t *testing.T) { var tCases = []struct { err error - num int + num ErrorCode ss string }{ { diff --git a/go/sets/set.go b/go/sets/set.go new file mode 100644 index 00000000000..642291b0551 --- /dev/null +++ b/go/sets/set.go @@ -0,0 +1,130 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sets + +import "sort" + +// ordered is used to constraint the set to be only for +// some basic ordered types. We only care about string here +// for now. +type ordered interface { + ~string +} + +type Set[T comparable] map[T]struct{} + +// New creates a Set from a list of values. +func New[T comparable](items ...T) Set[T] { + s := make(Set[T], len(items)) + s.Insert(items...) + return s +} + +// Insert adds items to the set. +func (s Set[T]) Insert(items ...T) Set[T] { + for _, item := range items { + s[item] = struct{}{} + } + return s +} + +// Delete removes all items from the set. +func (s Set[T]) Delete(items ...T) Set[T] { + for _, item := range items { + delete(s, item) + } + return s +} + +// Has returns true if and only if item is contained in the set. +func (s Set[T]) Has(item T) bool { + _, found := s[item] + return found +} + +// HasAny returns true if any items are contained in the set. +func (s Set[T]) HasAny(items ...T) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in other. +func (s Set[T]) Difference(other Set[T]) Set[T] { + result := New[T]() + for key := range s { + if !other.Has(key) { + result.Insert(key) + } + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s and other +func (s Set[T]) Intersection(o Set[T]) Set[T] { + var walk, other Set[T] + result := New[T]() + if s.Len() < o.Len() { + walk = s + other = o + } else { + walk = o + other = s + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// Equal returns if both sets contain the same elements +func (s Set[T]) Equal(other Set[T]) bool { + return len(s) == len(other) && len(s) == len(s.Intersection(other)) +} + +type sortableSlice[T ordered] []T + +func (g sortableSlice[T]) Len() int { return len(g) } +func (g sortableSlice[T]) Less(i, j int) bool { return less[T](g[i], g[j]) } +func (g sortableSlice[T]) Swap(i, j int) { g[i], g[j] = g[j], g[i] } + +// List returns the contents as a sorted T slice. +// +// This is a separate function and not a method because not all types supported +// by Generic are ordered and only those can be sorted. +func List[T ordered](s Set[T]) []T { + res := make(sortableSlice[T], 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return res +} + +// Len returns the size of the set. +func (s Set[T]) Len() int { + return len(s) +} + +func less[T ordered](lhs, rhs T) bool { + return lhs < rhs +} diff --git a/go/slices2/slices.go b/go/slices2/slices.go new file mode 100644 index 00000000000..c69acb13cd5 --- /dev/null +++ b/go/slices2/slices.go @@ -0,0 +1,39 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package slices2 contains generic Slice helpers; +// Some of this code is sourced from https://github.com/luraim/fun (Apache v2) +package slices2 + +// All returns true if all elements return true for given predicate +func All[T any](s []T, fn func(T) bool) bool { + for _, e := range s { + if !fn(e) { + return false + } + } + return true +} + +// Any returns true if at least one element returns true for given predicate +func Any[T any](s []T, fn func(T) bool) bool { + for _, e := range s { + if fn(e) { + return true + } + } + return false +} diff --git a/go/sqltypes/bind_variables.go b/go/sqltypes/bind_variables.go index dc91e9ed6ef..232be6415f3 100644 --- a/go/sqltypes/bind_variables.go +++ b/go/sqltypes/bind_variables.go @@ -157,6 +157,15 @@ func BuildBindVariable(v any) (*querypb.BindVariable, error) { Type: querypb.Type_INT64, Value: strconv.AppendInt(nil, int64(v), 10), }, nil + case uint: + return &querypb.BindVariable{ + Type: querypb.Type_UINT64, + Value: strconv.AppendUint(nil, uint64(v), 10), + }, nil + case int32: + return Int32BindVariable(v), nil + case uint32: + return Uint32BindVariable(v), nil case int64: return Int64BindVariable(v), nil case uint64: @@ -223,6 +232,42 @@ func BuildBindVariable(v any) (*querypb.BindVariable, error) { bv.Values[i] = &values[i] } return bv, nil + case []uint: + bv := &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: make([]*querypb.Value, len(v)), + } + values := make([]querypb.Value, len(v)) + for i, lv := range v { + values[i].Type = querypb.Type_UINT64 + values[i].Value = strconv.AppendInt(nil, int64(lv), 10) + bv.Values[i] = &values[i] + } + return bv, nil + case []int32: + bv := &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: make([]*querypb.Value, len(v)), + } + values := make([]querypb.Value, len(v)) + for i, lv := range v { + values[i].Type = querypb.Type_INT32 + values[i].Value = strconv.AppendInt(nil, int64(lv), 10) + bv.Values[i] = &values[i] + } + return bv, nil + case []uint32: + bv := &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: make([]*querypb.Value, len(v)), + } + values := make([]querypb.Value, len(v)) + for i, lv := range v { + values[i].Type = querypb.Type_UINT32 + values[i].Value = strconv.AppendUint(nil, uint64(lv), 10) + bv.Values[i] = &values[i] + } + return bv, nil case []int64: bv := &querypb.BindVariable{ Type: querypb.Type_TUPLE, diff --git a/go/sqltypes/bind_variables_test.go b/go/sqltypes/bind_variables_test.go index 3a5ca630f13..40925d228a1 100644 --- a/go/sqltypes/bind_variables_test.go +++ b/go/sqltypes/bind_variables_test.go @@ -117,6 +117,24 @@ func TestBuildBindVariable(t *testing.T) { Type: querypb.Type_INT64, Value: []byte("1"), }, + }, { + in: uint(1), + out: &querypb.BindVariable{ + Type: querypb.Type_UINT64, + Value: []byte("1"), + }, + }, { + in: int32(1), + out: &querypb.BindVariable{ + Type: querypb.Type_INT32, + Value: []byte("1"), + }, + }, { + in: uint32(1), + out: &querypb.BindVariable{ + Type: querypb.Type_UINT32, + Value: []byte("1"), + }, }, { in: int64(1), out: &querypb.BindVariable{ @@ -201,6 +219,42 @@ func TestBuildBindVariable(t *testing.T) { Value: []byte("2"), }}, }, + }, { + in: []uint{1, 2}, + out: &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: []*querypb.Value{{ + Type: querypb.Type_UINT64, + Value: []byte("1"), + }, { + Type: querypb.Type_UINT64, + Value: []byte("2"), + }}, + }, + }, { + in: []int32{1, 2}, + out: &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: []*querypb.Value{{ + Type: querypb.Type_INT32, + Value: []byte("1"), + }, { + Type: querypb.Type_INT32, + Value: []byte("2"), + }}, + }, + }, { + in: []uint32{1, 2}, + out: &querypb.BindVariable{ + Type: querypb.Type_TUPLE, + Values: []*querypb.Value{{ + Type: querypb.Type_UINT32, + Value: []byte("1"), + }, { + Type: querypb.Type_UINT32, + Value: []byte("2"), + }}, + }, }, { in: []int64{1, 2}, out: &querypb.BindVariable{ diff --git a/go/sqltypes/named_result.go b/go/sqltypes/named_result.go index 8ce16b98b3f..57e543ffc12 100644 --- a/go/sqltypes/named_result.go +++ b/go/sqltypes/named_result.go @@ -54,6 +54,21 @@ func (r RowNamedValues) ToInt64(fieldName string) (int64, error) { return 0, ErrNoSuchField } +// ToInt returns the named field as int +func (r RowNamedValues) ToInt(fieldName string) (int, error) { + if v, ok := r[fieldName]; ok { + return v.ToInt() + } + return 0, ErrNoSuchField +} + +func (r RowNamedValues) ToInt32(fieldName string) (int32, error) { + if v, ok := r[fieldName]; ok { + return v.ToInt32() + } + return 0, ErrNoSuchField +} + // AsInt64 returns the named field as int64, or default value if nonexistent/error func (r RowNamedValues) AsInt64(fieldName string, def int64) int64 { if v, err := r.ToInt64(fieldName); err == nil { @@ -62,6 +77,13 @@ func (r RowNamedValues) AsInt64(fieldName string, def int64) int64 { return def } +func (r RowNamedValues) AsInt32(fieldName string, def int32) int32 { + if v, err := r.ToInt32(fieldName); err == nil { + return v + } + return def +} + // ToUint64 returns the named field as uint64 func (r RowNamedValues) ToUint64(fieldName string) (uint64, error) { if v, ok := r[fieldName]; ok { diff --git a/go/sqltypes/result.go b/go/sqltypes/result.go index b0d12ed1bd2..7d4025373e7 100644 --- a/go/sqltypes/result.go +++ b/go/sqltypes/result.go @@ -91,11 +91,12 @@ func (result *Result) ReplaceKeyspace(keyspace string) { // Copy creates a deep copy of Result. func (result *Result) Copy() *Result { out := &Result{ - RowsAffected: result.RowsAffected, InsertID: result.InsertID, + RowsAffected: result.RowsAffected, RowsRead: result.RowsRead, - Info: result.Info, + InsertID: result.InsertID, SessionStateChanges: result.SessionStateChanges, StatusFlags: result.StatusFlags, + Info: result.Info, } if result.Fields != nil { out.Fields = make([]*querypb.Field, len(result.Fields)) diff --git a/go/sqltypes/value.go b/go/sqltypes/value.go index 367d82ba04e..745058a5bed 100644 --- a/go/sqltypes/value.go +++ b/go/sqltypes/value.go @@ -289,6 +289,24 @@ func (v Value) ToInt64() (int64, error) { return strconv.ParseInt(v.RawStr(), 10, 64) } +func (v Value) ToInt32() (int32, error) { + if !v.IsIntegral() { + return 0, ErrIncompatibleTypeCast + } + + i, err := strconv.ParseInt(v.RawStr(), 10, 32) + return int32(i), err +} + +// ToInt returns the value as MySQL would return it as a int. +func (v Value) ToInt() (int, error) { + if !v.IsIntegral() { + return 0, ErrIncompatibleTypeCast + } + + return strconv.Atoi(v.RawStr()) +} + // ToFloat64 returns the value as MySQL would return it as a float64. func (v Value) ToFloat64() (float64, error) { if !IsNumber(v.typ) { @@ -298,6 +316,16 @@ func (v Value) ToFloat64() (float64, error) { return strconv.ParseFloat(v.RawStr(), 64) } +// ToUint16 returns the value as MySQL would return it as a uint16. +func (v Value) ToUint16() (uint16, error) { + if !v.IsIntegral() { + return 0, ErrIncompatibleTypeCast + } + + i, err := strconv.ParseUint(v.RawStr(), 10, 16) + return uint16(i), err +} + // ToUint64 returns the value as MySQL would return it as a uint64. func (v Value) ToUint64() (uint64, error) { if !v.IsIntegral() { @@ -307,6 +335,15 @@ func (v Value) ToUint64() (uint64, error) { return strconv.ParseUint(v.RawStr(), 10, 64) } +func (v Value) ToUint32() (uint32, error) { + if !v.IsIntegral() { + return 0, ErrIncompatibleTypeCast + } + + u, err := strconv.ParseUint(v.RawStr(), 10, 32) + return uint32(u), err +} + // ToBool returns the value as a bool value func (v Value) ToBool() (bool, error) { i, err := v.ToInt64() diff --git a/go/streamlog/streamlog.go b/go/streamlog/streamlog.go index 7875ae1146b..c7916c49256 100644 --- a/go/streamlog/streamlog.go +++ b/go/streamlog/streamlog.go @@ -118,11 +118,11 @@ const ( // StreamLogger is a non-blocking broadcaster of messages. // Subscribers can use channels or HTTP. -type StreamLogger struct { +type StreamLogger[T any] struct { name string size int mu sync.Mutex - subscribed map[chan any]string + subscribed map[chan T]string } // LogFormatter is the function signature used to format an arbitrary @@ -131,17 +131,17 @@ type LogFormatter func(out io.Writer, params url.Values, message any) error // New returns a new StreamLogger that can stream events to subscribers. // The size parameter defines the channel size for the subscribers. -func New(name string, size int) *StreamLogger { - return &StreamLogger{ +func New[T any](name string, size int) *StreamLogger[T] { + return &StreamLogger[T]{ name: name, size: size, - subscribed: make(map[chan any]string), + subscribed: make(map[chan T]string), } } // Send sends message to all the writers subscribed to logger. Calling // Send does not block. -func (logger *StreamLogger) Send(message any) { +func (logger *StreamLogger[T]) Send(message T) { logger.mu.Lock() defer logger.mu.Unlock() @@ -158,17 +158,17 @@ func (logger *StreamLogger) Send(message any) { // Subscribe returns a channel which can be used to listen // for messages. -func (logger *StreamLogger) Subscribe(name string) chan any { +func (logger *StreamLogger[T]) Subscribe(name string) chan T { logger.mu.Lock() defer logger.mu.Unlock() - ch := make(chan any, logger.size) + ch := make(chan T, logger.size) logger.subscribed[ch] = name return ch } // Unsubscribe removes the channel from the subscription. -func (logger *StreamLogger) Unsubscribe(ch chan any) { +func (logger *StreamLogger[T]) Unsubscribe(ch chan T) { logger.mu.Lock() defer logger.mu.Unlock() @@ -176,13 +176,13 @@ func (logger *StreamLogger) Unsubscribe(ch chan any) { } // Name returns the name of StreamLogger. -func (logger *StreamLogger) Name() string { +func (logger *StreamLogger[T]) Name() string { return logger.name } // ServeLogs registers the URL on which messages will be broadcast. // It is safe to register multiple URLs for the same StreamLogger. -func (logger *StreamLogger) ServeLogs(url string, logf LogFormatter) { +func (logger *StreamLogger[T]) ServeLogs(url string, logf LogFormatter) { http.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) { if err := acl.CheckAccessHTTP(r, acl.DEBUGGING); err != nil { acl.SendError(w, err) @@ -213,7 +213,7 @@ func (logger *StreamLogger) ServeLogs(url string, logf LogFormatter) { // // Returns the channel used for the subscription which can be used to close // it. -func (logger *StreamLogger) LogToFile(path string, logf LogFormatter) (chan any, error) { +func (logger *StreamLogger[T]) LogToFile(path string, logf LogFormatter) (chan T, error) { rotateChan := make(chan os.Signal, 1) signal.Notify(rotateChan, syscall.SIGUSR2) @@ -248,7 +248,7 @@ type Formatter interface { // GetFormatter returns a formatter function for objects conforming to the // Formatter interface -func GetFormatter(logger *StreamLogger) LogFormatter { +func GetFormatter[T any](logger *StreamLogger[T]) LogFormatter { return func(w io.Writer, params url.Values, val any) error { fmter, ok := val.(Formatter) if !ok { diff --git a/go/streamlog/streamlog_flaky_test.go b/go/streamlog/streamlog_flaky_test.go index 0f2083a8486..b829f965174 100644 --- a/go/streamlog/streamlog_flaky_test.go +++ b/go/streamlog/streamlog_flaky_test.go @@ -53,7 +53,7 @@ func TestHTTP(t *testing.T) { go http.Serve(l, nil) - logger := New("logger", 1) + logger := New[*logMessage]("logger", 1) logger.ServeLogs("/log", testLogf) // This should not block - there are no subscribers yet. @@ -122,7 +122,7 @@ func TestHTTP(t *testing.T) { } func TestChannel(t *testing.T) { - logger := New("logger", 1) + logger := New[*logMessage]("logger", 1) // Subscribe. ch := logger.Subscribe("test") @@ -140,7 +140,7 @@ func TestChannel(t *testing.T) { msg := fmt.Sprint("msg", i) done := make(chan struct{}) go func() { - if want, got := msg+"\n", (<-ch).(*logMessage).Format(nil); got != want { + if want, got := msg+"\n", (<-ch).Format(nil); got != want { t.Errorf("Unexpected message in log. got: %q, want: %q", got, want) } close(done) @@ -158,7 +158,7 @@ func TestChannel(t *testing.T) { for { select { case msg := <-ch: - got = append(got, msg.(*logMessage).Format(nil)) + got = append(got, msg.Format(nil)) case <-writeDone: close(readDone) return @@ -191,7 +191,7 @@ func TestChannel(t *testing.T) { } func TestFile(t *testing.T) { - logger := New("logger", 10) + logger := New[*logMessage]("logger", 10) dir := t.TempDir() diff --git a/go/sync2/consolidator.go b/go/sync2/consolidator.go index cf5dd88a7d9..604d7fff35b 100644 --- a/go/sync2/consolidator.go +++ b/go/sync2/consolidator.go @@ -21,47 +21,65 @@ import ( "sync/atomic" "vitess.io/vitess/go/cache" + "vitess.io/vitess/go/sqltypes" ) // Consolidator consolidates duplicate queries from executing simulaneously // and shares results between them. -type Consolidator struct { +type Consolidator interface { + Create(string) (PendingResult, bool) + Items() []ConsolidatorCacheItem + Record(query string) +} + +// PendingResult is a wrapper for result of a query. +type PendingResult interface { + Broadcast() + Err() error + SetErr(error) + SetResult(*sqltypes.Result) + Result() *sqltypes.Result + Wait() +} + +type consolidator struct { *ConsolidatorCache mu sync.Mutex - queries map[string]*Result + queries map[string]*pendingResult } // NewConsolidator creates a new Consolidator -func NewConsolidator() *Consolidator { - return &Consolidator{ - queries: make(map[string]*Result), +func NewConsolidator() Consolidator { + return &consolidator{ ConsolidatorCache: NewConsolidatorCache(1000), + queries: make(map[string]*pendingResult), } } -// Result is a wrapper for result of a query. -type Result struct { +// pendingResult is a wrapper for result of a query. +type pendingResult struct { // executing is used to block additional requests. // The original request holds a write lock while additional ones are blocked // on acquiring a read lock (see Wait() below.) executing sync.RWMutex - consolidator *Consolidator + consolidator *consolidator query string - Result any - Err error + result *sqltypes.Result + err error } // Create adds a query to currently executing queries and acquires a // lock on its Result if it is not already present. If the query is // a duplicate, Create returns false. -func (co *Consolidator) Create(query string) (r *Result, created bool) { +func (co *consolidator) Create(query string) (PendingResult, bool) { co.mu.Lock() defer co.mu.Unlock() + var r *pendingResult if r, ok := co.queries[query]; ok { return r, false } - r = &Result{consolidator: co, query: query} + r = &pendingResult{consolidator: co, query: query} r.executing.Lock() co.queries[query] = r return r, true @@ -70,16 +88,36 @@ func (co *Consolidator) Create(query string) (r *Result, created bool) { // Broadcast removes the entry from current queries and releases the // lock on its Result. Broadcast should be invoked when original // query completes execution. -func (rs *Result) Broadcast() { +func (rs *pendingResult) Broadcast() { rs.consolidator.mu.Lock() defer rs.consolidator.mu.Unlock() delete(rs.consolidator.queries, rs.query) rs.executing.Unlock() } +// Err returns any error returned by the query. +func (rs *pendingResult) Err() error { + return rs.err +} + +// Result returns any result returned by the query. +func (rs *pendingResult) Result() *sqltypes.Result { + return rs.result +} + +// SetErr sets any error returned by the query. +func (rs *pendingResult) SetErr(err error) { + rs.err = err +} + +// SetResult sets any result returned by the query. +func (rs *pendingResult) SetResult(res *sqltypes.Result) { + rs.result = res +} + // Wait waits for the original query to complete execution. Wait should // be invoked for duplicate queries. -func (rs *Result) Wait() { +func (rs *pendingResult) Wait() { rs.consolidator.Record(rs.query) rs.executing.RLock() } diff --git a/go/sync2/consolidator_test.go b/go/sync2/consolidator_test.go index 35d32e94051..132a253ba29 100644 --- a/go/sync2/consolidator_test.go +++ b/go/sync2/consolidator_test.go @@ -19,6 +19,8 @@ package sync2 import ( "reflect" "testing" + + "vitess.io/vitess/go/sqltypes" ) func TestConsolidator(t *testing.T) { @@ -44,17 +46,17 @@ func TestConsolidator(t *testing.T) { t.Fatalf("did not expect consolidator to register a new entry") } - result := 1 + result := &sqltypes.Result{} go func() { - orig.Result = &result + orig.SetResult(result) orig.Broadcast() }() dup.Wait() - if *orig.Result.(*int) != result { + if orig.Result() != result { t.Errorf("failed to pass result") } - if *orig.Result.(*int) != *dup.Result.(*int) { + if orig.Result() != dup.Result() { t.Fatalf("failed to share the result") } @@ -71,7 +73,7 @@ func TestConsolidator(t *testing.T) { } go func() { - second.Result = &result + second.SetResult(result) second.Broadcast() }() dup.Wait() diff --git a/go/sync2/fake_consolidator.go b/go/sync2/fake_consolidator.go new file mode 100644 index 00000000000..64c59e78a5a --- /dev/null +++ b/go/sync2/fake_consolidator.go @@ -0,0 +1,114 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sync2 + +import ( + "vitess.io/vitess/go/sqltypes" +) + +// FakeConsolidator satisfies the Consolidator interface and can be used to mock +// how Vitess interacts with the Consolidator. +type FakeConsolidator struct { + // CreateCalls can be used to inspect Create calls. + CreateCalls []string + // CreateReturns can be used to inspect Create return values. + CreateReturns []*FakeConsolidatorCreateReturn + // CreateReturnCreated pre-configures the return value of Create calls. + CreateReturn *FakeConsolidatorCreateReturn + // RecordCalls can be usd to inspect Record calls. + RecordCalls []string +} + +// FakeConsolidatorCreateReturn wraps the two return values of a call to +// FakeConsolidator.Create. +type FakeConsolidatorCreateReturn struct { + // PendingResult contains the PendingResult return value of a call to + // FakeConsolidator.Create. + PendingResult + // PendingResult contains the Created return value of a call to + // FakeConsolidator.Create. + Created bool +} + +// FakePendingResult satisfies the PendingResult interface and can be used to +// mock how Vitess interacts with the Consolidator. +type FakePendingResult struct { + // BroadcastCalls can be used to inspect Broadcast calls. + BroadcastCalls int + // WaitCalls can be used to inspect Wait calls. + WaitCalls int + err error + result *sqltypes.Result +} + +var ( + _ Consolidator = &FakeConsolidator{} + _ PendingResult = &FakePendingResult{} +) + +// NewFakeConsolidator creates a new FakeConsolidator. +func NewFakeConsolidator() *FakeConsolidator { + return &FakeConsolidator{} +} + +// Create records the Create call for later verification, and returns a +// pre-configured PendingResult and "created" bool. +func (fc *FakeConsolidator) Create(sql string) (PendingResult, bool) { + fc.CreateCalls = append(fc.CreateCalls, sql) + fc.CreateReturns = append(fc.CreateReturns, fc.CreateReturn) + return fc.CreateReturn.PendingResult, fc.CreateReturn.Created +} + +// Record records the Record call for later verification. +func (fc *FakeConsolidator) Record(sql string) { + fc.RecordCalls = append(fc.RecordCalls, sql) +} + +// Items is currently a no-op. +func (fc *FakeConsolidator) Items() []ConsolidatorCacheItem { + return nil +} + +// Broadcast records the Broadcast call for later verification. +func (fr *FakePendingResult) Broadcast() { + fr.BroadcastCalls++ +} + +// Err returns the pre-configured error. +func (fr *FakePendingResult) Err() error { + return fr.err +} + +// Result returns the pre-configured Result. +func (fr *FakePendingResult) Result() *sqltypes.Result { + return fr.result +} + +// SetErr stores the err, which can be retrieved with Err. +func (fr *FakePendingResult) SetErr(err error) { + fr.err = err +} + +// SetResult stores the result, which can be retrieved with Result. +func (fr *FakePendingResult) SetResult(result *sqltypes.Result) { + fr.result = result +} + +// Wait records the Wait call for later verification. +func (fr *FakePendingResult) Wait() { + fr.WaitCalls++ +} diff --git a/go/test/endtoend/backup/pitr/backup_mysqlctld_pitr_test.go b/go/test/endtoend/backup/pitr/backup_mysqlctld_pitr_test.go index f93dfa475b6..dfb869b4de2 100644 --- a/go/test/endtoend/backup/pitr/backup_mysqlctld_pitr_test.go +++ b/go/test/endtoend/backup/pitr/backup_mysqlctld_pitr_test.go @@ -138,9 +138,9 @@ func TestIncrementalBackupMysqlctld(t *testing.T) { if tc.writeBeforeBackup { backup.InsertRowOnPrimary(t, "") } - // we wait for 1 second because backups ar ewritten to a directory named after the current timestamp, - // in 1 second resolution. We want to aoid two backups that have the same pathname. Realistically this - // is only ever a problem in this endtoend test, not in production. + // we wait for 1 second because backups are written to a directory named after the current timestamp, + // in 1 second resolution. We want to avoid two backups that have the same pathname. Realistically this + // is only ever a problem in this end-to-end test, not in production. // Also, we gie the replica a chance to catch up. time.Sleep(1100 * time.Millisecond) waitForReplica(t) diff --git a/go/test/endtoend/backup/vtbackup/backup_only_test.go b/go/test/endtoend/backup/vtbackup/backup_only_test.go index 3730a1fa586..408cc64a21b 100644 --- a/go/test/endtoend/backup/vtbackup/backup_only_test.go +++ b/go/test/endtoend/backup/vtbackup/backup_only_test.go @@ -18,6 +18,7 @@ package vtbackup import ( "context" + "encoding/json" "fmt" "os" "path" @@ -56,18 +57,29 @@ func TestTabletInitialBackup(t *testing.T) { // - list the backups, remove them defer cluster.PanicHandler(t) + waitForReplicationToCatchup([]cluster.Vttablet{*replica1, *replica2}) + vtBackup(t, true, false, false) verifyBackupCount(t, shardKsName, 1) // Initialize the tablets initTablets(t, false, false) - // Restore the Tablets + vtTabletVersion, err := cluster.GetMajorVersion("vttablet") + require.NoError(t, err) + // For all version at or above v17.0.0, each replica will start in super_read_only mode. Let's verify that is working correctly. + if vtTabletVersion >= 17 { + err := primary.VttabletProcess.CreateDB("testDB") + require.ErrorContains(t, err, "The MySQL server is running with the --super-read-only option so it cannot execute this statement") + err = replica1.VttabletProcess.CreateDB("testDB") + require.ErrorContains(t, err, "The MySQL server is running with the --super-read-only option so it cannot execute this statement") + } + // Restore the Tablet restore(t, primary, "replica", "NOT_SERVING") // Vitess expects that the user has set the database into ReadWrite mode before calling // TabletExternallyReparented - err := localCluster.VtctlclientProcess.ExecuteCommand( + err = localCluster.VtctlclientProcess.ExecuteCommand( "SetReadWrite", primary.Alias) require.Nil(t, err) err = localCluster.VtctlclientProcess.ExecuteCommand( @@ -254,19 +266,15 @@ func initTablets(t *testing.T, startTablet bool, initShardPrimary bool) { func restore(t *testing.T, tablet *cluster.Vttablet, tabletType string, waitForState string) { // Erase mysql/tablet dir, then start tablet with restore enabled. - log.Infof("restoring tablet %s", time.Now()) resetTabletDirectory(t, *tablet, true) - err := tablet.VttabletProcess.CreateDB(keyspaceName) - require.Nil(t, err) - // Start tablets tablet.VttabletProcess.ExtraArgs = []string{"--db-credentials-file", dbCredentialFile} tablet.VttabletProcess.TabletType = tabletType tablet.VttabletProcess.ServingStatus = waitForState tablet.VttabletProcess.SupportsBackup = true - err = tablet.VttabletProcess.Setup() + err := tablet.VttabletProcess.Setup() require.Nil(t, err) } @@ -294,6 +302,12 @@ func resetTabletDirectory(t *testing.T, tablet cluster.Vttablet, initMysql bool) func tearDown(t *testing.T, initMysql bool) { // reset replication + for _, db := range []string{"_vt", "vt_insert_test"} { + _, err := primary.VttabletProcess.QueryTablet(fmt.Sprintf("drop database if exists %s", db), keyspaceName, true) + require.Nil(t, err) + } + caughtUp := waitForReplicationToCatchup([]cluster.Vttablet{*replica1, *replica2}) + require.True(t, caughtUp, "Timed out waiting for all replicas to catch up") promoteCommands := "STOP SLAVE; RESET SLAVE ALL; RESET MASTER;" disableSemiSyncCommands := "SET GLOBAL rpl_semi_sync_master_enabled = false; SET GLOBAL rpl_semi_sync_slave_enabled = false" for _, tablet := range []cluster.Vttablet{*primary, *replica1, *replica2} { @@ -301,10 +315,6 @@ func tearDown(t *testing.T, initMysql bool) { require.Nil(t, err) _, err = tablet.VttabletProcess.QueryTablet(disableSemiSyncCommands, keyspaceName, true) require.Nil(t, err) - for _, db := range []string{"_vt", "vt_insert_test"} { - _, err = tablet.VttabletProcess.QueryTablet(fmt.Sprintf("drop database if exists %s", db), keyspaceName, true) - require.Nil(t, err) - } } // TODO: Ideally we should not be resetting the mysql. @@ -367,3 +377,39 @@ func verifyDisableEnableRedoLogs(ctx context.Context, t *testing.T, mysqlSocket } } } + +// This helper function wait for all replicas to catch-up the replication. +// It does this by querying the status detail url of each replica and find the lag. +func waitForReplicationToCatchup(tablets []cluster.Vttablet) bool { + endTime := time.Now().Add(time.Second * 30) + timeout := time.After(time.Until(endTime)) + // key-value structure returned by status url. + type kv struct { + Key string + Class string + Value string + } + // defining a struct instance + var statuslst []kv + for { + select { + case <-timeout: + return false + default: + var replicaCount = 0 + for _, tablet := range tablets { + status := tablet.VttabletProcess.GetStatusDetails() + json.Unmarshal([]byte(status), &statuslst) + for _, obj := range statuslst { + if obj.Key == "Replication Lag" && obj.Value == "0s" { + replicaCount++ + } + } + if replicaCount == len(tablets) { + return true + } + } + time.Sleep(time.Second * 1) + } + } +} diff --git a/go/test/endtoend/backup/vtbackup/main_test.go b/go/test/endtoend/backup/vtbackup/main_test.go index 069f83fbba5..b258adec334 100644 --- a/go/test/endtoend/backup/vtbackup/main_test.go +++ b/go/test/endtoend/backup/vtbackup/main_test.go @@ -25,6 +25,7 @@ import ( "testing" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/vt/log" ) @@ -86,11 +87,16 @@ func TestMain(m *testing.M) { // Create a new init_db.sql file that sets up passwords for all users. // Then we use a db-credentials-file with the passwords. + // TODO: We could have operated with empty password here. Create a separate test for --db-credentials-file functionality (@rsajwani) dbCredentialFile = cluster.WriteDbCredentialToTmp(localCluster.TmpDirectory) initDb, _ := os.ReadFile(path.Join(os.Getenv("VTROOT"), "/config/init_db.sql")) sql := string(initDb) + // The original init_db.sql does not have any passwords. Here we update the init file with passwords + sql, err = utils.GetInitDBSQL(sql, cluster.GetPasswordUpdateSQL(localCluster), "") + if err != nil { + return 1, err + } newInitDBFile = path.Join(localCluster.TmpDirectory, "init_db_with_passwords.sql") - sql = sql + cluster.GetPasswordUpdateSQL(localCluster) err = os.WriteFile(newInitDBFile, []byte(sql), 0666) if err != nil { return 1, err @@ -112,7 +118,11 @@ func TestMain(m *testing.M) { tablet.VttabletProcess.ExtraArgs = commonTabletArg tablet.VttabletProcess.SupportsBackup = true - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess tablet.MysqlctlProcess.InitDBFile = newInitDBFile tablet.MysqlctlProcess.ExtraArgs = extraArgs proc, err := tablet.MysqlctlProcess.StartProcess() @@ -127,9 +137,12 @@ func TestMain(m *testing.M) { } } - // Create database - for _, tablet := range []cluster.Vttablet{*primary, *replica1} { - if err := tablet.VttabletProcess.CreateDB(keyspaceName); err != nil { + if localCluster.VtTabletMajorVersion >= 16 { + // If vttablets are any lower than version 16, then they are running the replication manager. + // Running VTOrc and replication manager sometimes creates the situation where VTOrc has set up semi-sync on the primary, + // but the replication manager starts replication on the replica without setting semi-sync. This hangs the primary. + // Even if VTOrc fixes it, since there is no ongoing traffic, the state remains blocked. + if err := localCluster.StartVTOrc(keyspaceName); err != nil { return 1, err } } diff --git a/go/test/endtoend/backup/vtctlbackup/backup_utils.go b/go/test/endtoend/backup/vtctlbackup/backup_utils.go index 87e854b7d64..0008654fc17 100644 --- a/go/test/endtoend/backup/vtctlbackup/backup_utils.go +++ b/go/test/endtoend/backup/vtctlbackup/backup_utils.go @@ -28,19 +28,20 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/textutil" "vitess.io/vitess/go/vt/mysqlctl" + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "vitess.io/vitess/go/test/endtoend/cluster" ) // constants for test variants @@ -115,11 +116,18 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp } shard := &localCluster.Keyspaces[0].Shards[0] + // Create a new init_db.sql file that sets up passwords for all users. + // Then we use a db-credentials-file with the passwords. + // TODO: We could have operated with empty password here. Create a separate test for --db-credentials-file functionality (@rsajwani) dbCredentialFile = cluster.WriteDbCredentialToTmp(localCluster.TmpDirectory) initDb, _ := os.ReadFile(path.Join(os.Getenv("VTROOT"), "/config/init_db.sql")) sql := string(initDb) + // The original init_db.sql does not have any passwords. Here we update the init file with passwords + sql, err = utils.GetInitDBSQL(sql, cluster.GetPasswordUpdateSQL(localCluster), "") + if err != nil { + return 1, err + } newInitDBFile = path.Join(localCluster.TmpDirectory, "init_db_with_passwords.sql") - sql = sql + cluster.GetPasswordUpdateSQL(localCluster) err = os.WriteFile(newInitDBFile, []byte(sql), 0666) if err != nil { return 1, err @@ -163,7 +171,11 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp tablet.VttabletProcess.SupportsBackup = true if setupType == Mysqlctld { - tablet.MysqlctldProcess = *cluster.MysqlCtldProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + mysqlctldProcess, err := cluster.MysqlCtldProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctldProcess = *mysqlctldProcess tablet.MysqlctldProcess.InitDBFile = newInitDBFile tablet.MysqlctldProcess.ExtraArgs = extraArgs tablet.MysqlctldProcess.Password = tablet.VttabletProcess.DbPassword @@ -174,7 +186,11 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp continue } - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess tablet.MysqlctlProcess.InitDBFile = newInitDBFile tablet.MysqlctlProcess.ExtraArgs = extraArgs proc, err := tablet.MysqlctlProcess.StartProcess() @@ -207,9 +223,6 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp } for _, tablet := range []cluster.Vttablet{*primary, *replica1} { - if err := tablet.VttabletProcess.CreateDB(keyspaceName); err != nil { - return 1, err - } if err := tablet.VttabletProcess.Setup(); err != nil { return 1, err } @@ -387,6 +400,14 @@ type restoreMethod func(t *testing.T, tablet *cluster.Vttablet) // 13. verify that don't have the data added after the first backup // 14. remove the backups func primaryBackup(t *testing.T) { + // Having the VTOrc in this test causes a lot of flakiness. For example when we delete the tablet `replica2` which + // is the current primary and then try to restore from backup the old primary (`primary.Alias`), but before that sometimes the VTOrc + // promotes the `replica1` to primary right after we delete the replica2 (current primary). + // This can result in unexpected behavior. Therefore, disabling the VTOrc in this test to remove flakiness. + localCluster.DisableVTOrcRecoveries(t) + defer func() { + localCluster.EnableVTOrcRecoveries(t) + }() verifyInitialReplication(t) output, err := localCluster.VtctlclientProcess.ExecuteCommandWithOutput("Backup", primary.Alias) @@ -421,6 +442,8 @@ func primaryBackup(t *testing.T) { backups = localCluster.VerifyBackupCount(t, shardKsName, 2) assert.Contains(t, backups[1], primary.Alias) + verifyTabletBackupStats(t, primary.VttabletProcess.GetVars()) + // Perform PRS to demote the primary tablet (primary) so that we can do a restore there and verify we don't have the // data from after the older/first backup err = localCluster.VtctlclientProcess.ExecuteCommand("PlannedReparentShard", "--", @@ -439,6 +462,8 @@ func primaryBackup(t *testing.T) { err = localCluster.VtctlclientProcess.ExecuteCommand("RestoreFromBackup", "--", "--backup_timestamp", firstBackupTimestamp, primary.Alias) require.Nil(t, err) + verifyTabletRestoreStats(t, primary.VttabletProcess.GetVars()) + // Re-init the shard -- making the original primary tablet (primary) primary again -- for subsequent tests err = localCluster.VtctlclientProcess.InitShardPrimary(keyspaceName, shardName, cell, primary.TabletUID) require.Nil(t, err) @@ -465,6 +490,8 @@ func primaryReplicaSameBackup(t *testing.T) { err := localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) require.Nil(t, err) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + // insert more data on the primary _, err = primary.VttabletProcess.QueryTablet("insert into vt_insert_test (msg) values ('test2')", keyspaceName, true) require.Nil(t, err) @@ -531,6 +558,8 @@ func primaryReplicaSameBackupModifiedCompressionEngine(t *testing.T) { err := localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) require.Nil(t, err) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + // insert more data on the primary _, err = primary.VttabletProcess.QueryTablet("insert into vt_insert_test (msg) values ('test2')", keyspaceName, true) require.Nil(t, err) @@ -583,6 +612,8 @@ func primaryReplicaSameBackupModifiedCompressionEngine(t *testing.T) { err = localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica2.Alias) require.Nil(t, err) + verifyTabletBackupStats(t, replica2.VttabletProcess.GetVars()) + // Force replica2 to restore from backup. verifyRestoreTablet(t, replica2, "SERVING") cluster.VerifyRowsInTablet(t, replica2, keyspaceName, 4) @@ -621,6 +652,8 @@ func testRestoreOldPrimary(t *testing.T, method restoreMethod) { err := localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) require.Nil(t, err) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + // insert more data on the primary _, err = primary.VttabletProcess.QueryTablet("insert into vt_insert_test (msg) values ('test2')", keyspaceName, true) require.Nil(t, err) @@ -641,6 +674,8 @@ func testRestoreOldPrimary(t *testing.T, method restoreMethod) { // wait for it to catch up. cluster.VerifyRowsInTablet(t, primary, keyspaceName, 3) + verifyTabletRestoreStats(t, primary.VttabletProcess.GetVars()) + // teardown restartPrimaryAndReplica(t) } @@ -679,8 +714,6 @@ func restartPrimaryAndReplica(t *testing.T) { for _, tablet := range []*cluster.Vttablet{primary, replica1} { err := localCluster.VtctlclientProcess.InitTablet(tablet, cell, keyspaceName, hostname, shardName) require.Nil(t, err) - err = tablet.VttabletProcess.CreateDB(keyspaceName) - require.Nil(t, err) err = tablet.VttabletProcess.Setup() require.Nil(t, err) } @@ -722,6 +755,8 @@ func terminatedRestore(t *testing.T) { err := localCluster.VtctlclientProcess.ExecuteCommand("Backup", replica1.Alias) require.Nil(t, err) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + // insert more data on the primary _, err = primary.VttabletProcess.QueryTablet("insert into vt_insert_test (msg) values ('test2')", keyspaceName, true) require.Nil(t, err) @@ -753,6 +788,9 @@ func terminatedRestore(t *testing.T) { assert.True(t, os.IsNotExist(err)) cluster.VerifyRowsInTablet(t, primary, keyspaceName, 3) + + verifyTabletRestoreStats(t, primary.VttabletProcess.GetVars()) + stopAllTablets() } @@ -770,15 +808,9 @@ func terminatedRestore(t *testing.T) { // Args: // tablet_type: 'replica' or 'rdonly'. func vtctlBackup(t *testing.T, tabletType string) { - // Start vtorc before running backups - vtorcProcess := localCluster.NewVTOrcProcess(cluster.VTOrcConfiguration{}) - err := vtorcProcess.Setup() - require.NoError(t, err) - localCluster.VTOrcProcesses = append(localCluster.VTOrcProcesses, vtorcProcess) - // StopReplication on replica1. We verify that the replication works fine later in // verifyInitialReplication. So this will also check that VTOrc is running. - err = localCluster.VtctlclientProcess.ExecuteCommand("StopReplication", replica1.Alias) + err := localCluster.VtctlclientProcess.ExecuteCommand("StopReplication", replica1.Alias) require.Nil(t, err) verifyInitialReplication(t) @@ -789,6 +821,8 @@ func vtctlBackup(t *testing.T, tabletType string) { backups := localCluster.VerifyBackupCount(t, shardKsName, 1) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + _, err = primary.VttabletProcess.QueryTablet("insert into vt_insert_test (msg) values ('test2')", keyspaceName, true) require.Nil(t, err) @@ -797,12 +831,6 @@ func vtctlBackup(t *testing.T, tabletType string) { cluster.VerifyRowsInTablet(t, replica2, keyspaceName, 2) verifyAfterRemovingBackupNoBackupShouldBePresent(t, backups) - - // Stop VTOrc - err = localCluster.VTOrcProcesses[0].TearDown() - localCluster.VTOrcProcesses = nil - require.NoError(t, err) - err = replica2.VttabletProcess.TearDown() require.Nil(t, err) @@ -810,7 +838,6 @@ func vtctlBackup(t *testing.T, tabletType string) { require.Nil(t, err) _, err = primary.VttabletProcess.QueryTablet("DROP TABLE vt_insert_test", keyspaceName, true) require.Nil(t, err) - } func InitTestTable(t *testing.T) { @@ -905,6 +932,9 @@ func terminateRestore(t *testing.T) { if useXtrabackup { stopRestoreMsg = "Restore: Preparing" useXtrabackup = false + defer func() { + useXtrabackup = true + }() } args := append([]string{"--server", localCluster.VtctlclientProcess.Server, "--alsologtostderr"}, "RestoreFromBackup", "--", primary.Alias) @@ -943,6 +973,8 @@ func vtctlBackupReplicaNoDestroyNoWrites(t *testing.T, tabletType string) (backu backups = localCluster.VerifyBackupCount(t, shardKsName, 1) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) + err = replica2.VttabletProcess.WaitForTabletStatusesForTimeout([]string{"SERVING"}, 25*time.Second) require.Nil(t, err) @@ -1036,6 +1068,7 @@ func TestReplicaIncrementalBackup(t *testing.T, incrementalFromPos mysql.Positio backups, err := localCluster.ListBackups(shardKsName) require.NoError(t, err) + verifyTabletBackupStats(t, replica1.VttabletProcess.GetVars()) backupName = backups[len(backups)-1] backupLocation := localCluster.CurrentVTDATAROOT + "/backups/" + shardKsName + "/" + backupName return readManifestFile(t, backupLocation), backupName @@ -1051,4 +1084,91 @@ func TestReplicaRestoreToPos(t *testing.T, restoreToPos mysql.Position, expectEr return } require.NoErrorf(t, err, "output: %v", output) + verifyTabletRestoreStats(t, replica1.VttabletProcess.GetVars()) +} + +func verifyTabletBackupStats(t *testing.T, vars map[string]any) { + // Currently only the builtin backup engine instruments bytes-processed + // counts. + if !useXtrabackup { + require.Contains(t, vars, "BackupBytes") + bb := vars["BackupBytes"].(map[string]any) + require.Contains(t, bb, "BackupEngine.Builtin.Compressor:Write") + require.Contains(t, bb, "BackupEngine.Builtin.Destination:Write") + require.Contains(t, bb, "BackupEngine.Builtin.Source:Read") + if backupstorage.BackupStorageImplementation == "file" { + require.Contains(t, bb, "BackupStorage.File.File:Write") + } + } + + require.Contains(t, vars, "BackupCount") + bc := vars["BackupCount"].(map[string]any) + require.Contains(t, bc, "-.-.Backup") + // Currently only the builtin backup engine implements operation counts. + if !useXtrabackup { + require.Contains(t, bc, "BackupEngine.Builtin.Compressor:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Destination:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Destination:Open") + require.Contains(t, bc, "BackupEngine.Builtin.Source:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Source:Open") + } + + require.Contains(t, vars, "BackupDurationNanoseconds") + bd := vars["BackupDurationNanoseconds"] + require.Contains(t, bd, "-.-.Backup") + // Currently only the builtin backup engine emits timings. + if !useXtrabackup { + require.Contains(t, bd, "BackupEngine.Builtin.Compressor:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Compressor:Write") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Open") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Write") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Open") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Read") + } + if backupstorage.BackupStorageImplementation == "file" { + require.Contains(t, bd, "BackupStorage.File.File:Write") + } +} + +func verifyTabletRestoreStats(t *testing.T, vars map[string]any) { + // Currently only the builtin backup engine instruments bytes-processed + // counts. + if !useXtrabackup { + require.Contains(t, vars, "RestoreBytes") + bb := vars["RestoreBytes"].(map[string]any) + require.Contains(t, bb, "BackupEngine.Builtin.Decompressor:Read") + require.Contains(t, bb, "BackupEngine.Builtin.Destination:Write") + require.Contains(t, bb, "BackupEngine.Builtin.Source:Read") + require.Contains(t, bb, "BackupStorage.File.File:Read") + } + + require.Contains(t, vars, "RestoreCount") + bc := vars["RestoreCount"].(map[string]any) + require.Contains(t, bc, "-.-.Restore") + // Currently only the builtin backup engine emits operation counts. + if !useXtrabackup { + require.Contains(t, bc, "BackupEngine.Builtin.Decompressor:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Destination:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Destination:Open") + require.Contains(t, bc, "BackupEngine.Builtin.Source:Close") + require.Contains(t, bc, "BackupEngine.Builtin.Source:Open") + } + + require.Contains(t, vars, "RestoreDurationNanoseconds") + bd := vars["RestoreDurationNanoseconds"] + require.Contains(t, bd, "-.-.Restore") + // Currently only the builtin backup engine emits timings. + if !useXtrabackup { + require.Contains(t, bd, "BackupEngine.Builtin.Decompressor:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Decompressor:Read") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Open") + require.Contains(t, bd, "BackupEngine.Builtin.Destination:Write") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Close") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Open") + require.Contains(t, bd, "BackupEngine.Builtin.Source:Read") + } + require.Contains(t, bd, "BackupStorage.File.File:Read") } diff --git a/go/test/endtoend/cellalias/cell_alias_test.go b/go/test/endtoend/cellalias/cell_alias_test.go index 47f3108e6c7..3b6aa8c6bda 100644 --- a/go/test/endtoend/cellalias/cell_alias_test.go +++ b/go/test/endtoend/cellalias/cell_alias_test.go @@ -132,7 +132,11 @@ func TestMain(m *testing.M) { var mysqlProcs []*exec.Cmd for _, tablet := range []*cluster.Vttablet{shard1Primary, shard1Replica, shard1Rdonly, shard2Primary, shard2Replica, shard2Rdonly} { - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess tablet.VttabletProcess = cluster.VttabletProcessInstance(tablet.HTTPPort, tablet.GrpcPort, tablet.TabletUID, diff --git a/go/test/endtoend/cluster/cluster_process.go b/go/test/endtoend/cluster/cluster_process.go index 60569c5986d..4f514e07f27 100644 --- a/go/test/endtoend/cluster/cluster_process.go +++ b/go/test/endtoend/cluster/cluster_process.go @@ -361,7 +361,11 @@ func (cluster *LocalProcessCluster) startKeyspace(keyspace Keyspace, shardNames } // Start Mysqlctl process log.Infof("Starting mysqlctl for table uid %d, mysql port %d", tablet.TabletUID, tablet.MySQLPort) - tablet.MysqlctlProcess = *MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory, !cluster.ReusingVTDATAROOT) + mysqlctlProcess, err := MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory, !cluster.ReusingVTDATAROOT) + if err != nil { + return err + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { log.Errorf("error starting mysqlctl process: %v, %v", tablet.MysqlctldProcess, err) @@ -510,7 +514,11 @@ func (cluster *LocalProcessCluster) StartKeyspaceLegacy(keyspace Keyspace, shard } // Start Mysqlctl process log.Infof("Starting mysqlctl for table uid %d, mysql port %d", tablet.TabletUID, tablet.MySQLPort) - tablet.MysqlctlProcess = *MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory, !cluster.ReusingVTDATAROOT) + mysqlctlProcess, err := MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory, !cluster.ReusingVTDATAROOT) + if err != nil { + return err + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { log.Errorf("error starting mysqlctl process: %v, %v", tablet.MysqlctldProcess, err) @@ -634,7 +642,11 @@ func (cluster *LocalProcessCluster) SetupCluster(keyspace *Keyspace, shards []Sh for _, shard := range shards { for _, tablet := range shard.Vttablets { // Setup MysqlctlProcess - tablet.MysqlctlProcess = *MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory) + mysqlctlProcess, err := MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, cluster.TmpDirectory) + if err != nil { + return err + } + tablet.MysqlctlProcess = *mysqlctlProcess // Setup VttabletProcess tablet.VttabletProcess = VttabletProcessInstance( tablet.HTTPPort, @@ -718,7 +730,10 @@ func NewBareCluster(cell string, hostname string) *LocalProcessCluster { // path/to/whatever exists cluster.ReusingVTDATAROOT = true } else { - _ = createDirectory(cluster.CurrentVTDATAROOT, 0700) + err = createDirectory(cluster.CurrentVTDATAROOT, 0700) + if err != nil { + log.Fatal(err) + } } _ = os.Setenv("VTDATAROOT", cluster.CurrentVTDATAROOT) log.Infof("Created cluster on %s. ReusingVTDATAROOT=%v", cluster.CurrentVTDATAROOT, cluster.ReusingVTDATAROOT) @@ -1118,11 +1133,10 @@ func getPort() int { if len(portBytes) == 0 || time.Now().After(fileInfo.ModTime().Add(portFileTimeout)) { port = getVtStartPort() } else { - parsedPort, err := strconv.ParseInt(string(portBytes), 10, 64) + port, err = strconv.Atoi(string(portBytes)) if err != nil { panic(err) } - port = int(parsedPort) } portFile.Truncate(0) diff --git a/go/test/endtoend/cluster/cluster_util.go b/go/test/endtoend/cluster/cluster_util.go index d7bbe55d9f3..c85e79abc02 100644 --- a/go/test/endtoend/cluster/cluster_util.go +++ b/go/test/endtoend/cluster/cluster_util.go @@ -306,6 +306,7 @@ func GetPasswordUpdateSQL(localCluster *LocalProcessCluster) string { SET PASSWORD FOR 'vt_allprivs'@'localhost' = 'VtAllprivsPass'; SET PASSWORD FOR 'vt_repl'@'%' = 'VtReplPass'; SET PASSWORD FOR 'vt_filtered'@'localhost' = 'VtFilteredPass'; + SET PASSWORD FOR 'vt_appdebug'@'localhost' = 'VtDebugPass'; FLUSH PRIVILEGES; ` return pwdChangeCmd diff --git a/go/test/endtoend/cluster/mysqlctl_process.go b/go/test/endtoend/cluster/mysqlctl_process.go index eafc8f6b98f..7c8f2607841 100644 --- a/go/test/endtoend/cluster/mysqlctl_process.go +++ b/go/test/endtoend/cluster/mysqlctl_process.go @@ -30,6 +30,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/mysqlctl" "vitess.io/vitess/go/vt/tlstest" ) @@ -235,36 +236,65 @@ func (mysqlctl *MysqlctlProcess) Connect(ctx context.Context, username string) ( // MysqlCtlProcessInstanceOptionalInit returns a Mysqlctl handle for mysqlctl process // configured with the given Config. -func MysqlCtlProcessInstanceOptionalInit(tabletUID int, mySQLPort int, tmpDirectory string, initMySQL bool) *MysqlctlProcess { +func MysqlCtlProcessInstanceOptionalInit(tabletUID int, mySQLPort int, tmpDirectory string, initMySQL bool) (*MysqlctlProcess, error) { + initFile, err := getInitDBFileUsed() + if err != nil { + return nil, err + } mysqlctl := &MysqlctlProcess{ Name: "mysqlctl", Binary: "mysqlctl", LogDirectory: tmpDirectory, - InitDBFile: path.Join(os.Getenv("VTROOT"), "/config/init_db.sql"), + InitDBFile: initFile, } mysqlctl.MySQLPort = mySQLPort mysqlctl.TabletUID = tabletUID mysqlctl.InitMysql = initMySQL mysqlctl.SecureTransport = false - return mysqlctl + return mysqlctl, nil +} + +func getInitDBFileUsed() (string, error) { + versionStr, err := mysqlctl.GetVersionString() + if err != nil { + return "", err + } + flavor, _, err := mysqlctl.ParseVersionString(versionStr) + if err != nil { + return "", err + } + if flavor == mysqlctl.FlavorMySQL || flavor == mysqlctl.FlavorPercona { + return path.Join(os.Getenv("VTROOT"), "/config/init_db.sql"), nil + } + // Non-MySQL instances for example MariaDB, will use init_testserver_db.sql which does not contain super_read_only global variable. + // Even though MariaDB support is deprecated (https://github.com/vitessio/vitess/issues/9518) but we still support migration scenario. + return path.Join(os.Getenv("VTROOT"), "go/test/endtoend/vreplication/testdata/config/init_testserver_db.sql"), nil } // MysqlCtlProcessInstance returns a Mysqlctl handle for mysqlctl process // configured with the given Config. -func MysqlCtlProcessInstance(tabletUID int, mySQLPort int, tmpDirectory string) *MysqlctlProcess { +func MysqlCtlProcessInstance(tabletUID int, mySQLPort int, tmpDirectory string) (*MysqlctlProcess, error) { return MysqlCtlProcessInstanceOptionalInit(tabletUID, mySQLPort, tmpDirectory, true) } // StartMySQL starts mysqlctl process func StartMySQL(ctx context.Context, tablet *Vttablet, username string, tmpDirectory string) error { - tablet.MysqlctlProcess = *MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, tmpDirectory) + mysqlctlProcess, err := MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, tmpDirectory) + if err != nil { + return err + } + tablet.MysqlctlProcess = *mysqlctlProcess return tablet.MysqlctlProcess.Start() } // StartMySQLAndGetConnection create a connection to tablet mysql func StartMySQLAndGetConnection(ctx context.Context, tablet *Vttablet, username string, tmpDirectory string) (*mysql.Conn, error) { - tablet.MysqlctlProcess = *MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, tmpDirectory) - err := tablet.MysqlctlProcess.Start() + mysqlctlProcess, err := MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, tmpDirectory) + if err != nil { + return nil, err + } + tablet.MysqlctlProcess = *mysqlctlProcess + err = tablet.MysqlctlProcess.Start() if err != nil { return nil, err } diff --git a/go/test/endtoend/cluster/mysqlctld_process.go b/go/test/endtoend/cluster/mysqlctld_process.go index d71f2e3b1c8..673870e62bb 100644 --- a/go/test/endtoend/cluster/mysqlctld_process.go +++ b/go/test/endtoend/cluster/mysqlctld_process.go @@ -144,17 +144,21 @@ func (mysqlctld *MysqlctldProcess) CleanupFiles(tabletUID int) { // MysqlCtldProcessInstance returns a Mysqlctld handle for mysqlctld process // configured with the given Config. -func MysqlCtldProcessInstance(tabletUID int, mySQLPort int, tmpDirectory string) *MysqlctldProcess { +func MysqlCtldProcessInstance(tabletUID int, mySQLPort int, tmpDirectory string) (*MysqlctldProcess, error) { + initFile, err := getInitDBFileUsed() + if err != nil { + return nil, err + } mysqlctld := &MysqlctldProcess{ Name: "mysqlctld", Binary: "mysqlctld", LogDirectory: tmpDirectory, - InitDBFile: path.Join(os.Getenv("VTROOT"), "/config/init_db.sql"), + InitDBFile: initFile, } mysqlctld.MySQLPort = mySQLPort mysqlctld.TabletUID = tabletUID mysqlctld.InitMysql = true - return mysqlctld + return mysqlctld, nil } // IsHealthy gives the health status of mysql. diff --git a/go/test/endtoend/cluster/vtbackup_process.go b/go/test/endtoend/cluster/vtbackup_process.go index b7beed67936..be75026bf0d 100644 --- a/go/test/endtoend/cluster/vtbackup_process.go +++ b/go/test/endtoend/cluster/vtbackup_process.go @@ -54,7 +54,6 @@ type VtbackupProcess struct { // Setup starts vtbackup process with required arguements func (vtbackup *VtbackupProcess) Setup() (err error) { - vtbackup.proc = exec.Command( vtbackup.Binary, "--topo_implementation", vtbackup.CommonArg.TopoImplementation, diff --git a/go/test/endtoend/cluster/vtctl_process.go b/go/test/endtoend/cluster/vtctl_process.go index 63d2d3a26a1..9b3d1a5f4e1 100644 --- a/go/test/endtoend/cluster/vtctl_process.go +++ b/go/test/endtoend/cluster/vtctl_process.go @@ -63,7 +63,7 @@ func (vtctl *VtctlProcess) AddCellInfo(Cell string) (err error) { func (vtctl *VtctlProcess) CreateKeyspace(keyspace, sidecarDBName string) (err error) { var output string // For upgrade/downgrade tests where an older version is also used. - if vtctl.VtctlMajorVersion < 16 { + if vtctl.VtctlMajorVersion < 17 { log.Errorf("CreateKeyspace does not support the --sidecar-db-name flag in vtctl version %d; ignoring...", vtctl.VtctlMajorVersion) output, err = vtctl.ExecuteCommandWithOutput("CreateKeyspace", keyspace) } else { diff --git a/go/test/endtoend/cluster/vtctldclient_process.go b/go/test/endtoend/cluster/vtctldclient_process.go index 98ec478db79..c08c9f6f52a 100644 --- a/go/test/endtoend/cluster/vtctldclient_process.go +++ b/go/test/endtoend/cluster/vtctldclient_process.go @@ -97,7 +97,7 @@ func VtctldClientProcessInstance(hostname string, grpcPort int, tmpDirectory str func (vtctldclient *VtctldClientProcess) CreateKeyspace(keyspaceName string, sidecarDBName string) (err error) { var output string // For upgrade/downgrade tests where an older version is also used. - if vtctldclient.VtctldClientMajorVersion < 16 { + if vtctldclient.VtctldClientMajorVersion < 17 { log.Errorf("CreateKeyspace does not support the --sidecar-db-name flag in vtctl version %d; ignoring...", vtctldclient.VtctldClientMajorVersion) output, err = vtctldclient.ExecuteCommandWithOutput("CreateKeyspace", keyspaceName) } else { diff --git a/go/test/endtoend/cluster/vttablet_process.go b/go/test/endtoend/cluster/vttablet_process.go index eea8d2495de..81b052ed435 100644 --- a/go/test/endtoend/cluster/vttablet_process.go +++ b/go/test/endtoend/cluster/vttablet_process.go @@ -229,11 +229,11 @@ func (vttablet *VttabletProcess) GetConsolidations() (map[string]int, error) { continue } countS := splits[0] - countI64, err := strconv.ParseInt(countS, 10, 32) + countI, err := strconv.Atoi(countS) if err != nil { return nil, fmt.Errorf("failed to parse consolidations count: %v", err) } - result[strings.TrimSpace(splits[1])] = int(countI64) + result[strings.TrimSpace(splits[1])] = countI } if err := scanner.Err(); err != nil && !errors.Is(err, io.EOF) { return nil, fmt.Errorf("failed to read consolidations: %v", err) diff --git a/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go b/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go index 88e2fd1a460..4fb53d8f6fb 100644 --- a/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go +++ b/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go @@ -143,7 +143,11 @@ func initializeCluster(t *testing.T) (int, error) { tablet := clusterInstance.NewVttabletInstance("replica", tabletUID, cell) // Start Mysqlctl process - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { return 1, err diff --git a/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go b/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go index fbb8b7a3a46..ec4a553849b 100644 --- a/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go +++ b/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go @@ -361,7 +361,11 @@ func clusterSetUp(t *testing.T) (int, error) { tablet := clusterInstance.NewVttabletInstance("replica", 0, cell) // Start Mysqlctl process - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { return 1, err diff --git a/go/test/endtoend/keyspace/keyspace_test.go b/go/test/endtoend/keyspace/keyspace_test.go index 82477dacee7..c8ff519910f 100644 --- a/go/test/endtoend/keyspace/keyspace_test.go +++ b/go/test/endtoend/keyspace/keyspace_test.go @@ -17,7 +17,6 @@ limitations under the License. package sequence import ( - "bytes" "encoding/binary" "encoding/json" "flag" @@ -25,6 +24,8 @@ import ( "strings" "testing" + "vitess.io/vitess/go/vt/key" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -392,8 +393,8 @@ func TestKeyspaceToShardName(t *testing.T) { shardKIDs := shardKIdMap[shardRef.Name] for _, kid := range shardKIDs { id = packKeyspaceID(kid) - assert.True(t, bytes.Compare(shardRef.KeyRange.Start, id) <= 0 && - (len(shardRef.KeyRange.End) == 0 || bytes.Compare(id, shardRef.KeyRange.End) < 0)) + assert.True(t, key.Compare(shardRef.KeyRange.Start, id) <= 0 && + (key.Empty(shardRef.KeyRange.End) || key.Compare(id, shardRef.KeyRange.End) < 0)) } } } diff --git a/go/test/endtoend/mysqlctl/mysqlctl_test.go b/go/test/endtoend/mysqlctl/mysqlctl_test.go index f1c2d1c9a3f..6392a6f9023 100644 --- a/go/test/endtoend/mysqlctl/mysqlctl_test.go +++ b/go/test/endtoend/mysqlctl/mysqlctl_test.go @@ -97,7 +97,11 @@ func initCluster(shardNames []string, totalTabletsRequired int) { tablet.Type = "primary" } // Start Mysqlctl process - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { return diff --git a/go/test/endtoend/mysqlctld/mysqlctld_test.go b/go/test/endtoend/mysqlctld/mysqlctld_test.go index 7ecb7521cb3..dd6efb65c86 100644 --- a/go/test/endtoend/mysqlctld/mysqlctld_test.go +++ b/go/test/endtoend/mysqlctld/mysqlctld_test.go @@ -97,8 +97,12 @@ func initCluster(shardNames []string, totalTabletsRequired int) error { tablet.Type = "primary" } // Start Mysqlctld process - tablet.MysqlctldProcess = *cluster.MysqlCtldProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) - err := tablet.MysqlctldProcess.Start() + mysqlctldProcess, err := cluster.MysqlCtldProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return err + } + tablet.MysqlctldProcess = *mysqlctldProcess + err = tablet.MysqlctldProcess.Start() if err != nil { return err } diff --git a/go/test/endtoend/mysqlserver/mysql_server_test.go b/go/test/endtoend/mysqlserver/mysql_server_test.go index b4382882bb2..6cc2d091d0e 100644 --- a/go/test/endtoend/mysqlserver/mysql_server_test.go +++ b/go/test/endtoend/mysqlserver/mysql_server_test.go @@ -19,6 +19,7 @@ package mysqlserver import ( "context" + "database/sql" "fmt" "io" "net/http" @@ -34,8 +35,6 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" - "database/sql" - _ "github.com/go-sql-driver/mysql" ) @@ -119,7 +118,7 @@ func TestTimeout(t *testing.T) { require.NotNilf(t, err, "quiry timeout error expected") mysqlErr, ok := err.(*mysql.SQLError) require.Truef(t, ok, "invalid error type") - assert.Equal(t, 1317, mysqlErr.Number(), err) + assert.Equal(t, mysql.ERQueryInterrupted, mysqlErr.Number(), err) } // TestInvalidField tries to fetch invalid column and verifies the error. @@ -135,7 +134,7 @@ func TestInvalidField(t *testing.T) { require.NotNil(t, err, "invalid field error expected") mysqlErr, ok := err.(*mysql.SQLError) require.Truef(t, ok, "invalid error type") - assert.Equal(t, 1054, mysqlErr.Number(), err) + assert.Equal(t, mysql.ERBadFieldError, mysqlErr.Number(), err) } // TestWarnings validates the behaviour of SHOW WARNINGS. diff --git a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go index f299f3e1a51..60413d4d1d8 100644 --- a/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go +++ b/go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go @@ -834,7 +834,7 @@ func testScheduler(t *testing.T) { defer func() { overrideVtctlParams = nil }() // create a migration and cancel it. We don't let it complete. We want it in "failed" state t.Run("start and fail migration", func(t *testing.T) { - executedUUID := testOnlineDDLStatement(t, createParams(trivialAlterT1Statement, ddlStrategy+" -postpone-completion", "vtctl", "", "", true)) // skip wait + executedUUID := testOnlineDDLStatement(t, createParams(trivialAlterT1Statement, ddlStrategy+" --postpone-completion", "vtctl", "", "", true)) // skip wait require.Equal(t, uuid, executedUUID) onlineddl.WaitForMigrationStatus(t, &vtParams, shards, uuid, normalWaitTime, schema.OnlineDDLStatusRunning) // let's cancel it diff --git a/go/test/endtoend/recovery/pitr/shardedpitr_test.go b/go/test/endtoend/recovery/pitr/shardedpitr_test.go index 1db3fb87d21..c0d8f1a84fa 100644 --- a/go/test/endtoend/recovery/pitr/shardedpitr_test.go +++ b/go/test/endtoend/recovery/pitr/shardedpitr_test.go @@ -19,7 +19,9 @@ package pitr import ( "context" "fmt" + "os" "os/exec" + "path" "testing" "time" @@ -29,6 +31,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/sidecardb" ) @@ -52,20 +55,22 @@ var ( shard1Replica1 *cluster.Vttablet shard1Replica2 *cluster.Vttablet - cell = "zone1" - hostname = "localhost" - binlogHost = "127.0.0.1" - keyspaceName = "ks" - restoreKS1Name = "restoreks1" - restoreKS2Name = "restoreks2" - restoreKS3Name = "restoreks3" - shardName = "0" - shard0Name = "-80" - shard1Name = "80-" - dbName = "vt_ks" - mysqlUserName = "vt_dba" - mysqlPassword = "password" - vSchema = `{ + cell = "zone1" + hostname = "localhost" + binlogHost = "127.0.0.1" + keyspaceName = "ks" + restoreKS1Name = "restoreks1" + restoreKS2Name = "restoreks2" + restoreKS3Name = "restoreks3" + shardName = "0" + shard0Name = "-80" + shard1Name = "80-" + dbName = "vt_ks" + mysqlUserName = "vt_dba" + mysqlPassword = "VtDbaPass" + dbCredentialFile = "" + initDBFileWithPassword = "" + vSchema = `{ "sharded": true, "vindexes": { "hash_index": { @@ -409,6 +414,10 @@ func initializeCluster(t *testing.T) { shard0.Vttablets = []*cluster.Vttablet{shard0Primary, shard0Replica1, shard0Replica2} shard1.Vttablets = []*cluster.Vttablet{shard1Primary, shard1Replica1, shard1Replica2} + dbCredentialFile = cluster.WriteDbCredentialToTmp(clusterInstance.TmpDirectory) + extraArgs := []string{"--db-credentials-file", dbCredentialFile} + commonTabletArg = append(commonTabletArg, "--db-credentials-file", dbCredentialFile) + clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, commonTabletArg...) clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--restore_from_backup") @@ -417,10 +426,23 @@ func initializeCluster(t *testing.T) { vtctldClientProcess := cluster.VtctldClientProcessInstance("localhost", clusterInstance.VtctldProcess.GrpcPort, clusterInstance.TmpDirectory) out, err := vtctldClientProcess.ExecuteCommandWithOutput("SetKeyspaceDurabilityPolicy", keyspaceName, "--durability-policy=semi_sync") require.NoError(t, err, out) + + initDb, _ := os.ReadFile(path.Join(os.Getenv("VTROOT"), "/config/init_db.sql")) + sql := string(initDb) + // The original init_db.sql does not have any passwords. Here we update the init file with passwords + sql, err = utils.GetInitDBSQL(sql, cluster.GetPasswordUpdateSQL(clusterInstance), "") + require.NoError(t, err, "expected to load init_db file") + initDBFileWithPassword = path.Join(clusterInstance.TmpDirectory, "init_db_with_passwords.sql") + err = os.WriteFile(initDBFileWithPassword, []byte(sql), 0660) + require.NoError(t, err, "expected to load init_db file") + // Start MySql var mysqlCtlProcessList []*exec.Cmd for _, shard := range clusterInstance.Keyspaces[0].Shards { for _, tablet := range shard.Vttablets { + tablet.MysqlctlProcess.InitDBFile = initDBFileWithPassword + tablet.VttabletProcess.DbPassword = mysqlPassword + tablet.MysqlctlProcess.ExtraArgs = extraArgs proc, err := tablet.MysqlctlProcess.StartProcess() require.NoError(t, err) mysqlCtlProcessList = append(mysqlCtlProcessList, proc) @@ -433,21 +455,8 @@ func initializeCluster(t *testing.T) { require.NoError(t, err) } - queryCmds := []string{ - fmt.Sprintf("CREATE USER '%s'@'%%' IDENTIFIED BY '%s';", mysqlUserName, mysqlPassword), - fmt.Sprintf("GRANT ALL ON *.* TO '%s'@'%%';", mysqlUserName), - fmt.Sprintf("GRANT GRANT OPTION ON *.* TO '%s'@'%%';", mysqlUserName), - fmt.Sprintf("create database %s;", "vt_ks"), - "FLUSH PRIVILEGES;", - } - for _, shard := range clusterInstance.Keyspaces[0].Shards { for _, tablet := range shard.Vttablets { - for _, query := range queryCmds { - _, err = tablet.VttabletProcess.QueryTablet(query, keyspace.Name, false) - require.NoError(t, err) - } - err = tablet.VttabletProcess.Setup() require.NoError(t, err) } @@ -465,6 +474,15 @@ func initializeCluster(t *testing.T) { err = clusterInstance.StartVTOrc(keyspaceName) require.NoError(t, err) + err = clusterInstance.VtctlclientProcess.InitShardPrimary(keyspaceName, shard0.Name, cell, shard0Primary.TabletUID) + require.NoError(t, err) + + err = clusterInstance.VtctlclientProcess.InitShardPrimary(keyspaceName, shard1.Name, cell, shard1Primary.TabletUID) + require.NoError(t, err) + + err = clusterInstance.StartVTOrc(keyspaceName) + require.NoError(t, err) + // Start vtgate err = clusterInstance.StartVtgate() require.NoError(t, err) @@ -510,8 +528,14 @@ func testTabletRecovery(t *testing.T, binlogServer *binLogServer, lookupTimeout, } func launchRecoveryTablet(t *testing.T, tablet *cluster.Vttablet, binlogServer *binLogServer, lookupTimeout, restoreKeyspaceName, shardName string) { - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) - err := tablet.MysqlctlProcess.Start() + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + require.NoError(t, err) + tablet.MysqlctlProcess = *mysqlctlProcess + extraArgs := []string{"--db-credentials-file", dbCredentialFile} + tablet.MysqlctlProcess.InitDBFile = initDBFileWithPassword + tablet.VttabletProcess.DbPassword = mysqlPassword + tablet.MysqlctlProcess.ExtraArgs = extraArgs + err = tablet.MysqlctlProcess.Start() require.NoError(t, err) tablet.VttabletProcess = cluster.VttabletProcessInstance( @@ -551,6 +575,7 @@ func launchRecoveryTablet(t *testing.T, tablet *cluster.Vttablet, binlogServer * "--lock_tables_timeout", "5s", "--watch_replication_stream", "--serving_state_grace_period", "1s", + "--db-credentials-file", dbCredentialFile, } tablet.VttabletProcess.ServingStatus = "" diff --git a/go/test/endtoend/recovery/unshardedrecovery/recovery.go b/go/test/endtoend/recovery/unshardedrecovery/recovery.go index 1ab9f1647ca..eff072f651d 100644 --- a/go/test/endtoend/recovery/unshardedrecovery/recovery.go +++ b/go/test/endtoend/recovery/unshardedrecovery/recovery.go @@ -30,6 +30,7 @@ import ( "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/recovery" + "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vtgate/vtgateconn" ) @@ -91,16 +92,19 @@ func TestMainImpl(m *testing.M) { } localCluster.Keyspaces = append(localCluster.Keyspaces, *keyspace) + // Create a new init_db.sql file that sets up passwords for all users. + // Then we use a db-credentials-file with the passwords. + // TODO: We could have operated with empty password here. Create a separate test for --db-credentials-file functionality (@rsajwani) dbCredentialFile = cluster.WriteDbCredentialToTmp(localCluster.TmpDirectory) initDb, _ := os.ReadFile(path.Join(os.Getenv("VTROOT"), "/config/init_db.sql")) sql := string(initDb) + // The original init_db.sql does not have any passwords. Here we update the init file with passwords + oldAlterTableMode := `SET GLOBAL old_alter_table = ON;` + sql, err = utils.GetInitDBSQL(sql, cluster.GetPasswordUpdateSQL(localCluster), oldAlterTableMode) + if err != nil { + return 1, err + } newInitDBFile = path.Join(localCluster.TmpDirectory, "init_db_with_passwords.sql") - sql = sql + cluster.GetPasswordUpdateSQL(localCluster) - // https://github.com/vitessio/vitess/issues/8315 - oldAlterTableMode := ` -SET GLOBAL old_alter_table = ON; -` - sql = sql + oldAlterTableMode os.WriteFile(newInitDBFile, []byte(sql), 0666) extraArgs := []string{"--db-credentials-file", dbCredentialFile} @@ -125,7 +129,11 @@ SET GLOBAL old_alter_table = ON; } tablet.VttabletProcess.SupportsBackup = true - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, localCluster.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess tablet.MysqlctlProcess.InitDBFile = newInitDBFile tablet.MysqlctlProcess.ExtraArgs = extraArgs proc, err := tablet.MysqlctlProcess.StartProcess() diff --git a/go/test/endtoend/reparent/newfeaturetest/reparent_test.go b/go/test/endtoend/reparent/newfeaturetest/reparent_test.go index 3c41ed5ec47..db7784f6459 100644 --- a/go/test/endtoend/reparent/newfeaturetest/reparent_test.go +++ b/go/test/endtoend/reparent/newfeaturetest/reparent_test.go @@ -96,3 +96,16 @@ func TestSingleReplicaERS(t *testing.T) { // Also check the writes succeed after failover utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{}) } + +// TestTabletRestart tests that a running tablet can be restarted and everything is still fine +func TestTabletRestart(t *testing.T) { + defer cluster.PanicHandler(t) + clusterInstance := utils.SetupReparentCluster(t, "semi_sync") + defer utils.TeardownCluster(clusterInstance) + tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets + + utils.StopTablet(t, tablets[1], false) + tablets[1].VttabletProcess.ServingStatus = "SERVING" + err := tablets[1].VttabletProcess.Setup() + require.NoError(t, err) +} diff --git a/go/test/endtoend/reparent/plannedreparent/reparent_test.go b/go/test/endtoend/reparent/plannedreparent/reparent_test.go index de7e6a0368b..59734bce57a 100644 --- a/go/test/endtoend/reparent/plannedreparent/reparent_test.go +++ b/go/test/endtoend/reparent/plannedreparent/reparent_test.go @@ -418,7 +418,8 @@ func TestFullStatus(t *testing.T) { primaryStatusString, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("GetFullStatus", primaryTablet.Alias) require.NoError(t, err) primaryStatus := &replicationdatapb.FullStatus{} - err = protojson.Unmarshal([]byte(primaryStatusString), primaryStatus) + opt := protojson.UnmarshalOptions{DiscardUnknown: true} + err = opt.Unmarshal([]byte(primaryStatusString), primaryStatus) require.NoError(t, err) assert.NotEmpty(t, primaryStatus.ServerUuid) assert.NotEmpty(t, primaryStatus.ServerId) @@ -427,6 +428,14 @@ func TestFullStatus(t *testing.T) { assert.Contains(t, primaryStatus.PrimaryStatus.String(), "vt-0000000101-bin") assert.Equal(t, primaryStatus.GtidPurged, "MySQL56/") assert.False(t, primaryStatus.ReadOnly) + vtTabletVersion, err := cluster.GetMajorVersion("vttablet") + require.NoError(t, err) + vtcltlVersion, err := cluster.GetMajorVersion("vtctl") + require.NoError(t, err) + // For all version at or above v17.0.0, each replica will start in super_read_only mode. + if vtTabletVersion >= 17 && vtcltlVersion >= 17 { + assert.False(t, primaryStatus.SuperReadOnly) + } assert.True(t, primaryStatus.SemiSyncPrimaryEnabled) assert.True(t, primaryStatus.SemiSyncReplicaEnabled) assert.True(t, primaryStatus.SemiSyncPrimaryStatus) @@ -450,7 +459,8 @@ func TestFullStatus(t *testing.T) { replicaStatusString, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("GetFullStatus", replicaTablet.Alias) require.NoError(t, err) replicaStatus := &replicationdatapb.FullStatus{} - err = protojson.Unmarshal([]byte(replicaStatusString), replicaStatus) + opt = protojson.UnmarshalOptions{DiscardUnknown: true} + err = opt.Unmarshal([]byte(replicaStatusString), replicaStatus) require.NoError(t, err) assert.NotEmpty(t, replicaStatus.ServerUuid) assert.NotEmpty(t, replicaStatus.ServerId) @@ -479,6 +489,10 @@ func TestFullStatus(t *testing.T) { assert.Contains(t, replicaStatus.PrimaryStatus.String(), "vt-0000000102-bin") assert.Equal(t, replicaStatus.GtidPurged, "MySQL56/") assert.True(t, replicaStatus.ReadOnly) + // For all version at or above v17.0.0, each replica will start in super_read_only mode. + if vtTabletVersion >= 17 && vtcltlVersion >= 17 { + assert.True(t, replicaStatus.SuperReadOnly) + } assert.False(t, replicaStatus.SemiSyncPrimaryEnabled) assert.True(t, replicaStatus.SemiSyncReplicaEnabled) assert.False(t, replicaStatus.SemiSyncPrimaryStatus) @@ -499,7 +513,8 @@ func getFullStatus(t *testing.T, clusterInstance *cluster.LocalProcessCluster, t statusString, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("GetFullStatus", tablet.Alias) require.NoError(t, err) status := &replicationdatapb.FullStatus{} - err = protojson.Unmarshal([]byte(statusString), status) + opt := protojson.UnmarshalOptions{DiscardUnknown: true} + err = opt.Unmarshal([]byte(statusString), status) require.NoError(t, err) return status } diff --git a/go/test/endtoend/reparent/prscomplex/main_test.go b/go/test/endtoend/reparent/prscomplex/main_test.go index 43116ca4a6f..88276012781 100644 --- a/go/test/endtoend/reparent/prscomplex/main_test.go +++ b/go/test/endtoend/reparent/prscomplex/main_test.go @@ -25,7 +25,6 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "vitess.io/vitess/go/mysql" diff --git a/go/test/endtoend/reparent/utils/utils.go b/go/test/endtoend/reparent/utils/utils.go index c2ab9d48306..1ec834f1cc7 100644 --- a/go/test/endtoend/reparent/utils/utils.go +++ b/go/test/endtoend/reparent/utils/utils.go @@ -193,7 +193,9 @@ func StartNewVTTablet(t *testing.T, clusterInstance *cluster.LocalProcessCluster shard := keyspace.Shards[0] // Setup MysqlctlProcess - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + require.NoError(t, err) + tablet.MysqlctlProcess = *mysqlctlProcess // Setup VttabletProcess tablet.VttabletProcess = cluster.VttabletProcessInstance( tablet.HTTPPort, diff --git a/go/test/endtoend/sharded/sharded_keyspace_test.go b/go/test/endtoend/sharded/sharded_keyspace_test.go index dbe889ca362..1560d531a28 100644 --- a/go/test/endtoend/sharded/sharded_keyspace_test.go +++ b/go/test/endtoend/sharded/sharded_keyspace_test.go @@ -216,7 +216,11 @@ func initCluster(shardNames []string, totalTabletsRequired int) { tablet.Type = "primary" } // Start Mysqlctl process - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return + } + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() if err != nil { return diff --git a/go/test/endtoend/tabletmanager/tablet_health_test.go b/go/test/endtoend/tabletmanager/tablet_health_test.go index 19359406607..aaa5719cdcd 100644 --- a/go/test/endtoend/tabletmanager/tablet_health_test.go +++ b/go/test/endtoend/tabletmanager/tablet_health_test.go @@ -103,9 +103,6 @@ func TestHealthCheck(t *testing.T) { defer replicaConn.Close() - // Create database in mysql - utils.Exec(t, replicaConn, fmt.Sprintf("create database vt_%s", keyspaceName)) - // start vttablet process, should be in SERVING state as we already have a primary err = clusterInstance.StartVttablet(rTablet, "SERVING", false, cell, keyspaceName, hostname, shardName) require.NoError(t, err) diff --git a/go/test/endtoend/tabletmanager/tablet_test.go b/go/test/endtoend/tabletmanager/tablet_test.go index 3c597e97981..643785dcd89 100644 --- a/go/test/endtoend/tabletmanager/tablet_test.go +++ b/go/test/endtoend/tabletmanager/tablet_test.go @@ -34,8 +34,11 @@ func TestEnsureDB(t *testing.T) { // Create new tablet tablet := clusterInstance.NewVttabletInstance("replica", 0, "") - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) - err := tablet.MysqlctlProcess.Start() + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + require.NoError(t, err) + + tablet.MysqlctlProcess = *mysqlctlProcess + err = tablet.MysqlctlProcess.Start() require.NoError(t, err) log.Info(fmt.Sprintf("Started vttablet %v", tablet)) @@ -67,8 +70,10 @@ func TestResetReplicationParameters(t *testing.T) { // Create new tablet tablet := clusterInstance.NewVttabletInstance("replica", 0, "") - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) - err := tablet.MysqlctlProcess.Start() + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + require.NoError(t, err) + tablet.MysqlctlProcess = *mysqlctlProcess + err = tablet.MysqlctlProcess.Start() require.NoError(t, err) log.Info(fmt.Sprintf("Started vttablet %v", tablet)) diff --git a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go index e604e204790..78daaed63a0 100644 --- a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go +++ b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go @@ -480,9 +480,6 @@ func TestRestoreDefaultQuery(t *testing.T) { _, err := onlineddl.UpdateThrottlerTopoConfig(clusterInstance, true, false, throttlerThreshold.Seconds(), "", false) assert.NoError(t, err) }) - t.Run("requesting heartbeats", func(t *testing.T) { - _ = warmUpHeartbeat(t) - }) t.Run("validating OK response from throttler with low threshold, heartbeats running", func(t *testing.T) { waitForThrottleCheckStatus(t, primaryTablet, http.StatusOK) }) diff --git a/go/test/endtoend/topoconncache/main_test.go b/go/test/endtoend/topoconncache/main_test.go index 2a074e8428a..7cfea8839b0 100644 --- a/go/test/endtoend/topoconncache/main_test.go +++ b/go/test/endtoend/topoconncache/main_test.go @@ -140,7 +140,11 @@ func TestMain(m *testing.M) { var mysqlProcs []*exec.Cmd for _, tablet := range []*cluster.Vttablet{shard1Primary, shard1Replica, shard1Rdonly, shard2Primary, shard2Replica, shard2Rdonly} { - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + if err != nil { + return 1, err + } + tablet.MysqlctlProcess = *mysqlctlProcess tablet.VttabletProcess = cluster.VttabletProcessInstance(tablet.HTTPPort, tablet.GrpcPort, tablet.TabletUID, diff --git a/go/test/endtoend/topoconncache/topo_conn_cache_test.go b/go/test/endtoend/topoconncache/topo_conn_cache_test.go index 02f14a7304d..504ca218047 100644 --- a/go/test/endtoend/topoconncache/topo_conn_cache_test.go +++ b/go/test/endtoend/topoconncache/topo_conn_cache_test.go @@ -136,7 +136,9 @@ func addCellback(t *testing.T) { // create sql process for vttablets var mysqlProcs []*exec.Cmd for _, tablet := range []*cluster.Vttablet{shard1Replica, shard1Rdonly, shard2Replica, shard2Rdonly} { - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory) + require.NoError(t, err) + tablet.MysqlctlProcess = *mysqlctlProcess tablet.VttabletProcess = cluster.VttabletProcessInstance(tablet.HTTPPort, tablet.GrpcPort, tablet.TabletUID, diff --git a/go/test/endtoend/utils/mysql.go b/go/test/endtoend/utils/mysql.go index 87f76d0be9d..c6f18e31738 100644 --- a/go/test/endtoend/utils/mysql.go +++ b/go/test/endtoend/utils/mysql.go @@ -41,12 +41,13 @@ import ( // The mysql.ConnParams to connect to the new database is returned, along with a function to // teardown the database. func NewMySQL(cluster *cluster.LocalProcessCluster, dbName string, schemaSQL ...string) (mysql.ConnParams, func(), error) { - return NewMySQLWithDetails(cluster.GetAndReservePort(), cluster.Hostname, dbName, schemaSQL...) + mysqlParam, _, closer, error := NewMySQLWithMysqld(cluster.GetAndReservePort(), cluster.Hostname, dbName, schemaSQL...) + return mysqlParam, closer, error } // CreateMysqldAndMycnf returns a Mysqld and a Mycnf object to use for working with a MySQL // installation that hasn't been set up yet. -func CreateMysqldAndMycnf(tabletUID uint32, mysqlSocket string, mysqlPort int32) (*mysqlctl.Mysqld, *mysqlctl.Mycnf, error) { +func CreateMysqldAndMycnf(tabletUID uint32, mysqlSocket string, mysqlPort int) (*mysqlctl.Mysqld, *mysqlctl.Mycnf, error) { mycnf := mysqlctl.NewMycnf(tabletUID, mysqlPort) if err := mycnf.RandomizeMysqlServerID(); err != nil { return nil, nil, fmt.Errorf("couldn't generate random MySQL server_id: %v", err) @@ -61,24 +62,24 @@ func CreateMysqldAndMycnf(tabletUID uint32, mysqlSocket string, mysqlPort int32) return mysqlctl.NewMysqld(&cfg), mycnf, nil } -func NewMySQLWithDetails(port int, hostname, dbName string, schemaSQL ...string) (mysql.ConnParams, func(), error) { +func NewMySQLWithMysqld(port int, hostname, dbName string, schemaSQL ...string) (mysql.ConnParams, *mysqlctl.Mysqld, func(), error) { mysqlDir, err := createMySQLDir() if err != nil { - return mysql.ConnParams{}, nil, err + return mysql.ConnParams{}, nil, nil, err } initMySQLFile, err := createInitSQLFile(mysqlDir, dbName) if err != nil { - return mysql.ConnParams{}, nil, err + return mysql.ConnParams{}, nil, nil, err } mysqlPort := port - mysqld, mycnf, err := CreateMysqldAndMycnf(0, "", int32(mysqlPort)) + mysqld, mycnf, err := CreateMysqldAndMycnf(0, "", mysqlPort) if err != nil { - return mysql.ConnParams{}, nil, err + return mysql.ConnParams{}, nil, nil, err } err = initMysqld(mysqld, mycnf, initMySQLFile) if err != nil { - return mysql.ConnParams{}, nil, err + return mysql.ConnParams{}, nil, nil, err } params := mysql.ConnParams{ @@ -90,10 +91,10 @@ func NewMySQLWithDetails(port int, hostname, dbName string, schemaSQL ...string) for _, sql := range schemaSQL { err = prepareMySQLWithSchema(params, sql) if err != nil { - return mysql.ConnParams{}, nil, err + return mysql.ConnParams{}, nil, nil, err } } - return params, func() { + return params, mysqld, func() { ctx := context.Background() _ = mysqld.Teardown(ctx, mycnf, true) mysqld.Close() @@ -116,7 +117,10 @@ func createInitSQLFile(mysqlDir, ksName string) (string, error) { return "", err } defer f.Close() - + _, err = f.WriteString("SET GLOBAL super_read_only='OFF';") + if err != nil { + return "", err + } _, err = f.WriteString(fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s;", ksName)) if err != nil { return "", err diff --git a/go/test/endtoend/utils/mysql_test.go b/go/test/endtoend/utils/mysql_test.go index d2816cb1227..de9db23dab1 100644 --- a/go/test/endtoend/utils/mysql_test.go +++ b/go/test/endtoend/utils/mysql_test.go @@ -22,15 +22,18 @@ import ( "os" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/vt/mysqlctl" ) var ( clusterInstance *cluster.LocalProcessCluster mysqlParams mysql.ConnParams + mysqld *mysqlctl.Mysqld keyspaceName = "ks" cell = "test" schemaSQL = `create table t1( @@ -48,13 +51,14 @@ func TestMain(m *testing.M) { clusterInstance = cluster.NewCluster(cell, "localhost") defer clusterInstance.Teardown() - conn, closer, err := NewMySQL(clusterInstance, keyspaceName, schemaSQL) + var closer func() + var err error + mysqlParams, mysqld, closer, err = NewMySQLWithMysqld(clusterInstance.GetAndReservePort(), clusterInstance.Hostname, keyspaceName, schemaSQL) if err != nil { fmt.Println(err) return 1 } defer closer() - mysqlParams = conn return m.Run() }() os.Exit(exitCode) @@ -64,9 +68,58 @@ func TestCreateMySQL(t *testing.T) { ctx := context.Background() conn, err := mysql.Connect(ctx, &mysqlParams) require.NoError(t, err) - AssertMatches(t, conn, "show databases;", `[[VARCHAR("information_schema")] [VARCHAR("ks")] [VARCHAR("mysql")] [VARCHAR("performance_schema")] [VARCHAR("sys")]]`) AssertMatches(t, conn, "show tables;", `[[VARCHAR("t1")]]`) Exec(t, conn, "insert into t1(id1, id2, id3) values (1, 1, 1), (2, 2, 2), (3, 3, 3)") AssertMatches(t, conn, "select * from t1;", `[[INT64(1) INT64(1) INT64(1)] [INT64(2) INT64(2) INT64(2)] [INT64(3) INT64(3) INT64(3)]]`) } + +func TestSetSuperReadOnlyMySQL(t *testing.T) { + require.NotNil(t, mysqld) + isSuperReadOnly, _ := mysqld.IsSuperReadOnly() + assert.False(t, isSuperReadOnly, "super_read_only should be set to False") + retFunc1, err := mysqld.SetSuperReadOnly(true) + assert.NotNil(t, retFunc1, "SetSuperReadOnly is supposed to return a defer function") + assert.NoError(t, err, "SetSuperReadOnly should not have failed") + + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.True(t, isSuperReadOnly, "super_read_only should be set to True") + // if value is already true then retFunc2 will be nil + retFunc2, err := mysqld.SetSuperReadOnly(true) + assert.Nil(t, retFunc2, "SetSuperReadOnly is supposed to return a nil function") + assert.NoError(t, err, "SetSuperReadOnly should not have failed") + + retFunc1() + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.False(t, isSuperReadOnly, "super_read_only should be set to False") + isReadOnly, _ := mysqld.IsReadOnly() + assert.True(t, isReadOnly, "read_only should be set to True") + + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.False(t, isSuperReadOnly, "super_read_only should be set to False") + retFunc1, err = mysqld.SetSuperReadOnly(false) + assert.Nil(t, retFunc1, "SetSuperReadOnly is supposed to return a nil function") + assert.NoError(t, err, "SetSuperReadOnly should not have failed") + + _, err = mysqld.SetSuperReadOnly(true) + assert.NoError(t, err) + + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.True(t, isSuperReadOnly, "super_read_only should be set to True") + retFunc1, err = mysqld.SetSuperReadOnly(false) + assert.NotNil(t, retFunc1, "SetSuperReadOnly is supposed to return a defer function") + assert.NoError(t, err, "SetSuperReadOnly should not have failed") + + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.False(t, isSuperReadOnly, "super_read_only should be set to False") + // if value is already false then retFunc2 will be nil + retFunc2, err = mysqld.SetSuperReadOnly(false) + assert.Nil(t, retFunc2, "SetSuperReadOnly is supposed to return a nil function") + assert.NoError(t, err, "SetSuperReadOnly should not have failed") + + retFunc1() + isSuperReadOnly, _ = mysqld.IsSuperReadOnly() + assert.True(t, isSuperReadOnly, "super_read_only should be set to True") + isReadOnly, _ = mysqld.IsReadOnly() + assert.True(t, isReadOnly, "read_only should be set to True") +} diff --git a/go/test/endtoend/utils/utils.go b/go/test/endtoend/utils/utils.go index 1aca889025b..82d696fa856 100644 --- a/go/test/endtoend/utils/utils.go +++ b/go/test/endtoend/utils/utils.go @@ -22,14 +22,13 @@ import ( "testing" "time" - "vitess.io/vitess/go/test/endtoend/cluster" - "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/test/endtoend/cluster" ) // AssertContains ensures the given query result contains the expected results. @@ -288,3 +287,23 @@ func convertToMap(input interface{}) map[string]interface{} { output := input.(map[string]interface{}) return output } + +func GetInitDBSQL(initDBSQL string, updatedPasswords string, oldAlterTableMode string) (string, error) { + // Since password update is DML we need to insert it before we disable + // super_read_only therefore doing the split below. + splitString := strings.Split(initDBSQL, "# {{custom_sql}}") + if len(splitString) != 2 { + return "", fmt.Errorf("missing `# {{custom_sql}}` in init_db.sql file") + } + var builder strings.Builder + builder.WriteString(splitString[0]) + builder.WriteString(updatedPasswords) + + // https://github.com/vitessio/vitess/issues/8315 + if oldAlterTableMode != "" { + builder.WriteString(oldAlterTableMode) + } + builder.WriteString(splitString[1]) + + return builder.String(), nil +} diff --git a/go/test/endtoend/vault/dbcreds_secret.json b/go/test/endtoend/vault/dbcreds_secret.json index 96fff38bdcd..ee0a4af534b 100644 --- a/go/test/endtoend/vault/dbcreds_secret.json +++ b/go/test/endtoend/vault/dbcreds_secret.json @@ -1,17 +1,23 @@ { + "root": [ + "RootPass" + ], "vt_app": [ - "password" + "VtAppPass" ], "vt_dba": [ - "password" + "VtDbaPass" ], "vt_repl": [ - "password" + "VtReplPass" ], "vt_appdebug": [ - "password" + "VtDebugPass" ], "vt_filtered": [ - "password" + "VtFilteredPass" + ], + "vt_allprivs": [ + "VtAllprivsPass" ] } diff --git a/go/test/endtoend/vault/vault_test.go b/go/test/endtoend/vault/vault_test.go index 25ed88f4335..2c4bf3059d6 100644 --- a/go/test/endtoend/vault/vault_test.go +++ b/go/test/endtoend/vault/vault_test.go @@ -33,6 +33,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/vt/log" ) @@ -53,7 +54,7 @@ var ( shardName = "0" dbName = "vt_ks" mysqlUsers = []string{"vt_dba", "vt_app", "vt_appdebug", "vt_repl", "vt_filtered"} - mysqlPassword = "password" + mysqlPassword = "VtDbaPass" vtgateUser = "vtgate_user" vtgatePassword = "password123" commonTabletArg = []string{ @@ -251,10 +252,21 @@ func initializeClusterLate(t *testing.T) { out, err := vtctldClientProcess.ExecuteCommandWithOutput("SetKeyspaceDurabilityPolicy", keyspaceName, "--durability-policy=semi_sync") require.NoError(t, err, out) + initDb, _ := os.ReadFile(path.Join(os.Getenv("VTROOT"), "/config/init_db.sql")) + sql := string(initDb) + // The original init_db.sql does not have any passwords. Here we update the init file with passwords + sql, err = utils.GetInitDBSQL(sql, cluster.GetPasswordUpdateSQL(clusterInstance), "") + require.NoError(t, err, "expected to load init_db file") + newInitDBFile := path.Join(clusterInstance.TmpDirectory, "init_db_with_passwords.sql") + err = os.WriteFile(newInitDBFile, []byte(sql), 0660) + require.NoError(t, err, "expected to load init_db file") + // Start MySQL var mysqlCtlProcessList []*exec.Cmd for _, shard := range clusterInstance.Keyspaces[0].Shards { for _, tablet := range shard.Vttablets { + tablet.MysqlctlProcess.InitDBFile = newInitDBFile + tablet.VttabletProcess.DbPassword = mysqlPassword proc, err := tablet.MysqlctlProcess.StartProcess() require.NoError(t, err) mysqlCtlProcessList = append(mysqlCtlProcessList, proc) @@ -268,21 +280,6 @@ func initializeClusterLate(t *testing.T) { } for _, tablet := range []*cluster.Vttablet{primary, replica} { - for _, user := range mysqlUsers { - query := fmt.Sprintf("ALTER USER '%s'@'%s' IDENTIFIED BY '%s';", user, hostname, mysqlPassword) - _, err = tablet.VttabletProcess.QueryTablet(query, keyspace.Name, false) - // Reset after the first ALTER, or we lock ourselves out. - tablet.VttabletProcess.DbPassword = mysqlPassword - if err != nil { - query = fmt.Sprintf("ALTER USER '%s'@'%%' IDENTIFIED BY '%s';", user, mysqlPassword) - _, err = tablet.VttabletProcess.QueryTablet(query, keyspace.Name, false) - require.NoError(t, err) - } - } - query := fmt.Sprintf("create database %s;", dbName) - _, err = tablet.VttabletProcess.QueryTablet(query, keyspace.Name, false) - require.NoError(t, err) - err = tablet.VttabletProcess.Setup() require.NoError(t, err) diff --git a/go/test/endtoend/vreplication/cluster_test.go b/go/test/endtoend/vreplication/cluster_test.go index b979f26c7c3..93878b4e539 100644 --- a/go/test/endtoend/vreplication/cluster_test.go +++ b/go/test/endtoend/vreplication/cluster_test.go @@ -457,7 +457,9 @@ func (vc *VitessCluster) AddTablet(t testing.TB, cell *Cell, keyspace *Keyspace, require.NotNil(t, vttablet) vttablet.SupportsBackup = false - tablet.DbServer = cluster.MysqlCtlProcessInstance(tabletID, vc.ClusterConfig.tabletMysqlPortBase+tabletID, vc.ClusterConfig.tmpDir) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstance(tabletID, vc.ClusterConfig.tabletMysqlPortBase+tabletID, vc.ClusterConfig.tmpDir) + require.NoError(t, err) + tablet.DbServer = mysqlctlProcess require.NotNil(t, tablet.DbServer) tablet.DbServer.InitMysql = true proc, err := tablet.DbServer.StartProcess() diff --git a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go index 58b92e0b65c..d965f31ca7c 100644 --- a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go +++ b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go @@ -172,6 +172,27 @@ func tstWorkflowComplete(t *testing.T) error { return tstWorkflowAction(t, workflowActionComplete, "", "") } +// testWorkflowUpdate is a very simple test of the workflow update +// vtctlclient/vtctldclient command. +// It performs a non-behavior impacting update, setting tablet-types +// to primary,replica,rdonly (the only applicable types in these tests). +func testWorkflowUpdate(t *testing.T) { + tabletTypes := "primary,replica,rdonly" + // Test vtctlclient first + _, err := vc.VtctlClient.ExecuteCommandWithOutput("workflow", "--", "--tablet-types", tabletTypes, "noexist.noexist", "update") + require.Error(t, err, err) + resp, err := vc.VtctlClient.ExecuteCommandWithOutput("workflow", "--", "--tablet-types", tabletTypes, ksWorkflow, "update") + require.NoError(t, err) + require.NotEmpty(t, resp) + + // Test vtctldclient last + _, err = vc.VtctldClient.ExecuteCommandWithOutput("workflow", "--keyspace", "noexist", "update", "--workflow", "noexist", "--tablet-types", tabletTypes) + require.Error(t, err) + resp, err = vc.VtctldClient.ExecuteCommandWithOutput("workflow", "--keyspace", targetKs, "update", "--workflow", workflowName, "--tablet-types", tabletTypes) + require.NoError(t, err, err) + require.NotEmpty(t, resp) +} + func tstWorkflowCancel(t *testing.T) error { return tstWorkflowAction(t, workflowActionCancel, "", "") } @@ -391,6 +412,9 @@ func testReshardV2Workflow(t *testing.T) { verifyNoInternalTables(t, vtgateConn, targetKs+"/-40") verifyNoInternalTables(t, vtgateConn, targetKs+"/c0-") + // Confirm that updating Reshard workflows works. + testWorkflowUpdate(t) + testRestOfWorkflow(t) } @@ -414,6 +438,9 @@ func testMoveTablesV2Workflow(t *testing.T) { testReplicatingWithPKEnumCols(t) + // Confirm that updating MoveTable workflows works. + testWorkflowUpdate(t) + testRestOfWorkflow(t) listAllArgs := []string{"workflow", "customer", "listall"} diff --git a/go/test/endtoend/vreplication/testdata/config/init_testserver_db.sql b/go/test/endtoend/vreplication/testdata/config/init_testserver_db.sql new file mode 100644 index 00000000000..03df754ea21 --- /dev/null +++ b/go/test/endtoend/vreplication/testdata/config/init_testserver_db.sql @@ -0,0 +1,91 @@ +# This file is for testing purpose only. +# This file is executed immediately after initializing a fresh data directory. +# It is equivalent of init_db.sql. Given init_db.sql is for mysql which has super_read_only +# related stuff therefore for testing purpose we avoid setting `super_read_only` during initialization. + +############################################################################### +# WARNING: Any change to init_db.sql should gets reflected in this file as well. +############################################################################### + +############################################################################### +# WARNING: This sql is *NOT* safe for production use, +# as it contains default well-known users and passwords. +# Care should be taken to change these users and passwords +# for production. +############################################################################### + +############################################################################### +# Equivalent of mysql_secure_installation +############################################################################### +# We need to ensure that read_only is disabled so that we can execute +# these commands. +SET GLOBAL read_only='OFF'; + +# Changes during the init db should not make it to the binlog. +# They could potentially create errant transactions on replicas. +SET sql_log_bin = 0; +# Remove anonymous users. +DELETE FROM mysql.user WHERE User = ''; + +# Disable remote root access (only allow UNIX socket). +DELETE FROM mysql.user WHERE User = 'root' AND Host != 'localhost'; + +# Remove test database. +DROP DATABASE IF EXISTS test; + +############################################################################### +# Vitess defaults +############################################################################### + +# Admin user with all privileges. +CREATE USER 'vt_dba'@'localhost'; +GRANT ALL ON *.* TO 'vt_dba'@'localhost'; +GRANT GRANT OPTION ON *.* TO 'vt_dba'@'localhost'; + +# User for app traffic, with global read-write access. +CREATE USER 'vt_app'@'localhost'; +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, + REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, + LOCK TABLES, EXECUTE, REPLICATION CLIENT, CREATE VIEW, + SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER + ON *.* TO 'vt_app'@'localhost'; + +# User for app debug traffic, with global read access. +CREATE USER 'vt_appdebug'@'localhost'; +GRANT SELECT, SHOW DATABASES, PROCESS ON *.* TO 'vt_appdebug'@'localhost'; + +# User for administrative operations that need to be executed as non-SUPER. +# Same permissions as vt_app here. +CREATE USER 'vt_allprivs'@'localhost'; +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, + REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, + LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, + SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER + ON *.* TO 'vt_allprivs'@'localhost'; + +# User for slave replication connections. +CREATE USER 'vt_repl'@'%'; +GRANT REPLICATION SLAVE ON *.* TO 'vt_repl'@'%'; + +# User for Vitess VReplication (base vstreamers and vplayer). +CREATE USER 'vt_filtered'@'localhost'; +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, + REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, + LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, + SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER + ON *.* TO 'vt_filtered'@'localhost'; + +# User for general MySQL monitoring. +CREATE USER 'vt_monitoring'@'localhost'; +GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD + ON *.* TO 'vt_monitoring'@'localhost'; +GRANT SELECT, UPDATE, DELETE, DROP + ON performance_schema.* TO 'vt_monitoring'@'localhost'; + +FLUSH PRIVILEGES; + +RESET SLAVE ALL; +RESET MASTER; + +# custom sql is used to add custom scripts like creating users/passwords. We use it in our tests +# {{custom_sql}} diff --git a/go/test/endtoend/vreplication/vreplication_test.go b/go/test/endtoend/vreplication/vreplication_test.go index e74d9728031..defbb8fb221 100644 --- a/go/test/endtoend/vreplication/vreplication_test.go +++ b/go/test/endtoend/vreplication/vreplication_test.go @@ -387,6 +387,7 @@ func TestMultiCellVreplicationWorkflow(t *testing.T) { insertInitialData(t) shardCustomer(t, true, []*Cell{cell1, cell2}, cell2.Name, true) + checkIfDenyListExists(t, vc, "product:0", "customer") // we tag along this test so as not to create the overhead of creating another cluster testVStreamCellFlag(t) } @@ -752,9 +753,9 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "product", query, query)) insertQuery1 := "insert into customer(cid, name, meta) values(1001, 'tempCustomer1', '{\"a\": 1629849600, \"b\": 930701976723823}')" - matchInsertQuery0 := "insert into customer(cid, `name`) values (:vtg1, :vtg2)" - matchInsertQuery1 := "insert into customer(cid, `name`, meta) values (:vtg1, :vtg2, :vtg3)" - validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "product", insertQuery1, matchInsertQuery1) + matchInsertQuery0 := "insert into customer(cid, `name`) values (:vtg1 /* INT64 */, :vtg2 /* VARCHAR */)" + matchInsertQuery1 := "insert into customer(cid, `name`, meta) values (:vtg1 /* INT64 */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */)" + require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "product", insertQuery1, matchInsertQuery1)) // confirm that the backticking of table names in the routing rules works tbls := []string{"Lead", "Lead-1"} @@ -794,7 +795,7 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl ksShards := []string{"product/0", "customer/-80", "customer/80-"} printShardPositions(vc, ksShards) insertQuery2 := "insert into customer(name, cid) values('tempCustomer2', 100)" - matchInsertQuery2 := "insert into customer(`name`, cid) values (:vtg1, :_cid0)" + matchInsertQuery2 := "insert into customer(`name`, cid) values (:vtg1 /* VARCHAR */, :_cid0)" require.False(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "customer", insertQuery2, matchInsertQuery2)) insertQuery2 = "insert into customer(name, cid) values('tempCustomer3', 101)" // ID 101, hence due to reverse_bits in shard 80- @@ -889,7 +890,8 @@ func reshardCustomer2to4Split(t *testing.T, cells []*Cell, sourceCellOrAlias str t.Run("reshardCustomer2to4Split", func(t *testing.T) { ksName := "customer" counts := map[string]int{"zone1-600": 4, "zone1-700": 5, "zone1-800": 6, "zone1-900": 5} - reshard(t, ksName, "customer", "c2c4", "-80,80-", "-40,40-80,80-c0,c0-", 600, counts, nil, cells, sourceCellOrAlias) + reshard(t, ksName, "customer", "c2c4", "-80,80-", "-40,40-80,80-c0,c0-", + 600, counts, nil, cells, sourceCellOrAlias, 1) waitForRowCount(t, vtgateConn, ksName, "customer", 20) query := "insert into customer (name) values('yoko')" execVtgateQuery(t, vtgateConn, ksName, query) @@ -901,7 +903,8 @@ func reshardMerchant2to3SplitMerge(t *testing.T) { t.Run("reshardMerchant2to3SplitMerge", func(t *testing.T) { ksName := merchantKeyspace counts := map[string]int{"zone1-1600": 0, "zone1-1700": 2, "zone1-1800": 0} - reshard(t, ksName, "merchant", "m2m3", "-80,80-", "-40,40-c0,c0-", 1600, counts, dryRunResultsSwitchWritesM2m3, nil, "") + reshard(t, ksName, "merchant", "m2m3", "-80,80-", "-40,40-c0,c0-", + 1600, counts, dryRunResultsSwitchWritesM2m3, nil, "", 1) waitForRowCount(t, vtgateConn, ksName, "merchant", 2) query := "insert into merchant (mname, category) values('amazon', 'electronics')" execVtgateQuery(t, vtgateConn, ksName, query) @@ -947,7 +950,8 @@ func reshardMerchant3to1Merge(t *testing.T) { t.Run("reshardMerchant3to1Merge", func(t *testing.T) { ksName := merchantKeyspace counts := map[string]int{"zone1-2000": 3} - reshard(t, ksName, "merchant", "m3m1", "-40,40-c0,c0-", "0", 2000, counts, nil, nil, "") + reshard(t, ksName, "merchant", "m3m1", "-40,40-c0,c0-", "0", + 2000, counts, nil, nil, "", 1) waitForRowCount(t, vtgateConn, ksName, "merchant", 3) query := "insert into merchant (mname, category) values('flipkart', 'electronics')" execVtgateQuery(t, vtgateConn, ksName, query) @@ -959,7 +963,8 @@ func reshardCustomer3to2SplitMerge(t *testing.T) { // -40,40-80,80-c0 => merge/s t.Run("reshardCustomer3to2SplitMerge", func(t *testing.T) { ksName := "customer" counts := map[string]int{"zone1-1000": 8, "zone1-1100": 8, "zone1-1200": 5} - reshard(t, ksName, "customer", "c4c3", "-40,40-80,80-c0", "-60,60-c0", 1000, counts, nil, nil, "") + reshard(t, ksName, "customer", "c4c3", "-40,40-80,80-c0", "-60,60-c0", + 1000, counts, nil, nil, "", 1) }) } @@ -967,11 +972,14 @@ func reshardCustomer3to1Merge(t *testing.T) { // to unsharded t.Run("reshardCustomer3to1Merge", func(t *testing.T) { ksName := "customer" counts := map[string]int{"zone1-1500": 21} - reshard(t, ksName, "customer", "c3c1", "-60,60-c0,c0-", "0", 1500, counts, nil, nil, "") + reshard(t, ksName, "customer", "c3c1", "-60,60-c0,c0-", "0", + 1500, counts, nil, nil, "", 3) }) } -func reshard(t *testing.T, ksName string, tableName string, workflow string, sourceShards string, targetShards string, tabletIDBase int, counts map[string]int, dryRunResultSwitchWrites []string, cells []*Cell, sourceCellOrAlias string) { +func reshard(t *testing.T, ksName string, tableName string, workflow string, sourceShards string, targetShards string, + tabletIDBase int, counts map[string]int, dryRunResultSwitchWrites []string, cells []*Cell, sourceCellOrAlias string, + autoIncrementStep int) { t.Run("reshard", func(t *testing.T) { if cells == nil { cells = []*Cell{defaultCell} @@ -988,12 +996,19 @@ func reshard(t *testing.T, ksName string, tableName string, workflow string, sou err := cluster.WaitForHealthyShard(vc.VtctldClient, ksName, shardName) require.NoError(t, err) } + tablets := vc.getVttabletsInKeyspace(t, defaultCell, ksName, "primary") + + // Test multi-primary setups, like a Galera cluster, which have auto increment steps > 1. + for _, tablet := range tablets { + autoIncrementSetQuery := fmt.Sprintf("set @@session.auto_increment_increment = %d; set @@global.auto_increment_increment = %d", + autoIncrementStep, autoIncrementStep) + tablet.QueryTablet(autoIncrementSetQuery, "", false) + } workflowType := "Reshard" if err := vc.VtctlClient.ExecuteCommand(workflowType, "--", "--source_shards="+sourceShards, "--target_shards="+targetShards, "--cells="+sourceCellOrAlias, "--tablet_types=replica,primary", "Create", ksWorkflow); err != nil { t.Fatalf("Reshard Create command failed with %+v\n", err) } - tablets := vc.getVttabletsInKeyspace(t, defaultCell, ksName, "primary") targetShards = "," + targetShards + "," for _, tab := range tablets { if strings.Contains(targetShards, ","+tab.Shard+",") { diff --git a/go/test/endtoend/vreplication/vstream_test.go b/go/test/endtoend/vreplication/vstream_test.go index d81faa5e26f..2b3eaf4bbda 100644 --- a/go/test/endtoend/vreplication/vstream_test.go +++ b/go/test/endtoend/vreplication/vstream_test.go @@ -178,6 +178,7 @@ func testVStreamWithFailover(t *testing.T, failover bool) { const schemaUnsharded = ` create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; +insert into customer_seq(id, next_id, cache) values(0, 1, 3); ` const vschemaUnsharded = ` { @@ -189,7 +190,7 @@ const vschemaUnsharded = ` } ` const schemaSharded = ` -create table customer(cid int, name varbinary(128), primary key(cid)) CHARSET=utf8mb4; +create table customer(cid int, name varbinary(128), primary key(cid)) TABLESPACE innodb_system CHARSET=utf8mb4; ` const vschemaSharded = ` { @@ -219,14 +220,18 @@ const vschemaSharded = ` func insertRow(keyspace, table string, id int) { vtgateConn.ExecuteFetch(fmt.Sprintf("use %s;", keyspace), 1000, false) vtgateConn.ExecuteFetch("begin", 1000, false) - vtgateConn.ExecuteFetch(fmt.Sprintf("insert into %s (cid, name) values (%d, '%s%d')", table, id+100, table, id), 1000, false) + _, err := vtgateConn.ExecuteFetch(fmt.Sprintf("insert into %s (name) values ('%s%d')", table, table, id), 1000, false) + if err != nil { + log.Infof("error inserting row %d: %v", id, err) + } vtgateConn.ExecuteFetch("commit", 1000, false) } type numEvents struct { - numRowEvents, numJournalEvents int64 - numLessThan80Events, numGreaterThan80Events int64 - numLessThan40Events, numGreaterThan40Events int64 + numRowEvents, numJournalEvents int64 + numLessThan80Events, numGreaterThan80Events int64 + numLessThan40Events, numGreaterThan40Events int64 + numShard0BeforeReshardEvents, numShard0AfterReshardEvents int64 } // tests the StopOnReshard flag @@ -366,7 +371,8 @@ func testVStreamStopOnReshardFlag(t *testing.T, stopOnReshard bool, baseTabletID tickCount++ switch tickCount { case 1: - reshard(t, "sharded", "customer", "vstreamStopOnReshard", "-80,80-", "-40,40-", baseTabletID+400, nil, nil, nil, defaultCellName) + reshard(t, "sharded", "customer", "vstreamStopOnReshard", "-80,80-", + "-40,40-", baseTabletID+400, nil, nil, nil, defaultCellName, 1) case 60: done = true } @@ -377,6 +383,150 @@ func testVStreamStopOnReshardFlag(t *testing.T, stopOnReshard bool, baseTabletID return &ne } +// Validate that we can continue streaming from multiple keyspaces after first copying some tables and then resharding one of the keyspaces +// Ensure that there are no missing row events during the resharding process. +func testVStreamCopyMultiKeyspaceReshard(t *testing.T, baseTabletID int) numEvents { + defaultCellName := "zone1" + allCellNames = defaultCellName + allCells := []string{allCellNames} + vc = NewVitessCluster(t, "VStreamCopyMultiKeyspaceReshard", allCells, mainClusterConfig) + + require.NotNil(t, vc) + ogdr := defaultReplicas + defaultReplicas = 0 // because of CI resource constraints we can only run this test with primary tablets + defer func(dr int) { defaultReplicas = dr }(ogdr) + + defer vc.TearDown(t) + + defaultCell = vc.Cells[defaultCellName] + vc.AddKeyspace(t, []*Cell{defaultCell}, "unsharded", "0", vschemaUnsharded, schemaUnsharded, defaultReplicas, defaultRdonly, baseTabletID+100, nil) + vtgate = defaultCell.Vtgates[0] + require.NotNil(t, vtgate) + vtgate.WaitForStatusOfTabletInShard(fmt.Sprintf("%s.%s.primary", "unsharded", "0"), 1) + + vtgateConn = getConnection(t, vc.ClusterConfig.hostname, vc.ClusterConfig.vtgateMySQLPort) + defer vtgateConn.Close() + verifyClusterHealth(t, vc) + + vc.AddKeyspace(t, []*Cell{defaultCell}, "sharded", "-80,80-", vschemaSharded, schemaSharded, defaultReplicas, defaultRdonly, baseTabletID+200, nil) + + ctx := context.Background() + vstreamConn, err := vtgateconn.Dial(ctx, fmt.Sprintf("%s:%d", vc.ClusterConfig.hostname, vc.ClusterConfig.vtgateGrpcPort)) + if err != nil { + log.Fatal(err) + } + defer vstreamConn.Close() + vgtid := &binlogdatapb.VGtid{ + ShardGtids: []*binlogdatapb.ShardGtid{{ + Keyspace: "/.*", + }}} + + filter := &binlogdatapb.Filter{ + Rules: []*binlogdatapb.Rule{{ + // We want to confirm that the following two tables are streamed. + // 1. the customer_seq in the unsharded keyspace + // 2. the customer table in the sharded keyspace + Match: "/customer.*/", + }}, + } + flags := &vtgatepb.VStreamFlags{} + done := false + + id := 1000 + // First goroutine that keeps inserting rows into the table being streamed until a minute after reshard + // We should keep getting events on the new shards + go func() { + for { + if done { + return + } + id++ + time.Sleep(1 * time.Second) + insertRow("sharded", "customer", id) + } + }() + // stream events from the VStream API + var ne numEvents + reshardDone := false + go func() { + var reader vtgateconn.VStreamReader + reader, err = vstreamConn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags) + require.NoError(t, err) + for { + evs, err := reader.Recv() + + switch err { + case nil: + for _, ev := range evs { + switch ev.Type { + case binlogdatapb.VEventType_ROW: + shard := ev.RowEvent.Shard + switch shard { + case "0": + if reshardDone { + ne.numShard0AfterReshardEvents++ + } else { + ne.numShard0BeforeReshardEvents++ + } + case "-80": + ne.numLessThan80Events++ + case "80-": + ne.numGreaterThan80Events++ + case "-40": + ne.numLessThan40Events++ + case "40-": + ne.numGreaterThan40Events++ + } + ne.numRowEvents++ + case binlogdatapb.VEventType_JOURNAL: + ne.numJournalEvents++ + } + } + case io.EOF: + log.Infof("Stream Ended") + done = true + default: + log.Errorf("Returned err %v", err) + done = true + } + if done { + return + } + } + }() + + ticker := time.NewTicker(1 * time.Second) + tickCount := 0 + for { + <-ticker.C + tickCount++ + switch tickCount { + case 1: + reshard(t, "sharded", "customer", "vstreamCopyMultiKeyspaceReshard", "-80,80-", "-40,40-", baseTabletID+400, nil, nil, nil, defaultCellName, 1) + reshardDone = true + case 60: + done = true + } + if done { + break + } + } + log.Infof("ne=%v", ne) + + // The number of row events streamed by the VStream API should match the number of rows inserted. + // This is important for sharded tables, where we need to ensure that no row events are missed during the resharding process. + // + // On the other hand, we don't verify the exact number of row events for the unsharded keyspace + // because the keyspace remains unsharded and the number of rows in the customer_seq table is always 1. + // We believe that checking the number of row events for the unsharded keyspace, which should always be greater than 0 before and after resharding, + // is sufficient to confirm that the resharding of one keyspace does not affect another keyspace, while keeping the test straightforward. + customerResult := execVtgateQuery(t, vtgateConn, "sharded", "select count(*) from customer") + insertedCustomerRows, err := evalengine.ToInt64(customerResult.Rows[0][0]) + require.NoError(t, err) + require.Equal(t, insertedCustomerRows, ne.numLessThan80Events+ne.numGreaterThan80Events+ne.numLessThan40Events+ne.numGreaterThan40Events) + return ne +} + func TestVStreamFailover(t *testing.T) { testVStreamWithFailover(t, true) } @@ -408,3 +558,15 @@ func TestVStreamWithKeyspacesToWatch(t *testing.T) { testVStreamWithFailover(t, false) } + +func TestVStreamCopyMultiKeyspaceReshard(t *testing.T) { + ne := testVStreamCopyMultiKeyspaceReshard(t, 3000) + require.Equal(t, int64(0), ne.numJournalEvents) + require.NotZero(t, ne.numRowEvents) + require.NotZero(t, ne.numShard0BeforeReshardEvents) + require.NotZero(t, ne.numShard0AfterReshardEvents) + require.NotZero(t, ne.numLessThan80Events) + require.NotZero(t, ne.numGreaterThan80Events) + require.NotZero(t, ne.numLessThan40Events) + require.NotZero(t, ne.numGreaterThan40Events) +} diff --git a/go/test/endtoend/vtgate/errors_as_warnings/main_test.go b/go/test/endtoend/vtgate/errors_as_warnings/main_test.go index 99d47a21227..97c73f5f458 100644 --- a/go/test/endtoend/vtgate/errors_as_warnings/main_test.go +++ b/go/test/endtoend/vtgate/errors_as_warnings/main_test.go @@ -148,7 +148,7 @@ func TestScatterErrsAsWarns(t *testing.T) { _, err = mode.conn.ExecuteFetch("SELECT /*vt+ PLANNER=Gen4 SCATTER_ERRORS_AS_WARNINGS */ invalid_field from t1;", 1, false) require.Error(t, err) serr := mysql.NewSQLErrorFromError(err).(*mysql.SQLError) - require.Equal(t, 1054, serr.Number(), serr.Error()) + require.Equal(t, mysql.ERBadFieldError, serr.Number(), serr.Error()) }) } } diff --git a/go/test/endtoend/vtgate/grpc_server_auth_static/main_test.go b/go/test/endtoend/vtgate/grpc_server_auth_static/main_test.go index 510f969ce9a..d0cb6d6aa0f 100644 --- a/go/test/endtoend/vtgate/grpc_server_auth_static/main_test.go +++ b/go/test/endtoend/vtgate/grpc_server_auth_static/main_test.go @@ -196,7 +196,7 @@ func TestUnauthenticatedUser(t *testing.T) { func dialVTGate(ctx context.Context, t *testing.T, username string, password string) (*vtgateconn.VTGateConn, error) { clientCreds := &grpcclient.StaticAuthClientCreds{Username: username, Password: password} creds := grpc.WithPerRPCCredentials(clientCreds) - dialerFunc := grpcvtgateconn.DialWithOpts(ctx, creds) + dialerFunc := grpcvtgateconn.Dial(creds) dialerName := t.Name() vtgateconn.RegisterDialer(dialerName, dialerFunc) return vtgateconn.DialProtocol(ctx, dialerName, vtgateGrpcAddress) diff --git a/go/test/endtoend/vtgate/lookup_test.go b/go/test/endtoend/vtgate/lookup_test.go index 3294c1898d6..deb3710cb7d 100644 --- a/go/test/endtoend/vtgate/lookup_test.go +++ b/go/test/endtoend/vtgate/lookup_test.go @@ -129,7 +129,7 @@ func TestConsistentLookup(t *testing.T) { utils.Exec(t, conn, "rollback") require.Error(t, err) mysqlErr := err.(*mysql.SQLError) - assert.Equal(t, 1062, mysqlErr.Num) + assert.Equal(t, mysql.ERDupEntry, mysqlErr.Num) assert.Equal(t, "23000", mysqlErr.State) assert.Contains(t, mysqlErr.Message, "reverted partial DML execution") diff --git a/go/test/endtoend/vtgate/misc_test.go b/go/test/endtoend/vtgate/misc_test.go index e1dd5eabb80..2ceabc11f82 100644 --- a/go/test/endtoend/vtgate/misc_test.go +++ b/go/test/endtoend/vtgate/misc_test.go @@ -695,7 +695,7 @@ func TestDescribeVindex(t *testing.T) { _, err := conn.ExecuteFetch("describe hash", 1000, false) require.Error(t, err) mysqlErr := err.(*mysql.SQLError) - assert.Equal(t, 1146, mysqlErr.Num) + assert.Equal(t, mysql.ERNoSuchTable, mysqlErr.Num) assert.Equal(t, "42S02", mysqlErr.State) assert.Contains(t, mysqlErr.Message, "NotFound desc") } diff --git a/go/test/endtoend/vtgate/queries/aggregation/aggregation_test.go b/go/test/endtoend/vtgate/queries/aggregation/aggregation_test.go index b7ef4c4a78d..f07fb734df8 100644 --- a/go/test/endtoend/vtgate/queries/aggregation/aggregation_test.go +++ b/go/test/endtoend/vtgate/queries/aggregation/aggregation_test.go @@ -425,3 +425,13 @@ func TestScalarAggregate(t *testing.T) { mcmp.Exec("insert into aggr_test(id, val1, val2) values(1,'a',1), (2,'A',1), (3,'b',1), (4,'c',3), (5,'c',4)") mcmp.AssertMatches("select /*vt+ PLANNER=gen4 */ count(distinct val1) from aggr_test", `[[INT64(3)]]`) } + +func TestAggregationRandomOnAnAggregatedValue(t *testing.T) { + mcmp, closer := start(t) + defer closer() + + mcmp.Exec("insert into t10(k, a, b) values (0, 100, 10), (10, 200, 20);") + + mcmp.AssertMatchesNoOrder("select /*vt+ PLANNER=gen4 */ A.a, A.b, (A.a / A.b) as d from (select sum(a) as a, sum(b) as b from t10 where a = 100) A;", + `[[DECIMAL(100) DECIMAL(10) DECIMAL(10.0000)]]`) +} diff --git a/go/test/endtoend/vtgate/queries/aggregation/schema.sql b/go/test/endtoend/vtgate/queries/aggregation/schema.sql index a538a3dafed..0375bdb8499 100644 --- a/go/test/endtoend/vtgate/queries/aggregation/schema.sql +++ b/go/test/endtoend/vtgate/queries/aggregation/schema.sql @@ -71,3 +71,8 @@ CREATE TABLE t2 ( PRIMARY KEY (id) ) ENGINE InnoDB; +CREATE TABLE t10 ( + k BIGINT PRIMARY KEY, + a INT, + b INT +); \ No newline at end of file diff --git a/go/test/endtoend/vtgate/queries/aggregation/vschema.json b/go/test/endtoend/vtgate/queries/aggregation/vschema.json index c2d3f133a35..4d1623d5633 100644 --- a/go/test/endtoend/vtgate/queries/aggregation/vschema.json +++ b/go/test/endtoend/vtgate/queries/aggregation/vschema.json @@ -123,6 +123,14 @@ "name": "hash" } ] + }, + "t10": { + "column_vindexes": [ + { + "column": "k", + "name": "hash" + } + ] } } } \ No newline at end of file diff --git a/go/test/endtoend/vtgate/queries/misc/misc_test.go b/go/test/endtoend/vtgate/queries/misc/misc_test.go index 8115d46a53e..be322667fa0 100644 --- a/go/test/endtoend/vtgate/queries/misc/misc_test.go +++ b/go/test/endtoend/vtgate/queries/misc/misc_test.go @@ -17,10 +17,14 @@ limitations under the License. package misc import ( + "database/sql" "fmt" + "strconv" "strings" "testing" + _ "github.com/go-sql-driver/mysql" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -202,3 +206,44 @@ func TestOuterJoinWithPredicate(t *testing.T) { mcmp.AssertMatchesNoOrder("select A.id1, B.id2 from t1 as A left join t1 as B on A.id1*10 = B.id2 WHERE B.id2 NOT BETWEEN 20 AND 30", `[[INT64(0) INT64(0)] [INT64(1) INT64(10)] [INT64(4) INT64(40)]]`) } + +// This test ensures that we support PREPARE statement with 65530 parameters. +// It opens a MySQL connection using the go-mysql driver and execute a select query +// it then checks the result contains the proper rows and that it's not failing. +func TestHighNumberOfParams(t *testing.T) { + mcmp, closer := start(t) + defer closer() + + mcmp.Exec("insert into t1(id1) values (0), (1), (2), (3), (4)") + + paramCount := 65530 + + // create the value and argument slices used to build the prepare stmt + var vals []any + var params []string + for i := 0; i < paramCount; i++ { + vals = append(vals, strconv.Itoa(i)) + params = append(params, "?") + } + + // connect to the vitess cluster + db, err := sql.Open("mysql", fmt.Sprintf("@tcp(%s:%v)/%s", vtParams.Host, vtParams.Port, vtParams.DbName)) + require.NoError(t, err) + + // run the query + r, err := db.Query(fmt.Sprintf("SELECT /*vt+ QUERY_TIMEOUT_MS=10000 */ id1 FROM t1 WHERE id1 in (%s) ORDER BY id1 ASC", strings.Join(params, ", ")), vals...) + require.NoError(t, err) + + // check the results we got, we should get 5 rows with each: 0, 1, 2, 3, 4 + // count is the row number we are currently visiting, also correspond to the + // column value we expect. + count := 0 + for r.Next() { + j := -1 + err := r.Scan(&j) + require.NoError(t, err) + require.Equal(t, j, count) + count++ + } + require.Equal(t, 5, count) +} diff --git a/go/test/endtoend/vtgate/queries/normalize/normalize_test.go b/go/test/endtoend/vtgate/queries/normalize/normalize_test.go index dd603ad5d1e..4fa4313e76c 100644 --- a/go/test/endtoend/vtgate/queries/normalize/normalize_test.go +++ b/go/test/endtoend/vtgate/queries/normalize/normalize_test.go @@ -39,7 +39,7 @@ func TestNormalizeAllFields(t *testing.T) { defer conn.Close() insertQuery := `insert into t1 values (1, "chars", "variable chars", x'73757265', 0x676F, 0.33, 9.99, 1, "1976-06-08", "small", "b", "{\"key\":\"value\"}", point(1,5), b'011', 0b0101)` - normalizedInsertQuery := `insert into t1 values (:vtg1, :vtg2, :vtg3, :vtg4, :vtg5, :vtg6, :vtg7, :vtg8, :vtg9, :vtg10, :vtg11, :vtg12, point(:vtg13, :vtg14), :vtg15, :vtg16)` + normalizedInsertQuery := `insert into t1 values (:vtg1 /* INT64 */, :vtg2 /* VARCHAR */, :vtg3 /* VARCHAR */, :vtg4 /* HEXVAL */, :vtg5 /* HEXNUM */, :vtg6 /* DECIMAL */, :vtg7 /* DECIMAL */, :vtg8 /* INT64 */, :vtg9 /* VARCHAR */, :vtg10 /* VARCHAR */, :vtg11 /* VARCHAR */, :vtg12 /* VARCHAR */, point(:vtg13 /* INT64 */, :vtg14 /* INT64 */), :vtg15 /* HEXNUM */, :vtg16 /* HEXNUM */)` selectQuery := "select * from t1" utils.Exec(t, conn, insertQuery) qr := utils.Exec(t, conn, selectQuery) @@ -56,7 +56,7 @@ func TestNormalizeAllFields(t *testing.T) { break } } - assert.True(t, found, "correctly normalized record not found in planner cache") + assert.Truef(t, found, "correctly normalized record not found in planner cache %v", results) } func getPlanCache(vtgateHostPort string) ([]map[string]any, error) { diff --git a/go/test/endtoend/vtgate/queries/vexplain/vexplain_test.go b/go/test/endtoend/vtgate/queries/vexplain/vexplain_test.go index f87e60f7ed9..ed43d57b578 100644 --- a/go/test/endtoend/vtgate/queries/vexplain/vexplain_test.go +++ b/go/test/endtoend/vtgate/queries/vexplain/vexplain_test.go @@ -22,10 +22,10 @@ import ( "github.com/stretchr/testify/require" + "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/mysql" - "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/test/endtoend/utils" ) diff --git a/go/test/endtoend/vtgate/schematracker/sharded/st_sharded_test.go b/go/test/endtoend/vtgate/schematracker/sharded/st_sharded_test.go index 42bfbe8216d..5bcd319b6d5 100644 --- a/go/test/endtoend/vtgate/schematracker/sharded/st_sharded_test.go +++ b/go/test/endtoend/vtgate/schematracker/sharded/st_sharded_test.go @@ -186,7 +186,7 @@ func TestInitAndUpdate(t *testing.T) { require.NoError(t, err) defer conn.Close() - vtgateVersion, err := 17, nil // cluster.GetMajorVersion("vtgate") -- backported to private, can be cleaned up to match upstream once rebased on 17 + vtgateVersion, err := cluster.GetMajorVersion("vtgate") require.NoError(t, err) expected := `[[VARCHAR("dual")] [VARCHAR("t2")] [VARCHAR("t2_id4_idx")] [VARCHAR("t8")]]` @@ -249,7 +249,7 @@ func TestDMLOnNewTable(t *testing.T) { // create a new table which is not part of the VSchema utils.Exec(t, conn, `create table new_table_tracked(id bigint, name varchar(100), primary key(id)) Engine=InnoDB`) - vtgateVersion, err := 17, nil // cluster.GetMajorVersion("vtgate") -- backported to private, can be cleaned up to match upstream once rebased on 17 + vtgateVersion, err := cluster.GetMajorVersion("vtgate") require.NoError(t, err) expected := `[[VARCHAR("dual")] [VARCHAR("new_table_tracked")] [VARCHAR("t2")] [VARCHAR("t2_id4_idx")] [VARCHAR("t8")]]` if vtgateVersion >= 17 { diff --git a/go/test/endtoend/vtgate/schematracker/unsharded/st_unsharded_test.go b/go/test/endtoend/vtgate/schematracker/unsharded/st_unsharded_test.go index 36b590256f3..720ab124c12 100644 --- a/go/test/endtoend/vtgate/schematracker/unsharded/st_unsharded_test.go +++ b/go/test/endtoend/vtgate/schematracker/unsharded/st_unsharded_test.go @@ -120,7 +120,7 @@ func TestNewUnshardedTable(t *testing.T) { require.NoError(t, err) defer conn.Close() - vtgateVersion, err := 17, nil // cluster.GetMajorVersion("vtgate") -- backported to private, can be cleaned up to match upstream once rebased on 17 + vtgateVersion, err := cluster.GetMajorVersion("vtgate") require.NoError(t, err) expected := `[[VARCHAR("dual")] [VARCHAR("main")]]` if vtgateVersion >= 17 { diff --git a/go/test/endtoend/vtgate/sequence/seq_test.go b/go/test/endtoend/vtgate/sequence/seq_test.go index e655b7d7034..f9583a4083b 100644 --- a/go/test/endtoend/vtgate/sequence/seq_test.go +++ b/go/test/endtoend/vtgate/sequence/seq_test.go @@ -290,7 +290,7 @@ func TestDotTableSeq(t *testing.T) { _, err = conn.ExecuteFetch("insert into `dotted.tablename` (c1,c2) values (10,10)", 1000, true) require.Error(t, err) mysqlErr := err.(*mysql.SQLError) - assert.Equal(t, 1062, mysqlErr.Num) + assert.Equal(t, mysql.ERDupEntry, mysqlErr.Num) assert.Equal(t, "23000", mysqlErr.State) assert.Contains(t, mysqlErr.Message, "Duplicate entry") } diff --git a/go/test/endtoend/vtgate/tablet_healthcheck_cache/correctness_test.go b/go/test/endtoend/vtgate/tablet_healthcheck_cache/correctness_test.go index 386ef325996..928cb2d1c6a 100644 --- a/go/test/endtoend/vtgate/tablet_healthcheck_cache/correctness_test.go +++ b/go/test/endtoend/vtgate/tablet_healthcheck_cache/correctness_test.go @@ -183,7 +183,9 @@ func addTablet(t *testing.T, tabletUID int, tabletType string) *cluster.Vttablet Alias: fmt.Sprintf("%s-%010d", cell, tabletUID), } // Start Mysqlctl process - tablet.MysqlctlProcess = *cluster.MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory, !clusterInstance.ReusingVTDATAROOT) + mysqlctlProcess, err := cluster.MysqlCtlProcessInstanceOptionalInit(tablet.TabletUID, tablet.MySQLPort, clusterInstance.TmpDirectory, !clusterInstance.ReusingVTDATAROOT) + require.Nil(t, err) + tablet.MysqlctlProcess = *mysqlctlProcess proc, err := tablet.MysqlctlProcess.StartProcess() require.Nil(t, err) diff --git a/go/test/endtoend/vtgate/vschema/vschema_test.go b/go/test/endtoend/vtgate/vschema/vschema_test.go index 1ad48da9b73..92863ff7dc8 100644 --- a/go/test/endtoend/vtgate/vschema/vschema_test.go +++ b/go/test/endtoend/vtgate/vschema/vschema_test.go @@ -111,7 +111,7 @@ func TestVSchema(t *testing.T) { utils.AssertMatches(t, conn, "delete from vt_user", `[]`) - vtgateVersion, err := 17, nil // cluster.GetMajorVersion("vtgate") -- backported to private, can be cleaned up to match upstream once rebased on 17 + vtgateVersion, err := cluster.GetMajorVersion("vtgate") require.NoError(t, err) // Test empty vschema diff --git a/go/test/endtoend/vtorc/readtopologyinstance/main_test.go b/go/test/endtoend/vtorc/readtopologyinstance/main_test.go index af05dbadc54..fe8b53f5103 100644 --- a/go/test/endtoend/vtorc/readtopologyinstance/main_test.go +++ b/go/test/endtoend/vtorc/readtopologyinstance/main_test.go @@ -27,6 +27,7 @@ import ( "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtorc/config" "vitess.io/vitess/go/vt/vtorc/inst" + "vitess.io/vitess/go/vt/vtorc/logic" "vitess.io/vitess/go/vt/vtorc/server" _ "github.com/go-sql-driver/mysql" @@ -88,7 +89,7 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.Equal(t, "ON", primaryInstance.GTIDMode) assert.Equal(t, "FULL", primaryInstance.BinlogRowImage) assert.Contains(t, primaryInstance.SelfBinlogCoordinates.LogFile, fmt.Sprintf("vt-0000000%d-bin", primary.TabletUID)) - assert.Greater(t, primaryInstance.SelfBinlogCoordinates.LogPos, int64(0)) + assert.Greater(t, primaryInstance.SelfBinlogCoordinates.LogPos, uint32(0)) assert.True(t, primaryInstance.SemiSyncPrimaryEnabled) assert.True(t, primaryInstance.SemiSyncReplicaEnabled) assert.True(t, primaryInstance.SemiSyncPrimaryStatus) @@ -104,8 +105,19 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.Equal(t, primaryInstance.ReplicationIOThreadState, inst.ReplicationThreadStateNoThread) assert.Equal(t, primaryInstance.ReplicationSQLThreadState, inst.ReplicationThreadStateNoThread) - // insert an errant GTID in the replica - _, err = utils.RunSQL(t, "insert into vt_insert_test(id, msg) values (10173, 'test 178342')", replica, "vt_ks") + // Insert an errant GTID in the replica. + // The way to do this is to disable global recoveries, stop replication and inject an errant GTID. + // After this we restart the replication and enable the recoveries again. + err = logic.DisableRecovery() + require.NoError(t, err) + err = utils.RunSQLs(t, []string{`STOP SLAVE;`, + `SET GTID_NEXT="12345678-1234-1234-1234-123456789012:1";`, + `BEGIN;`, `COMMIT;`, + `SET GTID_NEXT="AUTOMATIC";`, + `START SLAVE;`, + }, replica, "") + require.NoError(t, err) + err = logic.EnableRecovery() require.NoError(t, err) replicaInstance, err := inst.ReadTopologyInstanceBufferable(&inst.InstanceKey{ @@ -126,7 +138,7 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.Equal(t, "ON", replicaInstance.GTIDMode) assert.Equal(t, "FULL", replicaInstance.BinlogRowImage) assert.Contains(t, replicaInstance.SelfBinlogCoordinates.LogFile, fmt.Sprintf("vt-0000000%d-bin", replica.TabletUID)) - assert.Greater(t, replicaInstance.SelfBinlogCoordinates.LogPos, int64(0)) + assert.Greater(t, replicaInstance.SelfBinlogCoordinates.LogPos, uint32(0)) assert.False(t, replicaInstance.SemiSyncPrimaryEnabled) assert.True(t, replicaInstance.SemiSyncReplicaEnabled) assert.False(t, replicaInstance.SemiSyncPrimaryStatus) @@ -144,11 +156,11 @@ func TestReadTopologyInstanceBufferable(t *testing.T) { assert.True(t, replicaInstance.ReplicationIOThreadRuning) assert.True(t, replicaInstance.ReplicationSQLThreadRuning) assert.Equal(t, replicaInstance.ReadBinlogCoordinates.LogFile, primaryInstance.SelfBinlogCoordinates.LogFile) - assert.Greater(t, replicaInstance.ReadBinlogCoordinates.LogPos, int64(0)) + assert.Greater(t, replicaInstance.ReadBinlogCoordinates.LogPos, uint32(0)) assert.Equal(t, replicaInstance.ExecBinlogCoordinates.LogFile, primaryInstance.SelfBinlogCoordinates.LogFile) assert.LessOrEqual(t, replicaInstance.ExecBinlogCoordinates.LogPos, replicaInstance.ReadBinlogCoordinates.LogPos) assert.Contains(t, replicaInstance.RelaylogCoordinates.LogFile, fmt.Sprintf("vt-0000000%d-relay", replica.TabletUID)) - assert.Greater(t, replicaInstance.RelaylogCoordinates.LogPos, int64(0)) + assert.Greater(t, replicaInstance.RelaylogCoordinates.LogPos, uint32(0)) assert.Empty(t, replicaInstance.LastIOError) assert.Empty(t, replicaInstance.LastSQLError) assert.EqualValues(t, 0, replicaInstance.SQLDelay) diff --git a/go/test/endtoend/vtorc/utils/utils.go b/go/test/endtoend/vtorc/utils/utils.go index d4f23c0de70..fc118ef3ac5 100644 --- a/go/test/endtoend/vtorc/utils/utils.go +++ b/go/test/endtoend/vtorc/utils/utils.go @@ -316,7 +316,7 @@ func SetupVttabletsAndVTOrcs(t *testing.T, clusterInfo *VTOrcClusterInfo, numRep // cleanAndStartVttablet cleans the MySQL instance underneath for running a new test. It also starts the vttablet. func cleanAndStartVttablet(t *testing.T, clusterInfo *VTOrcClusterInfo, vttablet *cluster.Vttablet) { t.Helper() - // set super-read-only to false + // set super_read_only to false _, err := RunSQL(t, "SET GLOBAL super_read_only = OFF", vttablet, "") require.NoError(t, err) // remove the databases if they exist @@ -585,6 +585,26 @@ func RunSQL(t *testing.T, sql string, tablet *cluster.Vttablet, db string) (*sql return execute(t, conn, sql) } +// RunSQLs is used to run a list of SQL statements on the given tablet +func RunSQLs(t *testing.T, sqls []string, tablet *cluster.Vttablet, db string) error { + // Get Connection + tabletParams := getMysqlConnParam(tablet, db) + var timeoutDuration = time.Duration(5 * len(sqls)) + ctx, cancel := context.WithTimeout(context.Background(), timeoutDuration*time.Second) + defer cancel() + conn, err := mysql.Connect(ctx, &tabletParams) + require.Nil(t, err) + defer conn.Close() + + // Run SQLs + for _, sql := range sqls { + if _, err := execute(t, conn, sql); err != nil { + return err + } + } + return nil +} + func execute(t *testing.T, conn *mysql.Conn, query string) (*sqltypes.Result, error) { t.Helper() return conn.ExecuteFetch(query, 1000, true) diff --git a/go/test/go-mysql-server/internal/sqlparser/Makefile b/go/test/go-mysql-server/internal/sqlparser/Makefile index 1ca0af6755e..965ecd6b098 100644 --- a/go/test/go-mysql-server/internal/sqlparser/Makefile +++ b/go/test/go-mysql-server/internal/sqlparser/Makefile @@ -1,5 +1,10 @@ +<<<<<<<< HEAD:go/test/go-mysql-server/internal/sqlparser/Makefile # Copyright 2019 The Vitess Authors. # +======== +# Copyright 2023 The Vitess Authors. +# +>>>>>>>> vitess/main:docker/base/Dockerfile.mysql57 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -12,11 +17,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -MAKEFLAGS = -s +ARG bootstrap_version=15 +ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" +<<<<<<<< HEAD:go/test/go-mysql-server/internal/sqlparser/Makefile sql.go: sql.y go run golang.org/x/tools/cmd/goyacc -o sql.go sql.y gofmt -w sql.go +======== +FROM "${image}" +>>>>>>>> vitess/main:docker/base/Dockerfile.mysql57 -clean: - rm -f y.output sql.go +# Allows some docker builds to disable CGO +ARG CGO_ENABLED=0 + +# Allows docker builds to set the BUILD_NUMBER +ARG BUILD_NUMBER + +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + +# Re-copy sources from working tree +COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess + +USER vitess + +# Build Vitess +RUN make build diff --git a/go/test/go-mysql-server/internal/sqlparser/redact_query_test.go b/go/test/go-mysql-server/internal/sqlparser/redact_query_test.go index 1921b52e5f1..cf4f6bf8ad6 100644 --- a/go/test/go-mysql-server/internal/sqlparser/redact_query_test.go +++ b/go/test/go-mysql-server/internal/sqlparser/redact_query_test.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Vitess Authors. +Copyright 2022 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/go/test/go-mysql-server/sql/errors.go b/go/test/go-mysql-server/sql/errors.go index ab7b6b4d2ec..1876439af00 100644 --- a/go/test/go-mysql-server/sql/errors.go +++ b/go/test/go-mysql-server/sql/errors.go @@ -19,6 +19,7 @@ import ( "strings" "gopkg.in/src-d/go-errors.v1" + "vitess.io/vitess/go/mysql" ) @@ -665,7 +666,7 @@ func CastSQLError(err error) *mysql.SQLError { return mysqlErr } - var code int + var code mysql.ErrorCode var sqlState string = "" if w, ok := err.(WrappedInsertError); ok { diff --git a/go/test/go-mysql-server/sql/errors_test.go b/go/test/go-mysql-server/sql/errors_test.go index d96ff5e1f79..a5e40d44af5 100644 --- a/go/test/go-mysql-server/sql/errors_test.go +++ b/go/test/go-mysql-server/sql/errors_test.go @@ -14,7 +14,7 @@ func TestSQLErrorCast(t *testing.T) { tests := []struct { err error - code int + code mysql.ErrorCode }{ {ErrTableNotFound.New("table not found err"), mysql.ERNoSuchTable}, {ErrInvalidType.New("unhandled mysql error"), mysql.ERUnknownError}, diff --git a/go/test/go-mysql-server/sql/expression/function/date_test.go b/go/test/go-mysql-server/sql/expression/function/date_test.go index c0106baf4b2..f84dce61161 100644 --- a/go/test/go-mysql-server/sql/expression/function/date_test.go +++ b/go/test/go-mysql-server/sql/expression/function/date_test.go @@ -17,6 +17,7 @@ package function import ( "testing" "time" + "vitess.io/vitess/go/mysql" "github.com/stretchr/testify/require" @@ -159,7 +160,7 @@ func TestUnixTimestamp(t *testing.T) { require.Equal(0, result) require.Equal(uint16(1), ctx.WarningCount()) require.Equal("Incorrect datetime value: 1577995200", ctx.Warnings()[0].Message) - require.Equal(1292, ctx.Warnings()[0].Code) + require.Equal(mysql.ErrorCode(1292), ctx.Warnings()[0].Code) // When MySQL can't convert the expression to a date, it always returns 0 and sets a warning ctx.ClearWarnings() @@ -173,7 +174,7 @@ func TestUnixTimestamp(t *testing.T) { require.Equal(0, result) require.Equal(uint16(1), ctx.WarningCount()) require.Equal("Incorrect datetime value: 'd0lthub'", ctx.Warnings()[0].Message) - require.Equal(1292, ctx.Warnings()[0].Code) + require.Equal(mysql.ErrorCode(1292), ctx.Warnings()[0].Code) } func TestFromUnixtime(t *testing.T) { diff --git a/go/test/go-mysql-server/sql/plan/showwarnings_test.go b/go/test/go-mysql-server/sql/plan/showwarnings_test.go index 08da40f5eee..e1fa80a2cad 100644 --- a/go/test/go-mysql-server/sql/plan/showwarnings_test.go +++ b/go/test/go-mysql-server/sql/plan/showwarnings_test.go @@ -17,6 +17,7 @@ package plan import ( "io" "testing" + "vitess.io/vitess/go/mysql" "github.com/stretchr/testify/require" @@ -27,9 +28,9 @@ func TestShowWarnings(t *testing.T) { require := require.New(t) ctx := sql.NewEmptyContext() - ctx.Session.Warn(&sql.Warning{Level: "l1", Message: "w1", Code: 1}) - ctx.Session.Warn(&sql.Warning{Level: "l2", Message: "w2", Code: 2}) - ctx.Session.Warn(&sql.Warning{Level: "l4", Message: "w3", Code: 3}) + ctx.Session.Warn(&sql.Warning{Level: "l1", Message: "w1", Code: mysql.ErrorCode(1)}) + ctx.Session.Warn(&sql.Warning{Level: "l2", Message: "w2", Code: mysql.ErrorCode(2)}) + ctx.Session.Warn(&sql.Warning{Level: "l4", Message: "w3", Code: mysql.ErrorCode(3)}) sw := ShowWarnings(ctx.Session.Warnings()) require.True(sw.Resolved()) @@ -37,10 +38,10 @@ func TestShowWarnings(t *testing.T) { it, err := sw.RowIter(ctx, nil) require.NoError(err) - n := 3 + n := mysql.ErrorCode(3) for row, err := it.Next(ctx); err == nil; row, err = it.Next(ctx) { level := row[0].(string) - code := row[1].(int) + code := row[1].(mysql.ErrorCode) message := row[2].(string) t.Logf("level: %s\tcode: %v\tmessage: %s\n", level, code, message) diff --git a/go/test/go-mysql-server/sql/plan/signal.go b/go/test/go-mysql-server/sql/plan/signal.go index 1aa4ba17982..aee05197438 100644 --- a/go/test/go-mysql-server/sql/plan/signal.go +++ b/go/test/go-mysql-server/sql/plan/signal.go @@ -171,7 +171,7 @@ func (s *Signal) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error) { return nil, fmt.Errorf("warnings not yet implemented") } else { return nil, mysql.NewSQLError( - int(s.Info[SignalConditionItemName_MysqlErrno].IntValue), + mysql.ErrorCode(s.Info[SignalConditionItemName_MysqlErrno].IntValue), s.SqlStateValue, s.Info[SignalConditionItemName_MessageText].StrValue, ) diff --git a/go/test/go-mysql-server/sql/session.go b/go/test/go-mysql-server/sql/session.go index 5ec91aeefc0..43b31374288 100644 --- a/go/test/go-mysql-server/sql/session.go +++ b/go/test/go-mysql-server/sql/session.go @@ -27,6 +27,8 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" "golang.org/x/sync/errgroup" + + "vitess.io/vitess/go/mysql" ) type key uint @@ -496,7 +498,7 @@ type ( Warning struct { Level string Message string - Code int + Code mysql.ErrorCode } ) @@ -792,7 +794,7 @@ func (c *Context) RootSpan() trace.Span { } // Error adds an error as warning to the session. -func (c *Context) Error(code int, msg string, args ...interface{}) { +func (c *Context) Error(code mysql.ErrorCode, msg string, args ...interface{}) { c.Session.Warn(&Warning{ Level: "Error", Code: code, @@ -801,7 +803,7 @@ func (c *Context) Error(code int, msg string, args ...interface{}) { } // Warn adds a warning to the session. -func (c *Context) Warn(code int, msg string, args ...interface{}) { +func (c *Context) Warn(code mysql.ErrorCode, msg string, args ...interface{}) { c.Session.Warn(&Warning{ Level: "Warning", Code: code, diff --git a/go/test/go-mysql-server/sql/session_test.go b/go/test/go-mysql-server/sql/session_test.go index 28f8743b214..d1fe54745f4 100644 --- a/go/test/go-mysql-server/sql/session_test.go +++ b/go/test/go-mysql-server/sql/session_test.go @@ -18,6 +18,7 @@ import ( "context" "io" "testing" + "vitess.io/vitess/go/mysql" "github.com/stretchr/testify/require" ) @@ -42,15 +43,15 @@ func TestSessionConfig(t *testing.T) { require.Equal(uint16(0), sess.WarningCount()) - sess.Warn(&Warning{Code: 1}) - sess.Warn(&Warning{Code: 2}) - sess.Warn(&Warning{Code: 3}) + sess.Warn(&Warning{Code: mysql.ErrorCode(1)}) + sess.Warn(&Warning{Code: mysql.ErrorCode(2)}) + sess.Warn(&Warning{Code: mysql.ErrorCode(3)}) require.Equal(uint16(3), sess.WarningCount()) - require.Equal(3, sess.Warnings()[0].Code) - require.Equal(2, sess.Warnings()[1].Code) - require.Equal(1, sess.Warnings()[2].Code) + require.Equal(mysql.ErrorCode(3), sess.Warnings()[0].Code) + require.Equal(mysql.ErrorCode(2), sess.Warnings()[1].Code) + require.Equal(mysql.ErrorCode(1), sess.Warnings()[2].Code) } func TestHasDefaultValue(t *testing.T) { diff --git a/go/textutil/strings.go b/go/textutil/strings.go index b4ce5319eab..bd5dd6ff7f4 100644 --- a/go/textutil/strings.go +++ b/go/textutil/strings.go @@ -20,10 +20,16 @@ import ( "net/url" "regexp" "strings" + + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/binlogdata" ) var ( - delimitedListRegexp = regexp.MustCompile(`[ ,;]+`) + delimitedListRegexp = regexp.MustCompile(`[ ,;]+`) + SimulatedNullString = sqltypes.NULL.String() + SimulatedNullStringSlice = []string{sqltypes.NULL.String()} + SimulatedNullInt = -1 ) // SplitDelimitedList splits a given string by comma, semi-colon or space, and returns non-empty strings @@ -73,3 +79,27 @@ func SingleWordCamel(w string) string { } return strings.ToUpper(w[0:1]) + strings.ToLower(w[1:]) } + +// ValueIsSimulatedNull returns true if the value represents +// a NULL or unknown/unspecified value. This is used to +// distinguish between a zero value / default and a user +// provided value that is equivalent (e.g. an empty string +// or slice). +func ValueIsSimulatedNull(val any) bool { + switch cval := val.(type) { + case string: + return cval == SimulatedNullString + case []string: + return len(cval) == 1 && cval[0] == sqltypes.NULL.String() + case binlogdata.OnDDLAction: + return int32(cval) == int32(SimulatedNullInt) + case int: + return cval == SimulatedNullInt + case int32: + return int32(cval) == int32(SimulatedNullInt) + case int64: + return int64(cval) == int64(SimulatedNullInt) + default: + return false + } +} diff --git a/go/tools/asthelpergen/equals_gen.go b/go/tools/asthelpergen/equals_gen.go index dcdf6a490be..e00c3ef596a 100644 --- a/go/tools/asthelpergen/equals_gen.go +++ b/go/tools/asthelpergen/equals_gen.go @@ -78,7 +78,7 @@ func (e *equalsGen) genFile() (string, *jen.File) { func (e *equalsGen) interfaceMethod(t types.Type, iface *types.Interface, spi generatorSPI) error { /* - func (cmp *Comparator) AST(inA, inB AST, f ASTComparison) bool { + func (cmp *Comparator) AST(inA, inB AST) bool { if inA == inB { return true } @@ -91,7 +91,7 @@ func (e *equalsGen) interfaceMethod(t types.Type, iface *types.Interface, spi ge if !ok { return false } - return cmp.SubImpl(a, b, f) + return cmp.SubImpl(a, b) } return false } diff --git a/go/tools/codegen/common.go b/go/tools/codegen/common.go index 86b188eb67e..a4732474cb7 100644 --- a/go/tools/codegen/common.go +++ b/go/tools/codegen/common.go @@ -28,10 +28,13 @@ func CheckErrors(loaded []*packages.Package, skip func(fileName string) bool) er var errors []string for _, l := range loaded { for _, e := range l.Errors { - idx := strings.Index(e.Pos, ":") - filePath := e.Pos[:idx] - _, fileName := path.Split(filePath) - if !skip(fileName) { + if idx := strings.Index(e.Pos, ":"); idx >= 0 { + filePath := e.Pos[:idx] + _, fileName := path.Split(filePath) + if !skip(fileName) { + errors = append(errors, e.Error()) + } + } else { errors = append(errors, e.Error()) } } diff --git a/go/tools/go-upgrade/go-upgrade.go b/go/tools/go-upgrade/go-upgrade.go new file mode 100644 index 00000000000..ef323bd1149 --- /dev/null +++ b/go/tools/go-upgrade/go-upgrade.go @@ -0,0 +1,504 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + "io" + "log" + "net/http" + "os" + "path" + "regexp" + "strconv" + "strings" + "time" + + "encoding/json" + + "github.com/hashicorp/go-version" + "github.com/spf13/cobra" +) + +const ( + goDevAPI = "https://go.dev/dl/?mode=json" +) + +type latestGolangRelease struct { + Version string `json:"version"` + Stable bool `json:"stable"` +} + +var ( + workflowUpdate = true + allowMajorUpgrade = false + isMainBranch = false + goTo = "" + + rootCmd = &cobra.Command{ + Use: "go-upgrade", + Short: "Automates the Golang upgrade.", + Long: `go-upgrade allows us to automate some tasks required to bump the version of Golang used throughout our codebase. + +It mostly used by the update_golang_version.yml CI workflow that runs on a CRON. + +This tool is meant to be run at the root of the repository. +`, + Run: func(cmd *cobra.Command, args []string) { + _ = cmd.Help() + }, + Args: cobra.NoArgs, + } + + getCmd = &cobra.Command{ + Use: "get", + Short: "Command to get useful information about the codebase.", + Long: "Command to get useful information about the codebase.", + Run: func(cmd *cobra.Command, args []string) { + _ = cmd.Help() + }, + Args: cobra.NoArgs, + } + + getGoCmd = &cobra.Command{ + Use: "go-version", + Short: "go-version prints the Golang version used by the current codebase.", + Long: "go-version prints the Golang version used by the current codebase.", + Run: runGetGoCmd, + Args: cobra.NoArgs, + } + + getBootstrapCmd = &cobra.Command{ + Use: "bootstrap-version", + Short: "bootstrap-version prints the Docker Bootstrap version used by the current codebase.", + Long: "bootstrap-version prints the Docker Bootstrap version used by the current codebase.", + Run: runGetBootstrapCmd, + Args: cobra.NoArgs, + } + + upgradeCmd = &cobra.Command{ + Use: "upgrade", + Short: "upgrade will upgrade the Golang and Bootstrap versions of the codebase to the latest available version.", + Long: `This command bumps the Golang and Bootstrap versions of the codebase. + +The latest available version of Golang will be fetched and used instead of the old version. + +By default, we do not allow major Golang version upgrade such as 1.20 to 1.21 but this can be overridden using the +--allow-major-upgrade CLI flag. Usually, we only allow such upgrade on the main branch of the repository. + +In CI, particularly, we do not want to modify the workflow files before automatically creating a Pull Request to +avoid permission issues. The rewrite of workflow files can be disabled using the --workflow-update=false CLI flag. + +Moreover, this command automatically bumps the bootstrap version of our codebase. If we are on the main branch, we +want to use the CLI flag --main to remember to increment the bootstrap version by 1 instead of 0.1.`, + Run: runUpgradeCmd, + Args: cobra.NoArgs, + } + + upgradeWorkflowsCmd = &cobra.Command{ + Use: "workflows", + Short: "workflows will upgrade the Golang version used in our CI workflows files.", + Long: "This step is omitted by the bot since. We let the maintainers of Vitess manually upgrade the version used by the workflows using this command.", + Run: runUpgradeWorkflowsCmd, + Args: cobra.NoArgs, + } +) + +func init() { + rootCmd.AddCommand(getCmd) + rootCmd.AddCommand(upgradeCmd) + + getCmd.AddCommand(getGoCmd) + getCmd.AddCommand(getBootstrapCmd) + + upgradeCmd.AddCommand(upgradeWorkflowsCmd) + + upgradeCmd.Flags().BoolVar(&workflowUpdate, "workflow-update", workflowUpdate, "Whether or not the workflow files should be updated. Useful when using this script to auto-create PRs.") + upgradeCmd.Flags().BoolVar(&allowMajorUpgrade, "allow-major-upgrade", allowMajorUpgrade, "Defines if Golang major version upgrade are allowed.") + upgradeCmd.Flags().BoolVar(&isMainBranch, "main", isMainBranch, "Defines if the current branch is the main branch.") + + upgradeWorkflowsCmd.Flags().StringVar(&goTo, "go-to", goTo, "The Golang version we want to upgrade to.") +} + +func main() { + cobra.CheckErr(rootCmd.Execute()) +} + +func runGetGoCmd(_ *cobra.Command, _ []string) { + currentVersion, err := currentGolangVersion() + if err != nil { + log.Fatal(err) + } + fmt.Println(currentVersion.String()) +} + +func runGetBootstrapCmd(_ *cobra.Command, _ []string) { + currentVersion, err := currentBootstrapVersion() + if err != nil { + log.Fatal(err) + } + fmt.Println(currentVersion) +} + +func runUpgradeWorkflowsCmd(_ *cobra.Command, _ []string) { + err := updateWorkflowFilesOnly(goTo) + if err != nil { + log.Fatal(err) + } +} + +func runUpgradeCmd(_ *cobra.Command, _ []string) { + err := upgradePath(allowMajorUpgrade, workflowUpdate, isMainBranch) + if err != nil { + log.Fatal(err) + } +} + +func updateWorkflowFilesOnly(goTo string) error { + newV, err := version.NewVersion(goTo) + if err != nil { + return err + } + filesToChange, err := getListOfFilesInPaths([]string{"./.github/workflows"}) + if err != nil { + return err + } + + for _, fileToChange := range filesToChange { + err = replaceInFile( + []*regexp.Regexp{regexp.MustCompile(`(?i).*go-version:[[:space:]]*([0-9.]+).*`)}, + []string{"go-version: " + newV.String()}, + fileToChange, + ) + if err != nil { + return err + } + } + return nil +} + +func upgradePath(allowMajorUpgrade, workflowUpdate, isMainBranch bool) error { + currentVersion, err := currentGolangVersion() + if err != nil { + return err + } + + availableVersions, err := getLatestStableGolangReleases() + if err != nil { + return err + } + + upgradeTo := chooseNewVersion(currentVersion, availableVersions, allowMajorUpgrade) + if upgradeTo == nil { + return nil + } + + err = replaceGoVersionInCodebase(currentVersion, upgradeTo, workflowUpdate) + if err != nil { + return err + } + + currentBootstrapVersionF, err := currentBootstrapVersion() + if err != nil { + return err + } + nextBootstrapVersionF := currentBootstrapVersionF + if isMainBranch { + nextBootstrapVersionF += 1 + } else { + nextBootstrapVersionF += 0.1 + } + err = updateBootstrapVersionInCodebase(currentBootstrapVersionF, nextBootstrapVersionF, upgradeTo) + if err != nil { + return err + } + return nil +} + +// currentGolangVersion gets the running version of Golang in Vitess +// and returns it as a *version.Version. +// +// The file `./build.env` describes which version of Golang is expected by Vitess. +// We use this file to detect the current Golang version of our codebase. +// The file contains `goversion_min x.xx.xx`, we will grep `goversion_min` to finally find +// the precise golang version we're using. +func currentGolangVersion() (*version.Version, error) { + contentRaw, err := os.ReadFile("build.env") + if err != nil { + return nil, err + } + content := string(contentRaw) + + versre := regexp.MustCompile("(?i).*goversion_min[[:space:]]*([0-9.]+).*") + versionStr := versre.FindStringSubmatch(content) + if len(versionStr) != 2 { + return nil, fmt.Errorf("malformatted error, got: %v", versionStr) + } + return version.NewVersion(versionStr[1]) +} + +func currentBootstrapVersion() (float64, error) { + contentRaw, err := os.ReadFile("Makefile") + if err != nil { + return 0, err + } + content := string(contentRaw) + + versre := regexp.MustCompile("(?i).*BOOTSTRAP_VERSION[[:space:]]*=[[:space:]]*([0-9.]+).*") + versionStr := versre.FindStringSubmatch(content) + if len(versionStr) != 2 { + return 0, fmt.Errorf("malformatted error, got: %v", versionStr) + } + f, err := strconv.ParseFloat(versionStr[1], 64) + if err != nil { + return 0, err + } + return f, nil +} + +// getLatestStableGolangReleases fetches the latest stable releases of Golang from +// the official website using the goDevAPI URL. +// Once fetched, the releases are returned as version.Collection. +func getLatestStableGolangReleases() (version.Collection, error) { + resp, err := http.Get(goDevAPI) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + var latestGoReleases []latestGolangRelease + err = json.Unmarshal(body, &latestGoReleases) + if err != nil { + return nil, err + } + + var versions version.Collection + for _, release := range latestGoReleases { + if !release.Stable { + continue + } + if !strings.HasPrefix(release.Version, "go") { + return nil, fmt.Errorf("golang version malformatted: %s", release.Version) + } + newVersion, err := version.NewVersion(release.Version[2:]) + if err != nil { + return nil, err + } + versions = append(versions, newVersion) + } + return versions, nil +} + +// chooseNewVersion decides what will be the next version we're going to use in our codebase. +// Given the current Golang version, the available latest versions and whether we allow major upgrade or not, +// chooseNewVersion will return either the new version or nil if we cannot/don't need to upgrade. +func chooseNewVersion(curVersion *version.Version, latestVersions version.Collection, allowMajorUpgrade bool) *version.Version { + selectedVersion := curVersion + for _, latestVersion := range latestVersions { + if !allowMajorUpgrade && !isSameMajorMinorVersion(latestVersion, selectedVersion) { + continue + } + if latestVersion.GreaterThan(selectedVersion) { + selectedVersion = latestVersion + } + } + // No change detected, return nil meaning that we do not want to have a new Golang version. + if selectedVersion.Equal(curVersion) { + return nil + } + return selectedVersion +} + +// replaceGoVersionInCodebase goes through all the files in the codebase where the +// Golang version must be updated +func replaceGoVersionInCodebase(old, new *version.Version, workflowUpdate bool) error { + if old.Equal(new) { + return nil + } + explore := []string{ + "./test/templates", + "./build.env", + "./docker/bootstrap/Dockerfile.common", + } + if workflowUpdate { + explore = append(explore, "./.github/workflows") + } + filesToChange, err := getListOfFilesInPaths(explore) + if err != nil { + return err + } + + for _, fileToChange := range filesToChange { + err = replaceInFile( + []*regexp.Regexp{regexp.MustCompile(fmt.Sprintf(`(%s)`, old.String()))}, + []string{new.String()}, + fileToChange, + ) + if err != nil { + return err + } + } + + if !isSameMajorMinorVersion(old, new) { + err = replaceInFile( + []*regexp.Regexp{regexp.MustCompile(`go[[:space:]]*([0-9.]+)`)}, + []string{fmt.Sprintf("go %d.%d", new.Segments()[0], new.Segments()[1])}, + "./go.mod", + ) + if err != nil { + return err + } + } + return nil +} + +func updateBootstrapVersionInCodebase(old, new float64, newGoVersion *version.Version) error { + if old == new { + return nil + } + files, err := getListOfFilesInPaths([]string{ + "./docker/base", + "./docker/lite", + "./docker/local", + "./docker/vttestserver", + "./Makefile", + "./test/templates", + }) + if err != nil { + return err + } + + for _, file := range files { + err = replaceInFile( + []*regexp.Regexp{ + regexp.MustCompile(`(?i)ARG[[:space:]]*bootstrap_version[[:space:]]*=[[:space:]]*[0-9.]+`), // Dockerfile + regexp.MustCompile(`(?i)BOOTSTRAP_VERSION[[:space:]]*=[[:space:]]*[0-9.]+`), // Makefile + }, + []string{ + fmt.Sprintf("ARG bootstrap_version=%-1g", new), // Dockerfile + fmt.Sprintf("BOOTSTRAP_VERSION=%-1g", new), // Makefile + }, + file, + ) + if err != nil { + return err + } + } + + err = replaceInFile( + []*regexp.Regexp{regexp.MustCompile(`(?i)\"bootstrap-version\",[[:space:]]*\"([0-9.]+)\"`)}, + []string{fmt.Sprintf("\"bootstrap-version\", \"%-1g\"", new)}, + "./test.go", + ) + if err != nil { + return err + } + + err = updateBootstrapChangelog(new, newGoVersion) + if err != nil { + return err + } + + return nil +} + +func updateBootstrapChangelog(new float64, goVersion *version.Version) error { + file, err := os.OpenFile("./docker/bootstrap/CHANGELOG.md", os.O_RDWR, 0600) + if err != nil { + return err + } + defer file.Close() + + s, err := file.Stat() + if err != nil { + return err + } + newContent := fmt.Sprintf(` + +## [%-1g] - %s +### Changes +- Update build to golang %s`, new, time.Now().Format(time.DateOnly), goVersion.String()) + + _, err = file.WriteAt([]byte(newContent), s.Size()) + if err != nil { + return err + } + return nil +} + +func isSameMajorMinorVersion(a, b *version.Version) bool { + return a.Segments()[0] == b.Segments()[0] && a.Segments()[1] == b.Segments()[1] +} + +func getListOfFilesInPaths(pathsToExplore []string) ([]string, error) { + var filesToChange []string + for _, pathToExplore := range pathsToExplore { + stat, err := os.Stat(pathToExplore) + if err != nil { + return nil, err + } + if stat.IsDir() { + dirEntries, err := os.ReadDir(pathToExplore) + if err != nil { + return nil, err + } + for _, entry := range dirEntries { + if entry.IsDir() { + continue + } + filesToChange = append(filesToChange, path.Join(pathToExplore, entry.Name())) + } + } else { + filesToChange = append(filesToChange, pathToExplore) + } + } + return filesToChange, nil +} + +// replaceInFile replaces old with new in the given file. +func replaceInFile(oldexps []*regexp.Regexp, new []string, fileToChange string) error { + if len(oldexps) != len(new) { + panic("old and new should be of the same length") + } + + f, err := os.OpenFile(fileToChange, os.O_RDWR, 0600) + if err != nil { + return err + } + defer f.Close() + + content, err := io.ReadAll(f) + if err != nil { + return err + } + contentStr := string(content) + + for i, oldex := range oldexps { + contentStr = oldex.ReplaceAllString(contentStr, new[i]) + } + + _, err = f.WriteAt([]byte(contentStr), 0) + if err != nil { + return err + } + return nil +} diff --git a/go/tools/release-notes/release_notes.go b/go/tools/release-notes/release_notes.go index 73b6fd200f2..e6e44e83e3e 100644 --- a/go/tools/release-notes/release_notes.go +++ b/go/tools/release-notes/release_notes.go @@ -76,14 +76,17 @@ type ( KnownIssues string AddDetails string PathToChangeLogFileOnGH, ChangeLog, ChangeMetrics string + SubDirPath string } ) -const ( - releaseNotesPath = `doc/releasenotes/` - releaseNotesPathGitHub = `https://github.com/vitessio/vitess/blob/main/` + releaseNotesPath +var ( + releaseNotesPath = `changelog/` +) - markdownTemplate = `# Release of Vitess {{.Version}} +const ( + releaseNotesPathGitHub = `https://github.com/vitessio/vitess/blob/main/` + markdownTemplate = `# Release of Vitess {{.Version}} {{- if or .Announcement .AddDetails }} {{ .Announcement }} @@ -138,9 +141,9 @@ The entire changelog for this release can be found [here]({{ .PathToChangeLogFil func (rn *releaseNote) generate(rnFile, changelogFile *os.File) error { var err error // Generate the release notes - rn.PathToChangeLogFileOnGH = fmt.Sprintf(releaseNotesPathGitHub+"%s_changelog.md", rn.VersionUnderscore) + rn.PathToChangeLogFileOnGH = releaseNotesPathGitHub + path.Join(rn.SubDirPath, "changelog.md") if rnFile == nil { - rnFile, err = os.OpenFile(fmt.Sprintf(path.Join(releaseNotesPath, "%s_release_notes.md"), rn.VersionUnderscore), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + rnFile, err = os.OpenFile(path.Join(rn.SubDirPath, "release_notes.md"), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { return err } @@ -154,7 +157,7 @@ func (rn *releaseNote) generate(rnFile, changelogFile *os.File) error { // Generate the changelog if changelogFile == nil { - changelogFile, err = os.OpenFile(fmt.Sprintf(path.Join(releaseNotesPath, "%s_changelog.md"), rn.VersionUnderscore), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + changelogFile, err = os.OpenFile(path.Join(rn.SubDirPath, "changelog.md"), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { return err } @@ -506,9 +509,20 @@ func main() { log.Fatal("The --version flag must be set using a valid format. Format: 'vX.X.X'.") } + // Define the path to the release notes folder + majorVersion := versionMatch[1] + "." + versionMatch[2] + patchVersion := versionMatch[0] + releaseNotesPath = path.Join(releaseNotesPath, majorVersion, patchVersion) + + err := os.MkdirAll(releaseNotesPath, os.ModePerm) + if err != nil { + log.Fatal(err) + } + releaseNotes := releaseNote{ Version: versionName, VersionUnderscore: fmt.Sprintf("%s_%s_%s", versionMatch[1], versionMatch[2], versionMatch[3]), // v14.0.0 -> 14_0_0, this is used to format filenames. + SubDirPath: releaseNotesPath, } // summary of the release diff --git a/go/tools/release-notes/release_notes_test.go b/go/tools/release-notes/release_notes_test.go index 0622d458d28..f80ee9097f9 100644 --- a/go/tools/release-notes/release_notes_test.go +++ b/go/tools/release-notes/release_notes_test.go @@ -160,11 +160,12 @@ func TestGenerateReleaseNotes(t *testing.T) { VersionUnderscore: "12_0_0", ChangeLog: "* PR 1\n* PR 2\n", ChangeMetrics: "optimization is the root of all evil", + SubDirPath: "changelog/12.0/12.0.0", }, expectedOut: "# Release of Vitess v12.0.0\n" + "This is the new release.\n\nNew features got added.\n" + "------------\n" + - "The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/12_0_0_changelog.md).\n" + + "The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/12.0/12.0.0/changelog.md).\n" + "optimization is the root of all evil\n", expectedOutChangeLog: "# Changelog of Vitess v12.0.0\n" + "* PR 1\n" + @@ -176,9 +177,10 @@ func TestGenerateReleaseNotes(t *testing.T) { VersionUnderscore: "12_0_0", ChangeLog: "* PR 1\n* PR 2\n", ChangeMetrics: "optimization is the root of all evil", + SubDirPath: "changelog/12.0/12.0.0", }, expectedOut: "# Release of Vitess v12.0.0\n" + - "The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/doc/releasenotes/12_0_0_changelog.md).\n" + + "The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/12.0/12.0.0/changelog.md).\n" + "optimization is the root of all evil\n", expectedOutChangeLog: "# Changelog of Vitess v12.0.0\n" + "* PR 1\n" + diff --git a/go/tools/releases/releases.go b/go/tools/releases/releases.go new file mode 100644 index 00000000000..10c29233494 --- /dev/null +++ b/go/tools/releases/releases.go @@ -0,0 +1,143 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +// The changelog directory is composed of a README that lists +// and links to all major releases of Vitess. It has one +// sub-directory for each major version. Each sub-directory is +// composed of another README that also lists and links all the +// patch releases of this major release. Those sub-directories +// are composed of one directory per patch release. Finally, +// the patch release directory contains the old files markdown: +// summary, release_notes, changelog. +// +// This tool is solely responsible for generating the READMEs +// and making sure they are up-to-date with the list of major +// and patch releases we have. + +import ( + "log" + "os" + "path" + "sort" + "strings" + "text/template" +) + +const ( + rootDir = "./changelog/" + + rootFileTmpl = `## Releases + +{{- range $r := .SubDirs }} +* [{{ $r.Name }}]({{ $r.Name }}) +{{- end -}} +` + + majorVersionTmpl = `## v{{ .Name }} + +{{- if .Team }} +The dedicated team for this release can be found [here]({{.Team}}).{{ end }} + +{{- range $r := .SubDirs }} +* **[{{ $r.Name }}]({{ $r.Name }})** +{{ if $r.Changelog }} * [Changelog]({{ $r.Name }}/{{ $r.Changelog }}) +{{ end -}} +{{ if $r.ReleaseNotes }} * [Release Notes]({{ $r.Name }}/{{ $r.ReleaseNotes }}) +{{ end -}} +{{- end -}} +` +) + +type dir struct { + Name string + Path string + Changelog string + ReleaseNotes string + Team string + SubDirs []dir +} + +func main() { + rootDir, err := getDirs(dir{Path: rootDir}) + if err != nil { + log.Fatal(err) + } + + err = execReadMeTemplateWithDir(rootDir, rootFileTmpl) + if err != nil { + log.Fatal(err) + } + + for _, subDir := range rootDir.SubDirs { + err := execReadMeTemplateWithDir(subDir, majorVersionTmpl) + if err != nil { + log.Fatal(err) + } + } +} + +func execReadMeTemplateWithDir(d dir, tmpl string) error { + rootRM, err := os.OpenFile(path.Join(d.Path, "README.md"), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0640) + if err != nil { + return err + } + + t := template.Must(template.New("root_readme").Parse(tmpl)) + err = t.ExecuteTemplate(rootRM, "root_readme", d) + if err != nil { + return err + } + return nil +} + +func getDirs(curDir dir) (dir, error) { + entries, err := os.ReadDir(curDir.Path) + if err != nil { + return dir{}, err + } + + for _, entry := range entries { + if entry.IsDir() { + subDir, err := getDirs(dir{ + Name: entry.Name(), + Path: path.Join(curDir.Path, entry.Name()), + }) + if err != nil { + return dir{}, err + } + curDir.SubDirs = append(curDir.SubDirs, subDir) + continue + } + + switch { + case strings.Contains(entry.Name(), "changelog.md"): + curDir.Changelog = entry.Name() + case strings.Contains(entry.Name(), "release_notes.md"): + curDir.ReleaseNotes = entry.Name() + case strings.Contains(entry.Name(), "team.md"): + curDir.Team = entry.Name() + } + } + sort.Slice(curDir.SubDirs, func(i, j int) bool { + if len(curDir.SubDirs[i].Name) < len(curDir.SubDirs[j].Name) { + return false + } + return curDir.SubDirs[i].Name > curDir.SubDirs[j].Name + }) + return curDir, nil +} diff --git a/go/vt/binlog/binlogplayer/binlog_player.go b/go/vt/binlog/binlogplayer/binlog_player.go index 524ef068e53..cfefc275269 100644 --- a/go/vt/binlog/binlogplayer/binlog_player.go +++ b/go/vt/binlog/binlogplayer/binlog_player.go @@ -179,7 +179,7 @@ type BinlogPlayer struct { tables []string // common to all - uid uint32 + uid int32 position mysql.Position stopPosition mysql.Position blplStats *Stats @@ -192,7 +192,7 @@ type BinlogPlayer struct { // replicating the provided keyrange and updating _vt.vreplication // with uid=startPosition.Uid. // If !stopPosition.IsZero(), it will stop when reaching that position. -func NewBinlogPlayerKeyRange(dbClient DBClient, tablet *topodatapb.Tablet, keyRange *topodatapb.KeyRange, uid uint32, blplStats *Stats) *BinlogPlayer { +func NewBinlogPlayerKeyRange(dbClient DBClient, tablet *topodatapb.Tablet, keyRange *topodatapb.KeyRange, uid int32, blplStats *Stats) *BinlogPlayer { result := &BinlogPlayer{ tablet: tablet, dbClient: dbClient, @@ -208,7 +208,7 @@ func NewBinlogPlayerKeyRange(dbClient DBClient, tablet *topodatapb.Tablet, keyRa // replicating the provided tables and updating _vt.vreplication // with uid=startPosition.Uid. // If !stopPosition.IsZero(), it will stop when reaching that position. -func NewBinlogPlayerTables(dbClient DBClient, tablet *topodatapb.Tablet, tables []string, uid uint32, blplStats *Stats) *BinlogPlayer { +func NewBinlogPlayerTables(dbClient DBClient, tablet *topodatapb.Tablet, tables []string, uid int32, blplStats *Stats) *BinlogPlayer { result := &BinlogPlayer{ tablet: tablet, dbClient: dbClient, @@ -530,15 +530,15 @@ type VRSettings struct { MaxTPS int64 MaxReplicationLag int64 State string - WorkflowType int32 - WorkflowSubType int32 + WorkflowType binlogdatapb.VReplicationWorkflowType + WorkflowSubType binlogdatapb.VReplicationWorkflowSubType WorkflowName string DeferSecondaryKeys bool } // ReadVRSettings retrieves the throttler settings for // vreplication from the checkpoint table. -func ReadVRSettings(dbClient DBClient, uid uint32) (VRSettings, error) { +func ReadVRSettings(dbClient DBClient, uid int32) (VRSettings, error) { query := fmt.Sprintf("select pos, stop_pos, max_tps, max_replication_lag, state, workflow_type, workflow, workflow_sub_type, defer_secondary_keys from _vt.vreplication where id=%v", uid) qr, err := dbClient.ExecuteFetch(query, 1) if err != nil { @@ -566,13 +566,11 @@ func ReadVRSettings(dbClient DBClient, uid uint32) (VRSettings, error) { if err != nil { return VRSettings{}, fmt.Errorf("failed to parse stop_pos column: %v", err) } - workflowTypeTmp, err := vrRow.ToInt64("workflow_type") - workflowType := int32(workflowTypeTmp) + workflowType, err := vrRow.ToInt32("workflow_type") if err != nil { return VRSettings{}, fmt.Errorf("failed to parse workflow_type column: %v", err) } - workflowSubTypeTmp, err := vrRow.ToInt64("workflow_sub_type") - workflowSubType := int32(workflowSubTypeTmp) + workflowSubType, err := vrRow.ToInt32("workflow_sub_type") if err != nil { return VRSettings{}, fmt.Errorf("failed to parse workflow_sub_type column: %v", err) } @@ -586,9 +584,9 @@ func ReadVRSettings(dbClient DBClient, uid uint32) (VRSettings, error) { MaxTPS: maxTPS, MaxReplicationLag: maxReplicationLag, State: vrRow.AsString("state", ""), - WorkflowType: workflowType, + WorkflowType: binlogdatapb.VReplicationWorkflowType(workflowType), WorkflowName: vrRow.AsString("workflow", ""), - WorkflowSubType: workflowSubType, + WorkflowSubType: binlogdatapb.VReplicationWorkflowSubType(workflowSubType), DeferSecondaryKeys: deferSecondaryKeys, }, nil } @@ -599,9 +597,9 @@ func CreateVReplication(workflow string, source *binlogdatapb.BinlogSource, posi workflowType binlogdatapb.VReplicationWorkflowType, workflowSubType binlogdatapb.VReplicationWorkflowSubType, deferSecondaryKeys bool) string { return fmt.Sprintf("insert into _vt.vreplication "+ "(workflow, source, pos, max_tps, max_replication_lag, time_updated, transaction_timestamp, state, db_name, workflow_type, workflow_sub_type, defer_secondary_keys) "+ - "values (%v, %v, %v, %v, %v, %v, 0, '%v', %v, %v, %v, %v)", + "values (%v, %v, %v, %v, %v, %v, 0, '%v', %v, %d, %d, %v)", encodeString(workflow), encodeString(source.String()), encodeString(position), maxTPS, maxReplicationLag, - timeUpdated, BlpRunning, encodeString(dbName), int64(workflowType), int64(workflowSubType), deferSecondaryKeys) + timeUpdated, BlpRunning, encodeString(dbName), workflowType, workflowSubType, deferSecondaryKeys) } // CreateVReplicationState returns a statement to create a stopped vreplication. @@ -609,14 +607,14 @@ func CreateVReplicationState(workflow string, source *binlogdatapb.BinlogSource, workflowType binlogdatapb.VReplicationWorkflowType, workflowSubType binlogdatapb.VReplicationWorkflowSubType) string { return fmt.Sprintf("insert into _vt.vreplication "+ "(workflow, source, pos, max_tps, max_replication_lag, time_updated, transaction_timestamp, state, db_name, workflow_type, workflow_sub_type) "+ - "values (%v, %v, %v, %v, %v, %v, 0, '%v', %v, %v, %v)", + "values (%v, %v, %v, %v, %v, %v, 0, '%v', %v, %d, %d)", encodeString(workflow), encodeString(source.String()), encodeString(position), throttler.MaxRateModuleDisabled, throttler.ReplicationLagModuleDisabled, time.Now().Unix(), state, encodeString(dbName), - int64(workflowType), int64(workflowSubType)) + workflowType, workflowSubType) } // GenerateUpdatePos returns a statement to record the latest processed gtid in the _vt.vreplication table. -func GenerateUpdatePos(uid uint32, pos mysql.Position, timeUpdated int64, txTimestamp int64, rowsCopied int64, compress bool) string { +func GenerateUpdatePos(uid int32, pos mysql.Position, timeUpdated int64, txTimestamp int64, rowsCopied int64, compress bool) string { strGTID := encodeString(mysql.EncodePosition(pos)) if compress { strGTID = fmt.Sprintf("compress(%s)", strGTID) @@ -631,12 +629,12 @@ func GenerateUpdatePos(uid uint32, pos mysql.Position, timeUpdated int64, txTime } // GenerateUpdateRowsCopied returns a statement to update the rows_copied value in the _vt.vreplication table. -func GenerateUpdateRowsCopied(uid uint32, rowsCopied int64) string { +func GenerateUpdateRowsCopied(uid int32, rowsCopied int64) string { return fmt.Sprintf("update _vt.vreplication set rows_copied=%v where id=%v", rowsCopied, uid) } // GenerateUpdateHeartbeat returns a statement to record the latest heartbeat in the _vt.vreplication table. -func GenerateUpdateHeartbeat(uid uint32, timeUpdated int64) (string, error) { +func GenerateUpdateHeartbeat(uid int32, timeUpdated int64) (string, error) { if timeUpdated == 0 { return "", fmt.Errorf("timeUpdated cannot be zero") } @@ -644,7 +642,7 @@ func GenerateUpdateHeartbeat(uid uint32, timeUpdated int64) (string, error) { } // GenerateUpdateTimeThrottled returns a statement to record the latest throttle time in the _vt.vreplication table. -func GenerateUpdateTimeThrottled(uid uint32, timeThrottledUnix int64, componentThrottled string) (string, error) { +func GenerateUpdateTimeThrottled(uid int32, timeThrottledUnix int64, componentThrottled string) (string, error) { if timeThrottledUnix == 0 { return "", fmt.Errorf("timeUpdated cannot be zero") } @@ -652,28 +650,28 @@ func GenerateUpdateTimeThrottled(uid uint32, timeThrottledUnix int64, componentT } // StartVReplication returns a statement to start the replication. -func StartVReplication(uid uint32) string { +func StartVReplication(uid int32) string { return fmt.Sprintf( "update _vt.vreplication set state='%v', stop_pos=NULL where id=%v", BlpRunning, uid) } // StartVReplicationUntil returns a statement to start the replication with a stop position. -func StartVReplicationUntil(uid uint32, pos string) string { +func StartVReplicationUntil(uid int32, pos string) string { return fmt.Sprintf( "update _vt.vreplication set state='%v', stop_pos=%v where id=%v", BlpRunning, encodeString(pos), uid) } // StopVReplication returns a statement to stop the replication. -func StopVReplication(uid uint32, message string) string { +func StopVReplication(uid int32, message string) string { return fmt.Sprintf( "update _vt.vreplication set state='%v', message=%v where id=%v", BlpStopped, encodeString(MessageTruncate(message)), uid) } // DeleteVReplication returns a statement to delete the replication. -func DeleteVReplication(uid uint32) string { +func DeleteVReplication(uid int32) string { return fmt.Sprintf("delete from _vt.vreplication where id=%v", uid) } @@ -691,13 +689,13 @@ func encodeString(in string) string { // ReadVReplicationPos returns a statement to query the gtid for a // given stream from the _vt.vreplication table. -func ReadVReplicationPos(index uint32) string { +func ReadVReplicationPos(index int32) string { return fmt.Sprintf("select pos from _vt.vreplication where id=%v", index) } // ReadVReplicationStatus returns a statement to query the status fields for a // given stream from the _vt.vreplication table. -func ReadVReplicationStatus(index uint32) string { +func ReadVReplicationStatus(index int32) string { return fmt.Sprintf("select pos, state, message from _vt.vreplication where id=%v", index) } diff --git a/go/vt/dbconfigs/dbconfigs.go b/go/vt/dbconfigs/dbconfigs.go index 371892144d3..940652094c9 100644 --- a/go/vt/dbconfigs/dbconfigs.go +++ b/go/vt/dbconfigs/dbconfigs.go @@ -216,12 +216,12 @@ func (dbcfgs *DBConfigs) AppDebugWithDB() Connector { return dbcfgs.makeParams(&dbcfgs.appdebugParams, true) } -// AllPrivsConnector returns connection parameters for appdebug with no dbname set. +// AllPrivsConnector returns connection parameters for allprivs with no dbname set. func (dbcfgs *DBConfigs) AllPrivsConnector() Connector { return dbcfgs.makeParams(&dbcfgs.allprivsParams, false) } -// AllPrivsWithDB returns connection parameters for appdebug with dbname set. +// AllPrivsWithDB returns connection parameters for allprivs with dbname set. func (dbcfgs *DBConfigs) AllPrivsWithDB() Connector { return dbcfgs.makeParams(&dbcfgs.allprivsParams, true) } diff --git a/go/vt/dbconnpool/connection_pool.go b/go/vt/dbconnpool/connection_pool.go index bb339862dcf..e8e4acce017 100644 --- a/go/vt/dbconnpool/connection_pool.go +++ b/go/vt/dbconnpool/connection_pool.go @@ -22,6 +22,7 @@ object to pool these DBConnections. package dbconnpool import ( + "context" "errors" "net" "sync" @@ -29,8 +30,6 @@ import ( "vitess.io/vitess/go/netutil" - "context" - "vitess.io/vitess/go/pools" "vitess.io/vitess/go/stats" "vitess.io/vitess/go/vt/dbconfigs" diff --git a/go/vt/discovery/fake_healthcheck.go b/go/vt/discovery/fake_healthcheck.go index d0543da7f5a..8ac12012ce2 100644 --- a/go/vt/discovery/fake_healthcheck.go +++ b/go/vt/discovery/fake_healthcheck.go @@ -55,7 +55,7 @@ type FakeHealthCheck struct { mu sync.RWMutex items map[string]*fhcItem itemsAlias map[string]*fhcItem - currentTabletUID int + currentTabletUID uint32 // channel to return on subscribe. Pass nil if no subscribe should not return a channel ch chan *TabletHealth } @@ -308,8 +308,7 @@ func (fhc *FakeHealthCheck) AddFakeTablet(cell, host string, port int32, keyspac // tabletUID must be unique fhc.currentTabletUID++ - uid := fhc.currentTabletUID - t := topo.NewTablet(uint32(uid), cell, host) + t := topo.NewTablet(fhc.currentTabletUID, cell, host) t.Keyspace = keyspace t.Shard = shard t.Type = tabletType diff --git a/go/vt/discovery/healthcheck.go b/go/vt/discovery/healthcheck.go index be0d022ff98..f6eb896db72 100644 --- a/go/vt/discovery/healthcheck.go +++ b/go/vt/discovery/healthcheck.go @@ -113,7 +113,7 @@ const ( padding: 0.2rem; } - +
diff --git a/go/vt/discovery/healthcheck_test.go b/go/vt/discovery/healthcheck_test.go index e61915a9b85..9d4325404b9 100644 --- a/go/vt/discovery/healthcheck_test.go +++ b/go/vt/discovery/healthcheck_test.go @@ -196,8 +196,9 @@ func TestHealthCheck(t *testing.T) { } input <- shr result = <-resultChan - // TODO: figure out how to compare objects that contain errors using utils.MustMatch - assert.True(t, want.DeepEqual(result), "Wrong TabletHealth data\n Expected: %v\n Actual: %v", want, result) + // Ignore LastError because we're going to check it separately. + utils.MustMatchFn(".LastError", ".Conn")(t, want, result, "Wrong TabletHealth data") + assert.Error(t, result.LastError, "vttablet error: some error") testChecksum(t, 1027934207, hc.stateChecksum()) // unchanged // remove tablet @@ -257,8 +258,9 @@ func TestHealthCheckStreamError(t *testing.T) { LastError: fmt.Errorf("some stream error"), } result = <-resultChan - // TODO: figure out how to compare objects that contain errors using utils.MustMatch - assert.True(t, want.DeepEqual(result), "Wrong TabletHealth data\n Expected: %v\n Actual: %v", want, result) + // Ignore LastError because we're going to check it separately. + utils.MustMatchFn(".LastError", ".Conn")(t, want, result, "Wrong TabletHealth data") + assert.Error(t, result.LastError, "some stream error") // tablet should be removed from healthy list a := hc.GetHealthyTabletStats(&querypb.Target{Keyspace: "k", Shard: "s", TabletType: topodatapb.TabletType_REPLICA}) assert.Empty(t, a, "wrong result, expected empty list") @@ -317,8 +319,9 @@ func TestHealthCheckErrorOnPrimary(t *testing.T) { LastError: fmt.Errorf("some stream error"), } result = <-resultChan - // TODO: figure out how to compare objects that contain errors using utils.MustMatch - assert.True(t, want.DeepEqual(result), "Wrong TabletHealth data\n Expected: %v\n Actual: %v", want, result) + // Ignore LastError because we're going to check it separately. + utils.MustMatchFn(".LastError", ".Conn")(t, want, result, "Wrong TabletHealth data") + assert.Error(t, result.LastError, "some stream error") // tablet should be removed from healthy list a := hc.GetHealthyTabletStats(&querypb.Target{Keyspace: "k", Shard: "s", TabletType: topodatapb.TabletType_PRIMARY}) assert.Empty(t, a, "wrong result, expected empty list") diff --git a/go/vt/discovery/tablet_health.go b/go/vt/discovery/tablet_health.go index edce1ea85a9..7206094db61 100644 --- a/go/vt/discovery/tablet_health.go +++ b/go/vt/discovery/tablet_health.go @@ -21,8 +21,6 @@ import ( "encoding/json" "strings" - "vitess.io/vitess/go/vt/topo/topoproto" - "vitess.io/vitess/go/vt/vttablet/queryservice" "google.golang.org/protobuf/proto" @@ -46,38 +44,19 @@ type TabletHealth struct { func (th *TabletHealth) MarshalJSON() ([]byte, error) { return json.Marshal(&struct { - Key string - Tablet *topodata.Tablet - Name string - Target *query.Target - Up bool - Serving bool - PrimaryTermStartTime int64 - TabletExternallyReparentedTimestamp int64 - Stats *query.RealtimeStats - LastError error + Tablet *topodata.Tablet + Target *query.Target + Serving bool + PrimaryTermStartTime int64 + Stats *query.RealtimeStats + LastError error }{ - // The Key and Name fields are fields that used to live in the legacy tablet health - // TODO: remove Key and Name in v15 - Key: TabletToMapKey(th.Tablet), - Tablet: th.Tablet, - Name: topoproto.TabletAliasString(th.Tablet.Alias), - Target: th.Target, - - // Setting Up to true to ensure backward compatibility - // TODO: remove Up in v15 - Up: true, - - Serving: th.Serving, - - // We copy the PrimaryTermStartTime value onto TabletExternallyReparentedTimestamp to - // ensure backward compatibility. - // TODO: remove Up in v15 - PrimaryTermStartTime: th.PrimaryTermStartTime, - TabletExternallyReparentedTimestamp: th.PrimaryTermStartTime, - - Stats: th.Stats, - LastError: th.LastError, + Tablet: th.Tablet, + Target: th.Target, + Serving: th.Serving, + PrimaryTermStartTime: th.PrimaryTermStartTime, + Stats: th.Stats, + LastError: th.LastError, }) } diff --git a/go/vt/discovery/topology_watcher.go b/go/vt/discovery/topology_watcher.go index 5e5c54ab57a..8a4dcb3213e 100644 --- a/go/vt/discovery/topology_watcher.go +++ b/go/vt/discovery/topology_watcher.go @@ -362,7 +362,7 @@ func (fbs *FilterByShard) IsIncluded(tablet *topodata.Tablet) bool { // Exact match (probably a non-sharded keyspace). return true } - if kr != nil && c.keyRange != nil && key.KeyRangeIncludes(c.keyRange, kr) { + if kr != nil && c.keyRange != nil && key.KeyRangeContainsKeyRange(c.keyRange, kr) { // Our filter's KeyRange includes the provided KeyRange return true } diff --git a/go/vt/dtids/dtids.go b/go/vt/dtids/dtids.go index 2b4dfdb8830..06585a3e6c3 100644 --- a/go/vt/dtids/dtids.go +++ b/go/vt/dtids/dtids.go @@ -46,7 +46,7 @@ func ShardSession(dtid string) (*vtgatepb.Session_ShardSession, error) { Shard: splits[1], TabletType: topodatapb.TabletType_PRIMARY, } - txid, err := strconv.ParseInt(splits[2], 10, 0) + txid, err := strconv.ParseInt(splits[2], 10, 64) if err != nil { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid transaction id in dtid: %s", dtid) } @@ -62,7 +62,7 @@ func TransactionID(dtid string) (int64, error) { if len(splits) != 3 { return 0, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid parts in dtid: %s", dtid) } - txid, err := strconv.ParseInt(splits[2], 10, 0) + txid, err := strconv.ParseInt(splits[2], 10, 64) if err != nil { return 0, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid transaction id in dtid: %s", dtid) } diff --git a/go/vt/external/golib/sqlutils/sqlutils.go b/go/vt/external/golib/sqlutils/sqlutils.go index 91e83f0a4e4..c593d5f6319 100644 --- a/go/vt/external/golib/sqlutils/sqlutils.go +++ b/go/vt/external/golib/sqlutils/sqlutils.go @@ -108,12 +108,17 @@ func (this *RowMap) GetStringD(key string, def string) string { } func (this *RowMap) GetInt64(key string) int64 { - res, _ := strconv.ParseInt(this.GetString(key), 10, 0) + res, _ := strconv.ParseInt(this.GetString(key), 10, 64) return res } +func (this *RowMap) GetInt32(key string) int32 { + res, _ := strconv.ParseInt(this.GetString(key), 10, 32) + return int32(res) +} + func (this *RowMap) GetNullInt64(key string) sql.NullInt64 { - i, err := strconv.ParseInt(this.GetString(key), 10, 0) + i, err := strconv.ParseInt(this.GetString(key), 10, 64) if err == nil { return sql.NullInt64{Int64: i, Valid: true} } else { @@ -140,7 +145,7 @@ func (this *RowMap) GetUint(key string) uint { } func (this *RowMap) GetUintD(key string, def uint) uint { - res, err := strconv.Atoi(this.GetString(key)) + res, err := strconv.ParseUint(this.GetString(key), 10, 0) if err != nil { return def } @@ -148,16 +153,21 @@ func (this *RowMap) GetUintD(key string, def uint) uint { } func (this *RowMap) GetUint64(key string) uint64 { - res, _ := strconv.ParseUint(this.GetString(key), 10, 0) + res, _ := strconv.ParseUint(this.GetString(key), 10, 64) return res } func (this *RowMap) GetUint64D(key string, def uint64) uint64 { - res, err := strconv.ParseUint(this.GetString(key), 10, 0) + res, err := strconv.ParseUint(this.GetString(key), 10, 64) if err != nil { return def } - return uint64(res) + return res +} + +func (this *RowMap) GetUint32(key string) uint32 { + res, _ := strconv.ParseUint(this.GetString(key), 10, 32) + return uint32(res) } func (this *RowMap) GetBool(key string) bool { diff --git a/go/vt/key/destination.go b/go/vt/key/destination.go index c4fb37b7a9d..437e980f480 100644 --- a/go/vt/key/destination.go +++ b/go/vt/key/destination.go @@ -128,7 +128,7 @@ func (d DestinationExactKeyRange) String() string { func processExactKeyRange(allShards []*topodatapb.ShardReference, kr *topodatapb.KeyRange, addShard func(shard string) error) error { sort.SliceStable(allShards, func(i, j int) bool { - return KeyRangeStartSmaller(allShards[i].GetKeyRange(), allShards[j].GetKeyRange()) + return KeyRangeLess(allShards[i].GetKeyRange(), allShards[j].GetKeyRange()) }) shardnum := 0 @@ -139,7 +139,7 @@ func processExactKeyRange(allShards []*topodatapb.ShardReference, kr *topodatapb shardnum++ } for shardnum < len(allShards) { - if !KeyRangesIntersect(kr, allShards[shardnum].KeyRange) { + if !KeyRangeIntersect(kr, allShards[shardnum].KeyRange) { // If we are over the requested keyrange, we // can stop now, we won't find more. break @@ -215,7 +215,7 @@ func (d DestinationKeyRange) String() string { func processKeyRange(allShards []*topodatapb.ShardReference, kr *topodatapb.KeyRange, addShard func(shard string) error) error { for _, shard := range allShards { - if !KeyRangesIntersect(kr, shard.KeyRange) { + if !KeyRangeIntersect(kr, shard.KeyRange) { // We don't need that shard. continue } diff --git a/go/vt/key/key.go b/go/vt/key/key.go index fc603554ecf..dcdcda47f81 100644 --- a/go/vt/key/key.go +++ b/go/vt/key/key.go @@ -26,16 +26,18 @@ import ( "regexp" "strings" - "google.golang.org/protobuf/proto" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) +var ( + KeyRangePattern = regexp.MustCompile(`^(0|([0-9a-fA-F]{2})*-([0-9a-fA-F]{2})*)$`) +) + // // Uint64Key definitions // -// Uint64Key is a uint64 that can be converted into a KeyspaceId. +// Uint64Key is a uint64 that can be converted into a keyspace id. type Uint64Key uint64 func (i Uint64Key) String() string { @@ -49,261 +51,214 @@ func (i Uint64Key) Bytes() []byte { return buf } -// -// KeyRange helper methods -// +// Helper methods for keyspace id values. -// EvenShardsKeyRange returns a key range definition for a shard at index "i", -// assuming range based sharding with "n" equal-width shards in total. -// i starts at 0. -// -// Example: (1, 2) returns the second out of two shards in total i.e. "80-". -// -// This function must not be used in the Vitess code base because Vitess also -// supports shards with different widths. In that case, the output of this -// function would be wrong. -// -// Note: start and end values have trailing zero bytes omitted. -// For example, "80-" has only the first byte (0x80) set. -// We do this to produce the same KeyRange objects as ParseKeyRangeParts() does. -// Because it's using the Go hex methods, it's omitting trailing zero bytes as -// well. -func EvenShardsKeyRange(i, n int) (*topodatapb.KeyRange, error) { - if n <= 0 { - return nil, fmt.Errorf("the shard count must be > 0: %v", n) - } - if i >= n { - return nil, fmt.Errorf("the index of the shard must be less than the total number of shards: %v < %v", i, n) - } - if n&(n-1) != 0 { - return nil, fmt.Errorf("the shard count must be a power of two: %v", n) +// Normalize removes any trailing zero bytes from id. This allows two id values to be compared even if they are +// different lengths. +// From a key range perspective, -80 == 00-80 == 0000-8000 == 000000-800000, etc. and they should +// always be treated the same even if they are different lengths. +func Normalize(id []byte) []byte { + trailingZeroes := 0 + for i := len(id) - 1; i >= 0 && id[i] == 0x00; i-- { + trailingZeroes += 1 } - // Determine the number of bytes which are required to represent any - // KeyRange start or end for the given n. - // This is required to trim the returned values to the same length e.g. - // (256, 512) should return 8000-8080 as shard key range. - minBytes := 0 - for nn := Uint64Key(n - 1); nn > 0; nn >>= 8 { - minBytes++ - } + return id[:len(id)-trailingZeroes] +} - width := Uint64Key(math.MaxUint64)/Uint64Key(n) + 1 - start := Uint64Key(i) * width - end := start + width +// Compare compares two keyspace IDs while taking care to normalize them; returns -1 if ab, 0 if equal. +func Compare(a, b []byte) int { + return bytes.Compare(Normalize(a), Normalize(b)) +} - // Note: The byte value is empty if start or end is the min or the max - // respectively. - startBytes := start.Bytes()[:minBytes] - endBytes := end.Bytes()[:minBytes] - if start == 0 { - startBytes = []byte{} - } - if end == 0 { - // Always set the end except for the last shard. In that case, the - // end value (2^64) flows over and is the same as 0. - endBytes = []byte{} - } - return &topodatapb.KeyRange{Start: startBytes, End: endBytes}, nil +// Less returns true if a is less than b. +func Less(a, b []byte) bool { + return Compare(a, b) < 0 +} + +// Equal returns true if a is equal to b. +func Equal(a, b []byte) bool { + return Compare(a, b) == 0 +} + +// Empty returns true if id is an empty keyspace ID. +func Empty(id []byte) bool { + return len(Normalize(id)) == 0 } -// KeyRangeAdd adds two adjacent keyranges into a single value. -// If the values are not adjacent, it returns false. -func KeyRangeAdd(first, second *topodatapb.KeyRange) (*topodatapb.KeyRange, bool) { - if first == nil || second == nil { +// +// KeyRange helper methods +// + +// KeyRangeAdd adds two adjacent KeyRange values (in any order) into a single value. If the values are not adjacent, +// it returns false. +func KeyRangeAdd(a, b *topodatapb.KeyRange) (*topodatapb.KeyRange, bool) { + if a == nil || b == nil { return nil, false } - if len(first.End) != 0 && bytes.Equal(first.End, second.Start) { - return &topodatapb.KeyRange{Start: first.Start, End: second.End}, true + if !Empty(a.End) && Equal(a.End, b.Start) { + return &topodatapb.KeyRange{Start: a.Start, End: b.End}, true } - if len(second.End) != 0 && bytes.Equal(second.End, first.Start) { - return &topodatapb.KeyRange{Start: second.Start, End: first.End}, true + if !Empty(b.End) && Equal(b.End, a.Start) { + return &topodatapb.KeyRange{Start: b.Start, End: a.End}, true } return nil, false } // KeyRangeContains returns true if the provided id is in the keyrange. -func KeyRangeContains(kr *topodatapb.KeyRange, id []byte) bool { - if kr == nil { +func KeyRangeContains(keyRange *topodatapb.KeyRange, id []byte) bool { + if KeyRangeIsComplete(keyRange) { return true } - return bytes.Compare(kr.Start, id) <= 0 && - (len(kr.End) == 0 || bytes.Compare(id, kr.End) < 0) + return (Empty(keyRange.Start) || Compare(id, keyRange.Start) >= 0) && (Empty(keyRange.End) || Compare(id, keyRange.End) < 0) } -// ParseKeyRangeParts parses a start and end hex values and build a proto KeyRange +// ParseKeyRangeParts parses a Start and End as hex encoded strings and builds a proto KeyRange. func ParseKeyRangeParts(start, end string) (*topodatapb.KeyRange, error) { - s, err := hex.DecodeString(start) + startKey, err := hex.DecodeString(start) if err != nil { return nil, err } - e, err := hex.DecodeString(end) + endKey, err := hex.DecodeString(end) if err != nil { return nil, err } - return &topodatapb.KeyRange{Start: s, End: e}, nil + return &topodatapb.KeyRange{Start: startKey, End: endKey}, nil } -// KeyRangeString prints a topodatapb.KeyRange -func KeyRangeString(k *topodatapb.KeyRange) string { - if k == nil { +// KeyRangeString formats a topodatapb.KeyRange into a hex encoded string. +func KeyRangeString(keyRange *topodatapb.KeyRange) string { + if KeyRangeIsComplete(keyRange) { return "-" } - return hex.EncodeToString(k.Start) + "-" + hex.EncodeToString(k.End) + return hex.EncodeToString(keyRange.Start) + "-" + hex.EncodeToString(keyRange.End) } -// KeyRangeIsPartial returns true if the KeyRange does not cover the entire space. -func KeyRangeIsPartial(kr *topodatapb.KeyRange) bool { - if kr == nil { - return false +// KeyRangeStartCompare compares the Start of two KeyRange values using semantics unique to Start values where an +// empty Start means the *minimum* value; returns -1 if ab, 0 if equal. +func KeyRangeStartCompare(a, b *topodatapb.KeyRange) int { + aIsMinimum := a == nil || Empty(a.Start) + bIsMinimum := b == nil || Empty(b.Start) + + if aIsMinimum && bIsMinimum { + return 0 + } else if aIsMinimum { + return -1 + } else if bIsMinimum { + return 1 } - return !(len(kr.Start) == 0 && len(kr.End) == 0) + + return Compare(a.Start, b.Start) } -// KeyRangeEqual returns true if both key ranges cover the same area -func KeyRangeEqual(left, right *topodatapb.KeyRange) bool { - if left == nil { - return right == nil || (len(right.Start) == 0 && len(right.End) == 0) - } - if right == nil { - return len(left.Start) == 0 && len(left.End) == 0 - } - return bytes.Equal(addPadding(left.Start), addPadding(right.Start)) && - bytes.Equal(addPadding(left.End), addPadding(right.End)) +// KeyRangeStartEqual returns true if both KeyRange values have the same Start. +func KeyRangeStartEqual(a, b *topodatapb.KeyRange) bool { + return KeyRangeStartCompare(a, b) == 0 } -// addPadding adds padding to make sure keyrange represents an 8 byte integer. -// From Vitess docs: -// A hash vindex produces an 8-byte number. -// This means that all numbers less than 0x8000000000000000 will fall in shard -80. -// Any number with the highest bit set will be >= 0x8000000000000000, and will therefore -// belong to shard 80-. -// This means that from a keyrange perspective -80 == 00-80 == 0000-8000 == 000000-800000 -// If we don't add this padding, we could run into issues when transitioning from keyranges -// that use 2 bytes to 4 bytes. -func addPadding(kr []byte) []byte { - paddedKr := make([]byte, 8) - - for i := 0; i < len(kr); i++ { - paddedKr = append(paddedKr, kr[i]) - } +// KeyRangeEndCompare compares the End of two KeyRange values using semantics unique to End values where an +// empty End means the *maximum* value; returns -1 if ab, 0 if equal. +func KeyRangeEndCompare(a, b *topodatapb.KeyRange) int { + aIsMaximum := a == nil || Empty(a.End) + bIsMaximum := b == nil || Empty(b.End) - for i := len(kr); i < 8; i++ { - paddedKr = append(paddedKr, 0) + if aIsMaximum && bIsMaximum { + return 0 + } else if aIsMaximum { + return 1 + } else if bIsMaximum { + return -1 } - return paddedKr + + return Compare(a.End, b.End) } -// KeyRangeStartSmaller returns true if right's keyrange start is _after_ left's start -func KeyRangeStartSmaller(left, right *topodatapb.KeyRange) bool { - if left == nil { - return right != nil - } - if right == nil { - return false - } - return bytes.Compare(left.Start, right.Start) < 0 +// KeyRangeEndEqual returns true if both KeyRange values have the same End. +func KeyRangeEndEqual(a, b *topodatapb.KeyRange) bool { + return KeyRangeEndCompare(a, b) == 0 } -// KeyRangeStartEqual returns true if both key ranges have the same start -func KeyRangeStartEqual(left, right *topodatapb.KeyRange) bool { - if left == nil { - return right == nil || len(right.Start) == 0 - } - if right == nil { - return len(left.Start) == 0 - } - return bytes.Equal(addPadding(left.Start), addPadding(right.Start)) +// KeyRangeCompare compares two KeyRange values, taking into account both the Start and End fields and their +// field-specific comparison logic; returns -1 if ab, 0 if equal. Specifically: +// +// - The Start-specific KeyRangeStartCompare and End-specific KeyRangeEndCompare are used for proper comparison +// of an empty value for either Start or End. +// - The Start is compared first and End is only compared if Start is equal. +func KeyRangeCompare(a, b *topodatapb.KeyRange) int { + // First, compare the Start field. + if v := KeyRangeStartCompare(a, b); v != 0 { + // The Start field for a and b differ, and that is enough; return that comparison. + return v + } + + // The Start field was equal, so compare the End field and return that comparison. + return KeyRangeEndCompare(a, b) } -// KeyRangeContiguous returns true if the end of the left key range exactly -// matches the start of the right key range (i.e they are contigious) -func KeyRangeContiguous(left, right *topodatapb.KeyRange) bool { - if left == nil { - return right == nil || (len(right.Start) == 0 && len(right.End) == 0) - } - if right == nil { - return len(left.Start) == 0 && len(left.End) == 0 - } - return bytes.Equal(addPadding(left.End), addPadding(right.Start)) +// KeyRangeEqual returns true if a and b are equal. +func KeyRangeEqual(a, b *topodatapb.KeyRange) bool { + return KeyRangeCompare(a, b) == 0 } -// KeyRangeEndEqual returns true if both key ranges have the same end -func KeyRangeEndEqual(left, right *topodatapb.KeyRange) bool { - if left == nil { - return right == nil || len(right.End) == 0 - } - if right == nil { - return len(left.End) == 0 - } - return bytes.Equal(addPadding(left.End), addPadding(right.End)) +// KeyRangeLess returns true if a is less than b. +func KeyRangeLess(a, b *topodatapb.KeyRange) bool { + return KeyRangeCompare(a, b) < 0 } -// For more info on the following functions, see: -// See: http://stackoverflow.com/questions/4879315/what-is-a-tidy-algorithm-to-find-overlapping-intervals -// two segments defined as (a,b) and (c,d) (with a c) && (a < d) -// overlap = min(b, d) - max(c, a) - -// KeyRangesIntersect returns true if some Keyspace values exist in both ranges. -func KeyRangesIntersect(first, second *topodatapb.KeyRange) bool { - if first == nil || second == nil { - return true - } - return (len(first.End) == 0 || bytes.Compare(second.Start, first.End) < 0) && - (len(second.End) == 0 || bytes.Compare(first.Start, second.End) < 0) +// KeyRangeIsComplete returns true if the KeyRange covers the entire keyspace. +func KeyRangeIsComplete(keyRange *topodatapb.KeyRange) bool { + return keyRange == nil || (Empty(keyRange.Start) && Empty(keyRange.End)) } -// KeyRangesOverlap returns the overlap between two KeyRanges. -// They need to overlap, otherwise an error is returned. -func KeyRangesOverlap(first, second *topodatapb.KeyRange) (*topodatapb.KeyRange, error) { - if !KeyRangesIntersect(first, second) { - return nil, fmt.Errorf("KeyRanges %v and %v don't overlap", first, second) - } - if first == nil { - return second, nil - } - if second == nil { - return first, nil - } - // compute max(c,a) and min(b,d) - // start with (a,b) - result := proto.Clone(first).(*topodatapb.KeyRange) - // if c > a, then use c - if bytes.Compare(second.Start, first.Start) > 0 { - result.Start = second.Start +// KeyRangeIsPartial returns true if the KeyRange does not cover the entire keyspace. +func KeyRangeIsPartial(keyRange *topodatapb.KeyRange) bool { + return !KeyRangeIsComplete(keyRange) +} + +// KeyRangeContiguous returns true if the End of KeyRange a is equivalent to the Start of the KeyRange b, +// which means that they are contiguous. +func KeyRangeContiguous(a, b *topodatapb.KeyRange) bool { + if KeyRangeIsComplete(a) || KeyRangeIsComplete(b) { + return false // no two KeyRange values can be contiguous if either is the complete range } - // if b is maxed out, or - // (d is not maxed out and d < b) - // ^ valid test as neither b nor d are max - // then use d - if len(first.End) == 0 || (len(second.End) != 0 && bytes.Compare(second.End, first.End) < 0) { - result.End = second.End + + return Equal(a.End, b.Start) +} + +// For more info on the following functions, see: +// http://stackoverflow.com/questions/4879315/what-is-a-tidy-algorithm-to-find-overlapping-intervals +// Two segments defined as (a,b) and (c,d) (with a c) && (a < d) +// * overlap = min(b, d) - max(c, a) + +// KeyRangeIntersect returns true if some part of KeyRange a and b overlap, meaning that some keyspace ID values +// exist in both a and b. +func KeyRangeIntersect(a, b *topodatapb.KeyRange) bool { + if KeyRangeIsComplete(a) || KeyRangeIsComplete(b) { + return true // if either KeyRange is complete, there must be an intersection } - return result, nil + + return (Empty(a.End) || Less(b.Start, a.End)) && (Empty(b.End) || Less(a.Start, b.End)) } -// KeyRangeIncludes returns true if the first provided KeyRange, big, -// contains the second KeyRange, small. If they intersect, but small -// spills out, this returns false. -func KeyRangeIncludes(big, small *topodatapb.KeyRange) bool { - if big == nil { - // The outside one covers everything, we're good. +// KeyRangeContainsKeyRange returns true if KeyRange a fully contains KeyRange b. +func KeyRangeContainsKeyRange(a, b *topodatapb.KeyRange) bool { + // If a covers the entire KeyRange, it always contains b. + if KeyRangeIsComplete(a) { return true } - if small == nil { - // The smaller one covers everything, better have the - // bigger one also cover everything. - return len(big.Start) == 0 && len(big.End) == 0 - } - // Now we check small.Start >= big.Start, and small.End <= big.End - if len(big.Start) != 0 && bytes.Compare(small.Start, big.Start) < 0 { - return false + + // If b covers the entire KeyRange, a must also cover the entire KeyRange. + if KeyRangeIsComplete(b) { + return KeyRangeIsComplete(a) } - if len(big.End) != 0 && (len(small.End) == 0 || bytes.Compare(small.End, big.End) > 0) { - return false + + // Ensure b.Start >= a.Start and b.End <= a.End. + if KeyRangeStartCompare(b, a) >= 0 && KeyRangeEndCompare(b, a) <= 0 { + return true } - return true + + return false } // ParseShardingSpec parses a string that describes a sharding @@ -351,11 +306,63 @@ func ParseShardingSpec(spec string) ([]*topodatapb.KeyRange, error) { return ranges, nil } -var krRegexp = regexp.MustCompile(`^[0-9a-fA-F]*-[0-9a-fA-F]*$`) +// IsValidKeyRange returns true if the string represents a valid key range. +func IsValidKeyRange(keyRangeString string) bool { + return KeyRangePattern.MatchString(keyRangeString) +} -// IsKeyRange returns true if the string represents a keyrange. -func IsKeyRange(kr string) bool { - return krRegexp.MatchString(kr) +// EvenShardsKeyRange returns a key range definition for a shard at index "i", +// assuming range based sharding with "n" equal-width shards in total. +// i starts at 0. +// +// Example: (1, 2) returns the second out of two shards in total i.e. "80-". +// +// This function must not be used in the Vitess code base because Vitess also +// supports shards with different widths. In that case, the output of this +// function would be wrong. +// +// Note: start and end values have trailing zero bytes omitted. +// For example, "80-" has only the first byte (0x80) set. +// We do this to produce the same KeyRange objects as ParseKeyRangeParts() does. +// Because it's using the Go hex methods, it's omitting trailing zero bytes as +// well. +func EvenShardsKeyRange(i, n int) (*topodatapb.KeyRange, error) { + if n <= 0 { + return nil, fmt.Errorf("the shard count must be > 0: %v", n) + } + if i >= n { + return nil, fmt.Errorf("the index of the shard must be less than the total number of shards: %v < %v", i, n) + } + if n&(n-1) != 0 { + return nil, fmt.Errorf("the shard count must be a power of two: %v", n) + } + + // Determine the number of bytes which are required to represent any + // KeyRange start or end for the given n. + // This is required to trim the returned values to the same length e.g. + // (256, 512) should return 8000-8080 as shard key range. + minBytes := 0 + for nn := Uint64Key(n - 1); nn > 0; nn >>= 8 { + minBytes++ + } + + width := Uint64Key(math.MaxUint64)/Uint64Key(n) + 1 + start := Uint64Key(i) * width + end := start + width + + // Note: The byte value is empty if start or end is the min or the max + // respectively. + startBytes := start.Bytes()[:minBytes] + endBytes := end.Bytes()[:minBytes] + if start == 0 { + startBytes = []byte{} + } + if end == 0 { + // Always set the end except for the last shard. In that case, the + // end value (2^64) flows over and is the same as 0. + endBytes = []byte{} + } + return &topodatapb.KeyRange{Start: startBytes, End: endBytes}, nil } // GenerateShardRanges returns shard ranges assuming a keyspace with N shards. diff --git a/go/vt/key/key_test.go b/go/vt/key/key_test.go index 639b81c5f18..8db45aa79b9 100644 --- a/go/vt/key/key_test.go +++ b/go/vt/key/key_test.go @@ -28,7 +28,222 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) -func TestKey(t *testing.T) { +func TestNormalize(t *testing.T) { + type args struct { + id []byte + } + tests := []struct { + name string + args args + want []byte + }{ + { + "empty should empty", + args{[]byte{}}, + []byte{}, + }, + { + "one zero should be empty", + args{[]byte{0x00}}, + []byte{}, + }, + { + "any number of zeroes should be empty", + args{[]byte{0x00, 0x00, 0x00}}, + []byte{}, + }, + { + "one non-zero byte should be left alone", + args{[]byte{0x11}}, + []byte{0x11}, + }, + { + "multiple non-zero bytes should be left alone", + args{[]byte{0x11, 0x22, 0x33}}, + []byte{0x11, 0x22, 0x33}, + }, + { + "zeroes that aren't trailing should be left alone", + args{[]byte{0x11, 0x00, 0x22, 0x00, 0x33, 0x00}}, + []byte{0x11, 0x00, 0x22, 0x00, 0x33}, + }, + { + "excess zero bytes should be removed after a non-zero byte", + args{[]byte{0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, + []byte{0x11}, + }, + { + "excess zero bytes should be removed after multiple non-zero bytes", + args{[]byte{0x11, 0x22, 0x00, 0x00, 0x00}}, + []byte{0x11, 0x22}, + }, + { + "values longer than eight bytes should be supported", + args{[]byte{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0x00}}, + []byte{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, Normalize(tt.args.id), "Normalize(%v)", tt.args.id) + }) + } +} + +func TestCompare(t *testing.T) { + type args struct { + a []byte + b []byte + } + tests := []struct { + name string + args args + want int + }{ + { + "empty ids are equal", + args{[]byte{}, []byte{}}, + 0, + }, + { + "equal full id values are equal", + args{ + []byte{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}, + []byte{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}, + }, + 0, + }, + { + "equal partial id values are equal", + args{ + []byte{0x11, 0x22}, + []byte{0x11, 0x22}, + }, + 0, + }, + { + "equal full and partial id values are equal", + args{[]byte{0x11, 0x22, 0x33, 0x44}, []byte{0x11, 0x22, 0x33, 0x44, 0x00, 0x00, 0x00, 0x00}}, + 0, + }, + { + "equal partial and full id values are equal", + args{[]byte{0x11, 0x22, 0x33, 0x44, 0x00, 0x00, 0x00, 0x00}, []byte{0x11, 0x22, 0x33, 0x44}}, + 0, + }, + {"a less than b", args{[]byte{0x01}, []byte{0x02}}, -1}, + {"a greater than b", args{[]byte{0x02}, []byte{0x01}}, +1}, + { + "equal partial a and b with different lengths", + args{[]byte{0x30, 0x00}, []byte{0x20}}, + 1, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, Compare(tt.args.a, tt.args.b), "Compare(%v, %v)", tt.args.a, tt.args.b) + }) + } +} + +func TestLess(t *testing.T) { + type args struct { + a []byte + b []byte + } + tests := []struct { + name string + args args + want bool + }{ + // Less uses Compare which is already robustly tested, so we're just aiming to ensure that the result + // of the Compare is used correctly in context and not e.g. reversed, so test a few obvious cases. + { + "a is less than b", + args{[]byte{0x01}, []byte{0x02}}, + true, + }, + { + "a is equal to b", + args{[]byte{0x01}, []byte{0x01}}, + false, + }, + { + "a is greater than b", + args{[]byte{0x02}, []byte{0x01}}, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, Less(tt.args.a, tt.args.b), "Less(%v, %v)", tt.args.a, tt.args.b) + }) + } +} + +func TestEqual(t *testing.T) { + type args struct { + a []byte + b []byte + } + tests := []struct { + name string + args args + want bool + }{ + // Equal uses Compare which is already robustly tested, so we're just aiming to ensure that the result + // of the Compare is used correctly in context and not e.g. reversed, so test a few obvious cases. + { + "a is less than b", + args{[]byte{0x01}, []byte{0x02}}, + false, + }, + { + "a is equal to b", + args{[]byte{0x01}, []byte{0x01}}, + true, + }, + { + "a is greater than b", + args{[]byte{0x02}, []byte{0x01}}, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, Equal(tt.args.a, tt.args.b), "Equal(%v, %v)", tt.args.a, tt.args.b) + }) + } +} + +func TestEmpty(t *testing.T) { + type args struct { + id []byte + } + tests := []struct { + name string + args args + want bool + }{ + { + "empty", + args{[]byte{}}, + true, + }, + { + "not empty", + args{[]byte{0x11, 0x22, 0x33}}, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, Empty(tt.args.id), "Empty(%v)", tt.args.id) + }) + } +} + +func TestUint64Key(t *testing.T) { k0 := Uint64Key(0) k1 := Uint64Key(1) k2 := Uint64Key(0x7FFFFFFFFFFFFFFF) @@ -362,7 +577,7 @@ func TestKeyRangeContiguous(t *testing.T) { }, { first: "-", second: "-40", - out: true, + out: false, }, { first: "40-80", second: "c0-", @@ -460,7 +675,398 @@ func TestParseShardingSpec(t *testing.T) { } } -func TestContains(t *testing.T) { +func TestKeyRangeComparisons(t *testing.T) { + type args struct { + a *topodatapb.KeyRange + b *topodatapb.KeyRange + } + type wants struct { + wantStartCompare int + wantStartEqual bool + wantEndCompare int + wantEndEqual bool + wantCompare int + wantEqual bool + } + tests := []struct { + name string + args args + wants wants + }{ + { + name: "a and b are both full range", + args: args{ + a: stringToKeyRange("-"), + b: stringToKeyRange("-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a is equal to b", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, end only) but equal to b (2 digits, end only)", + args: args{ + a: stringToKeyRange("-80"), + b: stringToKeyRange("-80"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, end only) but equal to b (4 digits, end only)", + args: args{ + a: stringToKeyRange("-80"), + b: stringToKeyRange("-8000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, end only) but equal to b (6 digits, end only)", + args: args{ + a: stringToKeyRange("-80"), + b: stringToKeyRange("-800000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, end only) but equal to b (8 digits, end only)", + args: args{ + a: stringToKeyRange("-80"), + b: stringToKeyRange("-80000000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, start only) but equal to b (2 digits, start only)", + args: args{ + stringToKeyRange("80-"), + stringToKeyRange("80-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, start only) but equal to b (4 digits, start only)", + args: args{ + a: stringToKeyRange("80-"), + b: stringToKeyRange("8000-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, start only) but equal to b (6 digits, start only)", + args: args{ + a: stringToKeyRange("80-"), + b: stringToKeyRange("800000-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (2 digit, start only) but equal to b (8 digits, start only)", + args: args{ + a: stringToKeyRange("80-"), + b: stringToKeyRange("80000000-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (4 digits) but equal to b (2 digits)", + args: args{ + a: stringToKeyRange("1000-3000"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a (8 digits) but equal to b (4 digits)", + args: args{ + a: stringToKeyRange("10000000-30000000"), + b: stringToKeyRange("1000-3000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "b (4 digits) but equal to a (2 digits)", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("1000-3000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "b (8 digits) but equal to a (4 digits)", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("10000000-30000000"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 0, + wantEqual: true, + }, + }, + { + name: "a is full range, b is not", + args: args{ + a: stringToKeyRange("-"), + b: stringToKeyRange("20-30"), + }, + wants: wants{ + wantStartCompare: -1, + wantStartEqual: false, + wantEndCompare: 1, + wantEndEqual: false, + wantCompare: -1, + wantEqual: false, + }, + }, + { + name: "b is full range, a is not", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("-"), + }, + wants: wants{ + wantStartCompare: 1, + wantStartEqual: false, + wantEndCompare: -1, + wantEndEqual: false, + wantCompare: 1, + wantEqual: false, + }, + }, + { + name: "a start is greater than b start", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("20-30"), + }, + wants: wants{ + wantStartCompare: -1, + wantStartEqual: false, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: -1, + wantEqual: false, + }, + }, + { + name: "b start is greater than a start", + args: args{ + a: stringToKeyRange("20-30"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: 1, + wantStartEqual: false, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 1, + wantEqual: false, + }, + }, + { + name: "a start is empty, b start is not", + args: args{ + a: stringToKeyRange("-30"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: -1, + wantStartEqual: false, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: -1, + wantEqual: false, + }, + }, + { + name: "b start is empty, a start is not", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("-30"), + }, + wants: wants{ + wantStartCompare: 1, + wantStartEqual: false, + wantEndCompare: 0, + wantEndEqual: true, + wantCompare: 1, + wantEqual: false, + }, + }, + { + name: "a end is greater than b end", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("10-20"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 1, + wantEndEqual: false, + wantCompare: 1, + wantEqual: false, + }, + }, + { + name: "b end is greater than a end", + args: args{ + a: stringToKeyRange("10-20"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: -1, + wantEndEqual: false, + wantCompare: -1, + wantEqual: false, + }, + }, + { + name: "a end is empty, b end is not", + args: args{ + a: stringToKeyRange("10-"), + b: stringToKeyRange("10-30"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: 1, + wantEndEqual: false, + wantCompare: 1, + wantEqual: false, + }, + }, + { + name: "b end is empty, a end is not", + args: args{ + a: stringToKeyRange("10-30"), + b: stringToKeyRange("10-"), + }, + wants: wants{ + wantStartCompare: 0, + wantStartEqual: true, + wantEndCompare: -1, + wantEndEqual: false, + wantCompare: -1, + wantEqual: false, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.wants.wantStartCompare, KeyRangeStartCompare(tt.args.a, tt.args.b), "KeyRangeStartCompare(%v, %v)", tt.args.a, tt.args.b) + assert.Equalf(t, tt.wants.wantStartEqual, KeyRangeStartEqual(tt.args.a, tt.args.b), "KeyRangeStartEqual(%v, %v)", tt.args.a, tt.args.b) + assert.Equalf(t, tt.wants.wantEndCompare, KeyRangeEndCompare(tt.args.a, tt.args.b), "KeyRangeEndCompare(%v, %v)", tt.args.a, tt.args.b) + assert.Equalf(t, tt.wants.wantEndEqual, KeyRangeEndEqual(tt.args.a, tt.args.b), "KeyRangeEndEqual(%v, %v)", tt.args.a, tt.args.b) + assert.Equalf(t, tt.wants.wantCompare, KeyRangeCompare(tt.args.a, tt.args.b), "KeyRangeCompare(%v, %v)", tt.args.a, tt.args.b) + assert.Equalf(t, tt.wants.wantEqual, KeyRangeEqual(tt.args.a, tt.args.b), "KeyRangeEqual(%v, %v)", tt.args.a, tt.args.b) + }) + } +} + +func TestKeyRangeContains(t *testing.T) { var table = []struct { kid string start string @@ -499,120 +1105,321 @@ func TestContains(t *testing.T) { } } -func TestIntersectOverlap(t *testing.T) { - var table = []struct { - a string - b string - c string - d string - intersects bool - overlap string - }{ - {a: "40", b: "80", c: "c0", d: "d0", intersects: false}, - {a: "", b: "80", c: "80", d: "", intersects: false}, - {a: "", b: "80", c: "", d: "40", intersects: true, overlap: "-40"}, - {a: "80", b: "", c: "c0", d: "", intersects: true, overlap: "c0-"}, - {a: "", b: "80", c: "40", d: "80", intersects: true, overlap: "40-80"}, - {a: "40", b: "80", c: "60", d: "a0", intersects: true, overlap: "60-80"}, - {a: "40", b: "80", c: "50", d: "60", intersects: true, overlap: "50-60"}, - {a: "40", b: "80", c: "10", d: "50", intersects: true, overlap: "40-50"}, - {a: "40", b: "80", c: "40", d: "80", intersects: true, overlap: "40-80"}, - {a: "", b: "80", c: "", d: "80", intersects: true, overlap: "-80"}, - {a: "40", b: "", c: "40", d: "", intersects: true, overlap: "40-"}, - {a: "40", b: "80", c: "20", d: "40", intersects: false}, - {a: "80", b: "", c: "80", d: "c0", intersects: true, overlap: "80-c0"}, - {a: "", b: "", c: "c0", d: "d0", intersects: true, overlap: "c0-d0"}, +func TestKeyRangeIntersect(t *testing.T) { + type args struct { + a *topodatapb.KeyRange + b *topodatapb.KeyRange } + tests := []struct { + name string + args args + want bool + }{ + // non-intersecting cases + { + name: "typical half-range split, ascending order", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("80-")}, + want: false, + }, + { + name: "typical half-range split, descending order", + args: args{a: stringToKeyRange("80-"), b: stringToKeyRange("-80")}, + want: false, + }, + { + name: "partial ranges, ascending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("c0-d0")}, + want: false, + }, + { + name: "partial ranges, descending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("20-40")}, + want: false, + }, + { + name: "partial ranges, different key lengths", + args: args{a: stringToKeyRange("4000-8000"), b: stringToKeyRange("20-40")}, + want: false, + }, - for _, el := range table { - a, err := hex.DecodeString(el.a) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - b, err := hex.DecodeString(el.b) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - left := &topodatapb.KeyRange{Start: a, End: b} - c, err := hex.DecodeString(el.c) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - d, err := hex.DecodeString(el.d) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - right := &topodatapb.KeyRange{Start: c, End: d} - if c := KeyRangesIntersect(left, right); c != el.intersects { - t.Errorf("Unexpected result: KeyRangesIntersect for %v and %v yields %v.", left, right, c) - } - overlap, err := KeyRangesOverlap(left, right) - if el.intersects { - if err != nil { - t.Errorf("Unexpected result: KeyRangesOverlap for overlapping %v and %v returned an error: %v", left, right, err) - } else { - got := hex.EncodeToString(overlap.Start) + "-" + hex.EncodeToString(overlap.End) - if got != el.overlap { - t.Errorf("Unexpected result: KeyRangesOverlap for overlapping %v and %v should have returned: %v but got: %v", left, right, el.overlap, got) - } - } - } else { - if err == nil { - t.Errorf("Unexpected result: KeyRangesOverlap for non-overlapping %v and %v should have returned an error", left, right) - } - } + // intersecting cases with a full range + { + name: "full range with full range", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("-")}, + want: true, + }, + { + name: "full range with maximum key partial range", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("80-")}, + want: true, + }, + { + name: "full range with partial range", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("c0-d0")}, + want: true, + }, + { + name: "minimum key partial range with full range", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("-")}, + want: true, + }, + { + name: "partial range with full range", + args: args{a: stringToKeyRange("a0-b0"), b: stringToKeyRange("-")}, + want: true, + }, + + // intersecting cases with only partial ranges + { + name: "the same range, both from minimum key", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("-80")}, + want: true, + }, + { + name: "the same range, both from minimum key, different key lengths", + args: args{a: stringToKeyRange("-8000"), b: stringToKeyRange("-80")}, + want: true, + }, + { + name: "the same range, both to maximum key", + args: args{a: stringToKeyRange("40-"), b: stringToKeyRange("40-")}, + want: true, + }, + { + name: "the same range, both to maximum key, different key lengths", + args: args{a: stringToKeyRange("4000-"), b: stringToKeyRange("40-")}, + want: true, + }, + { + name: "the same range, both with mid-range keys", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("40-80")}, + want: true, + }, + { + name: "the same range, both with mid-range keys, different key lengths", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("4000-8000")}, + want: true, + }, + { + name: "different-sized partial ranges, both from minimum key", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("-40")}, + want: true, + }, + { + name: "different-sized partial ranges, both to maximum key", + args: args{a: stringToKeyRange("80-"), b: stringToKeyRange("c0-")}, + want: true, + }, + { + name: "different-sized partial ranges, from minimum key with mid-range key", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("40-80")}, + want: true, + }, + { + name: "different-sized partial ranges, from minimum key with mid-range key, different key lengths", + args: args{a: stringToKeyRange("-80"), b: stringToKeyRange("4000-8000")}, + want: true, + }, + { + name: "different-sized partial ranges, to maximum key with mid-range key", + args: args{a: stringToKeyRange("80-"), b: stringToKeyRange("80-c0")}, + want: true, + }, + { + name: "different-sized partial ranges, to maximum key with mid-range key, different key lengths", + args: args{a: stringToKeyRange("80-"), b: stringToKeyRange("8000-c000")}, + want: true, + }, + { + name: "partially overlapping ranges, in ascending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("60-a0")}, + want: true, + }, + { + name: "partially overlapping ranges, in descending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("10-50")}, + want: true, + }, + { + name: "partially overlapping ranges, one fully containing the other, in ascending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("50-60")}, + want: true, + }, + { + name: "partially overlapping ranges, one fully containing the other, in descending order", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("30-90")}, + want: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, KeyRangeIntersect(tt.args.a, tt.args.b), "KeyRangeIntersect(%v, %v)", tt.args.a, tt.args.b) + }) } } -func TestKeyRangeIncludes(t *testing.T) { - var table = []struct { - name string - big string - small string - expected bool +func TestKeyRangeContainsKeyRange(t *testing.T) { + type args struct { + a *topodatapb.KeyRange + b *topodatapb.KeyRange + } + var tests = []struct { + name string + args args + want bool }{ - {"big nil, small nil", "nil", "nil", true}, - {"big nil, small non nil, fully partial", "nil", "80-c0", true}, - {"big nil, small non nil, full start", "nil", "-c0", true}, - {"big nil, small non nil, full end", "nil", "80-", true}, - {"big non-nil, fully partial, small nil", "80-c0", "nil", false}, - {"big non-nil, full start, small nil", "-c0", "nil", false}, - {"big non-nil, full end, small nil", "80-", "nil", false}, - {"big full, small full", "-", "-", true}, - {"big full, small partial", "-", "40-60", true}, - {"big partial, small full", "40-60", "-", false}, - - {"big partial, small to the end", "40-60", "40-", false}, - {"big partial, small bigger to the right", "40-60", "40-80", false}, - {"big partial, small equal", "40-60", "40-60", true}, - {"big partial, small smaller right", "40-60", "40-50", true}, - - {"big partial, small to the beginning", "40-60", "-60", false}, - {"big partial, small smaller to the left", "40-60", "20-60", false}, - {"big partial, small bigger left", "40-60", "50-60", true}, - } - - var err error - for _, tc := range table { - var big, small *topodatapb.KeyRange - if tc.big != "nil" { - parts := strings.Split(tc.big, "-") - big, err = ParseKeyRangeParts(parts[0], parts[1]) - if err != nil { - t.Fatalf("test data error in %v: %v", tc.big, err) - } - } - if tc.small != "nil" { - parts := strings.Split(tc.small, "-") - small, err = ParseKeyRangeParts(parts[0], parts[1]) - if err != nil { - t.Fatalf("test data error in %v: %v", tc.small, err) - } - } - got := KeyRangeIncludes(big, small) - if got != tc.expected { - t.Errorf("KeyRangeIncludes for test case '%v' returned %v but expected %v", tc.name, got, tc.expected) - } + // full range contains itself + { + name: "both full range", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("-")}, + want: true, + }, + + // full range always contains a partial range + { + name: "full range, partial range from minimum key", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("-c0")}, + want: true, + }, + { + name: "full range, partial range to maximum key", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("80-")}, + want: true, + }, + { + name: "full range, partial mid-key range", + args: args{a: stringToKeyRange("-"), b: stringToKeyRange("80-c0")}, + want: true, + }, + + // equal partial ranges contain each other + { + name: "equal partial ranges", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("40-60")}, + want: true, + }, + { + name: "equal partial ranges, different size keys", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("4000-6000")}, + want: true, + }, + { + name: "equal partial ranges, different size keys", + args: args{a: stringToKeyRange("4000-6000"), b: stringToKeyRange("40-60")}, + want: true, + }, + + // partial ranges may contain smaller partial ranges + { + name: "partial range, partial touching start", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("40-50")}, + want: true, + }, + { + name: "partial range, partial touching start, different size keys", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("4000-5000")}, + want: true, + }, + { + name: "partial range, partial touching start, different size keys", + args: args{a: stringToKeyRange("4000-8000"), b: stringToKeyRange("40-50")}, + want: true, + }, + { + name: "partial range, partial touching end", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("70-80")}, + want: true, + }, + { + name: "partial range, partial touching end, different size keys", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("7000-8000")}, + want: true, + }, + { + name: "partial range, partial touching end, different size keys", + args: args{a: stringToKeyRange("4000-8000"), b: stringToKeyRange("70-80")}, + want: true, + }, + { + name: "partial range, partial in the middle", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("50-70")}, + want: true, + }, + { + name: "partial range, partial in the middle, different size keys", + args: args{a: stringToKeyRange("40-80"), b: stringToKeyRange("5000-7000")}, + want: true, + }, + { + name: "partial range, partial in the middle, different size keys", + args: args{a: stringToKeyRange("4000-8000"), b: stringToKeyRange("50-70")}, + want: true, + }, + + // partial ranges do not contain the full range + { + name: "partial range from minimum key, full range", + args: args{a: stringToKeyRange("-c0"), b: stringToKeyRange("-")}, + want: false, + }, + { + name: "partial range to maximum key, full range", + args: args{a: stringToKeyRange("80-"), b: stringToKeyRange("-")}, + want: false, + }, + { + name: "partial mid-key range, full range", + args: args{a: stringToKeyRange("80-c0"), b: stringToKeyRange("-")}, + want: false, + }, + + // partial ranges do not contain overlapping but boundary-crossing partial ranges + { + name: "partial range mid-key range, overlapping partial range to maximum key", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("50-")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range to maximum key", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("5000-")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range to maximum key, different size keys", + args: args{a: stringToKeyRange("4000-6000"), b: stringToKeyRange("50-")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range to maximum key, different size keys", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("5000-")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range from minimum key", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("-50")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range from minimum key", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("-5000")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range from minimum key, different size keys", + args: args{a: stringToKeyRange("4000-6000"), b: stringToKeyRange("-50")}, + want: false, + }, + { + name: "partial range mid-key range, overlapping partial range from minimum key, different size keys", + args: args{a: stringToKeyRange("40-60"), b: stringToKeyRange("-5000")}, + want: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, KeyRangeContainsKeyRange(tt.args.a, tt.args.b), "KeyRangeContainsKeyRange(%v, %v)", tt.args.a, tt.args.b) + }) } } @@ -671,65 +1478,40 @@ func BenchmarkKeyRangesIntersect(b *testing.B) { } for i := 0; i < b.N; i++ { - KeyRangesIntersect(kr1, kr2) + KeyRangeIntersect(kr1, kr2) } } -func BenchmarkKeyRangesOverlap(b *testing.B) { - kr1 := &topodatapb.KeyRange{ - Start: []byte{0x40, 0, 0, 0, 0, 0, 0, 0}, - End: []byte{0x80, 0, 0, 0, 0, 0, 0, 0}, - } - kr2 := &topodatapb.KeyRange{ - Start: []byte{0x30, 0, 0, 0, 0, 0, 0, 0}, - End: []byte{0x50, 0, 0, 0, 0, 0, 0, 0}, - } - - for i := 0; i < b.N; i++ { - if _, err := KeyRangesOverlap(kr1, kr2); err != nil { - b.Fatal(err) - } - } -} +func TestIsValidKeyRange(t *testing.T) { + tests := []struct { + arg string + want bool + }{ + // normal cases + {"-", true}, + {"00-", true}, + {"-80", true}, + {"40-80", true}, + {"80-", true}, + {"a0-", true}, + {"-A0", true}, -func TestIsKeyRange(t *testing.T) { - testcases := []struct { - in string - out bool - }{{ - in: "-", - out: true, - }, { - in: "-80", - out: true, - }, { - in: "40-80", - out: true, - }, { - in: "80-", - out: true, - }, { - in: "a0-", - out: true, - }, { - in: "-A0", - out: true, - }, { - in: "", - out: false, - }, { - in: "x-80", - out: false, - }, { - in: "-80x", - out: false, - }, { - in: "select", - out: false, - }} + // special cases + {"0", true}, // equal to "-" - for _, tcase := range testcases { - assert.Equal(t, IsKeyRange(tcase.in), tcase.out, tcase.in) + // invalid cases + {"", false}, // empty is not allowed + {"11", false}, // no hyphen + {"-1", false}, // odd number of digits + {"-111", false}, // odd number of digits + {"1-2", false}, // odd number of digits + {"x-80", false}, // invalid character + {"-80x", false}, // invalid character + {"select", false}, // nonsense + {"+", false}, // nonsense + } + for _, tt := range tests { + assert.Equalf(t, tt.want, IsValidKeyRange(tt.arg), "IsValidKeyRange(%v)", tt.arg) } } diff --git a/go/vt/log/log.go b/go/vt/log/log.go index 339b80fef02..79be1da464c 100644 --- a/go/vt/log/log.go +++ b/go/vt/log/log.go @@ -22,6 +22,10 @@ limitations under the License. package log import ( + "fmt" + "strconv" + "sync/atomic" + "github.com/golang/glog" "github.com/spf13/pflag" ) @@ -78,5 +82,32 @@ var ( // calls this function, or call this function directly before parsing // command-line arguments. func RegisterFlags(fs *pflag.FlagSet) { - fs.Uint64Var(&glog.MaxSize, "log_rotate_max_size", glog.MaxSize, "size in bytes at which logs are rotated (glog.MaxSize)") + flagVal := logRotateMaxSize{ + val: fmt.Sprintf("%d", atomic.LoadUint64(&glog.MaxSize)), + } + fs.Var(&flagVal, "log_rotate_max_size", "size in bytes at which logs are rotated (glog.MaxSize)") +} + +// logRotateMaxSize implements pflag.Value and is used to +// try and provide thread-safe access to glog.MaxSize. +type logRotateMaxSize struct { + val string +} + +func (lrms *logRotateMaxSize) Set(s string) error { + maxSize, err := strconv.ParseUint(s, 10, 64) + if err != nil { + return err + } + atomic.StoreUint64(&glog.MaxSize, maxSize) + lrms.val = s + return nil +} + +func (lrms *logRotateMaxSize) String() string { + return lrms.val +} + +func (lrms *logRotateMaxSize) Type() string { + return "uint64" } diff --git a/go/vt/mysqlctl/backup.go b/go/vt/mysqlctl/backup.go index ec25e6eed92..5f88c00b2c9 100644 --- a/go/vt/mysqlctl/backup.go +++ b/go/vt/mysqlctl/backup.go @@ -17,11 +17,11 @@ limitations under the License. package mysqlctl import ( + "context" "errors" "fmt" "os" "path/filepath" - "strconv" "strings" "time" @@ -30,19 +30,15 @@ import ( "github.com/spf13/pflag" - "vitess.io/vitess/go/vt/servenv" - - "context" - - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/mysqlctl/backupstats" - stats "vitess.io/vitess/go/vt/mysqlctl/backupstats" "vitess.io/vitess/go/vt/mysqlctl/backupstorage" "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vterrors" + stats "vitess.io/vitess/go/vt/mysqlctl/backupstats" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -101,7 +97,7 @@ func init() { func registerBackupFlags(fs *pflag.FlagSet) { fs.BoolVar(&backupStorageCompress, "backup_storage_compress", backupStorageCompress, "if set, the backup files will be compressed.") fs.IntVar(&backupCompressBlockSize, "backup_storage_block_size", backupCompressBlockSize, "if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000).") - fs.IntVar(&backupCompressBlocks, "backup_storage_number_blocks", backupCompressBlocks, "if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression.") + fs.IntVar(&backupCompressBlocks, "backup_storage_number_blocks", backupCompressBlocks, "if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, in parallel, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression.") } // Backup is the main entry point for a backup: @@ -363,6 +359,10 @@ func Restore(ctx context.Context, params RestoreParams) (*BackupManifest, error) if err != nil { return nil, vterrors.Wrap(err, "Failed to find restore engine") } + params.Logger.Infof("Restore: %v", restorePath.String()) + if params.DryRun { + return nil, nil + } // Scope stats to selected backup engine. reParams := params.Copy() reParams.Stats = params.Stats.Scope( @@ -388,21 +388,6 @@ func Restore(ctx context.Context, params RestoreParams) (*BackupManifest, error) return nil, err } - // We disable super_read_only, in case it is in the default MySQL startup - // parameters and will be blocking the writes we need to do in - // PopulateMetadataTables(). We do it blindly, since - // this will fail on MariaDB, which doesn't have super_read_only - // This is safe, since we're restarting MySQL after the restore anyway - params.Logger.Infof("Restore: disabling super_read_only") - if err := params.Mysqld.SetSuperReadOnly(false); err != nil { - if strings.Contains(err.Error(), strconv.Itoa(mysql.ERUnknownSystemVariable)) { - params.Logger.Warningf("Restore: server does not know about super_read_only, continuing anyway...") - } else { - params.Logger.Errorf("Restore: unexpected error while trying to set super_read_only: %v", err) - return nil, err - } - } - params.Logger.Infof("Restore: running mysql_upgrade") if err := params.Mysqld.RunMysqlUpgrade(); err != nil { return nil, vterrors.Wrap(err, "mysql_upgrade failed") @@ -439,5 +424,6 @@ func Restore(ctx context.Context, params RestoreParams) (*BackupManifest, error) stats.DeprecatedRestoreDurationS.Set(int64(time.Since(startTs).Seconds())) params.Stats.Scope(stats.Operation("Restore")).TimedIncrement(time.Since(startTs)) + params.Logger.Infof("Restore: complete") return manifest, nil } diff --git a/go/vt/mysqlctl/backup_test.go b/go/vt/mysqlctl/backup_test.go index b422c81c7c7..d26ca873243 100644 --- a/go/vt/mysqlctl/backup_test.go +++ b/go/vt/mysqlctl/backup_test.go @@ -456,16 +456,17 @@ func createFakeBackupRestoreEnv(t *testing.T) (*fakeBackupRestoreEnv, func()) { stats := backupstats.NewFakeStats() backupParams := BackupParams{ - Cnf: cnf, - Logger: logger, - Mysqld: mysqld, - Concurrency: 1, - HookExtraEnv: map[string]string{}, - TopoServer: nil, - Keyspace: "test", - Shard: "-", - BackupTime: time.Now(), - Stats: stats, + Cnf: cnf, + Logger: logger, + Mysqld: mysqld, + Concurrency: 1, + HookExtraEnv: map[string]string{}, + TopoServer: nil, + Keyspace: "test", + Shard: "-", + BackupTime: time.Now(), + IncrementalFromPos: "", + Stats: stats, } restoreParams := RestoreParams{ @@ -479,12 +480,16 @@ func createFakeBackupRestoreEnv(t *testing.T) (*fakeBackupRestoreEnv, func()) { Keyspace: "test", Shard: "-", StartTime: time.Now(), + RestoreToPos: mysql.Position{}, + DryRun: false, Stats: stats, } manifest := BackupManifest{ BackupTime: time.Now().Add(-1 * time.Hour).Format(time.RFC3339), BackupMethod: "fake", + Keyspace: "test", + Shard: "-", } manifestBytes, err := json.Marshal(manifest) diff --git a/go/vt/mysqlctl/backupengine.go b/go/vt/mysqlctl/backupengine.go index 44f0b0dcbe1..d41780ca9e9 100644 --- a/go/vt/mysqlctl/backupengine.go +++ b/go/vt/mysqlctl/backupengine.go @@ -68,11 +68,11 @@ type BackupParams struct { TabletAlias string // BackupTime is the time at which the backup is being started BackupTime time.Time - // Stats let's backup engines report detailed backup timings. - Stats backupstats.Stats // Position of last known backup. If non empty, then this value indicates the backup should be incremental // and as of this position IncrementalFromPos string + // Stats let's backup engines report detailed backup timings. + Stats backupstats.Stats } func (b BackupParams) Copy() BackupParams { @@ -87,8 +87,8 @@ func (b BackupParams) Copy() BackupParams { b.Shard, b.TabletAlias, b.BackupTime, - b.Stats, b.IncrementalFromPos, + b.Stats, } } @@ -114,13 +114,13 @@ type RestoreParams struct { // StartTime: if non-zero, look for a backup that was taken at or before this time // Otherwise, find the most recent backup StartTime time.Time - // Stats let's restore engines report detailed restore timings. - Stats backupstats.Stats // RestoreToPos hints that a point in time recovery is requested, to recover up to the specific given pos. // When empty, the restore is a normal from full backup RestoreToPos mysql.Position // When DryRun is set, no restore actually takes place; but some of its steps are validated. DryRun bool + // Stats let's restore engines report detailed restore timings. + Stats backupstats.Stats } func (p RestoreParams) Copy() RestoreParams { @@ -135,9 +135,9 @@ func (p RestoreParams) Copy() RestoreParams { p.Keyspace, p.Shard, p.StartTime, - p.Stats, p.RestoreToPos, p.DryRun, + p.Stats, } } diff --git a/go/vt/mysqlctl/backupstats/stats.go b/go/vt/mysqlctl/backupstats/stats.go index e81bd569a97..1d4b643a0e9 100644 --- a/go/vt/mysqlctl/backupstats/stats.go +++ b/go/vt/mysqlctl/backupstats/stats.go @@ -194,6 +194,6 @@ func (s *scopedStats) TimedIncrement(d time.Duration) { // TimedIncrementBytes increments the byte-count and duration of the current scope. func (s *scopedStats) TimedIncrementBytes(b int, d time.Duration) { - s.bytes.Add(s.labelValues, 1) + s.bytes.Add(s.labelValues, int64(b)) s.durationNs.Add(s.labelValues, int64(d.Nanoseconds())) } diff --git a/go/vt/mysqlctl/backupstats/stats_test.go b/go/vt/mysqlctl/backupstats/stats_test.go index f88bfdf8fb6..a6be9da973e 100644 --- a/go/vt/mysqlctl/backupstats/stats_test.go +++ b/go/vt/mysqlctl/backupstats/stats_test.go @@ -1,6 +1,7 @@ package backupstats import ( + "fmt" "strings" "testing" "time" @@ -11,6 +12,7 @@ import ( ) func TestBackupStats(t *testing.T) { + require.Nil(t, backupBytes) require.Nil(t, backupCount) require.Nil(t, backupDurationNs) require.Nil(t, restoreCount) @@ -19,13 +21,16 @@ func TestBackupStats(t *testing.T) { BackupStats() defer resetStats() + require.NotNil(t, backupBytes) require.NotNil(t, backupCount) require.NotNil(t, backupDurationNs) + require.Nil(t, restoreBytes) require.Nil(t, restoreCount) require.Nil(t, restoreDurationNs) } func TestRestoreStats(t *testing.T) { + require.Nil(t, backupBytes) require.Nil(t, backupCount) require.Nil(t, backupDurationNs) require.Nil(t, restoreCount) @@ -34,8 +39,10 @@ func TestRestoreStats(t *testing.T) { RestoreStats() defer resetStats() + require.Nil(t, backupBytes) require.Nil(t, backupCount) require.Nil(t, backupDurationNs) + require.NotNil(t, restoreBytes) require.NotNil(t, restoreCount) require.NotNil(t, restoreDurationNs) } @@ -94,16 +101,18 @@ func TestScope(t *testing.T) { } func TestStatsAreNotInitializedByDefault(t *testing.T) { + require.Nil(t, backupBytes) require.Nil(t, backupCount) require.Nil(t, backupDurationNs) + require.Nil(t, restoreBytes) require.Nil(t, restoreCount) require.Nil(t, restoreDurationNs) } func TestTimedIncrement(t *testing.T) { - bytes := stats.NewCountersWithMultiLabels("test_timed_increment_bytes", "", labels) - count := stats.NewCountersWithMultiLabels("test_timed_increment_count", "", labels) - durationNs := stats.NewCountersWithMultiLabels("test_timed_increment_duration_ns", "", labels) + bytes := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_bytes", t.Name()), "", labels) + count := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_count", t.Name()), "", labels) + durationNs := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_duration_ns", t.Name()), "", labels) stats := newScopedStats(bytes, count, durationNs, nil) @@ -112,6 +121,8 @@ func TestTimedIncrement(t *testing.T) { stats.TimedIncrement(duration) + require.Equal(t, 0, len(bytes.Counts())) + require.Equal(t, 1, len(count.Counts())) require.Equal(t, int64(1), count.Counts()[path]) @@ -120,6 +131,8 @@ func TestTimedIncrement(t *testing.T) { stats.TimedIncrement(duration) + require.Equal(t, 0, len(bytes.Counts())) + require.Equal(t, 1, len(count.Counts())) require.Equal(t, int64(2), count.Counts()[path]) @@ -127,9 +140,44 @@ func TestTimedIncrement(t *testing.T) { require.Equal(t, 2*duration.Nanoseconds(), durationNs.Counts()[path]) } +func TestTimedIncrementBytes(t *testing.T) { + bytes := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_bytes", t.Name()), "", labels) + count := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_count", t.Name()), "", labels) + durationNs := stats.NewCountersWithMultiLabels(fmt.Sprintf("%s_test_timed_increment_duration_ns", t.Name()), "", labels) + + stats := newScopedStats(bytes, count, durationNs, nil) + + incBytes := 1024 + duration := 10 * time.Second + path := strings.Join([]string{unscoped, unscoped, unscoped}, ".") + + stats.TimedIncrementBytes(incBytes, duration) + + require.Equal(t, 1, len(bytes.Counts())) + require.Equal(t, int64(incBytes), bytes.Counts()[path]) + + require.Equal(t, 0, len(count.Counts())) + + require.Equal(t, 1, len(durationNs.Counts())) + require.Equal(t, duration.Nanoseconds(), durationNs.Counts()[path]) + + stats.TimedIncrementBytes(incBytes, duration) + + require.Equal(t, 1, len(bytes.Counts())) + require.Equal(t, int64(2*incBytes), bytes.Counts()[path]) + + require.Equal(t, 0, len(count.Counts())) + + require.Equal(t, 1, len(durationNs.Counts())) + require.Equal(t, 2*duration.Nanoseconds(), durationNs.Counts()[path]) +} + func resetStats() { + backupBytes = nil backupCount = nil backupDurationNs = nil + restoreBytes = nil restoreCount = nil restoreDurationNs = nil + backupBytes = nil } diff --git a/go/vt/mysqlctl/binlogs_gtid_test.go b/go/vt/mysqlctl/binlogs_gtid_test.go index f09d88c6544..c9d31117829 100644 --- a/go/vt/mysqlctl/binlogs_gtid_test.go +++ b/go/vt/mysqlctl/binlogs_gtid_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Package mysqlctl_test is the blackbox tests for package mysqlctl. // Tests that need to use fakemysqldaemon must be written as blackbox tests; // since fakemysqldaemon imports mysqlctl, importing fakemysqldaemon in diff --git a/go/vt/mysqlctl/builtinbackupengine.go b/go/vt/mysqlctl/builtinbackupengine.go index 1cee226d7ca..57b3398fa43 100644 --- a/go/vt/mysqlctl/builtinbackupengine.go +++ b/go/vt/mysqlctl/builtinbackupengine.go @@ -318,7 +318,8 @@ func (be *BuiltinBackupEngine) executeFullBackup(ctx context.Context, params Bac // Save initial state so we can restore. replicaStartRequired := false sourceIsPrimary := false - readOnly := true //nolint + superReadOnly := true //nolint + readOnly := true //nolint var replicationPosition mysql.Position semiSyncSource, semiSyncReplica := params.Mysqld.SemiSyncEnabled() @@ -338,16 +339,30 @@ func (be *BuiltinBackupEngine) executeFullBackup(ctx context.Context, params Bac // get the read-only flag readOnly, err = params.Mysqld.IsReadOnly() if err != nil { - return false, vterrors.Wrap(err, "can't get read-only status") + return false, vterrors.Wrap(err, "failed to get read_only status") } + superReadOnly, err = params.Mysqld.IsSuperReadOnly() + if err != nil { + return false, vterrors.Wrap(err, "can't get super_read_only status") + } + log.Infof("Flag values during full backup, read_only: %v, super_read_only:%t", readOnly, superReadOnly) // get the replication position if sourceIsPrimary { - if !readOnly { - params.Logger.Infof("turning primary read-only before backup") - if err = params.Mysqld.SetReadOnly(true); err != nil { - return false, vterrors.Wrap(err, "can't set read-only status") + // No need to set read_only because super_read_only will implicitly set read_only to true as well. + if !superReadOnly { + params.Logger.Infof("Enabling super_read_only on primary prior to backup") + if _, err = params.Mysqld.SetSuperReadOnly(true); err != nil { + return false, vterrors.Wrap(err, "failed to enable super_read_only") } + defer func() { + // Resetting super_read_only back to its original value + params.Logger.Infof("resetting mysqld super_read_only to %v", superReadOnly) + if _, err := params.Mysqld.SetSuperReadOnly(false); err != nil { + log.Error("Failed to set super_read_only back to its original value") + } + }() + } replicationPosition, err = params.Mysqld.PrimaryPosition() if err != nil { @@ -398,9 +413,9 @@ func (be *BuiltinBackupEngine) executeFullBackup(ctx context.Context, params Bac return usable, vterrors.Wrap(err, "can't restart mysqld") } - // And set read-only mode - params.Logger.Infof("resetting mysqld read-only to %v", readOnly) - if err := params.Mysqld.SetReadOnly(readOnly); err != nil { + // Resetting super_read_only back to its original value + params.Logger.Infof("resetting mysqld super_read_only to %v", superReadOnly) + if _, err := params.Mysqld.SetSuperReadOnly(superReadOnly); err != nil { return usable, err } @@ -785,7 +800,6 @@ func (be *BuiltinBackupEngine) executeRestoreFullBackup(ctx context.Context, par // The underlying mysql database is expected to be up and running. func (be *BuiltinBackupEngine) executeRestoreIncrementalBackup(ctx context.Context, params RestoreParams, bh backupstorage.BackupHandle, bm builtinBackupManifest) error { params.Logger.Infof("Restoring incremental backup to position: %v", bm.Position) - createdDir, err := be.restoreFiles(context.Background(), params, bh, bm) defer os.RemoveAll(createdDir) mysqld, ok := params.Mysqld.(*Mysqld) @@ -819,7 +833,6 @@ func (be *BuiltinBackupEngine) executeRestoreIncrementalBackup(ctx context.Conte func (be *BuiltinBackupEngine) ExecuteRestore(ctx context.Context, params RestoreParams, bh backupstorage.BackupHandle) (*BackupManifest, error) { var bm builtinBackupManifest - if err := getBackupManifestInto(ctx, bh, &bm); err != nil { return nil, err } @@ -946,6 +959,7 @@ func (be *BuiltinBackupEngine) restoreFile(ctx context.Context, params RestorePa if !bm.SkipCompress { var decompressor io.ReadCloser var deCompressionEngine = bm.CompressionEngine + if deCompressionEngine == "" { // for backward compatibility deCompressionEngine = PgzipCompressor diff --git a/go/vt/mysqlctl/cmd.go b/go/vt/mysqlctl/cmd.go index e1524da3796..5c3bda11437 100644 --- a/go/vt/mysqlctl/cmd.go +++ b/go/vt/mysqlctl/cmd.go @@ -28,7 +28,7 @@ import ( // CreateMysqldAndMycnf returns a Mysqld and a Mycnf object to use for working with a MySQL // installation that hasn't been set up yet. -func CreateMysqldAndMycnf(tabletUID uint32, mysqlSocket string, mysqlPort int32) (*Mysqld, *Mycnf, error) { +func CreateMysqldAndMycnf(tabletUID uint32, mysqlSocket string, mysqlPort int) (*Mysqld, *Mycnf, error) { mycnf := NewMycnf(tabletUID, mysqlPort) // Choose a random MySQL server-id, since this is a fresh data dir. // We don't want to use the tablet UID as the MySQL server-id, diff --git a/go/vt/mysqlctl/fakemysqldaemon.go b/go/vt/mysqlctl/fakemysqldaemon.go index 92bcc586973..4fd6bfad3b3 100644 --- a/go/vt/mysqlctl/fakemysqldaemon.go +++ b/go/vt/mysqlctl/fakemysqldaemon.go @@ -17,6 +17,7 @@ limitations under the License. package mysqlctl import ( + "context" "fmt" "reflect" "strings" @@ -24,8 +25,6 @@ import ( "sync/atomic" "time" - "context" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/fakesqldb" "vitess.io/vitess/go/sqltypes" @@ -93,16 +92,16 @@ type FakeMysqlDaemon struct { CurrentSourceHost string // CurrentSourcePort is returned by ReplicationStatus - CurrentSourcePort int + CurrentSourcePort int32 // ReplicationLagSeconds is returned by ReplicationStatus - ReplicationLagSeconds uint + ReplicationLagSeconds uint32 // ReadOnly is the current value of the flag ReadOnly bool // SuperReadOnly is the current value of the flag - SuperReadOnly bool + SuperReadOnly atomic.Bool // SetReplicationPositionPos is matched against the input of SetReplicationPosition. // If it doesn't match, SetReplicationPosition will return an error. @@ -368,6 +367,11 @@ func (fmd *FakeMysqlDaemon) IsReadOnly() (bool, error) { return fmd.ReadOnly, nil } +// IsSuperReadOnly is part of the MysqlDaemon interface +func (fmd *FakeMysqlDaemon) IsSuperReadOnly() (bool, error) { + return fmd.SuperReadOnly.Load(), nil +} + // SetReadOnly is part of the MysqlDaemon interface func (fmd *FakeMysqlDaemon) SetReadOnly(on bool) error { fmd.ReadOnly = on @@ -375,10 +379,10 @@ func (fmd *FakeMysqlDaemon) SetReadOnly(on bool) error { } // SetSuperReadOnly is part of the MysqlDaemon interface -func (fmd *FakeMysqlDaemon) SetSuperReadOnly(on bool) error { - fmd.SuperReadOnly = on +func (fmd *FakeMysqlDaemon) SetSuperReadOnly(on bool) (ResetSuperReadOnlyFunc, error) { + fmd.SuperReadOnly.Store(on) fmd.ReadOnly = on - return nil + return nil, nil } // StartReplication is part of the MysqlDaemon interface. @@ -439,7 +443,7 @@ func (fmd *FakeMysqlDaemon) SetReplicationPosition(ctx context.Context, pos mysq } // SetReplicationSource is part of the MysqlDaemon interface. -func (fmd *FakeMysqlDaemon) SetReplicationSource(ctx context.Context, host string, port int, stopReplicationBefore bool, startReplicationAfter bool) error { +func (fmd *FakeMysqlDaemon) SetReplicationSource(ctx context.Context, host string, port int32, stopReplicationBefore bool, startReplicationAfter bool) error { input := fmt.Sprintf("%v:%v", host, port) found := false for _, sourceInput := range fmd.SetReplicationSourceInputs { diff --git a/go/vt/mysqlctl/mycnf.go b/go/vt/mysqlctl/mycnf.go index fa853841e67..3af6b8e8607 100644 --- a/go/vt/mysqlctl/mycnf.go +++ b/go/vt/mysqlctl/mycnf.go @@ -41,7 +41,7 @@ type Mycnf struct { // MysqlPort is the port for the MySQL server running on this machine. // It is mainly used to communicate with topology server. - MysqlPort int32 + MysqlPort int // DataDir is where the table files are // (used by vt software for Clone) @@ -184,17 +184,21 @@ func ReadMycnf(mycnf *Mycnf) (*Mycnf, error) { mycnf.mycnfMap[lval] = rval } - serverID, err := mycnf.lookupInt("server-id") + serverIDStr, err := mycnf.lookupWithDefault("server-id", "") if err != nil { return nil, err } + serverID, err := strconv.ParseUint(serverIDStr, 10, 32) + if err != nil { + return nil, fmt.Errorf("failed to convert server-id: %v", err) + } mycnf.ServerID = uint32(serverID) port, err := mycnf.lookupInt("port") if err != nil { return nil, err } - mycnf.MysqlPort = int32(port) + mycnf.MysqlPort = port mapping := map[string]*string{ "datadir": &mycnf.DataDir, diff --git a/go/vt/mysqlctl/mycnf_flag.go b/go/vt/mysqlctl/mycnf_flag.go index 2612b38cc03..33a18d69940 100644 --- a/go/vt/mysqlctl/mycnf_flag.go +++ b/go/vt/mysqlctl/mycnf_flag.go @@ -97,7 +97,7 @@ func NewMycnfFromFlags(uid uint32) (mycnf *Mycnf, err error) { log.Info("mycnf_server_id is specified, using command line parameters for mysql config") return &Mycnf{ ServerID: uint32(flagServerID), - MysqlPort: int32(flagMysqlPort), + MysqlPort: flagMysqlPort, DataDir: flagDataDir, InnodbDataHomeDir: flagInnodbDataHomeDir, InnodbLogGroupHomeDir: flagInnodbLogGroupHomeDir, diff --git a/go/vt/mysqlctl/mycnf_gen.go b/go/vt/mysqlctl/mycnf_gen.go index 2ac47fe617b..b29d152707f 100644 --- a/go/vt/mysqlctl/mycnf_gen.go +++ b/go/vt/mysqlctl/mycnf_gen.go @@ -73,7 +73,7 @@ func registerMyCnfFlags(fs *pflag.FlagSet) { // uid is a unique id for a particular tablet - it must be unique within the // tabletservers deployed within a keyspace, lest there be collisions on disk. // mysqldPort needs to be unique per instance per machine. -func NewMycnf(tabletUID uint32, mysqlPort int32) *Mycnf { +func NewMycnf(tabletUID uint32, mysqlPort int) *Mycnf { cnf := new(Mycnf) cnf.Path = MycnfFile(tabletUID) tabletDir := TabletDir(tabletUID) diff --git a/go/vt/mysqlctl/mysql_daemon.go b/go/vt/mysqlctl/mysql_daemon.go index ac0aede5614..190b81fb001 100644 --- a/go/vt/mysqlctl/mysql_daemon.go +++ b/go/vt/mysqlctl/mysql_daemon.go @@ -72,10 +72,11 @@ type MysqlDaemon interface { ResetReplication(ctx context.Context) error PrimaryPosition() (mysql.Position, error) IsReadOnly() (bool, error) + IsSuperReadOnly() (bool, error) SetReadOnly(on bool) error - SetSuperReadOnly(on bool) error + SetSuperReadOnly(on bool) (ResetSuperReadOnlyFunc, error) SetReplicationPosition(ctx context.Context, pos mysql.Position) error - SetReplicationSource(ctx context.Context, host string, port int, stopReplicationBefore bool, startReplicationAfter bool) error + SetReplicationSource(ctx context.Context, host string, port int32, stopReplicationBefore bool, startReplicationAfter bool) error WaitForReparentJournal(ctx context.Context, timeCreatedNS int64) error WaitSourcePos(context.Context, mysql.Position) error diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 54e65338e87..c9cb04e8b76 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -667,7 +667,7 @@ func (mysqld *Mysqld) InitConfig(cnf *Mycnf) error { // generate / configure a my.cnf file install a skeleton database, // and apply the provided initial SQL file. func (mysqld *Mysqld) Init(ctx context.Context, cnf *Mycnf, initDBSQLFile string) error { - log.Infof("mysqlctl.Init") + log.Infof("mysqlctl.Init running with contents previously embedded from %s", initDBSQLFile) err := mysqld.InitConfig(cnf) if err != nil { log.Errorf("%s", err.Error()) @@ -695,7 +695,6 @@ func (mysqld *Mysqld) Init(ctx context.Context, cnf *Mycnf, initDBSQLFile string log.Errorf("failed starting mysqld in time: %v\n%v", err, readTailOfMysqldErrorLog(cnf.ErrorLogPath)) return err } - if initDBSQLFile == "" { // default to built-in if err := mysqld.executeMysqlScript(params, strings.NewReader(config.DefaultInitDB)); err != nil { return fmt.Errorf("failed to initialize mysqld: %v", err) @@ -1224,6 +1223,7 @@ func (mysqld *Mysqld) applyBinlogFile(binlogFile string, includeGTIDs mysql.GTID gtids, ) } + args = append(args, binlogFile) mysqlbinlogCmd = exec.Command(name, args...) @@ -1252,6 +1252,29 @@ func (mysqld *Mysqld) applyBinlogFile(binlogFile string, includeGTIDs mysql.GTID args := []string{ "--defaults-extra-file=" + cnf, } + + // We disable super_read_only, in case it is in the default MySQL startup + // parameters. We do it blindly, since this will fail on MariaDB, which doesn't + // have super_read_only This is safe, since we're restarting MySQL after the restore anyway + log.Infof("applyBinlogFile: disabling super_read_only") + resetFunc, err := mysqld.SetSuperReadOnly(false) + if err != nil { + if sqlErr, ok := err.(*mysql.SQLError); ok && sqlErr.Number() == mysql.ERUnknownSystemVariable { + log.Warningf("applyBinlogFile: server does not know about super_read_only, continuing anyway...") + } else { + log.Errorf("applyBinlogFile: unexpected error while trying to set super_read_only: %v", err) + return err + } + } + if resetFunc != nil { + defer func() { + err := resetFunc() + if err != nil { + log.Error("Not able to set super_read_only to its original value during applyBinlogFile.") + } + }() + } + mysqlCmd = exec.Command(name, args...) mysqlCmd.Dir = dir mysqlCmd.Env = env diff --git a/go/vt/mysqlctl/query.go b/go/vt/mysqlctl/query.go index 311828b4535..348600e28ae 100644 --- a/go/vt/mysqlctl/query.go +++ b/go/vt/mysqlctl/query.go @@ -17,12 +17,11 @@ limitations under the License. package mysqlctl import ( + "context" "fmt" "strings" "time" - "context" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/dbconnpool" @@ -94,7 +93,6 @@ func (mysqld *Mysqld) FetchSuperQuery(ctx context.Context, query string) (*sqlty return nil, connErr } defer conn.Recycle() - log.V(6).Infof("fetch %v", query) qr, err := mysqld.executeFetchContext(ctx, conn, query, 10000, true) if err != nil { return nil, err diff --git a/go/vt/mysqlctl/replication.go b/go/vt/mysqlctl/replication.go index 1f9ca28af7c..10258b16d2c 100644 --- a/go/vt/mysqlctl/replication.go +++ b/go/vt/mysqlctl/replication.go @@ -21,6 +21,7 @@ Handle creating replicas and setting up the replication streams. package mysqlctl import ( + "context" "errors" "fmt" "net" @@ -30,14 +31,14 @@ import ( "vitess.io/vitess/go/vt/vtgate/evalengine" - "context" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/netutil" "vitess.io/vitess/go/vt/hook" "vitess.io/vitess/go/vt/log" ) +type ResetSuperReadOnlyFunc func() error + // WaitForReplicationStart waits until the deadline for replication to start. // This validates the current primary is correct and can be connected to. func WaitForReplicationStart(mysqld MysqlDaemon, replicaStartDeadline int) error { @@ -231,6 +232,22 @@ func (mysqld *Mysqld) IsReadOnly() (bool, error) { return false, nil } +// IsSuperReadOnly return true if the instance is super read only +func (mysqld *Mysqld) IsSuperReadOnly() (bool, error) { + qr, err := mysqld.FetchSuperQuery(context.TODO(), "SELECT @@global.super_read_only") + if err != nil { + return false, err + } + if err == nil && len(qr.Rows) == 1 { + sro := qr.Rows[0][0].ToString() + if sro == "1" || sro == "ON" { + return true, nil + } + } + + return false, nil +} + // SetReadOnly set/unset the read_only flag func (mysqld *Mysqld) SetReadOnly(on bool) error { // temp logging, to be removed in v17 @@ -253,15 +270,52 @@ func (mysqld *Mysqld) SetReadOnly(on bool) error { return mysqld.ExecuteSuperQuery(context.TODO(), query) } -// SetSuperReadOnly set/unset the super_read_only flag -func (mysqld *Mysqld) SetSuperReadOnly(on bool) error { +// SetSuperReadOnly set/unset the super_read_only flag. +// Returns a function which is called to set super_read_only back to its original value. +func (mysqld *Mysqld) SetSuperReadOnly(on bool) (ResetSuperReadOnlyFunc, error) { + // return function for switching `OFF` super_read_only + var resetFunc ResetSuperReadOnlyFunc + var disableFunc = func() error { + query := "SET GLOBAL super_read_only = 'OFF'" + err := mysqld.ExecuteSuperQuery(context.Background(), query) + return err + } + + // return function for switching `ON` super_read_only. + var enableFunc = func() error { + query := "SET GLOBAL super_read_only = 'ON'" + err := mysqld.ExecuteSuperQuery(context.Background(), query) + return err + } + + superReadOnlyEnabled, err := mysqld.IsSuperReadOnly() + if err != nil { + return nil, err + } + + // If non-idempotent then set the right call-back. + // We are asked to turn on super_read_only but original value is false, + // therefore return disableFunc, that can be used as defer by caller. + if on && !superReadOnlyEnabled { + resetFunc = disableFunc + } + // We are asked to turn off super_read_only but original value is true, + // therefore return enableFunc, that can be used as defer by caller. + if !on && superReadOnlyEnabled { + resetFunc = enableFunc + } + query := "SET GLOBAL super_read_only = " if on { - query += "ON" + query += "'ON'" } else { - query += "OFF" + query += "'OFF'" } - return mysqld.ExecuteSuperQuery(context.TODO(), query) + if err := mysqld.ExecuteSuperQuery(context.Background(), query); err != nil { + return nil, err + } + + return resetFunc, nil } // WaitSourcePos lets replicas wait to given replication position @@ -392,7 +446,7 @@ func (mysqld *Mysqld) SetReplicationPosition(ctx context.Context, pos mysql.Posi // SetReplicationSource makes the provided host / port the primary. It optionally // stops replication before, and starts it after. -func (mysqld *Mysqld) SetReplicationSource(ctx context.Context, host string, port int, replicationStopBefore bool, replicationStartAfter bool) error { +func (mysqld *Mysqld) SetReplicationSource(ctx context.Context, host string, port int32, stopReplicationBefore bool, startReplicationAfter bool) error { params, err := mysqld.dbcfgs.ReplConnector().MysqlParams() if err != nil { return err @@ -404,7 +458,7 @@ func (mysqld *Mysqld) SetReplicationSource(ctx context.Context, host string, por defer conn.Recycle() cmds := []string{} - if replicationStopBefore { + if stopReplicationBefore { cmds = append(cmds, conn.StopReplicationCommand()) } // Reset replication parameters commands makes the instance forget the source host port @@ -417,7 +471,7 @@ func (mysqld *Mysqld) SetReplicationSource(ctx context.Context, host string, por cmds = append(cmds, conn.ResetReplicationParametersCommands()...) smc := conn.SetReplicationSourceCommand(params, host, port, int(replicationConnectRetry.Seconds())) cmds = append(cmds, smc) - if replicationStartAfter { + if startReplicationAfter { cmds = append(cmds, conn.StartReplicationCommand()) } return mysqld.executeSuperQueryListConn(ctx, conn, cmds) @@ -684,7 +738,7 @@ func (mysqld *Mysqld) SemiSyncClients() uint32 { return 0 } countStr := qr.Rows[0][1].ToString() - count, _ := strconv.ParseUint(countStr, 10, 0) + count, _ := strconv.ParseUint(countStr, 10, 32) return uint32(count) } @@ -694,8 +748,8 @@ func (mysqld *Mysqld) SemiSyncSettings() (timeout uint64, numReplicas uint32) { if err != nil { return 0, 0 } - timeout, _ = strconv.ParseUint(vars["rpl_semi_sync_master_timeout"], 10, 0) - numReplicasUint, _ := strconv.ParseUint(vars["rpl_semi_sync_master_wait_for_slave_count"], 10, 0) + timeout, _ = strconv.ParseUint(vars["rpl_semi_sync_master_timeout"], 10, 64) + numReplicasUint, _ := strconv.ParseUint(vars["rpl_semi_sync_master_wait_for_slave_count"], 10, 32) return timeout, uint32(numReplicasUint) } diff --git a/go/vt/proto/automation/automation.pb.go b/go/vt/proto/automation/automation.pb.go deleted file mode 100644 index 294249df1fc..00000000000 --- a/go/vt/proto/automation/automation.pb.go +++ /dev/null @@ -1,934 +0,0 @@ -// -//Copyright 2019 The Vitess Authors. -// -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. - -// Protobuf data structures for the automation framework. - -// Messages (e.g. Task) are used both for checkpoint data and API access -// (e.g. retrieving the current status of a pending cluster operation). - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v3.21.3 -// source: automation.proto - -package automation - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ClusterOperationState int32 - -const ( - ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE ClusterOperationState = 0 - ClusterOperationState_CLUSTER_OPERATION_NOT_STARTED ClusterOperationState = 1 - ClusterOperationState_CLUSTER_OPERATION_RUNNING ClusterOperationState = 2 - ClusterOperationState_CLUSTER_OPERATION_DONE ClusterOperationState = 3 -) - -// Enum value maps for ClusterOperationState. -var ( - ClusterOperationState_name = map[int32]string{ - 0: "UNKNOWN_CLUSTER_OPERATION_STATE", - 1: "CLUSTER_OPERATION_NOT_STARTED", - 2: "CLUSTER_OPERATION_RUNNING", - 3: "CLUSTER_OPERATION_DONE", - } - ClusterOperationState_value = map[string]int32{ - "UNKNOWN_CLUSTER_OPERATION_STATE": 0, - "CLUSTER_OPERATION_NOT_STARTED": 1, - "CLUSTER_OPERATION_RUNNING": 2, - "CLUSTER_OPERATION_DONE": 3, - } -) - -func (x ClusterOperationState) Enum() *ClusterOperationState { - p := new(ClusterOperationState) - *p = x - return p -} - -func (x ClusterOperationState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClusterOperationState) Descriptor() protoreflect.EnumDescriptor { - return file_automation_proto_enumTypes[0].Descriptor() -} - -func (ClusterOperationState) Type() protoreflect.EnumType { - return &file_automation_proto_enumTypes[0] -} - -func (x ClusterOperationState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClusterOperationState.Descriptor instead. -func (ClusterOperationState) EnumDescriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{0} -} - -type TaskState int32 - -const ( - TaskState_UNKNOWN_TASK_STATE TaskState = 0 - TaskState_NOT_STARTED TaskState = 1 - TaskState_RUNNING TaskState = 2 - TaskState_DONE TaskState = 3 -) - -// Enum value maps for TaskState. -var ( - TaskState_name = map[int32]string{ - 0: "UNKNOWN_TASK_STATE", - 1: "NOT_STARTED", - 2: "RUNNING", - 3: "DONE", - } - TaskState_value = map[string]int32{ - "UNKNOWN_TASK_STATE": 0, - "NOT_STARTED": 1, - "RUNNING": 2, - "DONE": 3, - } -) - -func (x TaskState) Enum() *TaskState { - p := new(TaskState) - *p = x - return p -} - -func (x TaskState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskState) Descriptor() protoreflect.EnumDescriptor { - return file_automation_proto_enumTypes[1].Descriptor() -} - -func (TaskState) Type() protoreflect.EnumType { - return &file_automation_proto_enumTypes[1] -} - -func (x TaskState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskState.Descriptor instead. -func (TaskState) EnumDescriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{1} -} - -type ClusterOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // TaskContainer are processed sequentially, one at a time. - SerialTasks []*TaskContainer `protobuf:"bytes,2,rep,name=serial_tasks,json=serialTasks,proto3" json:"serial_tasks,omitempty"` - // Cached value. This has to be re-evaluated e.g. after a checkpoint load because running tasks may have already finished. - State ClusterOperationState `protobuf:"varint,3,opt,name=state,proto3,enum=automation.ClusterOperationState" json:"state,omitempty"` - // Error of the first task which failed. Set after state advanced to CLUSTER_OPERATION_DONE. If empty, all tasks succeeded. Cached value, see state above. - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ClusterOperation) Reset() { - *x = ClusterOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterOperation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterOperation) ProtoMessage() {} - -func (x *ClusterOperation) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterOperation.ProtoReflect.Descriptor instead. -func (*ClusterOperation) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{0} -} - -func (x *ClusterOperation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ClusterOperation) GetSerialTasks() []*TaskContainer { - if x != nil { - return x.SerialTasks - } - return nil -} - -func (x *ClusterOperation) GetState() ClusterOperationState { - if x != nil { - return x.State - } - return ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE -} - -func (x *ClusterOperation) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -// TaskContainer holds one or more task which may be executed in parallel. -// "concurrency", if > 0, limits the amount of concurrently executed tasks. -type TaskContainer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ParallelTasks []*Task `protobuf:"bytes,1,rep,name=parallel_tasks,json=parallelTasks,proto3" json:"parallel_tasks,omitempty"` - Concurrency int32 `protobuf:"varint,2,opt,name=concurrency,proto3" json:"concurrency,omitempty"` -} - -func (x *TaskContainer) Reset() { - *x = TaskContainer{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskContainer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskContainer) ProtoMessage() {} - -func (x *TaskContainer) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskContainer.ProtoReflect.Descriptor instead. -func (*TaskContainer) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{1} -} - -func (x *TaskContainer) GetParallelTasks() []*Task { - if x != nil { - return x.ParallelTasks - } - return nil -} - -func (x *TaskContainer) GetConcurrency() int32 { - if x != nil { - return x.Concurrency - } - return 0 -} - -// Task represents a specific task which should be automatically executed. -type Task struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Task specification. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Runtime data. - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - State TaskState `protobuf:"varint,4,opt,name=state,proto3,enum=automation.TaskState" json:"state,omitempty"` - // Set after state advanced to DONE. - Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` - // Set after state advanced to DONE. If empty, the task did succeed. - Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *Task) Reset() { - *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Task) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Task) ProtoMessage() {} - -func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Task.ProtoReflect.Descriptor instead. -func (*Task) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{2} -} - -func (x *Task) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Task) GetParameters() map[string]string { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *Task) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Task) GetState() TaskState { - if x != nil { - return x.State - } - return TaskState_UNKNOWN_TASK_STATE -} - -func (x *Task) GetOutput() string { - if x != nil { - return x.Output - } - return "" -} - -func (x *Task) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type EnqueueClusterOperationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *EnqueueClusterOperationRequest) Reset() { - *x = EnqueueClusterOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnqueueClusterOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueClusterOperationRequest) ProtoMessage() {} - -func (x *EnqueueClusterOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueClusterOperationRequest.ProtoReflect.Descriptor instead. -func (*EnqueueClusterOperationRequest) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{3} -} - -func (x *EnqueueClusterOperationRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *EnqueueClusterOperationRequest) GetParameters() map[string]string { - if x != nil { - return x.Parameters - } - return nil -} - -type EnqueueClusterOperationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *EnqueueClusterOperationResponse) Reset() { - *x = EnqueueClusterOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnqueueClusterOperationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueClusterOperationResponse) ProtoMessage() {} - -func (x *EnqueueClusterOperationResponse) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueClusterOperationResponse.ProtoReflect.Descriptor instead. -func (*EnqueueClusterOperationResponse) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{4} -} - -func (x *EnqueueClusterOperationResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetClusterOperationStateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetClusterOperationStateRequest) Reset() { - *x = GetClusterOperationStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterOperationStateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterOperationStateRequest) ProtoMessage() {} - -func (x *GetClusterOperationStateRequest) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterOperationStateRequest.ProtoReflect.Descriptor instead. -func (*GetClusterOperationStateRequest) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{5} -} - -func (x *GetClusterOperationStateRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetClusterOperationStateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State ClusterOperationState `protobuf:"varint,1,opt,name=state,proto3,enum=automation.ClusterOperationState" json:"state,omitempty"` -} - -func (x *GetClusterOperationStateResponse) Reset() { - *x = GetClusterOperationStateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterOperationStateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterOperationStateResponse) ProtoMessage() {} - -func (x *GetClusterOperationStateResponse) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterOperationStateResponse.ProtoReflect.Descriptor instead. -func (*GetClusterOperationStateResponse) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{6} -} - -func (x *GetClusterOperationStateResponse) GetState() ClusterOperationState { - if x != nil { - return x.State - } - return ClusterOperationState_UNKNOWN_CLUSTER_OPERATION_STATE -} - -type GetClusterOperationDetailsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetClusterOperationDetailsRequest) Reset() { - *x = GetClusterOperationDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterOperationDetailsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterOperationDetailsRequest) ProtoMessage() {} - -func (x *GetClusterOperationDetailsRequest) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[7] - 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 GetClusterOperationDetailsRequest.ProtoReflect.Descriptor instead. -func (*GetClusterOperationDetailsRequest) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{7} -} - -func (x *GetClusterOperationDetailsRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetClusterOperationDetailsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Full snapshot of the execution e.g. including output of each task. - ClusterOp *ClusterOperation `protobuf:"bytes,2,opt,name=cluster_op,json=clusterOp,proto3" json:"cluster_op,omitempty"` -} - -func (x *GetClusterOperationDetailsResponse) Reset() { - *x = GetClusterOperationDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_automation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetClusterOperationDetailsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetClusterOperationDetailsResponse) ProtoMessage() {} - -func (x *GetClusterOperationDetailsResponse) ProtoReflect() protoreflect.Message { - mi := &file_automation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetClusterOperationDetailsResponse.ProtoReflect.Descriptor instead. -func (*GetClusterOperationDetailsResponse) Descriptor() ([]byte, []int) { - return file_automation_proto_rawDescGZIP(), []int{8} -} - -func (x *GetClusterOperationDetailsResponse) GetClusterOp() *ClusterOperation { - if x != nil { - return x.ClusterOp - } - return nil -} - -var File_automation_proto protoreflect.FileDescriptor - -var file_automation_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaf, - 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x6f, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x6a, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x12, 0x37, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x6f, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0d, 0x70, 0x61, 0x72, - 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x86, 0x02, 0x0a, - 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, - 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 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, 0x22, 0xcf, 0x01, 0x0a, 0x1e, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3a, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, - 0x71, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x22, 0x31, 0x0a, 0x1f, 0x45, 0x6e, 0x71, 0x75, 0x65, - 0x75, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x1f, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5b, 0x0a, - 0x20, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x33, 0x0a, 0x21, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x61, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x6f, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4f, 0x70, 0x2a, 0x9a, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x1f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, - 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, - 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x50, 0x45, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, - 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x4f, - 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x2a, - 0x4b, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x12, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, - 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x42, 0x29, 0x5a, 0x27, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, - 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_automation_proto_rawDescOnce sync.Once - file_automation_proto_rawDescData = file_automation_proto_rawDesc -) - -func file_automation_proto_rawDescGZIP() []byte { - file_automation_proto_rawDescOnce.Do(func() { - file_automation_proto_rawDescData = protoimpl.X.CompressGZIP(file_automation_proto_rawDescData) - }) - return file_automation_proto_rawDescData -} - -var file_automation_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_automation_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_automation_proto_goTypes = []interface{}{ - (ClusterOperationState)(0), // 0: automation.ClusterOperationState - (TaskState)(0), // 1: automation.TaskState - (*ClusterOperation)(nil), // 2: automation.ClusterOperation - (*TaskContainer)(nil), // 3: automation.TaskContainer - (*Task)(nil), // 4: automation.Task - (*EnqueueClusterOperationRequest)(nil), // 5: automation.EnqueueClusterOperationRequest - (*EnqueueClusterOperationResponse)(nil), // 6: automation.EnqueueClusterOperationResponse - (*GetClusterOperationStateRequest)(nil), // 7: automation.GetClusterOperationStateRequest - (*GetClusterOperationStateResponse)(nil), // 8: automation.GetClusterOperationStateResponse - (*GetClusterOperationDetailsRequest)(nil), // 9: automation.GetClusterOperationDetailsRequest - (*GetClusterOperationDetailsResponse)(nil), // 10: automation.GetClusterOperationDetailsResponse - nil, // 11: automation.Task.ParametersEntry - nil, // 12: automation.EnqueueClusterOperationRequest.ParametersEntry -} -var file_automation_proto_depIdxs = []int32{ - 3, // 0: automation.ClusterOperation.serial_tasks:type_name -> automation.TaskContainer - 0, // 1: automation.ClusterOperation.state:type_name -> automation.ClusterOperationState - 4, // 2: automation.TaskContainer.parallel_tasks:type_name -> automation.Task - 11, // 3: automation.Task.parameters:type_name -> automation.Task.ParametersEntry - 1, // 4: automation.Task.state:type_name -> automation.TaskState - 12, // 5: automation.EnqueueClusterOperationRequest.parameters:type_name -> automation.EnqueueClusterOperationRequest.ParametersEntry - 0, // 6: automation.GetClusterOperationStateResponse.state:type_name -> automation.ClusterOperationState - 2, // 7: automation.GetClusterOperationDetailsResponse.cluster_op:type_name -> automation.ClusterOperation - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_automation_proto_init() } -func file_automation_proto_init() { - if File_automation_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_automation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskContainer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnqueueClusterOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnqueueClusterOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterOperationStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterOperationStateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterOperationDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_automation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetClusterOperationDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_automation_proto_rawDesc, - NumEnums: 2, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_automation_proto_goTypes, - DependencyIndexes: file_automation_proto_depIdxs, - EnumInfos: file_automation_proto_enumTypes, - MessageInfos: file_automation_proto_msgTypes, - }.Build() - File_automation_proto = out.File - file_automation_proto_rawDesc = nil - file_automation_proto_goTypes = nil - file_automation_proto_depIdxs = nil -} diff --git a/go/vt/proto/automation/automation_vtproto.pb.go b/go/vt/proto/automation/automation_vtproto.pb.go deleted file mode 100644 index ec4d0d7f1bf..00000000000 --- a/go/vt/proto/automation/automation_vtproto.pb.go +++ /dev/null @@ -1,1968 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 -// source: automation.proto - -package automation - -import ( - fmt "fmt" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - bits "math/bits" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *ClusterOperation) 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 *ClusterOperation) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ClusterOperation) 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.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x22 - } - if m.State != 0 { - i = encodeVarint(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x18 - } - if len(m.SerialTasks) > 0 { - for iNdEx := len(m.SerialTasks) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.SerialTasks[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TaskContainer) 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 *TaskContainer) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TaskContainer) 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.Concurrency != 0 { - i = encodeVarint(dAtA, i, uint64(m.Concurrency)) - i-- - dAtA[i] = 0x10 - } - if len(m.ParallelTasks) > 0 { - for iNdEx := len(m.ParallelTasks) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ParallelTasks[iNdEx].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 *Task) 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 *Task) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Task) 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.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x32 - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarint(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x2a - } - if m.State != 0 { - i = encodeVarint(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x20 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x1a - } - if len(m.Parameters) > 0 { - for k := range m.Parameters { - v := m.Parameters[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.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 *EnqueueClusterOperationRequest) 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 *EnqueueClusterOperationRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *EnqueueClusterOperationRequest) 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.Parameters) > 0 { - for k := range m.Parameters { - v := m.Parameters[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.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 *EnqueueClusterOperationResponse) 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 *EnqueueClusterOperationResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *EnqueueClusterOperationResponse) 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.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetClusterOperationStateRequest) 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 *GetClusterOperationStateRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetClusterOperationStateRequest) 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.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetClusterOperationStateResponse) 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 *GetClusterOperationStateResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetClusterOperationStateResponse) 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.State != 0 { - i = encodeVarint(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetClusterOperationDetailsRequest) 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 *GetClusterOperationDetailsRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetClusterOperationDetailsRequest) 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.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetClusterOperationDetailsResponse) 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 *GetClusterOperationDetailsResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetClusterOperationDetailsResponse) 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.ClusterOp != nil { - size, err := m.ClusterOp.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - 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 *ClusterOperation) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.SerialTasks) > 0 { - for _, e := range m.SerialTasks { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.State != 0 { - n += 1 + sov(uint64(m.State)) - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *TaskContainer) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ParallelTasks) > 0 { - for _, e := range m.ParallelTasks { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.Concurrency != 0 { - n += 1 + sov(uint64(m.Concurrency)) - } - n += len(m.unknownFields) - return n -} - -func (m *Task) 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.Parameters) > 0 { - for k, v := range m.Parameters { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.State != 0 { - n += 1 + sov(uint64(m.State)) - } - l = len(m.Output) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *EnqueueClusterOperationRequest) 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.Parameters) > 0 { - for k, v := range m.Parameters { - _ = 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 *EnqueueClusterOperationResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetClusterOperationStateRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetClusterOperationStateResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != 0 { - n += 1 + sov(uint64(m.State)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetClusterOperationDetailsRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *GetClusterOperationDetailsResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClusterOp != nil { - l = m.ClusterOp.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 *ClusterOperation) 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: ClusterOperation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterOperation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SerialTasks", 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.SerialTasks = append(m.SerialTasks, &TaskContainer{}) - if err := m.SerialTasks[len(m.SerialTasks)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ClusterOperationState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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 *TaskContainer) 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: TaskContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TaskContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParallelTasks", 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.ParallelTasks = append(m.ParallelTasks, &Task{}) - if err := m.ParallelTasks[len(m.ParallelTasks)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Concurrency", wireType) - } - m.Concurrency = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Concurrency |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Task) 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: Task: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Task: 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 Parameters", 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.Parameters == nil { - m.Parameters = 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.Parameters[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= TaskState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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 *EnqueueClusterOperationRequest) 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: EnqueueClusterOperationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EnqueueClusterOperationRequest: 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 Parameters", 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.Parameters == nil { - m.Parameters = 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.Parameters[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 *EnqueueClusterOperationResponse) 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: EnqueueClusterOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EnqueueClusterOperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = 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 *GetClusterOperationStateRequest) 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: GetClusterOperationStateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetClusterOperationStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = 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 *GetClusterOperationStateResponse) 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: GetClusterOperationStateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetClusterOperationStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ClusterOperationState(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetClusterOperationDetailsRequest) 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: GetClusterOperationDetailsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetClusterOperationDetailsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = 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 *GetClusterOperationDetailsResponse) 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: GetClusterOperationDetailsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetClusterOperationDetailsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterOp", 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.ClusterOp == nil { - m.ClusterOp = &ClusterOperation{} - } - if err := m.ClusterOp.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go/vt/proto/automationservice/automationservice.pb.go b/go/vt/proto/automationservice/automationservice.pb.go deleted file mode 100644 index 73971b9b38e..00000000000 --- a/go/vt/proto/automationservice/automationservice.pb.go +++ /dev/null @@ -1,109 +0,0 @@ -// -//Copyright 2019 The Vitess Authors. -// -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. - -// Protobuf service for the automation framework. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v3.21.3 -// source: automationservice.proto - -package automationservice - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - automation "vitess.io/vitess/go/vt/proto/automation" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_automationservice_proto protoreflect.FileDescriptor - -var file_automationservice_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x10, 0x61, 0x75, - 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x81, - 0x02, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, - 0x17, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x2d, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_automationservice_proto_goTypes = []interface{}{ - (*automation.EnqueueClusterOperationRequest)(nil), // 0: automation.EnqueueClusterOperationRequest - (*automation.GetClusterOperationDetailsRequest)(nil), // 1: automation.GetClusterOperationDetailsRequest - (*automation.EnqueueClusterOperationResponse)(nil), // 2: automation.EnqueueClusterOperationResponse - (*automation.GetClusterOperationDetailsResponse)(nil), // 3: automation.GetClusterOperationDetailsResponse -} -var file_automationservice_proto_depIdxs = []int32{ - 0, // 0: automationservice.Automation.EnqueueClusterOperation:input_type -> automation.EnqueueClusterOperationRequest - 1, // 1: automationservice.Automation.GetClusterOperationDetails:input_type -> automation.GetClusterOperationDetailsRequest - 2, // 2: automationservice.Automation.EnqueueClusterOperation:output_type -> automation.EnqueueClusterOperationResponse - 3, // 3: automationservice.Automation.GetClusterOperationDetails:output_type -> automation.GetClusterOperationDetailsResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_automationservice_proto_init() } -func file_automationservice_proto_init() { - if File_automationservice_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_automationservice_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_automationservice_proto_goTypes, - DependencyIndexes: file_automationservice_proto_depIdxs, - }.Build() - File_automationservice_proto = out.File - file_automationservice_proto_rawDesc = nil - file_automationservice_proto_goTypes = nil - file_automationservice_proto_depIdxs = nil -} diff --git a/go/vt/proto/automationservice/automationservice_grpc.pb.go b/go/vt/proto/automationservice/automationservice_grpc.pb.go deleted file mode 100644 index c92cafc40a0..00000000000 --- a/go/vt/proto/automationservice/automationservice_grpc.pb.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.3 -// source: automationservice.proto - -package automationservice - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - automation "vitess.io/vitess/go/vt/proto/automation" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// AutomationClient is the client API for Automation service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AutomationClient interface { - // Start a cluster operation. - EnqueueClusterOperation(ctx context.Context, in *automation.EnqueueClusterOperationRequest, opts ...grpc.CallOption) (*automation.EnqueueClusterOperationResponse, error) - // TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? - // Get all details of an active cluster operation. - GetClusterOperationDetails(ctx context.Context, in *automation.GetClusterOperationDetailsRequest, opts ...grpc.CallOption) (*automation.GetClusterOperationDetailsResponse, error) -} - -type automationClient struct { - cc grpc.ClientConnInterface -} - -func NewAutomationClient(cc grpc.ClientConnInterface) AutomationClient { - return &automationClient{cc} -} - -func (c *automationClient) EnqueueClusterOperation(ctx context.Context, in *automation.EnqueueClusterOperationRequest, opts ...grpc.CallOption) (*automation.EnqueueClusterOperationResponse, error) { - out := new(automation.EnqueueClusterOperationResponse) - err := c.cc.Invoke(ctx, "/automationservice.Automation/EnqueueClusterOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *automationClient) GetClusterOperationDetails(ctx context.Context, in *automation.GetClusterOperationDetailsRequest, opts ...grpc.CallOption) (*automation.GetClusterOperationDetailsResponse, error) { - out := new(automation.GetClusterOperationDetailsResponse) - err := c.cc.Invoke(ctx, "/automationservice.Automation/GetClusterOperationDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AutomationServer is the server API for Automation service. -// All implementations must embed UnimplementedAutomationServer -// for forward compatibility -type AutomationServer interface { - // Start a cluster operation. - EnqueueClusterOperation(context.Context, *automation.EnqueueClusterOperationRequest) (*automation.EnqueueClusterOperationResponse, error) - // TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? - // Get all details of an active cluster operation. - GetClusterOperationDetails(context.Context, *automation.GetClusterOperationDetailsRequest) (*automation.GetClusterOperationDetailsResponse, error) - mustEmbedUnimplementedAutomationServer() -} - -// UnimplementedAutomationServer must be embedded to have forward compatible implementations. -type UnimplementedAutomationServer struct { -} - -func (UnimplementedAutomationServer) EnqueueClusterOperation(context.Context, *automation.EnqueueClusterOperationRequest) (*automation.EnqueueClusterOperationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnqueueClusterOperation not implemented") -} -func (UnimplementedAutomationServer) GetClusterOperationDetails(context.Context, *automation.GetClusterOperationDetailsRequest) (*automation.GetClusterOperationDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetClusterOperationDetails not implemented") -} -func (UnimplementedAutomationServer) mustEmbedUnimplementedAutomationServer() {} - -// UnsafeAutomationServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AutomationServer will -// result in compilation errors. -type UnsafeAutomationServer interface { - mustEmbedUnimplementedAutomationServer() -} - -func RegisterAutomationServer(s grpc.ServiceRegistrar, srv AutomationServer) { - s.RegisterService(&Automation_ServiceDesc, srv) -} - -func _Automation_EnqueueClusterOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(automation.EnqueueClusterOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutomationServer).EnqueueClusterOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/automationservice.Automation/EnqueueClusterOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutomationServer).EnqueueClusterOperation(ctx, req.(*automation.EnqueueClusterOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Automation_GetClusterOperationDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(automation.GetClusterOperationDetailsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutomationServer).GetClusterOperationDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/automationservice.Automation/GetClusterOperationDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutomationServer).GetClusterOperationDetails(ctx, req.(*automation.GetClusterOperationDetailsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Automation_ServiceDesc is the grpc.ServiceDesc for Automation service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Automation_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "automationservice.Automation", - HandlerType: (*AutomationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EnqueueClusterOperation", - Handler: _Automation_EnqueueClusterOperation_Handler, - }, - { - MethodName: "GetClusterOperationDetails", - Handler: _Automation_GetClusterOperationDetails_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "automationservice.proto", -} diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 1e5afd59ebf..c657a3db9c6 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -1333,6 +1333,9 @@ type ExecuteOptions struct { // TransactionAccessMode specifies the access modes to be used while starting the transaction i.e. READ WRITE/READ ONLY/WITH CONSISTENT SNAPSHOT // If not specified, the transaction will be started with the default access mode on the connection. TransactionAccessMode []ExecuteOptions_TransactionAccessMode `protobuf:"varint,14,rep,packed,name=transaction_access_mode,json=transactionAccessMode,proto3,enum=query.ExecuteOptions_TransactionAccessMode" json:"transaction_access_mode,omitempty"` + // WorkloadName specifies the name of the workload as indicated in query directives. This is used for instrumentation + // in metrics and tracing spans. + WorkloadName string `protobuf:"bytes,15,opt,name=WorkloadName,proto3" json:"WorkloadName,omitempty"` } func (x *ExecuteOptions) Reset() { @@ -1437,6 +1440,13 @@ func (x *ExecuteOptions) GetTransactionAccessMode() []ExecuteOptions_Transaction return nil } +func (x *ExecuteOptions) GetWorkloadName() string { + if x != nil { + return x.WorkloadName + } + return "" +} + // Field describes a single column returned by a query type Field struct { state protoimpl.MessageState @@ -5659,7 +5669,7 @@ var file_query_proto_rawDesc = []byte{ 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xca, 0x0a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0xee, 0x0a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, @@ -5702,237 +5712,178 @@ var file_query_proto_rawDesc = []byte{ 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3b, 0x0a, 0x0e, 0x49, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x11, 0x0a, 0x0d, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, 0x38, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x4c, 0x54, 0x50, 0x10, 0x01, 0x12, 0x08, - 0x0a, 0x04, 0x4f, 0x4c, 0x41, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x42, 0x41, 0x10, - 0x03, 0x22, 0xa7, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x73, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, - 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x50, 0x45, 0x41, - 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x52, 0x45, 0x41, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x55, 0x4e, 0x43, 0x4f, 0x4d, 0x4d, 0x49, - 0x54, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, - 0x49, 0x5a, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, 0x53, - 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x5f, - 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x41, - 0x55, 0x54, 0x4f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x06, 0x22, 0x84, 0x01, 0x0a, 0x0e, - 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, - 0x0a, 0x0f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x4c, 0x41, 0x4e, 0x4e, 0x45, - 0x52, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, - 0x65, 0x6e, 0x34, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x65, 0x6e, 0x34, 0x47, 0x72, 0x65, - 0x65, 0x64, 0x79, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x34, 0x4c, 0x65, 0x66, - 0x74, 0x32, 0x52, 0x69, 0x67, 0x68, 0x74, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x65, 0x6e, - 0x34, 0x57, 0x69, 0x74, 0x68, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x10, 0x05, 0x12, - 0x11, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x34, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x56, 0x33, - 0x10, 0x06, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, - 0x52, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, - 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x41, - 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, - 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x5f, 0x52, - 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x53, 0x10, 0x03, 0x22, 0x4f, 0x0a, 0x15, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, - 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, - 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, - 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xb8, 0x02, 0x0a, - 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x72, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, - 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, - 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, - 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x72, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x18, - 0x0a, 0x07, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x12, 0x52, - 0x07, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x22, 0xe3, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, - 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, - 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, - 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x15, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x3c, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 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, 0x22, 0xa0, 0x03, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x9e, 0x02, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x12, 0x38, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x71, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x27, - 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x02, 0x22, 0xe1, 0x02, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, - 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, - 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x0f, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x64, 0x0a, 0x0f, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x57, 0x69, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0xe7, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x15, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0xee, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, - 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xa4, 0x01, 0x0a, 0x0d, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, - 0x31, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x49, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x10, - 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, - 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x57, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, + 0x0a, 0x0e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x4e, 0x41, 0x4d, + 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, 0x38, 0x0a, 0x08, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x4c, 0x54, 0x50, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x4c, 0x41, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, + 0x44, 0x42, 0x41, 0x10, 0x03, 0x22, 0xa7, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x73, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, + 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x52, + 0x45, 0x50, 0x45, 0x41, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x55, 0x4e, 0x43, + 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, + 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d, + 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, + 0x48, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x05, 0x12, + 0x0e, 0x0a, 0x0a, 0x41, 0x55, 0x54, 0x4f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x06, 0x22, + 0x84, 0x01, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x4c, + 0x41, 0x4e, 0x4e, 0x45, 0x52, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x47, 0x65, 0x6e, 0x34, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x65, 0x6e, + 0x34, 0x47, 0x72, 0x65, 0x65, 0x64, 0x79, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x65, 0x6e, + 0x34, 0x4c, 0x65, 0x66, 0x74, 0x32, 0x52, 0x69, 0x67, 0x68, 0x74, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x47, 0x65, 0x6e, 0x34, 0x57, 0x69, 0x74, 0x68, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x34, 0x43, 0x6f, 0x6d, 0x70, 0x61, + 0x72, 0x65, 0x56, 0x33, 0x10, 0x06, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x73, 0x6f, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x53, 0x4f, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x49, + 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, + 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, + 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, + 0x45, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x53, 0x10, 0x03, 0x22, 0x4f, 0x0a, + 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, + 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, + 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x22, 0xb8, 0x02, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x72, 0x67, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x67, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x6f, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6f, 0x72, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x03, 0x52, + 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x12, 0x52, 0x07, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x3c, 0x0a, 0x0c, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 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, 0x22, 0xa0, 0x03, 0x0a, 0x0b, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0a, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x9e, 0x02, 0x0a, 0x09, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x12, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x38, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x10, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, + 0x71, 0x6c, 0x22, 0x27, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x09, + 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x02, 0x22, 0xe1, 0x02, 0x0a, 0x0e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, + 0x3d, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x64, + 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x57, 0x69, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe7, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, + 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x43, + 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0xee, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, @@ -5944,13 +5895,108 @@ var file_query_proto_rawDesc = []byte{ 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x11, - 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xda, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, - 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, + 0x67, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x0d, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0d, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, + 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x62, + 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, + 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x33, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, + 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, + 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, + 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x02, 0x0a, + 0x17, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, + 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, + 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, + 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, @@ -5962,117 +6008,234 @@ var file_query_proto_rawDesc = []byte{ 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x18, - 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x17, 0x52, 0x6f, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, - 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x1a, - 0x0a, 0x18, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x02, 0x0a, 0x18, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, - 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x31, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, + 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, + 0x15, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, + 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdf, + 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, + 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x74, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, + 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xdb, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, + 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x51, 0x0a, + 0x17, 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xe0, 0x02, 0x0a, 0x13, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, + 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, - 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x1b, 0x0a, - 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, - 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, - 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, - 0x74, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x01, 0x0a, 0x1a, 0x43, - 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, - 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x16, - 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x17, 0x52, 0x65, 0x61, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe0, 0x02, 0x0a, - 0x13, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x14, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe6, 0x02, 0x0a, 0x19, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, + 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x84, 0x02, + 0x0a, 0x1a, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, + 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x43, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, + 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, + 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, + 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x40, + 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0xe8, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, + 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, + 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, + 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x16, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, + 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x22, 0xee, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, @@ -6089,68 +6252,69 @@ var file_query_proto_rawDesc = []byte{ 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, - 0xfe, 0x01, 0x0a, 0x14, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x22, 0xe6, 0x02, 0x0a, 0x19, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, - 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x1a, 0x42, 0x65, - 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, - 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x22, 0xd9, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, + 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x22, 0xf4, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, + 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, + 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, + 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa6, 0x02, 0x0a, 0x1b, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x22, 0xfa, 0x02, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, @@ -6161,128 +6325,19 @@ var file_query_proto_rawDesc = []byte{ 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x15, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, - 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x69, 0x64, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe8, 0x02, 0x0a, - 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, - 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x25, - 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0xee, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, - 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, - 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0xf4, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, - 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, - 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, - 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, - 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa6, 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, + 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x10, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x22, 0xac, 0x02, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, + 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, @@ -6300,230 +6355,187 @@ var file_query_proto_rawDesc = []byte{ 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x22, 0xfa, 0x02, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, - 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, - 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x75, 0x6e, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x73, - 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0xac, 0x02, - 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x12, 0x38, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x87, 0x02, 0x0a, - 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6c, - 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x25, - 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xf6, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x30, 0x0a, - 0x14, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x62, 0x69, 0x6e, - 0x6c, 0x6f, 0x67, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x47, 0x0a, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, - 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, - 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, - 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x69, 0x65, - 0x77, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x0e, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, - 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, - 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, - 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x6d, - 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x4d, - 0x61, 0x78, 0x22, 0xa9, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, + 0x22, 0x87, 0x02, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, + 0x44, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x54, 0x47, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x53, 0x0a, 0x26, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, - 0x79, 0x5f, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x23, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x0d, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x38, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xae, - 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x0c, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, - 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x2a, 0x92, 0x03, 0x0a, 0x09, 0x4d, 0x79, 0x53, 0x71, - 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, - 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, - 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x55, - 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x10, - 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, 0x45, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4c, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x45, 0x54, 0x5f, 0x46, - 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x46, - 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, - 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x40, 0x12, 0x0e, 0x0a, 0x08, 0x4e, - 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x13, 0x0a, 0x0d, 0x50, - 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x01, - 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, - 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x43, 0x4d, 0x50, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6b, 0x0a, 0x04, - 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, 0x4c, 0x10, 0x80, 0x02, 0x12, - 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x80, 0x04, - 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x80, 0x08, 0x12, 0x0d, - 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, 0x10, 0x12, 0x0b, 0x0a, - 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, - 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, 0x12, 0x0a, 0x0a, 0x05, - 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, - 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x84, - 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x85, 0x02, 0x12, 0x0b, 0x0a, - 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x86, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, - 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, - 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x89, 0x02, 0x12, - 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x8a, 0x06, 0x12, 0x0c, 0x0a, 0x07, - 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x8b, 0x08, 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x4c, - 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, - 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, - 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x8f, 0x10, 0x12, 0x0d, - 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x90, 0x10, 0x12, 0x09, 0x0a, - 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x49, - 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x93, 0x30, - 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x94, 0x50, 0x12, 0x0c, 0x0a, 0x07, 0x56, - 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, 0x30, 0x12, 0x0e, 0x0a, 0x09, 0x56, 0x41, 0x52, - 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, 0x50, 0x12, 0x09, 0x0a, 0x04, 0x43, 0x48, 0x41, - 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x98, - 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, 0x10, 0x99, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x45, - 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x9b, 0x10, - 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x10, 0x1c, 0x12, 0x0d, 0x0a, 0x08, 0x47, - 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, 0x9d, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x4a, 0x53, - 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x4e, 0x55, 0x4d, 0x10, - 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, 0x10, 0xa1, 0x20, 0x12, - 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x2a, 0x46, 0x0a, 0x10, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, - 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, - 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x31, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, 0x45, 0x57, 0x53, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, - 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, - 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, + 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xf6, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x12, 0x30, 0x0a, 0x14, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x12, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x2e, 0x0a, + 0x13, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0xf6, 0x01, + 0x0a, 0x0e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x14, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x67, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x4d, 0x61, 0x78, 0x22, 0xa9, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, + 0x12, 0x53, 0x0a, 0x26, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x23, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4a, 0x04, 0x08, 0x06, + 0x10, 0x07, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x69, 0x64, 0x12, 0x2d, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x6e, 0x74, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x35, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, + 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x2a, 0x92, 0x03, 0x0a, 0x09, + 0x4d, 0x79, 0x53, 0x71, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, + 0x54, 0x59, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x5f, 0x4b, + 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x49, + 0x51, 0x55, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x04, 0x12, 0x15, + 0x0a, 0x11, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, + 0x4c, 0x41, 0x47, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x20, 0x12, 0x11, 0x0a, 0x0d, 0x5a, 0x45, 0x52, 0x4f, 0x46, + 0x49, 0x4c, 0x4c, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x40, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x49, + 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x02, 0x12, 0x18, 0x0a, 0x13, + 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, + 0x4c, 0x41, 0x47, 0x10, 0x80, 0x04, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, + 0x41, 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x53, + 0x45, 0x54, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x4e, 0x4f, + 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x46, + 0x4c, 0x41, 0x47, 0x10, 0x80, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, + 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x57, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x40, 0x12, + 0x0e, 0x0a, 0x08, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, + 0x13, 0x0a, 0x0d, 0x50, 0x41, 0x52, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4c, 0x41, 0x47, + 0x10, 0x80, 0x80, 0x01, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x46, 0x4c, + 0x41, 0x47, 0x10, 0x80, 0x80, 0x02, 0x12, 0x11, 0x0a, 0x0b, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x04, 0x12, 0x11, 0x0a, 0x0b, 0x42, 0x49, 0x4e, + 0x43, 0x4d, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x80, 0x80, 0x08, 0x1a, 0x02, 0x10, 0x01, + 0x2a, 0x6b, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, 0x4c, + 0x10, 0x80, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x49, 0x53, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, + 0x44, 0x10, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x49, 0x53, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, + 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, + 0x10, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, + 0x0a, 0x08, 0x49, 0x53, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, + 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, + 0x12, 0x0a, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, + 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, + 0x31, 0x36, 0x10, 0x84, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x85, + 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x32, 0x34, 0x10, 0x86, 0x06, 0x12, 0x0a, + 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x87, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, + 0x4e, 0x54, 0x33, 0x32, 0x10, 0x88, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, + 0x10, 0x89, 0x02, 0x12, 0x0b, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x8a, 0x06, + 0x12, 0x0c, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x8b, 0x08, 0x12, 0x0c, + 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x8c, 0x08, 0x12, 0x0e, 0x0a, 0x09, + 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x8d, 0x10, 0x12, 0x09, 0x0a, 0x04, + 0x44, 0x41, 0x54, 0x45, 0x10, 0x8e, 0x10, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x49, 0x4d, 0x45, 0x10, + 0x8f, 0x10, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x90, + 0x10, 0x12, 0x09, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x91, 0x06, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x04, 0x54, 0x45, 0x58, + 0x54, 0x10, 0x93, 0x30, 0x12, 0x09, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x94, 0x50, 0x12, + 0x0c, 0x0a, 0x07, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x95, 0x30, 0x12, 0x0e, 0x0a, + 0x09, 0x56, 0x41, 0x52, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x96, 0x50, 0x12, 0x09, 0x0a, + 0x04, 0x43, 0x48, 0x41, 0x52, 0x10, 0x97, 0x30, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, + 0x52, 0x59, 0x10, 0x98, 0x50, 0x12, 0x08, 0x0a, 0x03, 0x42, 0x49, 0x54, 0x10, 0x99, 0x10, 0x12, + 0x09, 0x0a, 0x04, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x9a, 0x10, 0x12, 0x08, 0x0a, 0x03, 0x53, 0x45, + 0x54, 0x10, 0x9b, 0x10, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x10, 0x1c, 0x12, + 0x0d, 0x0a, 0x08, 0x47, 0x45, 0x4f, 0x4d, 0x45, 0x54, 0x52, 0x59, 0x10, 0x9d, 0x10, 0x12, 0x09, + 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x9e, 0x10, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, + 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, + 0x4e, 0x55, 0x4d, 0x10, 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, + 0x10, 0xa1, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, + 0x2a, 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, + 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x31, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, + 0x49, 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x42, 0x35, 0x0a, 0x0f, 0x69, + 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/vt/proto/query/query_vtproto.pb.go b/go/vt/proto/query/query_vtproto.pb.go index 3abec4b7d1a..cca6c100a14 100644 --- a/go/vt/proto/query/query_vtproto.pb.go +++ b/go/vt/proto/query/query_vtproto.pb.go @@ -377,6 +377,13 @@ func (m *ExecuteOptions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.WorkloadName) > 0 { + i -= len(m.WorkloadName) + copy(dAtA[i:], m.WorkloadName) + i = encodeVarint(dAtA, i, uint64(len(m.WorkloadName))) + i-- + dAtA[i] = 0x7a + } if len(m.TransactionAccessMode) > 0 { var pksize2 int for _, num := range m.TransactionAccessMode { @@ -4417,6 +4424,10 @@ func (m *ExecuteOptions) SizeVT() (n int) { } n += 1 + sov(uint64(l)) + l } + l = len(m.WorkloadName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -6999,6 +7010,38 @@ func (m *ExecuteOptions) UnmarshalVT(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field TransactionAccessMode", wireType) } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkloadName", 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.WorkloadName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/go/vt/proto/replicationdata/replicationdata.pb.go b/go/vt/proto/replicationdata/replicationdata.pb.go index e0b45847f14..60d42ee9d59 100644 --- a/go/vt/proto/replicationdata/replicationdata.pb.go +++ b/go/vt/proto/replicationdata/replicationdata.pb.go @@ -441,6 +441,7 @@ type FullStatus struct { SemiSyncPrimaryClients uint32 `protobuf:"varint,18,opt,name=semi_sync_primary_clients,json=semiSyncPrimaryClients,proto3" json:"semi_sync_primary_clients,omitempty"` SemiSyncPrimaryTimeout uint64 `protobuf:"varint,19,opt,name=semi_sync_primary_timeout,json=semiSyncPrimaryTimeout,proto3" json:"semi_sync_primary_timeout,omitempty"` SemiSyncWaitForReplicaCount uint32 `protobuf:"varint,20,opt,name=semi_sync_wait_for_replica_count,json=semiSyncWaitForReplicaCount,proto3" json:"semi_sync_wait_for_replica_count,omitempty"` + SuperReadOnly bool `protobuf:"varint,21,opt,name=super_read_only,json=superReadOnly,proto3" json:"super_read_only,omitempty"` } func (x *FullStatus) Reset() { @@ -615,6 +616,13 @@ func (x *FullStatus) GetSemiSyncWaitForReplicaCount() uint32 { return 0 } +func (x *FullStatus) GetSuperReadOnly() bool { + if x != nil { + return x.SuperReadOnly + } + return false +} + var File_replicationdata_proto protoreflect.FileDescriptor var file_replicationdata_proto_rawDesc = []byte{ @@ -690,7 +698,7 @@ var file_replicationdata_proto_rawDesc = []byte{ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc3, 0x07, 0x0a, + 0x66, 0x69, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xeb, 0x07, 0x0a, 0x0a, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, @@ -751,14 +759,16 @@ var file_replicationdata_proto_rawDesc = []byte{ 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x2a, 0x3b, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4f, 0x41, - 0x4e, 0x44, 0x53, 0x51, 0x4c, 0x54, 0x48, 0x52, 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, - 0x0c, 0x49, 0x4f, 0x54, 0x48, 0x52, 0x45, 0x41, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x42, - 0x2e, 0x5a, 0x2c, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, - 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x75, 0x70, + 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x2a, 0x3b, 0x0a, 0x13, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4f, 0x41, 0x4e, 0x44, 0x53, 0x51, 0x4c, 0x54, 0x48, 0x52, + 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4f, 0x54, 0x48, 0x52, 0x45, 0x41, + 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x76, 0x69, 0x74, 0x65, 0x73, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, + 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/vt/proto/replicationdata/replicationdata_vtproto.pb.go b/go/vt/proto/replicationdata/replicationdata_vtproto.pb.go index 350a733e865..64e5a8d8b94 100644 --- a/go/vt/proto/replicationdata/replicationdata_vtproto.pb.go +++ b/go/vt/proto/replicationdata/replicationdata_vtproto.pb.go @@ -354,6 +354,18 @@ func (m *FullStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.SuperReadOnly { + i-- + if m.SuperReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } if m.SemiSyncWaitForReplicaCount != 0 { i = encodeVarint(dAtA, i, uint64(m.SemiSyncWaitForReplicaCount)) i-- @@ -734,6 +746,9 @@ func (m *FullStatus) SizeVT() (n int) { if m.SemiSyncWaitForReplicaCount != 0 { n += 2 + sov(uint64(m.SemiSyncWaitForReplicaCount)) } + if m.SuperReadOnly { + n += 3 + } n += len(m.unknownFields) return n } @@ -2127,6 +2142,26 @@ func (m *FullStatus) UnmarshalVT(dAtA []byte) error { break } } + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SuperReadOnly", 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.SuperReadOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index 07a67f8c868..19a63b6620c 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -29,6 +29,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + binlogdata "vitess.io/vitess/go/vt/proto/binlogdata" logutil "vitess.io/vitess/go/vt/proto/logutil" query "vitess.io/vitess/go/vt/proto/query" replicationdata "vitess.io/vitess/go/vt/proto/replicationdata" @@ -3288,7 +3289,7 @@ type VReplicationWaitForPosRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Position string `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` } @@ -3324,7 +3325,7 @@ func (*VReplicationWaitForPosRequest) Descriptor() ([]byte, []int) { return file_tabletmanagerdata_proto_rawDescGZIP(), []int{66} } -func (x *VReplicationWaitForPosRequest) GetId() int64 { +func (x *VReplicationWaitForPosRequest) GetId() int32 { if x != nil { return x.Id } @@ -4714,116 +4715,6 @@ func (x *RestoreFromBackupResponse) GetEvent() *logutil.Event { return nil } -type VExecRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` - Keyspace string `protobuf:"bytes,3,opt,name=keyspace,proto3" json:"keyspace,omitempty"` -} - -func (x *VExecRequest) Reset() { - *x = VExecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VExecRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VExecRequest) ProtoMessage() {} - -func (x *VExecRequest) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[96] - 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 VExecRequest.ProtoReflect.Descriptor instead. -func (*VExecRequest) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{96} -} - -func (x *VExecRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (x *VExecRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *VExecRequest) GetKeyspace() string { - if x != nil { - return x.Keyspace - } - return "" -} - -type VExecResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result *query.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *VExecResponse) Reset() { - *x = VExecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VExecResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VExecResponse) ProtoMessage() {} - -func (x *VExecResponse) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[97] - 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 VExecResponse.ProtoReflect.Descriptor instead. -func (*VExecResponse) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{97} -} - -func (x *VExecResponse) GetResult() *query.QueryResult { - if x != nil { - return x.Result - } - return nil -} - type VDiffRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4840,7 +4731,7 @@ type VDiffRequest struct { func (x *VDiffRequest) Reset() { *x = VDiffRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[98] + mi := &file_tabletmanagerdata_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4853,7 +4744,7 @@ func (x *VDiffRequest) String() string { func (*VDiffRequest) ProtoMessage() {} func (x *VDiffRequest) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[98] + mi := &file_tabletmanagerdata_proto_msgTypes[96] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4866,7 +4757,7 @@ func (x *VDiffRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffRequest.ProtoReflect.Descriptor instead. func (*VDiffRequest) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{98} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{96} } func (x *VDiffRequest) GetKeyspace() string { @@ -4924,7 +4815,7 @@ type VDiffResponse struct { func (x *VDiffResponse) Reset() { *x = VDiffResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[99] + mi := &file_tabletmanagerdata_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4937,7 +4828,7 @@ func (x *VDiffResponse) String() string { func (*VDiffResponse) ProtoMessage() {} func (x *VDiffResponse) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[99] + mi := &file_tabletmanagerdata_proto_msgTypes[97] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4950,7 +4841,7 @@ func (x *VDiffResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffResponse.ProtoReflect.Descriptor instead. func (*VDiffResponse) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{99} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{97} } func (x *VDiffResponse) GetId() int64 { @@ -4988,7 +4879,7 @@ type VDiffPickerOptions struct { func (x *VDiffPickerOptions) Reset() { *x = VDiffPickerOptions{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[100] + mi := &file_tabletmanagerdata_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5001,7 +4892,7 @@ func (x *VDiffPickerOptions) String() string { func (*VDiffPickerOptions) ProtoMessage() {} func (x *VDiffPickerOptions) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[100] + mi := &file_tabletmanagerdata_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5014,7 +4905,7 @@ func (x *VDiffPickerOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffPickerOptions.ProtoReflect.Descriptor instead. func (*VDiffPickerOptions) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{100} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{98} } func (x *VDiffPickerOptions) GetTabletTypes() string { @@ -5052,7 +4943,7 @@ type VDiffReportOptions struct { func (x *VDiffReportOptions) Reset() { *x = VDiffReportOptions{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[101] + mi := &file_tabletmanagerdata_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5065,7 +4956,7 @@ func (x *VDiffReportOptions) String() string { func (*VDiffReportOptions) ProtoMessage() {} func (x *VDiffReportOptions) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[101] + mi := &file_tabletmanagerdata_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5078,7 +4969,7 @@ func (x *VDiffReportOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffReportOptions.ProtoReflect.Descriptor instead. func (*VDiffReportOptions) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{101} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{99} } func (x *VDiffReportOptions) GetOnlyPks() bool { @@ -5119,7 +5010,7 @@ type VDiffCoreOptions struct { func (x *VDiffCoreOptions) Reset() { *x = VDiffCoreOptions{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[102] + mi := &file_tabletmanagerdata_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5132,7 +5023,7 @@ func (x *VDiffCoreOptions) String() string { func (*VDiffCoreOptions) ProtoMessage() {} func (x *VDiffCoreOptions) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[102] + mi := &file_tabletmanagerdata_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5145,7 +5036,7 @@ func (x *VDiffCoreOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffCoreOptions.ProtoReflect.Descriptor instead. func (*VDiffCoreOptions) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{102} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{100} } func (x *VDiffCoreOptions) GetTables() string { @@ -5210,7 +5101,7 @@ type VDiffOptions struct { func (x *VDiffOptions) Reset() { *x = VDiffOptions{} if protoimpl.UnsafeEnabled { - mi := &file_tabletmanagerdata_proto_msgTypes[103] + mi := &file_tabletmanagerdata_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5223,7 +5114,7 @@ func (x *VDiffOptions) String() string { func (*VDiffOptions) ProtoMessage() {} func (x *VDiffOptions) ProtoReflect() protoreflect.Message { - mi := &file_tabletmanagerdata_proto_msgTypes[103] + mi := &file_tabletmanagerdata_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5236,7 +5127,7 @@ func (x *VDiffOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use VDiffOptions.ProtoReflect.Descriptor instead. func (*VDiffOptions) Descriptor() ([]byte, []int) { - return file_tabletmanagerdata_proto_rawDescGZIP(), []int{103} + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{101} } func (x *VDiffOptions) GetPickerOptions() *VDiffPickerOptions { @@ -5260,551 +5151,675 @@ func (x *VDiffOptions) GetReportOptions() *VDiffReportOptions { return nil } +type UpdateVRWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"` + TabletTypes []string `protobuf:"bytes,3,rep,name=tablet_types,json=tabletTypes,proto3" json:"tablet_types,omitempty"` + OnDdl binlogdata.OnDDLAction `protobuf:"varint,4,opt,name=on_ddl,json=onDdl,proto3,enum=binlogdata.OnDDLAction" json:"on_ddl,omitempty"` +} + +func (x *UpdateVRWorkflowRequest) Reset() { + *x = UpdateVRWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tabletmanagerdata_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVRWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVRWorkflowRequest) ProtoMessage() {} + +func (x *UpdateVRWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_tabletmanagerdata_proto_msgTypes[102] + 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 UpdateVRWorkflowRequest.ProtoReflect.Descriptor instead. +func (*UpdateVRWorkflowRequest) Descriptor() ([]byte, []int) { + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{102} +} + +func (x *UpdateVRWorkflowRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *UpdateVRWorkflowRequest) GetCells() []string { + if x != nil { + return x.Cells + } + return nil +} + +func (x *UpdateVRWorkflowRequest) GetTabletTypes() []string { + if x != nil { + return x.TabletTypes + } + return nil +} + +func (x *UpdateVRWorkflowRequest) GetOnDdl() binlogdata.OnDDLAction { + if x != nil { + return x.OnDdl + } + return binlogdata.OnDDLAction(0) +} + +type UpdateVRWorkflowResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *query.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *UpdateVRWorkflowResponse) Reset() { + *x = UpdateVRWorkflowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tabletmanagerdata_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVRWorkflowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVRWorkflowResponse) ProtoMessage() {} + +func (x *UpdateVRWorkflowResponse) ProtoReflect() protoreflect.Message { + mi := &file_tabletmanagerdata_proto_msgTypes[103] + 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 UpdateVRWorkflowResponse.ProtoReflect.Descriptor instead. +func (*UpdateVRWorkflowResponse) Descriptor() ([]byte, []int) { + return file_tabletmanagerdata_proto_rawDescGZIP(), []int{103} +} + +func (x *UpdateVRWorkflowResponse) GetResult() *query.QueryResult { + if x != nil { + return x.Result + } + return nil +} + var File_tabletmanagerdata_proto protoreflect.FileDescriptor var file_tabletmanagerdata_proto_rawDesc = []byte{ 0x0a, 0x17, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x0b, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x0d, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x0c, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x76, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x01, 0x0a, 0x0f, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x11, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, - 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x6f, - 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0xa6, 0x01, 0x0a, - 0x10, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x4f, 0x0a, 0x11, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x12, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x0d, - 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xf7, - 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, - 0x65, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, - 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, - 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x69, - 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 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, 0x22, 0xd6, 0x01, 0x0a, 0x0c, 0x44, 0x62, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x64, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x4f, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x62, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, - 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 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, 0x22, 0xa3, 0x01, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x4c, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x75, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x46, 0x0a, 0x0e, 0x64, 0x62, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x62, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x62, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x2a, 0x0a, 0x0c, 0x53, 0x6c, - 0x65, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x65, 0x6e, 0x76, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, - 0x72, 0x61, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x45, 0x6e, 0x76, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, - 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, 0x22, 0x66, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, - 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, - 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x65, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x10, 0x62, 0x69, + 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x0d, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0c, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0b, 0x76, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x01, 0x0a, + 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0xa6, + 0x01, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x4f, 0x0a, 0x11, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x12, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, + 0x0a, 0x0d, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, - 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x22, 0xf7, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, + 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, + 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 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, 0x22, 0xd6, 0x01, 0x0a, 0x0c, 0x44, + 0x62, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x62, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, + 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, + 0x65, 0x67, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, + 0x65, 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, 0x22, 0xa3, 0x01, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, - 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x14, - 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, 0x0a, 0x16, - 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, - 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x16, 0x50, 0x72, - 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x67, - 0x0a, 0x17, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0e, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x0d, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, + 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x46, 0x0a, 0x0e, 0x64, 0x62, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x62, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x62, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x2a, 0x0a, 0x0c, + 0x53, 0x6c, 0x65, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x6c, 0x65, 0x65, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x12, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x65, 0x6e, + 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, + 0x6e, 0x76, 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, 0x22, 0x66, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, + 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, + 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x6e, 0x6c, 0x79, + 0x22, 0x65, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x5a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x14, 0x0a, 0x12, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, + 0x22, 0x14, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, + 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, + 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, + 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x16, + 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x22, 0x67, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0e, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x71, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x0d, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x46, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x71, 0x6c, 0x4d, 0x6f, + 0x64, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, - 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x71, 0x6c, 0x4d, 0x6f, 0x64, 0x65, - 0x22, 0xa7, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x62, 0x65, 0x66, 0x6f, - 0x72, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x6f, - 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x14, 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, - 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, - 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, - 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, - 0x65, 0x72, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, + 0x0b, 0x61, 0x66, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x13, 0x0a, 0x11, + 0x4c, 0x6f, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x14, 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, + 0x0a, 0x14, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x44, 0x52, 0x08, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x62, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x0a, + 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, + 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, + 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, + 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, + 0x73, 0x44, 0x62, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, 0x62, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x6c, 0x6f, - 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x47, 0x0a, - 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x44, - 0x62, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x1d, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x76, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, - 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, - 0x77, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x76, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x1d, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x6c, 0x6c, 0x50, 0x72, + 0x69, 0x76, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, + 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, + 0x52, 0x6f, 0x77, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x6c, 0x6c, 0x50, 0x72, + 0x69, 0x76, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, + 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, + 0x52, 0x6f, 0x77, 0x73, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1a, 0x0a, + 0x18, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x19, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x4f, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x18, 0x0a, 0x16, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x17, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x34, 0x0a, 0x16, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x57, 0x61, 0x69, 0x74, 0x46, + 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, + 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, 0x61, 0x69, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x3c, 0x0a, 0x1e, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x1a, 0x0a, 0x18, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x21, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, 0x69, + 0x6c, 0x41, 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x69, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x77, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x24, 0x0a, 0x22, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x41, 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x61, 0x64, 0x64, 0x72, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x17, + 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x46, 0x0a, + 0x18, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x0a, 0x18, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, - 0x77, 0x73, 0x22, 0x47, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, - 0x15, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x18, - 0x0a, 0x16, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x17, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x34, 0x0a, 0x16, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, - 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, 0x61, 0x69, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x3c, 0x0a, 0x1e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x21, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x41, - 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, - 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x24, 0x0a, 0x22, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, - 0x74, 0x69, 0x6c, 0x41, 0x66, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, - 0x64, 0x72, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1a, - 0x0a, 0x18, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x17, 0x56, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x46, 0x0a, 0x18, 0x56, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x0a, 0x1d, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x20, 0x0a, 0x1e, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x30, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, - 0x53, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, - 0x53, 0x79, 0x6e, 0x63, 0x22, 0x31, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x1e, 0x50, 0x6f, 0x70, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x4e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, - 0x31, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x0a, 0x1d, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, + 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x22, 0x31, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x1e, 0x50, 0x6f, + 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, + 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x4e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x72, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, - 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, - 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, - 0x6e, 0x63, 0x22, 0x15, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x64, 0x0a, 0x15, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x70, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x36, 0x0a, 0x18, 0x55, 0x6e, 0x64, 0x6f, 0x44, + 0x69, 0x61, 0x73, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, + 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, + 0x53, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, + 0x53, 0x79, 0x6e, 0x63, 0x22, 0x15, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, 0x22, - 0x1b, 0x0a, 0x19, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x24, 0x0a, 0x22, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x46, 0x75, 0x6c, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0xed, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x15, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x36, 0x0a, 0x18, 0x55, 0x6e, 0x64, + 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, + 0x63, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, + 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, + 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x21, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x24, + 0x0a, 0x22, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x46, 0x75, 0x6c, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0xed, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, + 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, + 0x53, 0x79, 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, + 0x53, 0x79, 0x6e, 0x63, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, + 0x61, 0x73, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, - 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, - 0x6e, 0x63, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, - 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x52, 0x65, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, - 0x0a, 0x22, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x70, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x6b, - 0x0a, 0x23, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x7e, 0x0a, 0x22, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x33, 0x0a, 0x15, 0x50, - 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, 0x6e, 0x63, - 0x22, 0x34, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x0d, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, - 0x73, 0x22, 0x36, 0x0a, 0x0e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x13, 0x73, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x22, 0x6b, 0x0a, 0x23, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x33, 0x0a, + 0x15, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, + 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x69, 0x53, 0x79, + 0x6e, 0x63, 0x22, 0x34, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x0d, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x23, 0x0a, 0x0d, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x6f, 0x73, 0x22, 0x36, 0x0a, 0x0e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x18, + 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x41, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x18, 0x52, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x22, 0x41, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x5c, 0x0a, 0x0c, 0x56, 0x45, 0x78, 0x65, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x0d, 0x56, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x0c, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72, - 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x72, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x64, 0x69, 0x66, 0x66, 0x55, 0x75, 0x69, - 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6a, 0x0a, 0x0d, - 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, - 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x64, 0x69, - 0x66, 0x66, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, - 0x64, 0x69, 0x66, 0x66, 0x55, 0x75, 0x69, 0x64, 0x22, 0x79, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, - 0x66, 0x50, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6c, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x65, - 0x6c, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x65, 0x6c, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, - 0x65, 0x6c, 0x6c, 0x22, 0x68, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6e, 0x6c, - 0x79, 0x5f, 0x70, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6f, 0x6e, 0x6c, - 0x79, 0x50, 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x82, 0x02, - 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, - 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, - 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, - 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x63, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x63, 0x74, 0x12, - 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x38, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, - 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x77, 0x73, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, - 0x72, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x0c, 0x56, 0x44, 0x69, 0x66, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x70, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x44, 0x69, 0x66, 0x66, 0x50, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x0d, 0x70, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, - 0x66, 0x43, 0x6f, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, - 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, + 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x0c, 0x56, 0x44, + 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x64, 0x69, + 0x66, 0x66, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, + 0x64, 0x69, 0x66, 0x66, 0x55, 0x75, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, + 0x69, 0x66, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x6a, 0x0a, 0x0d, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x64, 0x69, 0x66, 0x66, 0x55, 0x75, 0x69, 0x64, 0x22, + 0x79, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x50, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x22, 0x68, 0x0a, 0x12, 0x56, 0x44, + 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x6f, 0x6e, 0x6c, 0x79, 0x50, 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x10, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, + 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x5f, 0x70, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x50, 0x63, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, + 0x38, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x72, 0x6f, 0x77, + 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x77, 0x73, + 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x0c, 0x56, 0x44, + 0x69, 0x66, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x70, 0x69, + 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x50, 0x69, 0x63, 0x6b, + 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x70, 0x69, 0x63, 0x6b, 0x65, + 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x4c, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9e, + 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x2e, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4f, 0x6e, 0x44, + 0x44, 0x4c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x22, + 0x46, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -5921,14 +5936,14 @@ var file_tabletmanagerdata_proto_goTypes = []interface{}{ (*BackupResponse)(nil), // 93: tabletmanagerdata.BackupResponse (*RestoreFromBackupRequest)(nil), // 94: tabletmanagerdata.RestoreFromBackupRequest (*RestoreFromBackupResponse)(nil), // 95: tabletmanagerdata.RestoreFromBackupResponse - (*VExecRequest)(nil), // 96: tabletmanagerdata.VExecRequest - (*VExecResponse)(nil), // 97: tabletmanagerdata.VExecResponse - (*VDiffRequest)(nil), // 98: tabletmanagerdata.VDiffRequest - (*VDiffResponse)(nil), // 99: tabletmanagerdata.VDiffResponse - (*VDiffPickerOptions)(nil), // 100: tabletmanagerdata.VDiffPickerOptions - (*VDiffReportOptions)(nil), // 101: tabletmanagerdata.VDiffReportOptions - (*VDiffCoreOptions)(nil), // 102: tabletmanagerdata.VDiffCoreOptions - (*VDiffOptions)(nil), // 103: tabletmanagerdata.VDiffOptions + (*VDiffRequest)(nil), // 96: tabletmanagerdata.VDiffRequest + (*VDiffResponse)(nil), // 97: tabletmanagerdata.VDiffResponse + (*VDiffPickerOptions)(nil), // 98: tabletmanagerdata.VDiffPickerOptions + (*VDiffReportOptions)(nil), // 99: tabletmanagerdata.VDiffReportOptions + (*VDiffCoreOptions)(nil), // 100: tabletmanagerdata.VDiffCoreOptions + (*VDiffOptions)(nil), // 101: tabletmanagerdata.VDiffOptions + (*UpdateVRWorkflowRequest)(nil), // 102: tabletmanagerdata.UpdateVRWorkflowRequest + (*UpdateVRWorkflowResponse)(nil), // 103: tabletmanagerdata.UpdateVRWorkflowResponse nil, // 104: tabletmanagerdata.UserPermission.PrivilegesEntry nil, // 105: tabletmanagerdata.DbPermission.PrivilegesEntry nil, // 106: tabletmanagerdata.ExecuteHookRequest.ExtraEnvEntry @@ -5944,6 +5959,7 @@ var file_tabletmanagerdata_proto_goTypes = []interface{}{ (*replicationdata.StopReplicationStatus)(nil), // 116: replicationdata.StopReplicationStatus (*logutil.Event)(nil), // 117: logutil.Event (*vttime.Time)(nil), // 118: vttime.Time + (binlogdata.OnDDLAction)(0), // 119: binlogdata.OnDDLAction } var file_tabletmanagerdata_proto_depIdxs = []int32{ 107, // 0: tabletmanagerdata.TableDefinition.fields:type_name -> query.Field @@ -5982,17 +5998,18 @@ var file_tabletmanagerdata_proto_depIdxs = []int32{ 117, // 33: tabletmanagerdata.BackupResponse.event:type_name -> logutil.Event 118, // 34: tabletmanagerdata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time 117, // 35: tabletmanagerdata.RestoreFromBackupResponse.event:type_name -> logutil.Event - 110, // 36: tabletmanagerdata.VExecResponse.result:type_name -> query.QueryResult - 103, // 37: tabletmanagerdata.VDiffRequest.options:type_name -> tabletmanagerdata.VDiffOptions - 110, // 38: tabletmanagerdata.VDiffResponse.output:type_name -> query.QueryResult - 100, // 39: tabletmanagerdata.VDiffOptions.picker_options:type_name -> tabletmanagerdata.VDiffPickerOptions - 102, // 40: tabletmanagerdata.VDiffOptions.core_options:type_name -> tabletmanagerdata.VDiffCoreOptions - 101, // 41: tabletmanagerdata.VDiffOptions.report_options:type_name -> tabletmanagerdata.VDiffReportOptions - 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 + 101, // 36: tabletmanagerdata.VDiffRequest.options:type_name -> tabletmanagerdata.VDiffOptions + 110, // 37: tabletmanagerdata.VDiffResponse.output:type_name -> query.QueryResult + 98, // 38: tabletmanagerdata.VDiffOptions.picker_options:type_name -> tabletmanagerdata.VDiffPickerOptions + 100, // 39: tabletmanagerdata.VDiffOptions.core_options:type_name -> tabletmanagerdata.VDiffCoreOptions + 99, // 40: tabletmanagerdata.VDiffOptions.report_options:type_name -> tabletmanagerdata.VDiffReportOptions + 119, // 41: tabletmanagerdata.UpdateVRWorkflowRequest.on_ddl:type_name -> binlogdata.OnDDLAction + 110, // 42: tabletmanagerdata.UpdateVRWorkflowResponse.result:type_name -> query.QueryResult + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name } func init() { file_tabletmanagerdata_proto_init() } @@ -7154,7 +7171,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VExecRequest); i { + switch v := v.(*VDiffRequest); i { case 0: return &v.state case 1: @@ -7166,7 +7183,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VExecResponse); i { + switch v := v.(*VDiffResponse); i { case 0: return &v.state case 1: @@ -7178,7 +7195,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffRequest); i { + switch v := v.(*VDiffPickerOptions); i { case 0: return &v.state case 1: @@ -7190,7 +7207,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffResponse); i { + switch v := v.(*VDiffReportOptions); i { case 0: return &v.state case 1: @@ -7202,7 +7219,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffPickerOptions); i { + switch v := v.(*VDiffCoreOptions); i { case 0: return &v.state case 1: @@ -7214,7 +7231,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffReportOptions); i { + switch v := v.(*VDiffOptions); i { case 0: return &v.state case 1: @@ -7226,7 +7243,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffCoreOptions); i { + switch v := v.(*UpdateVRWorkflowRequest); i { case 0: return &v.state case 1: @@ -7238,7 +7255,7 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VDiffOptions); i { + switch v := v.(*UpdateVRWorkflowResponse); i { case 0: return &v.state case 1: diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go index 4b3bbbbf13d..dfff704f4ab 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go @@ -9,6 +9,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" bits "math/bits" + binlogdata "vitess.io/vitess/go/vt/proto/binlogdata" logutil "vitess.io/vitess/go/vt/proto/logutil" query "vitess.io/vitess/go/vt/proto/query" replicationdata "vitess.io/vitess/go/vt/proto/replicationdata" @@ -4172,103 +4173,6 @@ func (m *RestoreFromBackupResponse) MarshalToSizedBufferVT(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *VExecRequest) 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 *VExecRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *VExecRequest) 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.Keyspace) > 0 { - i -= len(m.Keyspace) - copy(dAtA[i:], m.Keyspace) - i = encodeVarint(dAtA, i, uint64(len(m.Keyspace))) - i-- - dAtA[i] = 0x1a - } - if len(m.Workflow) > 0 { - i -= len(m.Workflow) - copy(dAtA[i:], m.Workflow) - i = encodeVarint(dAtA, i, uint64(len(m.Workflow))) - i-- - dAtA[i] = 0x12 - } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarint(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VExecResponse) 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 *VExecResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *VExecResponse) 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.Result != nil { - size, err := m.Result.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 *VDiffRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -4659,6 +4563,112 @@ func (m *VDiffOptions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *UpdateVRWorkflowRequest) 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 *UpdateVRWorkflowRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *UpdateVRWorkflowRequest) 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.OnDdl != 0 { + i = encodeVarint(dAtA, i, uint64(m.OnDdl)) + i-- + dAtA[i] = 0x20 + } + if len(m.TabletTypes) > 0 { + for iNdEx := len(m.TabletTypes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TabletTypes[iNdEx]) + copy(dAtA[i:], m.TabletTypes[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.TabletTypes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Cells) > 0 { + for iNdEx := len(m.Cells) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cells[iNdEx]) + copy(dAtA[i:], m.Cells[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Cells[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Workflow) > 0 { + i -= len(m.Workflow) + copy(dAtA[i:], m.Workflow) + i = encodeVarint(dAtA, i, uint64(len(m.Workflow))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateVRWorkflowResponse) 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 *UpdateVRWorkflowResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *UpdateVRWorkflowResponse) 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.Result != nil { + size, err := m.Result.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset @@ -6095,42 +6105,6 @@ func (m *RestoreFromBackupResponse) SizeVT() (n int) { return n } -func (m *VExecRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Query) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Workflow) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Keyspace) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *VExecResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - func (m *VDiffRequest) SizeVT() (n int) { if m == nil { return 0 @@ -6282,6 +6256,49 @@ func (m *VDiffOptions) SizeVT() (n int) { return n } +func (m *UpdateVRWorkflowRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Workflow) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Cells) > 0 { + for _, s := range m.Cells { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.TabletTypes) > 0 { + for _, s := range m.TabletTypes { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.OnDdl != 0 { + n += 1 + sov(uint64(m.OnDdl)) + } + n += len(m.unknownFields) + return n +} + +func (m *UpdateVRWorkflowResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Result != nil { + l = m.Result.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 } @@ -12456,7 +12473,7 @@ func (m *VReplicationWaitForPosRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= int64(b&0x7F) << shift + m.Id |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -14865,7 +14882,7 @@ func (m *RestoreFromBackupResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *VExecRequest) UnmarshalVT(dAtA []byte) error { +func (m *VDiffRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14888,249 +14905,15 @@ func (m *VExecRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VExecRequest: wiretype end group for non-group") + return fmt.Errorf("proto: VDiffRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VExecRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VDiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", 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.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Workflow", 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.Workflow = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", 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.Keyspace = 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 *VExecResponse) 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: VExecResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { - m.Result = &query.QueryResult{} - } - if err := m.Result.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 *VDiffRequest) 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: VDiffRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VDiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -16112,6 +15895,259 @@ func (m *VDiffOptions) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *UpdateVRWorkflowRequest) 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: UpdateVRWorkflowRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateVRWorkflowRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Workflow", 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.Workflow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cells", 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.Cells = append(m.Cells, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TabletTypes", 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.TabletTypes = append(m.TabletTypes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OnDdl", wireType) + } + m.OnDdl = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OnDdl |= binlogdata.OnDDLAction(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateVRWorkflowResponse) 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: UpdateVRWorkflowResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateVRWorkflowResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { + m.Result = &query.QueryResult{} + } + if err := m.Result.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skip(dAtA []byte) (n int, err error) { l := len(dAtA) diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go index 94f3d83a423..2f4af68163a 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go @@ -45,7 +45,7 @@ var file_tabletmanagerservice_proto_rawDesc = []byte{ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x17, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x94, 0x27, 0x0a, 0x0d, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb5, 0x27, 0x0a, 0x0d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, @@ -243,126 +243,128 @@ var file_tabletmanagerservice_proto_rawDesc = []byte{ 0x74, 0x1a, 0x31, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x05, 0x56, 0x44, 0x69, 0x66, 0x66, 0x12, - 0x1f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, - 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x12, - 0x31, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2a, 0x2e, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x05, 0x56, 0x44, 0x69, 0x66, 0x66, 0x12, 0x1f, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, + 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x31, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x0d, 0x44, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, - 0x0a, 0x11, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x12, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x73, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, - 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x34, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x0d, 0x44, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, + 0x11, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x64, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x73, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x57, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, + 0x61, 0x73, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0a, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x24, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x79, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x13, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x12, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x65, 0x72, 0x73, 0x12, 0x34, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0a, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x79, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x13, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x12, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x35, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, - 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x28, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, - 0x06, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x72, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, - 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0x4c, 0x0a, 0x05, 0x56, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1f, 0x2e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x56, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x56, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x57, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x35, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x28, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, + 0x72, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x12, 0x2b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, + 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, + 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_tabletmanagerservice_proto_goTypes = []interface{}{ @@ -396,23 +398,23 @@ var file_tabletmanagerservice_proto_goTypes = []interface{}{ (*tabletmanagerdata.GetReplicasRequest)(nil), // 27: tabletmanagerdata.GetReplicasRequest (*tabletmanagerdata.VReplicationExecRequest)(nil), // 28: tabletmanagerdata.VReplicationExecRequest (*tabletmanagerdata.VReplicationWaitForPosRequest)(nil), // 29: tabletmanagerdata.VReplicationWaitForPosRequest - (*tabletmanagerdata.VDiffRequest)(nil), // 30: tabletmanagerdata.VDiffRequest - (*tabletmanagerdata.ResetReplicationRequest)(nil), // 31: tabletmanagerdata.ResetReplicationRequest - (*tabletmanagerdata.InitPrimaryRequest)(nil), // 32: tabletmanagerdata.InitPrimaryRequest - (*tabletmanagerdata.PopulateReparentJournalRequest)(nil), // 33: tabletmanagerdata.PopulateReparentJournalRequest - (*tabletmanagerdata.InitReplicaRequest)(nil), // 34: tabletmanagerdata.InitReplicaRequest - (*tabletmanagerdata.DemotePrimaryRequest)(nil), // 35: tabletmanagerdata.DemotePrimaryRequest - (*tabletmanagerdata.UndoDemotePrimaryRequest)(nil), // 36: tabletmanagerdata.UndoDemotePrimaryRequest - (*tabletmanagerdata.ReplicaWasPromotedRequest)(nil), // 37: tabletmanagerdata.ReplicaWasPromotedRequest - (*tabletmanagerdata.ResetReplicationParametersRequest)(nil), // 38: tabletmanagerdata.ResetReplicationParametersRequest - (*tabletmanagerdata.FullStatusRequest)(nil), // 39: tabletmanagerdata.FullStatusRequest - (*tabletmanagerdata.SetReplicationSourceRequest)(nil), // 40: tabletmanagerdata.SetReplicationSourceRequest - (*tabletmanagerdata.ReplicaWasRestartedRequest)(nil), // 41: tabletmanagerdata.ReplicaWasRestartedRequest - (*tabletmanagerdata.StopReplicationAndGetStatusRequest)(nil), // 42: tabletmanagerdata.StopReplicationAndGetStatusRequest - (*tabletmanagerdata.PromoteReplicaRequest)(nil), // 43: tabletmanagerdata.PromoteReplicaRequest - (*tabletmanagerdata.BackupRequest)(nil), // 44: tabletmanagerdata.BackupRequest - (*tabletmanagerdata.RestoreFromBackupRequest)(nil), // 45: tabletmanagerdata.RestoreFromBackupRequest - (*tabletmanagerdata.VExecRequest)(nil), // 46: tabletmanagerdata.VExecRequest + (*tabletmanagerdata.UpdateVRWorkflowRequest)(nil), // 30: tabletmanagerdata.UpdateVRWorkflowRequest + (*tabletmanagerdata.VDiffRequest)(nil), // 31: tabletmanagerdata.VDiffRequest + (*tabletmanagerdata.ResetReplicationRequest)(nil), // 32: tabletmanagerdata.ResetReplicationRequest + (*tabletmanagerdata.InitPrimaryRequest)(nil), // 33: tabletmanagerdata.InitPrimaryRequest + (*tabletmanagerdata.PopulateReparentJournalRequest)(nil), // 34: tabletmanagerdata.PopulateReparentJournalRequest + (*tabletmanagerdata.InitReplicaRequest)(nil), // 35: tabletmanagerdata.InitReplicaRequest + (*tabletmanagerdata.DemotePrimaryRequest)(nil), // 36: tabletmanagerdata.DemotePrimaryRequest + (*tabletmanagerdata.UndoDemotePrimaryRequest)(nil), // 37: tabletmanagerdata.UndoDemotePrimaryRequest + (*tabletmanagerdata.ReplicaWasPromotedRequest)(nil), // 38: tabletmanagerdata.ReplicaWasPromotedRequest + (*tabletmanagerdata.ResetReplicationParametersRequest)(nil), // 39: tabletmanagerdata.ResetReplicationParametersRequest + (*tabletmanagerdata.FullStatusRequest)(nil), // 40: tabletmanagerdata.FullStatusRequest + (*tabletmanagerdata.SetReplicationSourceRequest)(nil), // 41: tabletmanagerdata.SetReplicationSourceRequest + (*tabletmanagerdata.ReplicaWasRestartedRequest)(nil), // 42: tabletmanagerdata.ReplicaWasRestartedRequest + (*tabletmanagerdata.StopReplicationAndGetStatusRequest)(nil), // 43: tabletmanagerdata.StopReplicationAndGetStatusRequest + (*tabletmanagerdata.PromoteReplicaRequest)(nil), // 44: tabletmanagerdata.PromoteReplicaRequest + (*tabletmanagerdata.BackupRequest)(nil), // 45: tabletmanagerdata.BackupRequest + (*tabletmanagerdata.RestoreFromBackupRequest)(nil), // 46: tabletmanagerdata.RestoreFromBackupRequest (*tabletmanagerdata.PingResponse)(nil), // 47: tabletmanagerdata.PingResponse (*tabletmanagerdata.SleepResponse)(nil), // 48: tabletmanagerdata.SleepResponse (*tabletmanagerdata.ExecuteHookResponse)(nil), // 49: tabletmanagerdata.ExecuteHookResponse @@ -443,23 +445,23 @@ var file_tabletmanagerservice_proto_goTypes = []interface{}{ (*tabletmanagerdata.GetReplicasResponse)(nil), // 74: tabletmanagerdata.GetReplicasResponse (*tabletmanagerdata.VReplicationExecResponse)(nil), // 75: tabletmanagerdata.VReplicationExecResponse (*tabletmanagerdata.VReplicationWaitForPosResponse)(nil), // 76: tabletmanagerdata.VReplicationWaitForPosResponse - (*tabletmanagerdata.VDiffResponse)(nil), // 77: tabletmanagerdata.VDiffResponse - (*tabletmanagerdata.ResetReplicationResponse)(nil), // 78: tabletmanagerdata.ResetReplicationResponse - (*tabletmanagerdata.InitPrimaryResponse)(nil), // 79: tabletmanagerdata.InitPrimaryResponse - (*tabletmanagerdata.PopulateReparentJournalResponse)(nil), // 80: tabletmanagerdata.PopulateReparentJournalResponse - (*tabletmanagerdata.InitReplicaResponse)(nil), // 81: tabletmanagerdata.InitReplicaResponse - (*tabletmanagerdata.DemotePrimaryResponse)(nil), // 82: tabletmanagerdata.DemotePrimaryResponse - (*tabletmanagerdata.UndoDemotePrimaryResponse)(nil), // 83: tabletmanagerdata.UndoDemotePrimaryResponse - (*tabletmanagerdata.ReplicaWasPromotedResponse)(nil), // 84: tabletmanagerdata.ReplicaWasPromotedResponse - (*tabletmanagerdata.ResetReplicationParametersResponse)(nil), // 85: tabletmanagerdata.ResetReplicationParametersResponse - (*tabletmanagerdata.FullStatusResponse)(nil), // 86: tabletmanagerdata.FullStatusResponse - (*tabletmanagerdata.SetReplicationSourceResponse)(nil), // 87: tabletmanagerdata.SetReplicationSourceResponse - (*tabletmanagerdata.ReplicaWasRestartedResponse)(nil), // 88: tabletmanagerdata.ReplicaWasRestartedResponse - (*tabletmanagerdata.StopReplicationAndGetStatusResponse)(nil), // 89: tabletmanagerdata.StopReplicationAndGetStatusResponse - (*tabletmanagerdata.PromoteReplicaResponse)(nil), // 90: tabletmanagerdata.PromoteReplicaResponse - (*tabletmanagerdata.BackupResponse)(nil), // 91: tabletmanagerdata.BackupResponse - (*tabletmanagerdata.RestoreFromBackupResponse)(nil), // 92: tabletmanagerdata.RestoreFromBackupResponse - (*tabletmanagerdata.VExecResponse)(nil), // 93: tabletmanagerdata.VExecResponse + (*tabletmanagerdata.UpdateVRWorkflowResponse)(nil), // 77: tabletmanagerdata.UpdateVRWorkflowResponse + (*tabletmanagerdata.VDiffResponse)(nil), // 78: tabletmanagerdata.VDiffResponse + (*tabletmanagerdata.ResetReplicationResponse)(nil), // 79: tabletmanagerdata.ResetReplicationResponse + (*tabletmanagerdata.InitPrimaryResponse)(nil), // 80: tabletmanagerdata.InitPrimaryResponse + (*tabletmanagerdata.PopulateReparentJournalResponse)(nil), // 81: tabletmanagerdata.PopulateReparentJournalResponse + (*tabletmanagerdata.InitReplicaResponse)(nil), // 82: tabletmanagerdata.InitReplicaResponse + (*tabletmanagerdata.DemotePrimaryResponse)(nil), // 83: tabletmanagerdata.DemotePrimaryResponse + (*tabletmanagerdata.UndoDemotePrimaryResponse)(nil), // 84: tabletmanagerdata.UndoDemotePrimaryResponse + (*tabletmanagerdata.ReplicaWasPromotedResponse)(nil), // 85: tabletmanagerdata.ReplicaWasPromotedResponse + (*tabletmanagerdata.ResetReplicationParametersResponse)(nil), // 86: tabletmanagerdata.ResetReplicationParametersResponse + (*tabletmanagerdata.FullStatusResponse)(nil), // 87: tabletmanagerdata.FullStatusResponse + (*tabletmanagerdata.SetReplicationSourceResponse)(nil), // 88: tabletmanagerdata.SetReplicationSourceResponse + (*tabletmanagerdata.ReplicaWasRestartedResponse)(nil), // 89: tabletmanagerdata.ReplicaWasRestartedResponse + (*tabletmanagerdata.StopReplicationAndGetStatusResponse)(nil), // 90: tabletmanagerdata.StopReplicationAndGetStatusResponse + (*tabletmanagerdata.PromoteReplicaResponse)(nil), // 91: tabletmanagerdata.PromoteReplicaResponse + (*tabletmanagerdata.BackupResponse)(nil), // 92: tabletmanagerdata.BackupResponse + (*tabletmanagerdata.RestoreFromBackupResponse)(nil), // 93: tabletmanagerdata.RestoreFromBackupResponse } var file_tabletmanagerservice_proto_depIdxs = []int32{ 0, // 0: tabletmanagerservice.TabletManager.Ping:input_type -> tabletmanagerdata.PingRequest @@ -492,23 +494,23 @@ var file_tabletmanagerservice_proto_depIdxs = []int32{ 27, // 27: tabletmanagerservice.TabletManager.GetReplicas:input_type -> tabletmanagerdata.GetReplicasRequest 28, // 28: tabletmanagerservice.TabletManager.VReplicationExec:input_type -> tabletmanagerdata.VReplicationExecRequest 29, // 29: tabletmanagerservice.TabletManager.VReplicationWaitForPos:input_type -> tabletmanagerdata.VReplicationWaitForPosRequest - 30, // 30: tabletmanagerservice.TabletManager.VDiff:input_type -> tabletmanagerdata.VDiffRequest - 31, // 31: tabletmanagerservice.TabletManager.ResetReplication:input_type -> tabletmanagerdata.ResetReplicationRequest - 32, // 32: tabletmanagerservice.TabletManager.InitPrimary:input_type -> tabletmanagerdata.InitPrimaryRequest - 33, // 33: tabletmanagerservice.TabletManager.PopulateReparentJournal:input_type -> tabletmanagerdata.PopulateReparentJournalRequest - 34, // 34: tabletmanagerservice.TabletManager.InitReplica:input_type -> tabletmanagerdata.InitReplicaRequest - 35, // 35: tabletmanagerservice.TabletManager.DemotePrimary:input_type -> tabletmanagerdata.DemotePrimaryRequest - 36, // 36: tabletmanagerservice.TabletManager.UndoDemotePrimary:input_type -> tabletmanagerdata.UndoDemotePrimaryRequest - 37, // 37: tabletmanagerservice.TabletManager.ReplicaWasPromoted:input_type -> tabletmanagerdata.ReplicaWasPromotedRequest - 38, // 38: tabletmanagerservice.TabletManager.ResetReplicationParameters:input_type -> tabletmanagerdata.ResetReplicationParametersRequest - 39, // 39: tabletmanagerservice.TabletManager.FullStatus:input_type -> tabletmanagerdata.FullStatusRequest - 40, // 40: tabletmanagerservice.TabletManager.SetReplicationSource:input_type -> tabletmanagerdata.SetReplicationSourceRequest - 41, // 41: tabletmanagerservice.TabletManager.ReplicaWasRestarted:input_type -> tabletmanagerdata.ReplicaWasRestartedRequest - 42, // 42: tabletmanagerservice.TabletManager.StopReplicationAndGetStatus:input_type -> tabletmanagerdata.StopReplicationAndGetStatusRequest - 43, // 43: tabletmanagerservice.TabletManager.PromoteReplica:input_type -> tabletmanagerdata.PromoteReplicaRequest - 44, // 44: tabletmanagerservice.TabletManager.Backup:input_type -> tabletmanagerdata.BackupRequest - 45, // 45: tabletmanagerservice.TabletManager.RestoreFromBackup:input_type -> tabletmanagerdata.RestoreFromBackupRequest - 46, // 46: tabletmanagerservice.TabletManager.VExec:input_type -> tabletmanagerdata.VExecRequest + 30, // 30: tabletmanagerservice.TabletManager.UpdateVRWorkflow:input_type -> tabletmanagerdata.UpdateVRWorkflowRequest + 31, // 31: tabletmanagerservice.TabletManager.VDiff:input_type -> tabletmanagerdata.VDiffRequest + 32, // 32: tabletmanagerservice.TabletManager.ResetReplication:input_type -> tabletmanagerdata.ResetReplicationRequest + 33, // 33: tabletmanagerservice.TabletManager.InitPrimary:input_type -> tabletmanagerdata.InitPrimaryRequest + 34, // 34: tabletmanagerservice.TabletManager.PopulateReparentJournal:input_type -> tabletmanagerdata.PopulateReparentJournalRequest + 35, // 35: tabletmanagerservice.TabletManager.InitReplica:input_type -> tabletmanagerdata.InitReplicaRequest + 36, // 36: tabletmanagerservice.TabletManager.DemotePrimary:input_type -> tabletmanagerdata.DemotePrimaryRequest + 37, // 37: tabletmanagerservice.TabletManager.UndoDemotePrimary:input_type -> tabletmanagerdata.UndoDemotePrimaryRequest + 38, // 38: tabletmanagerservice.TabletManager.ReplicaWasPromoted:input_type -> tabletmanagerdata.ReplicaWasPromotedRequest + 39, // 39: tabletmanagerservice.TabletManager.ResetReplicationParameters:input_type -> tabletmanagerdata.ResetReplicationParametersRequest + 40, // 40: tabletmanagerservice.TabletManager.FullStatus:input_type -> tabletmanagerdata.FullStatusRequest + 41, // 41: tabletmanagerservice.TabletManager.SetReplicationSource:input_type -> tabletmanagerdata.SetReplicationSourceRequest + 42, // 42: tabletmanagerservice.TabletManager.ReplicaWasRestarted:input_type -> tabletmanagerdata.ReplicaWasRestartedRequest + 43, // 43: tabletmanagerservice.TabletManager.StopReplicationAndGetStatus:input_type -> tabletmanagerdata.StopReplicationAndGetStatusRequest + 44, // 44: tabletmanagerservice.TabletManager.PromoteReplica:input_type -> tabletmanagerdata.PromoteReplicaRequest + 45, // 45: tabletmanagerservice.TabletManager.Backup:input_type -> tabletmanagerdata.BackupRequest + 46, // 46: tabletmanagerservice.TabletManager.RestoreFromBackup:input_type -> tabletmanagerdata.RestoreFromBackupRequest 47, // 47: tabletmanagerservice.TabletManager.Ping:output_type -> tabletmanagerdata.PingResponse 48, // 48: tabletmanagerservice.TabletManager.Sleep:output_type -> tabletmanagerdata.SleepResponse 49, // 49: tabletmanagerservice.TabletManager.ExecuteHook:output_type -> tabletmanagerdata.ExecuteHookResponse @@ -539,23 +541,23 @@ var file_tabletmanagerservice_proto_depIdxs = []int32{ 74, // 74: tabletmanagerservice.TabletManager.GetReplicas:output_type -> tabletmanagerdata.GetReplicasResponse 75, // 75: tabletmanagerservice.TabletManager.VReplicationExec:output_type -> tabletmanagerdata.VReplicationExecResponse 76, // 76: tabletmanagerservice.TabletManager.VReplicationWaitForPos:output_type -> tabletmanagerdata.VReplicationWaitForPosResponse - 77, // 77: tabletmanagerservice.TabletManager.VDiff:output_type -> tabletmanagerdata.VDiffResponse - 78, // 78: tabletmanagerservice.TabletManager.ResetReplication:output_type -> tabletmanagerdata.ResetReplicationResponse - 79, // 79: tabletmanagerservice.TabletManager.InitPrimary:output_type -> tabletmanagerdata.InitPrimaryResponse - 80, // 80: tabletmanagerservice.TabletManager.PopulateReparentJournal:output_type -> tabletmanagerdata.PopulateReparentJournalResponse - 81, // 81: tabletmanagerservice.TabletManager.InitReplica:output_type -> tabletmanagerdata.InitReplicaResponse - 82, // 82: tabletmanagerservice.TabletManager.DemotePrimary:output_type -> tabletmanagerdata.DemotePrimaryResponse - 83, // 83: tabletmanagerservice.TabletManager.UndoDemotePrimary:output_type -> tabletmanagerdata.UndoDemotePrimaryResponse - 84, // 84: tabletmanagerservice.TabletManager.ReplicaWasPromoted:output_type -> tabletmanagerdata.ReplicaWasPromotedResponse - 85, // 85: tabletmanagerservice.TabletManager.ResetReplicationParameters:output_type -> tabletmanagerdata.ResetReplicationParametersResponse - 86, // 86: tabletmanagerservice.TabletManager.FullStatus:output_type -> tabletmanagerdata.FullStatusResponse - 87, // 87: tabletmanagerservice.TabletManager.SetReplicationSource:output_type -> tabletmanagerdata.SetReplicationSourceResponse - 88, // 88: tabletmanagerservice.TabletManager.ReplicaWasRestarted:output_type -> tabletmanagerdata.ReplicaWasRestartedResponse - 89, // 89: tabletmanagerservice.TabletManager.StopReplicationAndGetStatus:output_type -> tabletmanagerdata.StopReplicationAndGetStatusResponse - 90, // 90: tabletmanagerservice.TabletManager.PromoteReplica:output_type -> tabletmanagerdata.PromoteReplicaResponse - 91, // 91: tabletmanagerservice.TabletManager.Backup:output_type -> tabletmanagerdata.BackupResponse - 92, // 92: tabletmanagerservice.TabletManager.RestoreFromBackup:output_type -> tabletmanagerdata.RestoreFromBackupResponse - 93, // 93: tabletmanagerservice.TabletManager.VExec:output_type -> tabletmanagerdata.VExecResponse + 77, // 77: tabletmanagerservice.TabletManager.UpdateVRWorkflow:output_type -> tabletmanagerdata.UpdateVRWorkflowResponse + 78, // 78: tabletmanagerservice.TabletManager.VDiff:output_type -> tabletmanagerdata.VDiffResponse + 79, // 79: tabletmanagerservice.TabletManager.ResetReplication:output_type -> tabletmanagerdata.ResetReplicationResponse + 80, // 80: tabletmanagerservice.TabletManager.InitPrimary:output_type -> tabletmanagerdata.InitPrimaryResponse + 81, // 81: tabletmanagerservice.TabletManager.PopulateReparentJournal:output_type -> tabletmanagerdata.PopulateReparentJournalResponse + 82, // 82: tabletmanagerservice.TabletManager.InitReplica:output_type -> tabletmanagerdata.InitReplicaResponse + 83, // 83: tabletmanagerservice.TabletManager.DemotePrimary:output_type -> tabletmanagerdata.DemotePrimaryResponse + 84, // 84: tabletmanagerservice.TabletManager.UndoDemotePrimary:output_type -> tabletmanagerdata.UndoDemotePrimaryResponse + 85, // 85: tabletmanagerservice.TabletManager.ReplicaWasPromoted:output_type -> tabletmanagerdata.ReplicaWasPromotedResponse + 86, // 86: tabletmanagerservice.TabletManager.ResetReplicationParameters:output_type -> tabletmanagerdata.ResetReplicationParametersResponse + 87, // 87: tabletmanagerservice.TabletManager.FullStatus:output_type -> tabletmanagerdata.FullStatusResponse + 88, // 88: tabletmanagerservice.TabletManager.SetReplicationSource:output_type -> tabletmanagerdata.SetReplicationSourceResponse + 89, // 89: tabletmanagerservice.TabletManager.ReplicaWasRestarted:output_type -> tabletmanagerdata.ReplicaWasRestartedResponse + 90, // 90: tabletmanagerservice.TabletManager.StopReplicationAndGetStatus:output_type -> tabletmanagerdata.StopReplicationAndGetStatusResponse + 91, // 91: tabletmanagerservice.TabletManager.PromoteReplica:output_type -> tabletmanagerdata.PromoteReplicaResponse + 92, // 92: tabletmanagerservice.TabletManager.Backup:output_type -> tabletmanagerdata.BackupResponse + 93, // 93: tabletmanagerservice.TabletManager.RestoreFromBackup:output_type -> tabletmanagerdata.RestoreFromBackupResponse 47, // [47:94] is the sub-list for method output_type 0, // [0:47] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice_grpc.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice_grpc.pb.go index 10b11a9a5bc..caca536e2d5 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice_grpc.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice_grpc.pb.go @@ -71,6 +71,7 @@ type TabletManagerClient interface { // VReplication API VReplicationExec(ctx context.Context, in *tabletmanagerdata.VReplicationExecRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationExecResponse, error) VReplicationWaitForPos(ctx context.Context, in *tabletmanagerdata.VReplicationWaitForPosRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationWaitForPosResponse, error) + UpdateVRWorkflow(ctx context.Context, in *tabletmanagerdata.UpdateVRWorkflowRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UpdateVRWorkflowResponse, error) // VDiff API VDiff(ctx context.Context, in *tabletmanagerdata.VDiffRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VDiffResponse, error) // ResetReplication makes the target not replicating @@ -104,8 +105,6 @@ type TabletManagerClient interface { Backup(ctx context.Context, in *tabletmanagerdata.BackupRequest, opts ...grpc.CallOption) (TabletManager_BackupClient, error) // RestoreFromBackup deletes all local data and restores it from the latest backup. RestoreFromBackup(ctx context.Context, in *tabletmanagerdata.RestoreFromBackupRequest, opts ...grpc.CallOption) (TabletManager_RestoreFromBackupClient, error) - // Generic VExec request. Can be used for various purposes - VExec(ctx context.Context, in *tabletmanagerdata.VExecRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VExecResponse, error) } type tabletManagerClient struct { @@ -386,6 +385,15 @@ func (c *tabletManagerClient) VReplicationWaitForPos(ctx context.Context, in *ta return out, nil } +func (c *tabletManagerClient) UpdateVRWorkflow(ctx context.Context, in *tabletmanagerdata.UpdateVRWorkflowRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UpdateVRWorkflowResponse, error) { + out := new(tabletmanagerdata.UpdateVRWorkflowResponse) + err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/UpdateVRWorkflow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *tabletManagerClient) VDiff(ctx context.Context, in *tabletmanagerdata.VDiffRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VDiffResponse, error) { out := new(tabletmanagerdata.VDiffResponse) err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/VDiff", in, out, opts...) @@ -576,15 +584,6 @@ func (x *tabletManagerRestoreFromBackupClient) Recv() (*tabletmanagerdata.Restor return m, nil } -func (c *tabletManagerClient) VExec(ctx context.Context, in *tabletmanagerdata.VExecRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VExecResponse, error) { - out := new(tabletmanagerdata.VExecResponse) - err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/VExec", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // TabletManagerServer is the server API for TabletManager service. // All implementations must embed UnimplementedTabletManagerServer // for forward compatibility @@ -637,6 +636,7 @@ type TabletManagerServer interface { // VReplication API VReplicationExec(context.Context, *tabletmanagerdata.VReplicationExecRequest) (*tabletmanagerdata.VReplicationExecResponse, error) VReplicationWaitForPos(context.Context, *tabletmanagerdata.VReplicationWaitForPosRequest) (*tabletmanagerdata.VReplicationWaitForPosResponse, error) + UpdateVRWorkflow(context.Context, *tabletmanagerdata.UpdateVRWorkflowRequest) (*tabletmanagerdata.UpdateVRWorkflowResponse, error) // VDiff API VDiff(context.Context, *tabletmanagerdata.VDiffRequest) (*tabletmanagerdata.VDiffResponse, error) // ResetReplication makes the target not replicating @@ -670,8 +670,6 @@ type TabletManagerServer interface { Backup(*tabletmanagerdata.BackupRequest, TabletManager_BackupServer) error // RestoreFromBackup deletes all local data and restores it from the latest backup. RestoreFromBackup(*tabletmanagerdata.RestoreFromBackupRequest, TabletManager_RestoreFromBackupServer) error - // Generic VExec request. Can be used for various purposes - VExec(context.Context, *tabletmanagerdata.VExecRequest) (*tabletmanagerdata.VExecResponse, error) mustEmbedUnimplementedTabletManagerServer() } @@ -769,6 +767,9 @@ func (UnimplementedTabletManagerServer) VReplicationExec(context.Context, *table func (UnimplementedTabletManagerServer) VReplicationWaitForPos(context.Context, *tabletmanagerdata.VReplicationWaitForPosRequest) (*tabletmanagerdata.VReplicationWaitForPosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VReplicationWaitForPos not implemented") } +func (UnimplementedTabletManagerServer) UpdateVRWorkflow(context.Context, *tabletmanagerdata.UpdateVRWorkflowRequest) (*tabletmanagerdata.UpdateVRWorkflowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateVRWorkflow not implemented") +} func (UnimplementedTabletManagerServer) VDiff(context.Context, *tabletmanagerdata.VDiffRequest) (*tabletmanagerdata.VDiffResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VDiff not implemented") } @@ -817,9 +818,6 @@ func (UnimplementedTabletManagerServer) Backup(*tabletmanagerdata.BackupRequest, func (UnimplementedTabletManagerServer) RestoreFromBackup(*tabletmanagerdata.RestoreFromBackupRequest, TabletManager_RestoreFromBackupServer) error { return status.Errorf(codes.Unimplemented, "method RestoreFromBackup not implemented") } -func (UnimplementedTabletManagerServer) VExec(context.Context, *tabletmanagerdata.VExecRequest) (*tabletmanagerdata.VExecResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VExec not implemented") -} func (UnimplementedTabletManagerServer) mustEmbedUnimplementedTabletManagerServer() {} // UnsafeTabletManagerServer may be embedded to opt out of forward compatibility for this service. @@ -1373,6 +1371,24 @@ func _TabletManager_VReplicationWaitForPos_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _TabletManager_UpdateVRWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(tabletmanagerdata.UpdateVRWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TabletManagerServer).UpdateVRWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tabletmanagerservice.TabletManager/UpdateVRWorkflow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TabletManagerServer).UpdateVRWorkflow(ctx, req.(*tabletmanagerdata.UpdateVRWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TabletManager_VDiff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(tabletmanagerdata.VDiffRequest) if err := dec(in); err != nil { @@ -1667,24 +1683,6 @@ func (x *tabletManagerRestoreFromBackupServer) Send(m *tabletmanagerdata.Restore return x.ServerStream.SendMsg(m) } -func _TabletManager_VExec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(tabletmanagerdata.VExecRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TabletManagerServer).VExec(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tabletmanagerservice.TabletManager/VExec", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TabletManagerServer).VExec(ctx, req.(*tabletmanagerdata.VExecRequest)) - } - return interceptor(ctx, in, info, handler) -} - // TabletManager_ServiceDesc is the grpc.ServiceDesc for TabletManager service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1812,6 +1810,10 @@ var TabletManager_ServiceDesc = grpc.ServiceDesc{ MethodName: "VReplicationWaitForPos", Handler: _TabletManager_VReplicationWaitForPos_Handler, }, + { + MethodName: "UpdateVRWorkflow", + Handler: _TabletManager_UpdateVRWorkflow_Handler, + }, { MethodName: "VDiff", Handler: _TabletManager_VDiff_Handler, @@ -1868,10 +1870,6 @@ var TabletManager_ServiceDesc = grpc.ServiceDesc{ MethodName: "PromoteReplica", Handler: _TabletManager_PromoteReplica_Handler, }, - { - MethodName: "VExec", - Handler: _TabletManager_VExec_Handler, - }, }, Streams: []grpc.StreamDesc{ { diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 86777c50190..ecaa2ce7fe7 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -1436,7 +1436,7 @@ type Shard_SourceShard struct { unknownFields protoimpl.UnknownFields // Uid is the unique ID for this SourceShard object. - Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // the source keyspace Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"` // the source shard @@ -1479,7 +1479,7 @@ func (*Shard_SourceShard) Descriptor() ([]byte, []int) { return file_topodata_proto_rawDescGZIP(), []int{3, 0} } -func (x *Shard_SourceShard) GetUid() uint32 { +func (x *Shard_SourceShard) GetUid() int32 { if x != nil { return x.Uid } @@ -1913,7 +1913,7 @@ var file_topodata_proto_rawDesc = []byte{ 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x1a, 0x9a, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, diff --git a/go/vt/proto/topodata/topodata_vtproto.pb.go b/go/vt/proto/topodata/topodata_vtproto.pb.go index 9cced30e87d..36569569af2 100644 --- a/go/vt/proto/topodata/topodata_vtproto.pb.go +++ b/go/vt/proto/topodata/topodata_vtproto.pb.go @@ -2823,7 +2823,7 @@ func (m *Shard_SourceShard) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Uid |= uint32(b&0x7F) << shift + m.Uid |= int32(b&0x7F) << shift if b < 0x80 { break } diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 3eb1eee1a1a..87df5932e2e 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -5579,6 +5579,7 @@ type GetWorkflowsRequest struct { Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` ActiveOnly bool `protobuf:"varint,2,opt,name=active_only,json=activeOnly,proto3" json:"active_only,omitempty"` + NameOnly bool `protobuf:"varint,3,opt,name=name_only,json=nameOnly,proto3" json:"name_only,omitempty"` } func (x *GetWorkflowsRequest) Reset() { @@ -5627,6 +5628,13 @@ func (x *GetWorkflowsRequest) GetActiveOnly() bool { return false } +func (x *GetWorkflowsRequest) GetNameOnly() bool { + if x != nil { + return x.NameOnly + } + return false +} + type GetWorkflowsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8694,7 +8702,7 @@ type SourceShardAddRequest struct { Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"` - Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` SourceKeyspace string `protobuf:"bytes,4,opt,name=source_keyspace,json=sourceKeyspace,proto3" json:"source_keyspace,omitempty"` SourceShard string `protobuf:"bytes,5,opt,name=source_shard,json=sourceShard,proto3" json:"source_shard,omitempty"` // KeyRange identifies the key range to use for the SourceShard. This field is @@ -8751,7 +8759,7 @@ func (x *SourceShardAddRequest) GetShard() string { return "" } -func (x *SourceShardAddRequest) GetUid() uint32 { +func (x *SourceShardAddRequest) GetUid() int32 { if x != nil { return x.Uid } @@ -8841,7 +8849,7 @@ type SourceShardDeleteRequest struct { Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"` - Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` } func (x *SourceShardDeleteRequest) Reset() { @@ -8890,7 +8898,7 @@ func (x *SourceShardDeleteRequest) GetShard() string { return "" } -func (x *SourceShardDeleteRequest) GetUid() uint32 { +func (x *SourceShardDeleteRequest) GetUid() int32 { if x != nil { return x.Uid } @@ -10241,6 +10249,118 @@ func (x *ValidateVSchemaResponse) GetResultsByShard() map[string]*ValidateShardR return nil } +type WorkflowUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` + // TabletRequest gets passed on to each primary tablet involved + // in the workflow via the UpdateVRWorkflow tabletmanager RPC. + TabletRequest *tabletmanagerdata.UpdateVRWorkflowRequest `protobuf:"bytes,2,opt,name=tablet_request,json=tabletRequest,proto3" json:"tablet_request,omitempty"` +} + +func (x *WorkflowUpdateRequest) Reset() { + *x = WorkflowUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowUpdateRequest) ProtoMessage() {} + +func (x *WorkflowUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[179] + 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 WorkflowUpdateRequest.ProtoReflect.Descriptor instead. +func (*WorkflowUpdateRequest) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{179} +} + +func (x *WorkflowUpdateRequest) GetKeyspace() string { + if x != nil { + return x.Keyspace + } + return "" +} + +func (x *WorkflowUpdateRequest) GetTabletRequest() *tabletmanagerdata.UpdateVRWorkflowRequest { + if x != nil { + return x.TabletRequest + } + return nil +} + +type WorkflowUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` + Details []*WorkflowUpdateResponse_TabletInfo `protobuf:"bytes,2,rep,name=details,proto3" json:"details,omitempty"` +} + +func (x *WorkflowUpdateResponse) Reset() { + *x = WorkflowUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowUpdateResponse) ProtoMessage() {} + +func (x *WorkflowUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[180] + 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 WorkflowUpdateResponse.ProtoReflect.Descriptor instead. +func (*WorkflowUpdateResponse) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{180} +} + +func (x *WorkflowUpdateResponse) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *WorkflowUpdateResponse) GetDetails() []*WorkflowUpdateResponse_TabletInfo { + if x != nil { + return x.Details + } + return nil +} + type Workflow_ReplicationLocation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -10253,7 +10373,7 @@ type Workflow_ReplicationLocation struct { func (x *Workflow_ReplicationLocation) Reset() { *x = Workflow_ReplicationLocation{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[180] + mi := &file_vtctldata_proto_msgTypes[182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10266,7 +10386,7 @@ func (x *Workflow_ReplicationLocation) String() string { func (*Workflow_ReplicationLocation) ProtoMessage() {} func (x *Workflow_ReplicationLocation) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[180] + mi := &file_vtctldata_proto_msgTypes[182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10309,7 +10429,7 @@ type Workflow_ShardStream struct { func (x *Workflow_ShardStream) Reset() { *x = Workflow_ShardStream{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[181] + mi := &file_vtctldata_proto_msgTypes[183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10322,7 +10442,7 @@ func (x *Workflow_ShardStream) String() string { func (*Workflow_ShardStream) ProtoMessage() {} func (x *Workflow_ShardStream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[181] + mi := &file_vtctldata_proto_msgTypes[183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10392,7 +10512,7 @@ type Workflow_Stream struct { func (x *Workflow_Stream) Reset() { *x = Workflow_Stream{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[182] + mi := &file_vtctldata_proto_msgTypes[184] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10405,7 +10525,7 @@ func (x *Workflow_Stream) String() string { func (*Workflow_Stream) ProtoMessage() {} func (x *Workflow_Stream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[182] + mi := &file_vtctldata_proto_msgTypes[184] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10538,7 +10658,7 @@ type Workflow_Stream_CopyState struct { func (x *Workflow_Stream_CopyState) Reset() { *x = Workflow_Stream_CopyState{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[183] + mi := &file_vtctldata_proto_msgTypes[185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10551,7 +10671,7 @@ func (x *Workflow_Stream_CopyState) String() string { func (*Workflow_Stream_CopyState) ProtoMessage() {} func (x *Workflow_Stream_CopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[183] + mi := &file_vtctldata_proto_msgTypes[185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10599,7 +10719,7 @@ type Workflow_Stream_Log struct { func (x *Workflow_Stream_Log) Reset() { *x = Workflow_Stream_Log{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[184] + mi := &file_vtctldata_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10612,7 +10732,7 @@ func (x *Workflow_Stream_Log) String() string { func (*Workflow_Stream_Log) ProtoMessage() {} func (x *Workflow_Stream_Log) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[184] + mi := &file_vtctldata_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10695,7 +10815,7 @@ type GetSrvKeyspaceNamesResponse_NameList struct { func (x *GetSrvKeyspaceNamesResponse_NameList) Reset() { *x = GetSrvKeyspaceNamesResponse_NameList{} if protoimpl.UnsafeEnabled { - mi := &file_vtctldata_proto_msgTypes[188] + mi := &file_vtctldata_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10708,7 +10828,7 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) String() string { func (*GetSrvKeyspaceNamesResponse_NameList) ProtoMessage() {} func (x *GetSrvKeyspaceNamesResponse_NameList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[188] + mi := &file_vtctldata_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10731,6 +10851,64 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) GetNames() []string { return nil } +type WorkflowUpdateResponse_TabletInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tablet string `protobuf:"bytes,1,opt,name=tablet,proto3" json:"tablet,omitempty"` + // Changed is true if any of the provided values were different + // than what was already stored. The value is based on the query + // result's RowsAffected being 0 or not. + Changed bool `protobuf:"varint,2,opt,name=changed,proto3" json:"changed,omitempty"` +} + +func (x *WorkflowUpdateResponse_TabletInfo) Reset() { + *x = WorkflowUpdateResponse_TabletInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_vtctldata_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowUpdateResponse_TabletInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowUpdateResponse_TabletInfo) ProtoMessage() {} + +func (x *WorkflowUpdateResponse_TabletInfo) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[200] + 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 WorkflowUpdateResponse_TabletInfo.ProtoReflect.Descriptor instead. +func (*WorkflowUpdateResponse_TabletInfo) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{180, 0} +} + +func (x *WorkflowUpdateResponse_TabletInfo) GetTablet() string { + if x != nil { + return x.Tablet + } + return "" +} + +func (x *WorkflowUpdateResponse_TabletInfo) GetChanged() bool { + if x != nil { + return x.Changed + } + return false +} + var File_vtctldata_proto protoreflect.FileDescriptor var file_vtctldata_proto_rawDesc = []byte{ @@ -11504,553 +11682,589 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x76, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x76, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x22, 0x52, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x6d, 0x61, 0x22, 0x6f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, - 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x76, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x4f, + 0x6e, 0x6c, 0x79, 0x22, 0x49, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0xfb, + 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x52, 0x0a, 0x1a, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x17, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x42, 0x0a, 0x18, + 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, + 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, + 0x14, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x1b, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, + 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x3a, 0x0a, 0x0d, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0c, 0x61, + 0x76, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x15, 0x77, + 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, + 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, + 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x74, + 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, - 0x52, 0x0a, 0x1a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, + 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x1a, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x4f, 0x0a, 0x13, + 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, + 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x18, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, + 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x6f, + 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5b, 0x0a, + 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, + 0x69, 0x76, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, + 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x15, 0x52, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x17, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x15, 0x77, 0x61, 0x69, - 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x61, 0x69, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, - 0x42, 0x0a, 0x18, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, - 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x1b, 0x50, 0x6c, 0x61, - 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, - 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, + 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0c, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x44, - 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x13, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, - 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, + 0xc2, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, + 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, + 0x79, 0x52, 0x75, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x24, + 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x75, 0x6e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, + 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, - 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, - 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x22, 0x74, 0x0a, 0x1b, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x22, 0x51, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x69, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x20, 0x53, 0x65, + 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, + 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, + 0x6e, 0x69, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x46, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x6a, + 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, + 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, - 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x1a, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, - 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1b, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, - 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, - 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x22, 0x46, 0x0a, 0x1c, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbc, 0x01, 0x0a, - 0x18, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1d, 0x0a, 0x1b, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x1a, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x77, - 0x61, 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, - 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x19, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, - 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x22, 0x5b, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x22, + 0x54, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x20, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0xaa, 0x03, 0x0a, 0x21, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x78, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x45, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x0a, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x5f, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 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, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, + 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x38, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x12, 0x53, 0x6c, 0x65, 0x65, + 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x74, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, + 0x0a, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, - 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, - 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, - 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x12, 0x14, - 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, - 0x76, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, - 0x15, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0x7b, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x22, 0xc2, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x72, - 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x62, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x12, 0x17, - 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x75, - 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x64, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x22, 0x55, 0x0a, 0x23, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x44, 0x75, 0x72, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1c, 0x53, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x51, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x53, 0x65, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, - 0x20, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x53, 0x65, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6e, 0x69, - 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, - 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x46, 0x0a, 0x1d, 0x53, 0x65, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, + 0x68, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, + 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x22, 0x3f, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x41, + 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x15, 0x0a, - 0x13, 0x53, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, - 0x1d, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, - 0x0a, 0x1a, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, - 0x6c, 0x6c, 0x22, 0x54, 0x0a, 0x1b, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x20, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0xaa, - 0x03, 0x0a, 0x21, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x5a, - 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x5f, 0x0a, 0x18, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 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, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, 0x01, 0x0a, 0x1d, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x64, 0x22, 0x5e, 0x0a, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, - 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x12, 0x53, - 0x6c, 0x65, 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x6c, 0x65, - 0x65, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, - 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, - 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x16, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, - 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x22, 0x5e, 0x0a, 0x18, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x42, 0x0a, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, + 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x05, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x53, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x21, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xc6, 0x01, 0x0a, 0x22, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x19, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x53, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x1a, 0x0a, - 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x16, 0x53, 0x74, 0x6f, - 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x19, 0x0a, - 0x17, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x21, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, - 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x22, 0xc6, 0x01, 0x0a, - 0x22, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, - 0x79, 0x52, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x36, 0x0a, - 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x50, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5c, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, - 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, - 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, - 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, - 0x34, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, - 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x69, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfc, 0x01, - 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, - 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, - 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, - 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, - 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6e, - 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x4e, 0x6f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, - 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x56, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x88, 0x02, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, + 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, + 0x6e, 0x65, 0x77, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x6f, 0x6c, + 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x22, 0x5c, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2f, 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, + 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x5d, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, + 0x0a, 0x09, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x64, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, + 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, + 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x34, 0x0a, 0x0f, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, - 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, - 0x31, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x8a, 0x02, 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, - 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x11, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x69, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x58, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, + 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x18, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x12, 0x61, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, + 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, 0x1d, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, + 0x65, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x70, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, + 0x69, 0x70, 0x4e, 0x6f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x22, 0x88, 0x02, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x12, 0x67, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x6b, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x31, 0x0a, 0x15, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, + 0x3c, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x8a, 0x02, + 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x10, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x1b, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x38, 0x0a, 0x1c, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x65, 0x77, 0x73, + 0x22, 0xfa, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, @@ -12059,49 +12273,36 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, - 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x22, 0x38, - 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x23, - 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, - 0x65, 0x77, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, - 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x1a, 0x63, 0x0a, 0x13, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x79, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, - 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, - 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, - 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x86, 0x01, + 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x07, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, + 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x64, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, + 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x56, 0x45, + 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x02, 0x42, + 0x28, 0x5a, 0x26, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, + 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -12117,7 +12318,7 @@ func file_vtctldata_proto_rawDescGZIP() []byte { } var file_vtctldata_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 198) +var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 201) var file_vtctldata_proto_goTypes = []interface{}{ (MaterializationIntent)(0), // 0: vtctldata.MaterializationIntent (*ExecuteVtctlCommandRequest)(nil), // 1: vtctldata.ExecuteVtctlCommandRequest @@ -12299,207 +12500,213 @@ var file_vtctldata_proto_goTypes = []interface{}{ (*ValidateVersionShardResponse)(nil), // 177: vtctldata.ValidateVersionShardResponse (*ValidateVSchemaRequest)(nil), // 178: vtctldata.ValidateVSchemaRequest (*ValidateVSchemaResponse)(nil), // 179: vtctldata.ValidateVSchemaResponse - nil, // 180: vtctldata.Workflow.ShardStreamsEntry - (*Workflow_ReplicationLocation)(nil), // 181: vtctldata.Workflow.ReplicationLocation - (*Workflow_ShardStream)(nil), // 182: vtctldata.Workflow.ShardStream - (*Workflow_Stream)(nil), // 183: vtctldata.Workflow.Stream - (*Workflow_Stream_CopyState)(nil), // 184: vtctldata.Workflow.Stream.CopyState - (*Workflow_Stream_Log)(nil), // 185: vtctldata.Workflow.Stream.Log - nil, // 186: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - nil, // 187: vtctldata.GetCellsAliasesResponse.AliasesEntry - nil, // 188: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 189: vtctldata.GetSrvKeyspaceNamesResponse.NameList - nil, // 190: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - nil, // 191: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - nil, // 192: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - nil, // 193: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - nil, // 194: vtctldata.ValidateResponse.ResultsByKeyspaceEntry - nil, // 195: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - nil, // 196: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - nil, // 197: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - nil, // 198: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - (*logutil.Event)(nil), // 199: logutil.Event - (*topodata.Keyspace)(nil), // 200: topodata.Keyspace - (*topodata.Shard)(nil), // 201: topodata.Shard - (*topodata.CellInfo)(nil), // 202: topodata.CellInfo - (*vschema.RoutingRules)(nil), // 203: vschema.RoutingRules - (*vschema.ShardRoutingRules)(nil), // 204: vschema.ShardRoutingRules - (*vttime.Duration)(nil), // 205: vttime.Duration - (*vtrpc.CallerID)(nil), // 206: vtrpc.CallerID - (*vschema.Keyspace)(nil), // 207: vschema.Keyspace - (*topodata.TabletAlias)(nil), // 208: topodata.TabletAlias - (topodata.TabletType)(0), // 209: topodata.TabletType - (*topodata.Tablet)(nil), // 210: topodata.Tablet - (*topodata.Keyspace_ServedFrom)(nil), // 211: topodata.Keyspace.ServedFrom - (topodata.KeyspaceType)(0), // 212: topodata.KeyspaceType - (*vttime.Time)(nil), // 213: vttime.Time - (*query.QueryResult)(nil), // 214: query.QueryResult - (*tabletmanagerdata.ExecuteHookRequest)(nil), // 215: tabletmanagerdata.ExecuteHookRequest - (*tabletmanagerdata.ExecuteHookResponse)(nil), // 216: tabletmanagerdata.ExecuteHookResponse - (*mysqlctl.BackupInfo)(nil), // 217: mysqlctl.BackupInfo - (*replicationdata.FullStatus)(nil), // 218: replicationdata.FullStatus - (*tabletmanagerdata.Permissions)(nil), // 219: tabletmanagerdata.Permissions - (*tabletmanagerdata.SchemaDefinition)(nil), // 220: tabletmanagerdata.SchemaDefinition - (*vschema.SrvVSchema)(nil), // 221: vschema.SrvVSchema - (*topodata.ShardReplicationError)(nil), // 222: topodata.ShardReplicationError - (*topodata.KeyRange)(nil), // 223: topodata.KeyRange - (*topodata.CellsAlias)(nil), // 224: topodata.CellsAlias - (*topodata.Shard_TabletControl)(nil), // 225: topodata.Shard.TabletControl - (*binlogdata.BinlogSource)(nil), // 226: binlogdata.BinlogSource - (*topodata.SrvKeyspace)(nil), // 227: topodata.SrvKeyspace - (*replicationdata.Status)(nil), // 228: replicationdata.Status + (*WorkflowUpdateRequest)(nil), // 180: vtctldata.WorkflowUpdateRequest + (*WorkflowUpdateResponse)(nil), // 181: vtctldata.WorkflowUpdateResponse + nil, // 182: vtctldata.Workflow.ShardStreamsEntry + (*Workflow_ReplicationLocation)(nil), // 183: vtctldata.Workflow.ReplicationLocation + (*Workflow_ShardStream)(nil), // 184: vtctldata.Workflow.ShardStream + (*Workflow_Stream)(nil), // 185: vtctldata.Workflow.Stream + (*Workflow_Stream_CopyState)(nil), // 186: vtctldata.Workflow.Stream.CopyState + (*Workflow_Stream_Log)(nil), // 187: vtctldata.Workflow.Stream.Log + nil, // 188: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + nil, // 189: vtctldata.GetCellsAliasesResponse.AliasesEntry + nil, // 190: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 191: vtctldata.GetSrvKeyspaceNamesResponse.NameList + nil, // 192: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + nil, // 193: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + nil, // 194: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + nil, // 195: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + nil, // 196: vtctldata.ValidateResponse.ResultsByKeyspaceEntry + nil, // 197: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + nil, // 198: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + nil, // 199: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + nil, // 200: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + (*WorkflowUpdateResponse_TabletInfo)(nil), // 201: vtctldata.WorkflowUpdateResponse.TabletInfo + (*logutil.Event)(nil), // 202: logutil.Event + (*topodata.Keyspace)(nil), // 203: topodata.Keyspace + (*topodata.Shard)(nil), // 204: topodata.Shard + (*topodata.CellInfo)(nil), // 205: topodata.CellInfo + (*vschema.RoutingRules)(nil), // 206: vschema.RoutingRules + (*vschema.ShardRoutingRules)(nil), // 207: vschema.ShardRoutingRules + (*vttime.Duration)(nil), // 208: vttime.Duration + (*vtrpc.CallerID)(nil), // 209: vtrpc.CallerID + (*vschema.Keyspace)(nil), // 210: vschema.Keyspace + (*topodata.TabletAlias)(nil), // 211: topodata.TabletAlias + (topodata.TabletType)(0), // 212: topodata.TabletType + (*topodata.Tablet)(nil), // 213: topodata.Tablet + (*topodata.Keyspace_ServedFrom)(nil), // 214: topodata.Keyspace.ServedFrom + (topodata.KeyspaceType)(0), // 215: topodata.KeyspaceType + (*vttime.Time)(nil), // 216: vttime.Time + (*query.QueryResult)(nil), // 217: query.QueryResult + (*tabletmanagerdata.ExecuteHookRequest)(nil), // 218: tabletmanagerdata.ExecuteHookRequest + (*tabletmanagerdata.ExecuteHookResponse)(nil), // 219: tabletmanagerdata.ExecuteHookResponse + (*mysqlctl.BackupInfo)(nil), // 220: mysqlctl.BackupInfo + (*replicationdata.FullStatus)(nil), // 221: replicationdata.FullStatus + (*tabletmanagerdata.Permissions)(nil), // 222: tabletmanagerdata.Permissions + (*tabletmanagerdata.SchemaDefinition)(nil), // 223: tabletmanagerdata.SchemaDefinition + (*vschema.SrvVSchema)(nil), // 224: vschema.SrvVSchema + (*topodata.ShardReplicationError)(nil), // 225: topodata.ShardReplicationError + (*topodata.KeyRange)(nil), // 226: topodata.KeyRange + (*topodata.CellsAlias)(nil), // 227: topodata.CellsAlias + (*tabletmanagerdata.UpdateVRWorkflowRequest)(nil), // 228: tabletmanagerdata.UpdateVRWorkflowRequest + (*topodata.Shard_TabletControl)(nil), // 229: topodata.Shard.TabletControl + (*binlogdata.BinlogSource)(nil), // 230: binlogdata.BinlogSource + (*topodata.SrvKeyspace)(nil), // 231: topodata.SrvKeyspace + (*replicationdata.Status)(nil), // 232: replicationdata.Status } var file_vtctldata_proto_depIdxs = []int32{ - 199, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event + 202, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event 3, // 1: vtctldata.MaterializeSettings.table_settings:type_name -> vtctldata.TableMaterializeSettings 0, // 2: vtctldata.MaterializeSettings.materialization_intent:type_name -> vtctldata.MaterializationIntent - 200, // 3: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace - 201, // 4: vtctldata.Shard.shard:type_name -> topodata.Shard - 181, // 5: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation - 181, // 6: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation - 180, // 7: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry - 202, // 8: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 203, // 9: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules - 204, // 10: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 205, // 11: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration - 206, // 12: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID - 207, // 13: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace - 207, // 14: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace - 208, // 15: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 16: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 199, // 17: vtctldata.BackupResponse.event:type_name -> logutil.Event - 208, // 18: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias - 209, // 19: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType - 210, // 20: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet - 210, // 21: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet - 211, // 22: vtctldata.CreateKeyspaceRequest.served_froms:type_name -> topodata.Keyspace.ServedFrom - 212, // 23: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType - 213, // 24: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time + 203, // 3: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace + 204, // 4: vtctldata.Shard.shard:type_name -> topodata.Shard + 183, // 5: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation + 183, // 6: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation + 182, // 7: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry + 205, // 8: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 206, // 9: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules + 207, // 10: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 208, // 11: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration + 209, // 12: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID + 210, // 13: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace + 210, // 14: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 211, // 15: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 16: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 202, // 17: vtctldata.BackupResponse.event:type_name -> logutil.Event + 211, // 18: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias + 212, // 19: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType + 213, // 20: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet + 213, // 21: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet + 214, // 22: vtctldata.CreateKeyspaceRequest.served_froms:type_name -> topodata.Keyspace.ServedFrom + 215, // 23: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType + 216, // 24: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time 5, // 25: vtctldata.CreateKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace 5, // 26: vtctldata.CreateShardResponse.keyspace:type_name -> vtctldata.Keyspace 6, // 27: vtctldata.CreateShardResponse.shard:type_name -> vtctldata.Shard 6, // 28: vtctldata.DeleteShardsRequest.shards:type_name -> vtctldata.Shard - 208, // 29: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 208, // 30: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 208, // 31: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias - 205, // 32: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 208, // 33: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 199, // 34: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event - 208, // 35: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias - 214, // 36: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult - 208, // 37: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 214, // 38: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult - 208, // 39: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias - 215, // 40: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest - 216, // 41: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse - 186, // 42: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - 217, // 43: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo - 202, // 44: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 187, // 45: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry - 208, // 46: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 218, // 47: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus + 211, // 29: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 211, // 30: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 211, // 31: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias + 208, // 32: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 211, // 33: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 202, // 34: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event + 211, // 35: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias + 217, // 36: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult + 211, // 37: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 217, // 38: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult + 211, // 39: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias + 218, // 40: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest + 219, // 41: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse + 188, // 42: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + 220, // 43: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo + 205, // 44: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 189, // 45: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry + 211, // 46: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 221, // 47: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus 5, // 48: vtctldata.GetKeyspacesResponse.keyspaces:type_name -> vtctldata.Keyspace 5, // 49: vtctldata.GetKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace - 208, // 50: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias - 219, // 51: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions - 203, // 52: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules - 208, // 53: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 220, // 54: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition + 211, // 50: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias + 222, // 51: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions + 206, // 52: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules + 211, // 53: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 223, // 54: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition 6, // 55: vtctldata.GetShardResponse.shard:type_name -> vtctldata.Shard - 204, // 56: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 188, // 57: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - 190, // 58: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - 221, // 59: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema - 191, // 60: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - 208, // 61: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 210, // 62: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet - 208, // 63: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 209, // 64: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType - 210, // 65: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet + 207, // 56: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 190, // 57: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + 192, // 58: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + 224, // 59: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema + 193, // 60: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + 211, // 61: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 213, // 62: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet + 211, // 63: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 212, // 64: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType + 213, // 65: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet 91, // 66: vtctldata.GetTopologyPathResponse.cell:type_name -> vtctldata.TopologyCell - 208, // 67: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias - 207, // 68: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 211, // 67: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias + 210, // 68: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace 7, // 69: vtctldata.GetWorkflowsResponse.workflows:type_name -> vtctldata.Workflow - 208, // 70: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias - 205, // 71: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration - 199, // 72: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event - 208, // 73: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 74: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 208, // 75: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias - 205, // 76: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 208, // 77: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 199, // 78: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event - 208, // 79: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 80: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 199, // 81: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event - 199, // 82: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event - 208, // 83: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias - 208, // 84: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias - 208, // 85: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 213, // 86: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time - 208, // 87: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 199, // 88: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event - 208, // 89: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias - 200, // 90: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace - 209, // 91: vtctldata.SetKeyspaceServedFromRequest.tablet_type:type_name -> topodata.TabletType - 200, // 92: vtctldata.SetKeyspaceServedFromResponse.keyspace:type_name -> topodata.Keyspace - 200, // 93: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace - 201, // 94: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard - 209, // 95: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType - 201, // 96: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard - 208, // 97: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 98: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias - 222, // 99: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError - 192, // 100: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - 193, // 101: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - 208, // 102: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 103: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 205, // 104: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration - 223, // 105: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange - 201, // 106: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard - 201, // 107: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard - 208, // 108: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 109: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 208, // 110: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias - 208, // 111: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias - 208, // 112: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias - 202, // 113: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 202, // 114: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 224, // 115: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias - 224, // 116: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias - 194, // 117: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry - 195, // 118: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - 196, // 119: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - 197, // 120: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - 198, // 121: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - 182, // 122: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream - 183, // 123: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream - 225, // 124: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl - 208, // 125: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias - 226, // 126: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource - 213, // 127: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time - 213, // 128: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time - 184, // 129: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState - 185, // 130: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log - 213, // 131: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time - 213, // 132: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time - 6, // 133: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard - 224, // 134: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias - 189, // 135: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList - 227, // 136: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace - 221, // 137: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema - 228, // 138: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status - 210, // 139: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet - 169, // 140: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse - 173, // 141: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 173, // 142: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 173, // 143: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 173, // 144: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 145, // [145:145] is the sub-list for method output_type - 145, // [145:145] is the sub-list for method input_type - 145, // [145:145] is the sub-list for extension type_name - 145, // [145:145] is the sub-list for extension extendee - 0, // [0:145] is the sub-list for field type_name + 211, // 70: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias + 208, // 71: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration + 202, // 72: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event + 211, // 73: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 74: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 211, // 75: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias + 208, // 76: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 211, // 77: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 202, // 78: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event + 211, // 79: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 80: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 202, // 81: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event + 202, // 82: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event + 211, // 83: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias + 211, // 84: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias + 211, // 85: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 216, // 86: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time + 211, // 87: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 202, // 88: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event + 211, // 89: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias + 203, // 90: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace + 212, // 91: vtctldata.SetKeyspaceServedFromRequest.tablet_type:type_name -> topodata.TabletType + 203, // 92: vtctldata.SetKeyspaceServedFromResponse.keyspace:type_name -> topodata.Keyspace + 203, // 93: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace + 204, // 94: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard + 212, // 95: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType + 204, // 96: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard + 211, // 97: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 98: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias + 225, // 99: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError + 194, // 100: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + 195, // 101: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + 211, // 102: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 103: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 208, // 104: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration + 226, // 105: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange + 204, // 106: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard + 204, // 107: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard + 211, // 108: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 109: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 211, // 110: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias + 211, // 111: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias + 211, // 112: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias + 205, // 113: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 205, // 114: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 227, // 115: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias + 227, // 116: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias + 196, // 117: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry + 197, // 118: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + 198, // 119: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + 199, // 120: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + 200, // 121: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + 228, // 122: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVRWorkflowRequest + 201, // 123: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo + 184, // 124: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream + 185, // 125: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream + 229, // 126: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl + 211, // 127: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias + 230, // 128: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource + 216, // 129: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time + 216, // 130: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time + 186, // 131: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState + 187, // 132: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log + 216, // 133: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time + 216, // 134: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time + 6, // 135: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard + 227, // 136: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias + 191, // 137: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList + 231, // 138: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace + 224, // 139: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema + 232, // 140: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status + 213, // 141: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet + 169, // 142: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse + 173, // 143: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 173, // 144: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 173, // 145: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 173, // 146: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 147, // [147:147] is the sub-list for method output_type + 147, // [147:147] is the sub-list for method input_type + 147, // [147:147] is the sub-list for extension type_name + 147, // [147:147] is the sub-list for extension extendee + 0, // [0:147] is the sub-list for field type_name } func init() { file_vtctldata_proto_init() } @@ -14656,7 +14863,31 @@ func file_vtctldata_proto_init() { return nil } } + file_vtctldata_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_vtctldata_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vtctldata_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workflow_ReplicationLocation); i { case 0: return &v.state @@ -14668,7 +14899,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { + file_vtctldata_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workflow_ShardStream); i { case 0: return &v.state @@ -14680,7 +14911,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { + file_vtctldata_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workflow_Stream); i { case 0: return &v.state @@ -14692,7 +14923,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { + file_vtctldata_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workflow_Stream_CopyState); i { case 0: return &v.state @@ -14704,7 +14935,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { + file_vtctldata_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workflow_Stream_Log); i { case 0: return &v.state @@ -14716,7 +14947,7 @@ func file_vtctldata_proto_init() { return nil } } - file_vtctldata_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { + file_vtctldata_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSrvKeyspaceNamesResponse_NameList); i { case 0: return &v.state @@ -14728,6 +14959,18 @@ func file_vtctldata_proto_init() { return nil } } + file_vtctldata_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowUpdateResponse_TabletInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -14735,7 +14978,7 @@ func file_vtctldata_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vtctldata_proto_rawDesc, NumEnums: 1, - NumMessages: 198, + NumMessages: 201, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go index 9eaba255b16..530bdb05a07 100644 --- a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go +++ b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go @@ -5455,6 +5455,16 @@ func (m *GetWorkflowsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.NameOnly { + i-- + if m.NameOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } if m.ActiveOnly { i-- if m.ActiveOnly { @@ -9693,6 +9703,158 @@ func (m *ValidateVSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *WorkflowUpdateRequest) 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 *WorkflowUpdateRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowUpdateRequest) 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.TabletRequest != nil { + size, err := m.TabletRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Keyspace) > 0 { + i -= len(m.Keyspace) + copy(dAtA[i:], m.Keyspace) + i = encodeVarint(dAtA, i, uint64(len(m.Keyspace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WorkflowUpdateResponse_TabletInfo) 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 *WorkflowUpdateResponse_TabletInfo) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowUpdateResponse_TabletInfo) 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.Changed { + i-- + if m.Changed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Tablet) > 0 { + i -= len(m.Tablet) + copy(dAtA[i:], m.Tablet) + i = encodeVarint(dAtA, i, uint64(len(m.Tablet))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WorkflowUpdateResponse) 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 *WorkflowUpdateResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowUpdateResponse) 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.Details) > 0 { + for iNdEx := len(m.Details) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Details[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Summary) > 0 { + i -= len(m.Summary) + copy(dAtA[i:], m.Summary) + i = encodeVarint(dAtA, i, uint64(len(m.Summary))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset @@ -11712,6 +11874,9 @@ func (m *GetWorkflowsRequest) SizeVT() (n int) { if m.ActiveOnly { n += 2 } + if m.NameOnly { + n += 2 + } n += len(m.unknownFields) return n } @@ -13276,6 +13441,61 @@ func (m *ValidateVSchemaResponse) SizeVT() (n int) { return n } +func (m *WorkflowUpdateRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Keyspace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.TabletRequest != nil { + l = m.TabletRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *WorkflowUpdateResponse_TabletInfo) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tablet) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Changed { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *WorkflowUpdateResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Summary) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Details) > 0 { + for _, e := range m.Details { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } @@ -25995,6 +26215,26 @@ func (m *GetWorkflowsRequest) UnmarshalVT(dAtA []byte) error { } } m.ActiveOnly = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NameOnly", 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.NameOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -32389,7 +32629,7 @@ func (m *SourceShardAddRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Uid |= uint32(b&0x7F) << shift + m.Uid |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -32742,7 +32982,7 @@ func (m *SourceShardDeleteRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Uid |= uint32(b&0x7F) << shift + m.Uid |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -35957,6 +36197,345 @@ func (m *ValidateVSchemaResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *WorkflowUpdateRequest) 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: WorkflowUpdateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", 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.Keyspace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TabletRequest", 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.TabletRequest == nil { + m.TabletRequest = &tabletmanagerdata.UpdateVRWorkflowRequest{} + } + if err := m.TabletRequest.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 *WorkflowUpdateResponse_TabletInfo) 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: WorkflowUpdateResponse_TabletInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowUpdateResponse_TabletInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tablet", 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.Tablet = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Changed", 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.Changed = 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 *WorkflowUpdateResponse) 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: WorkflowUpdateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summary", 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.Summary = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", 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.Details = append(m.Details, &WorkflowUpdateResponse_TabletInfo{}) + if err := m.Details[len(m.Details)-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 skip(dAtA []byte) (n int, err error) { l := len(dAtA) diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 0859184d913..9cd82dae134 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -53,7 +53,7 @@ var file_vtctlservice_proto_rawDesc = []byte{ 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0xf4, 0x43, 0x0a, 0x06, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0xcd, 0x44, 0x0a, 0x06, 0x56, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, @@ -542,65 +542,70 @@ var file_vtctlservice_proto_rawDesc = []byte{ 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, - 0x73, 0x74, 0x50, 0x75, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x74, - 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, - 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x63, 0x69, 0x70, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, - 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x42, - 0x6f, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x63, 0x69, - 0x70, 0x65, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x47, 0x65, 0x74, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x50, 0x0a, 0x11, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x41, - 0x64, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5a, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x4d, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x76, 0x74, - 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, - 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, - 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x72, 0x61, 0x69, - 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, - 0x0a, 0x12, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x50, 0x75, 0x72, 0x67, - 0x65, 0x12, 0x15, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x72, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, - 0x73, 0x74, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4a, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x53, 0x63, 0x69, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x53, 0x65, - 0x74, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x69, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2b, 0x5a, 0x29, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x63, - 0x74, 0x6c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x76, 0x74, + 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x50, 0x75, 0x74, 0x52, 0x65, + 0x63, 0x69, 0x70, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, + 0x75, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x42, + 0x6f, 0x6f, 0x73, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x12, 0x19, 0x2e, + 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, + 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x65, 0x12, 0x1e, 0x2e, 0x76, 0x74, + 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, + 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, + 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, + 0x63, 0x69, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, + 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x1a, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, + 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x6f, 0x6f, 0x73, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, + 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, + 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x42, 0x6f, + 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, + 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x74, 0x62, 0x6f, + 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x17, 0x42, 0x6f, 0x6f, + 0x73, 0x74, 0x4d, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x44, 0x72, + 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x76, 0x74, 0x62, + 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, + 0x73, 0x74, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x42, 0x6f, 0x6f, 0x73, 0x74, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x2e, + 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, + 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, + 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x50, 0x75, 0x72, 0x67, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x74, 0x62, + 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x75, 0x72, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x76, + 0x74, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x74, 0x62, 0x6f, 0x6f, + 0x73, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_vtctlservice_proto_goTypes = []interface{}{ @@ -689,111 +694,113 @@ var file_vtctlservice_proto_goTypes = []interface{}{ (*vtctldata.ValidateVersionKeyspaceRequest)(nil), // 82: vtctldata.ValidateVersionKeyspaceRequest (*vtctldata.ValidateVersionShardRequest)(nil), // 83: vtctldata.ValidateVersionShardRequest (*vtctldata.ValidateVSchemaRequest)(nil), // 84: vtctldata.ValidateVSchemaRequest - (*vtboost.PutRecipeRequest)(nil), // 85: vtboost.PutRecipeRequest - (*vtboost.GetRecipeRequest)(nil), // 86: vtboost.GetRecipeRequest - (*vtboost.DescribeRecipeRequest)(nil), // 87: vtboost.DescribeRecipeRequest - (*vtboost.GetClusterRequest)(nil), // 88: vtboost.GetClusterRequest - (*vtboost.ListClustersRequest)(nil), // 89: vtboost.ListClustersRequest - (*vtboost.AddClusterRequest)(nil), // 90: vtboost.AddClusterRequest - (*vtboost.PrimaryClusterRequest)(nil), // 91: vtboost.PrimaryClusterRequest - (*vtboost.DrainClusterRequest)(nil), // 92: vtboost.DrainClusterRequest - (*vtboost.RemoveClusterRequest)(nil), // 93: vtboost.RemoveClusterRequest - (*vtboost.PurgeRequest)(nil), // 94: vtboost.PurgeRequest - (*vtboost.SetScienceRequest)(nil), // 95: vtboost.SetScienceRequest - (*vtctldata.ExecuteVtctlCommandResponse)(nil), // 96: vtctldata.ExecuteVtctlCommandResponse - (*vtctldata.AddCellInfoResponse)(nil), // 97: vtctldata.AddCellInfoResponse - (*vtctldata.AddCellsAliasResponse)(nil), // 98: vtctldata.AddCellsAliasResponse - (*vtctldata.ApplyRoutingRulesResponse)(nil), // 99: vtctldata.ApplyRoutingRulesResponse - (*vtctldata.ApplySchemaResponse)(nil), // 100: vtctldata.ApplySchemaResponse - (*vtctldata.ApplyShardRoutingRulesResponse)(nil), // 101: vtctldata.ApplyShardRoutingRulesResponse - (*vtctldata.ApplyVSchemaResponse)(nil), // 102: vtctldata.ApplyVSchemaResponse - (*vtctldata.BackupResponse)(nil), // 103: vtctldata.BackupResponse - (*vtctldata.ChangeTabletTypeResponse)(nil), // 104: vtctldata.ChangeTabletTypeResponse - (*vtctldata.CreateKeyspaceResponse)(nil), // 105: vtctldata.CreateKeyspaceResponse - (*vtctldata.CreateShardResponse)(nil), // 106: vtctldata.CreateShardResponse - (*vtctldata.DeleteCellInfoResponse)(nil), // 107: vtctldata.DeleteCellInfoResponse - (*vtctldata.DeleteCellsAliasResponse)(nil), // 108: vtctldata.DeleteCellsAliasResponse - (*vtctldata.DeleteKeyspaceResponse)(nil), // 109: vtctldata.DeleteKeyspaceResponse - (*vtctldata.DeleteShardsResponse)(nil), // 110: vtctldata.DeleteShardsResponse - (*vtctldata.DeleteSrvVSchemaResponse)(nil), // 111: vtctldata.DeleteSrvVSchemaResponse - (*vtctldata.DeleteTabletsResponse)(nil), // 112: vtctldata.DeleteTabletsResponse - (*vtctldata.EmergencyReparentShardResponse)(nil), // 113: vtctldata.EmergencyReparentShardResponse - (*vtctldata.ExecuteFetchAsAppResponse)(nil), // 114: vtctldata.ExecuteFetchAsAppResponse - (*vtctldata.ExecuteFetchAsDBAResponse)(nil), // 115: vtctldata.ExecuteFetchAsDBAResponse - (*vtctldata.ExecuteHookResponse)(nil), // 116: vtctldata.ExecuteHookResponse - (*vtctldata.FindAllShardsInKeyspaceResponse)(nil), // 117: vtctldata.FindAllShardsInKeyspaceResponse - (*vtctldata.GetBackupsResponse)(nil), // 118: vtctldata.GetBackupsResponse - (*vtctldata.GetCellInfoResponse)(nil), // 119: vtctldata.GetCellInfoResponse - (*vtctldata.GetCellInfoNamesResponse)(nil), // 120: vtctldata.GetCellInfoNamesResponse - (*vtctldata.GetCellsAliasesResponse)(nil), // 121: vtctldata.GetCellsAliasesResponse - (*vtctldata.GetFullStatusResponse)(nil), // 122: vtctldata.GetFullStatusResponse - (*vtctldata.GetKeyspaceResponse)(nil), // 123: vtctldata.GetKeyspaceResponse - (*vtctldata.GetKeyspacesResponse)(nil), // 124: vtctldata.GetKeyspacesResponse - (*vtctldata.GetPermissionsResponse)(nil), // 125: vtctldata.GetPermissionsResponse - (*vtctldata.GetRoutingRulesResponse)(nil), // 126: vtctldata.GetRoutingRulesResponse - (*vtctldata.GetSchemaResponse)(nil), // 127: vtctldata.GetSchemaResponse - (*vtctldata.GetShardResponse)(nil), // 128: vtctldata.GetShardResponse - (*vtctldata.GetShardRoutingRulesResponse)(nil), // 129: vtctldata.GetShardRoutingRulesResponse - (*vtctldata.GetSrvKeyspaceNamesResponse)(nil), // 130: vtctldata.GetSrvKeyspaceNamesResponse - (*vtctldata.GetSrvKeyspacesResponse)(nil), // 131: vtctldata.GetSrvKeyspacesResponse - (*vtctldata.UpdateThrottlerConfigResponse)(nil), // 132: vtctldata.UpdateThrottlerConfigResponse - (*vtctldata.GetSrvVSchemaResponse)(nil), // 133: vtctldata.GetSrvVSchemaResponse - (*vtctldata.GetSrvVSchemasResponse)(nil), // 134: vtctldata.GetSrvVSchemasResponse - (*vtctldata.GetTabletResponse)(nil), // 135: vtctldata.GetTabletResponse - (*vtctldata.GetTabletsResponse)(nil), // 136: vtctldata.GetTabletsResponse - (*vtctldata.GetTopologyPathResponse)(nil), // 137: vtctldata.GetTopologyPathResponse - (*vtctldata.GetVersionResponse)(nil), // 138: vtctldata.GetVersionResponse - (*vtctldata.GetVSchemaResponse)(nil), // 139: vtctldata.GetVSchemaResponse - (*vtctldata.GetWorkflowsResponse)(nil), // 140: vtctldata.GetWorkflowsResponse - (*vtctldata.InitShardPrimaryResponse)(nil), // 141: vtctldata.InitShardPrimaryResponse - (*vtctldata.PingTabletResponse)(nil), // 142: vtctldata.PingTabletResponse - (*vtctldata.PlannedReparentShardResponse)(nil), // 143: vtctldata.PlannedReparentShardResponse - (*vtctldata.RebuildKeyspaceGraphResponse)(nil), // 144: vtctldata.RebuildKeyspaceGraphResponse - (*vtctldata.RebuildVSchemaGraphResponse)(nil), // 145: vtctldata.RebuildVSchemaGraphResponse - (*vtctldata.RefreshStateResponse)(nil), // 146: vtctldata.RefreshStateResponse - (*vtctldata.RefreshStateByShardResponse)(nil), // 147: vtctldata.RefreshStateByShardResponse - (*vtctldata.ReloadSchemaResponse)(nil), // 148: vtctldata.ReloadSchemaResponse - (*vtctldata.ReloadSchemaKeyspaceResponse)(nil), // 149: vtctldata.ReloadSchemaKeyspaceResponse - (*vtctldata.ReloadSchemaShardResponse)(nil), // 150: vtctldata.ReloadSchemaShardResponse - (*vtctldata.RemoveBackupResponse)(nil), // 151: vtctldata.RemoveBackupResponse - (*vtctldata.RemoveKeyspaceCellResponse)(nil), // 152: vtctldata.RemoveKeyspaceCellResponse - (*vtctldata.RemoveShardCellResponse)(nil), // 153: vtctldata.RemoveShardCellResponse - (*vtctldata.ReparentTabletResponse)(nil), // 154: vtctldata.ReparentTabletResponse - (*vtctldata.RestoreFromBackupResponse)(nil), // 155: vtctldata.RestoreFromBackupResponse - (*vtctldata.RunHealthCheckResponse)(nil), // 156: vtctldata.RunHealthCheckResponse - (*vtctldata.SetKeyspaceDurabilityPolicyResponse)(nil), // 157: vtctldata.SetKeyspaceDurabilityPolicyResponse - (*vtctldata.SetShardIsPrimaryServingResponse)(nil), // 158: vtctldata.SetShardIsPrimaryServingResponse - (*vtctldata.SetShardTabletControlResponse)(nil), // 159: vtctldata.SetShardTabletControlResponse - (*vtctldata.SetWritableResponse)(nil), // 160: vtctldata.SetWritableResponse - (*vtctldata.ShardReplicationAddResponse)(nil), // 161: vtctldata.ShardReplicationAddResponse - (*vtctldata.ShardReplicationFixResponse)(nil), // 162: vtctldata.ShardReplicationFixResponse - (*vtctldata.ShardReplicationPositionsResponse)(nil), // 163: vtctldata.ShardReplicationPositionsResponse - (*vtctldata.ShardReplicationRemoveResponse)(nil), // 164: vtctldata.ShardReplicationRemoveResponse - (*vtctldata.SleepTabletResponse)(nil), // 165: vtctldata.SleepTabletResponse - (*vtctldata.SourceShardAddResponse)(nil), // 166: vtctldata.SourceShardAddResponse - (*vtctldata.SourceShardDeleteResponse)(nil), // 167: vtctldata.SourceShardDeleteResponse - (*vtctldata.StartReplicationResponse)(nil), // 168: vtctldata.StartReplicationResponse - (*vtctldata.StopReplicationResponse)(nil), // 169: vtctldata.StopReplicationResponse - (*vtctldata.TabletExternallyReparentedResponse)(nil), // 170: vtctldata.TabletExternallyReparentedResponse - (*vtctldata.UpdateCellInfoResponse)(nil), // 171: vtctldata.UpdateCellInfoResponse - (*vtctldata.UpdateCellsAliasResponse)(nil), // 172: vtctldata.UpdateCellsAliasResponse - (*vtctldata.ValidateResponse)(nil), // 173: vtctldata.ValidateResponse - (*vtctldata.ValidateKeyspaceResponse)(nil), // 174: vtctldata.ValidateKeyspaceResponse - (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 175: vtctldata.ValidateSchemaKeyspaceResponse - (*vtctldata.ValidateShardResponse)(nil), // 176: vtctldata.ValidateShardResponse - (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 177: vtctldata.ValidateVersionKeyspaceResponse - (*vtctldata.ValidateVersionShardResponse)(nil), // 178: vtctldata.ValidateVersionShardResponse - (*vtctldata.ValidateVSchemaResponse)(nil), // 179: vtctldata.ValidateVSchemaResponse - (*vtboost.PutRecipeResponse)(nil), // 180: vtboost.PutRecipeResponse - (*vtboost.GetRecipeResponse)(nil), // 181: vtboost.GetRecipeResponse - (*vtboost.DescribeRecipeResponse)(nil), // 182: vtboost.DescribeRecipeResponse - (*vtboost.GetClusterResponse)(nil), // 183: vtboost.GetClusterResponse - (*vtboost.ListClustersResponse)(nil), // 184: vtboost.ListClustersResponse - (*vtboost.ClusterChangeResponse)(nil), // 185: vtboost.ClusterChangeResponse - (*vtboost.PrimaryClusterResponse)(nil), // 186: vtboost.PrimaryClusterResponse - (*vtboost.DrainClusterResponse)(nil), // 187: vtboost.DrainClusterResponse - (*vtboost.PurgeResponse)(nil), // 188: vtboost.PurgeResponse - (*vtboost.SetScienceResponse)(nil), // 189: vtboost.SetScienceResponse + (*vtctldata.WorkflowUpdateRequest)(nil), // 85: vtctldata.WorkflowUpdateRequest + (*vtboost.PutRecipeRequest)(nil), // 86: vtboost.PutRecipeRequest + (*vtboost.GetRecipeRequest)(nil), // 87: vtboost.GetRecipeRequest + (*vtboost.DescribeRecipeRequest)(nil), // 88: vtboost.DescribeRecipeRequest + (*vtboost.GetClusterRequest)(nil), // 89: vtboost.GetClusterRequest + (*vtboost.ListClustersRequest)(nil), // 90: vtboost.ListClustersRequest + (*vtboost.AddClusterRequest)(nil), // 91: vtboost.AddClusterRequest + (*vtboost.PrimaryClusterRequest)(nil), // 92: vtboost.PrimaryClusterRequest + (*vtboost.DrainClusterRequest)(nil), // 93: vtboost.DrainClusterRequest + (*vtboost.RemoveClusterRequest)(nil), // 94: vtboost.RemoveClusterRequest + (*vtboost.PurgeRequest)(nil), // 95: vtboost.PurgeRequest + (*vtboost.SetScienceRequest)(nil), // 96: vtboost.SetScienceRequest + (*vtctldata.ExecuteVtctlCommandResponse)(nil), // 97: vtctldata.ExecuteVtctlCommandResponse + (*vtctldata.AddCellInfoResponse)(nil), // 98: vtctldata.AddCellInfoResponse + (*vtctldata.AddCellsAliasResponse)(nil), // 99: vtctldata.AddCellsAliasResponse + (*vtctldata.ApplyRoutingRulesResponse)(nil), // 100: vtctldata.ApplyRoutingRulesResponse + (*vtctldata.ApplySchemaResponse)(nil), // 101: vtctldata.ApplySchemaResponse + (*vtctldata.ApplyShardRoutingRulesResponse)(nil), // 102: vtctldata.ApplyShardRoutingRulesResponse + (*vtctldata.ApplyVSchemaResponse)(nil), // 103: vtctldata.ApplyVSchemaResponse + (*vtctldata.BackupResponse)(nil), // 104: vtctldata.BackupResponse + (*vtctldata.ChangeTabletTypeResponse)(nil), // 105: vtctldata.ChangeTabletTypeResponse + (*vtctldata.CreateKeyspaceResponse)(nil), // 106: vtctldata.CreateKeyspaceResponse + (*vtctldata.CreateShardResponse)(nil), // 107: vtctldata.CreateShardResponse + (*vtctldata.DeleteCellInfoResponse)(nil), // 108: vtctldata.DeleteCellInfoResponse + (*vtctldata.DeleteCellsAliasResponse)(nil), // 109: vtctldata.DeleteCellsAliasResponse + (*vtctldata.DeleteKeyspaceResponse)(nil), // 110: vtctldata.DeleteKeyspaceResponse + (*vtctldata.DeleteShardsResponse)(nil), // 111: vtctldata.DeleteShardsResponse + (*vtctldata.DeleteSrvVSchemaResponse)(nil), // 112: vtctldata.DeleteSrvVSchemaResponse + (*vtctldata.DeleteTabletsResponse)(nil), // 113: vtctldata.DeleteTabletsResponse + (*vtctldata.EmergencyReparentShardResponse)(nil), // 114: vtctldata.EmergencyReparentShardResponse + (*vtctldata.ExecuteFetchAsAppResponse)(nil), // 115: vtctldata.ExecuteFetchAsAppResponse + (*vtctldata.ExecuteFetchAsDBAResponse)(nil), // 116: vtctldata.ExecuteFetchAsDBAResponse + (*vtctldata.ExecuteHookResponse)(nil), // 117: vtctldata.ExecuteHookResponse + (*vtctldata.FindAllShardsInKeyspaceResponse)(nil), // 118: vtctldata.FindAllShardsInKeyspaceResponse + (*vtctldata.GetBackupsResponse)(nil), // 119: vtctldata.GetBackupsResponse + (*vtctldata.GetCellInfoResponse)(nil), // 120: vtctldata.GetCellInfoResponse + (*vtctldata.GetCellInfoNamesResponse)(nil), // 121: vtctldata.GetCellInfoNamesResponse + (*vtctldata.GetCellsAliasesResponse)(nil), // 122: vtctldata.GetCellsAliasesResponse + (*vtctldata.GetFullStatusResponse)(nil), // 123: vtctldata.GetFullStatusResponse + (*vtctldata.GetKeyspaceResponse)(nil), // 124: vtctldata.GetKeyspaceResponse + (*vtctldata.GetKeyspacesResponse)(nil), // 125: vtctldata.GetKeyspacesResponse + (*vtctldata.GetPermissionsResponse)(nil), // 126: vtctldata.GetPermissionsResponse + (*vtctldata.GetRoutingRulesResponse)(nil), // 127: vtctldata.GetRoutingRulesResponse + (*vtctldata.GetSchemaResponse)(nil), // 128: vtctldata.GetSchemaResponse + (*vtctldata.GetShardResponse)(nil), // 129: vtctldata.GetShardResponse + (*vtctldata.GetShardRoutingRulesResponse)(nil), // 130: vtctldata.GetShardRoutingRulesResponse + (*vtctldata.GetSrvKeyspaceNamesResponse)(nil), // 131: vtctldata.GetSrvKeyspaceNamesResponse + (*vtctldata.GetSrvKeyspacesResponse)(nil), // 132: vtctldata.GetSrvKeyspacesResponse + (*vtctldata.UpdateThrottlerConfigResponse)(nil), // 133: vtctldata.UpdateThrottlerConfigResponse + (*vtctldata.GetSrvVSchemaResponse)(nil), // 134: vtctldata.GetSrvVSchemaResponse + (*vtctldata.GetSrvVSchemasResponse)(nil), // 135: vtctldata.GetSrvVSchemasResponse + (*vtctldata.GetTabletResponse)(nil), // 136: vtctldata.GetTabletResponse + (*vtctldata.GetTabletsResponse)(nil), // 137: vtctldata.GetTabletsResponse + (*vtctldata.GetTopologyPathResponse)(nil), // 138: vtctldata.GetTopologyPathResponse + (*vtctldata.GetVersionResponse)(nil), // 139: vtctldata.GetVersionResponse + (*vtctldata.GetVSchemaResponse)(nil), // 140: vtctldata.GetVSchemaResponse + (*vtctldata.GetWorkflowsResponse)(nil), // 141: vtctldata.GetWorkflowsResponse + (*vtctldata.InitShardPrimaryResponse)(nil), // 142: vtctldata.InitShardPrimaryResponse + (*vtctldata.PingTabletResponse)(nil), // 143: vtctldata.PingTabletResponse + (*vtctldata.PlannedReparentShardResponse)(nil), // 144: vtctldata.PlannedReparentShardResponse + (*vtctldata.RebuildKeyspaceGraphResponse)(nil), // 145: vtctldata.RebuildKeyspaceGraphResponse + (*vtctldata.RebuildVSchemaGraphResponse)(nil), // 146: vtctldata.RebuildVSchemaGraphResponse + (*vtctldata.RefreshStateResponse)(nil), // 147: vtctldata.RefreshStateResponse + (*vtctldata.RefreshStateByShardResponse)(nil), // 148: vtctldata.RefreshStateByShardResponse + (*vtctldata.ReloadSchemaResponse)(nil), // 149: vtctldata.ReloadSchemaResponse + (*vtctldata.ReloadSchemaKeyspaceResponse)(nil), // 150: vtctldata.ReloadSchemaKeyspaceResponse + (*vtctldata.ReloadSchemaShardResponse)(nil), // 151: vtctldata.ReloadSchemaShardResponse + (*vtctldata.RemoveBackupResponse)(nil), // 152: vtctldata.RemoveBackupResponse + (*vtctldata.RemoveKeyspaceCellResponse)(nil), // 153: vtctldata.RemoveKeyspaceCellResponse + (*vtctldata.RemoveShardCellResponse)(nil), // 154: vtctldata.RemoveShardCellResponse + (*vtctldata.ReparentTabletResponse)(nil), // 155: vtctldata.ReparentTabletResponse + (*vtctldata.RestoreFromBackupResponse)(nil), // 156: vtctldata.RestoreFromBackupResponse + (*vtctldata.RunHealthCheckResponse)(nil), // 157: vtctldata.RunHealthCheckResponse + (*vtctldata.SetKeyspaceDurabilityPolicyResponse)(nil), // 158: vtctldata.SetKeyspaceDurabilityPolicyResponse + (*vtctldata.SetShardIsPrimaryServingResponse)(nil), // 159: vtctldata.SetShardIsPrimaryServingResponse + (*vtctldata.SetShardTabletControlResponse)(nil), // 160: vtctldata.SetShardTabletControlResponse + (*vtctldata.SetWritableResponse)(nil), // 161: vtctldata.SetWritableResponse + (*vtctldata.ShardReplicationAddResponse)(nil), // 162: vtctldata.ShardReplicationAddResponse + (*vtctldata.ShardReplicationFixResponse)(nil), // 163: vtctldata.ShardReplicationFixResponse + (*vtctldata.ShardReplicationPositionsResponse)(nil), // 164: vtctldata.ShardReplicationPositionsResponse + (*vtctldata.ShardReplicationRemoveResponse)(nil), // 165: vtctldata.ShardReplicationRemoveResponse + (*vtctldata.SleepTabletResponse)(nil), // 166: vtctldata.SleepTabletResponse + (*vtctldata.SourceShardAddResponse)(nil), // 167: vtctldata.SourceShardAddResponse + (*vtctldata.SourceShardDeleteResponse)(nil), // 168: vtctldata.SourceShardDeleteResponse + (*vtctldata.StartReplicationResponse)(nil), // 169: vtctldata.StartReplicationResponse + (*vtctldata.StopReplicationResponse)(nil), // 170: vtctldata.StopReplicationResponse + (*vtctldata.TabletExternallyReparentedResponse)(nil), // 171: vtctldata.TabletExternallyReparentedResponse + (*vtctldata.UpdateCellInfoResponse)(nil), // 172: vtctldata.UpdateCellInfoResponse + (*vtctldata.UpdateCellsAliasResponse)(nil), // 173: vtctldata.UpdateCellsAliasResponse + (*vtctldata.ValidateResponse)(nil), // 174: vtctldata.ValidateResponse + (*vtctldata.ValidateKeyspaceResponse)(nil), // 175: vtctldata.ValidateKeyspaceResponse + (*vtctldata.ValidateSchemaKeyspaceResponse)(nil), // 176: vtctldata.ValidateSchemaKeyspaceResponse + (*vtctldata.ValidateShardResponse)(nil), // 177: vtctldata.ValidateShardResponse + (*vtctldata.ValidateVersionKeyspaceResponse)(nil), // 178: vtctldata.ValidateVersionKeyspaceResponse + (*vtctldata.ValidateVersionShardResponse)(nil), // 179: vtctldata.ValidateVersionShardResponse + (*vtctldata.ValidateVSchemaResponse)(nil), // 180: vtctldata.ValidateVSchemaResponse + (*vtctldata.WorkflowUpdateResponse)(nil), // 181: vtctldata.WorkflowUpdateResponse + (*vtboost.PutRecipeResponse)(nil), // 182: vtboost.PutRecipeResponse + (*vtboost.GetRecipeResponse)(nil), // 183: vtboost.GetRecipeResponse + (*vtboost.DescribeRecipeResponse)(nil), // 184: vtboost.DescribeRecipeResponse + (*vtboost.GetClusterResponse)(nil), // 185: vtboost.GetClusterResponse + (*vtboost.ListClustersResponse)(nil), // 186: vtboost.ListClustersResponse + (*vtboost.ClusterChangeResponse)(nil), // 187: vtboost.ClusterChangeResponse + (*vtboost.PrimaryClusterResponse)(nil), // 188: vtboost.PrimaryClusterResponse + (*vtboost.DrainClusterResponse)(nil), // 189: vtboost.DrainClusterResponse + (*vtboost.PurgeResponse)(nil), // 190: vtboost.PurgeResponse + (*vtboost.SetScienceResponse)(nil), // 191: vtboost.SetScienceResponse } var file_vtctlservice_proto_depIdxs = []int32{ 0, // 0: vtctlservice.Vtctl.ExecuteVtctlCommand:input_type -> vtctldata.ExecuteVtctlCommandRequest @@ -881,115 +888,117 @@ var file_vtctlservice_proto_depIdxs = []int32{ 82, // 82: vtctlservice.Vtctld.ValidateVersionKeyspace:input_type -> vtctldata.ValidateVersionKeyspaceRequest 83, // 83: vtctlservice.Vtctld.ValidateVersionShard:input_type -> vtctldata.ValidateVersionShardRequest 84, // 84: vtctlservice.Vtctld.ValidateVSchema:input_type -> vtctldata.ValidateVSchemaRequest - 85, // 85: vtctlservice.Vtctld.BoostPutRecipe:input_type -> vtboost.PutRecipeRequest - 86, // 86: vtctlservice.Vtctld.BoostGetRecipe:input_type -> vtboost.GetRecipeRequest - 87, // 87: vtctlservice.Vtctld.BoostDescribeRecipe:input_type -> vtboost.DescribeRecipeRequest - 88, // 88: vtctlservice.Vtctld.BoostGetCluster:input_type -> vtboost.GetClusterRequest - 89, // 89: vtctlservice.Vtctld.BoostListClusters:input_type -> vtboost.ListClustersRequest - 90, // 90: vtctlservice.Vtctld.BoostAddCluster:input_type -> vtboost.AddClusterRequest - 91, // 91: vtctlservice.Vtctld.BoostMakePrimaryCluster:input_type -> vtboost.PrimaryClusterRequest - 92, // 92: vtctlservice.Vtctld.BoostDrainCluster:input_type -> vtboost.DrainClusterRequest - 93, // 93: vtctlservice.Vtctld.BoostRemoveCluster:input_type -> vtboost.RemoveClusterRequest - 94, // 94: vtctlservice.Vtctld.BoostPurge:input_type -> vtboost.PurgeRequest - 95, // 95: vtctlservice.Vtctld.BoostSetScience:input_type -> vtboost.SetScienceRequest - 96, // 96: vtctlservice.Vtctl.ExecuteVtctlCommand:output_type -> vtctldata.ExecuteVtctlCommandResponse - 97, // 97: vtctlservice.Vtctld.AddCellInfo:output_type -> vtctldata.AddCellInfoResponse - 98, // 98: vtctlservice.Vtctld.AddCellsAlias:output_type -> vtctldata.AddCellsAliasResponse - 99, // 99: vtctlservice.Vtctld.ApplyRoutingRules:output_type -> vtctldata.ApplyRoutingRulesResponse - 100, // 100: vtctlservice.Vtctld.ApplySchema:output_type -> vtctldata.ApplySchemaResponse - 101, // 101: vtctlservice.Vtctld.ApplyShardRoutingRules:output_type -> vtctldata.ApplyShardRoutingRulesResponse - 102, // 102: vtctlservice.Vtctld.ApplyVSchema:output_type -> vtctldata.ApplyVSchemaResponse - 103, // 103: vtctlservice.Vtctld.Backup:output_type -> vtctldata.BackupResponse - 103, // 104: vtctlservice.Vtctld.BackupShard:output_type -> vtctldata.BackupResponse - 104, // 105: vtctlservice.Vtctld.ChangeTabletType:output_type -> vtctldata.ChangeTabletTypeResponse - 105, // 106: vtctlservice.Vtctld.CreateKeyspace:output_type -> vtctldata.CreateKeyspaceResponse - 106, // 107: vtctlservice.Vtctld.CreateShard:output_type -> vtctldata.CreateShardResponse - 107, // 108: vtctlservice.Vtctld.DeleteCellInfo:output_type -> vtctldata.DeleteCellInfoResponse - 108, // 109: vtctlservice.Vtctld.DeleteCellsAlias:output_type -> vtctldata.DeleteCellsAliasResponse - 109, // 110: vtctlservice.Vtctld.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse - 110, // 111: vtctlservice.Vtctld.DeleteShards:output_type -> vtctldata.DeleteShardsResponse - 111, // 112: vtctlservice.Vtctld.DeleteSrvVSchema:output_type -> vtctldata.DeleteSrvVSchemaResponse - 112, // 113: vtctlservice.Vtctld.DeleteTablets:output_type -> vtctldata.DeleteTabletsResponse - 113, // 114: vtctlservice.Vtctld.EmergencyReparentShard:output_type -> vtctldata.EmergencyReparentShardResponse - 114, // 115: vtctlservice.Vtctld.ExecuteFetchAsApp:output_type -> vtctldata.ExecuteFetchAsAppResponse - 115, // 116: vtctlservice.Vtctld.ExecuteFetchAsDBA:output_type -> vtctldata.ExecuteFetchAsDBAResponse - 116, // 117: vtctlservice.Vtctld.ExecuteHook:output_type -> vtctldata.ExecuteHookResponse - 117, // 118: vtctlservice.Vtctld.FindAllShardsInKeyspace:output_type -> vtctldata.FindAllShardsInKeyspaceResponse - 118, // 119: vtctlservice.Vtctld.GetBackups:output_type -> vtctldata.GetBackupsResponse - 119, // 120: vtctlservice.Vtctld.GetCellInfo:output_type -> vtctldata.GetCellInfoResponse - 120, // 121: vtctlservice.Vtctld.GetCellInfoNames:output_type -> vtctldata.GetCellInfoNamesResponse - 121, // 122: vtctlservice.Vtctld.GetCellsAliases:output_type -> vtctldata.GetCellsAliasesResponse - 122, // 123: vtctlservice.Vtctld.GetFullStatus:output_type -> vtctldata.GetFullStatusResponse - 123, // 124: vtctlservice.Vtctld.GetKeyspace:output_type -> vtctldata.GetKeyspaceResponse - 124, // 125: vtctlservice.Vtctld.GetKeyspaces:output_type -> vtctldata.GetKeyspacesResponse - 125, // 126: vtctlservice.Vtctld.GetPermissions:output_type -> vtctldata.GetPermissionsResponse - 126, // 127: vtctlservice.Vtctld.GetRoutingRules:output_type -> vtctldata.GetRoutingRulesResponse - 127, // 128: vtctlservice.Vtctld.GetSchema:output_type -> vtctldata.GetSchemaResponse - 128, // 129: vtctlservice.Vtctld.GetShard:output_type -> vtctldata.GetShardResponse - 129, // 130: vtctlservice.Vtctld.GetShardRoutingRules:output_type -> vtctldata.GetShardRoutingRulesResponse - 130, // 131: vtctlservice.Vtctld.GetSrvKeyspaceNames:output_type -> vtctldata.GetSrvKeyspaceNamesResponse - 131, // 132: vtctlservice.Vtctld.GetSrvKeyspaces:output_type -> vtctldata.GetSrvKeyspacesResponse - 132, // 133: vtctlservice.Vtctld.UpdateThrottlerConfig:output_type -> vtctldata.UpdateThrottlerConfigResponse - 133, // 134: vtctlservice.Vtctld.GetSrvVSchema:output_type -> vtctldata.GetSrvVSchemaResponse - 134, // 135: vtctlservice.Vtctld.GetSrvVSchemas:output_type -> vtctldata.GetSrvVSchemasResponse - 135, // 136: vtctlservice.Vtctld.GetTablet:output_type -> vtctldata.GetTabletResponse - 136, // 137: vtctlservice.Vtctld.GetTablets:output_type -> vtctldata.GetTabletsResponse - 137, // 138: vtctlservice.Vtctld.GetTopologyPath:output_type -> vtctldata.GetTopologyPathResponse - 138, // 139: vtctlservice.Vtctld.GetVersion:output_type -> vtctldata.GetVersionResponse - 139, // 140: vtctlservice.Vtctld.GetVSchema:output_type -> vtctldata.GetVSchemaResponse - 140, // 141: vtctlservice.Vtctld.GetWorkflows:output_type -> vtctldata.GetWorkflowsResponse - 141, // 142: vtctlservice.Vtctld.InitShardPrimary:output_type -> vtctldata.InitShardPrimaryResponse - 142, // 143: vtctlservice.Vtctld.PingTablet:output_type -> vtctldata.PingTabletResponse - 143, // 144: vtctlservice.Vtctld.PlannedReparentShard:output_type -> vtctldata.PlannedReparentShardResponse - 144, // 145: vtctlservice.Vtctld.RebuildKeyspaceGraph:output_type -> vtctldata.RebuildKeyspaceGraphResponse - 145, // 146: vtctlservice.Vtctld.RebuildVSchemaGraph:output_type -> vtctldata.RebuildVSchemaGraphResponse - 146, // 147: vtctlservice.Vtctld.RefreshState:output_type -> vtctldata.RefreshStateResponse - 147, // 148: vtctlservice.Vtctld.RefreshStateByShard:output_type -> vtctldata.RefreshStateByShardResponse - 148, // 149: vtctlservice.Vtctld.ReloadSchema:output_type -> vtctldata.ReloadSchemaResponse - 149, // 150: vtctlservice.Vtctld.ReloadSchemaKeyspace:output_type -> vtctldata.ReloadSchemaKeyspaceResponse - 150, // 151: vtctlservice.Vtctld.ReloadSchemaShard:output_type -> vtctldata.ReloadSchemaShardResponse - 151, // 152: vtctlservice.Vtctld.RemoveBackup:output_type -> vtctldata.RemoveBackupResponse - 152, // 153: vtctlservice.Vtctld.RemoveKeyspaceCell:output_type -> vtctldata.RemoveKeyspaceCellResponse - 153, // 154: vtctlservice.Vtctld.RemoveShardCell:output_type -> vtctldata.RemoveShardCellResponse - 154, // 155: vtctlservice.Vtctld.ReparentTablet:output_type -> vtctldata.ReparentTabletResponse - 155, // 156: vtctlservice.Vtctld.RestoreFromBackup:output_type -> vtctldata.RestoreFromBackupResponse - 156, // 157: vtctlservice.Vtctld.RunHealthCheck:output_type -> vtctldata.RunHealthCheckResponse - 157, // 158: vtctlservice.Vtctld.SetKeyspaceDurabilityPolicy:output_type -> vtctldata.SetKeyspaceDurabilityPolicyResponse - 158, // 159: vtctlservice.Vtctld.SetShardIsPrimaryServing:output_type -> vtctldata.SetShardIsPrimaryServingResponse - 159, // 160: vtctlservice.Vtctld.SetShardTabletControl:output_type -> vtctldata.SetShardTabletControlResponse - 160, // 161: vtctlservice.Vtctld.SetWritable:output_type -> vtctldata.SetWritableResponse - 161, // 162: vtctlservice.Vtctld.ShardReplicationAdd:output_type -> vtctldata.ShardReplicationAddResponse - 162, // 163: vtctlservice.Vtctld.ShardReplicationFix:output_type -> vtctldata.ShardReplicationFixResponse - 163, // 164: vtctlservice.Vtctld.ShardReplicationPositions:output_type -> vtctldata.ShardReplicationPositionsResponse - 164, // 165: vtctlservice.Vtctld.ShardReplicationRemove:output_type -> vtctldata.ShardReplicationRemoveResponse - 165, // 166: vtctlservice.Vtctld.SleepTablet:output_type -> vtctldata.SleepTabletResponse - 166, // 167: vtctlservice.Vtctld.SourceShardAdd:output_type -> vtctldata.SourceShardAddResponse - 167, // 168: vtctlservice.Vtctld.SourceShardDelete:output_type -> vtctldata.SourceShardDeleteResponse - 168, // 169: vtctlservice.Vtctld.StartReplication:output_type -> vtctldata.StartReplicationResponse - 169, // 170: vtctlservice.Vtctld.StopReplication:output_type -> vtctldata.StopReplicationResponse - 170, // 171: vtctlservice.Vtctld.TabletExternallyReparented:output_type -> vtctldata.TabletExternallyReparentedResponse - 171, // 172: vtctlservice.Vtctld.UpdateCellInfo:output_type -> vtctldata.UpdateCellInfoResponse - 172, // 173: vtctlservice.Vtctld.UpdateCellsAlias:output_type -> vtctldata.UpdateCellsAliasResponse - 173, // 174: vtctlservice.Vtctld.Validate:output_type -> vtctldata.ValidateResponse - 174, // 175: vtctlservice.Vtctld.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse - 175, // 176: vtctlservice.Vtctld.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse - 176, // 177: vtctlservice.Vtctld.ValidateShard:output_type -> vtctldata.ValidateShardResponse - 177, // 178: vtctlservice.Vtctld.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse - 178, // 179: vtctlservice.Vtctld.ValidateVersionShard:output_type -> vtctldata.ValidateVersionShardResponse - 179, // 180: vtctlservice.Vtctld.ValidateVSchema:output_type -> vtctldata.ValidateVSchemaResponse - 180, // 181: vtctlservice.Vtctld.BoostPutRecipe:output_type -> vtboost.PutRecipeResponse - 181, // 182: vtctlservice.Vtctld.BoostGetRecipe:output_type -> vtboost.GetRecipeResponse - 182, // 183: vtctlservice.Vtctld.BoostDescribeRecipe:output_type -> vtboost.DescribeRecipeResponse - 183, // 184: vtctlservice.Vtctld.BoostGetCluster:output_type -> vtboost.GetClusterResponse - 184, // 185: vtctlservice.Vtctld.BoostListClusters:output_type -> vtboost.ListClustersResponse - 185, // 186: vtctlservice.Vtctld.BoostAddCluster:output_type -> vtboost.ClusterChangeResponse - 186, // 187: vtctlservice.Vtctld.BoostMakePrimaryCluster:output_type -> vtboost.PrimaryClusterResponse - 187, // 188: vtctlservice.Vtctld.BoostDrainCluster:output_type -> vtboost.DrainClusterResponse - 185, // 189: vtctlservice.Vtctld.BoostRemoveCluster:output_type -> vtboost.ClusterChangeResponse - 188, // 190: vtctlservice.Vtctld.BoostPurge:output_type -> vtboost.PurgeResponse - 189, // 191: vtctlservice.Vtctld.BoostSetScience:output_type -> vtboost.SetScienceResponse - 96, // [96:192] is the sub-list for method output_type - 0, // [0:96] is the sub-list for method input_type + 85, // 85: vtctlservice.Vtctld.WorkflowUpdate:input_type -> vtctldata.WorkflowUpdateRequest + 86, // 86: vtctlservice.Vtctld.BoostPutRecipe:input_type -> vtboost.PutRecipeRequest + 87, // 87: vtctlservice.Vtctld.BoostGetRecipe:input_type -> vtboost.GetRecipeRequest + 88, // 88: vtctlservice.Vtctld.BoostDescribeRecipe:input_type -> vtboost.DescribeRecipeRequest + 89, // 89: vtctlservice.Vtctld.BoostGetCluster:input_type -> vtboost.GetClusterRequest + 90, // 90: vtctlservice.Vtctld.BoostListClusters:input_type -> vtboost.ListClustersRequest + 91, // 91: vtctlservice.Vtctld.BoostAddCluster:input_type -> vtboost.AddClusterRequest + 92, // 92: vtctlservice.Vtctld.BoostMakePrimaryCluster:input_type -> vtboost.PrimaryClusterRequest + 93, // 93: vtctlservice.Vtctld.BoostDrainCluster:input_type -> vtboost.DrainClusterRequest + 94, // 94: vtctlservice.Vtctld.BoostRemoveCluster:input_type -> vtboost.RemoveClusterRequest + 95, // 95: vtctlservice.Vtctld.BoostPurge:input_type -> vtboost.PurgeRequest + 96, // 96: vtctlservice.Vtctld.BoostSetScience:input_type -> vtboost.SetScienceRequest + 97, // 97: vtctlservice.Vtctl.ExecuteVtctlCommand:output_type -> vtctldata.ExecuteVtctlCommandResponse + 98, // 98: vtctlservice.Vtctld.AddCellInfo:output_type -> vtctldata.AddCellInfoResponse + 99, // 99: vtctlservice.Vtctld.AddCellsAlias:output_type -> vtctldata.AddCellsAliasResponse + 100, // 100: vtctlservice.Vtctld.ApplyRoutingRules:output_type -> vtctldata.ApplyRoutingRulesResponse + 101, // 101: vtctlservice.Vtctld.ApplySchema:output_type -> vtctldata.ApplySchemaResponse + 102, // 102: vtctlservice.Vtctld.ApplyShardRoutingRules:output_type -> vtctldata.ApplyShardRoutingRulesResponse + 103, // 103: vtctlservice.Vtctld.ApplyVSchema:output_type -> vtctldata.ApplyVSchemaResponse + 104, // 104: vtctlservice.Vtctld.Backup:output_type -> vtctldata.BackupResponse + 104, // 105: vtctlservice.Vtctld.BackupShard:output_type -> vtctldata.BackupResponse + 105, // 106: vtctlservice.Vtctld.ChangeTabletType:output_type -> vtctldata.ChangeTabletTypeResponse + 106, // 107: vtctlservice.Vtctld.CreateKeyspace:output_type -> vtctldata.CreateKeyspaceResponse + 107, // 108: vtctlservice.Vtctld.CreateShard:output_type -> vtctldata.CreateShardResponse + 108, // 109: vtctlservice.Vtctld.DeleteCellInfo:output_type -> vtctldata.DeleteCellInfoResponse + 109, // 110: vtctlservice.Vtctld.DeleteCellsAlias:output_type -> vtctldata.DeleteCellsAliasResponse + 110, // 111: vtctlservice.Vtctld.DeleteKeyspace:output_type -> vtctldata.DeleteKeyspaceResponse + 111, // 112: vtctlservice.Vtctld.DeleteShards:output_type -> vtctldata.DeleteShardsResponse + 112, // 113: vtctlservice.Vtctld.DeleteSrvVSchema:output_type -> vtctldata.DeleteSrvVSchemaResponse + 113, // 114: vtctlservice.Vtctld.DeleteTablets:output_type -> vtctldata.DeleteTabletsResponse + 114, // 115: vtctlservice.Vtctld.EmergencyReparentShard:output_type -> vtctldata.EmergencyReparentShardResponse + 115, // 116: vtctlservice.Vtctld.ExecuteFetchAsApp:output_type -> vtctldata.ExecuteFetchAsAppResponse + 116, // 117: vtctlservice.Vtctld.ExecuteFetchAsDBA:output_type -> vtctldata.ExecuteFetchAsDBAResponse + 117, // 118: vtctlservice.Vtctld.ExecuteHook:output_type -> vtctldata.ExecuteHookResponse + 118, // 119: vtctlservice.Vtctld.FindAllShardsInKeyspace:output_type -> vtctldata.FindAllShardsInKeyspaceResponse + 119, // 120: vtctlservice.Vtctld.GetBackups:output_type -> vtctldata.GetBackupsResponse + 120, // 121: vtctlservice.Vtctld.GetCellInfo:output_type -> vtctldata.GetCellInfoResponse + 121, // 122: vtctlservice.Vtctld.GetCellInfoNames:output_type -> vtctldata.GetCellInfoNamesResponse + 122, // 123: vtctlservice.Vtctld.GetCellsAliases:output_type -> vtctldata.GetCellsAliasesResponse + 123, // 124: vtctlservice.Vtctld.GetFullStatus:output_type -> vtctldata.GetFullStatusResponse + 124, // 125: vtctlservice.Vtctld.GetKeyspace:output_type -> vtctldata.GetKeyspaceResponse + 125, // 126: vtctlservice.Vtctld.GetKeyspaces:output_type -> vtctldata.GetKeyspacesResponse + 126, // 127: vtctlservice.Vtctld.GetPermissions:output_type -> vtctldata.GetPermissionsResponse + 127, // 128: vtctlservice.Vtctld.GetRoutingRules:output_type -> vtctldata.GetRoutingRulesResponse + 128, // 129: vtctlservice.Vtctld.GetSchema:output_type -> vtctldata.GetSchemaResponse + 129, // 130: vtctlservice.Vtctld.GetShard:output_type -> vtctldata.GetShardResponse + 130, // 131: vtctlservice.Vtctld.GetShardRoutingRules:output_type -> vtctldata.GetShardRoutingRulesResponse + 131, // 132: vtctlservice.Vtctld.GetSrvKeyspaceNames:output_type -> vtctldata.GetSrvKeyspaceNamesResponse + 132, // 133: vtctlservice.Vtctld.GetSrvKeyspaces:output_type -> vtctldata.GetSrvKeyspacesResponse + 133, // 134: vtctlservice.Vtctld.UpdateThrottlerConfig:output_type -> vtctldata.UpdateThrottlerConfigResponse + 134, // 135: vtctlservice.Vtctld.GetSrvVSchema:output_type -> vtctldata.GetSrvVSchemaResponse + 135, // 136: vtctlservice.Vtctld.GetSrvVSchemas:output_type -> vtctldata.GetSrvVSchemasResponse + 136, // 137: vtctlservice.Vtctld.GetTablet:output_type -> vtctldata.GetTabletResponse + 137, // 138: vtctlservice.Vtctld.GetTablets:output_type -> vtctldata.GetTabletsResponse + 138, // 139: vtctlservice.Vtctld.GetTopologyPath:output_type -> vtctldata.GetTopologyPathResponse + 139, // 140: vtctlservice.Vtctld.GetVersion:output_type -> vtctldata.GetVersionResponse + 140, // 141: vtctlservice.Vtctld.GetVSchema:output_type -> vtctldata.GetVSchemaResponse + 141, // 142: vtctlservice.Vtctld.GetWorkflows:output_type -> vtctldata.GetWorkflowsResponse + 142, // 143: vtctlservice.Vtctld.InitShardPrimary:output_type -> vtctldata.InitShardPrimaryResponse + 143, // 144: vtctlservice.Vtctld.PingTablet:output_type -> vtctldata.PingTabletResponse + 144, // 145: vtctlservice.Vtctld.PlannedReparentShard:output_type -> vtctldata.PlannedReparentShardResponse + 145, // 146: vtctlservice.Vtctld.RebuildKeyspaceGraph:output_type -> vtctldata.RebuildKeyspaceGraphResponse + 146, // 147: vtctlservice.Vtctld.RebuildVSchemaGraph:output_type -> vtctldata.RebuildVSchemaGraphResponse + 147, // 148: vtctlservice.Vtctld.RefreshState:output_type -> vtctldata.RefreshStateResponse + 148, // 149: vtctlservice.Vtctld.RefreshStateByShard:output_type -> vtctldata.RefreshStateByShardResponse + 149, // 150: vtctlservice.Vtctld.ReloadSchema:output_type -> vtctldata.ReloadSchemaResponse + 150, // 151: vtctlservice.Vtctld.ReloadSchemaKeyspace:output_type -> vtctldata.ReloadSchemaKeyspaceResponse + 151, // 152: vtctlservice.Vtctld.ReloadSchemaShard:output_type -> vtctldata.ReloadSchemaShardResponse + 152, // 153: vtctlservice.Vtctld.RemoveBackup:output_type -> vtctldata.RemoveBackupResponse + 153, // 154: vtctlservice.Vtctld.RemoveKeyspaceCell:output_type -> vtctldata.RemoveKeyspaceCellResponse + 154, // 155: vtctlservice.Vtctld.RemoveShardCell:output_type -> vtctldata.RemoveShardCellResponse + 155, // 156: vtctlservice.Vtctld.ReparentTablet:output_type -> vtctldata.ReparentTabletResponse + 156, // 157: vtctlservice.Vtctld.RestoreFromBackup:output_type -> vtctldata.RestoreFromBackupResponse + 157, // 158: vtctlservice.Vtctld.RunHealthCheck:output_type -> vtctldata.RunHealthCheckResponse + 158, // 159: vtctlservice.Vtctld.SetKeyspaceDurabilityPolicy:output_type -> vtctldata.SetKeyspaceDurabilityPolicyResponse + 159, // 160: vtctlservice.Vtctld.SetShardIsPrimaryServing:output_type -> vtctldata.SetShardIsPrimaryServingResponse + 160, // 161: vtctlservice.Vtctld.SetShardTabletControl:output_type -> vtctldata.SetShardTabletControlResponse + 161, // 162: vtctlservice.Vtctld.SetWritable:output_type -> vtctldata.SetWritableResponse + 162, // 163: vtctlservice.Vtctld.ShardReplicationAdd:output_type -> vtctldata.ShardReplicationAddResponse + 163, // 164: vtctlservice.Vtctld.ShardReplicationFix:output_type -> vtctldata.ShardReplicationFixResponse + 164, // 165: vtctlservice.Vtctld.ShardReplicationPositions:output_type -> vtctldata.ShardReplicationPositionsResponse + 165, // 166: vtctlservice.Vtctld.ShardReplicationRemove:output_type -> vtctldata.ShardReplicationRemoveResponse + 166, // 167: vtctlservice.Vtctld.SleepTablet:output_type -> vtctldata.SleepTabletResponse + 167, // 168: vtctlservice.Vtctld.SourceShardAdd:output_type -> vtctldata.SourceShardAddResponse + 168, // 169: vtctlservice.Vtctld.SourceShardDelete:output_type -> vtctldata.SourceShardDeleteResponse + 169, // 170: vtctlservice.Vtctld.StartReplication:output_type -> vtctldata.StartReplicationResponse + 170, // 171: vtctlservice.Vtctld.StopReplication:output_type -> vtctldata.StopReplicationResponse + 171, // 172: vtctlservice.Vtctld.TabletExternallyReparented:output_type -> vtctldata.TabletExternallyReparentedResponse + 172, // 173: vtctlservice.Vtctld.UpdateCellInfo:output_type -> vtctldata.UpdateCellInfoResponse + 173, // 174: vtctlservice.Vtctld.UpdateCellsAlias:output_type -> vtctldata.UpdateCellsAliasResponse + 174, // 175: vtctlservice.Vtctld.Validate:output_type -> vtctldata.ValidateResponse + 175, // 176: vtctlservice.Vtctld.ValidateKeyspace:output_type -> vtctldata.ValidateKeyspaceResponse + 176, // 177: vtctlservice.Vtctld.ValidateSchemaKeyspace:output_type -> vtctldata.ValidateSchemaKeyspaceResponse + 177, // 178: vtctlservice.Vtctld.ValidateShard:output_type -> vtctldata.ValidateShardResponse + 178, // 179: vtctlservice.Vtctld.ValidateVersionKeyspace:output_type -> vtctldata.ValidateVersionKeyspaceResponse + 179, // 180: vtctlservice.Vtctld.ValidateVersionShard:output_type -> vtctldata.ValidateVersionShardResponse + 180, // 181: vtctlservice.Vtctld.ValidateVSchema:output_type -> vtctldata.ValidateVSchemaResponse + 181, // 182: vtctlservice.Vtctld.WorkflowUpdate:output_type -> vtctldata.WorkflowUpdateResponse + 182, // 183: vtctlservice.Vtctld.BoostPutRecipe:output_type -> vtboost.PutRecipeResponse + 183, // 184: vtctlservice.Vtctld.BoostGetRecipe:output_type -> vtboost.GetRecipeResponse + 184, // 185: vtctlservice.Vtctld.BoostDescribeRecipe:output_type -> vtboost.DescribeRecipeResponse + 185, // 186: vtctlservice.Vtctld.BoostGetCluster:output_type -> vtboost.GetClusterResponse + 186, // 187: vtctlservice.Vtctld.BoostListClusters:output_type -> vtboost.ListClustersResponse + 187, // 188: vtctlservice.Vtctld.BoostAddCluster:output_type -> vtboost.ClusterChangeResponse + 188, // 189: vtctlservice.Vtctld.BoostMakePrimaryCluster:output_type -> vtboost.PrimaryClusterResponse + 189, // 190: vtctlservice.Vtctld.BoostDrainCluster:output_type -> vtboost.DrainClusterResponse + 187, // 191: vtctlservice.Vtctld.BoostRemoveCluster:output_type -> vtboost.ClusterChangeResponse + 190, // 192: vtctlservice.Vtctld.BoostPurge:output_type -> vtboost.PurgeResponse + 191, // 193: vtctlservice.Vtctld.BoostSetScience:output_type -> vtboost.SetScienceResponse + 97, // [97:194] is the sub-list for method output_type + 0, // [0:97] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go b/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go index 7c23db9a878..cee935ba183 100644 --- a/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice_grpc.pb.go @@ -399,6 +399,9 @@ type VtctldClient interface { ValidateVersionShard(ctx context.Context, in *vtctldata.ValidateVersionShardRequest, opts ...grpc.CallOption) (*vtctldata.ValidateVersionShardResponse, error) // ValidateVSchema compares the schema of each primary tablet in "keyspace/shards..." to the vschema and errs if there are differences. ValidateVSchema(ctx context.Context, in *vtctldata.ValidateVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.ValidateVSchemaResponse, error) + // WorkflowUpdate updates the configuration of a vreplication workflow + // using the provided updated parameters. + WorkflowUpdate(ctx context.Context, in *vtctldata.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldata.WorkflowUpdateResponse, error) // BoostPutRecipe applies a desired recipe (a set of queries) to all the Boost // clusters in this Vitess topology. Any queries put by a previous recipe // which are not present in the new recipe will be removed automatically. This @@ -1288,6 +1291,15 @@ func (c *vtctldClient) ValidateVSchema(ctx context.Context, in *vtctldata.Valida return out, nil } +func (c *vtctldClient) WorkflowUpdate(ctx context.Context, in *vtctldata.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldata.WorkflowUpdateResponse, error) { + out := new(vtctldata.WorkflowUpdateResponse) + err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/WorkflowUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vtctldClient) BoostPutRecipe(ctx context.Context, in *vtboost.PutRecipeRequest, opts ...grpc.CallOption) (*vtboost.PutRecipeResponse, error) { out := new(vtboost.PutRecipeResponse) err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/BoostPutRecipe", in, out, opts...) @@ -1653,6 +1665,9 @@ type VtctldServer interface { ValidateVersionShard(context.Context, *vtctldata.ValidateVersionShardRequest) (*vtctldata.ValidateVersionShardResponse, error) // ValidateVSchema compares the schema of each primary tablet in "keyspace/shards..." to the vschema and errs if there are differences. ValidateVSchema(context.Context, *vtctldata.ValidateVSchemaRequest) (*vtctldata.ValidateVSchemaResponse, error) + // WorkflowUpdate updates the configuration of a vreplication workflow + // using the provided updated parameters. + WorkflowUpdate(context.Context, *vtctldata.WorkflowUpdateRequest) (*vtctldata.WorkflowUpdateResponse, error) // BoostPutRecipe applies a desired recipe (a set of queries) to all the Boost // clusters in this Vitess topology. Any queries put by a previous recipe // which are not present in the new recipe will be removed automatically. This @@ -1966,6 +1981,9 @@ func (UnimplementedVtctldServer) ValidateVersionShard(context.Context, *vtctldat func (UnimplementedVtctldServer) ValidateVSchema(context.Context, *vtctldata.ValidateVSchemaRequest) (*vtctldata.ValidateVSchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateVSchema not implemented") } +func (UnimplementedVtctldServer) WorkflowUpdate(context.Context, *vtctldata.WorkflowUpdateRequest) (*vtctldata.WorkflowUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WorkflowUpdate not implemented") +} func (UnimplementedVtctldServer) BoostPutRecipe(context.Context, *vtboost.PutRecipeRequest) (*vtboost.PutRecipeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BoostPutRecipe not implemented") } @@ -3533,6 +3551,24 @@ func _Vtctld_ValidateVSchema_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Vtctld_WorkflowUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(vtctldata.WorkflowUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VtctldServer).WorkflowUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtctlservice.Vtctld/WorkflowUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VtctldServer).WorkflowUpdate(ctx, req.(*vtctldata.WorkflowUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Vtctld_BoostPutRecipe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(vtboost.PutRecipeRequest) if err := dec(in); err != nil { @@ -4062,6 +4098,10 @@ var Vtctld_ServiceDesc = grpc.ServiceDesc{ MethodName: "ValidateVSchema", Handler: _Vtctld_ValidateVSchema_Handler, }, + { + MethodName: "WorkflowUpdate", + Handler: _Vtctld_WorkflowUpdate_Handler, + }, { MethodName: "BoostPutRecipe", Handler: _Vtctld_BoostPutRecipe_Handler, diff --git a/go/vt/schema/online_ddl_test.go b/go/vt/schema/online_ddl_test.go index 159faa095ef..c559c1e75f1 100644 --- a/go/vt/schema/online_ddl_test.go +++ b/go/vt/schema/online_ddl_test.go @@ -191,9 +191,6 @@ func TestNewOnlineDDL(t *testing.T) { { sql: "alter table t engine=innodb", }, - { - sql: "revert 4e5dcf80_354b_11eb_82cd_f875a4d24e90", // legacy syntax; kept one release version for backwards compatibility. Can remove after v11.0 is released - }, { sql: "revert vitess_migration '4e5dcf80_354b_11eb_82cd_f875a4d24e90'", }, diff --git a/go/vt/schemadiff/diff_test.go b/go/vt/schemadiff/diff_test.go index 668895a7891..0b0251561d5 100644 --- a/go/vt/schemadiff/diff_test.go +++ b/go/vt/schemadiff/diff_test.go @@ -36,6 +36,7 @@ func TestDiffTables(t *testing.T) { toName string action string isError bool + hints *DiffHints }{ { name: "identical", @@ -52,6 +53,46 @@ func TestDiffTables(t *testing.T) { fromName: "t", toName: "t", }, + { + name: "change of columns, boolean type", + from: "create table t(id int primary key)", + to: "create table t(id int primary key, i int, b boolean)", + diff: "alter table t add column i int, add column b tinyint(1)", + cdiff: "ALTER TABLE `t` ADD COLUMN `i` int, ADD COLUMN `b` tinyint(1)", + action: "alter", + fromName: "t", + toName: "t", + }, + { + name: "alter columns from tinyint(1) to boolean", + from: "create table t(id int primary key, b tinyint(1))", + to: "create table t(id int primary key, b boolean)", + }, + { + name: "alter columns from boolean to tinyint(1)", + from: "create table t(id int primary key, b boolean)", + to: "create table t(id int primary key, b tinyint(1))", + }, + { + name: "change of columns, boolean type, default true", + from: "create table t(id int primary key)", + to: "create table t(id int primary key, i int, b boolean default true)", + diff: "alter table t add column i int, add column b tinyint(1) default '1'", + cdiff: "ALTER TABLE `t` ADD COLUMN `i` int, ADD COLUMN `b` tinyint(1) DEFAULT '1'", + action: "alter", + fromName: "t", + toName: "t", + }, + { + name: "change of columns, boolean type, invalid default", + from: "create table t(id int primary key)", + to: "create table t(id int primary key, i int, b boolean default 'red')", + diff: "alter table t add column i int, add column b tinyint(1)", + cdiff: "ALTER TABLE `t` ADD COLUMN `i` int, ADD COLUMN `b` tinyint(1)", + action: "alter", + fromName: "t", + toName: "t", + }, { name: "create", to: "create table t(id int primary key)", @@ -71,11 +112,90 @@ func TestDiffTables(t *testing.T) { { name: "none", }, + { + name: "TableQualifierDeclared hint, to has qualifier", + from: "create table t1 (id int primary key, name int)", + to: "create table _vt.t1 (id int primary key, name bigint)", + diff: "alter table _vt.t1 modify column `name` bigint", + cdiff: "ALTER TABLE `_vt`.`t1` MODIFY COLUMN `name` bigint", + action: "alter", + hints: &DiffHints{ + TableQualifierHint: TableQualifierDeclared, + }, + }, + { + name: "TableQualifierDeclared hint, from has qualifier", + from: "create table _vt.t1 (id int primary key, name int)", + to: "create table t1 (id int primary key, name bigint)", + diff: "alter table t1 modify column `name` bigint", + cdiff: "ALTER TABLE `t1` MODIFY COLUMN `name` bigint", + action: "alter", + hints: &DiffHints{ + TableQualifierHint: TableQualifierDeclared, + }, + }, + { + name: "TableQualifierDefault, from has qualifier", + from: "create table _vt.t1 (id int primary key, name int)", + to: "create table t1 (id int primary key, name bigint)", + diff: "alter table _vt.t1 modify column `name` bigint", + cdiff: "ALTER TABLE `_vt`.`t1` MODIFY COLUMN `name` bigint", + action: "alter", + }, + { + name: "TableQualifierDefault, both have qualifiers", + from: "create table _vt.t1 (id int primary key, name int)", + to: "create table _vt.t1 (id int primary key, name bigint)", + diff: "alter table _vt.t1 modify column `name` bigint", + cdiff: "ALTER TABLE `_vt`.`t1` MODIFY COLUMN `name` bigint", + action: "alter", + }, + { + name: "TableQualifierDefault, create", + to: "create table _vt.t(id int primary key)", + diff: "create table _vt.t (\n\tid int,\n\tprimary key (id)\n)", + cdiff: "CREATE TABLE `_vt`.`t` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", + action: "create", + toName: "t", + }, + { + name: "TableQualifierDeclared, create", + to: "create table _vt.t(id int primary key)", + diff: "create table _vt.t (\n\tid int,\n\tprimary key (id)\n)", + cdiff: "CREATE TABLE `_vt`.`t` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)", + action: "create", + toName: "t", + hints: &DiffHints{ + TableQualifierHint: TableQualifierDeclared, + }, + }, + { + name: "TableQualifierDefault, drop", + from: "create table _vt.t(id int primary key)", + diff: "drop table _vt.t", + cdiff: "DROP TABLE `_vt`.`t`", + action: "drop", + fromName: "t", + }, + { + name: "TableQualifierDeclared, drop", + from: "create table _vt.t(id int primary key)", + diff: "drop table _vt.t", + cdiff: "DROP TABLE `_vt`.`t`", + action: "drop", + fromName: "t", + hints: &DiffHints{ + TableQualifierHint: TableQualifierDeclared, + }, + }, } - hints := &DiffHints{} for _, ts := range tt { t.Run(ts.name, func(t *testing.T) { var fromCreateTable *sqlparser.CreateTable + hints := &DiffHints{} + if ts.hints != nil { + hints = ts.hints + } if ts.from != "" { fromStmt, err := sqlparser.ParseStrictDDL(ts.from) assert.NoError(t, err) diff --git a/go/vt/schemadiff/errors.go b/go/vt/schemadiff/errors.go index 42dd304e75a..6ecff87289b 100644 --- a/go/vt/schemadiff/errors.go +++ b/go/vt/schemadiff/errors.go @@ -1,3 +1,19 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package schemadiff import ( @@ -334,3 +350,32 @@ type ViewDependencyUnresolvedError struct { func (e *ViewDependencyUnresolvedError) Error() string { return fmt.Sprintf("view %s has unresolved/loop dependencies", sqlescape.EscapeID(e.View)) } + +type InvalidColumnReferencedInViewError struct { + View string + Column string + Ambiguous bool +} + +func (e *InvalidColumnReferencedInViewError) Error() string { + if e.Ambiguous { + return fmt.Sprintf("view %s references unqualified but non unique column %s", sqlescape.EscapeID(e.View), sqlescape.EscapeID(e.Column)) + } + return fmt.Sprintf("view %s references unqualified but non-existent column %s", sqlescape.EscapeID(e.View), sqlescape.EscapeID(e.Column)) +} + +type InvalidStarExprInViewError struct { + View string +} + +func (e *InvalidStarExprInViewError) Error() string { + return fmt.Sprintf("view %s has invalid star expression", sqlescape.EscapeID(e.View)) +} + +type EntityNotFoundError struct { + Name string +} + +func (e *EntityNotFoundError) Error() string { + return fmt.Sprintf("entity %s not found", sqlescape.EscapeID(e.Name)) +} diff --git a/go/vt/schemadiff/schema.go b/go/vt/schemadiff/schema.go index 0e9ae4c4df1..e046cc24477 100644 --- a/go/vt/schemadiff/schema.go +++ b/go/vt/schemadiff/schema.go @@ -24,7 +24,10 @@ import ( "sort" "strings" + "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/semantics" ) // Schema represents a database schema, which may contain entities such as tables and views. @@ -67,10 +70,8 @@ func NewSchemaFromEntities(entities []Entity) (*Schema, error) { return nil, &UnsupportedEntityError{Entity: c.Name(), Statement: c.Create().CanonicalStatementString()} } } - if err := schema.normalize(); err != nil { - return nil, err - } - return schema, nil + err := schema.normalize() + return schema, err } // NewSchemaFromStatements creates a valid and normalized schema based on list of valid statements @@ -161,6 +162,8 @@ func getViewDependentTableNames(createView *sqlparser.CreateView) (names []strin // normalize is called as part of Schema creation process. The user may only get a hold of normalized schema. // It validates some cross-entity constraints, and orders entity based on dependencies (e.g. tables, views that read from tables, 2nd level views, etc.) func (s *Schema) normalize() error { + var errs error + s.named = make(map[string]Entity, len(s.tables)+len(s.views)) s.sorted = make([]Entity, 0, len(s.tables)+len(s.views)) // Verify no two entities share same name @@ -304,7 +307,7 @@ func (s *Schema) normalize() error { // - two or more views have a circular dependency for _, t := range s.tables { if _, ok := dependencyLevels[t.Name()]; !ok { - // We _know_ that in this iteration, at least one view is found unassigned a dependency level. + // We _know_ that in this iteration, at least one foreign key is not found. // We return the first one. return &ForeignKeyDependencyUnresolvedError{Table: t.Name()} } @@ -312,16 +315,28 @@ func (s *Schema) normalize() error { for _, v := range s.views { if _, ok := dependencyLevels[v.Name()]; !ok { // We _know_ that in this iteration, at least one view is found unassigned a dependency level. - // We return the first one. - return &ViewDependencyUnresolvedError{View: v.ViewName.Name.String()} + // We gather all the errors. + errs = errors.Join(errs, &ViewDependencyUnresolvedError{View: v.ViewName.Name.String()}) + // We still add it so it shows up in the output if that is used for anything. + s.sorted = append(s.sorted, v) } } } + // Validate views' referenced columns: do these columns actually exist in referenced tables/views? + if err := s.ValidateViewReferences(); err != nil { + errs = errors.Join(errs, err) + } + + // Validate views' referenced columns: do these columns actually exist in referenced tables/views? + if err := s.ValidateViewReferences(); err != nil { + errs = errors.Join(errs, err) + } + // Validate table definitions for _, t := range s.tables { if err := t.validate(); err != nil { - return err + return errors.Join(errs, err) } } colTypeEqualForForeignKey := func(a, b *sqlparser.ColumnType) bool { @@ -365,24 +380,24 @@ func (s *Schema) normalize() error { for i, col := range check.Source { coveredColumn, ok := tableColumns[col.Lowered()] if !ok { - return &InvalidColumnInForeignKeyConstraintError{Table: t.Name(), Constraint: cs.Name.String(), Column: col.String()} + return errors.Join(errs, &InvalidColumnInForeignKeyConstraintError{Table: t.Name(), Constraint: cs.Name.String(), Column: col.String()}) } referencedColumnName := check.ReferenceDefinition.ReferencedColumns[i].Lowered() referencedColumn, ok := referencedColumns[referencedColumnName] if !ok { - return &InvalidReferencedColumnInForeignKeyConstraintError{Table: t.Name(), Constraint: cs.Name.String(), ReferencedTable: referencedTableName, ReferencedColumn: referencedColumnName} + return errors.Join(errs, &InvalidReferencedColumnInForeignKeyConstraintError{Table: t.Name(), Constraint: cs.Name.String(), ReferencedTable: referencedTableName, ReferencedColumn: referencedColumnName}) } if !colTypeEqualForForeignKey(coveredColumn.Type, referencedColumn.Type) { - return &ForeignKeyColumnTypeMismatchError{Table: t.Name(), Constraint: cs.Name.String(), Column: coveredColumn.Name.String(), ReferencedTable: referencedTableName, ReferencedColumn: referencedColumnName} + return errors.Join(errs, &ForeignKeyColumnTypeMismatchError{Table: t.Name(), Constraint: cs.Name.String(), Column: coveredColumn.Name.String(), ReferencedTable: referencedTableName, ReferencedColumn: referencedColumnName}) } } if !referencedTable.columnsCoveredByInOrderIndex(check.ReferenceDefinition.ReferencedColumns) { - return &MissingForeignKeyReferencedIndexError{Table: t.Name(), Constraint: cs.Name.String(), ReferencedTable: referencedTableName} + return errors.Join(errs, &MissingForeignKeyReferencedIndexError{Table: t.Name(), Constraint: cs.Name.String(), ReferencedTable: referencedTableName}) } } } - return nil + return errs } // Entities returns this schema's entities in good order (may be applied without error) @@ -761,3 +776,126 @@ func (s *Schema) Apply(diffs []EntityDiff) (*Schema, error) { } return dup, nil } + +func (s *Schema) ValidateViewReferences() error { + var errs error + schemaInformation := newDeclarativeSchemaInformation() + + // Remember that s.Entities() is already ordered by dependency. ie. tables first, then views + // that only depend on those tables (or on dual), then 2nd tier views, etc. + // Thus, the order of iteration below is valid and sufficient, to build + for _, e := range s.Entities() { + entityColumns, err := s.getEntityColumnNames(e.Name(), schemaInformation) + if err != nil { + errs = errors.Join(errs, err) + continue + } + schemaInformation.addTable(e.Name()) + for _, col := range entityColumns { + schemaInformation.addColumn(e.Name(), col.Lowered()) + } + } + + // Add dual table with no explicit columns for dual style expressions in views. + schemaInformation.addTable("dual") + + for _, view := range s.Views() { + sel := sqlparser.CloneSelectStatement(view.CreateView.Select) // Analyze(), below, rewrites the select; we don't want to actually modify the schema + _, err := semantics.AnalyzeStrict(sel, semanticKS.Name, schemaInformation) + formalizeErr := func(err error) error { + if err == nil { + return nil + } + switch e := err.(type) { + case *semantics.AmbiguousColumnError: + return &InvalidColumnReferencedInViewError{ + View: view.Name(), + Column: e.Column, + Ambiguous: true, + } + case *semantics.ColumnNotFoundError: + return &InvalidColumnReferencedInViewError{ + View: view.Name(), + Column: e.Column.Name.String(), + } + } + return err + } + errs = errors.Join(errs, formalizeErr(err)) + } + return errs +} + +// getEntityColumnNames returns the names of columns in given entity (either a table or a view) +func (s *Schema) getEntityColumnNames(entityName string, schemaInformation *declarativeSchemaInformation) ( + columnNames []*sqlparser.IdentifierCI, + err error, +) { + entity := s.Entity(entityName) + if entity == nil { + if strings.ToLower(entityName) == "dual" { + // this is fine. DUAL does not exist but is allowed + return nil, nil + } + return nil, &EntityNotFoundError{Name: entityName} + } + // The entity is either a table or a view + switch entity := entity.(type) { + case *CreateTableEntity: + return s.getTableColumnNames(entity), nil + case *CreateViewEntity: + return s.getViewColumnNames(entity, schemaInformation) + } + return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "unexpected entity type for %v", entityName) +} + +// getTableColumnNames returns the names of columns in given table. +func (s *Schema) getTableColumnNames(t *CreateTableEntity) (columnNames []*sqlparser.IdentifierCI) { + for _, c := range t.TableSpec.Columns { + columnNames = append(columnNames, &c.Name) + } + return columnNames +} + +// getViewColumnNames returns the names of aliased columns returned by a given view. +func (s *Schema) getViewColumnNames(v *CreateViewEntity, schemaInformation *declarativeSchemaInformation) ( + columnNames []*sqlparser.IdentifierCI, + err error, +) { + for _, node := range v.Select.GetColumns() { + switch node := node.(type) { + case *sqlparser.StarExpr: + if tableName := node.TableName.Name.String(); tableName != "" { + for _, col := range schemaInformation.Tables[tableName].Columns { + name := sqlparser.CloneRefOfIdentifierCI(&col.Name) + columnNames = append(columnNames, name) + } + } else { + dependentNames, err := getViewDependentTableNames(v.CreateView) + if err != nil { + return nil, err + } + // add all columns from all referenced tables and views + for _, entityName := range dependentNames { + if schemaInformation.Tables[entityName] != nil { // is nil for dual/DUAL + for _, col := range schemaInformation.Tables[entityName].Columns { + name := sqlparser.CloneRefOfIdentifierCI(&col.Name) + columnNames = append(columnNames, name) + } + } + } + } + if len(columnNames) == 0 { + return nil, &InvalidStarExprInViewError{View: v.Name()} + } + case *sqlparser.AliasedExpr: + ci := sqlparser.NewIdentifierCI(node.ColumnName()) + columnNames = append(columnNames, &ci) + } + } + + if err != nil { + return nil, err + } + return columnNames, nil +} diff --git a/go/vt/schemadiff/schema_test.go b/go/vt/schemadiff/schema_test.go index 1a24b862b1c..a29195366b4 100644 --- a/go/vt/schemadiff/schema_test.go +++ b/go/vt/schemadiff/schema_test.go @@ -17,12 +17,15 @@ limitations under the License. package schemadiff import ( + "sort" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "vitess.io/vitess/go/errors" + "vitess.io/vitess/go/vt/sqlparser" ) @@ -36,7 +39,7 @@ var createQueries = []string{ "create table t5(id int)", "create view v2 as select * from v3, t2", "create view v1 as select * from v3", - "create view v3 as select * from t3 as t3", + "create view v3 as select *, id+1 as id_plus, id+2 from t3 as t3", "create view v0 as select 1 from DUAL", "create view v9 as select 1", } @@ -74,12 +77,12 @@ var expectSortedViewNames = []string{ "v6", // level 3 } -var toSQL = "CREATE TABLE `t1` (\n\t`id` int\n);\nCREATE TABLE `t2` (\n\t`id` int\n);\nCREATE TABLE `t3` (\n\t`id` int,\n\t`type` enum('foo', 'bar') NOT NULL DEFAULT 'foo'\n);\nCREATE TABLE `t5` (\n\t`id` int\n);\nCREATE VIEW `v0` AS SELECT 1 FROM `dual`;\nCREATE VIEW `v3` AS SELECT * FROM `t3` AS `t3`;\nCREATE VIEW `v9` AS SELECT 1 FROM `dual`;\nCREATE VIEW `v1` AS SELECT * FROM `v3`;\nCREATE VIEW `v2` AS SELECT * FROM `v3`, `t2`;\nCREATE VIEW `v4` AS SELECT * FROM `t2` AS `something_else`, `v3`;\nCREATE VIEW `v5` AS SELECT * FROM `t1`, (SELECT * FROM `v3`) AS `some_alias`;\nCREATE VIEW `v6` AS SELECT * FROM `v4`;\n" +var toSQL = "CREATE TABLE `t1` (\n\t`id` int\n);\nCREATE TABLE `t2` (\n\t`id` int\n);\nCREATE TABLE `t3` (\n\t`id` int,\n\t`type` enum('foo', 'bar') NOT NULL DEFAULT 'foo'\n);\nCREATE TABLE `t5` (\n\t`id` int\n);\nCREATE VIEW `v0` AS SELECT 1 FROM `dual`;\nCREATE VIEW `v3` AS SELECT *, `id` + 1 AS `id_plus`, `id` + 2 FROM `t3` AS `t3`;\nCREATE VIEW `v9` AS SELECT 1 FROM `dual`;\nCREATE VIEW `v1` AS SELECT * FROM `v3`;\nCREATE VIEW `v2` AS SELECT * FROM `v3`, `t2`;\nCREATE VIEW `v4` AS SELECT * FROM `t2` AS `something_else`, `v3`;\nCREATE VIEW `v5` AS SELECT * FROM `t1`, (SELECT * FROM `v3`) AS `some_alias`;\nCREATE VIEW `v6` AS SELECT * FROM `v4`;\n" func TestNewSchemaFromQueries(t *testing.T) { schema, err := NewSchemaFromQueries(createQueries) assert.NoError(t, err) - assert.NotNil(t, schema) + require.NotNil(t, schema) assert.Equal(t, expectSortedNames, schema.EntityNames()) assert.Equal(t, expectSortedTableNames, schema.TableNames()) @@ -89,7 +92,7 @@ func TestNewSchemaFromQueries(t *testing.T) { func TestNewSchemaFromSQL(t *testing.T) { schema, err := NewSchemaFromSQL(strings.Join(createQueries, ";")) assert.NoError(t, err) - assert.NotNil(t, schema) + require.NotNil(t, schema) assert.Equal(t, expectSortedNames, schema.EntityNames()) assert.Equal(t, expectSortedTableNames, schema.TableNames()) @@ -111,9 +114,12 @@ func TestNewSchemaFromQueriesUnresolved(t *testing.T) { queries := append(createQueries, "create view v7 as select * from v8, t2", ) - _, err := NewSchemaFromQueries(queries) + schema, err := NewSchemaFromQueries(queries) assert.Error(t, err) assert.EqualError(t, err, (&ViewDependencyUnresolvedError{View: "v7"}).Error()) + v := schema.sorted[len(schema.sorted)-1] + assert.IsType(t, &CreateViewEntity{}, v) + assert.Equal(t, "CREATE VIEW `v7` AS SELECT * FROM `v8`, `t2`", v.Create().CanonicalStatementString()) } func TestNewSchemaFromQueriesUnresolvedAlias(t *testing.T) { @@ -151,14 +157,15 @@ func TestNewSchemaFromQueriesLoop(t *testing.T) { "create view v8 as select * from t1, v7", ) _, err := NewSchemaFromQueries(queries) - assert.Error(t, err) + require.Error(t, err) + err = errors.UnwrapFirst(err) assert.EqualError(t, err, (&ViewDependencyUnresolvedError{View: "v7"}).Error()) } func TestToSQL(t *testing.T) { schema, err := NewSchemaFromQueries(createQueries) assert.NoError(t, err) - assert.NotNil(t, schema) + require.NotNil(t, schema) sql := schema.ToSQL() assert.Equal(t, toSQL, sql) @@ -167,7 +174,7 @@ func TestToSQL(t *testing.T) { func TestCopy(t *testing.T) { schema, err := NewSchemaFromQueries(createQueries) assert.NoError(t, err) - assert.NotNil(t, schema) + require.NotNil(t, schema) schemaClone := schema.copy() assert.Equal(t, schema, schemaClone) @@ -398,3 +405,311 @@ func TestInvalidTableForeignKeyReference(t *testing.T) { assert.EqualError(t, err, (&ForeignKeyDependencyUnresolvedError{Table: "t11"}).Error()) } } + +func TestGetEntityColumnNames(t *testing.T) { + var queries = []string{ + "create table t1(id int, state int, some char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select id as id from t1", + "create view v2 as select 3+1 as `id`, state as state, some as thing from t1", + "create view v3 as select `id` as `id`, state as state, thing as another from v2", + "create view v4 as select 1 as `ok` from dual", + "create view v5 as select 1 as `ok` from DUAL", + "create view v6 as select ok as `ok` from v5", + "create view v7 as select * from t1", + "create view v8 as select * from v7", + "create view v9 as select * from v8, v6", + "create view va as select * from v6, v8", + "create view vb as select *, now() from v8", + } + + schema, err := NewSchemaFromQueries(queries) + require.NoError(t, err) + require.NotNil(t, schema) + + expectedColNames := map[string]([]string){ + "t1": []string{"id", "state", "some"}, + "t2": []string{"id", "c"}, + "v1": []string{"id"}, + "v2": []string{"id", "state", "thing"}, + "v3": []string{"id", "state", "another"}, + "v4": []string{"ok"}, + "v5": []string{"ok"}, + "v6": []string{"ok"}, + "v7": []string{"id", "state", "some"}, + "v8": []string{"id", "state", "some"}, + "v9": []string{"id", "state", "some", "ok"}, + "va": []string{"ok", "id", "state", "some"}, + "vb": []string{"id", "state", "some", "now()"}, + } + entities := schema.Entities() + require.Equal(t, len(entities), len(expectedColNames)) + + tcmap := newDeclarativeSchemaInformation() + // we test by order of dependency: + for _, e := range entities { + tbl := e.Name() + t.Run(tbl, func(t *testing.T) { + identifiers, err := schema.getEntityColumnNames(tbl, tcmap) + assert.NoError(t, err) + names := []string{} + for _, ident := range identifiers { + names = append(names, ident.String()) + } + // compare columns. We disregard order. + expectNames := expectedColNames[tbl][:] + sort.Strings(names) + sort.Strings(expectNames) + assert.Equal(t, expectNames, names) + // emulate the logic that fills known columns for known entities: + tcmap.addTable(tbl) + for _, name := range names { + tcmap.addColumn(tbl, name) + } + }) + } +} + +func TestViewReferences(t *testing.T) { + tt := []struct { + name string + queries []string + expectErr error + }{ + { + name: "valid", + queries: []string{ + "create table t1(id int, state int, some char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select id as id from t1", + "create view v2 as select 3+1 as `id`, state as state, some as thing from t1", + "create view v3 as select `id` as `id`, state as state, thing as another from v2", + "create view v4 as select 1 as `ok` from dual", + "create view v5 as select 1 as `ok` from DUAL", + "create view v6 as select ok as `ok` from v5", + }, + }, + { + name: "valid WHERE", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select c from t1 where id=3", + }, + }, + { + name: "invalid unqualified referenced column", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select unexpected from t1", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v1", Column: "unexpected"}, + }, + { + name: "invalid unqualified referenced column in where clause", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select 1 from t1 where unexpected=3", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v1", Column: "unexpected"}, + }, + { + name: "valid qualified", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select t1.c from t1 where t1.id=3", + }, + }, + { + name: "valid qualified, multiple tables", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select t1.c from t1, t2 where t2.id=3", + }, + }, + { + name: "invalid unqualified, multiple tables", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select c from t1, t2 where t2.id=3", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v1", Column: "c", Ambiguous: true}, + }, + { + name: "invalid unqualified in WHERE clause, multiple tables", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5))", + "create view v1 as select t2.c from t1, t2 where id=3", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v1", Column: "id", Ambiguous: true}, + }, + { + name: "valid unqualified, multiple tables", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5), only_in_t2 int)", + "create view v1 as select only_in_t2 from t1, t2 where t1.id=3", + }, + }, + { + name: "valid unqualified in WHERE clause, multiple tables", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, c char(5), only_in_t2 int)", + "create view v1 as select t1.id from t1, t2 where only_in_t2=3", + }, + }, + { + name: "valid cascaded views", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id, c from t1 where id > 0", + "create view v2 as select * from v1 where id > 0", + }, + }, + { + name: "valid cascaded views, column aliases", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id, c as ch from t1 where id > 0", + "create view v2 as select ch from v1 where id > 0", + }, + }, + { + name: "valid cascaded views, column aliases in WHERE", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id as counter, c as ch from t1 where id > 0", + "create view v2 as select ch from v1 where counter > 0", + }, + }, + { + name: "valid cascaded views, aliased expression", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id+1 as counter, c as ch from t1 where id > 0", + "create view v2 as select ch from v1 where counter > 0", + }, + }, + { + name: "valid cascaded views, non aliased expression", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id+1, c as ch from t1 where id > 0", + "create view v2 as select ch from v1 where `id + 1` > 0", + }, + }, + { + name: "cascaded views, invalid column aliases", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id, c as ch from t1 where id > 0", + "create view v2 as select c from v1 where id > 0", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v2", Column: "c"}, + }, + { + name: "cascaded views, column not in view", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id from t1 where c='x'", + "create view v2 as select c from v1 where id > 0", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v2", Column: "c"}, + }, + { + name: "complex cascade", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, n int, info int)", + "create view v1 as select id, c as ch from t1 where id > 0", + "create view v2 as select n as num, info from t2", + "create view v3 as select num, v1.id, ch from v1 join v2 using (id) where info > 5", + }, + }, + { + name: "valid dual", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select 1 from dual", + }, + }, + { + name: "invalid dual column", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select id from dual", + }, + expectErr: &InvalidColumnReferencedInViewError{View: "v1", Column: "id"}, + }, + { + name: "invalid dual star", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select * from dual", + }, + expectErr: &InvalidStarExprInViewError{View: "v1"}, + }, + { + name: "valid star", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select * from t1 where id > 0", + }, + }, + { + name: "valid star, cascaded", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create view v1 as select t1.* from t1 where id > 0", + "create view v2 as select * from v1 where id > 0", + }, + }, + { + name: "valid star, two tables, cascaded", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, ts timestamp)", + "create view v1 as select t1.* from t1, t2 where t1.id > 0", + "create view v2 as select * from v1 where c > 0", + }, + }, + { + name: "valid two star, two tables, cascaded", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, ts timestamp)", + "create view v1 as select t1.*, t2.* from t1, t2 where t1.id > 0", + "create view v2 as select * from v1 where c > 0 and ts is not null", + }, + }, + { + name: "valid unqualified star, cascaded", + queries: []string{ + "create table t1(id int primary key, c char(5))", + "create table t2(id int primary key, ts timestamp)", + "create view v1 as select * from t1, t2 where t1.id > 0", + "create view v2 as select * from v1 where c > 0 and ts is not null", + }, + }, + } + for _, ts := range tt { + t.Run(ts.name, func(t *testing.T) { + schema, err := NewSchemaFromQueries(ts.queries) + if ts.expectErr == nil { + require.NoError(t, err) + require.NotNil(t, schema) + } else { + require.Error(t, err) + err = errors.UnwrapFirst(err) + require.Equal(t, ts.expectErr, err, "received error: %v", err) + } + }) + } +} diff --git a/go/vt/schemadiff/semantics.go b/go/vt/schemadiff/semantics.go new file mode 100644 index 00000000000..ef9017d3b25 --- /dev/null +++ b/go/vt/schemadiff/semantics.go @@ -0,0 +1,75 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package schemadiff + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/vt/key" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vtgate/semantics" + "vitess.io/vitess/go/vt/vtgate/vindexes" +) + +// semanticKS is a bogus keyspace, used for consistency purposes. The name is not important +var semanticKS = &vindexes.Keyspace{ + Name: "ks", + Sharded: false, +} + +var _ semantics.SchemaInformation = (*declarativeSchemaInformation)(nil) + +// declarativeSchemaInformation is a utility wrapper arounf FakeSI, and adds a few utility functions +// to make it more simple and accessible to schemadiff's logic. +type declarativeSchemaInformation struct { + Tables map[string]*vindexes.Table +} + +func newDeclarativeSchemaInformation() *declarativeSchemaInformation { + return &declarativeSchemaInformation{ + Tables: make(map[string]*vindexes.Table), + } +} + +// FindTableOrVindex implements the SchemaInformation interface +func (si *declarativeSchemaInformation) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) { + table := si.Tables[sqlparser.String(tablename)] + return table, nil, "", 0, nil, nil +} + +func (si *declarativeSchemaInformation) ConnCollation() collations.ID { + return 45 +} + +// addTable adds a fake table with an empty column list +func (si *declarativeSchemaInformation) addTable(tableName string) { + tbl := &vindexes.Table{ + Name: sqlparser.NewIdentifierCS(tableName), + Columns: []vindexes.Column{}, + ColumnListAuthoritative: true, + Keyspace: semanticKS, + } + si.Tables[tableName] = tbl +} + +// addColumn adds a fake column with no type. It assumes the table already exists +func (si *declarativeSchemaInformation) addColumn(tableName string, columnName string) { + col := &vindexes.Column{ + Name: sqlparser.NewIdentifierCI(columnName), + } + si.Tables[tableName].Columns = append(si.Tables[tableName].Columns, *col) +} diff --git a/go/vt/schemadiff/table.go b/go/vt/schemadiff/table.go index 77b233d9a93..fb089f3ef71 100644 --- a/go/vt/schemadiff/table.go +++ b/go/vt/schemadiff/table.go @@ -437,6 +437,32 @@ func (c *CreateTableEntity) normalizeColumnOptions() { } } + // Normalize boolean to tinyint(1). Otherwise we get a diff if the desired schema has a boolean column because + // "show create table" reports it as a tinyint(1). + if col.Type.Type == "boolean" { + col.Type.Type = "tinyint" + col.Type.Length = &sqlparser.Literal{ + Type: sqlparser.IntVal, + Val: "1", + } + + if col.Type.Options.Default != nil { + val, ok := col.Type.Options.Default.(sqlparser.BoolVal) + if ok { + defaultVal := "0" + if val { + defaultVal = "1" + } + col.Type.Options.Default = &sqlparser.Literal{ + Type: sqlparser.StrVal, + Val: defaultVal, + } + } else { + col.Type.Options.Default = nil + } + } + } + if _, ok := floatTypes[col.Type.Type]; ok { // First, normalize the actual type switch col.Type.Type { @@ -724,6 +750,10 @@ func (c *CreateTableEntity) TableDiff(other *CreateTableEntity, hints *DiffHints alterTable := &sqlparser.AlterTable{ Table: c.CreateTable.Table, } + if hints.TableQualifierHint == TableQualifierDeclared { + alterTable.Table.Qualifier = other.Table.Qualifier + } + diffedTableCharset := "" var parentAlterTableEntityDiff *AlterTableEntityDiff var partitionSpecs []*sqlparser.PartitionSpec diff --git a/go/vt/schemadiff/table_test.go b/go/vt/schemadiff/table_test.go index 954a8c4e48a..547d0102427 100644 --- a/go/vt/schemadiff/table_test.go +++ b/go/vt/schemadiff/table_test.go @@ -1144,6 +1144,7 @@ func TestCreateTableDiff(t *testing.T) { diff: "alter table t1 comment ''", cdiff: "ALTER TABLE `t1` COMMENT ''", }, + // expressions { // validates that CanonicalString prints 'signed' and not 'SIGNED', as MySQL's `SHOW CREATE TABLE` outputs lower case 'signed' name: "cast as", @@ -1245,10 +1246,10 @@ func TestCreateTableDiff(t *testing.T) { assert.NoError(t, err) assert.True(t, alter.IsEmpty(), "expected empty diff, found changes") if !alter.IsEmpty() { - t.Logf("statements[0]: %v", alter.StatementString()) + t.Logf(" statements[0]: %v", alter.StatementString()) + t.Logf("cstatements[0]: %v", alter.CanonicalStatementString()) t.Logf("c: %v", sqlparser.CanonicalString(c.CreateTable)) t.Logf("other: %v", sqlparser.CanonicalString(other.CreateTable)) - t.Logf("cstatements[0]: %v", alter.CanonicalStatementString()) } default: assert.NoError(t, err) @@ -2092,6 +2093,21 @@ func TestNormalize(t *testing.T) { from: "create table t (id int primary key, i1 int invisible)", to: "CREATE TABLE `t` (\n\t`id` int,\n\t`i1` int INVISIBLE,\n\tPRIMARY KEY (`id`)\n)", }, + { + name: "normalize boolean, default true", + from: "create table t (id int primary key, b boolean default true)", + to: "CREATE TABLE `t` (\n\t`id` int,\n\t`b` tinyint(1) DEFAULT '1',\n\tPRIMARY KEY (`id`)\n)", + }, + { + name: "normalize boolean, default false", + from: "create table t (id int primary key, b boolean default false)", + to: "CREATE TABLE `t` (\n\t`id` int,\n\t`b` tinyint(1) DEFAULT '0',\n\tPRIMARY KEY (`id`)\n)", + }, + { + name: "normalize primary key and column with no default, with type boolean", + from: "create table t (id boolean primary key, b boolean)", + to: "CREATE TABLE `t` (\n\t`id` tinyint(1),\n\t`b` tinyint(1),\n\tPRIMARY KEY (`id`)\n)", + }, } for _, ts := range tt { t.Run(ts.name, func(t *testing.T) { diff --git a/go/vt/servenv/jquery.go b/go/vt/servenv/jquery.go deleted file mode 100644 index 9976b786ddb..00000000000 --- a/go/vt/servenv/jquery.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package servenv - -// JQueryIncludes is the include to use to be able to use jquery and jquery-ui -const JQueryIncludes = ` - - - -` diff --git a/go/vt/servenv/servenv.go b/go/vt/servenv/servenv.go index 9f3d63f1a02..13e9f13c2de 100644 --- a/go/vt/servenv/servenv.go +++ b/go/vt/servenv/servenv.go @@ -77,12 +77,13 @@ var ( // Flags specific to Init, Run, and RunDefault functions. var ( - lameduckPeriod = 50 * time.Millisecond - onTermTimeout = 10 * time.Second - onCloseTimeout = 10 * time.Second - catchSigpipe bool - maxStackSize = 64 * 1024 * 1024 - initStartTime time.Time // time when tablet init started: for debug purposes to time how long a tablet init takes + lameduckPeriod = 50 * time.Millisecond + onTermTimeout = 10 * time.Second + onCloseTimeout = 10 * time.Second + catchSigpipe bool + maxStackSize = 64 * 1024 * 1024 + initStartTime time.Time // time when tablet init started: for debug purposes to time how long a tablet init takes + tableRefreshInterval int ) // RegisterFlags installs the flags used by Init, Run, and RunDefault. @@ -96,6 +97,7 @@ func RegisterFlags() { fs.DurationVar(&onCloseTimeout, "onclose_timeout", onCloseTimeout, "wait no more than this for OnClose handlers before stopping") fs.BoolVar(&catchSigpipe, "catch-sigpipe", catchSigpipe, "catch and ignore SIGPIPE on stdout and stderr if specified") fs.IntVar(&maxStackSize, "max-stack-size", maxStackSize, "configure the maximum stack size in bytes") + fs.IntVar(&tableRefreshInterval, "table-refresh-interval", tableRefreshInterval, "interval in milliseconds to refresh tables in status page with refreshRequired class") // pid_file.go fs.StringVar(&pidFile, "pid_file", pidFile, "If set, the process will write its pid to the named file, and delete it on graceful shutdown.") diff --git a/go/vt/servenv/status.go b/go/vt/servenv/status.go index 36a4d30ad73..409b2050181 100644 --- a/go/vt/servenv/status.go +++ b/go/vt/servenv/status.go @@ -104,6 +104,32 @@ text-align: right;

Status for {{.BinaryName}}

+
Started: {{.StartTime}}
@@ -255,7 +281,7 @@ func registerDebugBlockProfileRate() { return } - rate, err := strconv.ParseInt(r.FormValue("rate"), 10, 32) + rate, err := strconv.Atoi(r.FormValue("rate")) message := "block profiling enabled" if rate < 0 || err != nil { // We can't get the current profiling rate @@ -269,8 +295,8 @@ func registerDebugBlockProfileRate() { } else { message = fmt.Sprintf("Block profiling rate set to %d", rate) } - blockProfileRate = int(rate) - runtime.SetBlockProfileRate(int(rate)) + blockProfileRate = rate + runtime.SetBlockProfileRate(rate) log.Infof("Set block profile rate to: %d", rate) w.Header().Set("Content-Type", "text/plain") w.Write([]byte(message)) @@ -286,7 +312,7 @@ func registerDebugMutexProfileFraction() { } currentFraction := runtime.SetMutexProfileFraction(-1) - fraction, err := strconv.ParseInt(r.FormValue("fraction"), 10, 32) + fraction, err := strconv.Atoi(r.FormValue("fraction")) message := "mutex profiling enabled" if fraction < 0 || err != nil { if currentFraction == 0 { @@ -298,7 +324,7 @@ func registerDebugMutexProfileFraction() { } else { message = fmt.Sprintf("Mutex profiling set to fraction %d", fraction) } - runtime.SetMutexProfileFraction(int(fraction)) + runtime.SetMutexProfileFraction(fraction) log.Infof("Set mutex profiling fraction to: %d", fraction) w.Header().Set("Content-Type", "text/plain") w.Write([]byte(message)) diff --git a/go/vt/servenv/version.go b/go/vt/servenv/version.go index ca41e7115a0..3746905868c 100644 --- a/go/vt/servenv/version.go +++ b/go/vt/servenv/version.go @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -package servenv - -// THIS FILE IS AUTO-GENERATED DURING NEW RELEASES BY ./tools/do_releases.sh +// THIS FILE IS AUTO-GENERATED DURING NEW RELEASES // DO NOT EDIT -const versionName = "16.0.1-SNAPSHOT" +package servenv + +const versionName = "17.0.0-SNAPSHOT" diff --git a/go/vt/sidecardb/schema/onlineddl/schema_migrations.sql b/go/vt/sidecardb/schema/onlineddl/schema_migrations.sql index f686d3dd13d..60cd4abcefa 100644 --- a/go/vt/sidecardb/schema/onlineddl/schema_migrations.sql +++ b/go/vt/sidecardb/schema/onlineddl/schema_migrations.sql @@ -58,7 +58,6 @@ CREATE TABLE IF NOT EXISTS schema_migrations `reverted_uuid` varchar(64) NOT NULL DEFAULT '', `is_view` tinyint unsigned NOT NULL DEFAULT '0', `ready_to_complete` tinyint unsigned NOT NULL DEFAULT '0', - `stowaway_table` tinytext NOT NULL, `vitess_liveness_indicator` bigint NOT NULL DEFAULT '0', `user_throttle_ratio` float NOT NULL DEFAULT '0', `special_plan` text NOT NULL, @@ -71,7 +70,7 @@ CREATE TABLE IF NOT EXISTS schema_migrations `is_immediate_operation` tinyint unsigned NOT NULL DEFAULT '0', `reviewed_timestamp` timestamp NULL DEFAULT NULL, `ready_to_complete_timestamp` timestamp NULL DEFAULT NULL, - PRIMARY KEY (`id`), + PRIMARY KEY (`id`), UNIQUE KEY `uuid_idx` (`migration_uuid`), KEY `keyspace_shard_idx` (`keyspace`(64), `shard`(64)), KEY `status_idx` (`migration_status`, `liveness_timestamp`), diff --git a/go/vt/sqlparser/analyzer.go b/go/vt/sqlparser/analyzer.go index a9900f39044..5f964726049 100644 --- a/go/vt/sqlparser/analyzer.go +++ b/go/vt/sqlparser/analyzer.go @@ -368,7 +368,7 @@ func IsColName(node Expr) bool { // NULL is not considered to be a value. func IsValue(node Expr) bool { switch v := node.(type) { - case Argument: + case *Argument: return true case *Literal: switch v.Type { diff --git a/go/vt/sqlparser/ast.go b/go/vt/sqlparser/ast.go index 1d44e47777d..d411755c422 100644 --- a/go/vt/sqlparser/ast.go +++ b/go/vt/sqlparser/ast.go @@ -16,6 +16,8 @@ limitations under the License. package sqlparser +import "vitess.io/vitess/go/sqltypes" + /* This is the Vitess AST. This file should only contain pure struct declarations, or methods used to mark a struct as implementing an interface. All other methods @@ -552,6 +554,12 @@ type ( Load struct { } + // PurgeBinaryLogs represents a PURGE BINARY LOGS statement + PurgeBinaryLogs struct { + To string + Before string + } + // Show represents a show statement. Show struct { Internal ShowInternal @@ -739,6 +747,7 @@ func (*ExplainTab) iStatement() {} func (*PrepareStmt) iStatement() {} func (*ExecuteStmt) iStatement() {} func (*DeallocateStmt) iStatement() {} +func (*PurgeBinaryLogs) iStatement() {} func (*CreateView) iDDLStatement() {} func (*AlterView) iDDLStatement() {} @@ -2263,7 +2272,10 @@ type ( } // Argument represents bindvariable expression - Argument string + Argument struct { + Name string + Type sqltypes.Type + } // NullVal represents a NULL value. NullVal struct{} @@ -2503,7 +2515,7 @@ type ( // it is the column offset from the incoming result stream Offset struct { V int - Original string + Original Expr } // JSONArrayExpr represents JSON_ARRAY() @@ -2704,17 +2716,47 @@ type ( JSONValue Expr } - //PointExpr represents POINT(x,y) expression + // PointExpr represents POINT(x,y) expression PointExpr struct { XCordinate Expr YCordinate Expr } - //LineString represents LineString(POINT(x,y), POINT(x,y), ..) expression + // LineString represents LineString(POINT(x,y), POINT(x,y), ..) expression LineStringExpr struct { PointParams Exprs } + // PolygonExpr represents Polygon(LineString(POINT(x,y), POINT(x,y), ..)) expressions + PolygonExpr struct { + LinestringParams Exprs + } + + // MultiPoint represents a geometry collection for points + MultiPointExpr struct { + PointParams Exprs + } + + // MultiPoint represents a geometry collection for linestrings + MultiLinestringExpr struct { + LinestringParams Exprs + } + + // MultiPolygon represents a geometry collection for polygons + MultiPolygonExpr struct { + PolygonParams Exprs + } + + // GeomFromWktType is an enum to get the types of wkt functions with possible values: GeometryFromText GeometryCollectionFromText PointFromText LineStringFromText PolygonFromText MultiPointFromText MultiPolygonFromText MultiLinestringFromText + GeomFromWktType int8 + + GeomFromTextExpr struct { + Type GeomFromWktType + WktText Expr + Srid Expr + AxisOrderOpt Expr + } + AggrFunc interface { Expr AggrName() string @@ -2955,7 +2997,7 @@ func (*BetweenExpr) iExpr() {} func (*IsExpr) iExpr() {} func (*ExistsExpr) iExpr() {} func (*Literal) iExpr() {} -func (Argument) iExpr() {} +func (*Argument) iExpr() {} func (*NullVal) iExpr() {} func (BoolVal) iExpr() {} func (*ColName) iExpr() {} @@ -3043,6 +3085,11 @@ func (*Variance) iExpr() {} func (*Variable) iExpr() {} func (*PointExpr) iExpr() {} func (*LineStringExpr) iExpr() {} +func (*PolygonExpr) iExpr() {} +func (*MultiPolygonExpr) iExpr() {} +func (*MultiPointExpr) iExpr() {} +func (*MultiLinestringExpr) iExpr() {} +func (*GeomFromTextExpr) iExpr() {} // iCallable marks all expressions that represent function calls func (*FuncExpr) iCallable() {} @@ -3098,6 +3145,11 @@ func (*PerformanceSchemaFuncExpr) iCallable() {} func (*GTIDFuncExpr) iCallable() {} func (*PointExpr) iCallable() {} func (*LineStringExpr) iCallable() {} +func (*PolygonExpr) iCallable() {} +func (*MultiPolygonExpr) iCallable() {} +func (*MultiPointExpr) iCallable() {} +func (*MultiLinestringExpr) iCallable() {} +func (*GeomFromTextExpr) iCallable() {} func (*Sum) iCallable() {} func (*Min) iCallable() {} diff --git a/go/vt/sqlparser/ast_clone.go b/go/vt/sqlparser/ast_clone.go index 413396d5477..0e61c3fcd1c 100644 --- a/go/vt/sqlparser/ast_clone.go +++ b/go/vt/sqlparser/ast_clone.go @@ -55,8 +55,8 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfAlterVschema(in) case *AndExpr: return CloneRefOfAndExpr(in) - case Argument: - return in + case *Argument: + return CloneRefOfArgument(in) case *ArgumentLessWindowExpr: return CloneRefOfArgumentLessWindowExpr(in) case *AutoIncSpec: @@ -181,6 +181,8 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfFuncExpr(in) case *GTIDFuncExpr: return CloneRefOfGTIDFuncExpr(in) + case *GeomFromTextExpr: + return CloneRefOfGeomFromTextExpr(in) case GroupBy: return CloneGroupBy(in) case *GroupConcatExpr: @@ -295,6 +297,12 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfMin(in) case *ModifyColumn: return CloneRefOfModifyColumn(in) + case *MultiLinestringExpr: + return CloneRefOfMultiLinestringExpr(in) + case *MultiPointExpr: + return CloneRefOfMultiPointExpr(in) + case *MultiPolygonExpr: + return CloneRefOfMultiPolygonExpr(in) case *NTHValueExpr: return CloneRefOfNTHValueExpr(in) case *NamedWindow: @@ -353,8 +361,12 @@ func CloneSQLNode(in SQLNode) SQLNode { return CloneRefOfPerformanceSchemaFuncExpr(in) case *PointExpr: return CloneRefOfPointExpr(in) + case *PolygonExpr: + return CloneRefOfPolygonExpr(in) case *PrepareStmt: return CloneRefOfPrepareStmt(in) + case *PurgeBinaryLogs: + return CloneRefOfPurgeBinaryLogs(in) case ReferenceAction: return in case *ReferenceDefinition: @@ -691,6 +703,15 @@ func CloneRefOfAndExpr(n *AndExpr) *AndExpr { return &out } +// CloneRefOfArgument creates a deep clone of the input. +func CloneRefOfArgument(n *Argument) *Argument { + if n == nil { + return nil + } + out := *n + return &out +} + // CloneRefOfArgumentLessWindowExpr creates a deep clone of the input. func CloneRefOfArgumentLessWindowExpr(n *ArgumentLessWindowExpr) *ArgumentLessWindowExpr { if n == nil { @@ -1356,6 +1377,18 @@ func CloneRefOfGTIDFuncExpr(n *GTIDFuncExpr) *GTIDFuncExpr { return &out } +// CloneRefOfGeomFromTextExpr creates a deep clone of the input. +func CloneRefOfGeomFromTextExpr(n *GeomFromTextExpr) *GeomFromTextExpr { + if n == nil { + return nil + } + out := *n + out.WktText = CloneExpr(n.WktText) + out.Srid = CloneExpr(n.Srid) + out.AxisOrderOpt = CloneExpr(n.AxisOrderOpt) + return &out +} + // CloneGroupBy creates a deep clone of the input. func CloneGroupBy(n GroupBy) GroupBy { if n == nil { @@ -1951,6 +1984,36 @@ func CloneRefOfModifyColumn(n *ModifyColumn) *ModifyColumn { return &out } +// CloneRefOfMultiLinestringExpr creates a deep clone of the input. +func CloneRefOfMultiLinestringExpr(n *MultiLinestringExpr) *MultiLinestringExpr { + if n == nil { + return nil + } + out := *n + out.LinestringParams = CloneExprs(n.LinestringParams) + return &out +} + +// CloneRefOfMultiPointExpr creates a deep clone of the input. +func CloneRefOfMultiPointExpr(n *MultiPointExpr) *MultiPointExpr { + if n == nil { + return nil + } + out := *n + out.PointParams = CloneExprs(n.PointParams) + return &out +} + +// CloneRefOfMultiPolygonExpr creates a deep clone of the input. +func CloneRefOfMultiPolygonExpr(n *MultiPolygonExpr) *MultiPolygonExpr { + if n == nil { + return nil + } + out := *n + out.PolygonParams = CloneExprs(n.PolygonParams) + return &out +} + // CloneRefOfNTHValueExpr creates a deep clone of the input. func CloneRefOfNTHValueExpr(n *NTHValueExpr) *NTHValueExpr { if n == nil { @@ -2042,6 +2105,7 @@ func CloneRefOfOffset(n *Offset) *Offset { return nil } out := *n + out.Original = CloneExpr(n.Original) return &out } @@ -2265,6 +2329,16 @@ func CloneRefOfPointExpr(n *PointExpr) *PointExpr { return &out } +// CloneRefOfPolygonExpr creates a deep clone of the input. +func CloneRefOfPolygonExpr(n *PolygonExpr) *PolygonExpr { + if n == nil { + return nil + } + out := *n + out.LinestringParams = CloneExprs(n.LinestringParams) + return &out +} + // CloneRefOfPrepareStmt creates a deep clone of the input. func CloneRefOfPrepareStmt(n *PrepareStmt) *PrepareStmt { if n == nil { @@ -2277,6 +2351,15 @@ func CloneRefOfPrepareStmt(n *PrepareStmt) *PrepareStmt { return &out } +// CloneRefOfPurgeBinaryLogs creates a deep clone of the input. +func CloneRefOfPurgeBinaryLogs(n *PurgeBinaryLogs) *PurgeBinaryLogs { + if n == nil { + return nil + } + out := *n + return &out +} + // CloneRefOfReferenceDefinition creates a deep clone of the input. func CloneRefOfReferenceDefinition(n *ReferenceDefinition) *ReferenceDefinition { if n == nil { @@ -3280,6 +3363,8 @@ func CloneCallable(in Callable) Callable { return CloneRefOfFuncExpr(in) case *GTIDFuncExpr: return CloneRefOfGTIDFuncExpr(in) + case *GeomFromTextExpr: + return CloneRefOfGeomFromTextExpr(in) case *GroupConcatExpr: return CloneRefOfGroupConcatExpr(in) case *InsertExpr: @@ -3340,6 +3425,12 @@ func CloneCallable(in Callable) Callable { return CloneRefOfMemberOfExpr(in) case *Min: return CloneRefOfMin(in) + case *MultiLinestringExpr: + return CloneRefOfMultiLinestringExpr(in) + case *MultiPointExpr: + return CloneRefOfMultiPointExpr(in) + case *MultiPolygonExpr: + return CloneRefOfMultiPolygonExpr(in) case *NTHValueExpr: return CloneRefOfNTHValueExpr(in) case *NamedWindow: @@ -3350,6 +3441,8 @@ func CloneCallable(in Callable) Callable { return CloneRefOfPerformanceSchemaFuncExpr(in) case *PointExpr: return CloneRefOfPointExpr(in) + case *PolygonExpr: + return CloneRefOfPolygonExpr(in) case *RegexpInstrExpr: return CloneRefOfRegexpInstrExpr(in) case *RegexpLikeExpr: @@ -3482,8 +3575,8 @@ func CloneExpr(in Expr) Expr { switch in := in.(type) { case *AndExpr: return CloneRefOfAndExpr(in) - case Argument: - return in + case *Argument: + return CloneRefOfArgument(in) case *ArgumentLessWindowExpr: return CloneRefOfArgumentLessWindowExpr(in) case *Avg: @@ -3538,6 +3631,8 @@ func CloneExpr(in Expr) Expr { return CloneRefOfFuncExpr(in) case *GTIDFuncExpr: return CloneRefOfGTIDFuncExpr(in) + case *GeomFromTextExpr: + return CloneRefOfGeomFromTextExpr(in) case *GroupConcatExpr: return CloneRefOfGroupConcatExpr(in) case *InsertExpr: @@ -3610,6 +3705,12 @@ func CloneExpr(in Expr) Expr { return CloneRefOfMemberOfExpr(in) case *Min: return CloneRefOfMin(in) + case *MultiLinestringExpr: + return CloneRefOfMultiLinestringExpr(in) + case *MultiPointExpr: + return CloneRefOfMultiPointExpr(in) + case *MultiPolygonExpr: + return CloneRefOfMultiPolygonExpr(in) case *NTHValueExpr: return CloneRefOfNTHValueExpr(in) case *NamedWindow: @@ -3628,6 +3729,8 @@ func CloneExpr(in Expr) Expr { return CloneRefOfPerformanceSchemaFuncExpr(in) case *PointExpr: return CloneRefOfPointExpr(in) + case *PolygonExpr: + return CloneRefOfPolygonExpr(in) case *RegexpInstrExpr: return CloneRefOfRegexpInstrExpr(in) case *RegexpLikeExpr: @@ -3826,6 +3929,8 @@ func CloneStatement(in Statement) Statement { return CloneRefOfOtherRead(in) case *PrepareStmt: return CloneRefOfPrepareStmt(in) + case *PurgeBinaryLogs: + return CloneRefOfPurgeBinaryLogs(in) case *Release: return CloneRefOfRelease(in) case *RenameTable: diff --git a/go/vt/sqlparser/ast_copy_on_rewrite.go b/go/vt/sqlparser/ast_copy_on_rewrite.go index d2e4d09adb8..6fcf7b14dd2 100644 --- a/go/vt/sqlparser/ast_copy_on_rewrite.go +++ b/go/vt/sqlparser/ast_copy_on_rewrite.go @@ -54,8 +54,8 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfAlterVschema(n, parent) case *AndExpr: return c.copyOnRewriteRefOfAndExpr(n, parent) - case Argument: - return c.copyOnRewriteArgument(n, parent) + case *Argument: + return c.copyOnRewriteRefOfArgument(n, parent) case *ArgumentLessWindowExpr: return c.copyOnRewriteRefOfArgumentLessWindowExpr(n, parent) case *AutoIncSpec: @@ -180,6 +180,8 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfFuncExpr(n, parent) case *GTIDFuncExpr: return c.copyOnRewriteRefOfGTIDFuncExpr(n, parent) + case *GeomFromTextExpr: + return c.copyOnRewriteRefOfGeomFromTextExpr(n, parent) case GroupBy: return c.copyOnRewriteGroupBy(n, parent) case *GroupConcatExpr: @@ -294,6 +296,12 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfMin(n, parent) case *ModifyColumn: return c.copyOnRewriteRefOfModifyColumn(n, parent) + case *MultiLinestringExpr: + return c.copyOnRewriteRefOfMultiLinestringExpr(n, parent) + case *MultiPointExpr: + return c.copyOnRewriteRefOfMultiPointExpr(n, parent) + case *MultiPolygonExpr: + return c.copyOnRewriteRefOfMultiPolygonExpr(n, parent) case *NTHValueExpr: return c.copyOnRewriteRefOfNTHValueExpr(n, parent) case *NamedWindow: @@ -352,8 +360,12 @@ func (c *cow) copyOnRewriteSQLNode(n SQLNode, parent SQLNode) (out SQLNode, chan return c.copyOnRewriteRefOfPerformanceSchemaFuncExpr(n, parent) case *PointExpr: return c.copyOnRewriteRefOfPointExpr(n, parent) + case *PolygonExpr: + return c.copyOnRewriteRefOfPolygonExpr(n, parent) case *PrepareStmt: return c.copyOnRewriteRefOfPrepareStmt(n, parent) + case *PurgeBinaryLogs: + return c.copyOnRewriteRefOfPurgeBinaryLogs(n, parent) case ReferenceAction: return c.copyOnRewriteReferenceAction(n, parent) case *ReferenceDefinition: @@ -901,6 +913,18 @@ func (c *cow) copyOnRewriteRefOfAndExpr(n *AndExpr, parent SQLNode) (out SQLNode } return } +func (c *cow) copyOnRewriteRefOfArgument(n *Argument, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} func (c *cow) copyOnRewriteRefOfArgumentLessWindowExpr(n *ArgumentLessWindowExpr, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false @@ -2295,6 +2319,32 @@ func (c *cow) copyOnRewriteRefOfGTIDFuncExpr(n *GTIDFuncExpr, parent SQLNode) (o } return } +func (c *cow) copyOnRewriteRefOfGeomFromTextExpr(n *GeomFromTextExpr, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + _WktText, changedWktText := c.copyOnRewriteExpr(n.WktText, n) + _Srid, changedSrid := c.copyOnRewriteExpr(n.Srid, n) + _AxisOrderOpt, changedAxisOrderOpt := c.copyOnRewriteExpr(n.AxisOrderOpt, n) + if changedWktText || changedSrid || changedAxisOrderOpt { + res := *n + res.WktText, _ = _WktText.(Expr) + res.Srid, _ = _Srid.(Expr) + res.AxisOrderOpt, _ = _AxisOrderOpt.(Expr) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} func (c *cow) copyOnRewriteGroupBy(n GroupBy, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false @@ -3595,6 +3645,72 @@ func (c *cow) copyOnRewriteRefOfModifyColumn(n *ModifyColumn, parent SQLNode) (o } return } +func (c *cow) copyOnRewriteRefOfMultiLinestringExpr(n *MultiLinestringExpr, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + _LinestringParams, changedLinestringParams := c.copyOnRewriteExprs(n.LinestringParams, n) + if changedLinestringParams { + res := *n + res.LinestringParams, _ = _LinestringParams.(Exprs) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} +func (c *cow) copyOnRewriteRefOfMultiPointExpr(n *MultiPointExpr, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + _PointParams, changedPointParams := c.copyOnRewriteExprs(n.PointParams, n) + if changedPointParams { + res := *n + res.PointParams, _ = _PointParams.(Exprs) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} +func (c *cow) copyOnRewriteRefOfMultiPolygonExpr(n *MultiPolygonExpr, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + _PolygonParams, changedPolygonParams := c.copyOnRewriteExprs(n.PolygonParams, n) + if changedPolygonParams { + res := *n + res.PolygonParams, _ = _PolygonParams.(Exprs) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} func (c *cow) copyOnRewriteRefOfNTHValueExpr(n *NTHValueExpr, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false @@ -3768,6 +3884,16 @@ func (c *cow) copyOnRewriteRefOfOffset(n *Offset, parent SQLNode) (out SQLNode, } out = n if c.pre == nil || c.pre(n, parent) { + _Original, changedOriginal := c.copyOnRewriteExpr(n.Original, n) + if changedOriginal { + res := *n + res.Original, _ = _Original.(Expr) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } } if c.post != nil { out, changed = c.postVisit(out, parent, changed) @@ -4223,6 +4349,28 @@ func (c *cow) copyOnRewriteRefOfPointExpr(n *PointExpr, parent SQLNode) (out SQL } return } +func (c *cow) copyOnRewriteRefOfPolygonExpr(n *PolygonExpr, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + _LinestringParams, changedLinestringParams := c.copyOnRewriteExprs(n.LinestringParams, n) + if changedLinestringParams { + res := *n + res.LinestringParams, _ = _LinestringParams.(Exprs) + out = &res + if c.cloned != nil { + c.cloned(n, out) + } + changed = true + } + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} func (c *cow) copyOnRewriteRefOfPrepareStmt(n *PrepareStmt, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false @@ -4249,6 +4397,18 @@ func (c *cow) copyOnRewriteRefOfPrepareStmt(n *PrepareStmt, parent SQLNode) (out } return } +func (c *cow) copyOnRewriteRefOfPurgeBinaryLogs(n *PurgeBinaryLogs, parent SQLNode) (out SQLNode, changed bool) { + if n == nil || c.cursor.stop { + return n, false + } + out = n + if c.pre == nil || c.pre(n, parent) { + } + if c.post != nil { + out, changed = c.postVisit(out, parent, changed) + } + return +} func (c *cow) copyOnRewriteRefOfReferenceDefinition(n *ReferenceDefinition, parent SQLNode) (out SQLNode, changed bool) { if n == nil || c.cursor.stop { return n, false @@ -6225,6 +6385,8 @@ func (c *cow) copyOnRewriteCallable(n Callable, parent SQLNode) (out SQLNode, ch return c.copyOnRewriteRefOfFuncExpr(n, parent) case *GTIDFuncExpr: return c.copyOnRewriteRefOfGTIDFuncExpr(n, parent) + case *GeomFromTextExpr: + return c.copyOnRewriteRefOfGeomFromTextExpr(n, parent) case *GroupConcatExpr: return c.copyOnRewriteRefOfGroupConcatExpr(n, parent) case *InsertExpr: @@ -6285,6 +6447,12 @@ func (c *cow) copyOnRewriteCallable(n Callable, parent SQLNode) (out SQLNode, ch return c.copyOnRewriteRefOfMemberOfExpr(n, parent) case *Min: return c.copyOnRewriteRefOfMin(n, parent) + case *MultiLinestringExpr: + return c.copyOnRewriteRefOfMultiLinestringExpr(n, parent) + case *MultiPointExpr: + return c.copyOnRewriteRefOfMultiPointExpr(n, parent) + case *MultiPolygonExpr: + return c.copyOnRewriteRefOfMultiPolygonExpr(n, parent) case *NTHValueExpr: return c.copyOnRewriteRefOfNTHValueExpr(n, parent) case *NamedWindow: @@ -6295,6 +6463,8 @@ func (c *cow) copyOnRewriteCallable(n Callable, parent SQLNode) (out SQLNode, ch return c.copyOnRewriteRefOfPerformanceSchemaFuncExpr(n, parent) case *PointExpr: return c.copyOnRewriteRefOfPointExpr(n, parent) + case *PolygonExpr: + return c.copyOnRewriteRefOfPolygonExpr(n, parent) case *RegexpInstrExpr: return c.copyOnRewriteRefOfRegexpInstrExpr(n, parent) case *RegexpLikeExpr: @@ -6415,8 +6585,8 @@ func (c *cow) copyOnRewriteExpr(n Expr, parent SQLNode) (out SQLNode, changed bo switch n := n.(type) { case *AndExpr: return c.copyOnRewriteRefOfAndExpr(n, parent) - case Argument: - return c.copyOnRewriteArgument(n, parent) + case *Argument: + return c.copyOnRewriteRefOfArgument(n, parent) case *ArgumentLessWindowExpr: return c.copyOnRewriteRefOfArgumentLessWindowExpr(n, parent) case *Avg: @@ -6471,6 +6641,8 @@ func (c *cow) copyOnRewriteExpr(n Expr, parent SQLNode) (out SQLNode, changed bo return c.copyOnRewriteRefOfFuncExpr(n, parent) case *GTIDFuncExpr: return c.copyOnRewriteRefOfGTIDFuncExpr(n, parent) + case *GeomFromTextExpr: + return c.copyOnRewriteRefOfGeomFromTextExpr(n, parent) case *GroupConcatExpr: return c.copyOnRewriteRefOfGroupConcatExpr(n, parent) case *InsertExpr: @@ -6543,6 +6715,12 @@ func (c *cow) copyOnRewriteExpr(n Expr, parent SQLNode) (out SQLNode, changed bo return c.copyOnRewriteRefOfMemberOfExpr(n, parent) case *Min: return c.copyOnRewriteRefOfMin(n, parent) + case *MultiLinestringExpr: + return c.copyOnRewriteRefOfMultiLinestringExpr(n, parent) + case *MultiPointExpr: + return c.copyOnRewriteRefOfMultiPointExpr(n, parent) + case *MultiPolygonExpr: + return c.copyOnRewriteRefOfMultiPolygonExpr(n, parent) case *NTHValueExpr: return c.copyOnRewriteRefOfNTHValueExpr(n, parent) case *NamedWindow: @@ -6561,6 +6739,8 @@ func (c *cow) copyOnRewriteExpr(n Expr, parent SQLNode) (out SQLNode, changed bo return c.copyOnRewriteRefOfPerformanceSchemaFuncExpr(n, parent) case *PointExpr: return c.copyOnRewriteRefOfPointExpr(n, parent) + case *PolygonExpr: + return c.copyOnRewriteRefOfPolygonExpr(n, parent) case *RegexpInstrExpr: return c.copyOnRewriteRefOfRegexpInstrExpr(n, parent) case *RegexpLikeExpr: @@ -6747,6 +6927,8 @@ func (c *cow) copyOnRewriteStatement(n Statement, parent SQLNode) (out SQLNode, return c.copyOnRewriteRefOfOtherRead(n, parent) case *PrepareStmt: return c.copyOnRewriteRefOfPrepareStmt(n, parent) + case *PurgeBinaryLogs: + return c.copyOnRewriteRefOfPurgeBinaryLogs(n, parent) case *Release: return c.copyOnRewriteRefOfRelease(n, parent) case *RenameTable: @@ -6824,20 +7006,6 @@ func (c *cow) copyOnRewriteAlgorithmValue(n AlgorithmValue, parent SQLNode) (out } return } -func (c *cow) copyOnRewriteArgument(n Argument, parent SQLNode) (out SQLNode, changed bool) { - if c.cursor.stop { - return n, false - } - if c.pre != nil { - c.pre(n, parent) - } - if c.post != nil { - out, changed = c.postVisit(n, parent, changed) - } else { - out = n - } - return -} func (c *cow) copyOnRewriteBoolVal(n BoolVal, parent SQLNode) (out SQLNode, changed bool) { if c.cursor.stop { return n, false diff --git a/go/vt/sqlparser/ast_equals.go b/go/vt/sqlparser/ast_equals.go index c4f09afafaf..b5e8fa2705c 100644 --- a/go/vt/sqlparser/ast_equals.go +++ b/go/vt/sqlparser/ast_equals.go @@ -122,12 +122,12 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfAndExpr(a, b) - case Argument: - b, ok := inB.(Argument) + case *Argument: + b, ok := inB.(*Argument) if !ok { return false } - return a == b + return cmp.RefOfArgument(a, b) case *ArgumentLessWindowExpr: b, ok := inB.(*ArgumentLessWindowExpr) if !ok { @@ -500,6 +500,12 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfGTIDFuncExpr(a, b) + case *GeomFromTextExpr: + b, ok := inB.(*GeomFromTextExpr) + if !ok { + return false + } + return cmp.RefOfGeomFromTextExpr(a, b) case GroupBy: b, ok := inB.(GroupBy) if !ok { @@ -842,6 +848,24 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfModifyColumn(a, b) + case *MultiLinestringExpr: + b, ok := inB.(*MultiLinestringExpr) + if !ok { + return false + } + return cmp.RefOfMultiLinestringExpr(a, b) + case *MultiPointExpr: + b, ok := inB.(*MultiPointExpr) + if !ok { + return false + } + return cmp.RefOfMultiPointExpr(a, b) + case *MultiPolygonExpr: + b, ok := inB.(*MultiPolygonExpr) + if !ok { + return false + } + return cmp.RefOfMultiPolygonExpr(a, b) case *NTHValueExpr: b, ok := inB.(*NTHValueExpr) if !ok { @@ -1016,12 +1040,24 @@ func (cmp *Comparator) SQLNode(inA, inB SQLNode) bool { return false } return cmp.RefOfPointExpr(a, b) + case *PolygonExpr: + b, ok := inB.(*PolygonExpr) + if !ok { + return false + } + return cmp.RefOfPolygonExpr(a, b) case *PrepareStmt: b, ok := inB.(*PrepareStmt) if !ok { return false } return cmp.RefOfPrepareStmt(a, b) + case *PurgeBinaryLogs: + b, ok := inB.(*PurgeBinaryLogs) + if !ok { + return false + } + return cmp.RefOfPurgeBinaryLogs(a, b) case ReferenceAction: b, ok := inB.(ReferenceAction) if !ok { @@ -1710,6 +1746,18 @@ func (cmp *Comparator) RefOfAndExpr(a, b *AndExpr) bool { cmp.Expr(a.Right, b.Right) } +// RefOfArgument does deep equals between the two objects. +func (cmp *Comparator) RefOfArgument(a, b *Argument) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return a.Name == b.Name && + a.Type == b.Type +} + // RefOfArgumentLessWindowExpr does deep equals between the two objects. func (cmp *Comparator) RefOfArgumentLessWindowExpr(a, b *ArgumentLessWindowExpr) bool { if a == b { @@ -2499,6 +2547,20 @@ func (cmp *Comparator) RefOfGTIDFuncExpr(a, b *GTIDFuncExpr) bool { cmp.Expr(a.Channel, b.Channel) } +// RefOfGeomFromTextExpr does deep equals between the two objects. +func (cmp *Comparator) RefOfGeomFromTextExpr(a, b *GeomFromTextExpr) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return a.Type == b.Type && + cmp.Expr(a.WktText, b.WktText) && + cmp.Expr(a.Srid, b.Srid) && + cmp.Expr(a.AxisOrderOpt, b.AxisOrderOpt) +} + // GroupBy does deep equals between the two objects. func (cmp *Comparator) GroupBy(a, b GroupBy) bool { if len(a) != len(b) { @@ -3178,6 +3240,39 @@ func (cmp *Comparator) RefOfModifyColumn(a, b *ModifyColumn) bool { cmp.RefOfColName(a.After, b.After) } +// RefOfMultiLinestringExpr does deep equals between the two objects. +func (cmp *Comparator) RefOfMultiLinestringExpr(a, b *MultiLinestringExpr) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return cmp.Exprs(a.LinestringParams, b.LinestringParams) +} + +// RefOfMultiPointExpr does deep equals between the two objects. +func (cmp *Comparator) RefOfMultiPointExpr(a, b *MultiPointExpr) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return cmp.Exprs(a.PointParams, b.PointParams) +} + +// RefOfMultiPolygonExpr does deep equals between the two objects. +func (cmp *Comparator) RefOfMultiPolygonExpr(a, b *MultiPolygonExpr) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return cmp.Exprs(a.PolygonParams, b.PolygonParams) +} + // RefOfNTHValueExpr does deep equals between the two objects. func (cmp *Comparator) RefOfNTHValueExpr(a, b *NTHValueExpr) bool { if a == b { @@ -3282,7 +3377,7 @@ func (cmp *Comparator) RefOfOffset(a, b *Offset) bool { return false } return a.V == b.V && - a.Original == b.Original + cmp.Expr(a.Original, b.Original) } // OnDup does deep equals between the two objects. @@ -3541,6 +3636,17 @@ func (cmp *Comparator) RefOfPointExpr(a, b *PointExpr) bool { cmp.Expr(a.YCordinate, b.YCordinate) } +// RefOfPolygonExpr does deep equals between the two objects. +func (cmp *Comparator) RefOfPolygonExpr(a, b *PolygonExpr) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return cmp.Exprs(a.LinestringParams, b.LinestringParams) +} + // RefOfPrepareStmt does deep equals between the two objects. func (cmp *Comparator) RefOfPrepareStmt(a, b *PrepareStmt) bool { if a == b { @@ -3554,6 +3660,18 @@ func (cmp *Comparator) RefOfPrepareStmt(a, b *PrepareStmt) bool { cmp.RefOfParsedComments(a.Comments, b.Comments) } +// RefOfPurgeBinaryLogs does deep equals between the two objects. +func (cmp *Comparator) RefOfPurgeBinaryLogs(a, b *PurgeBinaryLogs) bool { + if a == b { + return true + } + if a == nil || b == nil { + return false + } + return a.To == b.To && + a.Before == b.Before +} + // RefOfReferenceDefinition does deep equals between the two objects. func (cmp *Comparator) RefOfReferenceDefinition(a, b *ReferenceDefinition) bool { if a == b { @@ -4894,6 +5012,12 @@ func (cmp *Comparator) Callable(inA, inB Callable) bool { return false } return cmp.RefOfGTIDFuncExpr(a, b) + case *GeomFromTextExpr: + b, ok := inB.(*GeomFromTextExpr) + if !ok { + return false + } + return cmp.RefOfGeomFromTextExpr(a, b) case *GroupConcatExpr: b, ok := inB.(*GroupConcatExpr) if !ok { @@ -5074,6 +5198,24 @@ func (cmp *Comparator) Callable(inA, inB Callable) bool { return false } return cmp.RefOfMin(a, b) + case *MultiLinestringExpr: + b, ok := inB.(*MultiLinestringExpr) + if !ok { + return false + } + return cmp.RefOfMultiLinestringExpr(a, b) + case *MultiPointExpr: + b, ok := inB.(*MultiPointExpr) + if !ok { + return false + } + return cmp.RefOfMultiPointExpr(a, b) + case *MultiPolygonExpr: + b, ok := inB.(*MultiPolygonExpr) + if !ok { + return false + } + return cmp.RefOfMultiPolygonExpr(a, b) case *NTHValueExpr: b, ok := inB.(*NTHValueExpr) if !ok { @@ -5104,6 +5246,12 @@ func (cmp *Comparator) Callable(inA, inB Callable) bool { return false } return cmp.RefOfPointExpr(a, b) + case *PolygonExpr: + b, ok := inB.(*PolygonExpr) + if !ok { + return false + } + return cmp.RefOfPolygonExpr(a, b) case *RegexpInstrExpr: b, ok := inB.(*RegexpInstrExpr) if !ok { @@ -5374,12 +5522,12 @@ func (cmp *Comparator) Expr(inA, inB Expr) bool { return false } return cmp.RefOfAndExpr(a, b) - case Argument: - b, ok := inB.(Argument) + case *Argument: + b, ok := inB.(*Argument) if !ok { return false } - return a == b + return cmp.RefOfArgument(a, b) case *ArgumentLessWindowExpr: b, ok := inB.(*ArgumentLessWindowExpr) if !ok { @@ -5542,6 +5690,12 @@ func (cmp *Comparator) Expr(inA, inB Expr) bool { return false } return cmp.RefOfGTIDFuncExpr(a, b) + case *GeomFromTextExpr: + b, ok := inB.(*GeomFromTextExpr) + if !ok { + return false + } + return cmp.RefOfGeomFromTextExpr(a, b) case *GroupConcatExpr: b, ok := inB.(*GroupConcatExpr) if !ok { @@ -5758,6 +5912,24 @@ func (cmp *Comparator) Expr(inA, inB Expr) bool { return false } return cmp.RefOfMin(a, b) + case *MultiLinestringExpr: + b, ok := inB.(*MultiLinestringExpr) + if !ok { + return false + } + return cmp.RefOfMultiLinestringExpr(a, b) + case *MultiPointExpr: + b, ok := inB.(*MultiPointExpr) + if !ok { + return false + } + return cmp.RefOfMultiPointExpr(a, b) + case *MultiPolygonExpr: + b, ok := inB.(*MultiPolygonExpr) + if !ok { + return false + } + return cmp.RefOfMultiPolygonExpr(a, b) case *NTHValueExpr: b, ok := inB.(*NTHValueExpr) if !ok { @@ -5812,6 +5984,12 @@ func (cmp *Comparator) Expr(inA, inB Expr) bool { return false } return cmp.RefOfPointExpr(a, b) + case *PolygonExpr: + b, ok := inB.(*PolygonExpr) + if !ok { + return false + } + return cmp.RefOfPolygonExpr(a, b) case *RegexpInstrExpr: b, ok := inB.(*RegexpInstrExpr) if !ok { @@ -6280,6 +6458,12 @@ func (cmp *Comparator) Statement(inA, inB Statement) bool { return false } return cmp.RefOfPrepareStmt(a, b) + case *PurgeBinaryLogs: + b, ok := inB.(*PurgeBinaryLogs) + if !ok { + return false + } + return cmp.RefOfPurgeBinaryLogs(a, b) case *Release: b, ok := inB.(*Release) if !ok { diff --git a/go/vt/sqlparser/ast_format.go b/go/vt/sqlparser/ast_format.go index 898e4c45f91..61c4bd8c453 100644 --- a/go/vt/sqlparser/ast_format.go +++ b/go/vt/sqlparser/ast_format.go @@ -1311,8 +1311,14 @@ func (node *Literal) Format(buf *TrackedBuffer) { } // Format formats the node. -func (node Argument) Format(buf *TrackedBuffer) { - buf.WriteArg(":", string(node)) +func (node *Argument) Format(buf *TrackedBuffer) { + buf.WriteArg(":", node.Name) + if node.Type >= 0 { + // For bind variables that are statically typed, emit their type as an adjacent comment. + // This comment will be ignored by older versions of Vitess (and by MySQL) but will provide + // type safety when using the query as a cache key. + buf.astPrintf(node, " /* %s */", node.Type.String()) + } } // Format formats the node. @@ -2766,3 +2772,44 @@ func (node *PointExpr) Format(buf *TrackedBuffer) { func (node *LineStringExpr) Format(buf *TrackedBuffer) { buf.astPrintf(node, "linestring(%v)", node.PointParams) } + +// Format formats the node. +func (node *PolygonExpr) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "polygon(%v)", node.LinestringParams) +} + +// Format formats the node. +func (node *PurgeBinaryLogs) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "purge binary logs") + if node.To != "" { + buf.astPrintf(node, " to '%#s'", node.To) + } else { + buf.astPrintf(node, " before '%#s'", node.Before) + } +} + +func (node *MultiPolygonExpr) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "multipolygon(%v)", node.PolygonParams) +} + +// Format formats the node. +func (node *MultiPointExpr) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "multipoint(%v)", node.PointParams) +} + +// Format formats the node. +func (node *MultiLinestringExpr) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "multilinestring(%v)", node.LinestringParams) +} + +// Format formats the node +func (node *GeomFromTextExpr) Format(buf *TrackedBuffer) { + buf.astPrintf(node, "%s(%v", node.Type.ToString(), node.WktText) + if node.Srid != nil { + buf.astPrintf(node, ", %v", node.Srid) + } + if node.AxisOrderOpt != nil { + buf.astPrintf(node, ", %v", node.AxisOrderOpt) + } + buf.WriteByte(')') +} diff --git a/go/vt/sqlparser/ast_format_fast.go b/go/vt/sqlparser/ast_format_fast.go index 56f71e23a26..b4a95c82cf2 100644 --- a/go/vt/sqlparser/ast_format_fast.go +++ b/go/vt/sqlparser/ast_format_fast.go @@ -1720,8 +1720,16 @@ func (node *Literal) formatFast(buf *TrackedBuffer) { } // formatFast formats the node. -func (node Argument) formatFast(buf *TrackedBuffer) { - buf.WriteArg(":", string(node)) +func (node *Argument) formatFast(buf *TrackedBuffer) { + buf.WriteArg(":", node.Name) + if node.Type >= 0 { + // For bind variables that are statically typed, emit their type as an adjacent comment. + // This comment will be ignored by older versions of Vitess (and by MySQL) but will provide + // type safety when using the query as a cache key. + buf.WriteString(" /* ") + buf.WriteString(node.Type.String()) + buf.WriteString(" */") + } } // formatFast formats the node. @@ -3631,3 +3639,60 @@ func (node *LineStringExpr) formatFast(buf *TrackedBuffer) { node.PointParams.formatFast(buf) buf.WriteByte(')') } + +// formatFast formats the node. +func (node *PolygonExpr) formatFast(buf *TrackedBuffer) { + buf.WriteString("polygon(") + node.LinestringParams.formatFast(buf) + buf.WriteByte(')') +} + +// formatFast formats the node. +func (node *PurgeBinaryLogs) formatFast(buf *TrackedBuffer) { + buf.WriteString("purge binary logs") + if node.To != "" { + buf.WriteString(" to '") + buf.WriteString(node.To) + buf.WriteByte('\'') + } else { + buf.WriteString(" before '") + buf.WriteString(node.Before) + buf.WriteByte('\'') + } +} + +func (node *MultiPolygonExpr) formatFast(buf *TrackedBuffer) { + buf.WriteString("multipolygon(") + node.PolygonParams.formatFast(buf) + buf.WriteByte(')') +} + +// formatFast formats the node. +func (node *MultiPointExpr) formatFast(buf *TrackedBuffer) { + buf.WriteString("multipoint(") + node.PointParams.formatFast(buf) + buf.WriteByte(')') +} + +// formatFast formats the node. +func (node *MultiLinestringExpr) formatFast(buf *TrackedBuffer) { + buf.WriteString("multilinestring(") + node.LinestringParams.formatFast(buf) + buf.WriteByte(')') +} + +// formatFast formats the node +func (node *GeomFromTextExpr) formatFast(buf *TrackedBuffer) { + buf.WriteString(node.Type.ToString()) + buf.WriteByte('(') + buf.printExpr(node, node.WktText, true) + if node.Srid != nil { + buf.WriteString(", ") + buf.printExpr(node, node.Srid, true) + } + if node.AxisOrderOpt != nil { + buf.WriteString(", ") + buf.printExpr(node, node.AxisOrderOpt, true) + } + buf.WriteByte(')') +} diff --git a/go/vt/sqlparser/ast_funcs.go b/go/vt/sqlparser/ast_funcs.go index 7de4f695813..25f1c7b4241 100644 --- a/go/vt/sqlparser/ast_funcs.go +++ b/go/vt/sqlparser/ast_funcs.go @@ -21,6 +21,7 @@ import ( "encoding/hex" "encoding/json" "fmt" + "io" "regexp" "strconv" "strings" @@ -34,11 +35,6 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" ) -// Generate all the AST helpers using the tooling in `go/tools` - -//go:generate go run ../../tools/asthelpergen/main --in . --iface vitess.io/vitess/go/vt/sqlparser.SQLNode --clone_exclude "*ColName" --equals_custom "*ColName" -//go:generate go run ../../tools/astfmtgen vitess.io/vitess/go/vt/sqlparser/... - // Walk calls postVisit on every node. // If postVisit returns true, the underlying nodes // are also visited. If it returns an error, walking @@ -553,8 +549,17 @@ func NewTimestampLiteral(in string) *Literal { } // NewArgument builds a new ValArg. -func NewArgument(in string) Argument { - return Argument(in) +func NewArgument(in string) *Argument { + return &Argument{Name: in, Type: -1} +} + +func parseBindVariable(yylex yyLexer, bvar string) *Argument { + markBindVariable(yylex, bvar) + return NewArgument(bvar) +} + +func NewTypedArgument(in string, t sqltypes.Type) *Argument { + return &Argument{Name: in, Type: t} } // NewListArg builds a new ListArg. @@ -577,6 +582,33 @@ func (node *Literal) HexDecode() ([]byte, error) { return hex.DecodeString(node.Val) } +func (node *Literal) SQLType() sqltypes.Type { + switch node.Type { + case StrVal: + return sqltypes.VarChar + case IntVal: + return sqltypes.Int64 + case FloatVal: + return sqltypes.Float64 + case DecimalVal: + return sqltypes.Decimal + case HexNum: + return sqltypes.HexNum + case HexVal: + return sqltypes.HexVal + case BitVal: + return sqltypes.HexNum + case DateVal: + return sqltypes.Date + case TimeVal: + return sqltypes.Time + case TimestampVal: + return sqltypes.Datetime + default: + return -1 + } +} + // encodeHexOrBitValToMySQLQueryFormat encodes the hexval or bitval back into the query format // for passing on to MySQL as a bind var func (node *Literal) encodeHexOrBitValToMySQLQueryFormat() ([]byte, error) { @@ -770,7 +802,7 @@ func createIdentifierCI(str string) IdentifierCI { // NewOffset creates an offset and returns it func NewOffset(v int, original Expr) *Offset { - return &Offset{V: v, Original: String(original)} + return &Offset{V: v, Original: original} } // IsEmpty returns true if the name is empty. @@ -1015,10 +1047,8 @@ func (node *Select) AddHaving(expr Expr) { } return } - node.Having.Expr = &AndExpr{ - Left: node.Having.Expr, - Right: expr, - } + exprs := SplitAndExpression(nil, node.Having.Expr) + node.Having.Expr = AndExpressions(append(exprs, expr)...) } // AddGroupBy adds a grouping expression, unless it's already present @@ -2008,10 +2038,16 @@ func formatAddress(address string) string { func ContainsAggregation(e SQLNode) bool { hasAggregates := false _ = Walk(func(node SQLNode) (kontinue bool, err error) { - if _, isAggregate := node.(AggrFunc); isAggregate { - hasAggregates = true + switch node.(type) { + case *Offset: + // offsets here indicate that a possible aggregation has already been handled by an input + // so we don't need to worry about aggregation in the original return false, nil + case AggrFunc: + hasAggregates = true + return false, io.EOF } + return true, nil }, e) return hasAggregates @@ -2230,3 +2266,27 @@ func AndExpressions(exprs ...Expr) Expr { // Equals is the default Comparator for AST expressions. var Equals = &Comparator{} + +// ToString returns the type as a string +func (ty GeomFromWktType) ToString() string { + switch ty { + case GeometryFromText: + return GeometryFromTextStr + case GeometryCollectionFromText: + return GeometryCollectionFromTextStr + case PointFromText: + return PointFromTextStr + case PolygonFromText: + return PolygonFromTextStr + case LineStringFromText: + return LineStringFromTextStr + case MultiPointFromText: + return MultiPointFromTextStr + case MultiLinestringFromText: + return MultiLinestringFromTextStr + case MultiPolygonFromText: + return MultiPolygonFromTextStr + default: + return "Unknown GeomFromWktType" + } +} diff --git a/go/vt/sqlparser/ast_rewrite.go b/go/vt/sqlparser/ast_rewrite.go index f9916987fe9..d712746028e 100644 --- a/go/vt/sqlparser/ast_rewrite.go +++ b/go/vt/sqlparser/ast_rewrite.go @@ -54,8 +54,8 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfAlterVschema(parent, node, replacer) case *AndExpr: return a.rewriteRefOfAndExpr(parent, node, replacer) - case Argument: - return a.rewriteArgument(parent, node, replacer) + case *Argument: + return a.rewriteRefOfArgument(parent, node, replacer) case *ArgumentLessWindowExpr: return a.rewriteRefOfArgumentLessWindowExpr(parent, node, replacer) case *AutoIncSpec: @@ -180,6 +180,8 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfFuncExpr(parent, node, replacer) case *GTIDFuncExpr: return a.rewriteRefOfGTIDFuncExpr(parent, node, replacer) + case *GeomFromTextExpr: + return a.rewriteRefOfGeomFromTextExpr(parent, node, replacer) case GroupBy: return a.rewriteGroupBy(parent, node, replacer) case *GroupConcatExpr: @@ -294,6 +296,12 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfMin(parent, node, replacer) case *ModifyColumn: return a.rewriteRefOfModifyColumn(parent, node, replacer) + case *MultiLinestringExpr: + return a.rewriteRefOfMultiLinestringExpr(parent, node, replacer) + case *MultiPointExpr: + return a.rewriteRefOfMultiPointExpr(parent, node, replacer) + case *MultiPolygonExpr: + return a.rewriteRefOfMultiPolygonExpr(parent, node, replacer) case *NTHValueExpr: return a.rewriteRefOfNTHValueExpr(parent, node, replacer) case *NamedWindow: @@ -352,8 +360,12 @@ func (a *application) rewriteSQLNode(parent SQLNode, node SQLNode, replacer repl return a.rewriteRefOfPerformanceSchemaFuncExpr(parent, node, replacer) case *PointExpr: return a.rewriteRefOfPointExpr(parent, node, replacer) + case *PolygonExpr: + return a.rewriteRefOfPolygonExpr(parent, node, replacer) case *PrepareStmt: return a.rewriteRefOfPrepareStmt(parent, node, replacer) + case *PurgeBinaryLogs: + return a.rewriteRefOfPurgeBinaryLogs(parent, node, replacer) case ReferenceAction: return a.rewriteReferenceAction(parent, node, replacer) case *ReferenceDefinition: @@ -1028,6 +1040,30 @@ func (a *application) rewriteRefOfAndExpr(parent SQLNode, node *AndExpr, replace } return true } +func (a *application) rewriteRefOfArgument(parent SQLNode, node *Argument, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if a.post != nil { + if a.pre == nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + } + if !a.post(&a.cur) { + return false + } + } + return true +} func (a *application) rewriteRefOfArgumentLessWindowExpr(parent SQLNode, node *ArgumentLessWindowExpr, replacer replacerFunc) bool { if node == nil { return true @@ -2964,6 +3000,43 @@ func (a *application) rewriteRefOfGTIDFuncExpr(parent SQLNode, node *GTIDFuncExp } return true } +func (a *application) rewriteRefOfGeomFromTextExpr(parent SQLNode, node *GeomFromTextExpr, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if !a.rewriteExpr(node, node.WktText, func(newNode, parent SQLNode) { + parent.(*GeomFromTextExpr).WktText = newNode.(Expr) + }) { + return false + } + if !a.rewriteExpr(node, node.Srid, func(newNode, parent SQLNode) { + parent.(*GeomFromTextExpr).Srid = newNode.(Expr) + }) { + return false + } + if !a.rewriteExpr(node, node.AxisOrderOpt, func(newNode, parent SQLNode) { + parent.(*GeomFromTextExpr).AxisOrderOpt = newNode.(Expr) + }) { + return false + } + if a.post != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.post(&a.cur) { + return false + } + } + return true +} func (a *application) rewriteGroupBy(parent SQLNode, node GroupBy, replacer replacerFunc) bool { if node == nil { return true @@ -4730,6 +4803,87 @@ func (a *application) rewriteRefOfModifyColumn(parent SQLNode, node *ModifyColum } return true } +func (a *application) rewriteRefOfMultiLinestringExpr(parent SQLNode, node *MultiLinestringExpr, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if !a.rewriteExprs(node, node.LinestringParams, func(newNode, parent SQLNode) { + parent.(*MultiLinestringExpr).LinestringParams = newNode.(Exprs) + }) { + return false + } + if a.post != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.post(&a.cur) { + return false + } + } + return true +} +func (a *application) rewriteRefOfMultiPointExpr(parent SQLNode, node *MultiPointExpr, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if !a.rewriteExprs(node, node.PointParams, func(newNode, parent SQLNode) { + parent.(*MultiPointExpr).PointParams = newNode.(Exprs) + }) { + return false + } + if a.post != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.post(&a.cur) { + return false + } + } + return true +} +func (a *application) rewriteRefOfMultiPolygonExpr(parent SQLNode, node *MultiPolygonExpr, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if !a.rewriteExprs(node, node.PolygonParams, func(newNode, parent SQLNode) { + parent.(*MultiPolygonExpr).PolygonParams = newNode.(Exprs) + }) { + return false + } + if a.post != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.post(&a.cur) { + return false + } + } + return true +} func (a *application) rewriteRefOfNTHValueExpr(parent SQLNode, node *NTHValueExpr, replacer replacerFunc) bool { if node == nil { return true @@ -4987,12 +5141,15 @@ func (a *application) rewriteRefOfOffset(parent SQLNode, node *Offset, replacer return true } } + if !a.rewriteExpr(node, node.Original, func(newNode, parent SQLNode) { + parent.(*Offset).Original = newNode.(Expr) + }) { + return false + } if a.post != nil { - if a.pre == nil { - a.cur.replacer = replacer - a.cur.parent = parent - a.cur.node = node - } + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node if !a.post(&a.cur) { return false } @@ -5640,6 +5797,33 @@ func (a *application) rewriteRefOfPointExpr(parent SQLNode, node *PointExpr, rep } return true } +func (a *application) rewriteRefOfPolygonExpr(parent SQLNode, node *PolygonExpr, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if !a.rewriteExprs(node, node.LinestringParams, func(newNode, parent SQLNode) { + parent.(*PolygonExpr).LinestringParams = newNode.(Exprs) + }) { + return false + } + if a.post != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.post(&a.cur) { + return false + } + } + return true +} func (a *application) rewriteRefOfPrepareStmt(parent SQLNode, node *PrepareStmt, replacer replacerFunc) bool { if node == nil { return true @@ -5677,6 +5861,30 @@ func (a *application) rewriteRefOfPrepareStmt(parent SQLNode, node *PrepareStmt, } return true } +func (a *application) rewriteRefOfPurgeBinaryLogs(parent SQLNode, node *PurgeBinaryLogs, replacer replacerFunc) bool { + if node == nil { + return true + } + if a.pre != nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + if !a.pre(&a.cur) { + return true + } + } + if a.post != nil { + if a.pre == nil { + a.cur.replacer = replacer + a.cur.parent = parent + a.cur.node = node + } + if !a.post(&a.cur) { + return false + } + } + return true +} func (a *application) rewriteRefOfReferenceDefinition(parent SQLNode, node *ReferenceDefinition, replacer replacerFunc) bool { if node == nil { return true @@ -8420,6 +8628,8 @@ func (a *application) rewriteCallable(parent SQLNode, node Callable, replacer re return a.rewriteRefOfFuncExpr(parent, node, replacer) case *GTIDFuncExpr: return a.rewriteRefOfGTIDFuncExpr(parent, node, replacer) + case *GeomFromTextExpr: + return a.rewriteRefOfGeomFromTextExpr(parent, node, replacer) case *GroupConcatExpr: return a.rewriteRefOfGroupConcatExpr(parent, node, replacer) case *InsertExpr: @@ -8480,6 +8690,12 @@ func (a *application) rewriteCallable(parent SQLNode, node Callable, replacer re return a.rewriteRefOfMemberOfExpr(parent, node, replacer) case *Min: return a.rewriteRefOfMin(parent, node, replacer) + case *MultiLinestringExpr: + return a.rewriteRefOfMultiLinestringExpr(parent, node, replacer) + case *MultiPointExpr: + return a.rewriteRefOfMultiPointExpr(parent, node, replacer) + case *MultiPolygonExpr: + return a.rewriteRefOfMultiPolygonExpr(parent, node, replacer) case *NTHValueExpr: return a.rewriteRefOfNTHValueExpr(parent, node, replacer) case *NamedWindow: @@ -8490,6 +8706,8 @@ func (a *application) rewriteCallable(parent SQLNode, node Callable, replacer re return a.rewriteRefOfPerformanceSchemaFuncExpr(parent, node, replacer) case *PointExpr: return a.rewriteRefOfPointExpr(parent, node, replacer) + case *PolygonExpr: + return a.rewriteRefOfPolygonExpr(parent, node, replacer) case *RegexpInstrExpr: return a.rewriteRefOfRegexpInstrExpr(parent, node, replacer) case *RegexpLikeExpr: @@ -8610,8 +8828,8 @@ func (a *application) rewriteExpr(parent SQLNode, node Expr, replacer replacerFu switch node := node.(type) { case *AndExpr: return a.rewriteRefOfAndExpr(parent, node, replacer) - case Argument: - return a.rewriteArgument(parent, node, replacer) + case *Argument: + return a.rewriteRefOfArgument(parent, node, replacer) case *ArgumentLessWindowExpr: return a.rewriteRefOfArgumentLessWindowExpr(parent, node, replacer) case *Avg: @@ -8666,6 +8884,8 @@ func (a *application) rewriteExpr(parent SQLNode, node Expr, replacer replacerFu return a.rewriteRefOfFuncExpr(parent, node, replacer) case *GTIDFuncExpr: return a.rewriteRefOfGTIDFuncExpr(parent, node, replacer) + case *GeomFromTextExpr: + return a.rewriteRefOfGeomFromTextExpr(parent, node, replacer) case *GroupConcatExpr: return a.rewriteRefOfGroupConcatExpr(parent, node, replacer) case *InsertExpr: @@ -8738,6 +8958,12 @@ func (a *application) rewriteExpr(parent SQLNode, node Expr, replacer replacerFu return a.rewriteRefOfMemberOfExpr(parent, node, replacer) case *Min: return a.rewriteRefOfMin(parent, node, replacer) + case *MultiLinestringExpr: + return a.rewriteRefOfMultiLinestringExpr(parent, node, replacer) + case *MultiPointExpr: + return a.rewriteRefOfMultiPointExpr(parent, node, replacer) + case *MultiPolygonExpr: + return a.rewriteRefOfMultiPolygonExpr(parent, node, replacer) case *NTHValueExpr: return a.rewriteRefOfNTHValueExpr(parent, node, replacer) case *NamedWindow: @@ -8756,6 +8982,8 @@ func (a *application) rewriteExpr(parent SQLNode, node Expr, replacer replacerFu return a.rewriteRefOfPerformanceSchemaFuncExpr(parent, node, replacer) case *PointExpr: return a.rewriteRefOfPointExpr(parent, node, replacer) + case *PolygonExpr: + return a.rewriteRefOfPolygonExpr(parent, node, replacer) case *RegexpInstrExpr: return a.rewriteRefOfRegexpInstrExpr(parent, node, replacer) case *RegexpLikeExpr: @@ -8942,6 +9170,8 @@ func (a *application) rewriteStatement(parent SQLNode, node Statement, replacer return a.rewriteRefOfOtherRead(parent, node, replacer) case *PrepareStmt: return a.rewriteRefOfPrepareStmt(parent, node, replacer) + case *PurgeBinaryLogs: + return a.rewriteRefOfPurgeBinaryLogs(parent, node, replacer) case *Release: return a.rewriteRefOfRelease(parent, node, replacer) case *RenameTable: @@ -9026,27 +9256,6 @@ func (a *application) rewriteAlgorithmValue(parent SQLNode, node AlgorithmValue, } return true } -func (a *application) rewriteArgument(parent SQLNode, node Argument, replacer replacerFunc) bool { - if a.pre != nil { - a.cur.replacer = replacer - a.cur.parent = parent - a.cur.node = node - if !a.pre(&a.cur) { - return true - } - } - if a.post != nil { - if a.pre == nil { - a.cur.replacer = replacer - a.cur.parent = parent - a.cur.node = node - } - if !a.post(&a.cur) { - return false - } - } - return true -} func (a *application) rewriteBoolVal(parent SQLNode, node BoolVal, replacer replacerFunc) bool { if a.pre != nil { a.cur.replacer = replacer diff --git a/go/vt/sqlparser/ast_rewriting.go b/go/vt/sqlparser/ast_rewriting.go index 646968d7a3f..ecee4c47836 100644 --- a/go/vt/sqlparser/ast_rewriting.go +++ b/go/vt/sqlparser/ast_rewriting.go @@ -87,8 +87,9 @@ func (r *ReservedVars) ReserveColName(col *ColName) string { for { if _, ok := r.reserved[string(joinVar)]; !ok { - r.reserved[string(joinVar)] = struct{}{} - return string(joinVar) + bvar := string(joinVar) + r.reserved[bvar] = struct{}{} + return bvar } joinVar = strconv.AppendInt(joinVar[:baseLen], i, 10) i++ @@ -129,8 +130,9 @@ func (r *ReservedVars) ReserveHasValuesSubQuery() string { r.sqNext++ joinVar := strconv.AppendInt(HasValueSubQueryBaseName, r.sqNext, 10) if _, ok := r.reserved[string(joinVar)]; !ok { - r.reserved[string(joinVar)] = struct{}{} - return string(joinVar) + bvar := string(joinVar) + r.reserved[bvar] = struct{}{} + return bvar } } } @@ -175,7 +177,6 @@ func (r *ReservedVars) nextUnusedVar() string { for { r.counter++ r.next = strconv.AppendInt(r.next[:len(r.prefix)], int64(r.counter), 10) - if _, ok := r.reserved[string(r.next)]; !ok { bvar := string(r.next) r.reserved[bvar] = struct{}{} diff --git a/go/vt/sqlparser/ast_test.go b/go/vt/sqlparser/ast_test.go index 71c56594875..3c518ee7886 100644 --- a/go/vt/sqlparser/ast_test.go +++ b/go/vt/sqlparser/ast_test.go @@ -57,32 +57,22 @@ func TestSelect(t *testing.T) { sel.AddWhere(expr) buf := NewTrackedBuffer(nil) sel.Where.Format(buf) - want := " where a = 1" - if buf.String() != want { - t.Errorf("where: %q, want %s", buf.String(), want) - } + assert.Equal(t, " where a = 1", buf.String()) sel.AddWhere(expr) buf = NewTrackedBuffer(nil) sel.Where.Format(buf) - want = " where a = 1" - if buf.String() != want { - t.Errorf("where: %q, want %s", buf.String(), want) - } + assert.Equal(t, " where a = 1", buf.String()) + sel = &Select{} sel.AddHaving(expr) buf = NewTrackedBuffer(nil) sel.Having.Format(buf) - want = " having a = 1" - if buf.String() != want { - t.Errorf("having: %q, want %s", buf.String(), want) - } + assert.Equal(t, " having a = 1", buf.String()) + sel.AddHaving(expr) buf = NewTrackedBuffer(nil) sel.Having.Format(buf) - want = " having a = 1 and a = 1" - if buf.String() != want { - t.Errorf("having: %q, want %s", buf.String(), want) - } + assert.Equal(t, " having a = 1", buf.String()) tree, err = Parse("select * from t where a = 1 or b = 1") require.NoError(t, err) @@ -91,18 +81,14 @@ func TestSelect(t *testing.T) { sel.AddWhere(expr) buf = NewTrackedBuffer(nil) sel.Where.Format(buf) - want = " where a = 1 or b = 1" - if buf.String() != want { - t.Errorf("where: %q, want %s", buf.String(), want) - } + assert.Equal(t, " where a = 1 or b = 1", buf.String()) + sel = &Select{} sel.AddHaving(expr) buf = NewTrackedBuffer(nil) sel.Having.Format(buf) - want = " having a = 1 or b = 1" - if buf.String() != want { - t.Errorf("having: %q, want %s", buf.String(), want) - } + assert.Equal(t, " having a = 1 or b = 1", buf.String()) + } func TestUpdate(t *testing.T) { diff --git a/go/vt/sqlparser/ast_visit.go b/go/vt/sqlparser/ast_visit.go index e3b04377d49..a26532151d8 100644 --- a/go/vt/sqlparser/ast_visit.go +++ b/go/vt/sqlparser/ast_visit.go @@ -54,8 +54,8 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfAlterVschema(in, f) case *AndExpr: return VisitRefOfAndExpr(in, f) - case Argument: - return VisitArgument(in, f) + case *Argument: + return VisitRefOfArgument(in, f) case *ArgumentLessWindowExpr: return VisitRefOfArgumentLessWindowExpr(in, f) case *AutoIncSpec: @@ -180,6 +180,8 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfFuncExpr(in, f) case *GTIDFuncExpr: return VisitRefOfGTIDFuncExpr(in, f) + case *GeomFromTextExpr: + return VisitRefOfGeomFromTextExpr(in, f) case GroupBy: return VisitGroupBy(in, f) case *GroupConcatExpr: @@ -294,6 +296,12 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfMin(in, f) case *ModifyColumn: return VisitRefOfModifyColumn(in, f) + case *MultiLinestringExpr: + return VisitRefOfMultiLinestringExpr(in, f) + case *MultiPointExpr: + return VisitRefOfMultiPointExpr(in, f) + case *MultiPolygonExpr: + return VisitRefOfMultiPolygonExpr(in, f) case *NTHValueExpr: return VisitRefOfNTHValueExpr(in, f) case *NamedWindow: @@ -352,8 +360,12 @@ func VisitSQLNode(in SQLNode, f Visit) error { return VisitRefOfPerformanceSchemaFuncExpr(in, f) case *PointExpr: return VisitRefOfPointExpr(in, f) + case *PolygonExpr: + return VisitRefOfPolygonExpr(in, f) case *PrepareStmt: return VisitRefOfPrepareStmt(in, f) + case *PurgeBinaryLogs: + return VisitRefOfPurgeBinaryLogs(in, f) case ReferenceAction: return VisitReferenceAction(in, f) case *ReferenceDefinition: @@ -759,6 +771,15 @@ func VisitRefOfAndExpr(in *AndExpr, f Visit) error { } return nil } +func VisitRefOfArgument(in *Argument, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + return nil +} func VisitRefOfArgumentLessWindowExpr(in *ArgumentLessWindowExpr, f Visit) error { if in == nil { return nil @@ -1646,6 +1667,24 @@ func VisitRefOfGTIDFuncExpr(in *GTIDFuncExpr, f Visit) error { } return nil } +func VisitRefOfGeomFromTextExpr(in *GeomFromTextExpr, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + if err := VisitExpr(in.WktText, f); err != nil { + return err + } + if err := VisitExpr(in.Srid, f); err != nil { + return err + } + if err := VisitExpr(in.AxisOrderOpt, f); err != nil { + return err + } + return nil +} func VisitGroupBy(in GroupBy, f Visit) error { if in == nil { return nil @@ -2451,6 +2490,42 @@ func VisitRefOfModifyColumn(in *ModifyColumn, f Visit) error { } return nil } +func VisitRefOfMultiLinestringExpr(in *MultiLinestringExpr, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + if err := VisitExprs(in.LinestringParams, f); err != nil { + return err + } + return nil +} +func VisitRefOfMultiPointExpr(in *MultiPointExpr, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + if err := VisitExprs(in.PointParams, f); err != nil { + return err + } + return nil +} +func VisitRefOfMultiPolygonExpr(in *MultiPolygonExpr, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + if err := VisitExprs(in.PolygonParams, f); err != nil { + return err + } + return nil +} func VisitRefOfNTHValueExpr(in *NTHValueExpr, f Visit) error { if in == nil { return nil @@ -2565,6 +2640,9 @@ func VisitRefOfOffset(in *Offset, f Visit) error { if cont, err := f(in); err != nil || !cont { return err } + if err := VisitExpr(in.Original, f); err != nil { + return err + } return nil } func VisitOnDup(in OnDup, f Visit) error { @@ -2850,6 +2928,18 @@ func VisitRefOfPointExpr(in *PointExpr, f Visit) error { } return nil } +func VisitRefOfPolygonExpr(in *PolygonExpr, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + if err := VisitExprs(in.LinestringParams, f); err != nil { + return err + } + return nil +} func VisitRefOfPrepareStmt(in *PrepareStmt, f Visit) error { if in == nil { return nil @@ -2868,6 +2958,15 @@ func VisitRefOfPrepareStmt(in *PrepareStmt, f Visit) error { } return nil } +func VisitRefOfPurgeBinaryLogs(in *PurgeBinaryLogs, f Visit) error { + if in == nil { + return nil + } + if cont, err := f(in); err != nil || !cont { + return err + } + return nil +} func VisitRefOfReferenceDefinition(in *ReferenceDefinition, f Visit) error { if in == nil { return nil @@ -4171,6 +4270,8 @@ func VisitCallable(in Callable, f Visit) error { return VisitRefOfFuncExpr(in, f) case *GTIDFuncExpr: return VisitRefOfGTIDFuncExpr(in, f) + case *GeomFromTextExpr: + return VisitRefOfGeomFromTextExpr(in, f) case *GroupConcatExpr: return VisitRefOfGroupConcatExpr(in, f) case *InsertExpr: @@ -4231,6 +4332,12 @@ func VisitCallable(in Callable, f Visit) error { return VisitRefOfMemberOfExpr(in, f) case *Min: return VisitRefOfMin(in, f) + case *MultiLinestringExpr: + return VisitRefOfMultiLinestringExpr(in, f) + case *MultiPointExpr: + return VisitRefOfMultiPointExpr(in, f) + case *MultiPolygonExpr: + return VisitRefOfMultiPolygonExpr(in, f) case *NTHValueExpr: return VisitRefOfNTHValueExpr(in, f) case *NamedWindow: @@ -4241,6 +4348,8 @@ func VisitCallable(in Callable, f Visit) error { return VisitRefOfPerformanceSchemaFuncExpr(in, f) case *PointExpr: return VisitRefOfPointExpr(in, f) + case *PolygonExpr: + return VisitRefOfPolygonExpr(in, f) case *RegexpInstrExpr: return VisitRefOfRegexpInstrExpr(in, f) case *RegexpLikeExpr: @@ -4361,8 +4470,8 @@ func VisitExpr(in Expr, f Visit) error { switch in := in.(type) { case *AndExpr: return VisitRefOfAndExpr(in, f) - case Argument: - return VisitArgument(in, f) + case *Argument: + return VisitRefOfArgument(in, f) case *ArgumentLessWindowExpr: return VisitRefOfArgumentLessWindowExpr(in, f) case *Avg: @@ -4417,6 +4526,8 @@ func VisitExpr(in Expr, f Visit) error { return VisitRefOfFuncExpr(in, f) case *GTIDFuncExpr: return VisitRefOfGTIDFuncExpr(in, f) + case *GeomFromTextExpr: + return VisitRefOfGeomFromTextExpr(in, f) case *GroupConcatExpr: return VisitRefOfGroupConcatExpr(in, f) case *InsertExpr: @@ -4489,6 +4600,12 @@ func VisitExpr(in Expr, f Visit) error { return VisitRefOfMemberOfExpr(in, f) case *Min: return VisitRefOfMin(in, f) + case *MultiLinestringExpr: + return VisitRefOfMultiLinestringExpr(in, f) + case *MultiPointExpr: + return VisitRefOfMultiPointExpr(in, f) + case *MultiPolygonExpr: + return VisitRefOfMultiPolygonExpr(in, f) case *NTHValueExpr: return VisitRefOfNTHValueExpr(in, f) case *NamedWindow: @@ -4507,6 +4624,8 @@ func VisitExpr(in Expr, f Visit) error { return VisitRefOfPerformanceSchemaFuncExpr(in, f) case *PointExpr: return VisitRefOfPointExpr(in, f) + case *PolygonExpr: + return VisitRefOfPolygonExpr(in, f) case *RegexpInstrExpr: return VisitRefOfRegexpInstrExpr(in, f) case *RegexpLikeExpr: @@ -4693,6 +4812,8 @@ func VisitStatement(in Statement, f Visit) error { return VisitRefOfOtherRead(in, f) case *PrepareStmt: return VisitRefOfPrepareStmt(in, f) + case *PurgeBinaryLogs: + return VisitRefOfPurgeBinaryLogs(in, f) case *Release: return VisitRefOfRelease(in, f) case *RenameTable: @@ -4760,10 +4881,6 @@ func VisitAlgorithmValue(in AlgorithmValue, f Visit) error { _, err := f(in) return err } -func VisitArgument(in Argument, f Visit) error { - _, err := f(in) - return err -} func VisitBoolVal(in BoolVal, f Visit) error { _, err := f(in) return err diff --git a/go/vt/sqlparser/cached_size.go b/go/vt/sqlparser/cached_size.go index 4b62401d2f2..1203b6e1867 100644 --- a/go/vt/sqlparser/cached_size.go +++ b/go/vt/sqlparser/cached_size.go @@ -319,6 +319,18 @@ func (cached *AndExpr) CachedSize(alloc bool) int64 { } return size } +func (cached *Argument) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field Name string + size += hack.RuntimeAllocSize(int64(len(cached.Name))) + return size +} func (cached *ArgumentLessWindowExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -1435,6 +1447,28 @@ func (cached *GTIDFuncExpr) CachedSize(alloc bool) int64 { } return size } +func (cached *GeomFromTextExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(64) + } + // field WktText vitess.io/vitess/go/vt/sqlparser.Expr + if cc, ok := cached.WktText.(cachedObject); ok { + size += cc.CachedSize(true) + } + // field Srid vitess.io/vitess/go/vt/sqlparser.Expr + if cc, ok := cached.Srid.(cachedObject); ok { + size += cc.CachedSize(true) + } + // field AxisOrderOpt vitess.io/vitess/go/vt/sqlparser.Expr + if cc, ok := cached.AxisOrderOpt.(cachedObject); ok { + size += cc.CachedSize(true) + } + return size +} func (cached *GroupConcatExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -2523,6 +2557,63 @@ func (cached *ModifyColumn) CachedSize(alloc bool) int64 { size += cached.After.CachedSize(true) return size } +func (cached *MultiLinestringExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field LinestringParams vitess.io/vitess/go/vt/sqlparser.Exprs + { + size += hack.RuntimeAllocSize(int64(cap(cached.LinestringParams)) * int64(16)) + for _, elem := range cached.LinestringParams { + if cc, ok := elem.(cachedObject); ok { + size += cc.CachedSize(true) + } + } + } + return size +} +func (cached *MultiPointExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field PointParams vitess.io/vitess/go/vt/sqlparser.Exprs + { + size += hack.RuntimeAllocSize(int64(cap(cached.PointParams)) * int64(16)) + for _, elem := range cached.PointParams { + if cc, ok := elem.(cachedObject); ok { + size += cc.CachedSize(true) + } + } + } + return size +} +func (cached *MultiPolygonExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field PolygonParams vitess.io/vitess/go/vt/sqlparser.Exprs + { + size += hack.RuntimeAllocSize(int64(cap(cached.PolygonParams)) * int64(16)) + for _, elem := range cached.PolygonParams { + if cc, ok := elem.(cachedObject); ok { + size += cc.CachedSize(true) + } + } + } + return size +} func (cached *NTHValueExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -2620,8 +2711,10 @@ func (cached *Offset) CachedSize(alloc bool) int64 { if alloc { size += int64(24) } - // field Original string - size += hack.RuntimeAllocSize(int64(len(cached.Original))) + // field Original vitess.io/vitess/go/vt/sqlparser.Expr + if cc, ok := cached.Original.(cachedObject); ok { + size += cc.CachedSize(true) + } return size } func (cached *OptLike) CachedSize(alloc bool) int64 { @@ -2921,6 +3014,25 @@ func (cached *PointExpr) CachedSize(alloc bool) int64 { } return size } +func (cached *PolygonExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field LinestringParams vitess.io/vitess/go/vt/sqlparser.Exprs + { + size += hack.RuntimeAllocSize(int64(cap(cached.LinestringParams)) * int64(16)) + for _, elem := range cached.LinestringParams { + if cc, ok := elem.(cachedObject); ok { + size += cc.CachedSize(true) + } + } + } + return size +} func (cached *PrepareStmt) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -2939,6 +3051,20 @@ func (cached *PrepareStmt) CachedSize(alloc bool) int64 { size += cached.Comments.CachedSize(true) return size } +func (cached *PurgeBinaryLogs) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(32) + } + // field To string + size += hack.RuntimeAllocSize(int64(len(cached.To))) + // field Before string + size += hack.RuntimeAllocSize(int64(len(cached.Before))) + return size +} func (cached *ReferenceDefinition) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) diff --git a/go/vt/sqlparser/comments.go b/go/vt/sqlparser/comments.go index 7e17e58e66b..aed9ff916bd 100644 --- a/go/vt/sqlparser/comments.go +++ b/go/vt/sqlparser/comments.go @@ -48,6 +48,8 @@ const ( DirectiveVExplainRunDMLQueries = "EXECUTE_DML_QUERIES" // DirectiveConsolidator enables the query consolidator. DirectiveConsolidator = "CONSOLIDATOR" + // DirectiveWorkloadName specifies the name of the client application workload issuing the query. + DirectiveWorkloadName = "WORKLOAD_NAME" ) func isNonSpace(r rune) bool { @@ -396,3 +398,19 @@ func Consolidator(stmt Statement) querypb.ExecuteOptions_Consolidator { } return querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED } + +// GetWorkloadNameFromStatement gets the workload name from the provided Statement, using workloadLabel as the name of +// the query directive that specifies it. +func GetWorkloadNameFromStatement(statement Statement) string { + commentedStatement, ok := statement.(Commented) + // This would mean that the statement lacks comments, so we can't obtain the workload from it. Hence default to + // empty workload name + if !ok { + return "" + } + + directives := commentedStatement.GetParsedComments().Directives() + workloadName, _ := directives.GetString(DirectiveWorkloadName, "") + + return workloadName +} diff --git a/go/vt/sqlparser/constants.go b/go/vt/sqlparser/constants.go index 81f2e067563..4a542b6d0f8 100644 --- a/go/vt/sqlparser/constants.go +++ b/go/vt/sqlparser/constants.go @@ -422,6 +422,16 @@ const ( SecondStr = "second" SecondMicrosecondStr = "second_microsecond" YearMonthStr = "year_month" + + //GeomeFromWktType strings + GeometryFromTextStr = "st_geometryfromtext" + GeometryCollectionFromTextStr = "st_geometrycollectionfromtext" + PointFromTextStr = "st_pointfromtext" + MultiPointFromTextStr = "st_multipointfromtext" + LineStringFromTextStr = "st_linestringfromtext" + MultiLinestringFromTextStr = "st_multilinestringfromtext" + PolygonFromTextStr = "st_polygonfromtext" + MultiPolygonFromTextStr = "st_multipolygonfromtext" ) // Constants for Enum Type - Insert.Action @@ -887,3 +897,15 @@ const ( ReadWrite ReadOnly ) + +// Enum Types of WKT functions +const ( + GeometryFromText GeomFromWktType = iota + GeometryCollectionFromText + PointFromText + LineStringFromText + PolygonFromText + MultiPointFromText + MultiPolygonFromText + MultiLinestringFromText +) diff --git a/go/vt/sqlparser/generate.go b/go/vt/sqlparser/generate.go index 81ddedb5400..6309c603a8b 100644 --- a/go/vt/sqlparser/generate.go +++ b/go/vt/sqlparser/generate.go @@ -19,5 +19,5 @@ package sqlparser // Generate all the AST helpers using the tooling in `go/tools` //go:generate go run ./goyacc -fo sql.go sql.y -//go:generate go run ../../tools/asthelpergen/main --in . --iface vitess.io/vitess/go/vt/sqlparser.SQLNode --except "*ColName" +//go:generate go run ../../tools/asthelpergen/main --in . --iface vitess.io/vitess/go/vt/sqlparser.SQLNode --clone_exclude "*ColName" --equals_custom "*ColName" //go:generate go run ../../tools/astfmtgen vitess.io/vitess/go/vt/sqlparser/... diff --git a/go/vt/sqlparser/keywords.go b/go/vt/sqlparser/keywords.go index 54cf96c5011..95e9dc39b7d 100644 --- a/go/vt/sqlparser/keywords.go +++ b/go/vt/sqlparser/keywords.go @@ -134,7 +134,7 @@ var keywords = []keyword{ {"autoextend_size", AUTOEXTEND_SIZE}, {"avg", AVG}, {"avg_row_length", AVG_ROW_LENGTH}, - {"before", UNUSED}, + {"before", BEFORE}, {"begin", BEGIN}, {"between", BETWEEN}, {"bigint", BIGINT}, @@ -491,6 +491,7 @@ var keywords = []keyword{ {"prepare", PREPARE}, {"primary", PRIMARY}, {"privileges", PRIVILEGES}, + {"purge", PURGE}, {"processlist", PROCESSLIST}, {"procedure", PROCEDURE}, {"ps_current_thread_id", PS_CURRENT_THREAD_ID}, @@ -592,6 +593,22 @@ var keywords = []keyword{ {"stored", STORED}, {"straight_join", STRAIGHT_JOIN}, {"stream", STREAM}, + {"st_geomfromtext", ST_GeometryFromText}, + {"st_geomcollfromtext", ST_GeometryCollectionFromText}, + {"st_geometrycollectionfromtext", ST_GeometryCollectionFromText}, + {"st_geomcollfromtxt", ST_GeometryCollectionFromText}, + {"st_geometryfromtext", ST_GeometryFromText}, + {"st_linestringfromtext", ST_LineStringFromText}, + {"st_linefromtext", ST_LineStringFromText}, + {"st_multilinestringfromtext", ST_MultiLineStringFromText}, + {"st_mlinefromtext", ST_MultiLineStringFromText}, + {"st_mpointfromtext", ST_MultiPointFromText}, + {"st_multipointfromtext", ST_MultiPointFromText}, + {"st_mpolyfromtext", ST_MultiPolygonFromText}, + {"st_multipolygonfromtext", ST_MultiPolygonFromText}, + {"st_pointfromtext", ST_PointFromText}, + {"st_polyfromtext", ST_PolygonFromText}, + {"st_polygonfromtext", ST_PolygonFromText}, {"sum", SUM}, {"system", UNUSED}, {"table", TABLE}, diff --git a/go/vt/sqlparser/normalizer.go b/go/vt/sqlparser/normalizer.go index 6d7ee526bf6..7f92a8e2d42 100644 --- a/go/vt/sqlparser/normalizer.go +++ b/go/vt/sqlparser/normalizer.go @@ -18,7 +18,7 @@ package sqlparser import ( "fmt" - "strconv" + "math/big" "vitess.io/vitess/go/sqltypes" @@ -200,7 +200,7 @@ func (nz *normalizer) convertLiteralDedup(node *Literal, cursor *Cursor) { } // Modify the AST node to a bindvar. - cursor.Replace(NewArgument(bvname)) + cursor.Replace(NewTypedArgument(bvname, node.SQLType())) } func keyFor(bval *querypb.BindVariable, lit *Literal) string { @@ -212,7 +212,6 @@ func keyFor(bval *querypb.BindVariable, lit *Literal) string { // and number that have the same representation don't // collide. return "'" + lit.Val - } // convertLiteral converts an Literal without the dedup. @@ -229,8 +228,7 @@ func (nz *normalizer) convertLiteral(node *Literal, cursor *Cursor) { bvname := nz.reserved.nextUnusedVar() nz.bindVars[bvname] = bval - - cursor.Replace(NewArgument(bvname)) + cursor.Replace(NewTypedArgument(bvname, node.SQLType())) } // convertComparison attempts to convert IN clauses to @@ -275,7 +273,7 @@ func (nz *normalizer) parameterize(left, right Expr) Expr { } key := keyFor(bval, lit) bvname := nz.decideBindVarName(key, lit, col, bval) - return Argument(bvname) + return NewTypedArgument(bvname, lit.SQLType()) } func (nz *normalizer) decideBindVarName(key string, lit *Literal, col *ColName, bval *querypb.BindVariable) string { @@ -357,12 +355,12 @@ func SQLToBindvar(node SQLNode) *querypb.BindVariable { v, err = sqltypes.NewValue(sqltypes.HexVal, vbytes) case BitVal: // Convert bit value to hex number in parameterized query format - var ui uint64 - ui, err = strconv.ParseUint(string(node.Bytes()), 2, 64) - if err != nil { + var i big.Int + _, ok := i.SetString(string(node.Bytes()), 2) + if !ok { return nil } - v, err = sqltypes.NewValue(sqltypes.HexNum, []byte(fmt.Sprintf("0x%x", ui))) + v, err = sqltypes.NewValue(sqltypes.HexNum, []byte(fmt.Sprintf("0x%s", i.Text(16)))) case DateVal: v, err = sqltypes.NewValue(sqltypes.Date, node.Bytes()) case TimeVal: @@ -392,8 +390,8 @@ func GetBindvars(stmt Statement) map[string]struct{} { // Common node types that never contain expressions but create a lot of object // allocations. return false, nil - case Argument: - bindvars[string(node)] = struct{}{} + case *Argument: + bindvars[node.Name] = struct{}{} case ListArg: bindvars[string(node)] = struct{}{} } diff --git a/go/vt/sqlparser/normalizer_test.go b/go/vt/sqlparser/normalizer_test.go index fe3dc85b8c8..4cdee0a7dbf 100644 --- a/go/vt/sqlparser/normalizer_test.go +++ b/go/vt/sqlparser/normalizer_test.go @@ -44,7 +44,7 @@ func TestNormalize(t *testing.T) { }{{ // str val in: "select * from t where foobar = 'aa'", - outstmt: "select * from t where foobar = :foobar", + outstmt: "select * from t where foobar = :foobar /* VARCHAR */", outbv: map[string]*querypb.BindVariable{ "foobar": sqltypes.StringBindVariable("aa"), }, @@ -61,28 +61,28 @@ func TestNormalize(t *testing.T) { }, { // str val in select in: "select 'aa' from t", - outstmt: "select :bv1 from t", + outstmt: "select :bv1 /* VARCHAR */ from t", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.StringBindVariable("aa"), }, }, { // int val in: "select * from t where foobar = 1", - outstmt: "select * from t where foobar = :foobar", + outstmt: "select * from t where foobar = :foobar /* INT64 */", outbv: map[string]*querypb.BindVariable{ "foobar": sqltypes.Int64BindVariable(1), }, }, { // float val in: "select * from t where foobar = 1.2", - outstmt: "select * from t where foobar = :foobar", + outstmt: "select * from t where foobar = :foobar /* DECIMAL */", outbv: map[string]*querypb.BindVariable{ "foobar": sqltypes.DecimalBindVariable(1.2), }, }, { // multiple vals in: "select * from t where foo = 1.2 and bar = 2", - outstmt: "select * from t where foo = :foo and bar = :bar", + outstmt: "select * from t where foo = :foo /* DECIMAL */ and bar = :bar /* INT64 */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.DecimalBindVariable(1.2), "bar": sqltypes.Int64BindVariable(2), @@ -90,21 +90,21 @@ func TestNormalize(t *testing.T) { }, { // bv collision in: "select * from t where foo = :bar and bar = 12", - outstmt: "select * from t where foo = :bar and bar = :bar1", + outstmt: "select * from t where foo = :bar and bar = :bar1 /* INT64 */", outbv: map[string]*querypb.BindVariable{ "bar1": sqltypes.Int64BindVariable(12), }, }, { // val reuse in: "select * from t where foo = 1 and bar = 1", - outstmt: "select * from t where foo = :foo and bar = :foo", + outstmt: "select * from t where foo = :foo /* INT64 */ and bar = :foo /* INT64 */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.Int64BindVariable(1), }, }, { // ints and strings are different in: "select * from t where foo = 1 and bar = '1'", - outstmt: "select * from t where foo = :foo and bar = :bar", + outstmt: "select * from t where foo = :foo /* INT64 */ and bar = :bar /* VARCHAR */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.Int64BindVariable(1), "bar": sqltypes.StringBindVariable("1"), @@ -112,7 +112,7 @@ func TestNormalize(t *testing.T) { }, { // val should not be reused for non-select statements in: "insert into a values(1, 1)", - outstmt: "insert into a values (:bv1, :bv2)", + outstmt: "insert into a values (:bv1 /* INT64 */, :bv2 /* INT64 */)", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(1), "bv2": sqltypes.Int64BindVariable(1), @@ -120,14 +120,14 @@ func TestNormalize(t *testing.T) { }, { // val should be reused only in subqueries of DMLs in: "update a set v1=(select 5 from t), v2=5, v3=(select 5 from t), v4=5", - outstmt: "update a set v1 = (select :bv1 from t), v2 = :bv1, v3 = (select :bv1 from t), v4 = :bv1", + outstmt: "update a set v1 = (select :bv1 /* INT64 */ from t), v2 = :bv1 /* INT64 */, v3 = (select :bv1 /* INT64 */ from t), v4 = :bv1 /* INT64 */", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(5), }, }, { // list vars should work for DMLs also in: "update a set v1=5 where v2 in (1, 4, 5)", - outstmt: "update a set v1 = :v1 where v2 in ::bv1", + outstmt: "update a set v1 = :v1 /* INT64 */ where v2 in ::bv1", outbv: map[string]*querypb.BindVariable{ "v1": sqltypes.Int64BindVariable(5), "bv1": sqltypes.TestBindVariable([]any{1, 4, 5}), @@ -135,42 +135,49 @@ func TestNormalize(t *testing.T) { }, { // Hex number values should work for selects in: "select * from t where foo = 0x1234", - outstmt: "select * from t where foo = :foo", + outstmt: "select * from t where foo = :foo /* HEXNUM */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.HexNumBindVariable([]byte("0x1234")), }, }, { // Hex encoded string values should work for selects in: "select * from t where foo = x'7b7d'", - outstmt: "select * from t where foo = :foo", + outstmt: "select * from t where foo = :foo /* HEXVAL */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.HexValBindVariable([]byte("x'7b7d'")), }, }, { // Ensure that hex notation bind vars work with collation based conversions in: "select convert(x'7b7d' using utf8mb4) from dual", - outstmt: "select convert(:bv1 using utf8mb4) from dual", + outstmt: "select convert(:bv1 /* HEXVAL */ using utf8mb4) from dual", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.HexValBindVariable([]byte("x'7b7d'")), }, }, { // Hex number values should work for DMLs in: "update a set foo = 0x12", - outstmt: "update a set foo = :foo", + outstmt: "update a set foo = :foo /* HEXNUM */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.HexNumBindVariable([]byte("0x12")), }, }, { // Bin values work fine in: "select * from t where foo = b'11'", - outstmt: "select * from t where foo = :foo", + outstmt: "select * from t where foo = :foo /* HEXNUM */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.HexNumBindVariable([]byte("0x3")), }, + }, { + // Large bin values work fine + in: "select * from t where foo = b'11101010100101010010101010101010101010101000100100100100100101001101010101010101000001'", + outstmt: "select * from t where foo = :foo /* HEXNUM */", + outbv: map[string]*querypb.BindVariable{ + "foo": sqltypes.HexNumBindVariable([]byte("0x3aa54aaaaaa24925355541")), + }, }, { // Bin value does not convert for DMLs in: "update a set v1 = b'11'", - outstmt: "update a set v1 = :v1", + outstmt: "update a set v1 = :v1 /* HEXNUM */", outbv: map[string]*querypb.BindVariable{ "v1": sqltypes.HexNumBindVariable([]byte("0x3")), }, @@ -187,7 +194,7 @@ func TestNormalize(t *testing.T) { }, { // ORDER BY with literal inside complex expression in: "select a, b from t order by field(a,1,2,3) asc", - outstmt: "select a, b from t order by field(a, :bv1, :bv2, :bv3) asc", + outstmt: "select a, b from t order by field(a, :bv1 /* INT64 */, :bv2 /* INT64 */, :bv3 /* INT64 */) asc", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(1), "bv2": sqltypes.Int64BindVariable(2), @@ -201,14 +208,14 @@ func TestNormalize(t *testing.T) { }, { // Values up to len 256 will reuse. in: fmt.Sprintf("select * from t where foo = '%256s' and bar = '%256s'", "a", "a"), - outstmt: "select * from t where foo = :foo and bar = :foo", + outstmt: "select * from t where foo = :foo /* VARCHAR */ and bar = :foo /* VARCHAR */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.StringBindVariable(fmt.Sprintf("%256s", "a")), }, }, { // Values greater than len 256 will not reuse. in: fmt.Sprintf("select * from t where foo = '%257s' and bar = '%257s'", "b", "b"), - outstmt: "select * from t where foo = :foo and bar = :bar", + outstmt: "select * from t where foo = :foo /* VARCHAR */ and bar = :bar /* VARCHAR */", outbv: map[string]*querypb.BindVariable{ "foo": sqltypes.StringBindVariable(fmt.Sprintf("%257s", "b")), "bar": sqltypes.StringBindVariable(fmt.Sprintf("%257s", "b")), @@ -231,7 +238,7 @@ func TestNormalize(t *testing.T) { }, { // IN clause with non-val values in: "select * from t where v1 in (1, a)", - outstmt: "select * from t where v1 in (:bv1, a)", + outstmt: "select * from t where v1 in (:bv1 /* INT64 */, a)", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(1), }, @@ -259,14 +266,14 @@ func TestNormalize(t *testing.T) { }, { // Do not normalize cast/convert types in: `select CAST("test" AS CHAR(60))`, - outstmt: `select cast(:bv1 as CHAR(60)) from dual`, + outstmt: `select cast(:bv1 /* VARCHAR */ as CHAR(60)) from dual`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.StringBindVariable("test"), }, }, { // insert syntax in: "insert into a (v1, v2, v3) values (1, '2', 3)", - outstmt: "insert into a(v1, v2, v3) values (:bv1, :bv2, :bv3)", + outstmt: "insert into a(v1, v2, v3) values (:bv1 /* INT64 */, :bv2 /* VARCHAR */, :bv3 /* INT64 */)", outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(1), "bv2": sqltypes.StringBindVariable("2"), @@ -275,7 +282,7 @@ func TestNormalize(t *testing.T) { }, { // BitVal should also be normalized in: `select b'1', 0b01, b'1010', 0b1111111`, - outstmt: `select :bv1, :bv2, :bv3, :bv4 from dual`, + outstmt: `select :bv1 /* HEXNUM */, :bv2 /* HEXNUM */, :bv3 /* HEXNUM */, :bv4 /* HEXNUM */ from dual`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.HexNumBindVariable([]byte("0x1")), "bv2": sqltypes.HexNumBindVariable([]byte("0x1")), @@ -285,28 +292,28 @@ func TestNormalize(t *testing.T) { }, { // DateVal should also be normalized in: `select date'2022-08-06'`, - outstmt: `select :bv1 from dual`, + outstmt: `select :bv1 /* DATE */ from dual`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(sqltypes.Date, []byte("2022-08-06"))), }, }, { // TimeVal should also be normalized in: `select time'17:05:12'`, - outstmt: `select :bv1 from dual`, + outstmt: `select :bv1 /* TIME */ from dual`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(sqltypes.Time, []byte("17:05:12"))), }, }, { // TimestampVal should also be normalized in: `select timestamp'2022-08-06 17:05:12'`, - outstmt: `select :bv1 from dual`, + outstmt: `select :bv1 /* DATETIME */ from dual`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(sqltypes.Datetime, []byte("2022-08-06 17:05:12"))), }, }, { // TimestampVal should also be normalized in: `explain select comms_by_companies.* from comms_by_companies where comms_by_companies.id = 'rjve634shXzaavKHbAH16ql6OrxJ' limit 1,1`, - outstmt: `explain select comms_by_companies.* from comms_by_companies where comms_by_companies.id = :comms_by_companies_id limit :bv1, :bv2`, + outstmt: `explain select comms_by_companies.* from comms_by_companies where comms_by_companies.id = :comms_by_companies_id /* VARCHAR */ limit :bv1 /* INT64 */, :bv2 /* INT64 */`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(1), "bv2": sqltypes.Int64BindVariable(1), @@ -315,14 +322,14 @@ func TestNormalize(t *testing.T) { }, { // Int leading with zero should also be normalized in: `select * from t where zipcode = 01001900`, - outstmt: `select * from t where zipcode = :zipcode`, + outstmt: `select * from t where zipcode = :zipcode /* INT64 */`, outbv: map[string]*querypb.BindVariable{ "zipcode": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(sqltypes.Int64, []byte("01001900"))), }, }, { // literals in limit and offset should not reuse bindvars in: `select * from t where id = 10 limit 10 offset 10`, - outstmt: `select * from t where id = :id limit :bv1, :bv2`, + outstmt: `select * from t where id = :id /* INT64 */ limit :bv1 /* INT64 */, :bv2 /* INT64 */`, outbv: map[string]*querypb.BindVariable{ "bv1": sqltypes.Int64BindVariable(10), "bv2": sqltypes.Int64BindVariable(10), diff --git a/go/vt/sqlparser/parse_test.go b/go/vt/sqlparser/parse_test.go index d48b75dd745..ce43325ceda 100644 --- a/go/vt/sqlparser/parse_test.go +++ b/go/vt/sqlparser/parse_test.go @@ -187,6 +187,99 @@ var ( }, { input: "create table x(location GEOMETRYCOLLECTION DEFAULT (LINESTRING(POINT(7.0, 3.0))))", output: "create table x (\n\tlocation GEOMETRYCOLLECTION default (linestring(point(7.0, 3.0)))\n)", + }, { + input: "create table x(location GEOMETRYCOLLECTION DEFAULT (POLYGON(LINESTRING(POINT(4, 5), POINT(4.6, 7.9), POINT(4.6, 7.9)))))", + output: "create table x (\n\tlocation GEOMETRYCOLLECTION default (polygon(linestring(point(4, 5), point(4.6, 7.9), point(4.6, 7.9))))\n)", + }, { + input: "select ST_ASTEXT(POLYGON(linestrings)) from linestringTable", + output: "select ST_ASTEXT(polygon(linestrings)) from linestringTable", + }, { + input: "create table x(location GEOMETRYCOLLECTION DEFAULT (MULTIPOINT(POINT(4, 5), POINT(4.6, 7.9), POINT(4.6, 7.9))))", + output: "create table x (\n\tlocation GEOMETRYCOLLECTION default (multipoint(point(4, 5), point(4.6, 7.9), point(4.6, 7.9)))\n)", + }, { + input: "select ST_ASTEXT(MULTIPOINT(points)) from pointsTable", + output: "select ST_ASTEXT(multipoint(points)) from pointsTable", + }, { + input: "create table x(location GEOMETRYCOLLECTION DEFAULT (MULTILINESTRING(LINESTRING(POINT(8,9), POINT(8,9)))))", + output: "create table x (\n\tlocation GEOMETRYCOLLECTION default (multilinestring(linestring(point(8, 9), point(8, 9))))\n)", + }, { + input: "select ST_ASTEXT(MULTILINESTRING(linestrings)) from linestringsTable", + output: "select ST_ASTEXT(multilinestring(linestrings)) from linestringsTable", + }, { + input: "create table x(location GEOMETRYCOLLECTION DEFAULT (MULTIPOLYGON(POINT(7.0, 3.0), POINT(7.0, 3.0))))", + output: "create table x (\n\tlocation GEOMETRYCOLLECTION default (multipolygon(point(7.0, 3.0), point(7.0, 3.0)))\n)", + }, { + input: "select ST_ASTEXT(MULTIPOLYGON(polygons)) from polygonTable", + output: "select ST_ASTEXT(multipolygon(polygons)) from polygonTable", + }, { + input: "SELECT ST_AsText(ST_GeomCollFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))'))", + output: "select ST_AsText(st_geometrycollectionfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))')) from dual", + }, { + input: "SELECT ST_AsText(ST_GeomCollFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326))", + output: "select ST_AsText(st_geometrycollectionfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_GeomCollFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_geometrycollectionfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_GeomFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))'))", + output: "select ST_AsText(st_geometryfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))')) from dual", + }, { + input: "SELECT ST_AsText(ST_GeomFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326))", + output: "select ST_AsText(st_geometryfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_GeomFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_geometryfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_MultilinestringFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))'))", + output: "select ST_AsText(st_multilinestringfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))')) from dual", + }, { + input: "SELECT ST_AsText(ST_MultilinestringFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326))", + output: "select ST_AsText(st_multilinestringfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_MultilinestringFromText('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_multilinestringfromtext('MULTILINESTRING((10 10, 11 11), (9 9, 10 10))', 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_LinestringFromText('LINESTRING((10 10, 11 11))'))", + output: "select ST_AsText(st_linestringfromtext('LINESTRING((10 10, 11 11))')) from dual", + }, { + input: "SELECT ST_AsText(ST_LinestringFromText('LINESTRING((10 10, 11 11))', 4326))", + output: "select ST_AsText(st_linestringfromtext('LINESTRING((10 10, 11 11))', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_LinestringFromText('LINESTRING((10 10, 11 11))', 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_linestringfromtext('LINESTRING((10 10, 11 11))', 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_PointFromText('POINT(10 10)'))", + output: "select ST_AsText(st_pointfromtext('POINT(10 10)')) from dual", + }, { + input: "SELECT ST_AsText(ST_PointFromText('POINT(10 10)', 4326))", + output: "select ST_AsText(st_pointfromtext('POINT(10 10)', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPointFromText('MULTIPOINT((10 10, 11 11))'))", + output: "select ST_AsText(st_multipointfromtext('MULTIPOINT((10 10, 11 11))')) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPointFromText('MULTIPOINT((10 10, 11 11))', 4326))", + output: "select ST_AsText(st_multipointfromtext('MULTIPOINT((10 10, 11 11))', 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPointFromText('MULTIPOINT((10 10, 11 11))', 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_multipointfromtext('MULTIPOINT((10 10, 11 11))', 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPolygonFromText(@g))", + output: "select ST_AsText(st_multipolygonfromtext(@g)) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPolygonFromText(@g, 4326))", + output: "select ST_AsText(st_multipolygonfromtext(@g, 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_MultiPolygonFromText(@g, 4326, 'axis-order=lat-long'))", + output: "select ST_AsText(st_multipolygonfromtext(@g, 4326, 'axis-order=lat-long')) from dual", + }, { + input: "SELECT ST_AsText(ST_PolygonFromText(@g))", + output: "select ST_AsText(st_polygonfromtext(@g)) from dual", + }, { + input: "SELECT ST_AsText(ST_PolygonFromText(@g, 4326))", + output: "select ST_AsText(st_polygonfromtext(@g, 4326)) from dual", + }, { + input: "SELECT ST_AsText(ST_PolygonFromText(@g, 4326, 'axis-order=long-lat'))", + output: "select ST_AsText(st_polygonfromtext(@g, 4326, 'axis-order=long-lat')) from dual", }, { input: "WITH RECURSIVE odd_num_cte (id, n) AS (SELECT 1, 1 union all SELECT id+1, n+2 from odd_num_cte where id < 5) SELECT * FROM odd_num_cte", output: "with recursive odd_num_cte(id, n) as (select 1, 1 from dual union all select id + 1, n + 2 from odd_num_cte where id < 5) select * from odd_num_cte", @@ -1810,11 +1903,14 @@ var ( input: "flush no_write_to_binlog slow logs, status, user_resources, relay logs, relay logs for channel s", output: "flush local slow logs, status, user_resources, relay logs, relay logs for channel s", }, { - input: "show binary logs", - output: "show binary logs", + input: "show binary logs", }, { input: "show binlog events", output: "show binlog", + }, { + input: "purge binary logs to 'x'", + }, { + input: "purge binary logs before '2020-02-02 20:20:20'", }, { input: "show character set", output: "show charset", diff --git a/go/vt/sqlparser/predicate_rewriting.go b/go/vt/sqlparser/predicate_rewriting.go index eb772191a13..0348f95f115 100644 --- a/go/vt/sqlparser/predicate_rewriting.go +++ b/go/vt/sqlparser/predicate_rewriting.go @@ -16,41 +16,47 @@ limitations under the License. package sqlparser -const ( - Changed RewriteState = true - NoChange RewriteState = false +import ( + "vitess.io/vitess/go/vt/log" ) -type RewriteState bool - // RewritePredicate walks the input AST and rewrites any boolean logic into a simpler form // This simpler form is CNF plus logic for extracting predicates from OR, plus logic for turning ORs into IN // Note: In order to re-plan, we need to empty the accumulated metadata in the AST, // so ColName.Metadata will be nil:ed out as part of this rewrite func RewritePredicate(ast SQLNode) SQLNode { for { - finishedRewrite := true - ast = SafeRewrite(ast, nil, func(cursor *Cursor) bool { - if e, isExpr := cursor.node.(Expr); isExpr { - rewritten, state := simplifyExpression(e) - if state == Changed { - finishedRewrite = false - cursor.Replace(rewritten) - } + printExpr(ast) + exprChanged := false + stopOnChange := func(SQLNode, SQLNode) bool { + return !exprChanged + } + ast = SafeRewrite(ast, stopOnChange, func(cursor *Cursor) bool { + e, isExpr := cursor.node.(Expr) + if !isExpr { + return true } + + rewritten, state := simplifyExpression(e) + if ch, isChange := state.(changed); isChange { + printRule(ch.rule, ch.exprMatched) + exprChanged = true + cursor.Replace(rewritten) + } + if col, isCol := cursor.node.(*ColName); isCol { col.Metadata = nil } - return true + return !exprChanged }) - if finishedRewrite { + if !exprChanged { return ast } } } -func simplifyExpression(expr Expr) (Expr, RewriteState) { +func simplifyExpression(expr Expr) (Expr, rewriteState) { switch expr := expr.(type) { case *NotExpr: return simplifyNot(expr) @@ -61,24 +67,22 @@ func simplifyExpression(expr Expr) (Expr, RewriteState) { case *AndExpr: return simplifyAnd(expr) } - return expr, NoChange + return expr, noChange{} } -func simplifyNot(expr *NotExpr) (Expr, RewriteState) { +func simplifyNot(expr *NotExpr) (Expr, rewriteState) { switch child := expr.Expr.(type) { case *NotExpr: - // NOT NOT A => A - return child.Expr, Changed + return child.Expr, + newChange("NOT NOT A => A", f(expr)) case *OrExpr: - // DeMorgan Rewriter - // NOT (A OR B) => NOT A AND NOT B - return &AndExpr{Right: &NotExpr{Expr: child.Right}, Left: &NotExpr{Expr: child.Left}}, Changed + return &AndExpr{Right: &NotExpr{Expr: child.Right}, Left: &NotExpr{Expr: child.Left}}, + newChange("NOT (A OR B) => NOT A AND NOT B", f(expr)) case *AndExpr: - // DeMorgan Rewriter - // NOT (A AND B) => NOT A OR NOT B - return &OrExpr{Right: &NotExpr{Expr: child.Right}, Left: &NotExpr{Expr: child.Left}}, Changed + return &OrExpr{Right: &NotExpr{Expr: child.Right}, Left: &NotExpr{Expr: child.Left}}, + newChange("NOT (A AND B) => NOT A OR NOT B", f(expr)) } - return expr, NoChange + return expr, noChange{} } // ExtractINFromOR will add additional predicated to an OR. @@ -104,16 +108,16 @@ func ExtractINFromOR(expr *OrExpr) []Expr { continue } in, state := tryTurningOrIntoIn(l, r) - if state == Changed { + if state.changed() { ins = append(ins, in) } } } - return ins + return uniquefy(ins) } -func simplifyOr(expr *OrExpr) (Expr, RewriteState) { +func simplifyOr(expr *OrExpr) (Expr, rewriteState) { or := expr // first we search for ANDs and see how they can be simplified @@ -121,42 +125,47 @@ func simplifyOr(expr *OrExpr) (Expr, RewriteState) { rand, rok := or.Right.(*AndExpr) switch { case lok && rok: + // (<> AND <>) OR (<> AND <>) var a, b, c Expr + var change changed switch { - // (A and B) or (A and C) => A AND (B OR C) case Equals.Expr(land.Left, rand.Left): + change = newChange("(A and B) or (A and C) => A AND (B OR C)", f(expr)) a, b, c = land.Left, land.Right, rand.Right - // (A and B) or (C and A) => A AND (B OR C) case Equals.Expr(land.Left, rand.Right): + change = newChange("(A and B) or (C and A) => A AND (B OR C)", f(expr)) a, b, c = land.Left, land.Right, rand.Left - // (B and A) or (A and C) => A AND (B OR C) case Equals.Expr(land.Right, rand.Left): + change = newChange("(B and A) or (A and C) => A AND (B OR C)", f(expr)) a, b, c = land.Right, land.Left, rand.Right - // (B and A) or (C and A) => A AND (B OR C) case Equals.Expr(land.Right, rand.Right): + change = newChange("(B and A) or (C and A) => A AND (B OR C)", f(expr)) a, b, c = land.Right, land.Left, rand.Left default: - return expr, NoChange + return expr, noChange{} } - return &AndExpr{Left: a, Right: &OrExpr{Left: b, Right: c}}, Changed + return &AndExpr{Left: a, Right: &OrExpr{Left: b, Right: c}}, change case lok: + // (<> AND <>) OR <> // Simplification - // (A AND B) OR A => A if Equals.Expr(or.Right, land.Left) || Equals.Expr(or.Right, land.Right) { - return or.Right, Changed + return or.Right, newChange("(A AND B) OR A => A", f(expr)) } // Distribution Law - // (A AND B) OR C => (A OR C) AND (B OR C) - return &AndExpr{Left: &OrExpr{Left: land.Left, Right: or.Right}, Right: &OrExpr{Left: land.Right, Right: or.Right}}, Changed + return &AndExpr{Left: &OrExpr{Left: land.Left, Right: or.Right}, Right: &OrExpr{Left: land.Right, Right: or.Right}}, + newChange("(A AND B) OR C => (A OR C) AND (B OR C)", f(expr)) case rok: + // <> OR (<> AND <>) // Simplification - // A OR (A AND B) => A if Equals.Expr(or.Left, rand.Left) || Equals.Expr(or.Left, rand.Right) { - return or.Left, Changed + return or.Left, newChange("A OR (A AND B) => A", f(expr)) } // Distribution Law - // C OR (A AND B) => (C OR A) AND (C OR B) - return &AndExpr{Left: &OrExpr{Left: or.Left, Right: rand.Left}, Right: &OrExpr{Left: or.Left, Right: rand.Right}}, Changed + return &AndExpr{ + Left: &OrExpr{Left: or.Left, Right: rand.Left}, + Right: &OrExpr{Left: or.Left, Right: rand.Right}, + }, + newChange("C OR (A AND B) => (C OR A) AND (C OR B)", f(expr)) } // next, we want to try to turn multiple ORs into an IN when possible @@ -164,8 +173,8 @@ func simplifyOr(expr *OrExpr) (Expr, RewriteState) { rgtCmp, rok := or.Right.(*ComparisonExpr) if lok && rok { newExpr, rewritten := tryTurningOrIntoIn(lftCmp, rgtCmp) - if rewritten { - return newExpr, Changed + if rewritten.changed() { + return newExpr, rewritten } } @@ -173,46 +182,54 @@ func simplifyOr(expr *OrExpr) (Expr, RewriteState) { return distinctOr(expr) } -func tryTurningOrIntoIn(l, r *ComparisonExpr) (Expr, RewriteState) { +func tryTurningOrIntoIn(l, r *ComparisonExpr) (Expr, rewriteState) { // looks for A = X OR A = Y and turns them into A IN (X, Y) col, ok := l.Left.(*ColName) if !ok || !Equals.Expr(col, r.Left) { - return nil, NoChange + return nil, noChange{} } var tuple ValTuple - + var ruleStr string switch l.Operator { case EqualOp: tuple = ValTuple{l.Right} + ruleStr = "A = <>" case InOp: lft, ok := l.Right.(ValTuple) if !ok { - return nil, NoChange + return nil, noChange{} } tuple = lft + ruleStr = "A IN (<>, <>)" default: - return nil, NoChange + return nil, noChange{} } + ruleStr += " OR " + switch r.Operator { case EqualOp: tuple = append(tuple, r.Right) + ruleStr += "A = <>" case InOp: lft, ok := r.Right.(ValTuple) if !ok { - return nil, NoChange + return nil, noChange{} } tuple = append(tuple, lft...) + ruleStr += "A IN (<>, <>)" default: - return nil, NoChange + return nil, noChange{} } + ruleStr += " => A IN (<>, <>)" + return &ComparisonExpr{ Operator: InOp, Left: col, Right: uniquefy(tuple), - }, Changed + }, newChange(ruleStr, f(&OrExpr{Left: l, Right: r})) } func uniquefy(tuple ValTuple) (output ValTuple) { @@ -228,37 +245,45 @@ outer: return } -func simplifyXor(expr *XorExpr) (Expr, RewriteState) { +func simplifyXor(expr *XorExpr) (Expr, rewriteState) { // DeMorgan Rewriter - // (A XOR B) => (A OR B) AND NOT (A AND B) - return &AndExpr{Left: &OrExpr{Left: expr.Left, Right: expr.Right}, Right: &NotExpr{Expr: &AndExpr{Left: expr.Left, Right: expr.Right}}}, Changed + return &AndExpr{ + Left: &OrExpr{Left: expr.Left, Right: expr.Right}, + Right: &NotExpr{Expr: &AndExpr{Left: expr.Left, Right: expr.Right}}, + }, newChange("(A XOR B) => (A OR B) AND NOT (A AND B)", f(expr)) } -func simplifyAnd(expr *AndExpr) (Expr, RewriteState) { +func simplifyAnd(expr *AndExpr) (Expr, rewriteState) { res, rewritten := distinctAnd(expr) - if rewritten { + if rewritten.changed() { return res, rewritten } and := expr if or, ok := and.Left.(*OrExpr); ok { // Simplification - // (A OR B) AND A => A - if Equals.Expr(or.Left, and.Right) || Equals.Expr(or.Right, and.Right) { - return and.Right, Changed + + if Equals.Expr(or.Left, and.Right) { + return and.Right, newChange("(A OR B) AND A => A", f(expr)) + } + if Equals.Expr(or.Right, and.Right) { + return and.Right, newChange("(A OR B) AND B => B", f(expr)) } } if or, ok := and.Right.(*OrExpr); ok { // Simplification - // A OR (A AND B) => A - if Equals.Expr(or.Left, and.Left) || Equals.Expr(or.Right, and.Left) { - return or.Left, Changed + if Equals.Expr(or.Left, and.Left) { + return and.Left, newChange("A AND (A OR B) => A", f(expr)) + } + if Equals.Expr(or.Right, and.Left) { + return and.Left, newChange("A AND (B OR A) => A", f(expr)) } } - return expr, NoChange + return expr, noChange{} } -func distinctOr(in *OrExpr) (Expr, RewriteState) { +func distinctOr(in *OrExpr) (Expr, rewriteState) { + var skipped []*OrExpr todo := []*OrExpr{in} var leaves []Expr for len(todo) > 0 { @@ -284,13 +309,16 @@ outer1: leaves = leaves[1:] for _, alreadyIn := range predicates { if Equals.Expr(alreadyIn, curr) { + if log.V(0) { + skipped = append(skipped, &OrExpr{Left: alreadyIn, Right: curr}) + } continue outer1 } } predicates = append(predicates, curr) } if original == len(predicates) { - return in, NoChange + return in, noChange{} } var result Expr for i, curr := range predicates { @@ -300,42 +328,58 @@ outer1: } result = &OrExpr{Left: result, Right: curr} } - return result, Changed + + return result, newChange("A OR A => A", func() Expr { + var result Expr + for _, orExpr := range skipped { + if result == nil { + result = orExpr + continue + } + + result = &OrExpr{ + Left: result, + Right: orExpr, + } + } + return result + }) } -func distinctAnd(in *AndExpr) (Expr, RewriteState) { +func distinctAnd(in *AndExpr) (Expr, rewriteState) { + var skipped []*AndExpr todo := []*AndExpr{in} var leaves []Expr for len(todo) > 0 { curr := todo[0] todo = todo[1:] - addAnd := func(in Expr) { - and, ok := in.(*AndExpr) - if ok { + addExpr := func(in Expr) { + if and, ok := in.(*AndExpr); ok { todo = append(todo, and) } else { leaves = append(leaves, in) } } - addAnd(curr.Left) - addAnd(curr.Right) + addExpr(curr.Left) + addExpr(curr.Right) } original := len(leaves) var predicates []Expr outer1: - for len(leaves) > 0 { - curr := leaves[0] - leaves = leaves[1:] + for _, curr := range leaves { for _, alreadyIn := range predicates { if Equals.Expr(alreadyIn, curr) { + if log.V(0) { + skipped = append(skipped, &AndExpr{Left: alreadyIn, Right: curr}) + } continue outer1 } } predicates = append(predicates, curr) } if original == len(predicates) { - return in, NoChange + return in, noChange{} } var result Expr for i, curr := range predicates { @@ -345,5 +389,62 @@ outer1: } result = &AndExpr{Left: result, Right: curr} } - return result, Changed + return AndExpressions(leaves...), newChange("A AND A => A", func() Expr { + var result Expr + for _, andExpr := range skipped { + if result == nil { + result = andExpr + continue + } + + result = &AndExpr{ + Left: result, + Right: andExpr, + } + } + return result + }) +} + +type ( + rewriteState interface { + changed() bool + } + noChange struct{} + + // changed makes it possible to make sure we have a rule string for each change we do in the expression tree + changed struct { + rule string + + // ExprMatched is a function here so building of this expression can be paid only when we are debug logging + exprMatched func() Expr + } +) + +func (noChange) changed() bool { return false } +func (changed) changed() bool { return true } + +// f returns a function that returns the expression. It's short by design, so it interferes minimally +// used for logging +func f(e Expr) func() Expr { + return func() Expr { return e } +} + +func printRule(rule string, expr func() Expr) { + if log.V(10) { + log.Infof("Rule: %s ON %s", rule, String(expr())) + } +} + +func printExpr(expr SQLNode) { + if log.V(10) { + log.Infof("Current: %s", String(expr)) + } +} + +func newChange(rule string, exprMatched func() Expr) changed { + return changed{ + rule: rule, + exprMatched: exprMatched, + } } diff --git a/go/vt/sqlparser/predicate_rewriting_test.go b/go/vt/sqlparser/predicate_rewriting_test.go index 1c86dec61a2..34e23597894 100644 --- a/go/vt/sqlparser/predicate_rewriting_test.go +++ b/go/vt/sqlparser/predicate_rewriting_test.go @@ -92,7 +92,7 @@ func TestSimplifyExpression(in *testing.T) { require.NoError(t, err) expr, didRewrite := simplifyExpression(expr) - assert.True(t, didRewrite == Changed) + assert.True(t, didRewrite.changed()) assert.Equal(t, tc.expected, String(expr)) }) } @@ -114,12 +114,21 @@ func TestRewritePredicate(in *testing.T) { }, { in: "(A and B) OR (A and C)", expected: "A and (B or C)", + }, { + in: "(A and B) OR (C and A)", + expected: "A and (B or C)", + }, { + in: "(B and A) OR (A and C)", + expected: "A and (B or C)", }, { in: "(A and B) or (A and C) or (A and D)", expected: "A and (B or C or D)", }, { in: "(a=1 or a IN (1,2)) or (a = 2 or a = 3)", expected: "a in (1, 2, 3)", + }, { + in: "A and (B or A)", + expected: "A", }} for _, tc := range tests { diff --git a/go/vt/sqlparser/redact_query_test.go b/go/vt/sqlparser/redact_query_test.go index 029a307e7c8..1cfd6d83af3 100644 --- a/go/vt/sqlparser/redact_query_test.go +++ b/go/vt/sqlparser/redact_query_test.go @@ -29,5 +29,5 @@ func TestRedactSQLStatements(t *testing.T) { t.Fatalf("redacting sql failed: %v", err) } - require.Equal(t, "select a, b, c from t where x = :x and y = :x and z = :z", redactedSQL) + require.Equal(t, "select a, b, c from t where x = :x /* INT64 */ and y = :x /* INT64 */ and z = :z /* VARCHAR */", redactedSQL) } diff --git a/go/vt/sqlparser/sql.go b/go/vt/sqlparser/sql.go index c9bb09ec11b..64e2b8d9e4c 100644 --- a/go/vt/sqlparser/sql.go +++ b/go/vt/sqlparser/sql.go @@ -41,7 +41,7 @@ func skipToEnd(yylex yyLexer) { yylex.(*Tokenizer).SkipToEnd = true } -func bindVariable(yylex yyLexer, bvar string) { +func markBindVariable(yylex yyLexer, bvar string) { yylex.(*Tokenizer).BindVars[bvar] = struct{}{} } @@ -401,294 +401,304 @@ const APPROXNUM = 57698 const SIGNED = 57699 const UNSIGNED = 57700 const ZEROFILL = 57701 -const CODE = 57702 -const COLLATION = 57703 -const COLUMNS = 57704 -const DATABASES = 57705 -const ENGINES = 57706 -const EVENT = 57707 -const EXTENDED = 57708 -const FIELDS = 57709 -const FULL = 57710 -const FUNCTION = 57711 -const GTID_EXECUTED = 57712 -const KEYSPACES = 57713 -const OPEN = 57714 -const PLUGINS = 57715 -const PRIVILEGES = 57716 -const PROCESSLIST = 57717 -const SCHEMAS = 57718 -const TABLES = 57719 -const TRIGGERS = 57720 -const USER = 57721 -const VGTID_EXECUTED = 57722 -const VITESS_KEYSPACES = 57723 -const VITESS_METADATA = 57724 -const VITESS_MIGRATIONS = 57725 -const VITESS_REPLICATION_STATUS = 57726 -const VITESS_SHARDS = 57727 -const VITESS_TABLETS = 57728 -const VITESS_TARGET = 57729 -const VSCHEMA = 57730 -const VITESS_THROTTLED_APPS = 57731 -const NAMES = 57732 -const GLOBAL = 57733 -const SESSION = 57734 -const ISOLATION = 57735 -const LEVEL = 57736 -const READ = 57737 -const WRITE = 57738 -const ONLY = 57739 -const REPEATABLE = 57740 -const COMMITTED = 57741 -const UNCOMMITTED = 57742 -const SERIALIZABLE = 57743 -const CURRENT_TIMESTAMP = 57744 -const DATABASE = 57745 -const CURRENT_DATE = 57746 -const NOW = 57747 -const CURRENT_TIME = 57748 -const LOCALTIME = 57749 -const LOCALTIMESTAMP = 57750 -const CURRENT_USER = 57751 -const UTC_DATE = 57752 -const UTC_TIME = 57753 -const UTC_TIMESTAMP = 57754 -const DAY = 57755 -const DAY_HOUR = 57756 -const DAY_MICROSECOND = 57757 -const DAY_MINUTE = 57758 -const DAY_SECOND = 57759 -const HOUR = 57760 -const HOUR_MICROSECOND = 57761 -const HOUR_MINUTE = 57762 -const HOUR_SECOND = 57763 -const MICROSECOND = 57764 -const MINUTE = 57765 -const MINUTE_MICROSECOND = 57766 -const MINUTE_SECOND = 57767 -const MONTH = 57768 -const QUARTER = 57769 -const SECOND = 57770 -const SECOND_MICROSECOND = 57771 -const YEAR_MONTH = 57772 -const WEEK = 57773 -const REPLACE = 57774 -const CONVERT = 57775 -const CAST = 57776 -const SUBSTR = 57777 -const SUBSTRING = 57778 -const SEPARATOR = 57779 -const TIMESTAMPADD = 57780 -const TIMESTAMPDIFF = 57781 -const WEIGHT_STRING = 57782 -const LTRIM = 57783 -const RTRIM = 57784 -const TRIM = 57785 -const JSON_ARRAY = 57786 -const JSON_OBJECT = 57787 -const JSON_QUOTE = 57788 -const JSON_DEPTH = 57789 -const JSON_TYPE = 57790 -const JSON_LENGTH = 57791 -const JSON_VALID = 57792 -const JSON_ARRAY_APPEND = 57793 -const JSON_ARRAY_INSERT = 57794 -const JSON_INSERT = 57795 -const JSON_MERGE = 57796 -const JSON_MERGE_PATCH = 57797 -const JSON_MERGE_PRESERVE = 57798 -const JSON_REMOVE = 57799 -const JSON_REPLACE = 57800 -const JSON_SET = 57801 -const JSON_UNQUOTE = 57802 -const COUNT = 57803 -const AVG = 57804 -const MAX = 57805 -const MIN = 57806 -const SUM = 57807 -const GROUP_CONCAT = 57808 -const BIT_AND = 57809 -const BIT_OR = 57810 -const BIT_XOR = 57811 -const STD = 57812 -const STDDEV = 57813 -const STDDEV_POP = 57814 -const STDDEV_SAMP = 57815 -const VAR_POP = 57816 -const VAR_SAMP = 57817 -const VARIANCE = 57818 -const REGEXP_INSTR = 57819 -const REGEXP_LIKE = 57820 -const REGEXP_REPLACE = 57821 -const REGEXP_SUBSTR = 57822 -const ExtractValue = 57823 -const UpdateXML = 57824 -const GET_LOCK = 57825 -const RELEASE_LOCK = 57826 -const RELEASE_ALL_LOCKS = 57827 -const IS_FREE_LOCK = 57828 -const IS_USED_LOCK = 57829 -const LOCATE = 57830 -const POSITION = 57831 -const MATCH = 57832 -const AGAINST = 57833 -const BOOLEAN = 57834 -const LANGUAGE = 57835 -const WITH = 57836 -const QUERY = 57837 -const EXPANSION = 57838 -const WITHOUT = 57839 -const VALIDATION = 57840 -const UNUSED = 57841 -const ARRAY = 57842 -const BYTE = 57843 -const CUME_DIST = 57844 -const DESCRIPTION = 57845 -const DENSE_RANK = 57846 -const EMPTY = 57847 -const EXCEPT = 57848 -const FIRST_VALUE = 57849 -const GROUPING = 57850 -const GROUPS = 57851 -const JSON_TABLE = 57852 -const LAG = 57853 -const LAST_VALUE = 57854 -const LATERAL = 57855 -const LEAD = 57856 -const NTH_VALUE = 57857 -const NTILE = 57858 -const OF = 57859 -const OVER = 57860 -const PERCENT_RANK = 57861 -const RANK = 57862 -const RECURSIVE = 57863 -const ROW_NUMBER = 57864 -const SYSTEM = 57865 -const WINDOW = 57866 -const ACTIVE = 57867 -const ADMIN = 57868 -const AUTOEXTEND_SIZE = 57869 -const BUCKETS = 57870 -const CLONE = 57871 -const COLUMN_FORMAT = 57872 -const COMPONENT = 57873 -const DEFINITION = 57874 -const ENFORCED = 57875 -const ENGINE_ATTRIBUTE = 57876 -const EXCLUDE = 57877 -const FOLLOWING = 57878 -const GET_MASTER_PUBLIC_KEY = 57879 -const HISTOGRAM = 57880 -const HISTORY = 57881 -const INACTIVE = 57882 -const INVISIBLE = 57883 -const LOCKED = 57884 -const MASTER_COMPRESSION_ALGORITHMS = 57885 -const MASTER_PUBLIC_KEY_PATH = 57886 -const MASTER_TLS_CIPHERSUITES = 57887 -const MASTER_ZSTD_COMPRESSION_LEVEL = 57888 -const NESTED = 57889 -const NETWORK_NAMESPACE = 57890 -const NOWAIT = 57891 -const NULLS = 57892 -const OJ = 57893 -const OLD = 57894 -const OPTIONAL = 57895 -const ORDINALITY = 57896 -const ORGANIZATION = 57897 -const OTHERS = 57898 -const PARTIAL = 57899 -const PATH = 57900 -const PERSIST = 57901 -const PERSIST_ONLY = 57902 -const PRECEDING = 57903 -const PRIVILEGE_CHECKS_USER = 57904 -const PROCESS = 57905 -const RANDOM = 57906 -const REFERENCE = 57907 -const REQUIRE_ROW_FORMAT = 57908 -const RESOURCE = 57909 -const RESPECT = 57910 -const RESTART = 57911 -const RETAIN = 57912 -const REUSE = 57913 -const ROLE = 57914 -const SECONDARY = 57915 -const SECONDARY_ENGINE = 57916 -const SECONDARY_ENGINE_ATTRIBUTE = 57917 -const SECONDARY_LOAD = 57918 -const SECONDARY_UNLOAD = 57919 -const SIMPLE = 57920 -const SKIP = 57921 -const SRID = 57922 -const THREAD_PRIORITY = 57923 -const TIES = 57924 -const UNBOUNDED = 57925 -const VCPU = 57926 -const VISIBLE = 57927 -const RETURNING = 57928 -const FORMAT_BYTES = 57929 -const FORMAT_PICO_TIME = 57930 -const PS_CURRENT_THREAD_ID = 57931 -const PS_THREAD_ID = 57932 -const GTID_SUBSET = 57933 -const GTID_SUBTRACT = 57934 -const WAIT_FOR_EXECUTED_GTID_SET = 57935 -const WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS = 57936 -const FORMAT = 57937 -const TREE = 57938 -const VITESS = 57939 -const TRADITIONAL = 57940 -const VTEXPLAIN = 57941 -const VEXPLAIN = 57942 -const PLAN = 57943 -const LOCAL = 57944 -const LOW_PRIORITY = 57945 -const NO_WRITE_TO_BINLOG = 57946 -const LOGS = 57947 -const ERROR = 57948 -const GENERAL = 57949 -const HOSTS = 57950 -const OPTIMIZER_COSTS = 57951 -const USER_RESOURCES = 57952 -const SLOW = 57953 -const CHANNEL = 57954 -const RELAY = 57955 -const EXPORT = 57956 -const CURRENT = 57957 -const ROW = 57958 -const ROWS = 57959 -const AVG_ROW_LENGTH = 57960 -const CONNECTION = 57961 -const CHECKSUM = 57962 -const DELAY_KEY_WRITE = 57963 -const ENCRYPTION = 57964 -const ENGINE = 57965 -const INSERT_METHOD = 57966 -const MAX_ROWS = 57967 -const MIN_ROWS = 57968 -const PACK_KEYS = 57969 -const PASSWORD = 57970 -const FIXED = 57971 -const DYNAMIC = 57972 -const COMPRESSED = 57973 -const REDUNDANT = 57974 -const COMPACT = 57975 -const ROW_FORMAT = 57976 -const STATS_AUTO_RECALC = 57977 -const STATS_PERSISTENT = 57978 -const STATS_SAMPLE_PAGES = 57979 -const STORAGE = 57980 -const MEMORY = 57981 -const DISK = 57982 -const PARTITIONS = 57983 -const LINEAR = 57984 -const RANGE = 57985 -const LIST = 57986 -const SUBPARTITION = 57987 -const SUBPARTITIONS = 57988 -const HASH = 57989 +const PURGE = 57702 +const BEFORE = 57703 +const CODE = 57704 +const COLLATION = 57705 +const COLUMNS = 57706 +const DATABASES = 57707 +const ENGINES = 57708 +const EVENT = 57709 +const EXTENDED = 57710 +const FIELDS = 57711 +const FULL = 57712 +const FUNCTION = 57713 +const GTID_EXECUTED = 57714 +const KEYSPACES = 57715 +const OPEN = 57716 +const PLUGINS = 57717 +const PRIVILEGES = 57718 +const PROCESSLIST = 57719 +const SCHEMAS = 57720 +const TABLES = 57721 +const TRIGGERS = 57722 +const USER = 57723 +const VGTID_EXECUTED = 57724 +const VITESS_KEYSPACES = 57725 +const VITESS_METADATA = 57726 +const VITESS_MIGRATIONS = 57727 +const VITESS_REPLICATION_STATUS = 57728 +const VITESS_SHARDS = 57729 +const VITESS_TABLETS = 57730 +const VITESS_TARGET = 57731 +const VSCHEMA = 57732 +const VITESS_THROTTLED_APPS = 57733 +const NAMES = 57734 +const GLOBAL = 57735 +const SESSION = 57736 +const ISOLATION = 57737 +const LEVEL = 57738 +const READ = 57739 +const WRITE = 57740 +const ONLY = 57741 +const REPEATABLE = 57742 +const COMMITTED = 57743 +const UNCOMMITTED = 57744 +const SERIALIZABLE = 57745 +const CURRENT_TIMESTAMP = 57746 +const DATABASE = 57747 +const CURRENT_DATE = 57748 +const NOW = 57749 +const CURRENT_TIME = 57750 +const LOCALTIME = 57751 +const LOCALTIMESTAMP = 57752 +const CURRENT_USER = 57753 +const UTC_DATE = 57754 +const UTC_TIME = 57755 +const UTC_TIMESTAMP = 57756 +const DAY = 57757 +const DAY_HOUR = 57758 +const DAY_MICROSECOND = 57759 +const DAY_MINUTE = 57760 +const DAY_SECOND = 57761 +const HOUR = 57762 +const HOUR_MICROSECOND = 57763 +const HOUR_MINUTE = 57764 +const HOUR_SECOND = 57765 +const MICROSECOND = 57766 +const MINUTE = 57767 +const MINUTE_MICROSECOND = 57768 +const MINUTE_SECOND = 57769 +const MONTH = 57770 +const QUARTER = 57771 +const SECOND = 57772 +const SECOND_MICROSECOND = 57773 +const YEAR_MONTH = 57774 +const WEEK = 57775 +const REPLACE = 57776 +const CONVERT = 57777 +const CAST = 57778 +const SUBSTR = 57779 +const SUBSTRING = 57780 +const SEPARATOR = 57781 +const TIMESTAMPADD = 57782 +const TIMESTAMPDIFF = 57783 +const WEIGHT_STRING = 57784 +const LTRIM = 57785 +const RTRIM = 57786 +const TRIM = 57787 +const JSON_ARRAY = 57788 +const JSON_OBJECT = 57789 +const JSON_QUOTE = 57790 +const JSON_DEPTH = 57791 +const JSON_TYPE = 57792 +const JSON_LENGTH = 57793 +const JSON_VALID = 57794 +const JSON_ARRAY_APPEND = 57795 +const JSON_ARRAY_INSERT = 57796 +const JSON_INSERT = 57797 +const JSON_MERGE = 57798 +const JSON_MERGE_PATCH = 57799 +const JSON_MERGE_PRESERVE = 57800 +const JSON_REMOVE = 57801 +const JSON_REPLACE = 57802 +const JSON_SET = 57803 +const JSON_UNQUOTE = 57804 +const COUNT = 57805 +const AVG = 57806 +const MAX = 57807 +const MIN = 57808 +const SUM = 57809 +const GROUP_CONCAT = 57810 +const BIT_AND = 57811 +const BIT_OR = 57812 +const BIT_XOR = 57813 +const STD = 57814 +const STDDEV = 57815 +const STDDEV_POP = 57816 +const STDDEV_SAMP = 57817 +const VAR_POP = 57818 +const VAR_SAMP = 57819 +const VARIANCE = 57820 +const REGEXP_INSTR = 57821 +const REGEXP_LIKE = 57822 +const REGEXP_REPLACE = 57823 +const REGEXP_SUBSTR = 57824 +const ExtractValue = 57825 +const UpdateXML = 57826 +const GET_LOCK = 57827 +const RELEASE_LOCK = 57828 +const RELEASE_ALL_LOCKS = 57829 +const IS_FREE_LOCK = 57830 +const IS_USED_LOCK = 57831 +const LOCATE = 57832 +const POSITION = 57833 +const ST_GeometryCollectionFromText = 57834 +const ST_GeometryFromText = 57835 +const ST_LineStringFromText = 57836 +const ST_MultiLineStringFromText = 57837 +const ST_MultiPointFromText = 57838 +const ST_MultiPolygonFromText = 57839 +const ST_PointFromText = 57840 +const ST_PolygonFromText = 57841 +const MATCH = 57842 +const AGAINST = 57843 +const BOOLEAN = 57844 +const LANGUAGE = 57845 +const WITH = 57846 +const QUERY = 57847 +const EXPANSION = 57848 +const WITHOUT = 57849 +const VALIDATION = 57850 +const UNUSED = 57851 +const ARRAY = 57852 +const BYTE = 57853 +const CUME_DIST = 57854 +const DESCRIPTION = 57855 +const DENSE_RANK = 57856 +const EMPTY = 57857 +const EXCEPT = 57858 +const FIRST_VALUE = 57859 +const GROUPING = 57860 +const GROUPS = 57861 +const JSON_TABLE = 57862 +const LAG = 57863 +const LAST_VALUE = 57864 +const LATERAL = 57865 +const LEAD = 57866 +const NTH_VALUE = 57867 +const NTILE = 57868 +const OF = 57869 +const OVER = 57870 +const PERCENT_RANK = 57871 +const RANK = 57872 +const RECURSIVE = 57873 +const ROW_NUMBER = 57874 +const SYSTEM = 57875 +const WINDOW = 57876 +const ACTIVE = 57877 +const ADMIN = 57878 +const AUTOEXTEND_SIZE = 57879 +const BUCKETS = 57880 +const CLONE = 57881 +const COLUMN_FORMAT = 57882 +const COMPONENT = 57883 +const DEFINITION = 57884 +const ENFORCED = 57885 +const ENGINE_ATTRIBUTE = 57886 +const EXCLUDE = 57887 +const FOLLOWING = 57888 +const GET_MASTER_PUBLIC_KEY = 57889 +const HISTOGRAM = 57890 +const HISTORY = 57891 +const INACTIVE = 57892 +const INVISIBLE = 57893 +const LOCKED = 57894 +const MASTER_COMPRESSION_ALGORITHMS = 57895 +const MASTER_PUBLIC_KEY_PATH = 57896 +const MASTER_TLS_CIPHERSUITES = 57897 +const MASTER_ZSTD_COMPRESSION_LEVEL = 57898 +const NESTED = 57899 +const NETWORK_NAMESPACE = 57900 +const NOWAIT = 57901 +const NULLS = 57902 +const OJ = 57903 +const OLD = 57904 +const OPTIONAL = 57905 +const ORDINALITY = 57906 +const ORGANIZATION = 57907 +const OTHERS = 57908 +const PARTIAL = 57909 +const PATH = 57910 +const PERSIST = 57911 +const PERSIST_ONLY = 57912 +const PRECEDING = 57913 +const PRIVILEGE_CHECKS_USER = 57914 +const PROCESS = 57915 +const RANDOM = 57916 +const REFERENCE = 57917 +const REQUIRE_ROW_FORMAT = 57918 +const RESOURCE = 57919 +const RESPECT = 57920 +const RESTART = 57921 +const RETAIN = 57922 +const REUSE = 57923 +const ROLE = 57924 +const SECONDARY = 57925 +const SECONDARY_ENGINE = 57926 +const SECONDARY_ENGINE_ATTRIBUTE = 57927 +const SECONDARY_LOAD = 57928 +const SECONDARY_UNLOAD = 57929 +const SIMPLE = 57930 +const SKIP = 57931 +const SRID = 57932 +const THREAD_PRIORITY = 57933 +const TIES = 57934 +const UNBOUNDED = 57935 +const VCPU = 57936 +const VISIBLE = 57937 +const RETURNING = 57938 +const FORMAT_BYTES = 57939 +const FORMAT_PICO_TIME = 57940 +const PS_CURRENT_THREAD_ID = 57941 +const PS_THREAD_ID = 57942 +const GTID_SUBSET = 57943 +const GTID_SUBTRACT = 57944 +const WAIT_FOR_EXECUTED_GTID_SET = 57945 +const WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS = 57946 +const FORMAT = 57947 +const TREE = 57948 +const VITESS = 57949 +const TRADITIONAL = 57950 +const VTEXPLAIN = 57951 +const VEXPLAIN = 57952 +const PLAN = 57953 +const LOCAL = 57954 +const LOW_PRIORITY = 57955 +const NO_WRITE_TO_BINLOG = 57956 +const LOGS = 57957 +const ERROR = 57958 +const GENERAL = 57959 +const HOSTS = 57960 +const OPTIMIZER_COSTS = 57961 +const USER_RESOURCES = 57962 +const SLOW = 57963 +const CHANNEL = 57964 +const RELAY = 57965 +const EXPORT = 57966 +const CURRENT = 57967 +const ROW = 57968 +const ROWS = 57969 +const AVG_ROW_LENGTH = 57970 +const CONNECTION = 57971 +const CHECKSUM = 57972 +const DELAY_KEY_WRITE = 57973 +const ENCRYPTION = 57974 +const ENGINE = 57975 +const INSERT_METHOD = 57976 +const MAX_ROWS = 57977 +const MIN_ROWS = 57978 +const PACK_KEYS = 57979 +const PASSWORD = 57980 +const FIXED = 57981 +const DYNAMIC = 57982 +const COMPRESSED = 57983 +const REDUNDANT = 57984 +const COMPACT = 57985 +const ROW_FORMAT = 57986 +const STATS_AUTO_RECALC = 57987 +const STATS_PERSISTENT = 57988 +const STATS_SAMPLE_PAGES = 57989 +const STORAGE = 57990 +const MEMORY = 57991 +const DISK = 57992 +const PARTITIONS = 57993 +const LINEAR = 57994 +const RANGE = 57995 +const LIST = 57996 +const SUBPARTITION = 57997 +const SUBPARTITIONS = 57998 +const HASH = 57999 var yyToknames = [...]string{ "$end", @@ -1067,6 +1077,8 @@ var yyToknames = [...]string{ "SIGNED", "UNSIGNED", "ZEROFILL", + "PURGE", + "BEFORE", "CODE", "COLLATION", "COLUMNS", @@ -1197,6 +1209,14 @@ var yyToknames = [...]string{ "IS_USED_LOCK", "LOCATE", "POSITION", + "ST_GeometryCollectionFromText", + "ST_GeometryFromText", + "ST_LineStringFromText", + "ST_MultiLineStringFromText", + "ST_MultiPointFromText", + "ST_MultiPolygonFromText", + "ST_PointFromText", + "ST_PolygonFromText", "MATCH", "AGAINST", "BOOLEAN", @@ -1370,4825 +1390,1182 @@ var yyExca = [...]int{ 1, -1, -2, 0, -1, 2, - 13, 49, - 14, 49, - -2, 38, - -1, 50, - 1, 157, - 665, 157, - -2, 165, + 13, 50, + 14, 50, + -2, 39, -1, 51, - 135, 165, - 176, 165, - 345, 165, - -2, 519, - -1, 58, - 36, 766, - 239, 766, - 250, 766, - 285, 780, - 286, 780, - -2, 768, - -1, 63, - 241, 804, - -2, 802, - -1, 118, - 238, 1458, - -2, 131, - -1, 120, 1, 158, - 665, 158, - -2, 165, - -1, 131, - 136, 405, - 244, 405, - -2, 508, - -1, 150, - 135, 165, - 176, 165, - 345, 165, - -2, 528, - -1, 812, - 87, 1475, - -2, 1329, - -1, 813, - 87, 1476, - 221, 1480, - -2, 1330, - -1, 814, - 221, 1479, - -2, 40, - -1, 894, - 60, 878, - -2, 893, - -1, 980, - 249, 41, - 254, 41, - -2, 416, - -1, 1065, - 1, 576, - 665, 576, - -2, 165, - -1, 1364, - 221, 1480, - -2, 1330, - -1, 1514, - 60, 879, - -2, 898, - -1, 1515, - 60, 880, - -2, 899, - -1, 1566, - 135, 165, - 176, 165, - 345, 165, - -2, 455, - -1, 1647, - 136, 405, - 244, 405, - -2, 508, - -1, 1656, + 675, 158, + -2, 166, + -1, 52, + 135, 166, + 176, 166, + 345, 166, + -2, 521, + -1, 60, + 36, 770, + 239, 770, + 250, 770, + 285, 784, + 286, 784, + -2, 772, + -1, 65, + 241, 808, + -2, 806, + -1, 120, + 238, 1490, + -2, 132, + -1, 122, + 1, 159, + 675, 159, + -2, 166, + -1, 133, + 136, 406, + 244, 406, + -2, 510, + -1, 152, + 135, 166, + 176, 166, + 345, 166, + -2, 530, + -1, 837, + 87, 1507, + -2, 1361, + -1, 838, + 87, 1508, + 221, 1512, + -2, 1362, + -1, 839, + 221, 1511, + -2, 41, + -1, 919, + 60, 882, + -2, 897, + -1, 1005, 249, 42, 254, 42, -2, 417, - -1, 2017, - 221, 1484, - -2, 1478, - -1, 2018, - 221, 1480, - -2, 1476, - -1, 2118, - 135, 165, - 176, 165, - 345, 165, + -1, 1090, + 1, 578, + 675, 578, + -2, 166, + -1, 1390, + 221, 1512, + -2, 1362, + -1, 1552, + 60, 883, + -2, 902, + -1, 1553, + 60, 884, + -2, 903, + -1, 1604, + 135, 166, + 176, 166, + 345, 166, -2, 456, - -1, 2125, - 26, 186, - -2, 188, - -1, 2494, - 78, 96, - 88, 96, - -2, 957, - -1, 2563, - 640, 692, - -2, 666, - -1, 2731, - 50, 1426, - -2, 1420, - -1, 3387, - 640, 692, - -2, 680, - -1, 3475, - 90, 624, - 95, 624, - 105, 624, - 178, 624, - 179, 624, - 180, 624, - 181, 624, - 182, 624, - 183, 624, - 184, 624, - 185, 624, - 186, 624, - 187, 624, - 188, 624, - 189, 624, - 190, 624, - 191, 624, - 192, 624, - 193, 624, - 194, 624, - 195, 624, - 196, 624, - 197, 624, - 198, 624, - 199, 624, - 200, 624, - 201, 624, - 202, 624, - 203, 624, - 204, 624, - 205, 624, - 206, 624, - 207, 624, - 208, 624, - 209, 624, - 210, 624, - 211, 624, - 212, 624, - 213, 624, - 214, 624, - 215, 624, - 216, 624, - 217, 624, - 218, 624, - 219, 624, - -2, 1837, + -1, 1685, + 136, 406, + 244, 406, + -2, 510, + -1, 1694, + 249, 43, + 254, 43, + -2, 418, + -1, 2069, + 221, 1516, + -2, 1510, + -1, 2070, + 221, 1512, + -2, 1508, + -1, 2170, + 135, 166, + 176, 166, + 345, 166, + -2, 457, + -1, 2177, + 26, 187, + -2, 189, + -1, 2568, + 78, 97, + 88, 97, + -2, 961, + -1, 2637, + 650, 694, + -2, 668, + -1, 2813, + 50, 1458, + -2, 1452, + -1, 3513, + 650, 694, + -2, 682, + -1, 3602, + 90, 626, + 95, 626, + 105, 626, + 178, 626, + 179, 626, + 180, 626, + 181, 626, + 182, 626, + 183, 626, + 184, 626, + 185, 626, + 186, 626, + 187, 626, + 188, 626, + 189, 626, + 190, 626, + 191, 626, + 192, 626, + 193, 626, + 194, 626, + 195, 626, + 196, 626, + 197, 626, + 198, 626, + 199, 626, + 200, 626, + 201, 626, + 202, 626, + 203, 626, + 204, 626, + 205, 626, + 206, 626, + 207, 626, + 208, 626, + 209, 626, + 210, 626, + 211, 626, + 212, 626, + 213, 626, + 214, 626, + 215, 626, + 216, 626, + 217, 626, + 218, 626, + 219, 626, + -2, 1870, } const yyPrivate = 57344 -const yyLast = 46655 +const yyLast = 49411 var yyAct = [...]int{ - 1522, 823, 3133, 3134, 815, 1882, 3132, 3546, 3557, 3368, - 3452, 816, 684, 3515, 2115, 3516, 2066, 3473, 1569, 3103, - 2960, 3418, 2881, 2783, 3441, 2046, 3352, 3300, 2841, 2790, - 663, 2846, 2843, 2842, 2832, 2840, 910, 2845, 2844, 778, - 2744, 3350, 3090, 1828, 2394, 3162, 5, 782, 887, 3340, - 40, 1129, 2048, 2747, 2428, 1492, 2690, 666, 2189, 1529, - 2748, 2745, 2861, 2999, 2860, 3167, 2798, 2624, 2993, 2070, - 2467, 777, 776, 694, 2089, 2863, 783, 2086, 3019, 2742, - 2732, 2454, 2008, 2152, 2528, 2157, 2985, 662, 2608, 2887, - 2220, 664, 2529, 2177, 1625, 2530, 159, 2103, 2560, 2479, - 911, 889, 1672, 2091, 41, 2460, 39, 2446, 2090, 1516, - 2430, 2013, 2005, 1977, 1976, 2600, 1897, 2198, 2176, 145, - 2078, 2237, 2159, 2521, 975, 970, 1836, 658, 1654, 891, - 1558, 895, 2496, 988, 1131, 1538, 2093, 676, 1496, 1376, - 1855, 100, 101, 1901, 1304, 1775, 2174, 1753, 1289, 949, - 913, 2148, 96, 946, 1557, 950, 1543, 978, 671, 976, - 977, 1771, 2014, 981, 928, 930, 901, 1973, 95, 1360, - 1336, 1127, 1910, 1827, 1120, 898, 1780, 1106, 81, 1061, - 2071, 923, 899, 670, 89, 80, 653, 102, 897, 1384, - 896, 163, 123, 103, 1380, 3377, 121, 122, 2553, 94, - 3547, 2851, 3091, 2829, 186, 2191, 2192, 2193, 3403, 2191, - 2583, 2582, 2235, 2551, 2848, 3083, 91, 2851, 3499, 1305, - 1878, 2616, 632, 1661, 918, 922, 91, 91, 125, 2617, - 147, 1620, 3398, 3399, 3404, 1843, 1842, 1738, 638, 598, - 943, 168, 124, 91, 3046, 1858, 128, 1017, 904, 1841, - 1646, 129, 1305, 2149, 3137, 1840, 654, 2849, 1839, 832, - 833, 834, 1838, 968, 1811, 905, 992, 890, 888, 3137, - 1300, 937, 158, 2849, 832, 833, 834, 656, 146, 657, - 638, 2043, 2044, 2855, 2280, 2426, 3494, 912, 1025, 1077, - 991, 2728, 2573, 938, 936, 780, 781, 165, 942, 2855, - 166, 2456, 130, 3519, 2224, 967, 959, 954, 3453, 1018, - 1021, 1022, 124, 966, 1321, 2694, 3567, 965, 964, 134, - 135, 157, 156, 185, 632, 3503, 1523, 1315, 3501, 2, - 3514, 3537, 2965, 3399, 2964, 2222, 2576, 3353, 632, 2395, - 1848, 3136, 2906, 3296, 1034, 936, 780, 781, 2223, 3295, - 3502, 3096, 1016, 3500, 3097, 3497, 3136, 1015, 3528, 3306, - 1315, 82, 3115, 3104, 84, 3442, 629, 3449, 2217, 1291, - 82, 632, 107, 108, 109, 3305, 112, 2289, 82, 118, - 124, 1887, 187, 3459, 3478, 593, 3114, 2926, 1635, 632, - 2427, 2590, 2591, 2779, 2470, 2852, 651, 652, 3459, 2780, - 2781, 82, 3382, 659, 2110, 2111, 883, 884, 885, 886, - 2109, 2852, 894, 2074, 614, 2505, 2615, 2286, 2504, 2471, - 2599, 2506, 151, 132, 154, 139, 131, 612, 152, 153, - 1820, 1821, 633, 1311, 2168, 169, 1303, 1101, 1102, 91, - 925, 926, 2287, 828, 175, 140, 83, 1124, 91, 1318, - 3180, 1319, 1320, 1012, 1096, 3369, 91, 2162, 881, 143, - 141, 136, 137, 138, 142, 880, 1311, 609, 1290, 1084, - 963, 133, 1070, 1071, 1085, 1559, 624, 1560, 2554, 91, - 144, 2517, 1301, 1084, 1097, 2128, 2127, 2996, 1085, 2045, - 2914, 619, 3520, 1090, 1060, 2658, 1083, 1113, 1082, 1115, - 1819, 622, 2463, 2464, 1073, 2912, 2278, 632, 914, 1823, - 632, 920, 920, 3521, 632, 2883, 650, 646, 929, 1555, - 2888, 644, 3328, 2601, 3329, 892, 1500, 83, 961, 2561, - 2199, 2258, 2876, 2259, 633, 2260, 2586, 1112, 1114, 1103, - 2877, 2281, 2282, 2284, 2283, 3549, 892, 2243, 633, 1104, - 1754, 1117, 2074, 2238, 1122, 1035, 1099, 1100, 1105, 1066, - 1123, 952, 2603, 3085, 3084, 2261, 1759, 599, 160, 601, - 615, 1041, 635, 1040, 634, 605, 1098, 603, 607, 616, - 608, 633, 602, 2885, 613, 1091, 2240, 604, 617, 618, - 621, 625, 626, 627, 623, 620, 3280, 611, 636, 633, - 1064, 1014, 2244, 2202, 2161, 2072, 2073, 2884, 1728, 2242, - 939, 933, 931, 1001, 1031, 1032, 1033, 3495, 1036, 1037, - 1038, 1039, 3141, 2087, 1042, 1043, 1044, 1045, 1046, 1047, - 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, - 1058, 1110, 999, 2287, 971, 1111, 155, 958, 972, 1503, - 960, 2241, 1729, 962, 1730, 1116, 972, 3081, 2693, 1010, - 2659, 939, 933, 931, 1310, 1307, 1308, 1309, 1314, 1316, - 1313, 1009, 1312, 1008, 1007, 1006, 1005, 1004, 1003, 1109, - 998, 1639, 1306, 2250, 2246, 2248, 2249, 2247, 2251, 2252, - 1011, 947, 2802, 3526, 3568, 947, 984, 1310, 1307, 1308, - 1309, 1314, 1316, 1313, 1351, 1312, 1337, 148, 1351, 1660, - 149, 983, 1772, 2607, 947, 1306, 1372, 633, 945, 1362, - 633, 2175, 3376, 3561, 633, 2552, 969, 2588, 2903, 1338, - 1339, 1340, 1341, 1342, 1343, 1344, 1346, 1345, 1347, 1348, - 161, 1094, 2221, 1556, 2072, 2073, 924, 173, 963, 2604, - 955, 2228, 1633, 2227, 2519, 963, 1059, 957, 956, 2822, - 1002, 1768, 829, 3455, 1354, 1355, 1356, 1357, 1292, 1282, - 2555, 3080, 829, 829, 1368, 1027, 2431, 2433, 3455, 1762, - 1028, 1760, 1761, 2997, 1763, 1764, 2585, 1020, 181, 1000, - 2620, 1632, 1631, 983, 2301, 3454, 1118, 1019, 2853, 2854, - 2571, 85, 1283, 1284, 990, 1769, 961, 2610, 637, 990, - 3454, 2857, 2609, 1629, 2853, 2854, 1358, 1659, 2575, 597, - 1063, 3113, 932, 592, 3365, 2598, 3033, 2857, 2597, 630, - 2219, 162, 167, 164, 170, 171, 172, 174, 176, 177, - 178, 179, 3015, 3483, 631, 3135, 120, 180, 182, 183, - 184, 1740, 1739, 1741, 1742, 1743, 1758, 2625, 3044, 3045, - 3135, 3481, 2574, 90, 1299, 2288, 2461, 2165, 1352, 1353, - 3487, 3488, 90, 932, 2501, 2466, 1490, 2610, 2800, 2801, - 90, 2403, 2609, 1890, 1547, 3482, 990, 1386, 1382, 1080, - 1383, 1086, 1087, 1088, 1089, 1455, 1075, 1524, 1526, 2116, - 1072, 1069, 1081, 90, 1351, 1348, 989, 2166, 1911, 2778, - 1107, 989, 1781, 2948, 2164, 1125, 1126, 983, 986, 987, - 907, 947, 1912, 1062, 1504, 980, 984, 1079, 115, 1121, - 990, 962, 1902, 3390, 1013, 1491, 1506, 3076, 962, 1507, - 1510, 2627, 3559, 2432, 1093, 3560, 891, 3558, 2167, 1343, - 1344, 1346, 1345, 1347, 1348, 1095, 1860, 3009, 2163, 1338, - 1339, 1340, 1341, 1342, 1343, 1344, 1346, 1345, 1347, 1348, - 1861, 1349, 1350, 1859, 1461, 1462, 1463, 1464, 1465, 990, - 2239, 1832, 1765, 1561, 2644, 1902, 2799, 2318, 989, 2544, - 1026, 3529, 1508, 1509, 1023, 1320, 100, 101, 2802, 1491, - 116, 1850, 1852, 1853, 1755, 3176, 1756, 1484, 3051, 1757, - 2211, 2637, 2636, 2635, 1319, 1320, 2629, 1497, 2633, 3522, - 2628, 3050, 2626, 2206, 2218, 1851, 1669, 2631, 1668, 1658, - 2211, 1666, 989, 2216, 2214, 1065, 2630, 1001, 983, 986, - 987, 999, 947, 3420, 3358, 3034, 980, 984, 103, 2215, - 903, 1909, 3563, 3288, 2632, 2634, 3287, 1108, 1701, 1782, - 3110, 1704, 3111, 1706, 1322, 1525, 1494, 979, 3278, 2213, - 1078, 3126, 1128, 1505, 1128, 1128, 3125, 2904, 888, 3058, - 3057, 989, 3047, 1528, 890, 2830, 993, 983, 3421, 3359, - 2818, 995, 2526, 1377, 1645, 996, 994, 1723, 1321, 2525, - 2524, 1674, 2171, 1675, 1749, 1677, 1679, 1552, 1553, 1683, - 1685, 1687, 1689, 1691, 1733, 1732, 997, 1664, 1731, 1721, - 1662, 1662, 892, 1361, 1366, 1367, 1715, 1370, 1712, 1371, - 1373, 1374, 1375, 1628, 1378, 1379, 1381, 1381, 1711, 1381, - 1385, 1385, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, - 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, - 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, - 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, - 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, - 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, - 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1709, - 1777, 1663, 1655, 1454, 1321, 1456, 1457, 1458, 1459, 1460, - 1643, 990, 1748, 1511, 1642, 1641, 3569, 1746, 1385, 1385, - 1385, 1385, 1385, 1318, 1773, 1319, 1320, 2293, 2294, 2295, - 1710, 1681, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, - 1474, 1475, 1476, 1477, 1478, 1479, 1735, 124, 966, 1523, - 1783, 1784, 965, 964, 2010, 2880, 1907, 1321, 1286, 1787, - 832, 833, 834, 1493, 1788, 1908, 638, 1652, 1337, 1321, - 2619, 1795, 1796, 1797, 1555, 1523, 1747, 3523, 1808, 1634, - 3385, 1745, 1809, 3041, 638, 2508, 638, 3384, 3533, 1523, - 3486, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1346, 1345, - 1347, 1348, 2010, 3570, 1321, 3362, 2007, 2187, 2186, 1539, - 1734, 1705, 3361, 989, 3360, 2009, 1499, 3283, 993, 983, - 2185, 2184, 892, 995, 2183, 2182, 892, 996, 994, 827, - 2452, 3548, 892, 40, 3485, 3267, 40, 1532, 3266, 1318, - 2355, 1319, 1320, 3378, 1885, 1885, 1627, 1883, 1883, 1886, - 1317, 1523, 1321, 3531, 1523, 1863, 3175, 1865, 1866, 1867, - 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, - 1785, 2921, 1905, 3510, 1523, 3314, 1906, 1789, 3173, 1791, - 1792, 1793, 1794, 1533, 1317, 1523, 1798, 1321, 3465, 1523, - 3313, 1362, 1318, 3122, 1319, 1320, 2452, 3448, 1810, 1856, - 1337, 2646, 1854, 1333, 1318, 1334, 1319, 1320, 1903, 1490, - 1969, 1636, 1637, 1638, 2452, 3428, 3271, 1864, 1489, 1335, - 1349, 1350, 1332, 1338, 1339, 1340, 1341, 1342, 1343, 1344, - 1346, 1345, 1347, 1348, 2452, 3424, 1965, 1523, 3270, 1318, - 2003, 1319, 1320, 1816, 1817, 1339, 1340, 1341, 1342, 1343, - 1344, 1346, 1345, 1347, 1348, 3411, 1523, 3094, 3375, 1963, - 1857, 81, 1833, 97, 81, 2032, 3291, 1523, 1491, 1974, - 1321, 3463, 1523, 1779, 98, 106, 1337, 1488, 1713, 1714, - 1487, 2353, 1524, 2039, 1719, 1720, 105, 1318, 104, 1319, - 1320, 2452, 3279, 2001, 1862, 3094, 1523, 2015, 2357, 1338, - 1339, 1340, 1341, 1342, 1343, 1344, 1346, 1345, 1347, 1348, - 2452, 3092, 97, 2006, 3055, 3040, 2063, 1321, 2889, 99, - 2886, 1889, 1318, 98, 1319, 1320, 1896, 1898, 2821, 1523, - 1951, 2211, 1523, 3102, 2056, 2820, 2057, 3013, 1523, 2040, - 2535, 2079, 2080, 2366, 1523, 1974, 2811, 2810, 2808, 2809, - 1128, 1913, 1914, 1915, 1916, 1523, 1523, 1321, 2522, 2020, - 2021, 1321, 2806, 2807, 2562, 1927, 1341, 1342, 1343, 1344, - 1346, 1345, 1347, 1348, 2125, 2806, 2805, 2743, 1523, 2345, - 2017, 100, 101, 2476, 1523, 1321, 2287, 2584, 3008, 2015, - 2097, 2016, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1323, - 1486, 100, 101, 1321, 2233, 1318, 2232, 1319, 1320, 2019, - 1624, 2565, 2022, 2023, 2558, 2559, 2062, 2069, 2172, 1943, - 1932, 1933, 1934, 1935, 1945, 1936, 1937, 1938, 1950, 1946, - 1939, 1940, 1947, 1948, 1949, 1941, 1942, 1944, 2452, 2451, - 2134, 2135, 2136, 2137, 2051, 3461, 1523, 2311, 1523, 99, - 2038, 1812, 1318, 2119, 1319, 1320, 1778, 2050, 2448, 2129, - 1744, 2130, 2131, 2132, 2133, 1736, 2061, 1726, 904, 3309, - 2101, 2540, 2017, 99, 1888, 1523, 2212, 2140, 2141, 2142, - 2143, 1722, 2123, 2084, 2064, 1718, 1717, 3337, 1523, 3008, - 1716, 2082, 1318, 2154, 1319, 1320, 1318, 1534, 1319, 1320, - 1119, 2107, 2475, 937, 1624, 1623, 2200, 2160, 1523, 2106, - 2105, 1844, 1845, 1846, 1847, 1128, 1128, 2122, 2121, 1337, - 1318, 2300, 1319, 1320, 2468, 938, 1567, 1566, 2124, 83, - 1317, 2311, 83, 3010, 2211, 2468, 2170, 3416, 1318, 3389, - 1319, 1320, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1346, - 1345, 1347, 1348, 1321, 2452, 2476, 2969, 2476, 1321, 2151, - 1891, 1892, 2773, 2808, 2155, 1894, 2173, 920, 920, 1899, - 2169, 2181, 2287, 1904, 992, 2306, 105, 2205, 2716, 2108, - 2208, 2311, 2209, 2366, 1662, 2342, 1917, 1918, 1919, 1920, - 1921, 1922, 1923, 1924, 1925, 1926, 2476, 2204, 991, 2155, - 1952, 1953, 1954, 1955, 1956, 1957, 1959, 3008, 1964, 2203, - 1966, 1967, 1968, 2226, 1970, 1971, 1972, 2341, 1978, 1979, - 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, - 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2211, 2002, 1523, 2004, 1317, 2011, 2012, 920, 2194, - 920, 920, 920, 920, 920, 2077, 2120, 2144, 2146, 2147, - 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2236, 2033, - 2034, 2035, 2036, 2037, 2207, 1527, 2497, 2041, 2497, 1888, - 2304, 2297, 3059, 2299, 2309, 1834, 1818, 2312, 1318, 2313, - 1319, 1320, 1767, 1318, 2320, 1319, 1320, 1554, 2322, 2323, - 2324, 974, 973, 91, 893, 1321, 3491, 920, 2330, 2331, - 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2303, 3431, - 2229, 2264, 1321, 1536, 2230, 2231, 1856, 3302, 1530, 2075, - 2076, 3268, 2305, 3060, 3061, 3062, 3187, 2882, 1321, 2498, - 2197, 2498, 3075, 2298, 2346, 2347, 2348, 2349, 2350, 2500, - 2352, 2287, 1321, 3072, 2354, 2114, 2325, 2277, 2359, 2360, - 3053, 2361, 2931, 2930, 2364, 1626, 2365, 2153, 2878, 2285, - 2368, 1321, 106, 2340, 2372, 2835, 2831, 1321, 2377, 2378, - 2379, 2380, 91, 105, 2566, 104, 2095, 1857, 2833, 1535, - 2296, 2391, 2392, 2225, 99, 2396, 2397, 1321, 1697, 2150, - 2145, 2139, 2138, 2399, 2401, 2532, 3335, 1523, 1751, 1657, - 2404, 2405, 2406, 2407, 2408, 2017, 2156, 2531, 1653, 1622, - 1321, 2415, 2416, 3524, 2417, 117, 2016, 2420, 2422, 2063, - 3303, 2424, 1064, 2168, 2317, 2054, 3332, 1523, 1321, 3543, - 1318, 2436, 1319, 1320, 1885, 1814, 1321, 1883, 2437, 1698, - 1699, 1700, 3541, 1523, 3517, 3318, 1523, 1318, 952, 1319, - 1320, 2984, 1523, 2271, 2272, 2532, 3020, 3021, 2274, 3397, - 1337, 3323, 3023, 1318, 2827, 1319, 1320, 2275, 1321, 2826, - 2825, 2977, 1523, 2743, 2545, 2265, 3026, 1318, 2351, 1319, - 1320, 952, 2435, 1338, 1339, 1340, 1341, 1342, 1343, 1344, - 1346, 1345, 1347, 1348, 2974, 1523, 1318, 1815, 1319, 1320, - 1321, 2765, 1318, 2763, 1319, 1320, 2766, 1321, 2764, 3025, - 2472, 1321, 2972, 1523, 40, 2438, 1321, 2440, 2315, 2453, - 2936, 1523, 1318, 2490, 1319, 1320, 2492, 1321, 2767, 3063, - 2485, 2486, 1321, 2481, 2484, 2485, 2486, 2482, 2762, 2483, - 2487, 2761, 3393, 3020, 3021, 1318, 1321, 1319, 1320, 3157, - 2491, 3156, 2449, 3373, 3304, 1321, 2068, 1531, 1497, 2462, - 2425, 1693, 2060, 1318, 3014, 1319, 1320, 2721, 2720, 3357, - 3166, 1318, 3168, 1319, 1320, 3004, 3064, 3065, 3066, 3001, - 2518, 2520, 1491, 2450, 2919, 1523, 2730, 3000, 1766, 1321, - 879, 2314, 2557, 2465, 2445, 2511, 3275, 2804, 1321, 3155, - 2423, 1523, 2515, 1318, 2536, 1319, 1320, 2495, 1694, 1695, - 1696, 2421, 1523, 2733, 2735, 2499, 2400, 1523, 908, 2502, - 1911, 2897, 2736, 2509, 2581, 2512, 909, 1030, 1321, 1029, - 2381, 1523, 2160, 2531, 1912, 1318, 2613, 1319, 1320, 2373, - 1523, 97, 1318, 2523, 1319, 1320, 1318, 2579, 1319, 1320, - 1321, 1318, 98, 1319, 1320, 1321, 1285, 2572, 125, 1321, - 3006, 2533, 1318, 1321, 1319, 1320, 99, 1318, 3555, 1319, - 1320, 2823, 2292, 2541, 3077, 2542, 1321, 2546, 2547, 2548, - 1321, 1318, 3028, 1319, 1320, 2268, 2319, 3470, 2079, 2080, - 1318, 3374, 1319, 1320, 1645, 1321, 3298, 2326, 2327, 2328, - 2329, 2803, 2308, 2489, 2065, 2578, 2648, 2649, 2650, 2651, - 2652, 2302, 2307, 2623, 2719, 2567, 2568, 2257, 1321, 916, - 917, 2256, 2718, 2577, 1318, 2657, 1319, 1320, 1321, 2255, - 97, 2986, 1321, 1318, 2979, 1319, 1320, 99, 2291, 2975, - 106, 98, 1377, 2946, 2254, 2253, 2640, 2942, 106, 3345, - 1321, 105, 2602, 104, 104, 2638, 3344, 3326, 3174, 105, - 2928, 104, 99, 1318, 2927, 1319, 1320, 3172, 2621, 2653, - 3171, 2605, 3164, 2622, 3073, 3005, 3003, 2836, 1321, 2924, - 2195, 1640, 915, 105, 106, 1318, 3163, 1319, 1320, 2994, - 1318, 2468, 1319, 1320, 1318, 105, 1319, 1320, 1318, 1321, - 1319, 1320, 3145, 2527, 2448, 2670, 2660, 2672, 2641, 3545, - 3544, 1318, 2419, 1319, 1320, 1318, 2418, 1319, 1320, 2343, - 2052, 1548, 2695, 2683, 2684, 2685, 2686, 1540, 2611, 3544, - 1318, 2612, 1319, 1320, 2414, 2700, 2697, 110, 111, 2402, - 3545, 3363, 1321, 3039, 906, 1831, 1829, 1321, 10, 9, - 2006, 1321, 2006, 1318, 2752, 1319, 1320, 3, 93, 1, - 2668, 1539, 2413, 1318, 1288, 1319, 1320, 1318, 1287, 1319, - 1320, 2434, 2770, 3043, 3480, 1321, 2097, 2678, 2679, 2680, - 2681, 2682, 610, 2412, 2740, 1318, 2042, 1319, 1320, 892, - 2746, 2696, 1321, 2698, 2699, 2746, 2755, 2723, 2700, 1830, - 2772, 895, 8, 2724, 2097, 2097, 2097, 2097, 2097, 2639, - 2473, 2474, 1495, 1318, 3518, 1319, 1320, 2715, 3476, 2095, - 2711, 3477, 892, 2493, 2097, 1737, 2411, 2097, 2749, 1727, - 3105, 2410, 1975, 2722, 1318, 2409, 1319, 1320, 3299, 2725, - 2839, 2201, 3071, 2737, 2738, 2712, 2713, 2714, 2158, 982, - 150, 2774, 2117, 2118, 2775, 3444, 2662, 2754, 897, 2398, - 896, 2757, 2758, 2859, 2760, 2756, 114, 2768, 2759, 940, - 113, 100, 101, 985, 1092, 2196, 2393, 1318, 2776, 1319, - 1320, 2838, 1318, 3095, 1319, 1320, 1318, 2782, 1319, 1320, - 2481, 2484, 2485, 2486, 2482, 2534, 2483, 2487, 2813, 2899, - 2537, 2538, 2516, 2815, 2126, 2814, 1573, 1571, 1572, 1570, - 1318, 1575, 1319, 1320, 1574, 2905, 1777, 2344, 2947, 2916, - 2917, 2918, 1822, 2920, 2922, 2866, 2867, 1318, 645, 1319, - 1320, 2858, 2488, 639, 188, 1562, 2570, 2929, 1541, 2160, - 2961, 1024, 2933, 2934, 2935, 2937, 2938, 2939, 2940, 600, - 1321, 2941, 2812, 2943, 2944, 2945, 2873, 2234, 2949, 2950, - 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 606, - 1369, 2893, 2890, 1813, 2892, 2717, 2618, 2966, 1321, 2503, - 2970, 935, 2971, 2973, 927, 2976, 2978, 2900, 2980, 2981, - 2982, 2983, 2901, 2910, 2053, 920, 2989, 2439, 2642, 2643, - 2907, 2908, 2645, 2909, 934, 2647, 2911, 3276, 2913, 2751, - 2915, 2998, 2729, 2731, 2455, 2963, 1321, 2734, 2727, 3356, - 3165, 3429, 2967, 2513, 1537, 2654, 2655, 2656, 1321, 2968, - 2316, 3011, 3012, 1321, 2390, 3016, 1900, 2661, 1321, 1359, - 2663, 2664, 2665, 2094, 3140, 1849, 2666, 2667, 668, 667, - 1978, 2669, 1321, 665, 2671, 2441, 2469, 2673, 2674, 2675, - 2676, 1324, 2389, 817, 2429, 2677, 1978, 1978, 1978, 1978, - 1978, 1549, 1321, 2992, 2480, 2478, 2477, 2687, 2266, 2990, - 2987, 2988, 2102, 3022, 3018, 1318, 920, 1319, 1320, 2995, - 3472, 2096, 3002, 2701, 2702, 2703, 2704, 2705, 2706, 2092, - 2388, 2097, 2707, 2708, 3007, 2709, 3017, 2710, 1321, 3027, - 2447, 768, 2387, 1318, 767, 1319, 1320, 2386, 3024, 2688, - 677, 669, 2385, 661, 766, 3031, 3032, 765, 3030, 3036, - 3029, 2865, 3078, 3079, 1321, 3456, 2384, 2837, 2866, 2867, - 3037, 3093, 3038, 2587, 2879, 1321, 2589, 2514, 2875, 1302, - 1513, 1318, 2741, 1319, 1320, 3054, 2383, 3056, 655, 953, - 3099, 3100, 2902, 1318, 1321, 1319, 1320, 3380, 1318, 2290, - 1319, 1320, 2095, 1318, 2925, 1319, 1320, 2771, 1512, 1930, - 1931, 2895, 2896, 3112, 1321, 3387, 3116, 1318, 2847, 1319, - 1320, 3089, 2382, 1521, 1517, 2750, 2828, 83, 2563, 813, - 2095, 2095, 2095, 2095, 2095, 2188, 66, 1318, 1518, 1319, - 1320, 44, 3351, 3127, 3101, 3417, 764, 761, 2376, 1321, - 2095, 3142, 3143, 2095, 1321, 3144, 2691, 2692, 3131, 2375, - 3400, 3401, 760, 2058, 2059, 1520, 3402, 1519, 2834, 1958, - 1298, 3139, 3121, 1318, 1295, 1319, 1320, 1321, 2374, 3146, - 3493, 1321, 1824, 191, 92, 1321, 191, 35, 3117, 643, - 34, 33, 32, 31, 649, 2816, 2817, 25, 2371, 1318, - 24, 1319, 1320, 23, 22, 191, 21, 28, 3129, 20, - 1318, 19, 1319, 1320, 18, 1521, 1517, 2856, 2850, 1321, - 191, 3513, 3554, 119, 53, 3160, 3138, 2864, 50, 1318, - 1518, 1319, 1320, 2370, 48, 127, 126, 1321, 2369, 51, - 1885, 1321, 47, 1883, 3189, 649, 191, 649, 1067, 1318, - 45, 1319, 1320, 30, 1321, 1514, 1515, 1520, 2746, 1519, - 2923, 2367, 29, 17, 16, 2363, 3181, 15, 14, 2362, - 40, 3161, 3170, 3169, 2932, 13, 3185, 12, 3183, 11, - 3177, 3179, 7, 6, 1318, 38, 1319, 1320, 37, 1318, - 27, 1319, 1320, 36, 26, 4, 2550, 2749, 2190, 0, - 3290, 2749, 3277, 2358, 0, 0, 0, 3193, 0, 3297, - 3190, 3191, 1318, 0, 1319, 1320, 1318, 0, 1319, 1320, - 1318, 2356, 1319, 1320, 0, 2321, 0, 0, 0, 3307, - 3308, 0, 3310, 0, 3311, 3312, 0, 3272, 2310, 3315, - 3316, 3317, 3274, 3319, 3322, 3320, 3321, 3273, 0, 1885, - 0, 3289, 1883, 3324, 1318, 0, 1319, 1320, 0, 3331, - 3333, 3334, 3336, 3338, 3339, 3341, 3301, 3294, 3281, 3293, - 0, 0, 1318, 0, 1319, 1320, 1318, 0, 1319, 1320, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1318, - 0, 1319, 1320, 0, 0, 0, 0, 0, 0, 3325, - 0, 0, 0, 3371, 0, 0, 0, 0, 0, 3327, - 0, 0, 0, 3330, 3367, 0, 0, 3349, 3346, 3347, - 0, 0, 0, 0, 0, 3348, 0, 2095, 0, 0, - 3355, 0, 3366, 0, 0, 0, 0, 0, 0, 0, - 3035, 0, 0, 0, 3364, 3074, 0, 0, 0, 3370, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3048, 3049, 0, 0, 0, 0, 0, 2749, 186, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3098, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 125, 0, 0, 3372, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, - 0, 0, 0, 3082, 0, 0, 0, 3086, 3087, 3088, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3391, - 0, 3396, 0, 3118, 0, 3119, 0, 0, 3120, 0, - 0, 3123, 3124, 0, 3386, 0, 0, 3383, 2510, 0, - 3128, 3412, 3388, 0, 0, 0, 40, 3413, 3414, 0, - 3130, 165, 0, 0, 166, 0, 0, 3379, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3425, - 0, 0, 3406, 3147, 3395, 3407, 3148, 185, 3149, 3150, - 0, 3151, 3405, 3152, 0, 0, 0, 0, 3153, 0, - 0, 3415, 0, 0, 0, 3450, 3451, 0, 0, 0, - 0, 0, 0, 2746, 3422, 0, 0, 3427, 0, 3460, - 3462, 3464, 3432, 3178, 3457, 3458, 3435, 3443, 3430, 3440, - 3437, 3436, 40, 3434, 3186, 3439, 3438, 3188, 0, 3154, - 0, 3158, 3159, 0, 3492, 0, 0, 0, 0, 3192, - 0, 3301, 3445, 3468, 0, 0, 0, 0, 0, 0, - 0, 3471, 0, 3479, 2750, 3489, 83, 3269, 2750, 3484, - 0, 0, 0, 0, 3498, 3457, 3458, 0, 0, 0, - 0, 3496, 0, 3509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, - 1372, 3507, 0, 3512, 0, 0, 0, 0, 175, 0, - 0, 0, 0, 0, 0, 3530, 3532, 3534, 3525, 0, - 0, 0, 191, 0, 191, 1885, 3527, 191, 1883, 3539, - 0, 0, 0, 0, 0, 3282, 0, 3538, 3536, 3535, - 3542, 3540, 0, 0, 0, 0, 3553, 3284, 3285, 3286, - 3550, 3457, 3458, 0, 0, 0, 0, 0, 649, 3556, - 649, 649, 3565, 3566, 3562, 0, 3564, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3354, 0, 1885, - 649, 191, 1883, 3571, 3573, 3574, 3321, 0, 3572, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1364, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 160, 0, 2750, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1387, 1388, - 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, - 1399, 1400, 1401, 1402, 1406, 1407, 1408, 1409, 1410, 1411, - 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, - 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, - 1432, 1433, 1434, 1435, 1437, 1438, 1439, 1440, 1441, 1442, - 1443, 1444, 1445, 1446, 1447, 1448, 1466, 1467, 1468, 1469, - 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, - 0, 0, 0, 3394, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3381, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3408, 0, 0, 3409, - 0, 3410, 83, 1364, 0, 0, 0, 3211, 3213, 3212, - 3230, 3231, 3232, 3233, 3234, 3235, 3236, 716, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 161, 0, 0, 0, 0, 0, - 191, 173, 0, 0, 649, 649, 0, 0, 0, 0, - 0, 0, 0, 3426, 0, 0, 0, 0, 83, 0, - 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3490, 0, 0, 0, 0, - 649, 0, 181, 191, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 649, 0, 0, 0, 0, - 0, 191, 0, 0, 0, 3504, 0, 3505, 0, 3506, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 162, 167, 164, 170, 171, - 172, 174, 176, 177, 178, 179, 0, 0, 649, 0, - 0, 180, 182, 183, 184, 0, 0, 0, 812, 0, - 0, 1364, 0, 0, 3508, 0, 0, 649, 649, 0, - 649, 0, 649, 649, 0, 649, 649, 649, 649, 649, - 649, 0, 0, 0, 0, 3551, 0, 3552, 1364, 0, - 0, 1364, 649, 1364, 191, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 191, 0, 0, 628, 0, 0, - 0, 0, 0, 648, 0, 0, 0, 649, 0, 191, - 0, 3217, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 649, 0, 191, 3225, 3226, 0, 0, - 3251, 3250, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 191, 0, 0, 0, 0, 0, 0, 191, 0, - 0, 0, 0, 0, 648, 0, 648, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 649, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, - 695, 788, 697, 785, 786, 0, 693, 696, 787, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 714, 715, 3210, 3214, 3215, 3216, - 3227, 3228, 3229, 3237, 3239, 747, 3238, 3240, 3241, 3242, - 3245, 3246, 3247, 3248, 3243, 3244, 3249, 3194, 3198, 3195, - 3196, 3197, 3209, 3199, 3200, 3201, 3202, 3203, 3204, 3205, - 3206, 3207, 3208, 3252, 3253, 3254, 3255, 3256, 3257, 3220, - 3224, 3223, 3221, 3222, 3218, 3219, 0, 0, 0, 2786, - 0, 0, 0, 1498, 0, 0, 0, 0, 789, 0, - 790, 0, 0, 794, 0, 0, 0, 796, 795, 0, - 797, 763, 762, 0, 0, 791, 792, 0, 793, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2787, 0, 0, 0, 0, 0, - 0, 649, 649, 0, 0, 0, 0, 0, 0, 0, - 595, 0, 0, 0, 649, 0, 0, 0, 2789, 0, - 0, 0, 0, 191, 0, 0, 0, 0, 0, 882, - 0, 0, 0, 0, 0, 0, 2784, 0, 0, 0, - 0, 0, 0, 3258, 3259, 3260, 3261, 3262, 3263, 3264, - 3265, 0, 0, 2800, 2801, 0, 0, 0, 0, 0, - 2785, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 948, 649, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1364, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 649, 2791, 0, 0, 0, 0, 1364, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2556, 0, 649, 649, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 125, 0, 147, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2799, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2802, 0, 2018, 0, 0, 158, 0, - 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 165, 0, 0, 166, 0, 0, 0, - 0, 0, 0, 0, 186, 0, 0, 0, 191, 0, - 0, 0, 0, 649, 0, 1648, 1649, 157, 156, 185, - 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, - 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, - 649, 168, 0, 0, 0, 0, 0, 0, 0, 0, - 191, 0, 0, 0, 649, 0, 0, 2018, 191, 0, - 191, 0, 191, 191, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 649, 0, 2788, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 165, 0, 0, - 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 151, 1650, - 154, 0, 1647, 185, 152, 153, 0, 648, 1281, 648, - 648, 169, 0, 0, 649, 0, 0, 0, 0, 0, - 175, 0, 0, 0, 0, 0, 0, 0, 0, 648, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 649, 0, 0, 0, 0, 0, 649, 0, 0, - 0, 0, 0, 0, 0, 0, 769, 0, 1363, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 649, 0, 0, 0, 0, 649, - 0, 0, 0, 649, 649, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 169, 0, 0, 0, 0, - 0, 647, 0, 0, 175, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2792, 0, 0, 0, 2796, 0, - 0, 191, 0, 0, 160, 2795, 0, 0, 191, 0, - 0, 0, 0, 0, 0, 0, 0, 191, 191, 0, - 0, 191, 0, 191, 0, 0, 0, 0, 0, 0, - 191, 0, 944, 0, 951, 0, 0, 191, 0, 2797, - 0, 0, 0, 0, 2793, 0, 0, 0, 0, 2794, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1363, 191, 0, 0, 0, 0, 0, 0, - 0, 0, 649, 0, 0, 0, 1068, 0, 1074, 0, - 0, 1076, 155, 0, 0, 0, 0, 0, 0, 0, + 1560, 848, 3239, 3240, 840, 1922, 3238, 3675, 3686, 3494, + 697, 3643, 3579, 3644, 2167, 3600, 3058, 3201, 1607, 2118, + 1157, 1813, 3544, 2963, 3567, 841, 2865, 2872, 676, 3478, + 3418, 2923, 2098, 2928, 2925, 2924, 2922, 2927, 2926, 807, + 1155, 1868, 41, 3476, 5, 2468, 935, 3188, 2826, 2914, + 912, 3268, 2829, 2772, 803, 3466, 2502, 2100, 2943, 2830, + 679, 1530, 2880, 2827, 3273, 3097, 2241, 3091, 2698, 2122, + 808, 2814, 801, 3083, 2824, 2942, 2528, 2602, 677, 2682, + 802, 675, 2204, 2141, 2229, 1103, 707, 2945, 1567, 2209, + 967, 2603, 2272, 2604, 161, 1037, 2155, 2969, 2060, 2634, + 936, 2553, 2142, 2138, 1663, 914, 2534, 40, 1554, 2520, + 42, 2504, 2065, 1710, 2143, 2024, 1918, 2025, 1937, 1132, + 2674, 1876, 2057, 916, 147, 920, 3117, 2250, 2228, 1692, + 2130, 2289, 2211, 2595, 995, 671, 1596, 1000, 2570, 1576, + 2541, 689, 102, 98, 938, 2145, 1534, 103, 1402, 1809, + 1330, 1941, 1699, 974, 1315, 1895, 971, 1003, 1006, 2226, + 1791, 975, 2200, 1001, 1002, 1595, 1013, 2201, 953, 955, + 2123, 684, 1581, 926, 2066, 1386, 2013, 1362, 1153, 1867, + 1146, 923, 1820, 165, 83, 105, 1950, 125, 97, 1658, + 1684, 123, 124, 921, 130, 131, 922, 1086, 91, 948, + 924, 683, 1410, 1406, 82, 3503, 104, 3317, 3319, 3318, + 3344, 3345, 3346, 3347, 3348, 3349, 3350, 729, 666, 2627, + 96, 3676, 2243, 2244, 2245, 3529, 3189, 2911, 943, 947, + 2243, 611, 2657, 2656, 2287, 126, 2625, 2933, 1776, 3181, + 3627, 929, 2690, 132, 3144, 1039, 93, 1042, 2691, 93, + 3243, 3530, 3243, 3524, 645, 968, 3525, 1883, 1056, 1057, + 1058, 1882, 1061, 1062, 1063, 1064, 651, 1881, 1067, 1068, + 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1082, 1083, 963, 962, 930, 915, 913, + 667, 1880, 1016, 2931, 1879, 993, 2, 992, 93, 2095, + 2096, 1017, 1878, 937, 1851, 1102, 126, 2933, 3621, 1561, + 991, 1043, 1046, 1047, 990, 989, 669, 1898, 670, 2937, + 2930, 1326, 2500, 1050, 2810, 2530, 1331, 984, 857, 858, + 859, 979, 2776, 1347, 3647, 1331, 1059, 3242, 2276, 3242, + 109, 110, 111, 3631, 114, 3696, 2647, 120, 3629, 93, + 189, 2334, 3642, 605, 3525, 3666, 857, 858, 859, 3063, + 3062, 2650, 2274, 2931, 3479, 664, 665, 2469, 3630, 1888, + 961, 805, 806, 3628, 126, 908, 909, 910, 911, 2988, + 3414, 919, 2275, 3413, 3194, 84, 1041, 3195, 86, 2937, + 1040, 84, 3657, 3424, 84, 84, 3625, 3213, 1317, 3202, + 3610, 3568, 3576, 2269, 3423, 3580, 1927, 3212, 3605, 950, + 951, 961, 805, 806, 645, 2544, 645, 3008, 3608, 1673, + 2664, 2665, 2501, 2579, 2862, 2863, 2578, 3614, 3615, 2580, + 2343, 2934, 3508, 2861, 1341, 2882, 2883, 2162, 2163, 2689, + 2545, 3323, 3609, 1341, 3286, 1860, 1861, 1597, 2340, 1598, + 2161, 2673, 3586, 2220, 1122, 645, 3331, 3332, 2126, 1363, + 3369, 3368, 3367, 93, 646, 3365, 3366, 3364, 1344, 93, + 1345, 1346, 93, 93, 906, 905, 2214, 2628, 3495, 1816, + 3586, 2985, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1372, + 1371, 1373, 1374, 1110, 2591, 2341, 645, 1139, 1111, 1141, + 645, 2934, 645, 1089, 1110, 1316, 1109, 1150, 1108, 1111, + 2180, 2179, 2732, 1127, 1128, 2097, 3094, 1085, 2996, 2994, + 809, 2332, 708, 813, 710, 810, 811, 659, 706, 709, + 812, 3648, 1863, 1327, 2537, 2538, 1859, 1138, 1140, 663, + 1123, 1060, 1337, 2881, 2126, 1329, 657, 2965, 1593, 2675, + 1116, 1337, 3649, 2970, 1538, 2884, 727, 728, 3316, 3320, + 3321, 3322, 3333, 3342, 3343, 3351, 3353, 768, 3352, 3354, + 3355, 3356, 3359, 3360, 3361, 3362, 3357, 3358, 3363, 3300, + 3304, 3301, 3302, 3303, 3315, 3305, 3306, 3307, 3308, 3309, + 3310, 3311, 3312, 3313, 3314, 3370, 3371, 3372, 3373, 3374, + 3375, 3326, 3330, 3329, 3327, 3328, 3324, 3325, 3335, 3334, + 3336, 3337, 3338, 3339, 3340, 3341, 1817, 1129, 2335, 2336, + 2338, 2337, 1149, 2213, 646, 2635, 646, 1130, 814, 988, + 815, 1095, 1096, 819, 1124, 954, 1766, 821, 820, 2966, + 822, 788, 787, 1136, 1117, 816, 817, 1137, 818, 3622, + 2124, 2125, 3454, 2251, 3455, 2660, 2295, 1142, 988, 1084, + 2310, 2290, 2311, 1098, 2312, 646, 2302, 2298, 2300, 2301, + 2299, 2303, 2304, 1797, 3678, 1091, 1792, 2733, 2958, 1143, + 1767, 1135, 1768, 1148, 651, 2775, 2959, 986, 964, 958, + 956, 1125, 1126, 1131, 2677, 3183, 3182, 2313, 1106, 1066, + 1112, 1113, 1114, 1115, 1065, 2967, 646, 2294, 2292, 3398, + 646, 2296, 646, 3376, 3377, 3378, 3379, 3380, 3381, 3382, + 3383, 3179, 1015, 1088, 1151, 1152, 2254, 1398, 645, 964, + 958, 956, 1026, 3247, 1024, 996, 2124, 2125, 2884, 997, + 2139, 997, 3502, 3690, 1035, 1034, 1033, 1388, 1032, 2293, + 1031, 1144, 1030, 1029, 1028, 1023, 2626, 1541, 2662, 1677, + 1036, 3697, 1377, 1377, 1380, 1381, 1382, 1383, 994, 3654, + 642, 2629, 1594, 972, 1394, 972, 1698, 2341, 1009, 2273, + 188, 1336, 1333, 1334, 1335, 1340, 1342, 1339, 1120, 1338, + 1336, 1333, 1334, 1335, 1340, 1342, 1339, 972, 1338, 1332, + 2681, 970, 854, 1008, 127, 854, 1810, 1308, 1332, 2593, + 1045, 2227, 3095, 2678, 987, 949, 1008, 170, 627, 2280, + 1044, 2279, 1309, 1310, 1014, 2505, 2507, 87, 1087, 1018, + 1008, 625, 1806, 1384, 1020, 3178, 1318, 1053, 1021, 1019, + 2986, 2904, 3582, 987, 2935, 2936, 1015, 1671, 2694, 2355, + 2659, 3241, 3211, 3241, 854, 1670, 1669, 2939, 2645, 1022, + 2584, 1807, 1778, 1777, 1779, 1780, 1781, 3613, 3142, 3143, + 3582, 622, 1667, 167, 3581, 609, 168, 604, 2271, 1027, + 637, 1025, 2649, 3623, 1697, 3491, 1800, 2672, 1798, 1799, + 2671, 1801, 1802, 1528, 3131, 632, 2217, 92, 2535, 187, + 1378, 1379, 3581, 92, 1796, 635, 92, 92, 957, 3113, + 1408, 3612, 1409, 1412, 2935, 2936, 1052, 2575, 2540, 2477, + 1930, 2699, 1562, 1564, 1585, 1325, 2648, 2939, 2342, 1493, + 610, 2168, 1100, 1097, 122, 1377, 2218, 1094, 646, 1107, + 1991, 2684, 3046, 2216, 1374, 2860, 2683, 932, 1014, 957, + 1105, 117, 983, 1544, 1951, 985, 1147, 1548, 1133, 1542, + 3516, 1529, 3688, 916, 2684, 3689, 1545, 3687, 1952, 2683, + 1821, 1038, 3174, 612, 3107, 614, 628, 2219, 648, 2291, + 647, 618, 1872, 616, 620, 629, 621, 2215, 615, 1803, + 626, 1119, 2506, 617, 630, 631, 634, 638, 639, 640, + 636, 633, 1121, 624, 649, 2701, 1599, 2718, 1942, 1942, + 2372, 171, 1499, 1500, 1501, 1502, 1503, 1546, 2618, 3658, + 177, 102, 1547, 118, 1346, 1529, 103, 1015, 1345, 1346, + 3282, 1983, 1972, 1973, 1974, 1975, 1985, 1976, 1977, 1978, + 1990, 1986, 1979, 1980, 1987, 1988, 1989, 1981, 1982, 1984, + 1522, 1535, 1793, 988, 1794, 980, 3149, 1795, 1015, 3148, + 2258, 1347, 982, 981, 105, 1369, 1370, 1372, 1371, 1373, + 1374, 1704, 2270, 1707, 1706, 2711, 2710, 2709, 1696, 2268, + 2703, 2263, 2707, 2266, 2702, 1026, 2700, 1024, 1674, 1675, + 1676, 2705, 1900, 1104, 1690, 2263, 3650, 1949, 1739, 3132, + 2704, 1742, 928, 1744, 3698, 1134, 1901, 1375, 1376, 1899, + 1563, 986, 1543, 3546, 3484, 3692, 3406, 1822, 2706, 2708, + 2267, 1815, 913, 1532, 1683, 1090, 1566, 1761, 915, 1014, + 3208, 1051, 3209, 2062, 2265, 1048, 1786, 1712, 1743, 1713, + 3405, 1715, 1717, 1702, 162, 1721, 1723, 1725, 1727, 1729, + 1590, 1591, 3396, 1015, 3224, 1751, 1752, 3223, 3547, 3485, + 1014, 1757, 1758, 3156, 3155, 1701, 1008, 1011, 1012, 3145, + 972, 2347, 2348, 2349, 1005, 1009, 1666, 1015, 1700, 1700, + 1367, 1368, 1369, 1370, 1372, 1371, 1373, 1374, 1784, 1680, + 1561, 3699, 2912, 1681, 1679, 1693, 1344, 1947, 1345, 1346, + 1785, 2900, 1825, 1773, 2062, 2720, 1948, 2600, 2059, 1829, + 2599, 1831, 1832, 1833, 1834, 1549, 1347, 2061, 1838, 857, + 858, 859, 650, 2598, 1747, 2223, 1787, 2369, 1823, 1824, + 1850, 852, 1890, 1892, 1893, 1771, 188, 1770, 987, 1769, + 1347, 1759, 1828, 643, 1753, 1750, 1749, 1811, 1748, 1835, + 1836, 1837, 1783, 1719, 2962, 1014, 1891, 99, 644, 3003, + 127, 1008, 1011, 1012, 101, 972, 1312, 1772, 100, 1005, + 1009, 651, 1347, 170, 126, 1593, 1347, 3651, 991, 1014, + 1363, 1672, 990, 989, 1018, 1008, 3139, 651, 3511, 1020, + 1004, 2582, 651, 1021, 1019, 2239, 2238, 2237, 2236, 3510, + 2368, 1827, 2411, 1364, 1365, 1366, 1367, 1368, 1369, 1370, + 1372, 1371, 1373, 1374, 1347, 1363, 2235, 2234, 1359, 1347, + 1360, 1848, 3488, 1561, 1849, 1561, 163, 1347, 3487, 167, + 2407, 3486, 168, 175, 1361, 1375, 1376, 1358, 1364, 1365, + 1366, 1367, 1368, 1369, 1370, 1372, 1371, 1373, 1374, 2399, + 2362, 1344, 2409, 1345, 1346, 187, 3662, 1561, 2526, 3677, + 2361, 41, 1343, 1561, 41, 1351, 1352, 1353, 1354, 1355, + 1356, 1357, 1349, 3401, 183, 1344, 3385, 1345, 1346, 99, + 1925, 1925, 3384, 1923, 1923, 1926, 1347, 3638, 1561, 1903, + 100, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, + 1914, 1915, 1916, 1917, 1561, 1343, 1561, 1344, 1945, 1345, + 1346, 1344, 1946, 1345, 1346, 2526, 3575, 164, 169, 166, + 172, 173, 174, 176, 178, 179, 180, 181, 108, 1896, + 2526, 3554, 1894, 182, 184, 185, 186, 1528, 1570, 107, + 1904, 106, 1388, 2526, 3550, 1561, 2009, 3537, 1561, 1344, + 101, 1345, 1346, 1347, 1344, 672, 1345, 1346, 3281, 1943, + 1347, 108, 1344, 3279, 1345, 1346, 1363, 171, 2693, 3220, + 2005, 1561, 107, 1527, 106, 1561, 177, 2131, 2132, 3192, + 3501, 3504, 2360, 1347, 1571, 1526, 1856, 1857, 2055, 1364, + 1365, 1366, 1367, 1368, 1369, 1370, 1372, 1371, 1373, 1374, + 1897, 2003, 1525, 83, 1873, 1529, 83, 3409, 1561, 1561, + 101, 2014, 3153, 2084, 2069, 2068, 2526, 3397, 3192, 1561, + 3432, 1344, 3138, 1345, 1346, 1363, 2971, 2354, 2526, 3190, + 1562, 2091, 2968, 1347, 2067, 2263, 1561, 1902, 3111, 1561, + 2436, 1561, 1561, 2049, 2050, 2051, 2052, 2053, 1364, 1365, + 1366, 1367, 1368, 1369, 1370, 1372, 1371, 1373, 1374, 2903, + 2902, 2609, 939, 1929, 2115, 945, 945, 3660, 1561, 1561, + 2058, 1347, 2893, 2892, 1936, 1938, 1364, 1365, 1366, 1367, + 1368, 1369, 1370, 1372, 1371, 1373, 1374, 2596, 1344, 1524, + 1345, 1346, 2108, 2092, 2109, 1344, 2323, 1345, 1346, 2014, + 162, 1953, 1954, 1955, 1956, 2322, 2069, 2136, 2072, 2073, + 1347, 2285, 1363, 2890, 2891, 1967, 1347, 3427, 1344, 3431, + 1345, 1346, 2177, 2888, 2889, 3389, 2067, 2888, 2887, 102, + 2149, 2550, 1561, 3388, 103, 1364, 1365, 1366, 1367, 1368, + 1369, 1370, 1372, 1371, 1373, 1374, 1347, 2341, 2658, 102, + 1662, 2639, 2632, 2633, 103, 3592, 1561, 2526, 2525, 2365, + 1561, 2571, 2284, 2114, 1347, 2121, 2224, 2103, 1344, 2071, + 1345, 1346, 2074, 2075, 1365, 1366, 1367, 1368, 1369, 1370, + 1372, 1371, 1373, 1374, 1928, 1561, 3106, 1852, 2186, 2187, + 2188, 2189, 1818, 2571, 3590, 1561, 2172, 1782, 1774, 2171, + 3588, 1561, 1347, 1764, 1760, 1756, 1344, 929, 1345, 1346, + 1347, 1755, 2522, 2153, 2102, 1754, 1572, 2181, 2090, 2182, + 2183, 2184, 2185, 1347, 2572, 1145, 2113, 101, 1662, 1661, + 3463, 1561, 1605, 1604, 2574, 2192, 2193, 2194, 2195, 2116, + 2206, 2542, 3200, 2175, 2542, 1344, 2212, 1345, 1346, 3652, + 2252, 1344, 2636, 1345, 1346, 2134, 2572, 2825, 1347, 107, + 2159, 2158, 2157, 963, 962, 2855, 2341, 2549, 3106, 2174, + 2173, 2614, 2176, 1343, 3108, 2341, 2264, 3542, 1347, 3515, + 2249, 1344, 163, 1345, 1346, 2365, 3461, 1561, 2526, 175, + 2550, 3067, 2890, 2798, 2222, 3499, 2160, 2365, 2436, 1344, + 2396, 1345, 1346, 1347, 2395, 2263, 2246, 3458, 1561, 2129, + 1565, 2093, 1928, 2550, 1874, 2207, 3106, 1858, 2203, 2196, + 2198, 2199, 2550, 1805, 2221, 1592, 2257, 2225, 1343, 2260, + 183, 2261, 2233, 2277, 2263, 999, 998, 1344, 93, 1345, + 1346, 1347, 3444, 1561, 918, 1344, 1016, 1345, 1346, 2256, + 2207, 2259, 2255, 3618, 3557, 1017, 3420, 1568, 1344, 3386, + 1345, 1346, 3082, 1561, 2281, 1700, 3157, 3293, 2282, 2283, + 3173, 2278, 3170, 164, 169, 166, 172, 173, 174, 176, + 178, 179, 180, 181, 3151, 3013, 2915, 3075, 1561, 182, + 184, 185, 186, 1344, 1735, 1345, 1346, 3012, 1664, 2205, + 2960, 2917, 2913, 2640, 2202, 1347, 2197, 2191, 2190, 2325, + 2326, 2288, 1789, 1344, 2328, 1345, 1346, 3158, 3159, 3160, + 1695, 2605, 93, 2329, 2606, 3072, 1561, 1691, 1660, 2351, + 2358, 2353, 119, 1089, 2363, 3118, 3119, 2366, 1344, 2367, + 1345, 1346, 1347, 2964, 2374, 1736, 1737, 1738, 2376, 2377, + 2378, 2069, 2068, 3421, 2220, 2106, 3672, 2316, 2384, 2385, + 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 1854, 2606, + 1896, 2359, 3670, 3645, 3523, 3449, 1344, 1347, 1345, 1346, + 2352, 3121, 2909, 2357, 1347, 2908, 2907, 2825, 2619, 3070, + 1561, 2317, 3124, 3123, 2400, 2401, 2402, 2403, 2404, 2844, + 2406, 2847, 2845, 1347, 2408, 3519, 2848, 2846, 2413, 2414, + 2843, 2415, 2379, 2331, 2418, 1347, 2419, 2421, 2423, 2425, + 2427, 2429, 2431, 2433, 2435, 2339, 3038, 1561, 2438, 2394, + 1855, 3422, 2442, 1347, 2120, 2112, 2447, 2448, 2449, 2450, + 1344, 1897, 1345, 1346, 1569, 3112, 1347, 3161, 2803, 2461, + 2462, 2463, 2464, 2465, 2466, 2350, 2802, 2470, 2471, 1347, + 3483, 3036, 1561, 3272, 1347, 2473, 2475, 3274, 3034, 1561, + 3102, 1347, 2478, 2479, 2480, 2481, 2482, 1344, 1347, 1345, + 1346, 2812, 1347, 2489, 2490, 1731, 2491, 3032, 1561, 2494, + 2496, 2115, 2371, 2498, 3162, 3163, 3164, 1804, 2589, 3030, + 1561, 904, 2849, 2510, 2559, 2560, 1925, 2886, 1347, 1923, + 2511, 3263, 1344, 3262, 1345, 1346, 3099, 3028, 1561, 1344, + 2610, 1345, 1346, 1951, 3098, 1055, 1347, 2815, 2817, 1348, + 3026, 1561, 1732, 1733, 1734, 1054, 2818, 1952, 1344, 2979, + 1345, 1346, 1347, 3024, 1561, 2605, 933, 2405, 3018, 1561, + 1344, 1347, 1345, 1346, 934, 3001, 1561, 2687, 1403, 2509, + 1311, 3261, 2497, 1561, 1347, 99, 2495, 1561, 1344, 2646, + 1345, 1346, 101, 127, 99, 3104, 100, 3684, 41, 101, + 2546, 1344, 2905, 1345, 1346, 100, 1347, 2564, 2320, 3597, + 2566, 2527, 2474, 1561, 1344, 3500, 1345, 1346, 1347, 1344, + 3416, 1345, 1346, 2512, 2885, 2514, 1344, 1347, 1345, 1346, + 2451, 1561, 2563, 1344, 2117, 1345, 1346, 1344, 3084, 1345, + 1346, 2131, 2132, 2523, 941, 942, 2443, 1561, 1347, 2309, + 2801, 2565, 2536, 2308, 2307, 2434, 1561, 1347, 2800, 1535, + 2499, 2306, 2305, 1344, 2345, 1345, 1346, 108, 2432, 1561, + 106, 3471, 2592, 2594, 3470, 1529, 1347, 2519, 107, 2524, + 106, 1344, 3452, 1345, 1346, 2585, 1347, 2631, 3280, 2539, + 2430, 1561, 1347, 3278, 2569, 3277, 3270, 1344, 1347, 1345, + 1346, 3171, 2428, 1561, 1347, 3103, 1344, 3101, 1345, 1346, + 1574, 2426, 1561, 2573, 107, 2212, 2655, 2576, 2918, 1344, + 3269, 1345, 1346, 2247, 2583, 1678, 108, 108, 940, 2608, + 2586, 1347, 2424, 1561, 2611, 2612, 1347, 107, 107, 106, + 3092, 1344, 3393, 1345, 1346, 2597, 2542, 1347, 101, 3674, + 3673, 3673, 1347, 1344, 2653, 1345, 1346, 3251, 3674, 1347, + 2422, 1561, 1344, 2607, 1345, 1346, 2522, 2734, 1347, 2397, + 2420, 1561, 2104, 1347, 1586, 2615, 1573, 2616, 1347, 2620, + 2621, 2622, 3126, 1344, 3489, 1345, 1346, 1578, 3137, 3175, + 931, 1683, 1344, 1347, 1345, 1346, 1871, 1347, 2652, 10, + 2722, 2723, 2724, 2725, 2726, 2697, 3, 1869, 2641, 2642, + 9, 1344, 95, 1345, 1346, 3077, 1577, 1347, 1, 2731, + 3073, 1344, 1314, 1345, 1346, 2651, 1313, 1344, 1347, 1345, + 1346, 3044, 3141, 1344, 1347, 1345, 1346, 2601, 3607, 1344, + 623, 1345, 1346, 3040, 112, 113, 2714, 2094, 1870, 2676, + 2712, 8, 3010, 1665, 2696, 1533, 2695, 3009, 2679, 1347, + 3646, 3603, 3006, 3604, 2685, 2727, 1344, 2686, 1345, 1346, + 1775, 1344, 1765, 1345, 1346, 3203, 2023, 2493, 3417, 2921, + 2253, 2492, 1344, 3169, 1345, 1346, 2210, 1344, 1007, 1345, + 1346, 152, 2169, 2170, 1344, 3570, 1345, 1346, 116, 2713, + 965, 2488, 115, 1344, 2715, 1345, 1346, 1010, 1344, 1347, + 1345, 1346, 2487, 1344, 1118, 1345, 1346, 2248, 2486, 1347, + 3193, 2752, 2590, 2754, 2178, 1611, 1609, 1610, 1344, 1608, + 1345, 1346, 1344, 1613, 1345, 1346, 1612, 2777, 2782, 2765, + 2766, 2767, 2768, 2485, 2987, 2398, 2736, 2779, 3045, 1862, + 658, 2562, 1344, 652, 1345, 1346, 190, 1600, 1579, 3059, + 1049, 613, 2894, 1344, 2286, 1345, 1346, 1347, 2834, 1344, + 619, 1345, 1346, 2058, 2750, 2058, 1395, 1853, 2799, 2577, + 960, 1819, 2149, 952, 2105, 2513, 2852, 959, 2760, 2761, + 2762, 2763, 2764, 2484, 1344, 3394, 1345, 1346, 2833, 3096, + 2811, 2782, 2813, 2483, 1347, 2529, 2816, 920, 2822, 2781, + 2149, 2149, 2149, 2149, 2149, 2778, 1815, 2780, 2837, 2828, + 2809, 2854, 3482, 3271, 2828, 3555, 2806, 2587, 1575, 3066, + 2149, 2370, 1940, 2149, 1385, 2793, 2831, 2146, 3246, 1889, + 681, 680, 2797, 678, 1344, 2515, 1345, 1346, 2543, 2804, + 1350, 2472, 2807, 842, 1344, 2503, 1345, 1346, 2819, 2820, + 1587, 2554, 2552, 1347, 2555, 2558, 2559, 2560, 2556, 2551, + 2557, 2561, 2318, 2838, 2856, 921, 2841, 2857, 922, 2154, + 2941, 2805, 2836, 2850, 3120, 102, 2839, 2840, 2467, 2842, + 103, 2858, 2794, 2795, 2796, 3116, 3599, 2148, 2144, 2864, + 2521, 793, 1344, 792, 1345, 1346, 690, 682, 674, 791, + 2920, 790, 1347, 2981, 2895, 3134, 2897, 2896, 2947, 3583, + 2661, 2898, 2899, 2961, 2663, 1347, 2588, 2957, 1328, 1551, + 668, 978, 2984, 2998, 2999, 3000, 3506, 3002, 3004, 1344, + 2949, 1345, 1346, 2919, 2212, 1347, 2344, 2460, 2948, 2940, + 3007, 3011, 1550, 1970, 1971, 3513, 3015, 3016, 3017, 3019, + 3020, 3021, 3022, 3023, 3025, 3027, 3029, 3031, 3033, 3035, + 3037, 2955, 2929, 3039, 3187, 3041, 3042, 3043, 2975, 2974, + 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, + 3057, 2977, 2978, 2983, 2972, 2982, 2459, 2910, 1344, 3064, + 1345, 1346, 3068, 2637, 3069, 3071, 2992, 3074, 3076, 2458, + 3078, 3079, 3080, 3081, 2240, 68, 45, 3477, 3087, 1884, + 1885, 1886, 1887, 3543, 2989, 2990, 789, 2991, 786, 2457, + 2993, 3248, 2995, 3249, 2997, 3250, 2773, 2774, 3061, 3526, + 3527, 785, 3528, 1998, 1324, 3065, 1321, 1344, 3620, 1345, + 1346, 1864, 94, 3109, 3110, 36, 35, 3114, 34, 33, + 1344, 32, 1345, 1346, 26, 25, 24, 23, 1931, 1932, + 22, 29, 19, 1934, 21, 945, 945, 1939, 20, 18, + 1344, 1944, 1345, 1346, 2932, 3641, 3683, 121, 54, 3085, + 3086, 51, 49, 129, 1957, 1958, 1959, 1960, 1961, 1962, + 1963, 1964, 1965, 1966, 128, 3100, 3093, 52, 1992, 1993, + 1994, 1995, 1996, 1997, 1999, 2149, 2004, 3088, 2006, 2007, + 2008, 3105, 2010, 2011, 2012, 48, 2015, 2016, 2017, 2018, + 2019, 2020, 2021, 2022, 2026, 2027, 2028, 2029, 2030, 2031, + 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, + 2042, 2043, 2044, 2045, 2046, 2047, 2048, 3176, 3177, 3128, + 3125, 2949, 2054, 3191, 2056, 3090, 2063, 2064, 945, 2948, + 945, 945, 945, 945, 945, 3135, 3136, 3152, 3127, 3154, + 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 3122, 2085, + 2086, 2087, 2088, 2089, 3146, 3147, 3197, 3198, 3115, 1092, + 46, 31, 30, 17, 1347, 3210, 16, 15, 3214, 1347, + 14, 13, 12, 11, 7, 2868, 6, 3129, 3130, 1347, + 39, 38, 28, 1347, 37, 27, 4, 945, 1347, 2624, + 2555, 2558, 2559, 2560, 2556, 3225, 2557, 2561, 2242, 1347, + 3118, 3119, 0, 0, 0, 0, 0, 3180, 0, 2127, + 2128, 3184, 3185, 3186, 1347, 0, 1559, 1555, 0, 1347, + 2869, 0, 0, 0, 0, 3199, 3237, 0, 0, 1347, + 0, 1556, 0, 0, 3219, 2166, 0, 0, 0, 3245, + 3215, 0, 0, 0, 2871, 1347, 0, 3252, 2456, 0, + 0, 1347, 0, 2455, 0, 1347, 2110, 2111, 1558, 0, + 1557, 0, 2866, 2454, 0, 0, 0, 2453, 0, 0, + 0, 0, 2452, 0, 0, 0, 0, 0, 0, 2882, + 2883, 0, 3235, 2446, 0, 0, 2867, 0, 0, 0, + 0, 0, 0, 0, 0, 3244, 2208, 0, 2445, 1344, + 3266, 1345, 1346, 2444, 1344, 0, 1345, 1346, 1925, 0, + 0, 1923, 3295, 2441, 1344, 0, 1345, 1346, 1344, 2873, + 1345, 1346, 0, 1344, 0, 1345, 1346, 0, 0, 2440, + 41, 0, 3287, 0, 1344, 2439, 1345, 1346, 3267, 2437, + 3275, 2828, 3276, 1347, 0, 3289, 3291, 0, 3285, 1344, + 3283, 1345, 1346, 0, 1344, 0, 1345, 1346, 0, 2831, + 1347, 0, 0, 2831, 1344, 0, 1345, 1346, 3408, 1347, + 0, 0, 0, 3395, 0, 0, 1347, 3415, 3299, 0, + 1344, 0, 1345, 1346, 0, 1347, 1344, 2881, 1345, 1346, + 1344, 1347, 1345, 1346, 0, 0, 0, 3425, 3426, 2884, + 3428, 0, 3429, 3430, 0, 0, 0, 3433, 3434, 3435, + 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3392, 3445, + 3448, 3446, 3447, 3419, 3407, 1925, 3391, 2417, 1923, 3450, + 3399, 3412, 0, 3411, 3390, 3457, 3459, 3460, 3462, 3464, + 3465, 3467, 0, 0, 2416, 0, 0, 0, 3296, 3297, + 1559, 1555, 0, 2412, 0, 0, 0, 3402, 3403, 3404, + 2410, 0, 0, 0, 0, 1556, 0, 0, 0, 2375, + 0, 0, 0, 0, 0, 2364, 0, 3451, 1344, 3497, + 1345, 1346, 3453, 0, 0, 0, 3456, 0, 0, 0, + 1552, 1553, 1558, 3493, 1557, 1344, 0, 1345, 1346, 3475, + 3472, 3473, 0, 3474, 1344, 0, 1345, 1346, 0, 0, + 0, 1344, 3481, 1345, 1346, 2870, 0, 0, 3492, 3490, + 1344, 0, 1345, 1346, 0, 0, 1344, 3496, 1345, 1346, + 0, 0, 0, 0, 0, 0, 0, 2831, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2373, 0, + 0, 0, 0, 0, 0, 0, 3498, 0, 0, 2380, + 2381, 2382, 2383, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3639, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1628, 0, 0, 0, 0, 0, 0, 0, + 3517, 0, 0, 0, 0, 0, 0, 3522, 0, 0, + 0, 0, 0, 0, 1403, 0, 41, 3512, 3514, 0, + 3509, 0, 0, 0, 0, 0, 0, 3538, 0, 3505, + 0, 0, 0, 3539, 3540, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 853, 0, 0, + 85, 0, 0, 0, 0, 3551, 0, 0, 0, 3532, + 0, 0, 3533, 0, 0, 0, 3521, 0, 0, 0, + 0, 0, 0, 0, 3531, 0, 0, 0, 0, 3541, + 2874, 3577, 3578, 0, 2878, 0, 0, 0, 0, 0, + 0, 2877, 0, 0, 0, 3587, 3589, 3591, 3548, 3585, + 41, 0, 3556, 3553, 2828, 3561, 3569, 3566, 3563, 3562, + 3560, 3565, 3564, 3558, 3584, 0, 3419, 3572, 0, 0, + 3619, 0, 0, 0, 0, 2879, 0, 0, 0, 0, + 2875, 917, 3595, 85, 0, 2876, 1616, 0, 0, 0, + 0, 3616, 3606, 3611, 3598, 1577, 0, 0, 0, 0, + 0, 3585, 917, 3626, 0, 0, 0, 0, 0, 3624, + 3637, 0, 0, 0, 0, 0, 3584, 977, 0, 0, + 0, 0, 0, 0, 0, 1398, 0, 0, 0, 3635, + 3640, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3659, 3661, 3663, 0, 0, 3653, 0, + 0, 0, 3656, 1925, 1815, 3655, 1923, 3668, 0, 0, + 0, 0, 0, 3664, 3665, 3667, 3671, 3669, 0, 0, + 1629, 0, 0, 0, 0, 3682, 0, 1628, 0, 3585, + 0, 3679, 0, 0, 0, 0, 0, 0, 3685, 0, + 0, 3694, 3695, 3691, 3584, 3693, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1925, 0, + 0, 1923, 3700, 3702, 3703, 3447, 0, 3701, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1642, 1645, 1646, 1647, 1648, 1649, 1650, 1536, + 1651, 1652, 1654, 1655, 1653, 1656, 1657, 1630, 1631, 1632, + 1633, 1614, 1615, 1643, 0, 1617, 0, 1618, 1619, 1620, + 1621, 1622, 1623, 1624, 1625, 1626, 0, 0, 1627, 1634, + 1635, 1636, 1637, 0, 1638, 1639, 1640, 1641, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 607, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2692, 0, 0, 0, 0, 907, 0, 0, + 0, 1616, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 945, 0, 0, 2716, 2717, 0, 0, 2719, 0, + 0, 2721, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 973, 0, + 0, 2728, 2729, 2730, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2735, 0, 0, 2737, 2738, 2739, 0, + 0, 0, 2740, 2741, 0, 0, 2742, 0, 2743, 0, + 2744, 0, 2745, 0, 2746, 0, 2747, 0, 2748, 0, + 2749, 0, 2026, 2751, 0, 1629, 2753, 0, 0, 2755, + 2756, 2757, 2758, 0, 0, 0, 0, 2759, 2026, 2026, + 2026, 2026, 2026, 0, 0, 0, 0, 0, 1644, 0, + 0, 0, 0, 2769, 0, 0, 0, 0, 0, 0, + 0, 0, 945, 0, 0, 0, 0, 0, 0, 2783, + 2784, 2785, 2786, 2787, 2788, 0, 0, 0, 2789, 2790, + 0, 2791, 0, 2792, 0, 0, 0, 1642, 1645, 1646, + 1647, 1648, 1649, 1650, 0, 1651, 1652, 1654, 1655, 1653, + 1656, 1657, 1630, 1631, 1632, 1633, 1614, 1615, 1643, 0, + 1617, 0, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, + 1626, 0, 0, 1627, 1634, 1635, 1636, 1637, 2823, 1638, + 1639, 1640, 1641, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2853, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2916, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1154, + 0, 1154, 1154, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1644, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3005, 0, 0, 917, + 1387, 1392, 1393, 0, 1396, 0, 1397, 1399, 1400, 1401, + 3014, 1404, 1405, 1407, 1407, 0, 1407, 1411, 1411, 1413, + 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, + 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, + 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, + 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, + 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, + 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, + 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, + 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 0, 0, + 0, 0, 1492, 0, 1494, 1495, 1496, 1497, 1498, 0, + 0, 0, 0, 0, 0, 0, 0, 1411, 1411, 1411, + 1411, 1411, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, + 1513, 1514, 1515, 1516, 1517, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1093, 0, 1099, 0, 0, 1101, + 0, 0, 1531, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3172, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1320, 1537, 0, 0, 0, 0, + 0, 917, 3196, 0, 127, 917, 149, 0, 0, 0, + 0, 917, 0, 0, 0, 0, 0, 170, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, + 0, 0, 0, 0, 148, 0, 0, 3216, 0, 3217, + 0, 0, 3218, 0, 0, 3221, 3222, 0, 0, 0, + 0, 0, 0, 167, 3226, 0, 168, 0, 0, 0, + 3227, 0, 3228, 0, 3229, 0, 3230, 0, 3231, 0, + 3232, 0, 3233, 0, 3234, 136, 137, 159, 158, 187, + 3236, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3253, 0, 0, 3254, 0, 3255, 3256, + 0, 3257, 0, 3258, 0, 0, 0, 0, 3259, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2630, 0, 0, 3284, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 127, 3292, 149, 0, 3294, 0, 0, + 0, 0, 0, 0, 0, 0, 170, 0, 0, 3298, + 0, 0, 0, 0, 0, 0, 0, 0, 153, 134, + 156, 141, 133, 0, 154, 155, 0, 3387, 0, 0, + 0, 171, 0, 0, 0, 0, 0, 160, 0, 0, + 177, 142, 0, 148, 0, 0, 0, 0, 0, 0, + 1154, 0, 0, 0, 0, 145, 143, 138, 139, 140, + 144, 0, 167, 0, 0, 168, 0, 135, 0, 0, + 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, + 0, 0, 0, 0, 1686, 1687, 159, 158, 187, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1589, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1606, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1682, 0, 0, 0, 3480, 0, 0, 0, 0, + 0, 0, 0, 0, 127, 0, 149, 0, 0, 0, + 0, 0, 0, 0, 162, 0, 0, 170, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 153, 1688, 156, + 0, 1685, 0, 154, 155, 0, 0, 0, 160, 1745, + 171, 0, 838, 0, 148, 0, 0, 0, 0, 177, + 0, 0, 0, 0, 0, 1154, 1154, 0, 0, 0, + 0, 0, 0, 167, 0, 0, 168, 0, 0, 85, + 0, 0, 85, 0, 1790, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 157, 1686, 1687, 159, 158, 187, + 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, + 193, 0, 0, 0, 656, 0, 0, 1826, 0, 662, + 0, 0, 0, 0, 1830, 0, 0, 0, 0, 0, + 193, 0, 0, 0, 0, 1841, 1842, 1843, 1844, 1845, + 1846, 1847, 0, 0, 0, 193, 0, 0, 0, 0, + 0, 0, 0, 3520, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 0, 0, 151, 0, 0, 0, + 662, 193, 662, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 162, 3534, 0, 0, 3535, 0, 3536, + 0, 0, 0, 0, 0, 0, 163, 0, 153, 1688, + 156, 0, 1685, 175, 154, 155, 0, 0, 0, 0, + 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, + 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 157, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3617, 0, 0, 0, 164, 169, 166, + 172, 173, 174, 176, 178, 179, 180, 181, 0, 0, + 0, 0, 0, 182, 184, 185, 186, 0, 0, 0, + 0, 0, 0, 0, 3632, 0, 3633, 0, 3634, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1877, + 0, 0, 150, 0, 0, 151, 0, 0, 0, 0, + 0, 0, 0, 0, 162, 0, 0, 0, 2147, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 163, 0, 0, 0, 0, + 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3680, 0, 3681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 648, 648, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1294, 0, 0, 1364, 0, - 2018, 0, 0, 148, 0, 0, 149, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 648, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 648, 0, 161, 0, 0, 0, - 0, 0, 0, 173, 1621, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1630, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 648, 0, 1656, - 0, 0, 0, 0, 181, 0, 0, 1665, 0, 0, - 1363, 1667, 0, 0, 1670, 1671, 648, 648, 0, 648, - 0, 648, 648, 0, 648, 648, 648, 648, 648, 648, - 0, 0, 0, 0, 0, 0, 0, 1363, 1702, 1703, - 1363, 648, 1363, 0, 1708, 0, 0, 162, 167, 164, - 170, 171, 172, 174, 176, 177, 178, 179, 0, 0, - 161, 0, 0, 180, 182, 183, 184, 173, 0, 0, - 0, 191, 0, 0, 0, 0, 648, 0, 0, 191, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1770, - 649, 0, 648, 0, 0, 0, 0, 0, 0, 0, - 0, 649, 0, 0, 0, 0, 0, 0, 181, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, - 191, 0, 0, 0, 0, 648, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 162, 167, 164, 170, 171, 172, 174, 176, 177, - 178, 179, 0, 0, 0, 0, 0, 180, 182, 183, - 184, 0, 0, 0, 770, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1551, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 649, 0, - 0, 0, 0, 0, 191, 1568, 0, 0, 0, 0, - 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 649, 0, 0, 189, 0, - 0, 596, 649, 0, 0, 0, 0, 0, 0, 0, - 0, 649, 0, 0, 0, 0, 0, 0, 0, 0, - 596, 0, 0, 0, 0, 0, 0, 1364, 0, 0, - 0, 0, 0, 0, 0, 902, 0, 0, 0, 0, - 191, 191, 191, 191, 191, 0, 0, 0, 0, 0, - 0, 0, 921, 921, 0, 0, 0, 0, 1707, 0, - 0, 596, 0, 0, 191, 191, 0, 0, 0, 0, - 648, 648, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 648, 0, 0, 0, 191, 0, 0, - 0, 0, 0, 1752, 0, 1130, 0, 1130, 1130, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 649, 0, - 0, 0, 0, 0, 0, 0, 0, 1293, 0, 0, - 0, 0, 0, 0, 0, 1786, 0, 0, 0, 0, - 0, 0, 1790, 0, 0, 0, 0, 0, 0, 0, - 648, 0, 0, 1801, 1802, 1803, 1804, 1805, 1806, 1807, - 1363, 0, 0, 0, 0, 649, 0, 0, 0, 1893, - 0, 648, 0, 0, 0, 0, 0, 1363, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 648, 648, 0, 649, 0, 0, 0, 0, - 0, 0, 0, 649, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 649, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 648, 0, 0, 0, 191, 0, - 0, 0, 649, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 649, 0, 0, 0, - 1364, 0, 0, 649, 649, 1364, 191, 191, 191, 191, - 191, 0, 0, 0, 0, 0, 0, 0, 191, 0, - 0, 0, 648, 0, 191, 0, 191, 0, 0, 191, - 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 648, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 648, 0, 0, 648, 1837, 0, 0, - 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, - 0, 1501, 1502, 0, 0, 0, 648, 0, 649, 0, - 0, 1364, 0, 0, 0, 0, 649, 0, 0, 0, - 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 191, 0, 1545, 0, 0, - 82, 42, 43, 84, 0, 0, 0, 0, 0, 0, - 0, 0, 1563, 0, 191, 0, 0, 191, 0, 0, - 88, 0, 0, 648, 46, 73, 74, 0, 71, 75, - 2178, 2179, 2180, 0, 0, 0, 0, 72, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 648, 0, 0, 0, 0, 944, 648, 1665, 0, 0, - 1665, 0, 1665, 0, 0, 0, 59, 0, 2210, 0, - 0, 0, 0, 0, 1673, 1673, 0, 1673, 91, 1673, - 1673, 0, 1682, 1673, 1673, 1673, 1673, 1673, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 649, 944, - 0, 0, 0, 648, 0, 0, 0, 0, 648, 0, - 0, 0, 648, 648, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, - 0, 0, 0, 0, 1750, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 596, 0, 596, - 1774, 0, 596, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 191, 2081, 0, 0, 0, 0, 0, - 0, 0, 2085, 1130, 2088, 0, 0, 1837, 0, 0, - 0, 0, 0, 0, 0, 0, 596, 0, 0, 0, - 0, 0, 191, 0, 0, 0, 49, 52, 55, 54, - 57, 648, 70, 0, 0, 79, 76, 0, 830, 0, - 2010, 0, 191, 831, 1365, 191, 191, 191, 0, 0, - 0, 0, 0, 1884, 0, 649, 649, 0, 0, 58, - 87, 86, 0, 0, 68, 69, 56, 0, 0, 0, - 0, 0, 77, 78, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1363, 0, 648, - 0, 0, 649, 649, 649, 649, 0, 0, 0, 0, - 0, 0, 0, 0, 60, 61, 0, 62, 63, 64, - 65, 0, 0, 0, 0, 0, 837, 838, 839, 840, - 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, - 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, - 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, - 871, 872, 873, 874, 875, 876, 877, 878, 1130, 1130, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1825, 0, 0, 0, 0, 0, 0, 1365, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1837, 0, 0, 0, 191, - 0, 0, 2245, 0, 0, 0, 0, 0, 0, 0, - 0, 2262, 2263, 0, 0, 2267, 0, 0, 1364, 0, - 0, 0, 0, 649, 2270, 649, 0, 0, 1879, 0, - 0, 2273, 0, 0, 0, 596, 0, 0, 0, 0, - 85, 0, 0, 0, 0, 0, 0, 0, 0, 1895, - 0, 0, 0, 0, 0, 902, 0, 2276, 0, 648, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 648, 0, 0, 0, 0, 0, 0, 0, 596, 0, - 1928, 1929, 0, 0, 0, 649, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 596, 0, 191, 0, - 0, 649, 90, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 649, 2507, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1130, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1365, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 649, 0, 0, 648, 649, 649, - 0, 0, 0, 1365, 0, 0, 1365, 0, 1365, 596, - 2055, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 648, 0, 0, 649, 0, 1724, - 0, 648, 0, 0, 0, 1665, 1665, 2067, 67, 0, - 648, 0, 0, 0, 596, 0, 0, 0, 0, 0, - 0, 1545, 0, 0, 1130, 0, 1363, 2580, 0, 0, - 1776, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 944, 0, 596, 0, 0, 0, - 0, 0, 0, 596, 0, 0, 0, 0, 0, 0, - 0, 0, 1799, 1800, 596, 596, 596, 596, 596, 596, - 596, 0, 0, 0, 0, 0, 0, 0, 649, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, - 0, 951, 0, 0, 0, 0, 0, 648, 0, 0, - 0, 0, 649, 191, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 944, 0, - 0, 0, 0, 0, 951, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2494, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, - 0, 0, 0, 649, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1364, 0, 649, 0, 0, 0, 0, - 0, 944, 0, 0, 0, 0, 1879, 0, 0, 0, - 1879, 1879, 0, 0, 648, 0, 0, 0, 0, 649, - 649, 0, 648, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2543, 0, - 0, 649, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 648, 0, 191, 649, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 648, 0, 0, 0, 0, 0, 0, 596, 0, - 0, 0, 0, 0, 0, 648, 0, 0, 0, 1363, - 0, 0, 648, 648, 1363, 0, 0, 0, 0, 649, - 0, 0, 0, 0, 2592, 2593, 2594, 2595, 2596, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2279, - 0, 649, 0, 0, 0, 0, 0, 0, 1837, 2606, - 0, 0, 0, 0, 0, 0, 1365, 0, 649, 0, - 649, 0, 0, 0, 0, 0, 0, 0, 921, 921, - 0, 2614, 186, 1365, 0, 2819, 0, 0, 0, 0, - 0, 0, 0, 1644, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 125, 648, 147, 0, - 1363, 0, 0, 0, 0, 648, 0, 1130, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, + 977, 0, 0, 0, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 158, 0, 0, 0, 0, 0, 146, 0, 0, 921, - 1776, 921, 921, 921, 921, 921, 2898, 0, 0, 0, - 0, 0, 0, 0, 0, 165, 0, 0, 166, 0, + 0, 0, 0, 977, 0, 0, 164, 169, 166, 172, + 173, 174, 176, 178, 179, 180, 181, 0, 0, 0, + 0, 0, 182, 184, 185, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1648, 1649, 157, - 156, 185, 0, 1724, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 921, 0, + 0, 0, 0, 150, 0, 0, 151, 0, 0, 0, + 0, 0, 0, 84, 43, 44, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 902, 0, 0, 0, 0, 648, 0, 0, - 0, 0, 0, 0, 0, 596, 0, 0, 0, 0, - 0, 0, 1776, 596, 0, 596, 0, 596, 2104, 0, + 0, 0, 0, 90, 0, 0, 163, 47, 75, 76, + 0, 73, 77, 175, 0, 0, 0, 0, 0, 0, + 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 0, 0, 0, 183, 0, 0, 0, 2133, 0, + 0, 93, 0, 0, 0, 0, 2137, 0, 2140, 0, + 0, 1877, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2442, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2457, 0, - 151, 1650, 154, 0, 1647, 0, 152, 153, 0, 0, - 0, 0, 0, 169, 0, 0, 0, 0, 0, 0, - 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2824, - 3042, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 164, 169, 166, + 172, 173, 174, 176, 178, 179, 180, 181, 0, 0, + 0, 0, 0, 182, 184, 185, 186, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2346, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 193, 0, 193, + 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2862, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2874, - 0, 0, 0, 0, 648, 648, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2539, 0, 0, 2891, 0, - 0, 2894, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2356, 0, 0, 0, 0, + 0, 0, 0, 0, 662, 0, 662, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2067, 0, 0, 0, 0, 0, 0, 2564, - 0, 648, 648, 648, 648, 0, 0, 0, 2569, 0, - 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 596, 0, 0, 0, - 0, 0, 0, 596, 0, 0, 0, 0, 0, 0, - 0, 0, 596, 596, 0, 0, 596, 0, 2269, 0, - 0, 0, 0, 0, 0, 596, 0, 0, 0, 0, - 0, 0, 596, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 662, 193, 0, 50, + 53, 56, 55, 58, 0, 72, 0, 0, 81, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3511, 2991, 0, 0, 0, 0, 0, 0, 596, 0, - 1590, 0, 0, 0, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1879, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1390, 0, 0, 0, 0, + 0, 0, 60, 89, 88, 0, 0, 70, 71, 57, + 0, 0, 0, 0, 0, 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1363, 0, 0, - 0, 0, 648, 0, 648, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1877, + 0, 0, 0, 0, 0, 0, 2297, 0, 0, 0, + 0, 0, 0, 0, 0, 2314, 2315, 62, 63, 2319, + 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, + 2324, 0, 0, 0, 0, 2476, 0, 2327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1879, 0, 0, 148, 0, 0, 149, 0, - 0, 0, 0, 1365, 0, 1776, 3052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3067, 0, 161, 3068, - 3069, 3070, 2689, 0, 648, 173, 0, 0, 0, 0, - 1130, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, - 0, 1673, 0, 0, 1578, 0, 181, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2726, + 0, 0, 0, 2330, 0, 0, 0, 2508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1130, 0, 0, 0, 0, 0, 0, - 2753, 1673, 0, 648, 0, 0, 0, 648, 648, 162, - 167, 164, 170, 171, 172, 174, 176, 177, 178, 179, - 0, 0, 0, 0, 0, 180, 182, 183, 184, 0, - 0, 0, 0, 0, 0, 0, 648, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 596, 0, 1591, 0, - 0, 0, 0, 0, 1724, 0, 0, 0, 0, 0, + 0, 59, 0, 0, 0, 917, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2547, 2548, 0, 0, + 0, 1390, 0, 0, 0, 2147, 0, 0, 917, 2567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 944, 0, 0, 0, 0, - 0, 0, 0, 2067, 0, 0, 0, 0, 0, 0, - 596, 0, 0, 0, 0, 596, 0, 0, 0, 0, - 1604, 1607, 1608, 1609, 1610, 1611, 1612, 648, 1613, 1614, - 1616, 1617, 1615, 1618, 1619, 1592, 1593, 1594, 1595, 1576, - 1577, 1605, 0, 1579, 0, 1580, 1581, 1582, 1583, 1584, - 1585, 1586, 1587, 1588, 0, 0, 1589, 1596, 1597, 1598, - 1599, 648, 1600, 1601, 1602, 1603, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 596, - 0, 0, 0, 0, 0, 0, 2549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 648, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1363, 0, 648, 2962, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, + 0, 0, 662, 662, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1365, 0, 0, 0, 0, 0, 648, 648, - 0, 0, 0, 0, 0, 596, 596, 596, 596, 596, + 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, + 0, 193, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 662, 0, 92, 0, 0, 0, 193, + 0, 0, 2644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 648, 0, 0, 0, 0, 0, 0, 0, 0, 596, - 596, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 596, 0, 0, 0, 1606, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1390, + 0, 0, 0, 0, 0, 662, 662, 0, 662, 0, + 662, 662, 0, 662, 662, 662, 662, 662, 662, 0, + 0, 0, 0, 0, 0, 0, 1390, 0, 0, 1390, + 662, 1390, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 921, 0, 648, 0, + 0, 69, 193, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 662, 0, 193, 0, 0, + 855, 0, 2062, 0, 0, 856, 0, 0, 0, 0, + 0, 662, 2568, 193, 0, 1924, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1590, 0, 0, 0, 0, 0, - 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 648, 0, 648, - 0, 0, 2067, 2067, 0, 0, 0, 0, 0, 0, + 193, 0, 0, 0, 0, 0, 0, 193, 0, 0, + 0, 0, 0, 0, 0, 0, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3392, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 921, 0, 3106, - 3107, 3108, 3109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2617, 2770, 862, 863, + 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, + 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, + 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, + 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2147, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2666, 2667, 2668, 2669, 2670, 0, 0, 0, + 0, 0, 0, 2832, 0, 85, 0, 0, 2147, 2147, + 2147, 2147, 2147, 0, 0, 0, 1877, 2680, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2147, 0, + 0, 2147, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 662, 662, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, + 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2938, 0, 0, 0, 93, + 0, 0, 855, 0, 0, 2946, 843, 856, 857, 858, + 859, 844, 0, 0, 845, 846, 0, 847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 596, 0, 0, 0, 0, 0, 0, + 662, 852, 860, 861, 0, 0, 0, 0, 0, 0, + 1390, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 662, 0, 0, 0, 0, 0, 1390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1365, 0, 0, 1578, 0, - 1365, 596, 596, 596, 596, 596, 0, 0, 0, 0, - 0, 0, 0, 2769, 0, 0, 0, 0, 0, 1724, - 0, 596, 0, 0, 596, 2777, 1776, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2950, 2951, + 0, 0, 662, 662, 0, 0, 0, 0, 0, 0, + 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, + 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, + 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, + 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, + 902, 903, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2070, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2952, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, + 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3182, 0, 3184, 0, 0, 0, 0, 0, 0, 0, - 596, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1591, 0, 0, 0, 1365, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 596, 0, 0, 0, + 0, 0, 0, 2147, 0, 0, 0, 0, 193, 2906, + 0, 662, 0, 0, 0, 0, 3133, 0, 0, 0, + 0, 193, 0, 0, 0, 662, 0, 0, 2070, 193, + 0, 193, 0, 193, 193, 2944, 0, 0, 0, 0, + 2953, 2954, 0, 0, 0, 0, 0, 0, 662, 2956, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 596, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2067, 0, 0, 0, 0, 0, 0, 596, - 0, 0, 596, 0, 0, 0, 0, 0, 3292, 0, - 0, 0, 0, 0, 1604, 1607, 1608, 1609, 1610, 1611, - 1612, 1130, 1613, 1614, 1616, 1617, 1615, 1618, 1619, 1592, - 1593, 1594, 1595, 1576, 1577, 1605, 0, 1579, 0, 1580, - 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 0, 0, - 1589, 1596, 1597, 1598, 1599, 0, 1600, 1601, 1602, 1603, + 0, 0, 0, 0, 0, 0, 0, 0, 2973, 0, + 0, 2976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3342, 0, 0, 0, 3342, 3342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 662, 0, 0, 0, 837, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2067, 0, 0, 0, 0, 0, - 0, 0, 596, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 809, 0, 0, 813, 0, 810, 811, + 0, 0, 662, 812, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 830, 0, 0, 0, 0, - 831, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1884, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2067, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 596, 0, 0, - 1606, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 596, 0, 2067, - 596, 596, 596, 837, 838, 839, 840, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, - 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 0, 0, 0, 0, 0, - 3419, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3423, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1130, 1130, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3466, 0, - 0, 0, 0, 0, 0, 0, 0, 91, 0, 0, - 830, 0, 0, 3474, 818, 831, 832, 833, 834, 819, - 0, 0, 820, 821, 0, 822, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 827, - 835, 836, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1724, 0, 3419, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1365, 0, 0, 0, 0, 2067, 0, - 0, 0, 0, 0, 0, 0, 2868, 2869, 0, 0, - 0, 0, 0, 0, 0, 2962, 0, 3474, 837, 838, - 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, - 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, - 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, - 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1724, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2870, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2871, 2872, - 0, 0, 0, 0, 0, 383, 0, 0, 0, 1264, - 1249, 502, 0, 1192, 1267, 1161, 1180, 1277, 1183, 1186, - 1228, 1140, 1206, 402, 1177, 1133, 1165, 1135, 1172, 1136, - 1163, 1194, 260, 1160, 1251, 1210, 1266, 353, 257, 1142, - 1166, 416, 1182, 198, 1230, 471, 244, 364, 361, 510, - 272, 263, 259, 242, 306, 372, 414, 492, 408, 1273, - 357, 1216, 0, 481, 387, 0, 0, 0, 1196, 1255, - 1204, 1242, 1191, 1229, 1150, 1215, 1268, 1178, 1225, 1269, - 312, 240, 314, 197, 399, 482, 276, 0, 0, 1724, - 0, 3446, 638, 0, 0, 0, 0, 3447, 0, 0, - 0, 0, 230, 0, 0, 237, 0, 0, 596, 338, - 347, 346, 327, 328, 330, 332, 337, 344, 350, 1174, - 1222, 1263, 1175, 1224, 255, 310, 262, 254, 507, 1274, - 1254, 1139, 1203, 1262, 0, 0, 221, 1265, 1198, 0, - 1227, 0, 1280, 1134, 1218, 0, 1137, 1141, 1276, 1258, - 1169, 265, 0, 0, 0, 0, 0, 0, 0, 1195, - 1205, 1239, 1243, 1189, 0, 0, 0, 0, 1365, 0, - 0, 1167, 0, 1214, 0, 0, 0, 1146, 1138, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1193, 0, 0, 0, 0, 1149, 0, 1168, 1240, - 1724, 1132, 287, 1143, 388, 247, 0, 438, 1247, 1257, - 1190, 549, 1261, 1188, 1187, 1234, 1147, 1253, 1181, 352, - 1145, 319, 193, 217, 0, 1179, 398, 446, 458, 1252, - 1164, 1173, 245, 1171, 456, 412, 527, 225, 274, 443, - 418, 454, 426, 277, 1213, 1232, 455, 359, 512, 436, - 524, 550, 551, 253, 392, 536, 496, 544, 568, 218, - 250, 406, 489, 530, 478, 384, 508, 509, 318, 477, - 285, 196, 356, 556, 216, 464, 358, 234, 223, 514, - 533, 279, 441, 563, 205, 491, 522, 231, 468, 0, - 0, 570, 239, 488, 207, 519, 487, 380, 315, 316, - 206, 0, 442, 258, 283, 0, 0, 248, 401, 516, - 517, 246, 571, 220, 543, 212, 1144, 542, 394, 511, - 520, 381, 370, 211, 518, 379, 369, 323, 342, 343, - 270, 296, 433, 362, 434, 295, 297, 390, 389, 391, - 200, 531, 0, 201, 0, 483, 532, 572, 226, 227, - 229, 1159, 269, 273, 281, 284, 292, 293, 302, 354, - 405, 432, 428, 437, 1248, 506, 525, 537, 548, 554, - 555, 557, 558, 559, 560, 561, 564, 562, 393, 300, - 479, 322, 360, 1237, 1279, 411, 457, 232, 529, 480, - 1154, 1158, 1152, 1219, 1153, 1208, 1209, 1155, 1270, 1271, - 1272, 573, 574, 575, 576, 577, 578, 579, 580, 581, - 582, 583, 584, 585, 586, 587, 588, 589, 590, 0, - 1241, 1148, 0, 1156, 1157, 1250, 1259, 1260, 591, 371, - 470, 526, 324, 336, 339, 329, 348, 0, 349, 325, - 326, 331, 333, 334, 335, 340, 341, 345, 351, 241, - 203, 377, 385, 505, 301, 208, 209, 210, 498, 499, - 500, 501, 540, 541, 545, 447, 448, 449, 450, 282, - 535, 298, 453, 452, 320, 321, 366, 435, 1212, 192, - 213, 355, 1275, 439, 278, 569, 539, 534, 199, 215, - 1151, 252, 1162, 1170, 0, 1176, 1184, 1185, 1197, 1199, - 1200, 1201, 1202, 1220, 1221, 1223, 1231, 1233, 1236, 1238, - 1245, 1256, 1278, 194, 195, 202, 214, 224, 228, 235, - 251, 266, 268, 275, 288, 299, 307, 308, 311, 317, - 367, 373, 374, 375, 376, 395, 396, 397, 400, 403, - 404, 407, 409, 410, 413, 417, 421, 422, 423, 425, - 427, 429, 440, 445, 459, 460, 461, 462, 463, 466, - 467, 472, 473, 474, 475, 476, 484, 485, 490, 513, - 515, 528, 546, 552, 465, 290, 291, 430, 431, 303, - 304, 566, 567, 289, 523, 553, 521, 565, 547, 424, - 365, 1211, 1217, 368, 271, 294, 309, 1226, 538, 486, - 219, 451, 280, 243, 1244, 1246, 204, 238, 222, 249, - 264, 267, 313, 378, 386, 415, 420, 286, 261, 236, - 444, 233, 469, 493, 494, 495, 497, 382, 256, 419, - 1207, 1235, 363, 503, 504, 305, 383, 0, 0, 0, - 1264, 1249, 502, 0, 1192, 1267, 1161, 1180, 1277, 1183, - 1186, 1228, 1140, 1206, 402, 1177, 1133, 1165, 1135, 1172, - 1136, 1163, 1194, 260, 1160, 1251, 1210, 1266, 353, 257, - 1142, 1166, 416, 1182, 198, 1230, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 1273, 357, 1216, 0, 481, 387, 0, 0, 0, 1196, - 1255, 1204, 1242, 1191, 1229, 1150, 1215, 1268, 1178, 1225, - 1269, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 1174, 1222, 1263, 1175, 1224, 255, 310, 262, 254, 507, - 1274, 1254, 1139, 1203, 1262, 0, 0, 221, 1265, 1198, - 0, 1227, 0, 1280, 1134, 1218, 0, 1137, 1141, 1276, - 1258, 1169, 265, 0, 0, 0, 0, 0, 0, 0, - 1195, 1205, 1239, 1243, 1189, 0, 0, 0, 0, 0, - 2778, 0, 1167, 0, 1214, 0, 0, 0, 1146, 1138, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1193, 0, 0, 0, 0, 1149, 0, 1168, - 1240, 0, 1132, 287, 1143, 388, 247, 0, 438, 1247, - 1257, 1190, 549, 1261, 1188, 1187, 1234, 1147, 1253, 1181, - 352, 1145, 319, 193, 217, 0, 1179, 398, 446, 458, - 1252, 1164, 1173, 245, 1171, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 1213, 1232, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 1144, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 1159, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 1248, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 1237, 1279, 411, 457, 232, 529, - 480, 1154, 1158, 1152, 1219, 1153, 1208, 1209, 1155, 1270, - 1271, 1272, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 1241, 1148, 0, 1156, 1157, 1250, 1259, 1260, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 1212, - 192, 213, 355, 1275, 439, 278, 569, 539, 534, 199, - 215, 1151, 252, 1162, 1170, 0, 1176, 1184, 1185, 1197, - 1199, 1200, 1201, 1202, 1220, 1221, 1223, 1231, 1233, 1236, - 1238, 1245, 1256, 1278, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 1211, 1217, 368, 271, 294, 309, 1226, 538, - 486, 219, 451, 280, 243, 1244, 1246, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 1207, 1235, 363, 503, 504, 305, 383, 0, 0, - 0, 1264, 1249, 502, 0, 1192, 1267, 1161, 1180, 1277, - 1183, 1186, 1228, 1140, 1206, 402, 1177, 1133, 1165, 1135, - 1172, 1136, 1163, 1194, 260, 1160, 1251, 1210, 1266, 353, - 257, 1142, 1166, 416, 1182, 198, 1230, 471, 244, 364, - 361, 510, 272, 263, 259, 242, 306, 372, 414, 492, - 408, 1273, 357, 1216, 0, 481, 387, 0, 0, 0, - 1196, 1255, 1204, 1242, 1191, 1229, 1150, 1215, 1268, 1178, - 1225, 1269, 312, 240, 314, 197, 399, 482, 276, 0, - 0, 0, 0, 0, 638, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 230, 0, 0, 237, 0, 0, - 0, 338, 347, 346, 327, 328, 330, 332, 337, 344, - 350, 1174, 1222, 1263, 1175, 1224, 255, 310, 262, 254, - 507, 1274, 1254, 1139, 1203, 1262, 0, 0, 221, 1265, - 1198, 0, 1227, 0, 1280, 1134, 1218, 0, 1137, 1141, - 1276, 1258, 1169, 265, 0, 0, 0, 0, 0, 0, - 0, 1195, 1205, 1239, 1243, 1189, 0, 0, 0, 0, - 0, 2739, 0, 1167, 0, 1214, 0, 0, 0, 1146, - 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1193, 0, 0, 0, 0, 1149, 0, - 1168, 1240, 0, 1132, 287, 1143, 388, 247, 0, 438, - 1247, 1257, 1190, 549, 1261, 1188, 1187, 1234, 1147, 1253, - 1181, 352, 1145, 319, 193, 217, 0, 1179, 398, 446, - 458, 1252, 1164, 1173, 245, 1171, 456, 412, 527, 225, - 274, 443, 418, 454, 426, 277, 1213, 1232, 455, 359, - 512, 436, 524, 550, 551, 253, 392, 536, 496, 544, - 568, 218, 250, 406, 489, 530, 478, 384, 508, 509, - 318, 477, 285, 196, 356, 556, 216, 464, 358, 234, - 223, 514, 533, 279, 441, 563, 205, 491, 522, 231, - 468, 0, 0, 570, 239, 488, 207, 519, 487, 380, - 315, 316, 206, 0, 442, 258, 283, 0, 0, 248, - 401, 516, 517, 246, 571, 220, 543, 212, 1144, 542, - 394, 511, 520, 381, 370, 211, 518, 379, 369, 323, - 342, 343, 270, 296, 433, 362, 434, 295, 297, 390, - 389, 391, 200, 531, 0, 201, 0, 483, 532, 572, - 226, 227, 229, 1159, 269, 273, 281, 284, 292, 293, - 302, 354, 405, 432, 428, 437, 1248, 506, 525, 537, - 548, 554, 555, 557, 558, 559, 560, 561, 564, 562, - 393, 300, 479, 322, 360, 1237, 1279, 411, 457, 232, - 529, 480, 1154, 1158, 1152, 1219, 1153, 1208, 1209, 1155, - 1270, 1271, 1272, 573, 574, 575, 576, 577, 578, 579, - 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, - 590, 0, 1241, 1148, 0, 1156, 1157, 1250, 1259, 1260, - 591, 371, 470, 526, 324, 336, 339, 329, 348, 0, - 349, 325, 326, 331, 333, 334, 335, 340, 341, 345, - 351, 241, 203, 377, 385, 505, 301, 208, 209, 210, - 498, 499, 500, 501, 540, 541, 545, 447, 448, 449, - 450, 282, 535, 298, 453, 452, 320, 321, 366, 435, - 1212, 192, 213, 355, 1275, 439, 278, 569, 539, 534, - 199, 215, 1151, 252, 1162, 1170, 0, 1176, 1184, 1185, - 1197, 1199, 1200, 1201, 1202, 1220, 1221, 1223, 1231, 1233, - 1236, 1238, 1245, 1256, 1278, 194, 195, 202, 214, 224, - 228, 235, 251, 266, 268, 275, 288, 299, 307, 308, - 311, 317, 367, 373, 374, 375, 376, 395, 396, 397, - 400, 403, 404, 407, 409, 410, 413, 417, 421, 422, - 423, 425, 427, 429, 440, 445, 459, 460, 461, 462, - 463, 466, 467, 472, 473, 474, 475, 476, 484, 485, - 490, 513, 515, 528, 546, 552, 465, 290, 291, 430, - 431, 303, 304, 566, 567, 289, 523, 553, 521, 565, - 547, 424, 365, 1211, 1217, 368, 271, 294, 309, 1226, - 538, 486, 219, 451, 280, 243, 1244, 1246, 204, 238, - 222, 249, 264, 267, 313, 378, 386, 415, 420, 286, - 261, 236, 444, 233, 469, 493, 494, 495, 497, 382, - 256, 419, 1207, 1235, 363, 503, 504, 305, 383, 0, - 0, 0, 1264, 1249, 502, 0, 1192, 1267, 1161, 1180, - 1277, 1183, 1186, 1228, 1140, 1206, 402, 1177, 1133, 1165, - 1135, 1172, 1136, 1163, 1194, 260, 1160, 1251, 1210, 1266, - 353, 257, 1142, 1166, 416, 1182, 198, 1230, 471, 244, - 364, 361, 510, 272, 263, 259, 242, 306, 372, 414, - 492, 408, 1273, 357, 1216, 0, 481, 387, 0, 0, - 0, 1196, 1255, 1204, 1242, 1191, 1229, 1150, 1215, 1268, - 1178, 1225, 1269, 312, 240, 314, 197, 399, 482, 276, - 0, 0, 0, 0, 0, 814, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 0, 0, 237, 0, - 0, 0, 338, 347, 346, 327, 328, 330, 332, 337, - 344, 350, 1174, 1222, 1263, 1175, 1224, 255, 310, 262, - 254, 507, 1274, 1254, 1139, 1203, 1262, 0, 0, 221, - 1265, 1198, 0, 1227, 0, 1280, 1134, 1218, 0, 1137, - 1141, 1276, 1258, 1169, 265, 0, 0, 0, 0, 0, - 0, 0, 1195, 1205, 1239, 1243, 1189, 0, 0, 0, - 0, 0, 2083, 0, 1167, 0, 1214, 0, 0, 0, - 1146, 1138, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1193, 0, 0, 0, 0, 1149, - 0, 1168, 1240, 0, 1132, 287, 1143, 388, 247, 0, - 438, 1247, 1257, 1190, 549, 1261, 1188, 1187, 1234, 1147, - 1253, 1181, 352, 1145, 319, 193, 217, 0, 1179, 398, - 446, 458, 1252, 1164, 1173, 245, 1171, 456, 412, 527, - 225, 274, 443, 418, 454, 426, 277, 1213, 1232, 455, - 359, 512, 436, 524, 550, 551, 253, 392, 536, 496, - 544, 568, 218, 250, 406, 489, 530, 478, 384, 508, - 509, 318, 477, 285, 196, 356, 556, 216, 464, 358, - 234, 223, 514, 533, 279, 441, 563, 205, 491, 522, - 231, 468, 0, 0, 570, 239, 488, 207, 519, 487, - 380, 315, 316, 206, 0, 442, 258, 283, 0, 0, - 248, 401, 516, 517, 246, 571, 220, 543, 212, 1144, - 542, 394, 511, 520, 381, 370, 211, 518, 379, 369, - 323, 342, 343, 270, 296, 433, 362, 434, 295, 297, - 390, 389, 391, 200, 531, 0, 201, 0, 483, 532, - 572, 226, 227, 229, 1159, 269, 273, 281, 284, 292, - 293, 302, 354, 405, 432, 428, 437, 1248, 506, 525, - 537, 548, 554, 555, 557, 558, 559, 560, 561, 564, - 562, 393, 300, 479, 322, 360, 1237, 1279, 411, 457, - 232, 529, 480, 1154, 1158, 1152, 1219, 1153, 1208, 1209, - 1155, 1270, 1271, 1272, 573, 574, 575, 576, 577, 578, - 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, - 589, 590, 0, 1241, 1148, 0, 1156, 1157, 1250, 1259, - 1260, 591, 371, 470, 526, 324, 336, 339, 329, 348, - 0, 349, 325, 326, 331, 333, 334, 335, 340, 341, - 345, 351, 241, 203, 377, 385, 505, 301, 208, 209, - 210, 498, 499, 500, 501, 540, 541, 545, 447, 448, - 449, 450, 282, 535, 298, 453, 452, 320, 321, 366, - 435, 1212, 192, 213, 355, 1275, 439, 278, 569, 539, - 534, 199, 215, 1151, 252, 1162, 1170, 0, 1176, 1184, - 1185, 1197, 1199, 1200, 1201, 1202, 1220, 1221, 1223, 1231, - 1233, 1236, 1238, 1245, 1256, 1278, 194, 195, 202, 214, - 224, 228, 235, 251, 266, 268, 275, 288, 299, 307, - 308, 311, 317, 367, 373, 374, 375, 376, 395, 396, - 397, 400, 403, 404, 407, 409, 410, 413, 417, 421, - 422, 423, 425, 427, 429, 440, 445, 459, 460, 461, - 462, 463, 466, 467, 472, 473, 474, 475, 476, 484, - 485, 490, 513, 515, 528, 546, 552, 465, 290, 291, - 430, 431, 303, 304, 566, 567, 289, 523, 553, 521, - 565, 547, 424, 365, 1211, 1217, 368, 271, 294, 309, - 1226, 538, 486, 219, 451, 280, 243, 1244, 1246, 204, - 238, 222, 249, 264, 267, 313, 378, 386, 415, 420, - 286, 261, 236, 444, 233, 469, 493, 494, 495, 497, - 382, 256, 419, 1207, 1235, 363, 503, 504, 305, 383, - 0, 0, 0, 1264, 1249, 502, 0, 1192, 1267, 1161, - 1180, 1277, 1183, 1186, 1228, 1140, 1206, 402, 1177, 1133, - 1165, 1135, 1172, 1136, 1163, 1194, 260, 1160, 1251, 1210, - 1266, 353, 257, 1142, 1166, 416, 1182, 198, 1230, 471, - 244, 364, 361, 510, 272, 263, 259, 242, 306, 372, - 414, 492, 408, 1273, 357, 1216, 0, 481, 387, 0, - 0, 0, 1196, 1255, 1204, 1242, 1191, 1229, 1150, 1215, - 1268, 1178, 1225, 1269, 312, 240, 314, 197, 399, 482, - 276, 0, 91, 0, 0, 0, 638, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 0, 0, 237, - 0, 0, 0, 338, 347, 346, 327, 328, 330, 332, - 337, 344, 350, 1174, 1222, 1263, 1175, 1224, 255, 310, - 262, 254, 507, 1274, 1254, 1139, 1203, 1262, 0, 0, - 221, 1265, 1198, 0, 1227, 0, 1280, 1134, 1218, 0, - 1137, 1141, 1276, 1258, 1169, 265, 0, 0, 0, 0, - 0, 0, 0, 1195, 1205, 1239, 1243, 1189, 0, 0, - 0, 0, 0, 0, 0, 1167, 0, 1214, 0, 0, - 0, 1146, 1138, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1193, 0, 0, 0, 0, - 1149, 0, 1168, 1240, 0, 1132, 287, 1143, 388, 247, - 0, 438, 1247, 1257, 1190, 549, 1261, 1188, 1187, 1234, - 1147, 1253, 1181, 352, 1145, 319, 193, 217, 0, 1179, - 398, 446, 458, 1252, 1164, 1173, 245, 1171, 456, 412, - 527, 225, 274, 443, 418, 454, 426, 277, 1213, 1232, - 455, 359, 512, 436, 524, 550, 551, 253, 392, 536, - 496, 544, 568, 218, 250, 406, 489, 530, 478, 384, - 508, 509, 318, 477, 285, 196, 356, 556, 216, 464, - 358, 234, 223, 514, 533, 279, 441, 563, 205, 491, - 522, 231, 468, 0, 0, 570, 239, 488, 207, 519, - 487, 380, 315, 316, 206, 0, 442, 258, 283, 0, - 0, 248, 401, 516, 517, 246, 571, 220, 543, 212, - 1144, 542, 394, 511, 520, 381, 370, 211, 518, 379, - 369, 323, 342, 343, 270, 296, 433, 362, 434, 295, - 297, 390, 389, 391, 200, 531, 0, 201, 0, 483, - 532, 572, 226, 227, 229, 1159, 269, 273, 281, 284, - 292, 293, 302, 354, 405, 432, 428, 437, 1248, 506, - 525, 537, 548, 554, 555, 557, 558, 559, 560, 561, - 564, 562, 393, 300, 479, 322, 360, 1237, 1279, 411, - 457, 232, 529, 480, 1154, 1158, 1152, 1219, 1153, 1208, - 1209, 1155, 1270, 1271, 1272, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - 588, 589, 590, 0, 1241, 1148, 0, 1156, 1157, 1250, - 1259, 1260, 591, 371, 470, 526, 324, 336, 339, 329, - 348, 0, 349, 325, 326, 331, 333, 334, 335, 340, - 341, 345, 351, 241, 203, 377, 385, 505, 301, 208, - 209, 210, 498, 499, 500, 501, 540, 541, 545, 447, - 448, 449, 450, 282, 535, 298, 453, 452, 320, 321, - 366, 435, 1212, 192, 213, 355, 1275, 439, 278, 569, - 539, 534, 199, 215, 1151, 252, 1162, 1170, 0, 1176, - 1184, 1185, 1197, 1199, 1200, 1201, 1202, 1220, 1221, 1223, - 1231, 1233, 1236, 1238, 1245, 1256, 1278, 194, 195, 202, - 214, 224, 228, 235, 251, 266, 268, 275, 288, 299, - 307, 308, 311, 317, 367, 373, 374, 375, 376, 395, - 396, 397, 400, 403, 404, 407, 409, 410, 413, 417, - 421, 422, 423, 425, 427, 429, 440, 445, 459, 460, - 461, 462, 463, 466, 467, 472, 473, 474, 475, 476, - 484, 485, 490, 513, 515, 528, 546, 552, 465, 290, - 291, 430, 431, 303, 304, 566, 567, 289, 523, 553, - 521, 565, 547, 424, 365, 1211, 1217, 368, 271, 294, - 309, 1226, 538, 486, 219, 451, 280, 243, 1244, 1246, - 204, 238, 222, 249, 264, 267, 313, 378, 386, 415, - 420, 286, 261, 236, 444, 233, 469, 493, 494, 495, - 497, 382, 256, 419, 1207, 1235, 363, 503, 504, 305, - 383, 0, 0, 0, 1264, 1249, 502, 0, 1192, 1267, - 1161, 1180, 1277, 1183, 1186, 1228, 1140, 1206, 402, 1177, - 1133, 1165, 1135, 1172, 1136, 1163, 1194, 260, 1160, 1251, - 1210, 1266, 353, 257, 1142, 1166, 416, 1182, 198, 1230, - 471, 244, 364, 361, 510, 272, 263, 259, 242, 306, - 372, 414, 492, 408, 1273, 357, 1216, 0, 481, 387, - 0, 0, 0, 1196, 1255, 1204, 1242, 1191, 1229, 1150, - 1215, 1268, 1178, 1225, 1269, 312, 240, 314, 197, 399, - 482, 276, 0, 0, 0, 0, 0, 638, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, - 237, 0, 0, 0, 338, 347, 346, 327, 328, 330, - 332, 337, 344, 350, 1174, 1222, 1263, 1175, 1224, 255, - 310, 262, 254, 507, 1274, 1254, 1139, 1203, 1262, 0, - 0, 221, 1265, 1198, 0, 1227, 0, 1280, 1134, 1218, - 0, 1137, 1141, 1276, 1258, 1169, 265, 0, 0, 0, - 0, 0, 0, 0, 1195, 1205, 1239, 1243, 1189, 0, - 0, 0, 0, 0, 0, 0, 1167, 0, 1214, 0, - 0, 0, 1146, 1138, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1193, 0, 0, 0, - 0, 1149, 0, 1168, 1240, 0, 1132, 287, 1143, 388, - 247, 0, 438, 1247, 1257, 1190, 549, 1261, 1188, 1187, - 1234, 1147, 1253, 1181, 352, 1145, 319, 193, 217, 0, - 1179, 398, 446, 458, 1252, 1164, 1173, 245, 1171, 456, - 412, 527, 225, 274, 443, 418, 454, 426, 277, 1213, - 1232, 455, 359, 512, 436, 524, 550, 551, 253, 392, - 536, 496, 544, 568, 218, 250, 406, 489, 530, 478, - 384, 508, 509, 318, 477, 285, 196, 356, 556, 216, - 464, 358, 234, 223, 514, 533, 279, 441, 563, 205, - 491, 522, 231, 468, 0, 0, 570, 239, 488, 207, - 519, 487, 380, 315, 316, 206, 0, 442, 258, 283, - 0, 0, 248, 401, 516, 517, 246, 571, 220, 543, - 212, 1144, 542, 394, 511, 520, 381, 370, 211, 518, - 379, 369, 323, 342, 343, 270, 296, 433, 362, 434, - 295, 297, 390, 389, 391, 200, 531, 0, 201, 0, - 483, 532, 572, 226, 227, 229, 1159, 269, 273, 281, - 284, 292, 293, 302, 354, 405, 432, 428, 437, 1248, - 506, 525, 537, 548, 554, 555, 557, 558, 559, 560, - 561, 564, 562, 393, 300, 479, 322, 360, 1237, 1279, - 411, 457, 232, 529, 480, 1154, 1158, 1152, 1219, 1153, - 1208, 1209, 1155, 1270, 1271, 1272, 573, 574, 575, 576, - 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, - 587, 588, 589, 590, 0, 1241, 1148, 0, 1156, 1157, - 1250, 1259, 1260, 591, 371, 470, 526, 324, 336, 339, - 329, 348, 0, 349, 325, 326, 331, 333, 334, 335, - 340, 341, 345, 351, 241, 203, 377, 385, 505, 301, - 208, 209, 210, 498, 499, 500, 501, 540, 541, 545, - 447, 448, 449, 450, 282, 535, 298, 453, 452, 320, - 321, 366, 435, 1212, 192, 213, 355, 1275, 439, 278, - 569, 539, 534, 199, 215, 1151, 252, 1162, 1170, 0, - 1176, 1184, 1185, 1197, 1199, 1200, 1201, 1202, 1220, 1221, - 1223, 1231, 1233, 1236, 1238, 1245, 1256, 1278, 194, 195, - 202, 214, 224, 228, 235, 251, 266, 268, 275, 288, - 299, 307, 308, 311, 317, 367, 373, 374, 375, 376, - 395, 396, 397, 400, 403, 404, 407, 409, 410, 413, - 417, 421, 422, 423, 425, 427, 429, 440, 445, 459, - 460, 461, 462, 463, 466, 467, 472, 473, 474, 475, - 476, 484, 485, 490, 513, 515, 528, 546, 552, 465, - 290, 291, 430, 431, 303, 304, 566, 567, 289, 523, - 553, 521, 565, 547, 424, 365, 1211, 1217, 368, 271, - 294, 309, 1226, 538, 486, 219, 451, 280, 243, 1244, - 1246, 204, 238, 222, 249, 264, 267, 313, 378, 386, - 415, 420, 286, 261, 236, 444, 233, 469, 493, 494, - 495, 497, 382, 256, 419, 1207, 1235, 363, 503, 504, - 305, 383, 0, 0, 0, 1264, 1249, 502, 0, 1192, - 1267, 1161, 1180, 1277, 1183, 1186, 1228, 1140, 1206, 402, - 1177, 1133, 1165, 1135, 1172, 1136, 1163, 1194, 260, 1160, - 1251, 1210, 1266, 353, 257, 1142, 1166, 416, 1182, 198, - 1230, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 1273, 357, 1216, 0, 481, - 387, 0, 0, 0, 1196, 1255, 1204, 1242, 1191, 1229, - 1150, 1215, 1268, 1178, 1225, 1269, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 814, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 1174, 1222, 1263, 1175, 1224, - 255, 310, 262, 254, 507, 1274, 1254, 1139, 1203, 1262, - 0, 0, 221, 1265, 1198, 0, 1227, 0, 1280, 1134, - 1218, 0, 1137, 1141, 1276, 1258, 1169, 265, 0, 0, - 0, 0, 0, 0, 0, 1195, 1205, 1239, 1243, 1189, - 0, 0, 0, 0, 0, 0, 0, 1167, 0, 1214, - 0, 0, 0, 1146, 1138, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1193, 0, 0, - 0, 0, 1149, 0, 1168, 1240, 0, 1132, 287, 1143, - 388, 247, 0, 438, 1247, 1257, 1190, 549, 1261, 1188, - 1187, 1234, 1147, 1253, 1181, 352, 1145, 319, 193, 217, - 0, 1179, 398, 446, 458, 1252, 1164, 1173, 245, 1171, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 1213, 1232, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 1144, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 1159, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 1248, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 1237, - 1279, 411, 457, 232, 529, 480, 1154, 1158, 1152, 1219, - 1153, 1208, 1209, 1155, 1270, 1271, 1272, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 1241, 1148, 0, 1156, - 1157, 1250, 1259, 1260, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 1212, 192, 213, 355, 1275, 439, - 278, 569, 539, 534, 199, 215, 1151, 252, 1162, 1170, - 0, 1176, 1184, 1185, 1197, 1199, 1200, 1201, 1202, 1220, - 1221, 1223, 1231, 1233, 1236, 1238, 1245, 1256, 1278, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 1211, 1217, 368, - 271, 294, 309, 1226, 538, 486, 219, 451, 280, 243, - 1244, 1246, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 1207, 1235, 363, 503, - 504, 305, 383, 0, 0, 0, 1264, 1249, 502, 0, - 1192, 1267, 1161, 1180, 1277, 1183, 1186, 1228, 1140, 1206, - 402, 1177, 1133, 1165, 1135, 1172, 1136, 1163, 1194, 260, - 1160, 1251, 1210, 1266, 353, 257, 1142, 1166, 416, 1182, - 198, 1230, 471, 244, 364, 361, 510, 272, 263, 259, - 242, 306, 372, 414, 492, 408, 1273, 357, 1216, 0, - 481, 387, 0, 0, 0, 1196, 1255, 1204, 1242, 1191, - 1229, 1150, 1215, 1268, 1178, 1225, 1269, 312, 240, 314, - 197, 399, 482, 276, 0, 0, 0, 0, 0, 190, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, - 0, 0, 237, 0, 0, 0, 338, 347, 346, 327, - 328, 330, 332, 337, 344, 350, 1174, 1222, 1263, 1175, - 1224, 255, 310, 262, 254, 507, 1274, 1254, 1139, 1203, - 1262, 0, 0, 221, 1265, 1198, 0, 1227, 0, 1280, - 1134, 1218, 0, 1137, 1141, 1276, 1258, 1169, 265, 0, - 0, 0, 0, 0, 0, 0, 1195, 1205, 1239, 1243, - 1189, 0, 0, 0, 0, 0, 0, 0, 1167, 0, - 1214, 0, 0, 0, 1146, 1138, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1193, 0, - 0, 0, 0, 1149, 0, 1168, 1240, 0, 1132, 287, - 1143, 388, 247, 0, 438, 1247, 1257, 1190, 549, 1261, - 1188, 1187, 1234, 1147, 1253, 1181, 352, 1145, 319, 193, - 217, 0, 1179, 398, 446, 458, 1252, 1164, 1173, 245, - 1171, 456, 412, 527, 225, 274, 443, 418, 454, 426, - 277, 1213, 1232, 455, 359, 512, 436, 524, 550, 551, - 253, 392, 536, 496, 544, 568, 218, 250, 406, 489, - 530, 478, 384, 508, 509, 318, 477, 285, 196, 356, - 556, 216, 464, 358, 234, 223, 514, 533, 279, 441, - 563, 205, 491, 522, 231, 468, 0, 0, 570, 239, - 488, 207, 519, 487, 380, 315, 316, 206, 0, 442, - 258, 283, 0, 0, 248, 401, 516, 517, 246, 571, - 220, 543, 212, 1144, 542, 394, 511, 520, 381, 370, - 211, 518, 379, 369, 323, 342, 343, 270, 296, 433, - 362, 434, 295, 297, 390, 389, 391, 200, 531, 0, - 201, 0, 483, 532, 572, 226, 227, 229, 1159, 269, - 273, 281, 284, 292, 293, 302, 354, 405, 432, 428, - 437, 1248, 506, 525, 537, 548, 554, 555, 557, 558, - 559, 560, 561, 564, 562, 393, 300, 479, 322, 360, - 1237, 1279, 411, 457, 232, 529, 480, 1154, 1158, 1152, - 1219, 1153, 1208, 1209, 1155, 1270, 1271, 1272, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 0, 1241, 1148, 0, - 1156, 1157, 1250, 1259, 1260, 591, 371, 470, 526, 324, - 336, 339, 329, 348, 0, 349, 325, 326, 331, 333, - 334, 335, 340, 341, 345, 351, 241, 203, 377, 385, - 505, 301, 208, 209, 210, 498, 499, 500, 501, 540, - 541, 545, 447, 448, 449, 450, 282, 535, 298, 453, - 452, 320, 321, 366, 435, 1212, 192, 213, 355, 1275, - 439, 278, 569, 539, 534, 199, 215, 1151, 252, 1162, - 1170, 0, 1176, 1184, 1185, 1197, 1199, 1200, 1201, 1202, - 1220, 1221, 1223, 1231, 1233, 1236, 1238, 1245, 1256, 1278, - 194, 195, 202, 214, 224, 228, 235, 251, 266, 268, - 275, 288, 299, 307, 308, 311, 317, 367, 373, 374, - 375, 376, 395, 396, 397, 400, 403, 404, 407, 409, - 410, 413, 417, 421, 422, 423, 425, 427, 429, 440, - 445, 459, 460, 461, 462, 463, 466, 467, 472, 473, - 474, 475, 476, 484, 485, 490, 513, 515, 528, 546, - 552, 465, 290, 291, 430, 431, 303, 304, 566, 567, - 289, 523, 553, 521, 565, 547, 424, 365, 1211, 1217, - 368, 271, 294, 309, 1226, 538, 486, 219, 451, 280, - 243, 1244, 1246, 204, 238, 222, 249, 264, 267, 313, - 378, 386, 415, 420, 286, 261, 236, 444, 233, 469, - 493, 494, 495, 497, 382, 256, 419, 1207, 1235, 363, - 503, 504, 305, 383, 0, 0, 0, 0, 0, 502, - 0, 691, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 402, 0, 0, 0, 0, 678, 0, 0, 0, - 260, 683, 0, 0, 0, 353, 257, 0, 0, 416, - 0, 198, 0, 471, 244, 364, 361, 510, 272, 263, - 259, 242, 306, 372, 414, 492, 408, 690, 357, 0, - 0, 481, 387, 0, 0, 0, 0, 0, 686, 687, - 0, 0, 0, 0, 0, 0, 0, 0, 312, 240, - 314, 197, 399, 482, 276, 0, 91, 0, 0, 830, - 814, 780, 781, 818, 831, 832, 833, 834, 819, 0, - 230, 820, 821, 237, 822, 0, 779, 718, 720, 719, - 737, 738, 739, 740, 741, 742, 743, 716, 827, 835, - 836, 0, 255, 310, 262, 254, 507, 0, 0, 1960, - 1961, 1962, 0, 0, 221, 0, 0, 0, 0, 0, - 0, 0, 660, 675, 0, 689, 0, 0, 0, 265, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 672, 673, 0, 0, 0, - 0, 774, 0, 674, 0, 0, 682, 837, 838, 839, - 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, - 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, - 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, - 870, 871, 872, 873, 874, 875, 876, 877, 878, 685, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 287, 0, 388, 247, 0, 438, 773, 0, 0, 549, - 0, 0, 771, 0, 0, 0, 0, 352, 0, 319, - 193, 217, 0, 0, 398, 446, 458, 0, 0, 0, - 824, 0, 456, 412, 527, 225, 274, 443, 418, 454, - 426, 277, 0, 0, 455, 359, 512, 436, 524, 550, - 551, 253, 392, 536, 496, 544, 568, 218, 250, 406, - 489, 530, 478, 384, 508, 509, 318, 477, 285, 196, - 356, 556, 216, 464, 358, 234, 223, 514, 533, 279, - 441, 563, 205, 491, 522, 231, 468, 0, 0, 570, - 239, 488, 207, 519, 487, 380, 315, 316, 206, 0, - 442, 258, 283, 0, 0, 248, 401, 825, 826, 246, - 571, 724, 543, 212, 0, 542, 394, 511, 520, 381, - 370, 211, 518, 379, 369, 323, 732, 733, 270, 296, - 759, 758, 434, 295, 297, 390, 389, 391, 200, 531, - 0, 201, 0, 483, 532, 572, 226, 227, 229, 0, - 269, 273, 281, 284, 292, 293, 302, 354, 405, 432, - 428, 437, 0, 506, 525, 537, 548, 554, 555, 557, - 558, 559, 560, 561, 564, 562, 393, 300, 479, 322, - 360, 0, 0, 411, 457, 232, 529, 480, 784, 772, - 695, 788, 697, 785, 786, 692, 693, 696, 787, 573, - 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, - 584, 585, 586, 587, 588, 589, 590, 0, 775, 681, - 680, 0, 688, 0, 714, 715, 717, 721, 722, 723, - 734, 735, 736, 744, 746, 747, 745, 748, 749, 750, - 753, 754, 755, 756, 751, 752, 757, 698, 702, 699, - 700, 701, 713, 703, 704, 705, 706, 707, 708, 709, - 710, 711, 712, 798, 799, 800, 801, 802, 803, 727, - 731, 730, 728, 729, 725, 726, 679, 192, 213, 355, - 0, 439, 278, 569, 539, 534, 199, 215, 789, 252, - 790, 0, 0, 794, 0, 0, 0, 796, 795, 0, - 797, 763, 762, 0, 0, 791, 792, 0, 793, 0, - 0, 194, 195, 202, 214, 224, 228, 235, 251, 266, - 268, 275, 288, 299, 307, 308, 311, 317, 367, 373, - 374, 375, 376, 395, 396, 397, 400, 403, 404, 407, - 409, 410, 413, 417, 421, 422, 423, 425, 427, 429, - 440, 445, 459, 460, 461, 462, 463, 466, 467, 472, - 473, 474, 475, 476, 484, 485, 490, 513, 515, 528, - 546, 552, 465, 804, 805, 806, 807, 808, 809, 810, - 811, 289, 523, 553, 521, 565, 547, 424, 365, 0, - 0, 368, 271, 294, 309, 0, 538, 486, 219, 451, - 280, 243, 829, 0, 204, 238, 222, 249, 264, 267, - 313, 378, 386, 415, 420, 286, 261, 236, 444, 233, - 469, 493, 494, 495, 497, 382, 256, 419, 383, 0, - 363, 503, 504, 305, 502, 0, 691, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, - 0, 678, 0, 0, 0, 260, 683, 0, 0, 0, - 353, 257, 0, 0, 416, 0, 198, 0, 471, 244, - 364, 361, 510, 272, 263, 259, 242, 306, 372, 414, - 492, 408, 690, 357, 0, 0, 481, 387, 0, 0, - 0, 0, 0, 686, 687, 0, 0, 0, 0, 0, - 0, 2112, 0, 312, 240, 314, 197, 399, 482, 276, - 0, 91, 0, 0, 830, 814, 780, 781, 818, 831, - 832, 833, 834, 819, 0, 230, 820, 821, 237, 822, - 0, 779, 718, 720, 719, 737, 738, 739, 740, 741, - 742, 743, 716, 827, 835, 836, 2113, 255, 310, 262, - 254, 507, 0, 0, 0, 0, 0, 0, 0, 221, - 0, 0, 0, 0, 0, 0, 0, 660, 675, 0, - 689, 0, 0, 0, 265, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 672, 673, 0, 0, 0, 0, 774, 0, 674, 0, - 0, 682, 837, 838, 839, 840, 841, 842, 843, 844, - 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, - 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, - 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, - 875, 876, 877, 878, 685, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 287, 0, 388, 247, 0, - 438, 773, 0, 0, 549, 0, 0, 771, 0, 0, - 0, 0, 352, 0, 319, 193, 217, 0, 0, 398, - 446, 458, 0, 0, 0, 824, 0, 456, 412, 527, - 225, 274, 443, 418, 454, 426, 277, 0, 0, 455, - 359, 512, 436, 524, 550, 551, 253, 392, 536, 496, - 544, 568, 218, 250, 406, 489, 530, 478, 384, 508, - 509, 318, 477, 285, 196, 356, 556, 216, 464, 358, - 234, 223, 514, 533, 279, 441, 563, 205, 491, 522, - 231, 468, 0, 0, 570, 239, 488, 207, 519, 487, - 380, 315, 316, 206, 0, 442, 258, 283, 0, 0, - 248, 401, 825, 826, 246, 571, 724, 543, 212, 0, - 542, 394, 511, 520, 381, 370, 211, 518, 379, 369, - 323, 732, 733, 270, 296, 759, 758, 434, 295, 297, - 390, 389, 391, 200, 531, 0, 201, 0, 483, 532, - 572, 226, 227, 229, 0, 269, 273, 281, 284, 292, - 293, 302, 354, 405, 432, 428, 437, 0, 506, 525, - 537, 548, 554, 555, 557, 558, 559, 560, 561, 564, - 562, 393, 300, 479, 322, 360, 0, 0, 411, 457, - 232, 529, 480, 784, 772, 695, 788, 697, 785, 786, - 692, 693, 696, 787, 573, 574, 575, 576, 577, 578, - 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, - 589, 590, 0, 775, 681, 680, 0, 688, 0, 714, - 715, 717, 721, 722, 723, 734, 735, 736, 744, 746, - 747, 745, 748, 749, 750, 753, 754, 755, 756, 751, - 752, 757, 698, 702, 699, 700, 701, 713, 703, 704, - 705, 706, 707, 708, 709, 710, 711, 712, 798, 799, - 800, 801, 802, 803, 727, 731, 730, 728, 729, 725, - 726, 679, 192, 213, 355, 0, 439, 278, 569, 539, - 534, 199, 215, 789, 252, 790, 0, 0, 794, 0, - 0, 0, 796, 795, 0, 797, 763, 762, 0, 0, - 791, 792, 0, 793, 0, 0, 194, 195, 202, 214, - 224, 228, 235, 251, 266, 268, 275, 288, 299, 307, - 308, 311, 317, 367, 373, 374, 375, 376, 395, 396, - 397, 400, 403, 404, 407, 409, 410, 413, 417, 421, - 422, 423, 425, 427, 429, 440, 445, 459, 460, 461, - 462, 463, 466, 467, 472, 473, 474, 475, 476, 484, - 485, 490, 513, 515, 528, 546, 552, 465, 804, 805, - 806, 807, 808, 809, 810, 811, 289, 523, 553, 521, - 565, 547, 424, 365, 0, 0, 368, 271, 294, 309, - 0, 538, 486, 219, 451, 280, 243, 829, 0, 204, - 238, 222, 249, 264, 267, 313, 378, 386, 415, 420, - 286, 261, 236, 444, 233, 469, 493, 494, 495, 497, - 382, 256, 419, 0, 383, 363, 503, 504, 305, 82, - 502, 0, 691, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 402, 0, 0, 0, 0, 678, 0, 0, - 0, 260, 683, 0, 0, 0, 353, 257, 0, 0, - 416, 0, 198, 0, 471, 244, 364, 361, 510, 272, - 263, 259, 242, 306, 372, 414, 492, 408, 690, 357, - 0, 0, 481, 387, 0, 0, 0, 0, 0, 686, - 687, 0, 0, 0, 0, 0, 0, 0, 0, 312, - 240, 314, 197, 399, 482, 276, 0, 91, 0, 0, - 830, 814, 780, 781, 818, 831, 832, 833, 834, 819, - 0, 230, 820, 821, 237, 822, 0, 779, 718, 720, - 719, 737, 738, 739, 740, 741, 742, 743, 716, 827, - 835, 836, 0, 255, 310, 262, 254, 507, 0, 0, - 0, 0, 0, 0, 0, 221, 0, 0, 0, 0, - 0, 0, 0, 660, 675, 0, 689, 0, 0, 0, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 672, 673, 0, 0, - 0, 0, 774, 0, 674, 0, 0, 682, 837, 838, - 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, - 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, - 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, - 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, - 685, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 287, 0, 388, 247, 0, 438, 773, 0, 0, - 549, 0, 0, 771, 0, 0, 0, 0, 352, 0, - 319, 193, 217, 0, 0, 398, 446, 458, 0, 0, - 0, 824, 0, 456, 412, 527, 225, 274, 443, 418, - 454, 426, 277, 0, 0, 455, 359, 512, 436, 524, - 550, 551, 253, 392, 536, 496, 544, 568, 218, 250, - 406, 489, 530, 478, 384, 508, 509, 318, 477, 285, - 196, 356, 556, 216, 464, 358, 234, 223, 514, 533, - 279, 441, 563, 205, 491, 522, 231, 468, 0, 0, - 570, 239, 488, 207, 519, 487, 380, 315, 316, 206, - 0, 442, 258, 283, 0, 0, 248, 401, 825, 826, - 246, 571, 724, 543, 212, 0, 542, 394, 511, 520, - 381, 370, 211, 518, 379, 369, 323, 732, 733, 270, - 296, 759, 758, 434, 295, 297, 390, 389, 391, 200, - 531, 0, 201, 0, 483, 532, 572, 226, 227, 229, - 0, 269, 273, 281, 284, 292, 293, 302, 354, 405, - 432, 428, 437, 0, 506, 525, 537, 548, 554, 555, - 557, 558, 559, 560, 561, 564, 562, 393, 300, 479, - 322, 360, 0, 0, 411, 457, 232, 529, 480, 784, - 772, 695, 788, 697, 785, 786, 692, 693, 696, 787, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 0, 775, - 681, 680, 0, 688, 0, 714, 715, 717, 721, 722, - 723, 734, 735, 736, 744, 746, 747, 745, 748, 749, - 750, 753, 754, 755, 756, 751, 752, 757, 698, 702, - 699, 700, 701, 713, 703, 704, 705, 706, 707, 708, - 709, 710, 711, 712, 798, 799, 800, 801, 802, 803, - 727, 731, 730, 728, 729, 725, 726, 679, 192, 213, - 355, 90, 439, 278, 569, 539, 534, 199, 215, 789, - 252, 790, 0, 0, 794, 0, 0, 0, 796, 795, - 0, 797, 763, 762, 0, 0, 791, 792, 0, 793, - 0, 0, 194, 195, 202, 214, 224, 228, 235, 251, - 266, 268, 275, 288, 299, 307, 308, 311, 317, 367, - 373, 374, 375, 376, 395, 396, 397, 400, 403, 404, - 407, 409, 410, 413, 417, 421, 422, 423, 425, 427, - 429, 440, 445, 459, 460, 461, 462, 463, 466, 467, - 472, 473, 474, 475, 476, 484, 485, 490, 513, 515, - 528, 546, 552, 465, 804, 805, 806, 807, 808, 809, - 810, 811, 289, 523, 553, 521, 565, 547, 424, 365, - 0, 0, 368, 271, 294, 309, 0, 538, 486, 219, - 451, 280, 243, 829, 0, 204, 238, 222, 249, 264, - 267, 313, 378, 386, 415, 420, 286, 261, 236, 444, - 233, 469, 493, 494, 495, 497, 382, 256, 419, 383, - 0, 363, 503, 504, 305, 502, 0, 691, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, - 0, 0, 678, 0, 0, 0, 260, 683, 0, 0, - 0, 353, 257, 0, 0, 416, 0, 198, 0, 471, - 244, 364, 361, 510, 272, 263, 259, 242, 306, 372, - 414, 492, 408, 690, 357, 0, 0, 481, 387, 0, - 0, 0, 0, 0, 686, 687, 0, 0, 0, 0, - 0, 0, 0, 0, 312, 240, 314, 197, 399, 482, - 276, 0, 91, 0, 0, 830, 814, 780, 781, 818, - 831, 832, 833, 834, 819, 0, 230, 820, 821, 237, - 822, 0, 779, 718, 720, 719, 737, 738, 739, 740, - 741, 742, 743, 716, 827, 835, 836, 0, 255, 310, - 262, 254, 507, 0, 0, 0, 0, 0, 0, 0, - 221, 0, 0, 0, 0, 0, 0, 0, 660, 675, - 0, 689, 0, 0, 0, 265, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 672, 673, 0, 0, 0, 0, 774, 0, 674, - 0, 0, 682, 837, 838, 839, 840, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, - 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 685, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 287, 0, 388, 247, - 0, 438, 773, 0, 0, 549, 0, 0, 771, 0, - 0, 0, 0, 352, 0, 319, 193, 217, 0, 0, - 398, 446, 458, 0, 0, 0, 824, 0, 456, 412, - 527, 225, 274, 443, 418, 454, 426, 277, 3433, 0, - 455, 359, 512, 436, 524, 550, 551, 253, 392, 536, - 496, 544, 568, 218, 250, 406, 489, 530, 478, 384, - 508, 509, 318, 477, 285, 196, 356, 556, 216, 464, - 358, 234, 223, 514, 533, 279, 441, 563, 205, 491, - 522, 231, 468, 0, 0, 570, 239, 488, 207, 519, - 487, 380, 315, 316, 206, 0, 442, 258, 283, 0, - 0, 248, 401, 825, 826, 246, 571, 724, 543, 212, - 0, 542, 394, 511, 520, 381, 370, 211, 518, 379, - 369, 323, 732, 733, 270, 296, 759, 758, 434, 295, - 297, 390, 389, 391, 200, 531, 0, 201, 0, 483, - 532, 572, 226, 227, 229, 0, 269, 273, 281, 284, - 292, 293, 302, 354, 405, 432, 428, 437, 0, 506, - 525, 537, 548, 554, 555, 557, 558, 559, 560, 561, - 564, 562, 393, 300, 479, 322, 360, 0, 0, 411, - 457, 232, 529, 480, 784, 772, 695, 788, 697, 785, - 786, 692, 693, 696, 787, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - 588, 589, 590, 0, 775, 681, 680, 0, 688, 0, - 714, 715, 717, 721, 722, 723, 734, 735, 736, 744, - 746, 747, 745, 748, 749, 750, 753, 754, 755, 756, - 751, 752, 757, 698, 702, 699, 700, 701, 713, 703, - 704, 705, 706, 707, 708, 709, 710, 711, 712, 798, - 799, 800, 801, 802, 803, 727, 731, 730, 728, 729, - 725, 726, 679, 192, 213, 355, 0, 439, 278, 569, - 539, 534, 199, 215, 789, 252, 790, 0, 0, 794, - 0, 0, 0, 796, 795, 0, 797, 763, 762, 0, - 0, 791, 792, 0, 793, 0, 0, 194, 195, 202, - 214, 224, 228, 235, 251, 266, 268, 275, 288, 299, - 307, 308, 311, 317, 367, 373, 374, 375, 376, 395, - 396, 397, 400, 403, 404, 407, 409, 410, 413, 417, - 421, 422, 423, 425, 427, 429, 440, 445, 459, 460, - 461, 462, 463, 466, 467, 472, 473, 474, 475, 476, - 484, 485, 490, 513, 515, 528, 546, 552, 465, 804, - 805, 806, 807, 808, 809, 810, 811, 289, 523, 553, - 521, 565, 547, 424, 365, 0, 0, 368, 271, 294, - 309, 0, 538, 486, 219, 451, 280, 243, 829, 0, - 204, 238, 222, 249, 264, 267, 313, 378, 386, 415, - 420, 286, 261, 236, 444, 233, 469, 493, 494, 495, - 497, 382, 256, 419, 383, 0, 363, 503, 504, 305, - 502, 0, 691, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 402, 0, 0, 0, 0, 678, 0, 0, - 0, 260, 683, 0, 0, 0, 353, 257, 0, 0, - 416, 0, 198, 0, 471, 244, 364, 361, 510, 272, - 263, 259, 242, 306, 372, 414, 492, 408, 690, 357, - 0, 0, 481, 387, 0, 0, 0, 0, 0, 686, - 687, 0, 0, 0, 0, 0, 0, 0, 0, 312, - 240, 314, 197, 399, 482, 276, 0, 91, 0, 1523, - 830, 814, 780, 781, 818, 831, 832, 833, 834, 819, - 0, 230, 820, 821, 237, 822, 0, 779, 718, 720, - 719, 737, 738, 739, 740, 741, 742, 743, 716, 827, - 835, 836, 0, 255, 310, 262, 254, 507, 0, 0, - 0, 0, 0, 0, 0, 221, 0, 0, 0, 0, - 0, 0, 0, 660, 675, 0, 689, 0, 0, 0, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 672, 673, 0, 0, - 0, 0, 774, 0, 674, 0, 0, 682, 837, 838, - 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, - 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, - 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, - 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, - 685, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 287, 0, 388, 247, 0, 438, 773, 0, 0, - 549, 0, 0, 771, 0, 0, 0, 0, 352, 0, - 319, 193, 217, 0, 0, 398, 446, 458, 0, 0, - 0, 824, 0, 456, 412, 527, 225, 274, 443, 418, - 454, 426, 277, 0, 0, 455, 359, 512, 436, 524, - 550, 551, 253, 392, 536, 496, 544, 568, 218, 250, - 406, 489, 530, 478, 384, 508, 509, 318, 477, 285, - 196, 356, 556, 216, 464, 358, 234, 223, 514, 533, - 279, 441, 563, 205, 491, 522, 231, 468, 0, 0, - 570, 239, 488, 207, 519, 487, 380, 315, 316, 206, - 0, 442, 258, 283, 0, 0, 248, 401, 825, 826, - 246, 571, 724, 543, 212, 0, 542, 394, 511, 520, - 381, 370, 211, 518, 379, 369, 323, 732, 733, 270, - 296, 759, 758, 434, 295, 297, 390, 389, 391, 200, - 531, 0, 201, 0, 483, 532, 572, 226, 227, 229, - 0, 269, 273, 281, 284, 292, 293, 302, 354, 405, - 432, 428, 437, 0, 506, 525, 537, 548, 554, 555, - 557, 558, 559, 560, 561, 564, 562, 393, 300, 479, - 322, 360, 0, 0, 411, 457, 232, 529, 480, 784, - 772, 695, 788, 697, 785, 786, 692, 693, 696, 787, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 0, 775, - 681, 680, 0, 688, 0, 714, 715, 717, 721, 722, - 723, 734, 735, 736, 744, 746, 747, 745, 748, 749, - 750, 753, 754, 755, 756, 751, 752, 757, 698, 702, - 699, 700, 701, 713, 703, 704, 705, 706, 707, 708, - 709, 710, 711, 712, 798, 799, 800, 801, 802, 803, - 727, 731, 730, 728, 729, 725, 726, 679, 192, 213, - 355, 0, 439, 278, 569, 539, 534, 199, 215, 789, - 252, 790, 0, 0, 794, 0, 0, 0, 796, 795, - 0, 797, 763, 762, 0, 0, 791, 792, 0, 793, - 0, 0, 194, 195, 202, 214, 224, 228, 235, 251, - 266, 268, 275, 288, 299, 307, 308, 311, 317, 367, - 373, 374, 375, 376, 395, 396, 397, 400, 403, 404, - 407, 409, 410, 413, 417, 421, 422, 423, 425, 427, - 429, 440, 445, 459, 460, 461, 462, 463, 466, 467, - 472, 473, 474, 475, 476, 484, 485, 490, 513, 515, - 528, 546, 552, 465, 804, 805, 806, 807, 808, 809, - 810, 811, 289, 523, 553, 521, 565, 547, 424, 365, - 0, 0, 368, 271, 294, 309, 0, 538, 486, 219, - 451, 280, 243, 829, 0, 204, 238, 222, 249, 264, - 267, 313, 378, 386, 415, 420, 286, 261, 236, 444, - 233, 469, 493, 494, 495, 497, 382, 256, 419, 383, - 0, 363, 503, 504, 305, 502, 0, 691, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, - 0, 0, 678, 0, 0, 0, 260, 683, 0, 0, - 0, 353, 257, 0, 0, 416, 0, 198, 0, 471, - 244, 364, 361, 510, 272, 263, 259, 242, 306, 372, - 414, 492, 408, 690, 357, 0, 0, 481, 387, 0, - 0, 0, 0, 0, 686, 687, 0, 0, 0, 0, - 0, 0, 0, 0, 312, 240, 314, 197, 399, 482, - 276, 0, 91, 0, 0, 830, 814, 780, 781, 818, - 831, 832, 833, 834, 819, 0, 230, 820, 821, 237, - 822, 0, 779, 718, 720, 719, 737, 738, 739, 740, - 741, 742, 743, 716, 827, 835, 836, 0, 255, 310, - 262, 254, 507, 0, 0, 0, 0, 0, 0, 0, - 221, 0, 0, 0, 0, 0, 0, 0, 660, 675, - 0, 689, 0, 0, 0, 265, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 672, 673, 919, 0, 0, 0, 774, 0, 674, - 0, 0, 682, 837, 838, 839, 840, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, - 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 685, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 287, 0, 388, 247, - 0, 438, 773, 0, 0, 549, 0, 0, 771, 0, - 0, 0, 0, 352, 0, 319, 193, 217, 0, 0, - 398, 446, 458, 0, 0, 0, 824, 0, 456, 412, - 527, 225, 274, 443, 418, 454, 426, 277, 0, 0, - 455, 359, 512, 436, 524, 550, 551, 253, 392, 536, - 496, 544, 568, 218, 250, 406, 489, 530, 478, 384, - 508, 509, 318, 477, 285, 196, 356, 556, 216, 464, - 358, 234, 223, 514, 533, 279, 441, 563, 205, 491, - 522, 231, 468, 0, 0, 570, 239, 488, 207, 519, - 487, 380, 315, 316, 206, 0, 442, 258, 283, 0, - 0, 248, 401, 825, 826, 246, 571, 724, 543, 212, - 0, 542, 394, 511, 520, 381, 370, 211, 518, 379, - 369, 323, 732, 733, 270, 296, 759, 758, 434, 295, - 297, 390, 389, 391, 200, 531, 0, 201, 0, 483, - 532, 572, 226, 227, 229, 0, 269, 273, 281, 284, - 292, 293, 302, 354, 405, 432, 428, 437, 0, 506, - 525, 537, 548, 554, 555, 557, 558, 559, 560, 561, - 564, 562, 393, 300, 479, 322, 360, 0, 0, 411, - 457, 232, 529, 480, 784, 772, 695, 788, 697, 785, - 786, 692, 693, 696, 787, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - 588, 589, 590, 0, 775, 681, 680, 0, 688, 0, - 714, 715, 717, 721, 722, 723, 734, 735, 736, 744, - 746, 747, 745, 748, 749, 750, 753, 754, 755, 756, - 751, 752, 757, 698, 702, 699, 700, 701, 713, 703, - 704, 705, 706, 707, 708, 709, 710, 711, 712, 798, - 799, 800, 801, 802, 803, 727, 731, 730, 728, 729, - 725, 726, 679, 192, 213, 355, 0, 439, 278, 569, - 539, 534, 199, 215, 789, 252, 790, 0, 0, 794, - 0, 0, 0, 796, 795, 0, 797, 763, 762, 0, - 0, 791, 792, 0, 793, 0, 0, 194, 195, 202, - 214, 224, 228, 235, 251, 266, 268, 275, 288, 299, - 307, 308, 311, 317, 367, 373, 374, 375, 376, 395, - 396, 397, 400, 403, 404, 407, 409, 410, 413, 417, - 421, 422, 423, 425, 427, 429, 440, 445, 459, 460, - 461, 462, 463, 466, 467, 472, 473, 474, 475, 476, - 484, 485, 490, 513, 515, 528, 546, 552, 465, 804, - 805, 806, 807, 808, 809, 810, 811, 289, 523, 553, - 521, 565, 547, 424, 365, 0, 0, 368, 271, 294, - 309, 0, 538, 486, 219, 451, 280, 243, 829, 0, - 204, 238, 222, 249, 264, 267, 313, 378, 386, 415, - 420, 286, 261, 236, 444, 233, 469, 493, 494, 495, - 497, 382, 256, 419, 383, 0, 363, 503, 504, 305, - 502, 0, 691, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 402, 0, 0, 0, 0, 678, 0, 0, - 0, 260, 683, 0, 0, 0, 353, 257, 0, 0, - 416, 0, 198, 0, 471, 244, 364, 361, 510, 272, - 263, 259, 242, 306, 372, 414, 492, 408, 690, 357, - 0, 0, 481, 387, 0, 0, 0, 0, 0, 686, - 687, 0, 0, 0, 0, 0, 0, 0, 0, 312, - 240, 314, 197, 399, 482, 276, 0, 91, 0, 0, - 830, 814, 780, 781, 818, 831, 832, 833, 834, 819, - 0, 230, 820, 821, 237, 822, 0, 779, 718, 720, - 719, 737, 738, 739, 740, 741, 742, 743, 716, 827, - 835, 836, 0, 255, 310, 262, 254, 507, 0, 0, - 0, 0, 0, 0, 0, 221, 0, 0, 0, 0, - 0, 0, 0, 660, 675, 0, 689, 0, 0, 0, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 672, 673, 0, 0, - 0, 0, 774, 0, 674, 0, 0, 682, 837, 838, - 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, - 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, - 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, - 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, - 685, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 287, 0, 388, 247, 0, 438, 773, 0, 0, - 549, 0, 0, 771, 0, 0, 0, 0, 352, 0, - 319, 193, 217, 0, 0, 398, 446, 458, 0, 0, - 0, 824, 0, 456, 412, 527, 225, 274, 443, 418, - 454, 426, 277, 0, 0, 455, 359, 512, 436, 524, - 550, 551, 253, 392, 536, 496, 544, 568, 218, 250, - 406, 489, 530, 478, 384, 508, 509, 318, 477, 285, - 196, 356, 556, 216, 464, 358, 234, 223, 514, 533, - 279, 441, 563, 205, 491, 522, 231, 468, 0, 0, - 570, 239, 488, 207, 519, 487, 380, 315, 316, 206, - 0, 442, 258, 283, 0, 0, 248, 401, 825, 826, - 246, 571, 724, 543, 212, 0, 542, 394, 511, 520, - 381, 370, 211, 518, 379, 369, 323, 732, 733, 270, - 296, 759, 758, 434, 295, 297, 390, 389, 391, 200, - 531, 0, 201, 0, 483, 532, 572, 226, 227, 229, - 0, 269, 273, 281, 284, 292, 293, 302, 354, 405, - 432, 428, 437, 0, 506, 525, 537, 548, 554, 555, - 557, 558, 559, 560, 561, 564, 562, 393, 300, 479, - 322, 360, 0, 0, 411, 457, 232, 529, 480, 784, - 772, 695, 788, 697, 785, 786, 692, 693, 696, 787, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 0, 775, - 681, 680, 0, 688, 0, 714, 715, 717, 721, 722, - 723, 734, 735, 736, 744, 746, 747, 745, 748, 749, - 750, 753, 754, 755, 756, 751, 752, 757, 698, 702, - 699, 700, 701, 713, 703, 704, 705, 706, 707, 708, - 709, 710, 711, 712, 798, 799, 800, 801, 802, 803, - 727, 731, 730, 728, 729, 725, 726, 679, 192, 213, - 355, 0, 439, 278, 569, 539, 534, 199, 215, 789, - 252, 790, 0, 0, 794, 0, 0, 0, 796, 795, - 0, 797, 763, 762, 0, 0, 791, 792, 0, 793, - 0, 0, 194, 195, 202, 214, 224, 228, 235, 251, - 266, 268, 275, 288, 299, 307, 308, 311, 317, 367, - 373, 374, 375, 376, 395, 396, 397, 400, 403, 404, - 407, 409, 410, 413, 417, 421, 422, 423, 425, 427, - 429, 440, 445, 459, 460, 461, 462, 463, 466, 467, - 472, 473, 474, 475, 476, 484, 485, 490, 513, 515, - 528, 546, 552, 465, 804, 805, 806, 807, 808, 809, - 810, 811, 289, 523, 553, 521, 565, 547, 424, 365, - 0, 0, 368, 271, 294, 309, 0, 538, 486, 219, - 451, 280, 243, 829, 0, 204, 238, 222, 249, 264, - 267, 313, 378, 386, 415, 420, 286, 261, 236, 444, - 233, 469, 493, 494, 495, 497, 382, 256, 419, 383, - 0, 363, 503, 504, 305, 502, 0, 691, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, - 0, 0, 678, 0, 0, 0, 260, 683, 0, 0, - 0, 353, 257, 0, 0, 416, 0, 198, 0, 471, - 244, 364, 361, 510, 272, 263, 259, 242, 306, 372, - 414, 492, 408, 690, 357, 0, 0, 481, 387, 0, - 0, 0, 0, 0, 686, 687, 0, 0, 0, 0, - 0, 0, 0, 0, 312, 240, 314, 197, 399, 482, - 276, 0, 91, 0, 0, 830, 814, 780, 781, 818, - 831, 832, 833, 834, 819, 0, 230, 820, 821, 237, - 822, 0, 779, 718, 720, 719, 737, 738, 739, 740, - 741, 742, 743, 716, 827, 835, 836, 0, 255, 310, - 262, 254, 507, 0, 0, 0, 0, 0, 0, 0, - 221, 0, 0, 0, 0, 0, 0, 0, 0, 675, - 0, 689, 0, 0, 0, 265, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 672, 673, 0, 0, 0, 0, 774, 0, 674, - 0, 0, 682, 837, 838, 839, 840, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, - 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 685, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 287, 0, 388, 247, - 0, 438, 773, 0, 0, 549, 0, 0, 771, 0, - 0, 0, 0, 352, 0, 319, 193, 217, 0, 0, - 398, 446, 458, 0, 0, 0, 824, 0, 456, 412, - 527, 225, 274, 443, 418, 454, 426, 277, 0, 0, - 455, 359, 512, 436, 524, 550, 551, 253, 392, 536, - 496, 544, 568, 218, 250, 406, 489, 530, 478, 384, - 508, 509, 318, 477, 285, 196, 356, 556, 216, 464, - 358, 234, 223, 514, 533, 279, 441, 563, 205, 491, - 522, 231, 468, 0, 0, 570, 239, 488, 207, 519, - 487, 380, 315, 316, 206, 0, 442, 258, 283, 0, - 0, 248, 401, 825, 826, 246, 571, 724, 543, 212, - 0, 542, 394, 511, 520, 381, 370, 211, 518, 379, - 369, 323, 732, 733, 270, 296, 759, 758, 434, 295, - 297, 390, 389, 391, 200, 531, 0, 201, 0, 483, - 532, 572, 226, 227, 229, 0, 269, 273, 281, 284, - 292, 293, 302, 354, 405, 432, 428, 437, 0, 506, - 525, 537, 548, 554, 555, 557, 558, 559, 560, 561, - 564, 562, 393, 300, 479, 322, 360, 0, 0, 411, - 457, 232, 529, 480, 784, 772, 695, 788, 697, 785, - 786, 692, 693, 696, 787, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - 588, 589, 590, 0, 775, 681, 680, 0, 688, 0, - 714, 715, 717, 721, 722, 723, 734, 735, 736, 744, - 746, 747, 745, 748, 749, 750, 753, 754, 755, 756, - 751, 752, 757, 698, 702, 699, 700, 701, 713, 703, - 704, 705, 706, 707, 708, 709, 710, 711, 712, 798, - 799, 800, 801, 802, 803, 727, 731, 730, 728, 729, - 725, 726, 679, 192, 213, 355, 0, 439, 278, 569, - 539, 534, 199, 215, 789, 252, 790, 0, 0, 794, - 0, 0, 0, 796, 795, 0, 797, 763, 762, 0, - 0, 791, 792, 0, 793, 0, 0, 194, 195, 202, - 214, 224, 228, 235, 251, 266, 268, 275, 288, 299, - 307, 308, 311, 317, 367, 373, 374, 375, 376, 395, - 396, 397, 400, 403, 404, 407, 409, 410, 413, 417, - 421, 422, 423, 425, 427, 429, 440, 445, 459, 460, - 461, 462, 463, 466, 467, 472, 473, 474, 475, 476, - 484, 485, 490, 513, 515, 528, 546, 552, 465, 804, - 805, 806, 807, 808, 809, 810, 811, 289, 523, 553, - 521, 565, 547, 424, 365, 0, 0, 368, 271, 294, - 309, 0, 538, 486, 219, 451, 280, 243, 829, 0, - 204, 238, 222, 249, 264, 267, 313, 378, 386, 415, - 420, 286, 261, 236, 444, 233, 469, 493, 494, 495, - 497, 382, 256, 419, 383, 0, 363, 503, 504, 305, - 502, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 402, 0, 0, 0, 0, 0, 0, 0, - 0, 260, 0, 0, 0, 0, 353, 257, 0, 0, - 416, 0, 198, 0, 471, 244, 364, 361, 510, 272, - 263, 259, 242, 306, 372, 414, 492, 408, 0, 357, - 0, 0, 481, 387, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 312, - 240, 314, 197, 399, 482, 276, 0, 0, 0, 0, - 0, 638, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 230, 0, 0, 237, 0, 0, 0, 338, 347, - 346, 327, 328, 330, 332, 337, 344, 350, 0, 0, - 0, 0, 0, 255, 310, 262, 254, 507, 0, 0, - 0, 0, 0, 0, 0, 221, 0, 0, 0, 0, - 1337, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1338, 1339, 1340, 1341, 1342, 1343, 1344, - 1346, 1345, 1347, 1348, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 287, 0, 388, 247, 0, 438, 0, 0, 0, - 549, 0, 0, 0, 0, 0, 0, 0, 352, 0, - 319, 193, 217, 0, 0, 398, 446, 458, 0, 0, - 0, 245, 0, 456, 412, 527, 225, 274, 443, 418, - 454, 426, 277, 0, 0, 455, 359, 512, 436, 524, - 550, 551, 253, 392, 536, 496, 544, 568, 218, 250, - 406, 489, 530, 478, 384, 508, 509, 318, 477, 285, - 196, 356, 556, 216, 464, 358, 234, 223, 514, 533, - 279, 441, 563, 205, 491, 522, 231, 468, 0, 0, - 570, 239, 488, 207, 519, 487, 380, 315, 316, 206, - 0, 442, 258, 283, 0, 0, 248, 401, 516, 517, - 246, 571, 220, 543, 212, 0, 542, 394, 511, 520, - 381, 370, 211, 518, 379, 369, 323, 342, 343, 270, - 296, 433, 362, 434, 295, 297, 390, 389, 391, 200, - 531, 0, 201, 0, 483, 532, 572, 226, 227, 229, - 0, 269, 273, 281, 284, 292, 293, 302, 354, 405, - 432, 428, 437, 0, 506, 525, 537, 548, 554, 555, - 557, 558, 559, 560, 561, 564, 562, 393, 300, 479, - 322, 360, 0, 0, 411, 457, 232, 529, 480, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 591, 371, 470, - 526, 324, 336, 339, 329, 348, 0, 349, 325, 326, - 331, 333, 334, 335, 340, 341, 345, 351, 241, 203, - 377, 385, 505, 301, 208, 209, 210, 498, 499, 500, - 501, 540, 541, 545, 447, 448, 449, 450, 282, 535, - 298, 453, 452, 320, 321, 366, 435, 0, 192, 213, - 355, 0, 439, 278, 569, 539, 534, 199, 215, 0, - 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 194, 195, 202, 214, 224, 228, 235, 251, - 266, 268, 275, 288, 299, 307, 308, 311, 317, 367, - 373, 374, 375, 376, 395, 396, 397, 400, 403, 404, - 407, 409, 410, 413, 417, 421, 422, 423, 425, 427, - 429, 440, 445, 459, 460, 461, 462, 463, 466, 467, - 472, 473, 474, 475, 476, 484, 485, 490, 513, 515, - 528, 546, 552, 465, 290, 291, 430, 431, 303, 304, - 566, 567, 289, 523, 553, 521, 565, 547, 424, 365, - 0, 0, 368, 271, 294, 309, 0, 538, 486, 219, - 451, 280, 243, 0, 0, 204, 238, 222, 249, 264, - 267, 313, 378, 386, 415, 420, 286, 261, 236, 444, - 233, 469, 493, 494, 495, 497, 382, 256, 419, 383, - 0, 363, 503, 504, 305, 502, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, - 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, - 0, 353, 257, 0, 0, 416, 0, 198, 0, 471, - 244, 364, 361, 510, 272, 263, 259, 242, 306, 372, - 414, 492, 408, 0, 357, 0, 0, 481, 387, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 312, 240, 314, 197, 399, 482, - 276, 0, 0, 0, 0, 0, 638, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 230, 0, 0, 237, - 0, 0, 0, 338, 347, 346, 327, 328, 330, 332, - 337, 344, 350, 0, 0, 0, 0, 0, 255, 310, - 262, 254, 507, 0, 0, 0, 0, 0, 0, 0, - 221, 0, 990, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 265, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 287, 0, 388, 247, - 0, 438, 0, 0, 989, 549, 0, 0, 0, 0, - 0, 986, 987, 352, 947, 319, 193, 217, 980, 984, - 398, 446, 458, 0, 0, 0, 245, 0, 456, 412, - 527, 225, 274, 443, 418, 454, 426, 277, 0, 0, - 455, 359, 512, 436, 524, 550, 551, 253, 392, 536, - 496, 544, 568, 218, 250, 406, 489, 530, 478, 384, - 508, 509, 318, 477, 285, 196, 356, 556, 216, 464, - 358, 234, 223, 514, 533, 279, 441, 563, 205, 491, - 522, 231, 468, 0, 0, 570, 239, 488, 207, 519, - 487, 380, 315, 316, 206, 0, 442, 258, 283, 0, - 0, 248, 401, 516, 517, 246, 571, 220, 543, 212, - 0, 542, 394, 511, 520, 381, 370, 211, 518, 379, - 369, 323, 342, 343, 270, 296, 433, 362, 434, 295, - 297, 390, 389, 391, 200, 531, 0, 201, 0, 483, - 532, 572, 226, 227, 229, 0, 269, 273, 281, 284, - 292, 293, 302, 354, 405, 432, 428, 437, 0, 506, - 525, 537, 548, 554, 555, 557, 558, 559, 560, 561, - 564, 562, 393, 300, 479, 322, 360, 0, 0, 411, - 457, 232, 529, 480, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - 588, 589, 590, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 591, 371, 470, 526, 324, 336, 339, 329, - 348, 0, 349, 325, 326, 331, 333, 334, 335, 340, - 341, 345, 351, 241, 203, 377, 385, 505, 301, 208, - 209, 210, 498, 499, 500, 501, 540, 541, 545, 447, - 448, 449, 450, 282, 535, 298, 453, 452, 320, 321, - 366, 435, 0, 192, 213, 355, 0, 439, 278, 569, - 539, 534, 199, 215, 0, 252, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 194, 195, 202, - 214, 224, 228, 235, 251, 266, 268, 275, 288, 299, - 307, 308, 311, 317, 367, 373, 374, 375, 376, 395, - 396, 397, 400, 403, 404, 407, 409, 410, 413, 417, - 421, 422, 423, 425, 427, 429, 440, 445, 459, 460, - 461, 462, 463, 466, 467, 472, 473, 474, 475, 476, - 484, 485, 490, 513, 515, 528, 546, 552, 465, 290, - 291, 430, 431, 303, 304, 566, 567, 289, 523, 553, - 521, 565, 547, 424, 365, 0, 0, 368, 271, 294, - 309, 0, 538, 486, 219, 451, 280, 243, 0, 0, - 204, 238, 222, 249, 264, 267, 313, 378, 386, 415, - 420, 286, 261, 236, 444, 233, 469, 493, 494, 495, - 497, 382, 256, 419, 383, 0, 363, 503, 504, 305, - 502, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 402, 0, 0, 0, 0, 0, 0, 0, - 0, 260, 0, 0, 0, 0, 353, 257, 0, 0, - 416, 0, 198, 0, 471, 244, 364, 361, 510, 272, - 263, 259, 242, 306, 372, 414, 492, 408, 0, 357, - 0, 0, 481, 387, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 312, - 240, 314, 197, 399, 482, 276, 0, 0, 0, 0, - 1486, 814, 0, 0, 1483, 0, 0, 0, 0, 1481, - 0, 230, 1482, 1480, 237, 1485, 0, 779, 338, 347, - 346, 327, 328, 330, 332, 337, 344, 350, 0, 0, - 0, 0, 0, 255, 310, 262, 254, 507, 0, 0, - 0, 0, 0, 0, 0, 221, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 287, 0, 388, 247, 0, 438, 0, 0, 0, - 549, 0, 0, 0, 0, 0, 0, 0, 352, 0, - 319, 193, 217, 0, 0, 398, 446, 458, 0, 0, - 0, 245, 0, 456, 412, 527, 225, 274, 443, 418, - 454, 426, 277, 0, 0, 455, 359, 512, 436, 524, - 550, 551, 253, 392, 536, 496, 544, 568, 218, 250, - 406, 489, 530, 478, 384, 508, 509, 318, 477, 285, - 196, 356, 556, 216, 464, 358, 234, 223, 514, 533, - 279, 441, 563, 205, 491, 522, 231, 468, 0, 0, - 570, 239, 488, 207, 519, 487, 380, 315, 316, 206, - 0, 442, 258, 283, 0, 0, 248, 401, 516, 517, - 246, 571, 220, 543, 212, 0, 542, 394, 511, 520, - 381, 370, 211, 518, 379, 369, 323, 342, 343, 270, - 296, 433, 362, 434, 295, 297, 390, 389, 391, 200, - 531, 0, 201, 0, 483, 532, 572, 226, 227, 229, - 0, 269, 273, 281, 284, 292, 293, 302, 354, 405, - 432, 428, 437, 0, 506, 525, 537, 548, 554, 555, - 557, 558, 559, 560, 561, 564, 562, 393, 300, 479, - 322, 360, 0, 0, 411, 457, 232, 529, 480, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 591, 371, 470, - 526, 324, 336, 339, 329, 348, 0, 349, 325, 326, - 331, 333, 334, 335, 340, 341, 345, 351, 241, 203, - 377, 385, 505, 301, 208, 209, 210, 498, 499, 500, - 501, 540, 541, 545, 447, 448, 449, 450, 282, 535, - 298, 453, 452, 320, 321, 366, 435, 0, 192, 213, - 355, 0, 439, 278, 569, 539, 534, 199, 215, 0, - 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 194, 195, 202, 214, 224, 228, 235, 251, - 266, 268, 275, 288, 299, 307, 308, 311, 317, 367, - 373, 374, 375, 376, 395, 396, 397, 400, 403, 404, - 407, 409, 410, 413, 417, 421, 422, 423, 425, 427, - 429, 440, 445, 459, 460, 461, 462, 463, 466, 467, - 472, 473, 474, 475, 476, 484, 485, 490, 513, 515, - 528, 546, 552, 465, 290, 291, 430, 431, 303, 304, - 566, 567, 289, 523, 553, 521, 565, 547, 424, 365, - 0, 0, 368, 271, 294, 309, 0, 538, 486, 219, - 451, 280, 243, 0, 0, 204, 238, 222, 249, 264, - 267, 313, 378, 386, 415, 420, 286, 261, 236, 444, - 233, 469, 493, 494, 495, 497, 382, 256, 419, 0, - 383, 363, 503, 504, 305, 82, 502, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, - 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, - 0, 0, 353, 257, 0, 0, 416, 0, 198, 0, - 471, 244, 364, 361, 510, 272, 263, 259, 242, 306, - 372, 414, 492, 408, 0, 357, 0, 0, 481, 387, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 240, 314, 197, 399, - 482, 276, 0, 91, 0, 0, 0, 190, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, - 237, 0, 0, 0, 338, 347, 346, 327, 328, 330, - 332, 337, 344, 350, 0, 0, 0, 0, 0, 255, - 310, 262, 254, 507, 0, 0, 0, 0, 0, 0, - 0, 221, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 265, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 287, 0, 388, - 247, 0, 438, 0, 0, 0, 549, 0, 0, 0, - 0, 0, 0, 0, 352, 0, 319, 193, 217, 0, - 0, 398, 446, 458, 0, 0, 0, 245, 0, 456, - 412, 527, 225, 274, 443, 418, 454, 426, 277, 0, - 0, 455, 359, 512, 436, 524, 550, 551, 253, 392, - 536, 496, 544, 568, 218, 250, 406, 489, 530, 478, - 384, 508, 509, 318, 477, 285, 196, 356, 556, 216, - 464, 358, 234, 223, 514, 533, 279, 441, 563, 205, - 491, 522, 231, 468, 0, 0, 570, 239, 488, 207, - 519, 487, 380, 315, 316, 206, 0, 442, 258, 283, - 0, 0, 248, 401, 516, 517, 246, 571, 220, 543, - 212, 0, 542, 394, 511, 520, 381, 370, 211, 518, - 379, 369, 323, 342, 343, 270, 296, 433, 362, 434, - 295, 297, 390, 389, 391, 200, 531, 0, 201, 0, - 483, 532, 572, 226, 227, 229, 0, 269, 273, 281, - 284, 292, 293, 302, 354, 405, 432, 428, 437, 0, - 506, 525, 537, 548, 554, 555, 557, 558, 559, 560, - 561, 564, 562, 393, 300, 479, 322, 360, 0, 0, - 411, 457, 232, 529, 480, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 573, 574, 575, 576, - 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, - 587, 588, 589, 590, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 591, 371, 470, 526, 324, 336, 339, - 329, 348, 0, 349, 325, 326, 331, 333, 334, 335, - 340, 341, 345, 351, 241, 203, 377, 385, 505, 301, - 208, 209, 210, 498, 499, 500, 501, 540, 541, 545, - 447, 448, 449, 450, 282, 535, 298, 453, 452, 320, - 321, 366, 435, 0, 192, 213, 355, 90, 439, 278, - 569, 539, 534, 199, 215, 0, 252, 0, 0, 0, - 0, 0, 0, 2099, 0, 0, 2098, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 194, 195, - 202, 214, 224, 228, 235, 251, 266, 268, 275, 288, - 299, 307, 308, 311, 317, 367, 373, 374, 375, 376, - 395, 396, 397, 400, 403, 404, 407, 409, 410, 413, - 417, 421, 422, 423, 425, 427, 429, 440, 445, 459, - 460, 461, 462, 463, 466, 467, 472, 473, 474, 475, - 476, 484, 485, 490, 513, 515, 528, 546, 552, 465, - 290, 291, 430, 431, 303, 304, 566, 567, 289, 523, - 553, 521, 565, 547, 424, 365, 0, 0, 368, 271, - 294, 309, 0, 538, 486, 219, 451, 280, 243, 0, - 0, 204, 238, 222, 249, 264, 267, 313, 378, 386, - 415, 420, 286, 261, 236, 444, 233, 469, 493, 494, - 495, 497, 382, 256, 419, 1542, 0, 363, 503, 504, - 305, 502, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 402, 0, 0, 0, 1544, 0, 0, - 0, 0, 260, 0, 0, 0, 0, 353, 257, 0, - 0, 416, 0, 198, 0, 471, 244, 364, 361, 510, - 272, 263, 259, 242, 306, 372, 414, 492, 408, 0, - 357, 0, 0, 481, 387, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 312, 240, 314, 197, 399, 482, 276, 0, 0, 0, - 0, 1546, 638, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 230, 0, 0, 237, 0, 0, 0, 338, - 347, 346, 327, 328, 330, 332, 337, 344, 350, 0, - 0, 0, 0, 0, 255, 310, 262, 254, 507, 0, - 0, 0, 0, 0, 0, 0, 221, 0, 0, 0, - 1318, 0, 1319, 1320, 0, 0, 0, 0, 0, 0, - 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 287, 0, 388, 247, 0, 438, 0, 0, - 0, 549, 0, 0, 0, 0, 0, 0, 0, 352, - 0, 319, 193, 217, 0, 0, 398, 446, 458, 0, - 0, 0, 245, 0, 456, 412, 527, 225, 274, 443, - 418, 454, 426, 277, 0, 0, 455, 359, 512, 436, - 524, 550, 551, 253, 392, 536, 496, 544, 568, 218, - 250, 406, 489, 530, 478, 384, 508, 509, 318, 477, - 285, 196, 356, 556, 216, 464, 358, 234, 223, 514, - 533, 279, 441, 563, 205, 491, 522, 231, 468, 0, - 0, 570, 239, 488, 207, 519, 487, 380, 315, 316, - 206, 0, 442, 258, 283, 0, 0, 248, 401, 516, - 517, 246, 571, 220, 543, 212, 0, 542, 394, 511, - 520, 381, 370, 211, 518, 379, 369, 323, 342, 343, - 270, 296, 433, 362, 434, 295, 297, 390, 389, 391, - 200, 531, 0, 201, 0, 483, 532, 572, 226, 227, - 229, 0, 269, 273, 281, 284, 292, 293, 302, 354, - 405, 432, 428, 437, 0, 506, 525, 537, 548, 554, - 555, 557, 558, 559, 560, 561, 564, 562, 393, 300, - 479, 322, 360, 0, 0, 411, 457, 232, 529, 480, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 573, 574, 575, 576, 577, 578, 579, 580, 581, - 582, 583, 584, 585, 586, 587, 588, 589, 590, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 591, 371, - 470, 526, 324, 336, 339, 329, 348, 0, 349, 325, - 326, 331, 333, 334, 335, 340, 341, 345, 351, 241, - 203, 377, 385, 505, 301, 208, 209, 210, 498, 499, - 500, 501, 540, 541, 545, 447, 448, 449, 450, 282, - 535, 298, 453, 452, 320, 321, 366, 435, 0, 192, - 213, 355, 0, 439, 278, 569, 539, 534, 199, 215, - 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 194, 195, 202, 214, 224, 228, 235, - 251, 266, 268, 275, 288, 299, 307, 308, 311, 317, - 367, 373, 374, 375, 376, 395, 396, 397, 400, 403, - 404, 407, 409, 410, 413, 417, 421, 422, 423, 425, - 427, 429, 440, 445, 459, 460, 461, 462, 463, 466, - 467, 472, 473, 474, 475, 476, 484, 485, 490, 513, - 515, 528, 546, 552, 465, 290, 291, 430, 431, 303, - 304, 566, 567, 289, 523, 553, 521, 565, 547, 424, - 365, 0, 0, 368, 271, 294, 309, 0, 538, 486, - 219, 451, 280, 243, 0, 0, 204, 238, 222, 249, - 264, 267, 313, 378, 386, 415, 420, 286, 261, 236, - 444, 233, 469, 493, 494, 495, 497, 382, 256, 419, - 0, 383, 363, 503, 504, 305, 82, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 91, 0, 1523, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 90, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 91, - 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 2099, - 0, 0, 2098, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 2049, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1725, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 2047, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 941, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 947, 319, 193, 217, 945, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 2049, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1725, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 1523, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 3343, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1880, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1881, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 2458, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2459, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 2443, 0, 0, 0, 0, 230, 0, - 0, 237, 2444, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 1565, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 1564, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 640, 641, - 642, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 3467, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1725, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 3343, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 91, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 2100, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1546, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 1835, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 1826, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 1692, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 1690, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 1688, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 1686, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 1684, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 1680, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 1678, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 1676, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 1651, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 1550, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 91, - 0, 0, 0, 814, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1297, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 1296, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 900, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 594, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 3475, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 638, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 383, 0, 363, 503, - 504, 305, 502, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, - 0, 0, 0, 260, 0, 0, 0, 0, 353, 257, - 0, 0, 416, 0, 198, 0, 471, 244, 364, 361, - 510, 272, 263, 259, 242, 306, 372, 414, 492, 408, - 0, 357, 0, 0, 481, 387, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 240, 314, 197, 399, 482, 276, 0, 0, - 0, 0, 0, 814, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 230, 0, 0, 237, 0, 0, 0, - 338, 347, 346, 327, 328, 330, 332, 337, 344, 350, - 0, 0, 0, 0, 0, 255, 310, 262, 254, 507, - 0, 0, 0, 0, 0, 0, 0, 221, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 287, 0, 388, 247, 0, 438, 0, - 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 319, 193, 217, 0, 0, 398, 446, 458, - 0, 0, 0, 245, 0, 456, 412, 527, 225, 274, - 443, 418, 454, 426, 277, 0, 0, 455, 359, 512, - 436, 524, 550, 551, 253, 392, 536, 496, 544, 568, - 218, 250, 406, 489, 530, 478, 384, 508, 509, 318, - 477, 285, 196, 356, 556, 216, 464, 358, 234, 223, - 514, 533, 279, 441, 563, 205, 491, 522, 231, 468, - 0, 0, 570, 239, 488, 207, 519, 487, 380, 315, - 316, 206, 0, 442, 258, 283, 0, 0, 248, 401, - 516, 517, 246, 571, 220, 543, 212, 0, 542, 394, - 511, 520, 381, 370, 211, 518, 379, 369, 323, 342, - 343, 270, 296, 433, 362, 434, 295, 297, 390, 389, - 391, 200, 531, 0, 201, 0, 483, 532, 572, 226, - 227, 229, 0, 269, 273, 281, 284, 292, 293, 302, - 354, 405, 432, 428, 437, 0, 506, 525, 537, 548, - 554, 555, 557, 558, 559, 560, 561, 564, 562, 393, - 300, 479, 322, 360, 0, 0, 411, 457, 232, 529, - 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, - 371, 470, 526, 324, 336, 339, 329, 348, 0, 349, - 325, 326, 331, 333, 334, 335, 340, 341, 345, 351, - 241, 203, 377, 385, 505, 301, 208, 209, 210, 498, - 499, 500, 501, 540, 541, 545, 447, 448, 449, 450, - 282, 535, 298, 453, 452, 320, 321, 366, 435, 0, - 192, 213, 355, 0, 439, 278, 569, 539, 534, 199, - 215, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 194, 195, 202, 214, 224, 228, - 235, 251, 266, 268, 275, 288, 299, 307, 308, 311, - 317, 367, 373, 374, 375, 376, 395, 396, 397, 400, - 403, 404, 407, 409, 410, 413, 417, 421, 422, 423, - 425, 427, 429, 440, 445, 459, 460, 461, 462, 463, - 466, 467, 472, 473, 474, 475, 476, 484, 485, 490, - 513, 515, 528, 546, 552, 465, 290, 291, 430, 431, - 303, 304, 566, 567, 289, 523, 553, 521, 565, 547, - 424, 365, 0, 0, 368, 271, 294, 309, 0, 538, - 486, 219, 451, 280, 243, 0, 0, 204, 238, 222, - 249, 264, 267, 313, 378, 386, 415, 420, 286, 261, - 236, 444, 233, 469, 493, 494, 495, 497, 382, 256, - 419, 383, 0, 363, 503, 504, 305, 502, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 353, 257, 0, 0, 416, 0, 198, - 0, 471, 244, 364, 361, 510, 272, 263, 259, 242, - 306, 372, 414, 492, 408, 0, 357, 0, 0, 481, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 312, 240, 314, 197, - 399, 482, 276, 0, 0, 0, 0, 0, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, - 0, 237, 0, 0, 0, 338, 347, 346, 327, 328, - 330, 332, 337, 344, 350, 0, 0, 0, 0, 0, - 255, 310, 262, 254, 507, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, - 388, 247, 0, 438, 0, 0, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 319, 193, 217, - 0, 0, 398, 446, 458, 0, 0, 0, 245, 0, - 456, 412, 527, 225, 274, 443, 418, 454, 426, 277, - 0, 0, 455, 359, 512, 436, 524, 550, 551, 253, - 392, 536, 496, 544, 568, 218, 250, 406, 489, 530, - 478, 384, 508, 509, 318, 477, 285, 196, 356, 556, - 216, 464, 358, 234, 223, 514, 533, 279, 441, 563, - 205, 491, 522, 231, 468, 0, 0, 570, 239, 488, - 207, 519, 487, 380, 315, 316, 206, 0, 442, 258, - 283, 0, 0, 248, 401, 516, 517, 246, 571, 220, - 543, 212, 0, 542, 394, 511, 520, 381, 370, 211, - 518, 379, 369, 323, 342, 343, 270, 296, 433, 362, - 434, 295, 297, 390, 389, 391, 200, 531, 0, 201, - 0, 483, 532, 572, 226, 227, 229, 0, 269, 273, - 281, 284, 292, 293, 302, 354, 405, 432, 428, 437, - 0, 506, 525, 537, 548, 554, 555, 557, 558, 559, - 560, 561, 564, 562, 393, 300, 479, 322, 360, 0, - 0, 411, 457, 232, 529, 480, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 591, 371, 470, 526, 324, 336, - 339, 329, 348, 0, 349, 325, 326, 331, 333, 334, - 335, 340, 341, 345, 351, 241, 203, 377, 385, 505, - 301, 208, 209, 210, 498, 499, 500, 501, 540, 541, - 545, 447, 448, 449, 450, 282, 535, 298, 453, 452, - 320, 321, 366, 435, 0, 192, 213, 355, 0, 439, - 278, 569, 539, 534, 199, 215, 0, 252, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, - 195, 202, 214, 224, 228, 235, 251, 266, 268, 275, - 288, 299, 307, 308, 311, 317, 367, 373, 374, 375, - 376, 395, 396, 397, 400, 403, 404, 407, 409, 410, - 413, 417, 421, 422, 423, 425, 427, 429, 440, 445, - 459, 460, 461, 462, 463, 466, 467, 472, 473, 474, - 475, 476, 484, 485, 490, 513, 515, 528, 546, 552, - 465, 290, 291, 430, 431, 303, 304, 566, 567, 289, - 523, 553, 521, 565, 547, 424, 365, 0, 0, 368, - 271, 294, 309, 0, 538, 486, 219, 451, 280, 243, - 0, 0, 204, 238, 222, 249, 264, 267, 313, 378, - 386, 415, 420, 286, 261, 236, 444, 233, 469, 493, - 494, 495, 497, 382, 256, 419, 0, 0, 363, 503, - 504, 305, 91, 0, 0, 830, 0, 0, 0, 818, - 831, 832, 833, 834, 819, 0, 0, 820, 821, 0, - 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 827, 835, 836, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2868, 2869, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 837, 838, 839, 840, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, - 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 641, 0, 0, 0, 0, 0, 661, 0, 0, 0, + 0, 0, 0, 0, 0, 662, 0, 0, 0, 3089, + 662, 0, 0, 0, 662, 662, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 661, 0, 661, + 0, 3260, 193, 3264, 3265, 0, 0, 0, 0, 193, + 855, 0, 0, 0, 0, 856, 0, 0, 193, 193, + 0, 0, 193, 0, 193, 1924, 2832, 0, 85, 0, + 2832, 0, 0, 193, 0, 0, 0, 0, 0, 0, + 193, 0, 0, 0, 3150, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3165, 0, 193, 3166, 3167, 3168, + 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3400, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 0, 0, 0, 0, 0, + 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, + 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, + 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, + 0, 1390, 0, 2070, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2832, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1413, 1414, + 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, + 1425, 1426, 1427, 1428, 1432, 1433, 1434, 1435, 1436, 1437, + 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, + 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, + 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, + 1468, 1469, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, + 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1504, 1505, + 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, + 1516, 1517, 0, 0, 0, 0, 193, 0, 0, 0, + 0, 0, 0, 0, 193, 0, 3507, 0, 0, 0, + 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, + 0, 0, 0, 0, 85, 0, 662, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 193, 0, 0, 0, 0, 193, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 795, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3552, 0, 0, 0, 0, 85, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 662, 191, 0, 0, 608, 0, 193, + 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 608, 0, 0, + 662, 0, 0, 0, 0, 0, 0, 662, 0, 0, + 0, 0, 927, 0, 0, 0, 662, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 946, + 946, 0, 1390, 0, 0, 0, 0, 0, 608, 0, + 0, 0, 0, 0, 0, 193, 193, 193, 193, 193, + 0, 0, 0, 0, 0, 3636, 0, 0, 0, 0, + 0, 661, 1307, 661, 661, 0, 0, 0, 0, 193, + 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 193, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1389, 0, 0, 662, 0, 0, 794, 0, + 0, 3518, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 660, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, + 662, 0, 0, 0, 0, 0, 969, 0, 976, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 662, 0, 0, 0, 0, 0, 0, 1389, 0, + 0, 0, 0, 0, 0, 193, 0, 0, 0, 662, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 662, 0, 0, 0, 1390, 0, 0, + 662, 662, 1390, 193, 193, 193, 193, 193, 0, 0, + 0, 0, 0, 0, 0, 193, 0, 0, 0, 0, + 0, 193, 0, 193, 0, 0, 193, 193, 193, 661, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, + 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 662, 0, 0, 1390, 0, + 1659, 0, 0, 662, 0, 0, 0, 0, 193, 0, + 1668, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 661, 0, 1694, 0, 0, 0, 0, + 0, 193, 0, 1703, 193, 0, 1389, 1705, 0, 0, + 1708, 1709, 661, 661, 0, 661, 0, 661, 661, 0, + 661, 661, 661, 661, 661, 661, 0, 0, 0, 0, + 0, 0, 0, 1389, 1740, 1741, 1389, 661, 1389, 0, + 1746, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1808, 0, 0, 661, 0, + 0, 0, 0, 662, 608, 0, 608, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 608, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, + 0, 0, 1391, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, + 193, 193, 193, 0, 0, 0, 0, 0, 0, 0, + 662, 662, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 662, 662, 662, + 662, 0, 0, 0, 0, 0, 0, 661, 661, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1156, 0, 1156, 1156, 0, 0, 0, 0, 1391, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1319, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1389, 0, 0, + 0, 0, 0, 0, 0, 0, 1933, 0, 661, 0, + 0, 0, 0, 0, 1389, 608, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 193, 0, 0, 0, 0, 927, 0, 0, 0, 661, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 1390, + 0, 0, 0, 0, 662, 0, 662, 0, 608, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 608, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1391, 0, 0, 193, + 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, + 0, 661, 0, 1391, 0, 0, 1391, 0, 1391, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 661, 1762, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 608, 661, 0, 0, 0, 0, + 0, 0, 0, 662, 0, 0, 0, 662, 662, 0, + 1814, 0, 0, 0, 0, 661, 0, 0, 1539, 1540, + 0, 0, 0, 0, 0, 0, 0, 608, 0, 0, + 0, 0, 0, 0, 608, 0, 662, 0, 0, 0, + 0, 0, 0, 1839, 1840, 608, 608, 608, 608, 608, + 608, 608, 0, 0, 1583, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1601, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 2230, + 2231, 2232, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, + 0, 0, 0, 0, 0, 661, 1703, 0, 0, 1703, + 0, 1703, 969, 0, 0, 0, 0, 2262, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, + 0, 1711, 1711, 0, 1711, 0, 1711, 1711, 0, 1720, + 1711, 1711, 1711, 1711, 1711, 193, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 969, 661, 0, 0, + 0, 661, 661, 662, 193, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1788, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1812, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1390, 0, 662, 0, 0, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1156, 0, 0, 0, 0, 0, 0, 662, 2070, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, + 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 193, 662, 0, 1391, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 946, + 946, 0, 0, 0, 1391, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1389, 662, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 662, 0, 0, 0, 0, 193, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, + 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 946, 1814, 946, 946, 946, 946, 946, 0, + 0, 0, 0, 0, 0, 0, 1156, 1156, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1865, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 946, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 927, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1919, 0, 608, 0, + 0, 0, 0, 0, 0, 1814, 608, 0, 608, 0, + 608, 2156, 0, 0, 0, 0, 0, 1935, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 661, 0, 0, 0, 0, 1968, 1969, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2581, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1156, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2107, 0, 0, 0, 0, 0, 0, 661, 0, 0, + 0, 0, 0, 0, 661, 0, 0, 0, 1703, 1703, + 0, 0, 0, 661, 0, 0, 0, 2119, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1389, + 2654, 1583, 0, 0, 1156, 0, 0, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 608, 0, 0, 0, + 0, 0, 0, 0, 969, 608, 608, 0, 0, 608, + 0, 2321, 0, 0, 0, 0, 0, 0, 0, 0, + 608, 0, 0, 0, 0, 0, 0, 608, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 608, 0, 0, 0, 0, 0, 0, + 0, 976, 661, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 969, 0, + 0, 0, 0, 0, 976, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1391, 0, + 1814, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 969, 0, 0, 0, 0, 1919, 0, 0, 0, + 1919, 1919, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, + 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 1389, 0, 0, 661, 661, 1389, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2333, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 608, 0, 0, 0, 0, 0, 0, + 0, 1762, 0, 0, 0, 0, 0, 0, 0, 0, + 2901, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, + 0, 0, 661, 0, 0, 1389, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 0, 0, 608, 0, 0, + 0, 0, 608, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2980, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 608, 0, 0, 0, + 0, 0, 0, 2623, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 1391, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 608, 608, 608, 608, 608, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2516, 0, 0, 0, 0, 608, 608, 0, 0, + 0, 0, 2531, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 608, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 946, 0, 0, 0, 0, + 0, 0, 0, 3140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, + 0, 0, 855, 0, 0, 0, 843, 856, 857, 858, + 859, 844, 0, 0, 845, 846, 0, 847, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 661, 661, 2613, + 0, 852, 860, 861, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2119, 0, 0, 0, + 0, 0, 0, 2638, 0, 0, 0, 0, 0, 0, + 0, 0, 2643, 0, 661, 661, 661, 661, 2950, 2951, + 0, 0, 0, 0, 0, 0, 946, 0, 0, 0, + 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, + 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, + 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, + 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, + 902, 903, 608, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1391, 0, 0, 0, 0, 1391, + 608, 608, 608, 608, 608, 0, 0, 0, 0, 0, + 0, 1919, 2851, 2952, 0, 0, 0, 0, 1762, 0, + 608, 0, 0, 608, 2859, 1814, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1389, 0, 1919, 0, + 0, 661, 0, 661, 0, 0, 0, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1391, 0, 0, 0, 0, + 2953, 2954, 0, 0, 0, 608, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 2771, 0, + 0, 0, 0, 661, 0, 0, 1156, 0, 608, 0, + 0, 608, 0, 0, 0, 0, 0, 0, 0, 661, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 1711, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2808, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, + 0, 0, 0, 0, 0, 0, 2835, 1711, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 661, 661, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 661, 0, 0, 0, 0, 0, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 969, 0, 0, 0, 0, 0, 0, 0, 2119, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 608, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 608, 0, 661, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 608, 0, 0, 608, 608, 608, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3060, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1389, + 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 661, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2870, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1762, 0, 0, + 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1391, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2119, 2119, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 661, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3204, 3205, 3206, 3207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2871, 2872, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6196,32 +2573,3950 @@ var yyAct = [...]int{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 784, 0, 0, 788, 0, 785, - 786, 0, 0, 0, 787, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3288, 0, 3290, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2119, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3410, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1156, 1762, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 608, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3468, + 0, 0, 0, 3468, 3468, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1391, + 0, 0, 2119, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3571, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1762, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2119, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2119, + 0, 0, 0, 1814, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3545, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3549, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1156, 1156, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3593, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3601, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3545, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2119, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 386, 3060, 0, 3601, 1290, 1275, + 506, 0, 1218, 1293, 1187, 1206, 1303, 1209, 1212, 1254, + 1166, 1232, 405, 1203, 1159, 1191, 1161, 1198, 1162, 1189, + 1220, 263, 1186, 1277, 1236, 1292, 356, 260, 1168, 1192, + 419, 1208, 200, 1256, 475, 247, 367, 364, 522, 275, + 266, 262, 245, 309, 375, 417, 496, 411, 1299, 360, + 1242, 0, 485, 390, 0, 0, 0, 1222, 1281, 1230, + 1268, 1217, 1255, 1176, 1241, 1294, 1204, 1251, 1295, 315, + 243, 317, 199, 402, 486, 279, 0, 0, 0, 0, + 3573, 839, 0, 0, 0, 0, 3574, 0, 0, 0, + 0, 233, 0, 0, 240, 0, 0, 0, 341, 350, + 349, 330, 331, 333, 335, 340, 347, 353, 1200, 1248, + 1289, 1201, 1250, 258, 313, 265, 257, 519, 1300, 1280, + 1165, 1229, 1288, 0, 0, 224, 1291, 1224, 0, 1253, + 0, 1306, 1160, 1244, 0, 1163, 1167, 1302, 1284, 1195, + 268, 0, 0, 0, 0, 0, 0, 0, 1221, 1231, + 1265, 1269, 1215, 0, 0, 0, 0, 0, 0, 0, + 1193, 0, 1240, 0, 0, 0, 1172, 1164, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1219, 0, 0, 0, 0, 1175, 0, 1194, 1266, 0, + 1158, 290, 1169, 391, 250, 0, 442, 1273, 1283, 1216, + 561, 1287, 1214, 1213, 1260, 1173, 1279, 1207, 355, 1171, + 322, 195, 220, 0, 1205, 401, 450, 462, 1278, 1190, + 1199, 248, 1197, 460, 415, 539, 228, 277, 447, 421, + 458, 429, 280, 1239, 1258, 459, 362, 524, 439, 536, + 562, 563, 256, 395, 548, 500, 556, 580, 221, 253, + 409, 493, 542, 482, 387, 520, 521, 321, 481, 288, + 198, 359, 568, 219, 468, 361, 237, 226, 526, 545, + 282, 445, 575, 208, 495, 534, 234, 472, 0, 0, + 582, 242, 492, 210, 531, 491, 383, 318, 319, 209, + 0, 446, 261, 286, 0, 0, 251, 404, 528, 529, + 249, 583, 223, 555, 215, 1170, 554, 397, 523, 532, + 384, 373, 214, 530, 382, 372, 326, 345, 346, 273, + 299, 436, 365, 437, 298, 300, 393, 392, 394, 202, + 543, 0, 203, 0, 487, 544, 584, 441, 207, 229, + 230, 232, 1185, 272, 276, 284, 287, 295, 296, 305, + 357, 408, 435, 431, 440, 1274, 518, 537, 549, 560, + 566, 567, 569, 570, 571, 572, 573, 576, 574, 396, + 303, 483, 325, 363, 1263, 1305, 414, 461, 235, 541, + 484, 1180, 1184, 1178, 1245, 1179, 1234, 1235, 1181, 1296, + 1297, 1298, 585, 586, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, + 0, 1267, 1174, 0, 1182, 1183, 1276, 1285, 1286, 603, + 374, 474, 538, 327, 339, 342, 332, 351, 0, 352, + 328, 329, 334, 336, 337, 338, 343, 344, 348, 354, + 244, 205, 380, 388, 517, 304, 211, 212, 213, 502, + 503, 504, 505, 552, 553, 557, 451, 452, 453, 454, + 285, 547, 301, 457, 456, 323, 324, 369, 438, 507, + 508, 509, 510, 511, 512, 513, 514, 1238, 194, 216, + 358, 1301, 443, 281, 581, 551, 546, 201, 218, 1177, + 255, 1188, 1196, 0, 1202, 1210, 1211, 1223, 1225, 1226, + 1227, 1228, 1246, 1247, 1249, 1257, 1259, 1262, 1264, 1271, + 1282, 1304, 196, 197, 204, 217, 227, 231, 238, 254, + 269, 271, 278, 291, 302, 310, 311, 314, 320, 370, + 376, 377, 378, 379, 398, 399, 400, 403, 406, 407, + 410, 412, 413, 416, 420, 424, 425, 426, 428, 430, + 432, 444, 449, 463, 464, 465, 466, 467, 470, 471, + 476, 477, 478, 479, 480, 488, 489, 494, 525, 527, + 540, 558, 564, 469, 293, 294, 433, 434, 306, 307, + 578, 579, 292, 535, 565, 533, 577, 559, 427, 368, + 1237, 1243, 371, 274, 297, 312, 1252, 550, 490, 222, + 455, 283, 246, 1270, 1272, 206, 241, 225, 252, 267, + 270, 316, 381, 389, 418, 423, 289, 264, 239, 448, + 236, 473, 497, 498, 499, 501, 385, 259, 422, 1233, + 1261, 366, 515, 516, 308, 386, 0, 0, 0, 1290, + 1275, 506, 0, 1218, 1293, 1187, 1206, 1303, 1209, 1212, + 1254, 1166, 1232, 405, 1203, 1159, 1191, 1161, 1198, 1162, + 1189, 1220, 263, 1186, 1277, 1236, 1292, 356, 260, 1168, + 1192, 419, 1208, 200, 1256, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 1299, + 360, 1242, 0, 485, 390, 0, 0, 0, 1222, 1281, + 1230, 1268, 1217, 1255, 1176, 1241, 1294, 1204, 1251, 1295, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 1200, + 1248, 1289, 1201, 1250, 258, 313, 265, 257, 519, 1300, + 1280, 1165, 1229, 1288, 0, 0, 224, 1291, 1224, 0, + 1253, 0, 1306, 1160, 1244, 0, 1163, 1167, 1302, 1284, + 1195, 268, 0, 0, 0, 0, 0, 0, 0, 1221, + 1231, 1265, 1269, 1215, 0, 0, 0, 0, 0, 2860, + 0, 1193, 0, 1240, 0, 0, 0, 1172, 1164, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1219, 0, 0, 0, 0, 1175, 0, 1194, 1266, + 0, 1158, 290, 1169, 391, 250, 0, 442, 1273, 1283, + 1216, 561, 1287, 1214, 1213, 1260, 1173, 1279, 1207, 355, + 1171, 322, 195, 220, 0, 1205, 401, 450, 462, 1278, + 1190, 1199, 248, 1197, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 1239, 1258, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 1170, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 1185, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 1274, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 1263, 1305, 414, 461, 235, + 541, 484, 1180, 1184, 1178, 1245, 1179, 1234, 1235, 1181, + 1296, 1297, 1298, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 1267, 1174, 0, 1182, 1183, 1276, 1285, 1286, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 1238, 194, + 216, 358, 1301, 443, 281, 581, 551, 546, 201, 218, + 1177, 255, 1188, 1196, 0, 1202, 1210, 1211, 1223, 1225, + 1226, 1227, 1228, 1246, 1247, 1249, 1257, 1259, 1262, 1264, + 1271, 1282, 1304, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 1237, 1243, 371, 274, 297, 312, 1252, 550, 490, + 222, 455, 283, 246, 1270, 1272, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 1233, 1261, 366, 515, 516, 308, 386, 0, 0, 0, + 1290, 1275, 506, 0, 1218, 1293, 1187, 1206, 1303, 1209, + 1212, 1254, 1166, 1232, 405, 1203, 1159, 1191, 1161, 1198, + 1162, 1189, 1220, 263, 1186, 1277, 1236, 1292, 356, 260, + 1168, 1192, 419, 1208, 200, 1256, 475, 247, 367, 364, + 522, 275, 266, 262, 245, 309, 375, 417, 496, 411, + 1299, 360, 1242, 0, 485, 390, 0, 0, 0, 1222, + 1281, 1230, 1268, 1217, 1255, 1176, 1241, 1294, 1204, 1251, + 1295, 315, 243, 317, 199, 402, 486, 279, 0, 0, + 0, 0, 0, 651, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 233, 0, 0, 240, 0, 0, 0, + 341, 350, 349, 330, 331, 333, 335, 340, 347, 353, + 1200, 1248, 1289, 1201, 1250, 258, 313, 265, 257, 519, + 1300, 1280, 1165, 1229, 1288, 0, 0, 224, 1291, 1224, + 0, 1253, 0, 1306, 1160, 1244, 0, 1163, 1167, 1302, + 1284, 1195, 268, 0, 0, 0, 0, 0, 0, 0, + 1221, 1231, 1265, 1269, 1215, 0, 0, 0, 0, 0, + 2821, 0, 1193, 0, 1240, 0, 0, 0, 1172, 1164, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1219, 0, 0, 0, 0, 1175, 0, 1194, + 1266, 0, 1158, 290, 1169, 391, 250, 0, 442, 1273, + 1283, 1216, 561, 1287, 1214, 1213, 1260, 1173, 1279, 1207, + 355, 1171, 322, 195, 220, 0, 1205, 401, 450, 462, + 1278, 1190, 1199, 248, 1197, 460, 415, 539, 228, 277, + 447, 421, 458, 429, 280, 1239, 1258, 459, 362, 524, + 439, 536, 562, 563, 256, 395, 548, 500, 556, 580, + 221, 253, 409, 493, 542, 482, 387, 520, 521, 321, + 481, 288, 198, 359, 568, 219, 468, 361, 237, 226, + 526, 545, 282, 445, 575, 208, 495, 534, 234, 472, + 0, 0, 582, 242, 492, 210, 531, 491, 383, 318, + 319, 209, 0, 446, 261, 286, 0, 0, 251, 404, + 528, 529, 249, 583, 223, 555, 215, 1170, 554, 397, + 523, 532, 384, 373, 214, 530, 382, 372, 326, 345, + 346, 273, 299, 436, 365, 437, 298, 300, 393, 392, + 394, 202, 543, 0, 203, 0, 487, 544, 584, 441, + 207, 229, 230, 232, 1185, 272, 276, 284, 287, 295, + 296, 305, 357, 408, 435, 431, 440, 1274, 518, 537, + 549, 560, 566, 567, 569, 570, 571, 572, 573, 576, + 574, 396, 303, 483, 325, 363, 1263, 1305, 414, 461, + 235, 541, 484, 1180, 1184, 1178, 1245, 1179, 1234, 1235, + 1181, 1296, 1297, 1298, 585, 586, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 0, 1267, 1174, 0, 1182, 1183, 1276, 1285, + 1286, 603, 374, 474, 538, 327, 339, 342, 332, 351, + 0, 352, 328, 329, 334, 336, 337, 338, 343, 344, + 348, 354, 244, 205, 380, 388, 517, 304, 211, 212, + 213, 502, 503, 504, 505, 552, 553, 557, 451, 452, + 453, 454, 285, 547, 301, 457, 456, 323, 324, 369, + 438, 507, 508, 509, 510, 511, 512, 513, 514, 1238, + 194, 216, 358, 1301, 443, 281, 581, 551, 546, 201, + 218, 1177, 255, 1188, 1196, 0, 1202, 1210, 1211, 1223, + 1225, 1226, 1227, 1228, 1246, 1247, 1249, 1257, 1259, 1262, + 1264, 1271, 1282, 1304, 196, 197, 204, 217, 227, 231, + 238, 254, 269, 271, 278, 291, 302, 310, 311, 314, + 320, 370, 376, 377, 378, 379, 398, 399, 400, 403, + 406, 407, 410, 412, 413, 416, 420, 424, 425, 426, + 428, 430, 432, 444, 449, 463, 464, 465, 466, 467, + 470, 471, 476, 477, 478, 479, 480, 488, 489, 494, + 525, 527, 540, 558, 564, 469, 293, 294, 433, 434, + 306, 307, 578, 579, 292, 535, 565, 533, 577, 559, + 427, 368, 1237, 1243, 371, 274, 297, 312, 1252, 550, + 490, 222, 455, 283, 246, 1270, 1272, 206, 241, 225, + 252, 267, 270, 316, 381, 389, 418, 423, 289, 264, + 239, 448, 236, 473, 497, 498, 499, 501, 385, 259, + 422, 1233, 1261, 366, 515, 516, 308, 386, 0, 0, + 0, 1290, 1275, 506, 0, 1218, 1293, 1187, 1206, 1303, + 1209, 1212, 1254, 1166, 1232, 405, 1203, 1159, 1191, 1161, + 1198, 1162, 1189, 1220, 263, 1186, 1277, 1236, 1292, 356, + 260, 1168, 1192, 419, 1208, 200, 1256, 475, 247, 367, + 364, 522, 275, 266, 262, 245, 309, 375, 417, 496, + 411, 1299, 360, 1242, 0, 485, 390, 0, 0, 0, + 1222, 1281, 1230, 1268, 1217, 1255, 1176, 1241, 1294, 1204, + 1251, 1295, 315, 243, 317, 199, 402, 486, 279, 0, + 0, 0, 0, 0, 839, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 233, 0, 0, 240, 0, 0, + 0, 341, 350, 349, 330, 331, 333, 335, 340, 347, + 353, 1200, 1248, 1289, 1201, 1250, 258, 313, 265, 257, + 519, 1300, 1280, 1165, 1229, 1288, 0, 0, 224, 1291, + 1224, 0, 1253, 0, 1306, 1160, 1244, 0, 1163, 1167, + 1302, 1284, 1195, 268, 0, 0, 0, 0, 0, 0, + 0, 1221, 1231, 1265, 1269, 1215, 0, 0, 0, 0, + 0, 2135, 0, 1193, 0, 1240, 0, 0, 0, 1172, + 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1219, 0, 0, 0, 0, 1175, 0, + 1194, 1266, 0, 1158, 290, 1169, 391, 250, 0, 442, + 1273, 1283, 1216, 561, 1287, 1214, 1213, 1260, 1173, 1279, + 1207, 355, 1171, 322, 195, 220, 0, 1205, 401, 450, + 462, 1278, 1190, 1199, 248, 1197, 460, 415, 539, 228, + 277, 447, 421, 458, 429, 280, 1239, 1258, 459, 362, + 524, 439, 536, 562, 563, 256, 395, 548, 500, 556, + 580, 221, 253, 409, 493, 542, 482, 387, 520, 521, + 321, 481, 288, 198, 359, 568, 219, 468, 361, 237, + 226, 526, 545, 282, 445, 575, 208, 495, 534, 234, + 472, 0, 0, 582, 242, 492, 210, 531, 491, 383, + 318, 319, 209, 0, 446, 261, 286, 0, 0, 251, + 404, 528, 529, 249, 583, 223, 555, 215, 1170, 554, + 397, 523, 532, 384, 373, 214, 530, 382, 372, 326, + 345, 346, 273, 299, 436, 365, 437, 298, 300, 393, + 392, 394, 202, 543, 0, 203, 0, 487, 544, 584, + 441, 207, 229, 230, 232, 1185, 272, 276, 284, 287, + 295, 296, 305, 357, 408, 435, 431, 440, 1274, 518, + 537, 549, 560, 566, 567, 569, 570, 571, 572, 573, + 576, 574, 396, 303, 483, 325, 363, 1263, 1305, 414, + 461, 235, 541, 484, 1180, 1184, 1178, 1245, 1179, 1234, + 1235, 1181, 1296, 1297, 1298, 585, 586, 587, 588, 589, + 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, + 600, 601, 602, 0, 1267, 1174, 0, 1182, 1183, 1276, + 1285, 1286, 603, 374, 474, 538, 327, 339, 342, 332, + 351, 0, 352, 328, 329, 334, 336, 337, 338, 343, + 344, 348, 354, 244, 205, 380, 388, 517, 304, 211, + 212, 213, 502, 503, 504, 505, 552, 553, 557, 451, + 452, 453, 454, 285, 547, 301, 457, 456, 323, 324, + 369, 438, 507, 508, 509, 510, 511, 512, 513, 514, + 1238, 194, 216, 358, 1301, 443, 281, 581, 551, 546, + 201, 218, 1177, 255, 1188, 1196, 0, 1202, 1210, 1211, + 1223, 1225, 1226, 1227, 1228, 1246, 1247, 1249, 1257, 1259, + 1262, 1264, 1271, 1282, 1304, 196, 197, 204, 217, 227, + 231, 238, 254, 269, 271, 278, 291, 302, 310, 311, + 314, 320, 370, 376, 377, 378, 379, 398, 399, 400, + 403, 406, 407, 410, 412, 413, 416, 420, 424, 425, + 426, 428, 430, 432, 444, 449, 463, 464, 465, 466, + 467, 470, 471, 476, 477, 478, 479, 480, 488, 489, + 494, 525, 527, 540, 558, 564, 469, 293, 294, 433, + 434, 306, 307, 578, 579, 292, 535, 565, 533, 577, + 559, 427, 368, 1237, 1243, 371, 274, 297, 312, 1252, + 550, 490, 222, 455, 283, 246, 1270, 1272, 206, 241, + 225, 252, 267, 270, 316, 381, 389, 418, 423, 289, + 264, 239, 448, 236, 473, 497, 498, 499, 501, 385, + 259, 422, 1233, 1261, 366, 515, 516, 308, 386, 0, + 0, 0, 1290, 1275, 506, 0, 1218, 1293, 1187, 1206, + 1303, 1209, 1212, 1254, 1166, 1232, 405, 1203, 1159, 1191, + 1161, 1198, 1162, 1189, 1220, 263, 1186, 1277, 1236, 1292, + 356, 260, 1168, 1192, 419, 1208, 200, 1256, 475, 247, + 367, 364, 522, 275, 266, 262, 245, 309, 375, 417, + 496, 411, 1299, 360, 1242, 0, 485, 390, 0, 0, + 0, 1222, 1281, 1230, 1268, 1217, 1255, 1176, 1241, 1294, + 1204, 1251, 1295, 315, 243, 317, 199, 402, 486, 279, + 0, 93, 0, 0, 0, 651, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 233, 0, 0, 240, 0, + 0, 0, 341, 350, 349, 330, 331, 333, 335, 340, + 347, 353, 1200, 1248, 1289, 1201, 1250, 258, 313, 265, + 257, 519, 1300, 1280, 1165, 1229, 1288, 0, 0, 224, + 1291, 1224, 0, 1253, 0, 1306, 1160, 1244, 0, 1163, + 1167, 1302, 1284, 1195, 268, 0, 0, 0, 0, 0, + 0, 0, 1221, 1231, 1265, 1269, 1215, 0, 0, 0, + 0, 0, 0, 0, 1193, 0, 1240, 0, 0, 0, + 1172, 1164, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1219, 0, 0, 0, 0, 1175, + 0, 1194, 1266, 0, 1158, 290, 1169, 391, 250, 0, + 442, 1273, 1283, 1216, 561, 1287, 1214, 1213, 1260, 1173, + 1279, 1207, 355, 1171, 322, 195, 220, 0, 1205, 401, + 450, 462, 1278, 1190, 1199, 248, 1197, 460, 415, 539, + 228, 277, 447, 421, 458, 429, 280, 1239, 1258, 459, + 362, 524, 439, 536, 562, 563, 256, 395, 548, 500, + 556, 580, 221, 253, 409, 493, 542, 482, 387, 520, + 521, 321, 481, 288, 198, 359, 568, 219, 468, 361, + 237, 226, 526, 545, 282, 445, 575, 208, 495, 534, + 234, 472, 0, 0, 582, 242, 492, 210, 531, 491, + 383, 318, 319, 209, 0, 446, 261, 286, 0, 0, + 251, 404, 528, 529, 249, 583, 223, 555, 215, 1170, + 554, 397, 523, 532, 384, 373, 214, 530, 382, 372, + 326, 345, 346, 273, 299, 436, 365, 437, 298, 300, + 393, 392, 394, 202, 543, 0, 203, 0, 487, 544, + 584, 441, 207, 229, 230, 232, 1185, 272, 276, 284, + 287, 295, 296, 305, 357, 408, 435, 431, 440, 1274, + 518, 537, 549, 560, 566, 567, 569, 570, 571, 572, + 573, 576, 574, 396, 303, 483, 325, 363, 1263, 1305, + 414, 461, 235, 541, 484, 1180, 1184, 1178, 1245, 1179, + 1234, 1235, 1181, 1296, 1297, 1298, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, + 599, 600, 601, 602, 0, 1267, 1174, 0, 1182, 1183, + 1276, 1285, 1286, 603, 374, 474, 538, 327, 339, 342, + 332, 351, 0, 352, 328, 329, 334, 336, 337, 338, + 343, 344, 348, 354, 244, 205, 380, 388, 517, 304, + 211, 212, 213, 502, 503, 504, 505, 552, 553, 557, + 451, 452, 453, 454, 285, 547, 301, 457, 456, 323, + 324, 369, 438, 507, 508, 509, 510, 511, 512, 513, + 514, 1238, 194, 216, 358, 1301, 443, 281, 581, 551, + 546, 201, 218, 1177, 255, 1188, 1196, 0, 1202, 1210, + 1211, 1223, 1225, 1226, 1227, 1228, 1246, 1247, 1249, 1257, + 1259, 1262, 1264, 1271, 1282, 1304, 196, 197, 204, 217, + 227, 231, 238, 254, 269, 271, 278, 291, 302, 310, + 311, 314, 320, 370, 376, 377, 378, 379, 398, 399, + 400, 403, 406, 407, 410, 412, 413, 416, 420, 424, + 425, 426, 428, 430, 432, 444, 449, 463, 464, 465, + 466, 467, 470, 471, 476, 477, 478, 479, 480, 488, + 489, 494, 525, 527, 540, 558, 564, 469, 293, 294, + 433, 434, 306, 307, 578, 579, 292, 535, 565, 533, + 577, 559, 427, 368, 1237, 1243, 371, 274, 297, 312, + 1252, 550, 490, 222, 455, 283, 246, 1270, 1272, 206, + 241, 225, 252, 267, 270, 316, 381, 389, 418, 423, + 289, 264, 239, 448, 236, 473, 497, 498, 499, 501, + 385, 259, 422, 1233, 1261, 366, 515, 516, 308, 386, + 0, 0, 0, 1290, 1275, 506, 0, 1218, 1293, 1187, + 1206, 1303, 1209, 1212, 1254, 1166, 1232, 405, 1203, 1159, + 1191, 1161, 1198, 1162, 1189, 1220, 263, 1186, 1277, 1236, + 1292, 356, 260, 1168, 1192, 419, 1208, 200, 1256, 475, + 247, 367, 364, 522, 275, 266, 262, 245, 309, 375, + 417, 496, 411, 1299, 360, 1242, 0, 485, 390, 0, + 0, 0, 1222, 1281, 1230, 1268, 1217, 1255, 1176, 1241, + 1294, 1204, 1251, 1295, 315, 243, 317, 199, 402, 486, + 279, 0, 0, 0, 0, 0, 192, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 233, 0, 0, 240, + 0, 0, 0, 341, 350, 349, 330, 331, 333, 335, + 340, 347, 353, 1200, 1248, 1289, 1201, 1250, 258, 313, + 265, 257, 519, 1300, 1280, 1165, 1229, 1288, 0, 0, + 224, 1291, 1224, 0, 1253, 0, 1306, 1160, 1244, 0, + 1163, 1167, 1302, 1284, 1195, 268, 0, 0, 0, 0, + 0, 0, 0, 1221, 1231, 1265, 1269, 1215, 0, 0, + 0, 0, 0, 0, 0, 1193, 0, 1240, 0, 0, + 0, 1172, 1164, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1219, 0, 0, 0, 0, + 1175, 0, 1194, 1266, 0, 1158, 290, 1169, 391, 250, + 0, 442, 1273, 1283, 1216, 561, 1287, 1214, 1213, 1260, + 1173, 1279, 1207, 355, 1171, 322, 195, 220, 0, 1205, + 401, 450, 462, 1278, 1190, 1199, 248, 1197, 460, 415, + 539, 228, 277, 447, 421, 458, 429, 280, 1239, 1258, + 459, 362, 524, 439, 536, 562, 563, 256, 395, 548, + 500, 556, 580, 221, 253, 409, 493, 542, 482, 387, + 520, 521, 321, 481, 288, 198, 359, 568, 219, 468, + 361, 237, 226, 526, 545, 282, 445, 575, 208, 495, + 534, 234, 472, 0, 0, 582, 242, 492, 210, 531, + 491, 383, 318, 319, 209, 0, 446, 261, 286, 0, + 0, 251, 404, 528, 529, 249, 583, 223, 555, 215, + 1170, 554, 397, 523, 532, 384, 373, 214, 530, 382, + 372, 326, 345, 346, 273, 299, 436, 365, 437, 298, + 300, 393, 392, 394, 202, 543, 0, 203, 0, 487, + 544, 584, 441, 207, 229, 230, 232, 1185, 272, 276, + 284, 287, 295, 296, 305, 357, 408, 435, 431, 440, + 1274, 518, 537, 549, 560, 566, 567, 569, 570, 571, + 572, 573, 576, 574, 396, 303, 483, 325, 363, 1263, + 1305, 414, 461, 235, 541, 484, 1180, 1184, 1178, 1245, + 1179, 1234, 1235, 1181, 1296, 1297, 1298, 585, 586, 587, + 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, + 598, 599, 600, 601, 602, 0, 1267, 1174, 0, 1182, + 1183, 1276, 1285, 1286, 603, 374, 474, 538, 327, 339, + 342, 332, 351, 0, 352, 328, 329, 334, 336, 337, + 338, 343, 344, 348, 354, 244, 205, 380, 388, 517, + 304, 211, 212, 213, 502, 503, 504, 505, 552, 553, + 557, 451, 452, 453, 454, 285, 547, 301, 457, 456, + 323, 324, 369, 438, 507, 508, 509, 510, 511, 512, + 513, 514, 1238, 194, 216, 358, 1301, 443, 281, 581, + 551, 546, 201, 218, 1177, 255, 1188, 1196, 0, 1202, + 1210, 1211, 1223, 1225, 1226, 1227, 1228, 1246, 1247, 1249, + 1257, 1259, 1262, 1264, 1271, 1282, 1304, 196, 197, 204, + 217, 227, 231, 238, 254, 269, 271, 278, 291, 302, + 310, 311, 314, 320, 370, 376, 377, 378, 379, 398, + 399, 400, 403, 406, 407, 410, 412, 413, 416, 420, + 424, 425, 426, 428, 430, 432, 444, 449, 463, 464, + 465, 466, 467, 470, 471, 476, 477, 478, 479, 480, + 488, 489, 494, 525, 527, 540, 558, 564, 469, 293, + 294, 433, 434, 306, 307, 578, 579, 292, 535, 565, + 533, 577, 559, 427, 368, 1237, 1243, 371, 274, 297, + 312, 1252, 550, 490, 222, 455, 283, 246, 1270, 1272, + 206, 241, 225, 252, 267, 270, 316, 381, 389, 418, + 423, 289, 264, 239, 448, 236, 473, 497, 498, 499, + 501, 385, 259, 422, 1233, 1261, 366, 515, 516, 308, + 386, 0, 0, 0, 1290, 1275, 506, 0, 1218, 1293, + 1187, 1206, 1303, 1209, 1212, 1254, 1166, 1232, 405, 1203, + 1159, 1191, 1161, 1198, 1162, 1189, 1220, 263, 1186, 1277, + 1236, 1292, 356, 260, 1168, 1192, 419, 1208, 200, 1256, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 1299, 360, 1242, 0, 485, 390, + 0, 0, 0, 1222, 1281, 1230, 1268, 1217, 1255, 1176, + 1241, 1294, 1204, 1251, 1295, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 1200, 1248, 1289, 1201, 1250, 258, + 313, 265, 257, 519, 1300, 1280, 1165, 1229, 1288, 0, + 0, 224, 1291, 1224, 0, 1253, 0, 1306, 1160, 1244, + 0, 1163, 1167, 1302, 1284, 1195, 268, 0, 0, 0, + 0, 0, 0, 0, 1221, 1231, 1265, 1269, 1215, 0, + 0, 0, 0, 0, 0, 0, 1193, 0, 1240, 0, + 0, 0, 1172, 1164, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1219, 0, 0, 0, + 0, 1175, 0, 1194, 1266, 0, 1158, 290, 1169, 391, + 250, 0, 442, 1273, 1283, 1216, 561, 1287, 1214, 1213, + 1260, 1173, 1279, 1207, 355, 1171, 322, 195, 220, 0, + 1205, 401, 450, 462, 1278, 1190, 1199, 248, 1197, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 1239, + 1258, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 1170, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 1185, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 1274, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 1263, 1305, 414, 461, 235, 541, 484, 1180, 1184, 1178, + 1245, 1179, 1234, 1235, 1181, 1296, 1297, 1298, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 1267, 1174, 0, + 1182, 1183, 1276, 1285, 1286, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 1238, 194, 216, 358, 1301, 443, 281, + 581, 551, 546, 201, 218, 1177, 255, 1188, 1196, 0, + 1202, 1210, 1211, 1223, 1225, 1226, 1227, 1228, 1246, 1247, + 1249, 1257, 1259, 1262, 1264, 1271, 1282, 1304, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 1237, 1243, 371, 274, + 297, 312, 1252, 550, 490, 222, 455, 283, 246, 1270, + 1272, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 1233, 1261, 366, 515, 516, + 308, 386, 0, 0, 0, 1290, 1275, 506, 0, 1218, + 1293, 1187, 1206, 1303, 1209, 1212, 1254, 1166, 1232, 405, + 1203, 1159, 1191, 1161, 1198, 1162, 1189, 1220, 263, 1186, + 1277, 1236, 1292, 356, 260, 1168, 1192, 419, 1208, 200, + 1256, 475, 247, 367, 364, 522, 275, 266, 262, 245, + 309, 375, 417, 496, 411, 1299, 360, 1242, 0, 485, + 390, 0, 0, 0, 1222, 1281, 1230, 1268, 1217, 1255, + 1176, 1241, 1294, 1204, 1251, 1295, 315, 243, 317, 199, + 402, 486, 279, 0, 0, 0, 0, 0, 839, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 233, 0, + 0, 240, 0, 0, 0, 341, 350, 349, 330, 331, + 333, 335, 340, 347, 353, 1200, 1248, 1289, 1201, 1250, + 258, 313, 265, 257, 519, 1300, 1280, 1165, 1229, 1288, + 0, 0, 224, 1291, 1224, 0, 1253, 0, 1306, 1160, + 1244, 0, 1163, 1167, 1302, 1284, 1195, 268, 0, 0, + 0, 0, 0, 0, 0, 1221, 1231, 1265, 1269, 1215, + 0, 0, 0, 0, 0, 0, 0, 1193, 0, 1240, + 0, 0, 0, 1172, 1164, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1219, 0, 0, + 0, 0, 1175, 0, 1194, 1266, 0, 1158, 290, 1169, + 391, 250, 0, 442, 1273, 1283, 1216, 561, 1287, 1214, + 1213, 1260, 1173, 1279, 1207, 355, 1171, 322, 195, 220, + 0, 1205, 401, 450, 462, 1278, 1190, 1199, 248, 1197, + 460, 415, 539, 228, 277, 447, 421, 458, 429, 280, + 1239, 1258, 459, 362, 524, 439, 536, 562, 563, 256, + 395, 548, 500, 556, 580, 221, 253, 409, 493, 542, + 482, 387, 520, 521, 321, 481, 288, 198, 359, 568, + 219, 468, 361, 237, 226, 526, 545, 282, 445, 575, + 208, 495, 534, 234, 472, 0, 0, 582, 242, 492, + 210, 531, 491, 383, 318, 319, 209, 0, 446, 261, + 286, 0, 0, 251, 404, 528, 529, 249, 583, 223, + 555, 215, 1170, 554, 397, 523, 532, 384, 373, 214, + 530, 382, 372, 326, 345, 346, 273, 299, 436, 365, + 437, 298, 300, 393, 392, 394, 202, 543, 0, 203, + 0, 487, 544, 584, 441, 207, 229, 230, 232, 1185, + 272, 276, 284, 287, 295, 296, 305, 357, 408, 435, + 431, 440, 1274, 518, 537, 549, 560, 566, 567, 569, + 570, 571, 572, 573, 576, 574, 396, 303, 483, 325, + 363, 1263, 1305, 414, 461, 235, 541, 484, 1180, 1184, + 1178, 1245, 1179, 1234, 1235, 1181, 1296, 1297, 1298, 585, + 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + 596, 597, 598, 599, 600, 601, 602, 0, 1267, 1174, + 0, 1182, 1183, 1276, 1285, 1286, 603, 374, 474, 538, + 327, 339, 342, 332, 351, 0, 352, 328, 329, 334, + 336, 337, 338, 343, 344, 348, 354, 244, 205, 380, + 388, 517, 304, 211, 212, 213, 502, 503, 504, 505, + 552, 553, 557, 451, 452, 453, 454, 285, 547, 301, + 457, 456, 323, 324, 369, 438, 507, 508, 509, 510, + 511, 512, 513, 514, 1238, 194, 216, 358, 1301, 443, + 281, 581, 551, 546, 201, 218, 1177, 255, 1188, 1196, + 0, 1202, 1210, 1211, 1223, 1225, 1226, 1227, 1228, 1246, + 1247, 1249, 1257, 1259, 1262, 1264, 1271, 1282, 1304, 196, + 197, 204, 217, 227, 231, 238, 254, 269, 271, 278, + 291, 302, 310, 311, 314, 320, 370, 376, 377, 378, + 379, 398, 399, 400, 403, 406, 407, 410, 412, 413, + 416, 420, 424, 425, 426, 428, 430, 432, 444, 449, + 463, 464, 465, 466, 467, 470, 471, 476, 477, 478, + 479, 480, 488, 489, 494, 525, 527, 540, 558, 564, + 469, 293, 294, 433, 434, 306, 307, 578, 579, 292, + 535, 565, 533, 577, 559, 427, 368, 1237, 1243, 371, + 274, 297, 312, 1252, 550, 490, 222, 455, 283, 246, + 1270, 1272, 206, 241, 225, 252, 267, 270, 316, 381, + 389, 418, 423, 289, 264, 239, 448, 236, 473, 497, + 498, 499, 501, 385, 259, 422, 1233, 1261, 366, 515, + 516, 308, 386, 0, 0, 0, 0, 0, 506, 0, + 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 405, 0, 0, 0, 0, 691, 0, 0, 0, 263, + 696, 0, 0, 0, 356, 260, 0, 0, 419, 0, + 200, 0, 475, 247, 367, 364, 522, 275, 266, 262, + 245, 309, 375, 417, 496, 411, 703, 360, 0, 0, + 485, 390, 0, 0, 0, 0, 0, 699, 700, 0, + 0, 0, 0, 0, 0, 0, 0, 315, 243, 317, + 199, 402, 486, 279, 0, 93, 0, 0, 855, 839, + 805, 806, 843, 856, 857, 858, 859, 844, 0, 233, + 845, 846, 240, 847, 0, 804, 731, 733, 732, 758, + 759, 760, 761, 762, 763, 764, 729, 852, 860, 861, + 0, 258, 313, 265, 257, 519, 0, 0, 2000, 2001, + 2002, 0, 0, 224, 0, 0, 0, 0, 0, 0, + 0, 673, 688, 0, 702, 0, 0, 0, 268, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 685, 686, 0, 0, 0, 0, + 799, 0, 687, 0, 0, 695, 862, 863, 864, 865, + 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, + 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, + 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, + 896, 897, 898, 899, 900, 901, 902, 903, 698, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 290, + 0, 391, 250, 0, 442, 798, 0, 0, 561, 0, + 0, 796, 0, 0, 0, 0, 355, 0, 322, 195, + 220, 0, 0, 401, 450, 462, 0, 0, 0, 849, + 0, 460, 415, 539, 228, 277, 447, 421, 458, 429, + 280, 0, 0, 459, 362, 524, 439, 536, 562, 563, + 256, 395, 548, 500, 556, 580, 221, 253, 409, 493, + 542, 482, 387, 520, 521, 321, 481, 288, 198, 359, + 568, 219, 468, 361, 237, 226, 526, 545, 282, 445, + 575, 208, 495, 534, 234, 472, 0, 0, 582, 242, + 492, 210, 531, 491, 383, 318, 319, 209, 0, 446, + 261, 286, 0, 0, 251, 404, 850, 851, 249, 583, + 737, 555, 215, 0, 554, 397, 523, 532, 384, 373, + 214, 530, 382, 372, 326, 745, 746, 273, 299, 784, + 783, 782, 298, 300, 780, 781, 779, 202, 543, 0, + 203, 0, 487, 544, 584, 441, 207, 229, 230, 232, + 0, 272, 276, 284, 287, 295, 296, 305, 357, 408, + 435, 431, 440, 0, 518, 537, 549, 560, 566, 567, + 569, 570, 571, 572, 573, 576, 574, 396, 303, 483, + 325, 363, 0, 0, 414, 461, 235, 541, 484, 809, + 797, 708, 813, 710, 810, 811, 705, 706, 709, 812, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 0, 800, + 694, 693, 0, 701, 0, 727, 728, 730, 734, 735, + 736, 747, 756, 757, 765, 767, 768, 766, 769, 770, + 771, 774, 775, 776, 777, 772, 773, 778, 711, 715, + 712, 713, 714, 726, 716, 717, 718, 719, 720, 721, + 722, 723, 724, 725, 823, 824, 825, 826, 827, 828, + 740, 744, 743, 741, 742, 738, 739, 749, 748, 750, + 751, 752, 753, 754, 755, 692, 194, 216, 358, 0, + 443, 281, 581, 551, 546, 201, 218, 814, 255, 815, + 0, 0, 819, 0, 0, 0, 821, 820, 0, 822, + 788, 787, 0, 0, 816, 817, 0, 818, 0, 0, + 196, 197, 204, 217, 227, 231, 238, 254, 269, 271, + 278, 291, 302, 310, 311, 314, 320, 370, 376, 377, + 378, 379, 398, 399, 400, 403, 406, 407, 410, 412, + 413, 416, 420, 424, 425, 426, 428, 430, 432, 444, + 449, 463, 464, 465, 466, 467, 470, 471, 476, 477, + 478, 479, 480, 488, 489, 494, 525, 527, 540, 558, + 564, 469, 829, 830, 831, 832, 833, 834, 835, 836, + 292, 535, 565, 533, 577, 559, 427, 368, 0, 0, + 371, 274, 297, 312, 0, 550, 490, 222, 455, 283, + 246, 854, 0, 206, 241, 225, 252, 267, 270, 316, + 381, 389, 418, 423, 289, 264, 239, 448, 236, 473, + 497, 498, 499, 501, 385, 259, 422, 386, 0, 366, + 515, 516, 308, 506, 0, 704, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 405, 0, 0, 0, 0, + 691, 0, 0, 0, 263, 696, 0, 0, 0, 356, + 260, 0, 0, 419, 0, 200, 0, 475, 247, 367, + 364, 522, 275, 266, 262, 245, 309, 375, 417, 496, + 411, 703, 360, 0, 0, 485, 390, 0, 0, 0, + 0, 0, 699, 700, 0, 0, 0, 0, 0, 0, + 2164, 0, 315, 243, 317, 199, 402, 486, 279, 0, + 93, 0, 0, 855, 839, 805, 806, 843, 856, 857, + 858, 859, 844, 0, 233, 845, 846, 240, 847, 0, + 804, 731, 733, 732, 758, 759, 760, 761, 762, 763, + 764, 729, 852, 860, 861, 2165, 258, 313, 265, 257, + 519, 0, 0, 0, 0, 0, 0, 0, 224, 0, + 0, 0, 0, 0, 0, 0, 673, 688, 0, 702, + 0, 0, 0, 268, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 685, + 686, 0, 0, 0, 0, 799, 0, 687, 0, 0, + 695, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, + 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, + 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, + 901, 902, 903, 698, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 290, 0, 391, 250, 0, 442, + 798, 0, 0, 561, 0, 0, 796, 0, 0, 0, + 0, 355, 0, 322, 195, 220, 0, 0, 401, 450, + 462, 0, 0, 0, 849, 0, 460, 415, 539, 228, + 277, 447, 421, 458, 429, 280, 0, 0, 459, 362, + 524, 439, 536, 562, 563, 256, 395, 548, 500, 556, + 580, 221, 253, 409, 493, 542, 482, 387, 520, 521, + 321, 481, 288, 198, 359, 568, 219, 468, 361, 237, + 226, 526, 545, 282, 445, 575, 208, 495, 534, 234, + 472, 0, 0, 582, 242, 492, 210, 531, 491, 383, + 318, 319, 209, 0, 446, 261, 286, 0, 0, 251, + 404, 850, 851, 249, 583, 737, 555, 215, 0, 554, + 397, 523, 532, 384, 373, 214, 530, 382, 372, 326, + 745, 746, 273, 299, 784, 783, 782, 298, 300, 780, + 781, 779, 202, 543, 0, 203, 0, 487, 544, 584, + 441, 207, 229, 230, 232, 0, 272, 276, 284, 287, + 295, 296, 305, 357, 408, 435, 431, 440, 0, 518, + 537, 549, 560, 566, 567, 569, 570, 571, 572, 573, + 576, 574, 396, 303, 483, 325, 363, 0, 0, 414, + 461, 235, 541, 484, 809, 797, 708, 813, 710, 810, + 811, 705, 706, 709, 812, 585, 586, 587, 588, 589, + 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, + 600, 601, 602, 0, 800, 694, 693, 0, 701, 0, + 727, 728, 730, 734, 735, 736, 747, 756, 757, 765, + 767, 768, 766, 769, 770, 771, 774, 775, 776, 777, + 772, 773, 778, 711, 715, 712, 713, 714, 726, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 823, + 824, 825, 826, 827, 828, 740, 744, 743, 741, 742, + 738, 739, 749, 748, 750, 751, 752, 753, 754, 755, + 692, 194, 216, 358, 0, 443, 281, 581, 551, 546, + 201, 218, 814, 255, 815, 0, 0, 819, 0, 0, + 0, 821, 820, 0, 822, 788, 787, 0, 0, 816, + 817, 0, 818, 0, 0, 196, 197, 204, 217, 227, + 231, 238, 254, 269, 271, 278, 291, 302, 310, 311, + 314, 320, 370, 376, 377, 378, 379, 398, 399, 400, + 403, 406, 407, 410, 412, 413, 416, 420, 424, 425, + 426, 428, 430, 432, 444, 449, 463, 464, 465, 466, + 467, 470, 471, 476, 477, 478, 479, 480, 488, 489, + 494, 525, 527, 540, 558, 564, 469, 829, 830, 831, + 832, 833, 834, 835, 836, 292, 535, 565, 533, 577, + 559, 427, 368, 0, 0, 371, 274, 297, 312, 0, + 550, 490, 222, 455, 283, 246, 854, 0, 206, 241, + 225, 252, 267, 270, 316, 381, 389, 418, 423, 289, + 264, 239, 448, 236, 473, 497, 498, 499, 501, 385, + 259, 422, 0, 386, 366, 515, 516, 308, 84, 506, + 0, 704, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 405, 0, 0, 0, 0, 691, 0, 0, 0, + 263, 696, 0, 0, 0, 356, 260, 0, 0, 419, + 0, 200, 0, 475, 247, 367, 364, 522, 275, 266, + 262, 245, 309, 375, 417, 496, 411, 703, 360, 0, + 0, 485, 390, 0, 0, 0, 0, 0, 699, 700, + 0, 0, 0, 0, 0, 0, 0, 0, 315, 243, + 317, 199, 402, 486, 279, 0, 93, 0, 0, 855, + 839, 805, 806, 843, 856, 857, 858, 859, 844, 0, + 233, 845, 846, 240, 847, 0, 804, 731, 733, 732, + 758, 759, 760, 761, 762, 763, 764, 729, 852, 860, + 861, 0, 258, 313, 265, 257, 519, 0, 0, 0, + 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, + 0, 0, 673, 688, 0, 702, 0, 0, 0, 268, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 685, 686, 0, 0, 0, + 0, 799, 0, 687, 0, 0, 695, 862, 863, 864, + 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, + 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, + 895, 896, 897, 898, 899, 900, 901, 902, 903, 698, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 290, 0, 391, 250, 0, 442, 798, 0, 0, 561, + 0, 0, 796, 0, 0, 0, 0, 355, 0, 322, + 195, 220, 0, 0, 401, 450, 462, 0, 0, 0, + 849, 0, 460, 415, 539, 228, 277, 447, 421, 458, + 429, 280, 0, 0, 459, 362, 524, 439, 536, 562, + 563, 256, 395, 548, 500, 556, 580, 221, 253, 409, + 493, 542, 482, 387, 520, 521, 321, 481, 288, 198, + 359, 568, 219, 468, 361, 237, 226, 526, 545, 282, + 445, 575, 208, 495, 534, 234, 472, 0, 0, 582, + 242, 492, 210, 531, 491, 383, 318, 319, 209, 0, + 446, 261, 286, 0, 0, 251, 404, 850, 851, 249, + 583, 737, 555, 215, 0, 554, 397, 523, 532, 384, + 373, 214, 530, 382, 372, 326, 745, 746, 273, 299, + 784, 783, 782, 298, 300, 780, 781, 779, 202, 543, + 0, 203, 0, 487, 544, 584, 441, 207, 229, 230, + 232, 0, 272, 276, 284, 287, 295, 296, 305, 357, + 408, 435, 431, 440, 0, 518, 537, 549, 560, 566, + 567, 569, 570, 571, 572, 573, 576, 574, 396, 303, + 483, 325, 363, 0, 0, 414, 461, 235, 541, 484, + 809, 797, 708, 813, 710, 810, 811, 705, 706, 709, + 812, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 0, + 800, 694, 693, 0, 701, 0, 727, 728, 730, 734, + 735, 736, 747, 756, 757, 765, 767, 768, 766, 769, + 770, 771, 774, 775, 776, 777, 772, 773, 778, 711, + 715, 712, 713, 714, 726, 716, 717, 718, 719, 720, + 721, 722, 723, 724, 725, 823, 824, 825, 826, 827, + 828, 740, 744, 743, 741, 742, 738, 739, 749, 748, + 750, 751, 752, 753, 754, 755, 692, 194, 216, 358, + 92, 443, 281, 581, 551, 546, 201, 218, 814, 255, + 815, 0, 0, 819, 0, 0, 0, 821, 820, 0, + 822, 788, 787, 0, 0, 816, 817, 0, 818, 0, + 0, 196, 197, 204, 217, 227, 231, 238, 254, 269, + 271, 278, 291, 302, 310, 311, 314, 320, 370, 376, + 377, 378, 379, 398, 399, 400, 403, 406, 407, 410, + 412, 413, 416, 420, 424, 425, 426, 428, 430, 432, + 444, 449, 463, 464, 465, 466, 467, 470, 471, 476, + 477, 478, 479, 480, 488, 489, 494, 525, 527, 540, + 558, 564, 469, 829, 830, 831, 832, 833, 834, 835, + 836, 292, 535, 565, 533, 577, 559, 427, 368, 0, + 0, 371, 274, 297, 312, 0, 550, 490, 222, 455, + 283, 246, 854, 0, 206, 241, 225, 252, 267, 270, + 316, 381, 389, 418, 423, 289, 264, 239, 448, 236, + 473, 497, 498, 499, 501, 385, 259, 422, 386, 0, + 366, 515, 516, 308, 506, 0, 704, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, + 0, 691, 0, 0, 0, 263, 696, 0, 0, 0, + 356, 260, 0, 0, 419, 0, 200, 0, 475, 247, + 367, 364, 522, 275, 266, 262, 245, 309, 375, 417, + 496, 411, 703, 360, 0, 0, 485, 390, 0, 0, + 0, 0, 0, 699, 700, 0, 0, 0, 0, 0, + 0, 0, 0, 315, 243, 317, 199, 402, 486, 279, + 0, 93, 0, 0, 855, 839, 805, 806, 843, 856, + 857, 858, 859, 844, 0, 233, 845, 846, 240, 847, + 0, 804, 731, 733, 732, 758, 759, 760, 761, 762, + 763, 764, 729, 852, 860, 861, 0, 258, 313, 265, + 257, 519, 0, 0, 0, 0, 0, 0, 0, 224, + 0, 0, 0, 0, 0, 0, 0, 673, 688, 0, + 702, 0, 0, 0, 268, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 685, 686, 0, 0, 0, 0, 799, 0, 687, 0, + 0, 695, 862, 863, 864, 865, 866, 867, 868, 869, + 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, + 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, + 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, + 900, 901, 902, 903, 698, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 290, 0, 391, 250, 0, + 442, 798, 0, 0, 561, 0, 0, 796, 0, 0, + 0, 0, 355, 0, 322, 195, 220, 0, 0, 401, + 450, 462, 0, 0, 0, 849, 0, 460, 415, 539, + 228, 277, 447, 421, 458, 429, 280, 3559, 0, 459, + 362, 524, 439, 536, 562, 563, 256, 395, 548, 500, + 556, 580, 221, 253, 409, 493, 542, 482, 387, 520, + 521, 321, 481, 288, 198, 359, 568, 219, 468, 361, + 237, 226, 526, 545, 282, 445, 575, 208, 495, 534, + 234, 472, 0, 0, 582, 242, 492, 210, 531, 491, + 383, 318, 319, 209, 0, 446, 261, 286, 0, 0, + 251, 404, 850, 851, 249, 583, 737, 555, 215, 0, + 554, 397, 523, 532, 384, 373, 214, 530, 382, 372, + 326, 745, 746, 273, 299, 784, 783, 782, 298, 300, + 780, 781, 779, 202, 543, 0, 203, 0, 487, 544, + 584, 441, 207, 229, 230, 232, 0, 272, 276, 284, + 287, 295, 296, 305, 357, 408, 435, 431, 440, 0, + 518, 537, 549, 560, 566, 567, 569, 570, 571, 572, + 573, 576, 574, 396, 303, 483, 325, 363, 0, 0, + 414, 461, 235, 541, 484, 809, 797, 708, 813, 710, + 810, 811, 705, 706, 709, 812, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, + 599, 600, 601, 602, 0, 800, 694, 693, 0, 701, + 0, 727, 728, 730, 734, 735, 736, 747, 756, 757, + 765, 767, 768, 766, 769, 770, 771, 774, 775, 776, + 777, 772, 773, 778, 711, 715, 712, 713, 714, 726, + 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 823, 824, 825, 826, 827, 828, 740, 744, 743, 741, + 742, 738, 739, 749, 748, 750, 751, 752, 753, 754, + 755, 692, 194, 216, 358, 0, 443, 281, 581, 551, + 546, 201, 218, 814, 255, 815, 0, 0, 819, 0, + 0, 0, 821, 820, 0, 822, 788, 787, 0, 0, + 816, 817, 0, 818, 0, 0, 196, 197, 204, 217, + 227, 231, 238, 254, 269, 271, 278, 291, 302, 310, + 311, 314, 320, 370, 376, 377, 378, 379, 398, 399, + 400, 403, 406, 407, 410, 412, 413, 416, 420, 424, + 425, 426, 428, 430, 432, 444, 449, 463, 464, 465, + 466, 467, 470, 471, 476, 477, 478, 479, 480, 488, + 489, 494, 525, 527, 540, 558, 564, 469, 829, 830, + 831, 832, 833, 834, 835, 836, 292, 535, 565, 533, + 577, 559, 427, 368, 0, 0, 371, 274, 297, 312, + 0, 550, 490, 222, 455, 283, 246, 854, 0, 206, + 241, 225, 252, 267, 270, 316, 381, 389, 418, 423, + 289, 264, 239, 448, 236, 473, 497, 498, 499, 501, + 385, 259, 422, 386, 0, 366, 515, 516, 308, 506, + 0, 704, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 405, 0, 0, 0, 0, 691, 0, 0, 0, + 263, 696, 0, 0, 0, 356, 260, 0, 0, 419, + 0, 200, 0, 475, 247, 367, 364, 522, 275, 266, + 262, 245, 309, 375, 417, 496, 411, 703, 360, 0, + 0, 485, 390, 0, 0, 0, 0, 0, 699, 700, + 0, 0, 0, 0, 0, 0, 0, 0, 315, 243, + 317, 199, 402, 486, 279, 0, 93, 0, 1561, 855, + 839, 805, 806, 843, 856, 857, 858, 859, 844, 0, + 233, 845, 846, 240, 847, 0, 804, 731, 733, 732, + 758, 759, 760, 761, 762, 763, 764, 729, 852, 860, + 861, 0, 258, 313, 265, 257, 519, 0, 0, 0, + 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, + 0, 0, 673, 688, 0, 702, 0, 0, 0, 268, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 685, 686, 0, 0, 0, + 0, 799, 0, 687, 0, 0, 695, 862, 863, 864, + 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, + 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, + 895, 896, 897, 898, 899, 900, 901, 902, 903, 698, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 290, 0, 391, 250, 0, 442, 798, 0, 0, 561, + 0, 0, 796, 0, 0, 0, 0, 355, 0, 322, + 195, 220, 0, 0, 401, 450, 462, 0, 0, 0, + 849, 0, 460, 415, 539, 228, 277, 447, 421, 458, + 429, 280, 0, 0, 459, 362, 524, 439, 536, 562, + 563, 256, 395, 548, 500, 556, 580, 221, 253, 409, + 493, 542, 482, 387, 520, 521, 321, 481, 288, 198, + 359, 568, 219, 468, 361, 237, 226, 526, 545, 282, + 445, 575, 208, 495, 534, 234, 472, 0, 0, 582, + 242, 492, 210, 531, 491, 383, 318, 319, 209, 0, + 446, 261, 286, 0, 0, 251, 404, 850, 851, 249, + 583, 737, 555, 215, 0, 554, 397, 523, 532, 384, + 373, 214, 530, 382, 372, 326, 745, 746, 273, 299, + 784, 783, 782, 298, 300, 780, 781, 779, 202, 543, + 0, 203, 0, 487, 544, 584, 441, 207, 229, 230, + 232, 0, 272, 276, 284, 287, 295, 296, 305, 357, + 408, 435, 431, 440, 0, 518, 537, 549, 560, 566, + 567, 569, 570, 571, 572, 573, 576, 574, 396, 303, + 483, 325, 363, 0, 0, 414, 461, 235, 541, 484, + 809, 797, 708, 813, 710, 810, 811, 705, 706, 709, + 812, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 0, + 800, 694, 693, 0, 701, 0, 727, 728, 730, 734, + 735, 736, 747, 756, 757, 765, 767, 768, 766, 769, + 770, 771, 774, 775, 776, 777, 772, 773, 778, 711, + 715, 712, 713, 714, 726, 716, 717, 718, 719, 720, + 721, 722, 723, 724, 725, 823, 824, 825, 826, 827, + 828, 740, 744, 743, 741, 742, 738, 739, 749, 748, + 750, 751, 752, 753, 754, 755, 692, 194, 216, 358, + 0, 443, 281, 581, 551, 546, 201, 218, 814, 255, + 815, 0, 0, 819, 0, 0, 0, 821, 820, 0, + 822, 788, 787, 0, 0, 816, 817, 0, 818, 0, + 0, 196, 197, 204, 217, 227, 231, 238, 254, 269, + 271, 278, 291, 302, 310, 311, 314, 320, 370, 376, + 377, 378, 379, 398, 399, 400, 403, 406, 407, 410, + 412, 413, 416, 420, 424, 425, 426, 428, 430, 432, + 444, 449, 463, 464, 465, 466, 467, 470, 471, 476, + 477, 478, 479, 480, 488, 489, 494, 525, 527, 540, + 558, 564, 469, 829, 830, 831, 832, 833, 834, 835, + 836, 292, 535, 565, 533, 577, 559, 427, 368, 0, + 0, 371, 274, 297, 312, 0, 550, 490, 222, 455, + 283, 246, 854, 0, 206, 241, 225, 252, 267, 270, + 316, 381, 389, 418, 423, 289, 264, 239, 448, 236, + 473, 497, 498, 499, 501, 385, 259, 422, 386, 0, + 366, 515, 516, 308, 506, 0, 704, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, + 0, 691, 0, 0, 0, 263, 696, 0, 0, 0, + 356, 260, 0, 0, 419, 0, 200, 0, 475, 247, + 367, 364, 522, 275, 266, 262, 245, 309, 375, 417, + 496, 411, 703, 360, 0, 0, 485, 390, 0, 0, + 0, 0, 0, 699, 700, 0, 0, 0, 0, 0, + 0, 0, 0, 315, 243, 317, 199, 402, 486, 279, + 0, 93, 0, 0, 855, 839, 805, 806, 843, 856, + 857, 858, 859, 844, 0, 233, 845, 846, 240, 847, + 0, 804, 731, 733, 732, 758, 759, 760, 761, 762, + 763, 764, 729, 852, 860, 861, 0, 258, 313, 265, + 257, 519, 0, 0, 0, 0, 0, 0, 0, 224, + 0, 0, 0, 0, 0, 0, 0, 673, 688, 0, + 702, 0, 0, 0, 268, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 685, 686, 944, 0, 0, 0, 799, 0, 687, 0, + 0, 695, 862, 863, 864, 865, 866, 867, 868, 869, + 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, + 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, + 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, + 900, 901, 902, 903, 698, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 290, 0, 391, 250, 0, + 442, 798, 0, 0, 561, 0, 0, 796, 0, 0, + 0, 0, 355, 0, 322, 195, 220, 0, 0, 401, + 450, 462, 0, 0, 0, 849, 0, 460, 415, 539, + 228, 277, 447, 421, 458, 429, 280, 0, 0, 459, + 362, 524, 439, 536, 562, 563, 256, 395, 548, 500, + 556, 580, 221, 253, 409, 493, 542, 482, 387, 520, + 521, 321, 481, 288, 198, 359, 568, 219, 468, 361, + 237, 226, 526, 545, 282, 445, 575, 208, 495, 534, + 234, 472, 0, 0, 582, 242, 492, 210, 531, 491, + 383, 318, 319, 209, 0, 446, 261, 286, 0, 0, + 251, 404, 850, 851, 249, 583, 737, 555, 215, 0, + 554, 397, 523, 532, 384, 373, 214, 530, 382, 372, + 326, 745, 746, 273, 299, 784, 783, 782, 298, 300, + 780, 781, 779, 202, 543, 0, 203, 0, 487, 544, + 584, 441, 207, 229, 230, 232, 0, 272, 276, 284, + 287, 295, 296, 305, 357, 408, 435, 431, 440, 0, + 518, 537, 549, 560, 566, 567, 569, 570, 571, 572, + 573, 576, 574, 396, 303, 483, 325, 363, 0, 0, + 414, 461, 235, 541, 484, 809, 797, 708, 813, 710, + 810, 811, 705, 706, 709, 812, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, + 599, 600, 601, 602, 0, 800, 694, 693, 0, 701, + 0, 727, 728, 730, 734, 735, 736, 747, 756, 757, + 765, 767, 768, 766, 769, 770, 771, 774, 775, 776, + 777, 772, 773, 778, 711, 715, 712, 713, 714, 726, + 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 823, 824, 825, 826, 827, 828, 740, 744, 743, 741, + 742, 738, 739, 749, 748, 750, 751, 752, 753, 754, + 755, 692, 194, 216, 358, 0, 443, 281, 581, 551, + 546, 201, 218, 814, 255, 815, 0, 0, 819, 0, + 0, 0, 821, 820, 0, 822, 788, 787, 0, 0, + 816, 817, 0, 818, 0, 0, 196, 197, 204, 217, + 227, 231, 238, 254, 269, 271, 278, 291, 302, 310, + 311, 314, 320, 370, 376, 377, 378, 379, 398, 399, + 400, 403, 406, 407, 410, 412, 413, 416, 420, 424, + 425, 426, 428, 430, 432, 444, 449, 463, 464, 465, + 466, 467, 470, 471, 476, 477, 478, 479, 480, 488, + 489, 494, 525, 527, 540, 558, 564, 469, 829, 830, + 831, 832, 833, 834, 835, 836, 292, 535, 565, 533, + 577, 559, 427, 368, 0, 0, 371, 274, 297, 312, + 0, 550, 490, 222, 455, 283, 246, 854, 0, 206, + 241, 225, 252, 267, 270, 316, 381, 389, 418, 423, + 289, 264, 239, 448, 236, 473, 497, 498, 499, 501, + 385, 259, 422, 386, 0, 366, 515, 516, 308, 506, + 0, 704, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 405, 0, 0, 0, 0, 691, 0, 0, 0, + 263, 696, 0, 0, 0, 356, 260, 0, 0, 419, + 0, 200, 0, 475, 247, 367, 364, 522, 275, 266, + 262, 245, 309, 375, 417, 496, 411, 703, 360, 0, + 0, 485, 390, 0, 0, 0, 0, 0, 699, 700, + 0, 0, 0, 0, 0, 0, 0, 0, 315, 243, + 317, 199, 402, 486, 279, 0, 93, 0, 0, 855, + 839, 805, 806, 843, 856, 857, 858, 859, 844, 0, + 233, 845, 846, 240, 847, 0, 804, 731, 733, 732, + 758, 759, 760, 761, 762, 763, 764, 729, 852, 860, + 861, 0, 258, 313, 265, 257, 519, 0, 0, 0, + 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, + 0, 0, 673, 688, 0, 702, 0, 0, 0, 268, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 685, 686, 0, 0, 0, + 0, 799, 0, 687, 0, 0, 695, 862, 863, 864, + 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, + 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, + 895, 896, 897, 898, 899, 900, 901, 902, 903, 698, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 290, 0, 391, 250, 0, 442, 798, 0, 0, 561, + 0, 0, 796, 0, 0, 0, 0, 355, 0, 322, + 195, 220, 0, 0, 401, 450, 462, 0, 0, 0, + 849, 0, 460, 415, 539, 228, 277, 447, 421, 458, + 429, 280, 0, 0, 459, 362, 524, 439, 536, 562, + 563, 256, 395, 548, 500, 556, 580, 221, 253, 409, + 493, 542, 482, 387, 520, 521, 321, 481, 288, 198, + 359, 568, 219, 468, 361, 237, 226, 526, 545, 282, + 445, 575, 208, 495, 534, 234, 472, 0, 0, 582, + 242, 492, 210, 531, 491, 383, 318, 319, 209, 0, + 446, 261, 286, 0, 0, 251, 404, 850, 851, 249, + 583, 737, 555, 215, 0, 554, 397, 523, 532, 384, + 373, 214, 530, 382, 372, 326, 745, 746, 273, 299, + 784, 783, 782, 298, 300, 780, 781, 779, 202, 543, + 0, 203, 0, 487, 544, 584, 441, 207, 229, 230, + 232, 0, 272, 276, 284, 287, 295, 296, 305, 357, + 408, 435, 431, 440, 0, 518, 537, 549, 560, 566, + 567, 569, 570, 571, 572, 573, 576, 574, 396, 303, + 483, 325, 363, 0, 0, 414, 461, 235, 541, 484, + 809, 797, 708, 813, 710, 810, 811, 705, 706, 709, + 812, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 0, + 800, 694, 693, 0, 701, 0, 727, 728, 730, 734, + 735, 736, 747, 756, 757, 765, 767, 768, 766, 769, + 770, 771, 774, 775, 776, 777, 772, 773, 778, 711, + 715, 712, 713, 714, 726, 716, 717, 718, 719, 720, + 721, 722, 723, 724, 725, 823, 824, 825, 826, 827, + 828, 740, 744, 743, 741, 742, 738, 739, 749, 748, + 750, 751, 752, 753, 754, 755, 692, 194, 216, 358, + 0, 443, 281, 581, 551, 546, 201, 218, 814, 255, + 815, 0, 0, 819, 0, 0, 0, 821, 820, 0, + 822, 788, 787, 0, 0, 816, 817, 0, 818, 0, + 0, 196, 197, 204, 217, 227, 231, 238, 254, 269, + 271, 278, 291, 302, 310, 311, 314, 320, 370, 376, + 377, 378, 379, 398, 399, 400, 403, 406, 407, 410, + 412, 413, 416, 420, 424, 425, 426, 428, 430, 432, + 444, 449, 463, 464, 465, 466, 467, 470, 471, 476, + 477, 478, 479, 480, 488, 489, 494, 525, 527, 540, + 558, 564, 469, 829, 830, 831, 832, 833, 834, 835, + 836, 292, 535, 565, 533, 577, 559, 427, 368, 0, + 0, 371, 274, 297, 312, 0, 550, 490, 222, 455, + 283, 246, 854, 0, 206, 241, 225, 252, 267, 270, + 316, 381, 389, 418, 423, 289, 264, 239, 448, 236, + 473, 497, 498, 499, 501, 385, 259, 422, 386, 0, + 366, 515, 516, 308, 506, 0, 704, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, + 0, 691, 0, 0, 0, 263, 696, 0, 0, 0, + 356, 260, 0, 0, 419, 0, 200, 0, 475, 247, + 367, 364, 522, 275, 266, 262, 245, 309, 375, 417, + 496, 411, 703, 360, 0, 0, 485, 390, 0, 0, + 0, 0, 0, 699, 700, 0, 0, 0, 0, 0, + 0, 0, 0, 315, 243, 317, 199, 402, 486, 279, + 0, 93, 0, 0, 855, 839, 805, 806, 843, 856, + 857, 858, 859, 844, 0, 233, 845, 846, 240, 847, + 0, 804, 731, 733, 732, 758, 759, 760, 761, 762, + 763, 764, 729, 852, 860, 861, 0, 258, 313, 265, + 257, 519, 0, 0, 0, 0, 0, 0, 0, 224, + 0, 0, 0, 0, 0, 0, 0, 0, 688, 0, + 702, 0, 0, 0, 268, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 685, 686, 0, 0, 0, 0, 799, 0, 687, 0, + 0, 695, 862, 863, 864, 865, 866, 867, 868, 869, + 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, + 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, + 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, + 900, 901, 902, 903, 698, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 290, 0, 391, 250, 0, + 442, 798, 0, 0, 561, 0, 0, 796, 0, 0, + 0, 0, 355, 0, 322, 195, 220, 0, 0, 401, + 450, 462, 0, 0, 0, 849, 0, 460, 415, 539, + 228, 277, 447, 421, 458, 429, 280, 0, 0, 459, + 362, 524, 439, 536, 562, 563, 256, 395, 548, 500, + 556, 580, 221, 253, 409, 493, 542, 482, 387, 520, + 521, 321, 481, 288, 198, 359, 568, 219, 468, 361, + 237, 226, 526, 545, 282, 445, 575, 208, 495, 534, + 234, 472, 0, 0, 582, 242, 492, 210, 531, 491, + 383, 318, 319, 209, 0, 446, 261, 286, 0, 0, + 251, 404, 850, 851, 249, 583, 737, 555, 215, 0, + 554, 397, 523, 532, 384, 373, 214, 530, 382, 372, + 326, 745, 746, 273, 299, 784, 783, 782, 298, 300, + 780, 781, 779, 202, 543, 0, 203, 0, 487, 544, + 584, 441, 207, 229, 230, 232, 0, 272, 276, 284, + 287, 295, 296, 305, 357, 408, 435, 431, 440, 0, + 518, 537, 549, 560, 566, 567, 569, 570, 571, 572, + 573, 576, 574, 396, 303, 483, 325, 363, 0, 0, + 414, 461, 235, 541, 484, 809, 797, 708, 813, 710, + 810, 811, 705, 706, 709, 812, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, + 599, 600, 601, 602, 0, 800, 694, 693, 0, 701, + 0, 727, 728, 730, 734, 735, 736, 747, 756, 757, + 765, 767, 768, 766, 769, 770, 771, 774, 775, 776, + 777, 772, 773, 778, 711, 715, 712, 713, 714, 726, + 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 823, 824, 825, 826, 827, 828, 740, 744, 743, 741, + 742, 738, 739, 749, 748, 750, 751, 752, 753, 754, + 755, 692, 194, 216, 358, 0, 443, 281, 581, 551, + 546, 201, 218, 814, 255, 815, 0, 0, 819, 0, + 0, 0, 821, 820, 0, 822, 788, 787, 0, 0, + 816, 817, 0, 818, 0, 0, 196, 197, 204, 217, + 227, 231, 238, 254, 269, 271, 278, 291, 302, 310, + 311, 314, 320, 370, 376, 377, 378, 379, 398, 399, + 400, 403, 406, 407, 410, 412, 413, 416, 420, 424, + 425, 426, 428, 430, 432, 444, 449, 463, 464, 465, + 466, 467, 470, 471, 476, 477, 478, 479, 480, 488, + 489, 494, 525, 527, 540, 558, 564, 469, 829, 830, + 831, 832, 833, 834, 835, 836, 292, 535, 565, 533, + 577, 559, 427, 368, 0, 0, 371, 274, 297, 312, + 0, 550, 490, 222, 455, 283, 246, 854, 0, 206, + 241, 225, 252, 267, 270, 316, 381, 389, 418, 423, + 289, 264, 239, 448, 236, 473, 497, 498, 499, 501, + 385, 259, 422, 386, 0, 366, 515, 516, 308, 506, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, + 263, 0, 0, 0, 0, 356, 260, 0, 0, 419, + 0, 200, 0, 475, 247, 367, 364, 522, 275, 266, + 262, 245, 309, 375, 417, 496, 411, 0, 360, 0, + 0, 485, 390, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 315, 243, + 317, 199, 402, 486, 279, 0, 0, 0, 0, 0, + 651, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 233, 0, 0, 240, 0, 0, 0, 341, 350, 349, + 330, 331, 333, 335, 340, 347, 353, 0, 0, 0, + 0, 0, 258, 313, 265, 257, 519, 0, 0, 0, + 0, 0, 0, 0, 224, 0, 0, 0, 0, 1363, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1372, + 1371, 1373, 1374, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 290, 0, 391, 250, 0, 442, 0, 0, 0, 561, + 0, 0, 0, 0, 0, 0, 0, 355, 0, 322, + 195, 220, 0, 0, 401, 450, 462, 0, 0, 0, + 248, 0, 460, 415, 539, 228, 277, 447, 421, 458, + 429, 280, 0, 0, 459, 362, 524, 439, 536, 562, + 563, 256, 395, 548, 500, 556, 580, 221, 253, 409, + 493, 542, 482, 387, 520, 521, 321, 481, 288, 198, + 359, 568, 219, 468, 361, 237, 226, 526, 545, 282, + 445, 575, 208, 495, 534, 234, 472, 0, 0, 582, + 242, 492, 210, 531, 491, 383, 318, 319, 209, 0, + 446, 261, 286, 0, 0, 251, 404, 528, 529, 249, + 583, 223, 555, 215, 0, 554, 397, 523, 532, 384, + 373, 214, 530, 382, 372, 326, 345, 346, 273, 299, + 436, 365, 437, 298, 300, 393, 392, 394, 202, 543, + 0, 203, 0, 487, 544, 584, 441, 207, 229, 230, + 232, 0, 272, 276, 284, 287, 295, 296, 305, 357, + 408, 435, 431, 440, 0, 518, 537, 549, 560, 566, + 567, 569, 570, 571, 572, 573, 576, 574, 396, 303, + 483, 325, 363, 0, 0, 414, 461, 235, 541, 484, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 603, 374, + 474, 538, 327, 339, 342, 332, 351, 0, 352, 328, + 329, 334, 336, 337, 338, 343, 344, 348, 354, 244, + 205, 380, 388, 517, 304, 211, 212, 213, 502, 503, + 504, 505, 552, 553, 557, 451, 452, 453, 454, 285, + 547, 301, 457, 456, 323, 324, 369, 438, 507, 508, + 509, 510, 511, 512, 513, 514, 0, 194, 216, 358, + 0, 443, 281, 581, 551, 546, 201, 218, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 196, 197, 204, 217, 227, 231, 238, 254, 269, + 271, 278, 291, 302, 310, 311, 314, 320, 370, 376, + 377, 378, 379, 398, 399, 400, 403, 406, 407, 410, + 412, 413, 416, 420, 424, 425, 426, 428, 430, 432, + 444, 449, 463, 464, 465, 466, 467, 470, 471, 476, + 477, 478, 479, 480, 488, 489, 494, 525, 527, 540, + 558, 564, 469, 293, 294, 433, 434, 306, 307, 578, + 579, 292, 535, 565, 533, 577, 559, 427, 368, 0, + 0, 371, 274, 297, 312, 0, 550, 490, 222, 455, + 283, 246, 0, 0, 206, 241, 225, 252, 267, 270, + 316, 381, 389, 418, 423, 289, 264, 239, 448, 236, + 473, 497, 498, 499, 501, 385, 259, 422, 386, 0, + 366, 515, 516, 308, 506, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, + 0, 0, 0, 0, 0, 263, 0, 0, 0, 0, + 356, 260, 0, 0, 419, 0, 200, 0, 475, 247, + 367, 364, 522, 275, 266, 262, 245, 309, 375, 417, + 496, 411, 0, 360, 0, 0, 485, 390, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 315, 243, 317, 199, 402, 486, 279, + 0, 0, 0, 0, 0, 651, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 233, 0, 0, 240, 0, + 0, 0, 341, 350, 349, 330, 331, 333, 335, 340, + 347, 353, 0, 0, 0, 0, 0, 258, 313, 265, + 257, 519, 0, 0, 0, 0, 0, 0, 0, 224, + 0, 1015, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 290, 0, 391, 250, 0, + 442, 0, 0, 1014, 561, 0, 0, 0, 0, 0, + 1011, 1012, 355, 972, 322, 195, 220, 1005, 1009, 401, + 450, 462, 0, 0, 0, 248, 0, 460, 415, 539, + 228, 277, 447, 421, 458, 429, 280, 0, 0, 459, + 362, 524, 439, 536, 562, 563, 256, 395, 548, 500, + 556, 580, 221, 253, 409, 493, 542, 482, 387, 520, + 521, 321, 481, 288, 198, 359, 568, 219, 468, 361, + 237, 226, 526, 545, 282, 445, 575, 208, 495, 534, + 234, 472, 0, 0, 582, 242, 492, 210, 531, 491, + 383, 318, 319, 209, 0, 446, 261, 286, 0, 0, + 251, 404, 528, 529, 249, 583, 223, 555, 215, 0, + 554, 397, 523, 532, 384, 373, 214, 530, 382, 372, + 326, 345, 346, 273, 299, 436, 365, 437, 298, 300, + 393, 392, 394, 202, 543, 0, 203, 0, 487, 544, + 584, 441, 207, 229, 230, 232, 0, 272, 276, 284, + 287, 295, 296, 305, 357, 408, 435, 431, 440, 0, + 518, 537, 549, 560, 566, 567, 569, 570, 571, 572, + 573, 576, 574, 396, 303, 483, 325, 363, 0, 0, + 414, 461, 235, 541, 484, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, + 599, 600, 601, 602, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 603, 374, 474, 538, 327, 339, 342, + 332, 351, 0, 352, 328, 329, 334, 336, 337, 338, + 343, 344, 348, 354, 244, 205, 380, 388, 517, 304, + 211, 212, 213, 502, 503, 504, 505, 552, 553, 557, + 451, 452, 453, 454, 285, 547, 301, 457, 456, 323, + 324, 369, 438, 507, 508, 509, 510, 511, 512, 513, + 514, 0, 194, 216, 358, 0, 443, 281, 581, 551, + 546, 201, 218, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 197, 204, 217, + 227, 231, 238, 254, 269, 271, 278, 291, 302, 310, + 311, 314, 320, 370, 376, 377, 378, 379, 398, 399, + 400, 403, 406, 407, 410, 412, 413, 416, 420, 424, + 425, 426, 428, 430, 432, 444, 449, 463, 464, 465, + 466, 467, 470, 471, 476, 477, 478, 479, 480, 488, + 489, 494, 525, 527, 540, 558, 564, 469, 293, 294, + 433, 434, 306, 307, 578, 579, 292, 535, 565, 533, + 577, 559, 427, 368, 0, 0, 371, 274, 297, 312, + 0, 550, 490, 222, 455, 283, 246, 0, 0, 206, + 241, 225, 252, 267, 270, 316, 381, 389, 418, 423, + 289, 264, 239, 448, 236, 473, 497, 498, 499, 501, + 385, 259, 422, 386, 0, 366, 515, 516, 308, 506, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, + 263, 0, 0, 0, 0, 356, 260, 0, 0, 419, + 0, 200, 0, 475, 247, 367, 364, 522, 275, 266, + 262, 245, 309, 375, 417, 496, 411, 0, 360, 0, + 0, 485, 390, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 315, 243, + 317, 199, 402, 486, 279, 0, 0, 0, 0, 1524, + 839, 0, 0, 1521, 0, 0, 0, 0, 1519, 0, + 233, 1520, 1518, 240, 1523, 0, 804, 341, 350, 349, + 330, 331, 333, 335, 340, 347, 353, 0, 0, 0, + 0, 0, 258, 313, 265, 257, 519, 0, 0, 0, + 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 290, 0, 391, 250, 0, 442, 0, 0, 0, 561, + 0, 0, 0, 0, 0, 0, 0, 355, 0, 322, + 195, 220, 0, 0, 401, 450, 462, 0, 0, 0, + 248, 0, 460, 415, 539, 228, 277, 447, 421, 458, + 429, 280, 0, 0, 459, 362, 524, 439, 536, 562, + 563, 256, 395, 548, 500, 556, 580, 221, 253, 409, + 493, 542, 482, 387, 520, 521, 321, 481, 288, 198, + 359, 568, 219, 468, 361, 237, 226, 526, 545, 282, + 445, 575, 208, 495, 534, 234, 472, 0, 0, 582, + 242, 492, 210, 531, 491, 383, 318, 319, 209, 0, + 446, 261, 286, 0, 0, 251, 404, 528, 529, 249, + 583, 223, 555, 215, 0, 554, 397, 523, 532, 384, + 373, 214, 530, 382, 372, 326, 345, 346, 273, 299, + 436, 365, 437, 298, 300, 393, 392, 394, 202, 543, + 0, 203, 0, 487, 544, 584, 441, 207, 229, 230, + 232, 0, 272, 276, 284, 287, 295, 296, 305, 357, + 408, 435, 431, 440, 0, 518, 537, 549, 560, 566, + 567, 569, 570, 571, 572, 573, 576, 574, 396, 303, + 483, 325, 363, 0, 0, 414, 461, 235, 541, 484, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 603, 374, + 474, 538, 327, 339, 342, 332, 351, 0, 352, 328, + 329, 334, 336, 337, 338, 343, 344, 348, 354, 244, + 205, 380, 388, 517, 304, 211, 212, 213, 502, 503, + 504, 505, 552, 553, 557, 451, 452, 453, 454, 285, + 547, 301, 457, 456, 323, 324, 369, 438, 507, 508, + 509, 510, 511, 512, 513, 514, 0, 194, 216, 358, + 0, 443, 281, 581, 551, 546, 201, 218, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 196, 197, 204, 217, 227, 231, 238, 254, 269, + 271, 278, 291, 302, 310, 311, 314, 320, 370, 376, + 377, 378, 379, 398, 399, 400, 403, 406, 407, 410, + 412, 413, 416, 420, 424, 425, 426, 428, 430, 432, + 444, 449, 463, 464, 465, 466, 467, 470, 471, 476, + 477, 478, 479, 480, 488, 489, 494, 525, 527, 540, + 558, 564, 469, 293, 294, 433, 434, 306, 307, 578, + 579, 292, 535, 565, 533, 577, 559, 427, 368, 0, + 0, 371, 274, 297, 312, 0, 550, 490, 222, 455, + 283, 246, 0, 0, 206, 241, 225, 252, 267, 270, + 316, 381, 389, 418, 423, 289, 264, 239, 448, 236, + 473, 497, 498, 499, 501, 385, 259, 422, 0, 386, + 366, 515, 516, 308, 84, 506, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 405, 0, 0, + 0, 0, 0, 0, 0, 0, 263, 0, 0, 0, + 0, 356, 260, 0, 0, 419, 0, 200, 0, 475, + 247, 367, 364, 522, 275, 266, 262, 245, 309, 375, + 417, 496, 411, 0, 360, 0, 0, 485, 390, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 315, 243, 317, 199, 402, 486, + 279, 0, 93, 0, 0, 0, 192, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 233, 0, 0, 240, + 0, 0, 0, 341, 350, 349, 330, 331, 333, 335, + 340, 347, 353, 0, 0, 0, 0, 0, 258, 313, + 265, 257, 519, 0, 0, 0, 0, 0, 0, 0, + 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 268, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 290, 0, 391, 250, + 0, 442, 0, 0, 0, 561, 0, 0, 0, 0, + 0, 0, 0, 355, 0, 322, 195, 220, 0, 0, + 401, 450, 462, 0, 0, 0, 248, 0, 460, 415, + 539, 228, 277, 447, 421, 458, 429, 280, 0, 0, + 459, 362, 524, 439, 536, 562, 563, 256, 395, 548, + 500, 556, 580, 221, 253, 409, 493, 542, 482, 387, + 520, 521, 321, 481, 288, 198, 359, 568, 219, 468, + 361, 237, 226, 526, 545, 282, 445, 575, 208, 495, + 534, 234, 472, 0, 0, 582, 242, 492, 210, 531, + 491, 383, 318, 319, 209, 0, 446, 261, 286, 0, + 0, 251, 404, 528, 529, 249, 583, 223, 555, 215, + 0, 554, 397, 523, 532, 384, 373, 214, 530, 382, + 372, 326, 345, 346, 273, 299, 436, 365, 437, 298, + 300, 393, 392, 394, 202, 543, 0, 203, 0, 487, + 544, 584, 441, 207, 229, 230, 232, 0, 272, 276, + 284, 287, 295, 296, 305, 357, 408, 435, 431, 440, + 0, 518, 537, 549, 560, 566, 567, 569, 570, 571, + 572, 573, 576, 574, 396, 303, 483, 325, 363, 0, + 0, 414, 461, 235, 541, 484, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 585, 586, 587, + 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, + 598, 599, 600, 601, 602, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 603, 374, 474, 538, 327, 339, + 342, 332, 351, 0, 352, 328, 329, 334, 336, 337, + 338, 343, 344, 348, 354, 244, 205, 380, 388, 517, + 304, 211, 212, 213, 502, 503, 504, 505, 552, 553, + 557, 451, 452, 453, 454, 285, 547, 301, 457, 456, + 323, 324, 369, 438, 507, 508, 509, 510, 511, 512, + 513, 514, 0, 194, 216, 358, 92, 443, 281, 581, + 551, 546, 201, 218, 0, 255, 0, 0, 0, 0, + 0, 0, 2151, 0, 0, 2150, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 196, 197, 204, + 217, 227, 231, 238, 254, 269, 271, 278, 291, 302, + 310, 311, 314, 320, 370, 376, 377, 378, 379, 398, + 399, 400, 403, 406, 407, 410, 412, 413, 416, 420, + 424, 425, 426, 428, 430, 432, 444, 449, 463, 464, + 465, 466, 467, 470, 471, 476, 477, 478, 479, 480, + 488, 489, 494, 525, 527, 540, 558, 564, 469, 293, + 294, 433, 434, 306, 307, 578, 579, 292, 535, 565, + 533, 577, 559, 427, 368, 0, 0, 371, 274, 297, + 312, 0, 550, 490, 222, 455, 283, 246, 0, 0, + 206, 241, 225, 252, 267, 270, 316, 381, 389, 418, + 423, 289, 264, 239, 448, 236, 473, 497, 498, 499, + 501, 385, 259, 422, 1580, 0, 366, 515, 516, 308, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 405, 0, 0, 0, 1582, 0, 0, 0, + 0, 263, 0, 0, 0, 0, 356, 260, 0, 0, + 419, 0, 200, 0, 475, 247, 367, 364, 522, 275, + 266, 262, 245, 309, 375, 417, 496, 411, 0, 360, + 0, 0, 485, 390, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 315, + 243, 317, 199, 402, 486, 279, 0, 0, 0, 0, + 1584, 651, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 233, 0, 0, 240, 0, 0, 0, 341, 350, + 349, 330, 331, 333, 335, 340, 347, 353, 0, 0, + 0, 0, 0, 258, 313, 265, 257, 519, 0, 0, + 0, 0, 0, 0, 0, 224, 0, 0, 0, 1344, + 0, 1345, 1346, 0, 0, 0, 0, 0, 0, 0, + 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 290, 0, 391, 250, 0, 442, 0, 0, 0, + 561, 0, 0, 0, 0, 0, 0, 0, 355, 0, + 322, 195, 220, 0, 0, 401, 450, 462, 0, 0, + 0, 248, 0, 460, 415, 539, 228, 277, 447, 421, + 458, 429, 280, 0, 0, 459, 362, 524, 439, 536, + 562, 563, 256, 395, 548, 500, 556, 580, 221, 253, + 409, 493, 542, 482, 387, 520, 521, 321, 481, 288, + 198, 359, 568, 219, 468, 361, 237, 226, 526, 545, + 282, 445, 575, 208, 495, 534, 234, 472, 0, 0, + 582, 242, 492, 210, 531, 491, 383, 318, 319, 209, + 0, 446, 261, 286, 0, 0, 251, 404, 528, 529, + 249, 583, 223, 555, 215, 0, 554, 397, 523, 532, + 384, 373, 214, 530, 382, 372, 326, 345, 346, 273, + 299, 436, 365, 437, 298, 300, 393, 392, 394, 202, + 543, 0, 203, 0, 487, 544, 584, 441, 207, 229, + 230, 232, 0, 272, 276, 284, 287, 295, 296, 305, + 357, 408, 435, 431, 440, 0, 518, 537, 549, 560, + 566, 567, 569, 570, 571, 572, 573, 576, 574, 396, + 303, 483, 325, 363, 0, 0, 414, 461, 235, 541, + 484, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 585, 586, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 603, + 374, 474, 538, 327, 339, 342, 332, 351, 0, 352, + 328, 329, 334, 336, 337, 338, 343, 344, 348, 354, + 244, 205, 380, 388, 517, 304, 211, 212, 213, 502, + 503, 504, 505, 552, 553, 557, 451, 452, 453, 454, + 285, 547, 301, 457, 456, 323, 324, 369, 438, 507, + 508, 509, 510, 511, 512, 513, 514, 0, 194, 216, + 358, 0, 443, 281, 581, 551, 546, 201, 218, 0, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 196, 197, 204, 217, 227, 231, 238, 254, + 269, 271, 278, 291, 302, 310, 311, 314, 320, 370, + 376, 377, 378, 379, 398, 399, 400, 403, 406, 407, + 410, 412, 413, 416, 420, 424, 425, 426, 428, 430, + 432, 444, 449, 463, 464, 465, 466, 467, 470, 471, + 476, 477, 478, 479, 480, 488, 489, 494, 525, 527, + 540, 558, 564, 469, 293, 294, 433, 434, 306, 307, + 578, 579, 292, 535, 565, 533, 577, 559, 427, 368, + 0, 0, 371, 274, 297, 312, 0, 550, 490, 222, + 455, 283, 246, 0, 0, 206, 241, 225, 252, 267, + 270, 316, 381, 389, 418, 423, 289, 264, 239, 448, + 236, 473, 497, 498, 499, 501, 385, 259, 422, 0, + 386, 366, 515, 516, 308, 84, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 93, 0, 1561, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 92, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 93, 0, + 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 2151, 0, + 0, 2150, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 2101, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1763, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 2099, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 966, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 972, 322, 195, 220, 970, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 2101, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1763, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 1561, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 3469, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1920, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1921, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 2532, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2533, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 2517, 0, 0, 0, 0, 233, 0, 0, + 240, 2518, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 1603, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 1602, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 653, 654, 655, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 3594, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1763, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 3469, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 93, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 2152, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1584, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 1875, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 1866, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 1730, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 1728, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 1726, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 1724, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 1722, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 1718, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 1716, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 1714, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 1689, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 1588, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 93, 0, + 0, 0, 839, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1323, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 1322, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 925, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 606, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 3602, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 651, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 386, 0, 366, 515, 516, + 308, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 263, 0, 0, 0, 0, 356, 260, 0, + 0, 419, 0, 200, 0, 475, 247, 367, 364, 522, + 275, 266, 262, 245, 309, 375, 417, 496, 411, 0, + 360, 0, 0, 485, 390, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 315, 243, 317, 199, 402, 486, 279, 0, 0, 0, + 0, 0, 839, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 0, 0, 240, 0, 0, 0, 341, + 350, 349, 330, 331, 333, 335, 340, 347, 353, 0, + 0, 0, 0, 0, 258, 313, 265, 257, 519, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 0, 391, 250, 0, 442, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 322, 195, 220, 0, 0, 401, 450, 462, 0, + 0, 0, 248, 0, 460, 415, 539, 228, 277, 447, + 421, 458, 429, 280, 0, 0, 459, 362, 524, 439, + 536, 562, 563, 256, 395, 548, 500, 556, 580, 221, + 253, 409, 493, 542, 482, 387, 520, 521, 321, 481, + 288, 198, 359, 568, 219, 468, 361, 237, 226, 526, + 545, 282, 445, 575, 208, 495, 534, 234, 472, 0, + 0, 582, 242, 492, 210, 531, 491, 383, 318, 319, + 209, 0, 446, 261, 286, 0, 0, 251, 404, 528, + 529, 249, 583, 223, 555, 215, 0, 554, 397, 523, + 532, 384, 373, 214, 530, 382, 372, 326, 345, 346, + 273, 299, 436, 365, 437, 298, 300, 393, 392, 394, + 202, 543, 0, 203, 0, 487, 544, 584, 441, 207, + 229, 230, 232, 0, 272, 276, 284, 287, 295, 296, + 305, 357, 408, 435, 431, 440, 0, 518, 537, 549, + 560, 566, 567, 569, 570, 571, 572, 573, 576, 574, + 396, 303, 483, 325, 363, 0, 0, 414, 461, 235, + 541, 484, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 603, 374, 474, 538, 327, 339, 342, 332, 351, 0, + 352, 328, 329, 334, 336, 337, 338, 343, 344, 348, + 354, 244, 205, 380, 388, 517, 304, 211, 212, 213, + 502, 503, 504, 505, 552, 553, 557, 451, 452, 453, + 454, 285, 547, 301, 457, 456, 323, 324, 369, 438, + 507, 508, 509, 510, 511, 512, 513, 514, 0, 194, + 216, 358, 0, 443, 281, 581, 551, 546, 201, 218, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 197, 204, 217, 227, 231, 238, + 254, 269, 271, 278, 291, 302, 310, 311, 314, 320, + 370, 376, 377, 378, 379, 398, 399, 400, 403, 406, + 407, 410, 412, 413, 416, 420, 424, 425, 426, 428, + 430, 432, 444, 449, 463, 464, 465, 466, 467, 470, + 471, 476, 477, 478, 479, 480, 488, 489, 494, 525, + 527, 540, 558, 564, 469, 293, 294, 433, 434, 306, + 307, 578, 579, 292, 535, 565, 533, 577, 559, 427, + 368, 0, 0, 371, 274, 297, 312, 0, 550, 490, + 222, 455, 283, 246, 0, 0, 206, 241, 225, 252, + 267, 270, 316, 381, 389, 418, 423, 289, 264, 239, + 448, 236, 473, 497, 498, 499, 501, 385, 259, 422, + 386, 0, 366, 515, 516, 308, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 356, 260, 0, 0, 419, 0, 200, 0, + 475, 247, 367, 364, 522, 275, 266, 262, 245, 309, + 375, 417, 496, 411, 0, 360, 0, 0, 485, 390, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 315, 243, 317, 199, 402, + 486, 279, 0, 0, 0, 0, 0, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, + 240, 0, 0, 0, 341, 350, 349, 330, 331, 333, + 335, 340, 347, 353, 0, 0, 0, 0, 0, 258, + 313, 265, 257, 519, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 290, 0, 391, + 250, 0, 442, 0, 0, 0, 561, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 322, 195, 220, 0, + 0, 401, 450, 462, 0, 0, 0, 248, 0, 460, + 415, 539, 228, 277, 447, 421, 458, 429, 280, 0, + 0, 459, 362, 524, 439, 536, 562, 563, 256, 395, + 548, 500, 556, 580, 221, 253, 409, 493, 542, 482, + 387, 520, 521, 321, 481, 288, 198, 359, 568, 219, + 468, 361, 237, 226, 526, 545, 282, 445, 575, 208, + 495, 534, 234, 472, 0, 0, 582, 242, 492, 210, + 531, 491, 383, 318, 319, 209, 0, 446, 261, 286, + 0, 0, 251, 404, 528, 529, 249, 583, 223, 555, + 215, 0, 554, 397, 523, 532, 384, 373, 214, 530, + 382, 372, 326, 345, 346, 273, 299, 436, 365, 437, + 298, 300, 393, 392, 394, 202, 543, 0, 203, 0, + 487, 544, 584, 441, 207, 229, 230, 232, 0, 272, + 276, 284, 287, 295, 296, 305, 357, 408, 435, 431, + 440, 0, 518, 537, 549, 560, 566, 567, 569, 570, + 571, 572, 573, 576, 574, 396, 303, 483, 325, 363, + 0, 0, 414, 461, 235, 541, 484, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 603, 374, 474, 538, 327, + 339, 342, 332, 351, 0, 352, 328, 329, 334, 336, + 337, 338, 343, 344, 348, 354, 244, 205, 380, 388, + 517, 304, 211, 212, 213, 502, 503, 504, 505, 552, + 553, 557, 451, 452, 453, 454, 285, 547, 301, 457, + 456, 323, 324, 369, 438, 507, 508, 509, 510, 511, + 512, 513, 514, 0, 194, 216, 358, 0, 443, 281, + 581, 551, 546, 201, 218, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, + 204, 217, 227, 231, 238, 254, 269, 271, 278, 291, + 302, 310, 311, 314, 320, 370, 376, 377, 378, 379, + 398, 399, 400, 403, 406, 407, 410, 412, 413, 416, + 420, 424, 425, 426, 428, 430, 432, 444, 449, 463, + 464, 465, 466, 467, 470, 471, 476, 477, 478, 479, + 480, 488, 489, 494, 525, 527, 540, 558, 564, 469, + 293, 294, 433, 434, 306, 307, 578, 579, 292, 535, + 565, 533, 577, 559, 427, 368, 0, 0, 371, 274, + 297, 312, 0, 550, 490, 222, 455, 283, 246, 0, + 0, 206, 241, 225, 252, 267, 270, 316, 381, 389, + 418, 423, 289, 264, 239, 448, 236, 473, 497, 498, + 499, 501, 385, 259, 422, 0, 0, 366, 515, 516, + 308, } var yyPact = [...]int{ - -1000, -1000, 5501, -1000, -466, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, 5224, -1000, -455, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 2327, - 2352, -1000, -1000, -1000, -1000, 2444, -1000, 841, 1948, -1000, - 2246, 196, -1000, 45647, 585, -1000, 43027, 581, 189, 28617, - -1000, 206, -1000, 197, 44337, 198, -1000, -1000, -1000, -1000, - -342, 17480, 2165, 71, 64, 45647, -1000, -1000, -1000, -1000, - 2396, 1905, -1000, 369, -1000, -1000, -1000, -1000, -1000, -1000, - 42372, -1000, 950, -1000, -1000, 2256, 2238, 2451, 758, 2195, - -1000, 2353, 1905, -1000, 17480, 2382, 2315, 16825, 16825, 504, - -1000, -1000, 203, -1000, -1000, 24032, 45647, 31237, 511, -1000, - 2246, -1000, -1000, -1000, 87, -1000, 374, 1824, -1000, 1823, - -1000, 793, 842, 406, 515, 486, 404, 403, 402, 401, - 400, 399, 397, 385, 421, -1000, 783, 783, -158, -163, - 4406, 548, 466, 466, 749, 539, 2213, 2211, -1000, -1000, - 783, 783, 783, 379, 783, 783, 783, 783, 291, 289, - 783, 783, 783, 783, 783, 783, 783, 783, 783, 783, - 783, 783, 783, 783, 783, 783, 783, 518, 2246, 275, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + 2142, 2298, -1000, -1000, -1000, -1000, 2411, -1000, 864, 1845, + -1000, 2141, 4372, -1000, 48736, 639, -1000, 46076, 637, 753, + 593, 31446, -1000, 231, -1000, 207, 47406, 221, -1000, -1000, + -1000, -1000, -313, 20139, 2056, 79, 78, 48736, -1000, -1000, + -1000, -1000, 2299, 1835, -1000, 385, -1000, -1000, -1000, -1000, + -1000, -1000, 45411, -1000, 1002, -1000, -1000, 2149, 2151, 2357, + 785, 2103, -1000, 2229, 1835, -1000, 20139, 2288, 2200, 19474, + 19474, 573, -1000, -1000, 320, -1000, -1000, 26791, 48736, 34106, + 816, -1000, 2141, -1000, -1000, -1000, 119, -1000, 465, 1748, + -1000, 1747, -1000, 1016, 585, 481, 607, 605, 480, 479, + 478, 476, 474, 472, 471, 470, 491, -1000, 820, 820, + -135, -139, 1228, 571, 558, 558, 890, 596, 2099, 2089, + -1000, -1000, 820, 820, 820, 365, 820, 820, 820, 820, + 422, 417, 820, 820, 820, 820, 820, 820, 820, 820, + 820, 820, 820, 820, 820, 820, 820, 820, 820, 421, + 2141, 391, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, @@ -6260,61 +6555,64 @@ var yyPact = [...]int{ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 45647, 233, 45647, -1000, 675, 45647, 911, 911, - 104, 911, 911, 911, 911, 208, 705, 60, -1000, 199, - 271, 152, 273, 895, 259, -1000, -1000, 265, 895, 1620, - -1000, 770, 269, 166, -1000, 911, 911, -1000, 10905, 147, - 10905, 10905, -1000, 2243, -1000, -1000, -1000, -1000, -1000, 1176, - -1000, -1000, -1000, -1000, -43, 527, -1000, -1000, -1000, -1000, - 44337, 41717, 246, -1000, -1000, 42, -1000, -1000, 1652, 1094, - 17480, 1451, -1000, 1270, 728, -1000, -1000, -1000, -1000, -1000, - 645, -1000, 18135, 18135, 18135, 18135, -1000, -1000, 1826, 41062, - 1826, 1826, 18135, 1826, -1000, 18135, 1826, 1826, 1826, 17480, - 1826, 1826, 1826, 1826, -1000, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, -1000, -1000, -1000, -1000, 1826, - 674, 1826, 1826, 1826, 1826, 1826, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, 1826, 1826, 1826, 1826, 1826, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 20100, 1400, 1397, 1338, -1000, 14860, 1826, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, 48736, 392, 48736, -1000, 711, 48736, + -327, 934, 934, 112, 934, 934, 934, 934, 265, 752, + 58, -1000, 255, 406, 228, 408, 943, 259, -1000, -1000, + 393, 943, 1635, -1000, 797, 398, 226, -1000, 934, 934, + -1000, 13464, 175, 13464, 13464, -1000, 2127, -1000, -1000, -1000, + -1000, -1000, 1174, -1000, -1000, -1000, -1000, -16, 595, -1000, + -1000, -1000, -1000, 47406, 44746, 297, -1000, -1000, 149, -1000, + -1000, 1685, 1310, 20139, 1214, -1000, 1175, 759, -1000, -1000, + -1000, -1000, -1000, 677, -1000, 20804, 20804, 20804, 20804, -1000, + -1000, 1751, 44081, 1751, 1751, 20804, 1751, -1000, 20804, 1751, + 1751, 1751, 20139, 1751, 1751, 1751, 1751, -1000, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + -1000, -1000, -1000, -1000, 1751, 708, 1751, 1751, 1751, 1751, + 1751, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1751, + 1751, 1751, 1751, 1751, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 22799, 1412, + 1395, 1383, -1000, 17479, 1751, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - 45647, -1000, 1826, 224, 44337, 44337, 378, 2353, 1905, -1000, - 2396, 2360, 369, -1000, 2981, 1974, 1499, 1196, 1905, 1797, - 45647, -1000, 1851, -1000, -1000, -1000, -1000, 2115, 1303, 1617, - -1000, -1000, -1000, -1000, 1911, 17480, -1000, -1000, 2432, -1000, - 21411, 663, 2426, 40407, -1000, 504, 504, 1819, 428, 65, - -1000, -1000, -1000, -1000, 832, 27962, -1000, -1000, -1000, -1000, - 1648, 45647, -1000, -1000, 7361, 1185, -1000, 1942, -1000, 1626, - -1000, 1888, 17480, 1960, 575, 1185, 553, 552, 513, -1000, - -61, -1000, -1000, -1000, -1000, -1000, -1000, 783, 783, 783, - -1000, 412, 2381, 196, 6434, -1000, -1000, -1000, 39752, 1941, - 1185, -1000, 1932, -1000, 892, 573, 667, 667, 1185, -1000, - -1000, 44992, 1185, 891, 889, 1185, 1185, 44337, 44337, -1000, - 39097, -1000, 38442, 37787, 1145, 44337, 37132, 36477, 35822, 35167, - 34512, -1000, 2149, -1000, 1976, -1000, -1000, -1000, 44992, 1185, - 1185, 44992, 44337, 44992, 45647, 1185, -1000, -1000, 372, -1000, - -1000, 1144, 1042, 1032, 783, 783, 1030, 1610, 1606, 1605, - 783, 783, 1023, 1601, 29927, 1587, 353, 1022, 1019, 1018, - 1224, 1585, 205, 1580, 1195, 1190, 1008, 44337, 1931, 45647, - -1000, 261, 779, 476, 831, 2246, 2163, 1814, 520, 567, - 1185, 469, 469, 44337, -1000, 12888, -1000, -1000, 1576, 17480, - -1000, 897, 895, 895, -1000, -1000, -1000, -1000, -1000, -1000, - 911, 45647, 897, -1000, -1000, -1000, 895, 911, 45647, 911, - 911, 911, 911, 895, 895, 895, 911, 45647, 45647, 45647, - 45647, 45647, 45647, 45647, 45647, 45647, 10905, 770, 911, -358, - -1000, 1571, -1000, -1000, 2040, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 48736, -1000, 1751, 252, 47406, + 47406, 486, 2229, 1835, -1000, 2299, 2239, 385, -1000, 3246, + 1420, 1234, 1386, 1835, 1722, 48736, -1000, 1770, -1000, -1000, + -1000, -1000, 1982, 1394, 1626, -1000, -1000, -1000, -1000, 2268, + 20139, -1000, -1000, 2352, -1000, 24130, 703, 2339, 43416, -1000, + 573, 573, 1737, 457, 35, -1000, -1000, -1000, -1000, 855, + 30781, -1000, -1000, -1000, -1000, 1644, 48736, -1000, -1000, 3634, + 1180, -1000, 1841, -1000, 1640, -1000, 1811, 20139, 1851, 634, + 1180, 617, 616, 608, -1000, -32, -1000, -1000, -1000, -1000, + -1000, -1000, 820, 820, 820, -1000, 490, 2285, 4372, 4702, + -1000, -1000, -1000, 42751, 1840, 1180, -1000, 1833, -1000, 941, + 640, 709, 709, 1180, -1000, -1000, 48071, 1180, 937, 936, + 1180, 1180, 47406, 47406, -1000, 42086, -1000, 41421, 40756, 1157, + 47406, 40091, 39426, 38761, 38096, 37431, -1000, 2053, -1000, 1862, + -1000, -1000, -1000, 48071, 1180, 1180, 48071, 47406, 48071, 48736, + 1180, -1000, -1000, 361, -1000, -1000, 1152, 1150, 1149, 820, + 820, 1148, 1625, 1621, 1615, 820, 820, 1145, 1614, 32776, + 1613, 381, 1143, 1141, 1139, 1171, 1608, 206, 1607, 1156, + 1104, 1130, 47406, 1825, 48736, -1000, 387, 827, 583, 838, + 2141, 2052, 1735, 591, 623, 1180, 563, 563, 47406, -1000, + 14135, -1000, 238, -1000, 1602, 20139, -1000, 955, 943, 943, + -1000, -1000, -1000, -1000, -1000, -1000, 934, 48736, 955, -1000, + -1000, -1000, 943, 934, 48736, 934, 934, 934, 934, 943, + 943, 943, 934, 48736, 48736, 48736, 48736, 48736, 48736, 48736, + 48736, 48736, 13464, 797, 934, -328, -1000, 1597, -1000, -1000, + 1953, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, @@ -6329,284 +6627,295 @@ var yyPact = [...]int{ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, 10905, 10905, -1000, -1000, -1000, -1000, -1000, 1808, -1000, - 179, 17, 191, -1000, 33857, 352, 830, -1000, 352, -1000, - -1000, -1000, 1807, 33202, -1000, -360, -364, -367, -373, -1000, - -1000, -1000, -386, -387, -1000, -1000, -1000, 17480, 17480, 17480, - 17480, -194, -1000, 882, 18135, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 139, 811, 18135, 18135, 18135, 18135, 18135, 18135, - 18135, 18135, 18135, 18135, 18135, 18135, 18135, 18135, 18135, -1000, - -1000, 25997, 7715, 7715, 728, 728, 728, 728, -1000, -127, - 1801, 44992, -1000, -1000, -1000, 662, 17480, 17480, 728, -1000, - 1185, 14860, 18790, 16825, 16825, 17480, 785, 1094, 44992, 17480, - -1000, 1196, -1000, -1000, -1000, 1170, -1000, 883, 2215, 2215, - 2215, 2215, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, - 17480, 17480, 2215, 44337, 44337, 1199, 17480, 17480, 17480, 17480, - 17480, 17480, 13549, 17480, 17480, 18135, 17480, 17480, 17480, 1196, - 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, - 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, - 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 1196, - 17480, 1220, 17480, 17480, 16825, 12227, 16825, 16825, 16825, 16825, - 16825, -1000, -1000, -1000, -1000, -1000, 17480, 17480, 17480, 17480, - 17480, 17480, 17480, 17480, 1196, 17480, 17480, 17480, 17480, 17480, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 13464, 13464, -1000, + -1000, -1000, -1000, -1000, 1729, -1000, 215, 30, 214, -1000, + 36766, 376, 831, -1000, 376, -1000, -1000, -1000, 1726, 36101, + -1000, -330, -338, -341, -365, -1000, -1000, -1000, -371, -375, + -1000, -1000, -1000, 20139, 20139, 20139, 20139, -175, -1000, 1113, + 20804, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 211, 947, + 20804, 20804, 20804, 20804, 20804, 20804, 20804, 20804, 20804, 20804, + 20804, 20804, 20804, 20804, 20804, -1000, -1000, 28786, 6490, 6490, + 759, 759, 759, 759, -1000, -112, 1724, 48071, -1000, -1000, + -1000, 699, 20139, 20139, 759, -1000, 1180, 17479, 21469, 19474, + 19474, 20139, 862, 1310, 48071, 20139, -1000, 1386, -1000, -1000, + -1000, 1101, -1000, 929, 2098, 2098, 2098, 2098, 20139, 20139, + 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 2098, 47406, + 47406, 599, 20139, 20139, 20139, 20139, 20139, 20139, 16148, 20139, + 20139, 20804, 20139, 20139, 20139, 1386, 20139, 20139, 20139, 20139, + 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, + 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, + 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, + 20139, 20139, 20139, 20139, 20139, 20139, 20139, 1386, 20139, 1112, + 20139, 20139, 19474, 15477, 19474, 19474, 19474, 19474, 19474, -1000, + -1000, -1000, -1000, -1000, 20139, 20139, 20139, 20139, 20139, 20139, + 20139, 20139, 1386, 20139, 20139, 20139, 20139, 20139, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1453, 1356, + 1317, 20139, -1000, 1723, -1000, -115, 26126, 20139, 1577, 2337, + 1877, 47406, -1000, -1000, -1000, 2229, -1000, 2229, 1453, 3012, + 1975, 19474, -1000, -1000, 3012, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 1480, -1000, 48736, 1722, 2188, 47406, 1971, + 1575, 367, -1000, 20139, 20139, 1721, -1000, 1449, 48736, -1000, + -175, -1000, 35436, -1000, -1000, 12793, 48736, 466, 48736, -1000, + 25461, 34771, 279, -1000, 35, 1708, -1000, 37, 22, 16813, + 755, -1000, -1000, -1000, 1228, 22134, 1683, 755, 136, -1000, + -1000, -1000, 1811, -1000, 1811, 1811, 1811, 1811, 367, 367, + 367, 367, -1000, -1000, -1000, -1000, -1000, 1821, 1820, -1000, + 1811, 1811, 1811, 1811, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - 1477, 1450, 1306, 17480, -1000, 1799, -1000, -131, 23377, 17480, - 1564, 2425, 1967, 44337, -1000, -1000, -1000, 2353, -1000, 2353, - 1477, 2889, 2122, 16825, -1000, -1000, 2889, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 1629, -1000, 45647, 1797, 2298, - 44337, 2113, 1537, 375, -1000, 17480, 17480, 1777, -1000, 1523, - 45647, -1000, -194, -1000, 32547, -1000, -1000, 10244, 45647, 349, - 45647, -1000, 22722, 31892, 254, -1000, 65, 1701, -1000, -1, - -9, 14204, 723, -1000, -1000, -1000, 4406, 19445, 1649, 723, - 111, -1000, -1000, -1000, 1888, -1000, 1888, 1888, 1888, 1888, - 375, 375, 375, 375, -1000, -1000, -1000, -1000, -1000, 1925, - 1924, -1000, 1888, 1888, 1888, 1888, -1000, -1000, -1000, -1000, + -1000, 1819, 1819, 1819, 1817, 1817, 1812, 1812, 526, -1000, + 20139, 375, 34106, 2193, 1129, 1382, 387, 568, 1876, 1180, + 1180, 1180, 568, -1000, 1226, 1207, 1205, -1000, -447, 1718, + -1000, -1000, 2283, -1000, -1000, 921, 960, 958, 1040, 47406, + 354, 452, -1000, 524, -1000, 34106, 1180, 923, 709, 1180, + -1000, 1180, -1000, -1000, -1000, -1000, -1000, 1180, -1000, -1000, + 1717, -1000, 1746, 1007, 956, 993, 952, 1717, -1000, -1000, + -118, 1717, -1000, 1717, -1000, 1717, -1000, 1717, -1000, 1717, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 845, + 219, -230, 47406, 354, 580, -1000, 578, 28786, -1000, -1000, + -1000, 28786, 28786, -1000, -1000, -1000, -1000, 1572, 1521, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 1923, 1923, 1923, 1922, 1922, 1890, 1890, - 446, -1000, 17480, 356, 31237, 2280, 1006, 1764, 261, 478, - 1965, 1185, 1185, 1185, 478, -1000, 1244, 1240, 1227, -1000, - -454, 1771, -1000, -1000, 2380, -1000, -1000, 672, 914, 910, - 1084, 44337, 231, 329, -1000, 442, -1000, 31237, 1185, 886, - 667, 1185, -1000, 1185, -1000, -1000, -1000, -1000, -1000, 1185, - -1000, -1000, 1763, -1000, 1656, 942, 907, 922, 906, 1763, - -1000, -1000, -143, 1763, -1000, 1763, -1000, 1763, -1000, 1763, - -1000, 1763, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, 797, 192, -254, 44337, 231, 512, -1000, 510, 25997, - -1000, -1000, -1000, 25997, 25997, -1000, -1000, -1000, -1000, 1526, - 1524, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -431, 48736, + -1000, 370, 828, 428, 469, 418, 48736, 363, 2218, 2217, + 2210, 2209, 2205, 368, 415, 48736, 48736, 563, 1914, 48736, + 2161, 48736, -1000, -1000, -1000, -1000, 1515, 1506, -1000, 1310, + 48736, -1000, -1000, 934, 934, -1000, -1000, 48736, 934, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 934, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -443, 45647, -1000, 262, 829, 306, 371, 309, 45647, 380, - 2341, 2340, 2325, 2317, 2313, 239, 283, 45647, 45647, 469, - 2018, 45647, 2278, 45647, -1000, -1000, -1000, -1000, -1000, 1094, - 45647, -1000, -1000, 911, 911, -1000, -1000, 45647, 911, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, 911, -1000, -1000, + -1000, -1000, -1000, 48736, -1000, -1000, -1000, -1000, -16, 199, + -1000, -1000, 47406, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -5, -1000, 158, 34, 407, -1000, -1000, -1000, + -1000, -1000, 2221, -1000, 1310, 887, 882, -1000, 1751, -1000, + -1000, 1052, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 211, + 20804, 20804, 20804, 1385, 587, 1472, 1413, 1510, 1014, 1014, + 897, 897, 771, 771, 771, 771, 771, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 1499, -1000, 1751, 48071, 1596, + 15477, 1456, 1272, 1386, 3207, -1000, 1571, -1000, 1571, 1212, + 861, -1000, 20139, 1386, 3201, -1000, -1000, 1386, 1386, 1386, + 20139, -1000, -1000, 20139, 20139, 20139, 20139, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 20139, 1716, 1712, + 2334, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 45647, -1000, -1000, -1000, -1000, -43, 184, - -1000, -1000, 44337, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -72, -1000, 75, 5, 354, -1000, -1000, -1000, - -1000, -1000, 2335, -1000, 1094, 873, 853, -1000, 1826, -1000, - -1000, 1118, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 139, - 18135, 18135, 18135, 1589, 532, 1940, 796, 1291, 1410, 1410, - 781, 781, 732, 732, 732, 732, 732, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 1520, -1000, 1826, 44992, 1596, - 12227, 1759, 2244, 1196, 3040, -1000, 1569, -1000, 1569, 2123, - 838, -1000, 17480, 1196, 3027, -1000, -1000, 1196, 1196, 1196, - 17480, -1000, -1000, 17480, 17480, 17480, 17480, 1764, 1764, 1764, - 1764, 1764, 1764, 1764, 1764, 1764, 1764, 17480, 1739, 1707, - 2424, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, 1323, 1382, 1382, 1382, 1382, 1382, 20139, 1315, + -1000, -1000, -1000, 1274, 3192, 1140, 3185, 1382, 1382, -1000, + 1382, 3176, 3159, 1386, 1685, 2262, 2252, 2224, 2203, 2194, + 2182, 2160, 2147, 1386, 1710, -1000, 3071, 1382, 3067, 3061, + 3045, 2138, 3035, 3030, 3015, 1382, 1382, 1382, 2122, 3004, + 2999, 2995, 2985, 2980, 2721, 2701, 2688, 2639, 1382, 1317, + 1317, 1317, 1317, 1317, 2580, -178, 1382, 1386, -1000, -1000, + -1000, -1000, -1000, 2543, 2104, 1386, 1709, 1751, 698, -1000, + -1000, 1571, 1386, 1386, 1571, 1571, 2495, 2485, 2435, 2410, + 2404, 2393, 1382, 1382, -1000, 1382, 2373, 2369, 2078, 2074, + 1386, -1000, 1317, 48736, -1000, -307, -1000, 7, 750, 1751, + -1000, 32776, 1386, -1000, 5780, -1000, 1041, -1000, -1000, -1000, + -1000, -1000, 30116, 1697, 3012, -1000, -1000, 1751, 1569, -1000, + -1000, 367, 123, 29451, 721, 721, 165, 1310, 1310, 20139, + -1000, -1000, -1000, -1000, -1000, -1000, 697, 2310, 382, 1751, + -1000, 1734, 2577, -1000, -1000, -1000, 2186, 23465, -1000, -1000, + 1751, 1751, 48736, 1678, 1646, -1000, 696, -1000, 1184, 1708, + 35, 9, -1000, -1000, -1000, -1000, 1310, -1000, 1201, 467, + 772, -1000, 548, -1000, -1000, -1000, -1000, 2057, 118, -1000, + -1000, -1000, 281, 367, -1000, -1000, -1000, -1000, -1000, -1000, + 1497, 1497, -1000, -1000, -1000, -1000, -1000, 1127, -1000, -1000, + -1000, -1000, 1114, -1000, -1000, 1111, -1000, -1000, 2328, 1887, + 375, -1000, -1000, 820, 1471, -1000, -1000, 2080, 820, 820, + 47406, -1000, -1000, 1682, 2193, 370, 48736, 875, 1911, -1000, + 1876, 1876, 1876, 48736, -1000, -1000, -1000, -1000, -1000, -1000, + -432, 82, 390, -1000, -1000, -1000, 4541, 47406, 1564, -1000, + 325, -1000, 1663, -1000, 47406, -1000, 1562, 1816, 1180, 1180, + -1000, -1000, -1000, 47406, 1751, -1000, -1000, -1000, -1000, 620, + 2137, 314, -1000, -1000, -199, -1000, -1000, 354, 325, 48071, + 1180, 755, -1000, -1000, -1000, -1000, -1000, -434, 1559, 610, + 357, 330, 48736, 48736, 48736, 48736, 48736, 660, -1000, -1000, + 47, -1000, -1000, 239, -1000, -1000, -1000, -1000, 239, -1000, + -1000, -1000, -1000, 411, 572, -1000, 48736, 48736, 712, -1000, + -1000, -1000, -1000, -1000, 943, -1000, -1000, 943, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 1563, 1764, 1764, 1764, 1764, 1764, 17480, 1476, - -1000, -1000, -1000, 1272, 3023, 1346, 3005, 1764, 1764, -1000, - 1764, 2971, 2967, 1196, 1652, 1196, 1705, -1000, 2963, 1764, - 2940, 2935, 2900, 2171, 2880, 2861, 2850, 1764, 1764, 1764, - 2162, 2824, 2788, 2768, 2754, 2749, 2744, 2732, 2694, 2666, - 1764, 1306, 2508, -196, 1764, 1196, -1000, -1000, -1000, -1000, - -1000, 2491, 2148, 1196, 1703, 1826, 660, -1000, -1000, 1569, - 1196, 1196, 1569, 1569, 2467, 2463, 2458, 2415, 2394, 2366, - 1764, 1764, -1000, 1764, 2348, 2344, 2143, 2132, 1196, -1000, - 1306, 45647, -1000, -334, -1000, -23, 701, 1826, -1000, 29927, - 1196, -1000, 5648, -1000, 1172, -1000, -1000, -1000, -1000, -1000, - 27307, 1653, 2889, -1000, -1000, 1826, 1560, -1000, -1000, 375, - 90, 26652, 689, 689, 133, 1094, 1094, 17480, -1000, -1000, - -1000, -1000, -1000, -1000, 654, 2395, 361, 1826, -1000, 1679, - 2543, -1000, -1000, -1000, 2297, 20756, -1000, -1000, 1826, 1826, - 45647, 1873, 1871, -1000, 653, -1000, 1193, 1701, 65, 3, - -1000, -1000, -1000, -1000, 1094, -1000, 1205, 382, 3250, -1000, - 465, -1000, -1000, -1000, -1000, 2181, 105, -1000, -1000, -1000, - 236, 375, -1000, -1000, -1000, -1000, -1000, -1000, 1478, 1478, - -1000, -1000, -1000, -1000, -1000, 1004, -1000, -1000, -1000, -1000, - 1003, -1000, -1000, 996, -1000, -1000, 2334, 1993, 356, -1000, - -1000, 783, 1460, -1000, -1000, 2184, 783, 783, 44337, -1000, - -1000, 1592, 2280, 262, 45647, 846, 2017, -1000, 1965, 1965, - 1965, 45647, -1000, -1000, -1000, -1000, -1000, -1000, -445, 61, - 391, -1000, -1000, -1000, 4302, 44337, 1536, -1000, 229, -1000, - 1485, -1000, 44337, -1000, 1532, 1907, 1185, 1185, -1000, -1000, - -1000, 44337, 1826, -1000, -1000, -1000, -1000, 562, 2245, 260, - -1000, -1000, -214, -1000, -1000, 231, 229, 44992, 1185, 723, - -1000, -1000, -1000, -1000, -1000, -446, 1508, 546, 238, 301, - 45647, 45647, 45647, 45647, 45647, 598, -1000, -1000, 18, -1000, - -1000, 213, -1000, -1000, -1000, -1000, 213, -1000, -1000, -1000, - -1000, 279, 508, -1000, 45647, 45647, 625, -1000, -1000, -1000, - 895, -1000, -1000, 895, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 2222, 45647, 4, -410, - -1000, -400, 17480, -1000, -1000, -1000, -1000, 1138, 528, 1940, - 18135, 18135, 18135, -1000, -1000, -1000, 680, 680, 25997, -1000, - 17480, 16825, -1000, -1000, 17480, 17480, 834, -1000, 17480, 1263, - -1000, 17480, -1000, -1000, -1000, 1306, 1764, 1764, 1764, 1764, + 2123, 48736, 25, -399, -1000, -391, 20139, -1000, -1000, -1000, + -1000, 1326, 586, 1472, 20804, 20804, 20804, -1000, -1000, -1000, + 744, 744, 28786, -1000, 20139, 19474, -1000, -1000, 20139, 20139, + 857, -1000, 20139, 1057, -1000, 20139, -1000, -1000, -1000, 1317, + 1382, 1382, 1382, 1382, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, 1740, 20139, 20139, 20139, 1386, 335, + -1000, -1000, -1000, -1000, -1000, 2332, -1000, 20139, -1000, 28786, + 20139, 20139, 20139, -1000, -1000, -1000, 20139, 20139, -1000, -1000, + 20139, -1000, 20139, -1000, 20139, -1000, 20139, -1000, 20139, -1000, + 20139, -1000, 20139, -1000, 20139, -1000, 20139, 20139, -1000, 20139, + 20139, 20139, -1000, 20139, 20139, 20139, 20139, -1000, -1000, -1000, + -1000, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, 20139, + 20139, -1000, -1000, -1000, -1000, -1000, -1000, 20139, -1000, 34106, + 90, -178, 1112, 90, 1112, -1000, 19474, 14806, -1000, -1000, + -1000, -1000, -1000, 20139, 20139, 20139, 20139, 20139, 20139, -1000, + -1000, -1000, 20139, 20139, -1000, 20139, -1000, 20139, -1000, -1000, + -1000, -1000, -1000, 750, -1000, 709, 709, 709, 47406, -1000, + -1000, -1000, -1000, 1705, -1000, 2215, -1000, 1998, 1990, 2331, + 2310, -1000, 25461, 3012, -1000, -1000, 47406, -298, -1000, 2034, + 2079, 721, 721, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + 12122, 2229, 20139, 1910, 48071, 162, -1000, 24796, 47406, 48071, + 25461, 25461, 25461, 25461, 25461, -1000, 1943, 1932, -1000, 1935, + 1934, 2035, 48736, -1000, 1453, 1543, -1000, 20139, 27456, 1687, + 25461, -1000, -1000, 25461, 48736, 11451, -1000, -1000, 19, 6, + -1000, -1000, -1000, -1000, 1228, -1000, -1000, 2963, 2178, 2065, + -1000, -1000, -1000, -1000, -1000, 1539, -1000, 1535, 1704, 1525, + 1484, 219, -1000, 1842, 2111, 820, 820, -1000, 1105, -1000, + 1180, 1470, 1469, -1000, -1000, -1000, 601, -1000, 2155, 48736, + 1909, 1908, 1905, -1000, -445, 1096, 1815, 1804, 20139, 1814, + 2278, 1700, 47406, -1000, -1000, 48071, -1000, 262, -1000, 375, + 47406, -1000, -1000, -1000, 452, 48736, -1000, 9252, -1000, -1000, + -1000, 325, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 48736, + 389, -1000, 1813, 1162, -1000, -1000, 1865, -1000, -1000, -1000, + -1000, 267, 425, 1442, 242, 1436, 242, -1000, 48736, 689, + 1887, 48736, -1000, -1000, -1000, 934, 934, -1000, -1000, 2105, + -1000, 1180, 1382, 20804, 20804, -1000, 759, 319, -148, 1811, + 1811, -1000, 1811, 1812, -1000, 1811, 191, 1811, 190, 1811, + -1000, -1000, 1386, 1386, 1317, -1000, 2067, 1236, -1000, 1310, + 20139, 2354, -1000, -1000, -1000, -1000, -1000, -39, 2349, 2344, + 1382, -1000, 1810, 1798, 20139, 1382, 1386, 2060, 1382, 1382, + 1382, 1382, 2055, 2042, 2029, 2011, 1999, 1980, 1973, 1938, + -1000, 1310, 1317, 2335, 1317, 1382, 1382, 2323, 329, 1382, + 1452, 1452, 1452, 1452, 1452, 1317, 1317, 1317, 1317, 1382, + 47406, -1000, -178, -1000, -1000, -217, -218, -1000, 1386, -178, + 1703, 1386, -1000, 1901, 1837, 2312, 1799, 1382, 2307, 1382, + 1382, 1382, 1774, -1000, 2195, 2195, 2195, 1447, 1041, 48736, + -1000, -1000, -1000, -1000, 2310, 2303, 1702, -1000, -1000, 123, + 464, -1000, 2068, 2079, -1000, 2267, 2020, 2265, -1000, -1000, + -1000, -1000, -1000, 1310, -1000, 2144, 1680, -1000, 823, 1686, + -1000, -1000, 18809, 1450, 1987, 688, 1447, 1728, 2577, 1858, + 1904, 2943, -1000, -1000, -1000, -1000, 1926, -1000, 1925, -1000, + -1000, 1770, -1000, 2274, 466, 25461, 1725, 1725, -1000, 673, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, 980, 6042, 2355, + -1000, 1432, -1000, 1196, 212, 1073, -1000, -1000, 820, 820, + -1000, 922, 919, -1000, 48736, 1797, -1000, 367, 1422, 367, + 1068, -1000, -1000, 1067, -1000, -1000, -1000, -1000, 1834, 2015, + -1000, -1000, -1000, -1000, 48736, -1000, -1000, 48736, 48736, 48736, + 1785, 2261, -1000, 20139, 1783, 821, 2280, 47406, 47406, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - 1767, 17480, 17480, 17480, 1196, 318, -1000, -1000, -1000, -1000, - -1000, 2411, -1000, 17480, -1000, 25997, 17480, 17480, 17480, -1000, - -1000, -1000, 17480, 17480, -1000, -1000, 17480, 17480, -1000, 17480, - 17480, 17480, -1000, 17480, 17480, 17480, 17480, -1000, -1000, -1000, - -1000, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, 17480, - 17480, -1000, -1000, 17480, -1000, 31237, 73, -196, 1220, 73, - 1220, -1000, 16825, 11566, -1000, -1000, -1000, -1000, -1000, 17480, - 17480, 17480, 17480, 17480, 17480, -1000, -1000, -1000, 17480, 17480, - -1000, 17480, -1000, 17480, -1000, -1000, -1000, -1000, -1000, 701, - -1000, 667, 667, 667, 44337, -1000, -1000, -1000, -1000, 1700, - -1000, 2319, -1000, 2130, 2129, 2409, 2395, -1000, 22722, 2889, - -1000, -1000, 44337, -321, -1000, 2159, 2185, 689, 689, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 9583, 2353, 17480, 2016, - 44992, 140, -1000, 22067, 44337, 44992, 22722, 22722, 22722, 22722, - 22722, -1000, 2094, 2091, -1000, 2056, 2054, 2081, 45647, -1000, - 1477, 1505, -1000, 17480, 24687, 1694, 22722, -1000, -1000, 22722, - 45647, 8922, -1000, -1000, -19, -17, -1000, -1000, -1000, -1000, - 4406, -1000, -1000, 4117, 2295, 2175, -1000, -1000, -1000, -1000, - -1000, 1497, -1000, 1484, 1685, 1470, 1468, 192, -1000, 1933, - 2219, 783, 783, -1000, 994, -1000, 1185, 1455, 1448, -1000, - -1000, -1000, 519, -1000, 2264, 45647, 2013, 2012, 2007, -1000, - -459, 989, 1899, 1916, 17480, 1898, 2377, 1676, 44337, -1000, - -1000, 44992, -1000, 156, -1000, 356, 44337, -1000, -1000, -1000, - 329, 45647, -1000, 7920, -1000, -1000, -1000, 229, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 45647, 243, -1000, 1891, 1173, - -1000, -1000, 1869, -1000, -1000, -1000, -1000, 235, 303, 1440, - 209, 1438, 209, -1000, 45647, 555, 1993, 45647, -1000, -1000, - -1000, 911, 911, -1000, -1000, 2207, -1000, 1185, 1764, 18135, - 18135, -1000, 728, 566, -175, 1888, 1888, -1000, 1888, 1890, - -1000, 1888, 177, 1888, 162, 1888, -1000, -1000, 1196, 1196, - 1306, -1000, 2116, 1358, -1000, 1094, 17480, 2311, -1000, -1000, - -1000, -1000, -1000, -67, 2296, 2292, 1764, -1000, 1886, 1885, - 17480, 1764, 1196, 2052, 1764, 1764, 1764, 1764, -1000, 1094, - 1306, 2279, 1306, 1764, 1764, 2275, 310, 1764, 1465, 1465, - 1465, 1465, 1465, 1306, 1306, 1306, 1306, 1764, 44337, -1000, - -196, -1000, -1000, -233, -235, -1000, 1196, -196, 1678, 1196, - -1000, 2044, 2026, 2271, 2003, 1764, 2266, 1764, 1764, 1764, - 1983, -1000, 2328, 2328, 2328, 1453, 1172, 45647, -1000, -1000, - -1000, -1000, 2395, 2392, 1677, -1000, -1000, 90, 435, -1000, - 2151, 2185, -1000, 2376, 2145, 2375, -1000, -1000, -1000, -1000, - -1000, 1094, -1000, 2249, 1510, -1000, 806, 1655, -1000, -1000, - 16170, 1459, 2126, 621, 1453, 1729, 2543, 1999, 2005, 2086, - -1000, -1000, -1000, -1000, 2062, -1000, 2029, -1000, -1000, 1851, - -1000, 2214, 349, 22722, 1718, 1718, -1000, 605, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 926, 46225, 2450, -1000, 1435, - -1000, 1203, 212, 986, -1000, -1000, 783, 783, -1000, 884, - 871, -1000, 45647, 1883, -1000, 375, 1434, 375, 984, -1000, - -1000, 983, -1000, -1000, -1000, -1000, 1860, 2117, -1000, -1000, - -1000, -1000, 45647, -1000, -1000, 45647, 45647, 45647, 1876, 2374, - -1000, 17480, 1865, 786, 2205, 44337, 44337, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 495, 783, - -425, 282, 281, 783, 783, 783, -460, -1000, -1000, 1432, - 1417, -1000, -160, -1000, 17480, -1000, -1000, -1000, 1174, 1174, - 1400, 1397, 1338, -1000, 1851, -1000, -1000, -1000, 1454, -1000, - -1000, -148, 44337, 44337, 44337, 44337, -1000, -1000, 964, -1000, + 559, 820, -411, 414, 413, 820, 820, 820, -446, -1000, + -1000, 1440, 1430, -1000, -137, -1000, 20139, -1000, -1000, -1000, + 1123, 1123, 1412, 1395, 1383, -1000, 1770, -1000, -1000, -1000, + 1653, -1000, -1000, -122, 47406, 47406, 47406, 47406, -1000, -1000, + 1034, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 759, 1386, 333, -125, 1386, -1000, -1000, + 367, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, 20139, -1000, 20139, -1000, 1310, 20139, 2229, 1379, 20139, + 20139, -1000, 1061, 1058, 1382, -1000, -1000, -1000, 20139, -1000, + -1000, -1000, -1000, -1000, 20139, -1000, 20139, -1000, 20139, -1000, + 20139, -1000, 20139, -1000, 20139, -1000, 20139, -1000, 20139, -1000, + 20139, -1000, -1000, -1000, 20139, 220, 744, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1386, 459, + -1000, -1000, -1000, -1000, 2322, -1000, 1386, 20139, -1000, -1000, + 20139, -1000, 20139, 20139, -1000, 20139, -1000, 20139, -1000, -1000, + -1000, -1000, 20139, 1751, 2094, 1751, 1751, 27456, -1000, -1000, + 2303, 2282, 2256, 2009, 2014, 2014, 2068, -1000, 2255, 2253, + -1000, 1373, 2248, 1368, 893, -1000, 48071, 20139, 162, -1000, + 386, 47406, 162, 47406, -1000, 2275, -1000, -1000, 20139, 1780, + -1000, 20139, -1000, -1000, -1000, -1000, 6490, 2310, 1725, -1000, + -1000, 777, -1000, 20139, -1000, -1000, -1000, 99, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, 1292, 1286, -1000, -1000, + 1772, 20139, -1000, -1000, -1000, 1544, 1536, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 1770, -1000, -1000, -1000, -1000, + 452, -439, 2233, 47406, 1056, -1000, 1428, 1700, 432, 162, + 1283, 820, 820, 820, 1044, 1020, 32776, 1419, -1000, 47406, + 482, -1000, 452, -1000, -142, -145, 1382, -1000, -1000, 2174, + -1000, -1000, 14806, -1000, -1000, 1769, 1875, -1000, -1000, -1000, + -1000, 1968, -116, -130, -1000, -1000, 1382, 1382, 1529, 1386, + -1000, 1382, 1382, 1530, 1431, -1000, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1317, 1754, -1000, 220, 1386, + 1898, -1000, -1000, 6490, -1000, -1000, 2275, 2242, 90, -1000, + -1000, 353, 90, 1310, 1719, 1382, 1698, 1642, 1382, 1382, + 28121, -1000, 2234, 2231, 33441, 33441, 750, 2282, -187, 20139, + 20139, 2005, 1037, -1000, -1000, -1000, -1000, 1241, 1238, -1000, + 1232, -1000, 2351, -1000, 1310, -1000, 162, -1000, 664, 1686, + -1000, 2229, 1310, 47406, 1310, 97, 2275, -1000, 1382, -1000, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, 1751, + 1751, 1751, 1751, 1751, -1000, -1000, 47406, 1706, -1000, -1000, + 2169, 1391, 68, -1000, 1392, 1700, -1000, -1000, 159, -1000, + 20139, -1000, 32776, 1209, 1198, -1000, -1000, -1000, -1000, -446, + -1000, -1000, -1000, -1000, -1000, -1000, 385, 1691, -1000, 809, + 47406, 48736, -1000, 1942, -1000, -1000, -1000, 20139, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, 728, 1196, 312, -150, 1196, -1000, -1000, 375, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 17480, - -1000, 17480, -1000, 1094, 17480, 2353, 1313, 17480, 17480, -1000, - 980, 975, 1764, -1000, -1000, -1000, 17480, -1000, -1000, -1000, - -1000, -1000, 17480, -1000, -1000, -1000, 17480, 237, 680, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - 1196, 348, -1000, -1000, -1000, -1000, 2407, -1000, 1196, 17480, - -1000, -1000, 17480, -1000, 17480, 17480, -1000, 17480, -1000, 17480, - -1000, -1000, -1000, -1000, 17480, 1826, 2152, 1826, 1826, 24687, - -1000, -1000, 2392, 2388, 2372, 2136, 2139, 2139, 2151, -1000, - 2370, 2367, -1000, 1298, 2358, 1276, 868, -1000, 44992, 17480, - 140, -1000, 392, 44337, 140, 44337, -1000, 2384, -1000, -1000, - 17480, 1859, -1000, 17480, -1000, -1000, -1000, -1000, 7715, 2395, - 1718, -1000, -1000, 741, -1000, 17480, -1000, -1000, -1000, 3639, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1258, 1255, - -1000, -1000, 1854, 17480, -1000, -1000, -1000, 1359, 1337, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1851, -1000, -1000, - -1000, -1000, 329, -450, 2127, 44337, 972, -1000, 1413, 1676, - 319, 140, 1237, 783, 783, 783, 960, 957, 29927, 1388, - -1000, 44337, 436, -1000, 329, -1000, -166, -172, 1764, -1000, - -1000, 2290, -1000, -1000, 11566, -1000, -1000, 1850, 1962, -1000, - -1000, -1000, -1000, 2111, -135, -154, -1000, -1000, 1764, 1764, - 1591, 1196, -1000, 1764, 1764, 1311, 1296, -1000, 1764, 1306, - 1977, -1000, 237, 1196, 2004, -1000, -1000, 7715, -1000, -1000, - 2384, 2357, 73, -1000, -1000, 223, 73, 1094, 1958, 1764, - 1928, 1609, 1764, 1764, 25342, -1000, 2356, 2349, 30582, 30582, - 701, 2388, -204, 17480, 17480, 2134, 967, -1000, -1000, -1000, - -1000, 1234, 1232, -1000, 1225, -1000, 2448, -1000, 1094, -1000, - 140, -1000, 603, 1655, -1000, 2353, 1094, 44337, 1094, 76, - 2384, -1000, 1764, -1000, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826, - 1826, 1826, 1826, 1826, 1826, 1826, -1000, -1000, 44337, 2084, - -1000, -1000, 2285, 1379, 58, -1000, 1264, 1676, -1000, -1000, - 129, -1000, 17480, -1000, 29927, 1207, 1200, -1000, -1000, -1000, - -1000, -460, -1000, -1000, -1000, -1000, -1000, -1000, 369, 1661, - -1000, 782, 44337, 45647, -1000, 2099, -1000, -1000, -1000, 17480, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 17480, -1000, - 1196, 2002, -1000, -290, -1000, -426, 17480, -196, -1000, -1000, - -196, -1000, 17480, -1000, -1000, 17480, -1000, 17480, -1000, -1000, - 1377, -1000, -1000, -1000, -1000, -1000, 1377, 1377, -1000, -204, - -1000, 1659, -1000, 44337, 1094, 1652, -1000, 966, -1000, -1000, - -1000, -1000, -1000, 44992, 1655, 44337, -1000, 1356, 1196, 1826, - 2353, -1000, 1336, -1000, 369, -1000, 1842, 1916, -1000, -1000, - -1000, 15515, -1000, -1000, -1000, -1000, -1000, 172, -146, 11566, - 8261, 1318, -1000, -144, 1764, 1306, -1000, -390, -1000, -1000, - -1000, -1000, 163, -1000, -1000, 1652, -1000, -1000, 1567, 1393, - 1310, 29272, -1000, -1000, -1000, -1000, -204, -1000, -1000, 2281, - -1000, -1000, 1611, -1000, -1000, 24687, 43682, -1000, -123, 742, - -146, 17480, 1829, 1196, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -2, -1000, -1000, -1000, -1000, -1000, 1869, -157, - -1000, -1000, -1000, 178, -415, -225, -228, -1000, -1000, 18135, - -1000, 17480, -1000, 17480, -1000, 17480, -1000, -1000, -1000, 44337, - 1826, -1000, 1295, -1000, 6847, -245, 1987, -1000, -82, -1000, - -1000, -1000, 900, 1197, -1000, -1000, -1000, -1000, -1000, -1000, - 1944, 44337, -1000, 444, -1000, -1000, -148, -155, 849, -1000, - -1000, -1000, -1000, -1000, 1275, 1210, 1764, -1000, 44337, -1000, - 43682, -240, 723, 7715, -1000, 1985, 1972, 2416, -1000, -1000, - -1000, -1000, -1000, -1000, -463, 1252, 255, -1000, -1000, 178, - -1000, 17480, -1000, 17480, -1000, 1196, -1000, -1000, 2261, 76, - -1000, 2447, -1000, 2435, 690, 690, -1000, 956, -463, -1000, - -1000, 1764, 1764, -1000, -259, -1000, -1000, -1000, -1000, -1000, - 443, 1194, -1000, -1000, -1000, -1000, -1000, 7715, -1000, -1000, - -1000, 222, 222, -1000, -1000, + -1000, -1000, -1000, -1000, 20139, -1000, 1386, 1897, -1000, -279, + -1000, -419, 20139, -178, -1000, -1000, -178, -1000, 20139, -1000, + -1000, 20139, -1000, 20139, -1000, -1000, 1359, -1000, -1000, -1000, + -1000, -1000, 1359, 1359, -1000, -187, -1000, 1689, -1000, 47406, + 1310, 1685, -1000, 1036, -1000, -1000, -1000, -1000, -1000, 48071, + 1686, 47406, -1000, 1355, 1386, 1751, 2229, -1000, 1342, -1000, + 385, -1000, 1767, 1804, -1000, -1000, -1000, 18144, -1000, -1000, + -1000, -1000, -1000, 192, -120, 14806, 10780, 1327, -1000, -119, + 1382, 1317, -1000, -377, -1000, -1000, -1000, -1000, 260, -1000, + -1000, 1685, -1000, -1000, 1612, 1606, 1567, 32111, -1000, -1000, + -1000, -1000, -187, -1000, -1000, 2163, -1000, -1000, 1598, -1000, + -1000, 27456, 46741, -1000, -109, 299, -120, 20139, 1766, 1386, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 20, -1000, + -1000, 662, -1000, -1000, -1000, 1865, -126, -1000, -1000, -1000, + 232, -403, -215, -220, -1000, -1000, 20804, -1000, 20139, -1000, + 20139, -1000, 20139, -1000, -1000, -1000, 47406, 1751, -1000, 1299, + -1000, 3399, -233, 1896, -1000, -53, -1000, -1000, -1000, 977, + 1187, -1000, -1000, -1000, -1000, -1000, -1000, 1660, 47406, -1000, + 520, -1000, -1000, 14135, -122, -131, 877, -1000, -1000, -1000, + -1000, -1000, 1479, 1268, 1382, -1000, 47406, -1000, 46741, -226, + 755, 6490, -1000, 1895, 1879, 2316, -1000, -1000, -1000, -1000, + -1000, -1000, -452, 1270, 384, -1000, -1000, -1000, 232, -1000, + 20139, -1000, 20139, -1000, 1386, -1000, -1000, 2150, 97, -1000, + 2325, -1000, 2317, 710, 710, -1000, 1019, -452, -1000, -1000, + 1382, 1382, -1000, -240, -1000, -1000, -1000, -1000, -1000, 510, + 1072, -1000, -1000, -1000, -1000, -1000, 6490, -1000, -1000, -1000, + 218, 218, -1000, -1000, } var yyPgo = [...]int{ - 0, 3088, 3086, 34, 7, 38, 37, 3085, 47, 106, - 185, 43, 184, 104, 3084, 173, 3083, 3080, 3078, 3075, - 3073, 3072, 2519, 2466, 2465, 3069, 3067, 3065, 3058, 3057, - 3054, 3053, 3052, 3043, 3040, 175, 166, 182, 3038, 3032, - 3029, 119, 250, 92, 95, 251, 3026, 3025, 84, 3024, - 3018, 3014, 197, 196, 192, 846, 3013, 191, 117, 58, - 3012, 3011, 3008, 3004, 3001, 2999, 2997, 2996, 2994, 2993, - 2990, 2987, 2983, 2982, 2981, 2980, 2977, 329, 2974, 2972, - 24, 2970, 88, 2964, 2960, 2959, 2956, 2952, 10, 2951, - 2950, 20, 44, 2947, 2946, 56, 2945, 2942, 2941, 2937, - 2936, 21, 2935, 26, 2932, 41, 2931, 2926, 125, 2925, - 2918, 2916, 42, 2911, 2908, 2905, 2900, 2899, 2898, 2894, - 144, 2889, 2887, 2882, 172, 187, 2879, 2878, 162, 111, - 116, 2870, 2869, 109, 179, 2868, 121, 2867, 2866, 2864, - 147, 2863, 403, 2855, 2851, 75, 71, 2849, 30, 2847, - 2844, 12, 91, 72, 11, 4, 5, 2843, 2841, 73, - 87, 2840, 112, 2834, 2831, 107, 74, 2830, 108, 103, - 2819, 2811, 17, 9, 2810, 2, 6, 3, 78, 2804, - 2803, 126, 2802, 2798, 2796, 99, 2795, 2794, 4153, 2791, - 97, 136, 110, 86, 2784, 54, 70, 2783, 2781, 2776, - 2775, 2773, 57, 2769, 2768, 2765, 140, 55, 167, 2764, - 53, 76, 60, 137, 2763, 39, 98, 183, 169, 2759, - 2756, 143, 139, 2750, 2749, 68, 45, 48, 2744, 101, - 135, 120, 36, 100, 152, 2743, 2741, 65, 81, 2740, - 2739, 2738, 2737, 170, 2734, 2733, 80, 2732, 63, 2731, - 168, 2729, 16, 59, 2727, 49, 158, 2724, 82, 2717, - 2714, 77, 102, 79, 40, 2704, 154, 165, 130, 180, - 2701, 2699, 61, 2695, 2693, 2690, 181, 301, 2689, 2677, - 289, 174, 161, 146, 90, 2672, 307, 2669, 2661, 134, - 2919, 4586, 2660, 51, 156, 2658, 2655, 5064, 145, 52, - 25, 2654, 177, 2653, 2652, 2648, 2642, 186, 171, 220, - 164, 67, 2638, 2637, 2635, 18, 2634, 2631, 2629, 2628, - 2627, 2626, 94, 35, 33, 32, 189, 69, 14, 105, - 253, 151, 83, 2624, 2622, 2603, 123, 298, 2595, 160, - 159, 124, 133, 2594, 176, 223, 128, 2593, 453, 31, - 2590, 2589, 2586, 2575, 96, 2573, 2572, 2570, 2569, 155, - 149, 122, 93, 2568, 85, 118, 163, 153, 64, 2562, - 62, 2561, 2560, 28, 246, 27, 2558, 19, 113, 114, - 2552, 3908, 231, 2550, 22, 306, 157, 2549, 2545, 8, - 13, 15, 2541, 2538, 2534, 2532, 138, 2506, 2502, 2494, - 2493, 29, 66, 23, 1, 115, 89, 2488, 2484, 148, - 2479, 2478, 443, 0, 132, 2477, 194, + 0, 3018, 3009, 49, 7, 38, 37, 3006, 39, 107, + 204, 41, 198, 110, 3005, 179, 3004, 3002, 3001, 3000, + 2996, 2994, 2428, 2387, 2376, 2993, 2992, 2991, 2990, 2987, + 2986, 2983, 2982, 2981, 2980, 181, 173, 200, 2979, 2905, + 2887, 124, 190, 91, 93, 195, 2884, 2873, 77, 2872, + 2871, 2868, 192, 191, 187, 934, 2867, 183, 127, 66, + 2866, 2865, 2864, 2859, 2858, 2854, 2852, 2851, 2850, 2847, + 2846, 2845, 2844, 2841, 2839, 2838, 2836, 2835, 296, 2832, + 2831, 24, 2828, 79, 2826, 2824, 2823, 2822, 2821, 12, + 2820, 2819, 16, 45, 2817, 2816, 53, 2815, 2813, 2811, + 2808, 2806, 22, 2803, 29, 2797, 43, 2796, 2795, 134, + 2794, 2783, 2777, 47, 2754, 2752, 2735, 2734, 2733, 2732, + 2730, 150, 2726, 2716, 2712, 186, 206, 2711, 2710, 174, + 112, 118, 2709, 2708, 108, 197, 2707, 131, 2706, 2704, + 2703, 160, 2700, 1455, 2699, 2698, 87, 80, 2695, 28, + 2691, 2689, 10, 78, 72, 25, 4, 5, 2688, 2687, + 86, 81, 2686, 122, 2683, 2681, 109, 83, 2680, 102, + 114, 2678, 2677, 15, 9, 2676, 2, 6, 3, 126, + 2675, 2664, 121, 2659, 2652, 2649, 101, 2642, 2641, 3729, + 2640, 96, 145, 111, 73, 2635, 56, 140, 2633, 2630, + 2628, 2625, 2623, 60, 2621, 2620, 2619, 155, 61, 176, + 2618, 52, 70, 59, 141, 2617, 54, 99, 201, 175, + 2614, 2612, 151, 148, 2611, 2609, 67, 51, 50, 2608, + 105, 139, 130, 46, 100, 143, 2607, 2605, 64, 76, + 2603, 2602, 2600, 2586, 177, 2585, 2582, 71, 2580, 65, + 2579, 188, 2578, 19, 88, 2575, 55, 171, 2567, 98, + 2565, 2564, 103, 113, 74, 48, 2563, 165, 169, 136, + 170, 2560, 2559, 63, 2558, 2557, 2556, 199, 325, 2550, + 2544, 85, 180, 149, 159, 92, 2542, 331, 2541, 2540, + 20, 4782, 7148, 2539, 40, 172, 2538, 2537, 6949, 21, + 57, 32, 2536, 119, 2533, 2531, 2530, 2529, 218, 178, + 116, 168, 68, 2528, 2525, 2524, 18, 2516, 2513, 2509, + 2507, 2506, 2505, 104, 36, 35, 34, 202, 69, 14, + 106, 167, 162, 82, 2504, 2502, 2500, 133, 90, 2497, + 164, 163, 137, 166, 2494, 182, 152, 129, 2487, 95, + 33, 2482, 2480, 2478, 2475, 94, 2473, 2472, 2471, 2468, + 161, 153, 132, 84, 2466, 89, 128, 158, 156, 75, + 2463, 58, 2460, 2459, 31, 194, 30, 2458, 17, 117, + 115, 2456, 6449, 189, 2455, 23, 327, 157, 2452, 2450, + 8, 11, 13, 2443, 2441, 2440, 2435, 146, 2427, 2420, + 2418, 2412, 27, 62, 26, 1, 120, 97, 2406, 2402, + 154, 2398, 2392, 3487, 0, 138, 2386, 203, } -//line sql.y:7990 +//line sql.y:8126 type yySymType struct { union any empty struct{} @@ -7286,195 +7595,158 @@ func (st *yySymType) withUnion() *With { } var yyR1 = [...]int{ - 0, 410, 411, 411, 7, 7, 7, 7, 7, 7, + 0, 411, 412, 412, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 258, - 381, 382, 382, 256, 256, 33, 72, 35, 35, 34, - 34, 37, 37, 36, 8, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, - 11, 11, 11, 11, 13, 13, 13, 13, 13, 20, - 21, 12, 12, 22, 22, 106, 106, 23, 24, 24, - 24, 24, 414, 414, 183, 183, 181, 181, 182, 182, - 261, 261, 25, 265, 265, 267, 267, 267, 267, 257, - 257, 257, 26, 26, 266, 266, 268, 268, 268, 271, - 271, 271, 271, 310, 310, 310, 27, 27, 27, 27, - 27, 126, 126, 384, 384, 383, 377, 377, 376, 376, - 375, 380, 380, 379, 379, 378, 39, 40, 49, 49, - 49, 49, 50, 51, 385, 385, 350, 56, 56, 55, - 55, 55, 55, 55, 55, 57, 57, 53, 53, 52, - 52, 54, 54, 352, 352, 338, 338, 351, 351, 351, - 351, 351, 351, 351, 337, 337, 137, 137, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 400, 400, 400, 399, 399, - 236, 236, 236, 236, 236, 236, 236, 236, 147, 147, - 159, 159, 159, 159, 159, 145, 145, 146, 144, 144, - 144, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 158, 158, 154, 154, 154, 155, 155, 155, 156, 156, - 401, 401, 401, 401, 315, 315, 315, 315, 318, 318, - 316, 316, 316, 316, 316, 316, 316, 316, 316, 317, - 317, 317, 317, 317, 317, 317, 319, 319, 319, 319, - 319, 320, 320, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 321, 321, 321, - 321, 321, 321, 321, 321, 336, 336, 322, 322, 330, - 330, 331, 331, 332, 332, 332, 333, 333, 333, 334, - 334, 327, 327, 327, 327, 327, 327, 327, 327, 327, - 329, 329, 328, 328, 328, 339, 364, 364, 363, 363, - 361, 361, 361, 361, 361, 361, 361, 361, 348, 348, - 358, 358, 358, 358, 358, 347, 347, 343, 343, 343, - 344, 344, 345, 345, 342, 342, 346, 346, 360, 360, - 359, 359, 340, 340, 341, 341, 366, 402, 402, 402, - 402, 402, 403, 403, 367, 392, 394, 394, 394, 393, - 393, 390, 391, 389, 389, 389, 389, 389, 82, 82, - 82, 284, 284, 285, 285, 356, 356, 355, 355, 355, - 357, 357, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 279, 279, 279, 388, 388, 388, 388, - 388, 388, 387, 387, 387, 353, 353, 353, 386, 386, - 58, 58, 216, 216, 405, 405, 406, 406, 406, 46, - 46, 46, 46, 46, 46, 45, 45, 45, 41, 41, + 259, 382, 383, 383, 257, 257, 33, 73, 35, 35, + 34, 34, 37, 37, 36, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 13, 13, 13, 13, 13, + 20, 21, 12, 12, 22, 22, 107, 107, 23, 24, + 24, 24, 24, 415, 415, 184, 184, 182, 182, 183, + 183, 262, 262, 25, 266, 266, 268, 268, 268, 268, + 258, 258, 258, 26, 26, 267, 267, 269, 269, 269, + 272, 272, 272, 272, 311, 311, 311, 27, 27, 27, + 27, 27, 127, 127, 385, 385, 384, 378, 378, 377, + 377, 376, 381, 381, 380, 380, 379, 39, 40, 49, + 49, 49, 49, 50, 51, 386, 386, 351, 56, 56, + 55, 55, 55, 55, 55, 55, 57, 57, 53, 53, + 52, 52, 54, 54, 353, 353, 339, 339, 352, 352, + 352, 352, 352, 352, 352, 338, 338, 138, 138, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 401, 401, 401, 400, + 400, 237, 237, 237, 237, 237, 237, 237, 237, 148, + 148, 160, 160, 160, 160, 160, 146, 146, 147, 145, + 145, 145, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 159, 159, 155, 155, 155, 156, 156, 156, 157, + 157, 402, 402, 402, 402, 316, 316, 316, 316, 319, + 319, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 318, 318, 318, 318, 318, 318, 318, 320, 320, 320, + 320, 320, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 322, 322, + 322, 322, 322, 322, 322, 322, 337, 337, 323, 323, + 331, 331, 332, 332, 333, 333, 333, 334, 334, 334, + 335, 335, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 330, 330, 329, 329, 329, 340, 365, 365, 364, + 364, 362, 362, 362, 362, 362, 362, 362, 362, 349, + 349, 359, 359, 359, 359, 359, 348, 348, 344, 344, + 344, 345, 345, 346, 346, 343, 343, 347, 347, 361, + 361, 360, 360, 341, 341, 342, 342, 367, 403, 403, + 403, 403, 403, 404, 404, 368, 393, 395, 395, 395, + 394, 394, 391, 392, 390, 390, 390, 390, 390, 83, + 83, 83, 285, 285, 286, 286, 357, 357, 356, 356, + 356, 358, 358, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 280, 280, 280, 389, 389, 389, + 389, 389, 389, 388, 388, 388, 354, 354, 354, 354, + 387, 387, 58, 58, 217, 217, 406, 406, 407, 407, + 407, 46, 46, 46, 46, 46, 46, 45, 45, 45, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 47, - 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 47, 47, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 108, - 108, 109, 109, 109, 109, 111, 111, 111, 369, 369, - 59, 59, 3, 3, 171, 173, 174, 174, 172, 172, - 172, 172, 172, 172, 61, 61, 60, 60, 176, 175, - 177, 177, 177, 1, 1, 2, 2, 4, 4, 374, - 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, - 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, - 374, 335, 335, 335, 368, 368, 370, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 114, 113, 113, - 112, 115, 115, 115, 115, 115, 115, 115, 115, 372, - 372, 372, 62, 62, 373, 323, 324, 325, 5, 6, - 349, 371, 122, 122, 29, 38, 38, 30, 30, 30, - 30, 31, 31, 63, 64, 64, 64, 64, 64, 64, + 28, 109, 109, 110, 110, 110, 110, 112, 112, 112, + 370, 370, 59, 59, 3, 3, 172, 174, 175, 175, + 173, 173, 173, 173, 173, 173, 61, 61, 60, 60, + 177, 176, 178, 178, 178, 1, 1, 2, 2, 4, + 4, 375, 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 375, 336, 336, 336, 369, 369, 371, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 115, + 114, 114, 113, 116, 116, 116, 116, 116, 116, 116, + 116, 373, 373, 373, 62, 62, 374, 324, 325, 326, + 5, 6, 350, 372, 123, 123, 29, 38, 38, 30, + 30, 30, 30, 31, 31, 63, 66, 66, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 278, 278, 287, 287, - 277, 277, 302, 302, 302, 280, 280, 280, 281, 281, - 398, 398, 398, 274, 274, 65, 65, 65, 303, 303, - 303, 303, 67, 67, 407, 407, 408, 408, 409, 409, - 409, 68, 69, 69, 305, 305, 306, 306, 70, 71, - 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, - 84, 107, 107, 107, 15, 15, 15, 15, 79, 79, - 79, 14, 14, 17, 66, 66, 73, 395, 395, 396, - 397, 397, 397, 397, 74, 76, 32, 32, 32, 32, - 32, 32, 132, 132, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 127, 127, 127, 121, - 121, 415, 77, 78, 78, 125, 125, 125, 118, 118, - 118, 124, 124, 124, 16, 16, 18, 260, 260, 19, - 19, 129, 129, 131, 131, 131, 131, 131, 133, 133, - 133, 133, 133, 133, 133, 128, 128, 130, 130, 130, - 130, 295, 295, 295, 294, 294, 165, 165, 167, 166, - 166, 168, 168, 169, 169, 169, 169, 214, 214, 191, - 191, 253, 253, 254, 254, 252, 252, 259, 259, 255, - 255, 255, 255, 262, 262, 170, 170, 170, 170, 178, - 178, 179, 179, 180, 180, 304, 304, 300, 300, 300, - 299, 299, 184, 184, 184, 186, 185, 185, 185, 185, - 187, 187, 189, 189, 188, 188, 190, 195, 195, 194, - 194, 192, 192, 192, 192, 193, 193, 193, 193, 196, - 196, 142, 142, 142, 142, 142, 142, 142, 157, 157, - 157, 157, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 243, 243, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 151, 219, 219, 218, 218, 85, 85, - 85, 86, 86, 87, 87, 87, 87, 87, 88, 88, - 88, 88, 88, 143, 143, 90, 90, 89, 89, 209, - 209, 292, 292, 91, 92, 92, 95, 95, 94, 93, - 93, 99, 99, 96, 96, 98, 98, 97, 100, 100, - 101, 102, 102, 275, 275, 197, 197, 205, 205, 205, - 205, 198, 198, 198, 198, 198, 198, 198, 206, 206, - 206, 213, 207, 207, 203, 203, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 162, 162, 162, 162, 224, 224, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 279, 279, 288, 288, 278, 278, 303, 303, 303, 281, + 281, 281, 282, 282, 399, 399, 399, 275, 275, 65, + 65, 65, 304, 304, 304, 304, 68, 68, 408, 408, + 409, 409, 410, 410, 410, 69, 70, 70, 306, 306, + 307, 307, 71, 72, 84, 84, 84, 84, 84, 84, + 84, 85, 85, 85, 85, 108, 108, 108, 15, 15, + 15, 15, 80, 80, 80, 14, 14, 17, 67, 67, + 74, 396, 396, 397, 398, 398, 398, 398, 75, 77, + 32, 32, 32, 32, 32, 32, 133, 133, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 128, 128, 128, 122, 122, 416, 78, 79, 79, 126, + 126, 126, 119, 119, 119, 125, 125, 125, 16, 16, + 18, 261, 261, 19, 19, 130, 130, 132, 132, 132, + 132, 132, 134, 134, 134, 134, 134, 134, 134, 129, + 129, 131, 131, 131, 131, 296, 296, 296, 295, 295, + 166, 166, 168, 167, 167, 169, 169, 170, 170, 170, + 170, 215, 215, 192, 192, 254, 254, 255, 255, 253, + 253, 260, 260, 256, 256, 256, 256, 263, 263, 171, + 171, 171, 171, 179, 179, 180, 180, 181, 181, 305, + 305, 301, 301, 301, 300, 300, 185, 185, 185, 187, + 186, 186, 186, 186, 188, 188, 190, 190, 189, 189, + 191, 196, 196, 195, 195, 193, 193, 193, 193, 194, + 194, 194, 194, 197, 197, 143, 143, 143, 143, 143, + 143, 143, 158, 158, 158, 158, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 244, 244, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 150, 150, 163, 163, 163, - 163, 164, 164, 164, 164, 164, 164, 164, 312, 312, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 416, 416, 326, 326, 326, 326, 204, 204, 204, - 204, 204, 123, 123, 123, 123, 123, 309, 309, 309, - 313, 313, 313, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 314, 314, - 222, 222, 119, 119, 220, 220, 221, 223, 223, 215, - 215, 215, 215, 217, 217, 200, 200, 200, 225, 225, - 226, 226, 103, 104, 104, 105, 105, 227, 227, 229, - 228, 228, 230, 231, 231, 231, 232, 232, 233, 233, - 233, 48, 48, 48, 48, 48, 43, 43, 43, 43, - 44, 44, 44, 44, 134, 134, 134, 134, 136, 136, - 135, 135, 80, 80, 81, 81, 81, 140, 140, 141, - 141, 141, 138, 138, 139, 139, 250, 250, 234, 234, - 234, 241, 241, 241, 237, 237, 239, 239, 239, 240, - 240, 240, 238, 247, 247, 249, 249, 248, 248, 244, - 244, 245, 245, 246, 246, 246, 242, 242, 199, 199, - 199, 199, 199, 251, 251, 251, 251, 263, 263, 210, - 210, 212, 212, 211, 211, 161, 264, 264, 272, 269, - 269, 270, 270, 296, 296, 296, 273, 273, 286, 286, - 282, 282, 283, 283, 276, 276, 288, 288, 288, 75, - 208, 208, 365, 365, 362, 291, 291, 293, 293, 297, - 297, 301, 301, 298, 298, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 149, 149, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 152, 220, 220, + 219, 219, 86, 86, 86, 87, 87, 88, 88, 88, + 88, 88, 89, 89, 89, 89, 89, 144, 144, 91, + 91, 90, 90, 210, 210, 293, 293, 92, 93, 93, + 96, 96, 95, 94, 94, 100, 100, 97, 97, 99, + 99, 98, 101, 101, 102, 103, 103, 276, 276, 198, + 198, 206, 206, 206, 206, 199, 199, 199, 199, 199, + 199, 199, 207, 207, 207, 214, 208, 208, 204, 204, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 163, 163, 163, 163, + 225, 225, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 151, 151, 164, + 164, 164, 164, 165, 165, 165, 165, 165, 165, 165, + 313, 313, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 417, 417, 327, 327, 327, 327, 205, + 205, 205, 205, 205, 124, 124, 124, 124, 124, 310, + 310, 310, 314, 314, 314, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 315, 315, 223, 223, 120, 120, 221, 221, 222, 224, + 224, 216, 216, 216, 216, 218, 218, 201, 201, 201, + 226, 226, 227, 227, 104, 105, 105, 106, 106, 228, + 228, 230, 229, 229, 231, 232, 232, 232, 233, 233, + 234, 234, 234, 48, 48, 48, 48, 48, 43, 43, + 43, 43, 44, 44, 44, 44, 135, 135, 135, 135, + 137, 137, 136, 136, 81, 81, 82, 82, 82, 141, + 141, 142, 142, 142, 139, 139, 140, 140, 251, 251, + 235, 235, 235, 242, 242, 242, 238, 238, 240, 240, + 240, 241, 241, 241, 239, 248, 248, 250, 250, 249, + 249, 245, 245, 246, 246, 247, 247, 247, 243, 243, + 200, 200, 200, 200, 200, 252, 252, 252, 252, 264, + 264, 211, 211, 213, 213, 212, 212, 162, 265, 265, + 273, 270, 270, 271, 271, 297, 297, 297, 274, 274, + 287, 287, 283, 283, 284, 284, 277, 277, 289, 289, + 289, 76, 209, 209, 366, 366, 363, 292, 292, 294, + 294, 298, 298, 302, 302, 299, 299, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, @@ -7489,159 +7761,205 @@ var yyR1 = [...]int{ 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 412, 413, 307, 308, 308, 308, + 290, 290, 290, 290, 290, 290, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 413, 414, 308, 309, + 309, 309, } var yyR2 = [...]int{ 0, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 0, 1, 1, 1, 2, 3, 2, 3, 0, - 1, 3, 1, 4, 3, 3, 4, 3, 2, 3, - 4, 3, 4, 2, 7, 1, 3, 3, 3, 3, - 1, 2, 1, 1, 3, 2, 3, 3, 2, 5, - 7, 10, 9, 7, 8, 1, 1, 10, 11, 9, - 8, 8, 1, 1, 1, 3, 1, 3, 1, 3, - 0, 4, 3, 1, 3, 3, 3, 3, 3, 1, - 1, 2, 5, 4, 1, 3, 3, 2, 2, 2, - 2, 2, 1, 1, 1, 1, 2, 2, 6, 12, - 2, 0, 2, 0, 2, 1, 0, 2, 1, 3, - 3, 0, 1, 1, 3, 3, 6, 4, 7, 8, - 8, 8, 6, 3, 1, 1, 5, 0, 1, 1, - 1, 1, 2, 2, 2, 0, 1, 4, 4, 4, - 4, 4, 4, 2, 4, 1, 3, 1, 1, 3, - 4, 3, 3, 3, 5, 10, 0, 2, 0, 2, - 3, 5, 3, 4, 2, 3, 2, 3, 3, 3, - 3, 2, 2, 4, 4, 1, 1, 1, 1, 1, - 0, 2, 2, 3, 3, 2, 2, 2, 1, 1, - 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 0, 1, 1, 1, 2, 3, 2, 3, + 0, 1, 3, 1, 4, 3, 3, 4, 3, 2, + 3, 4, 3, 4, 2, 7, 1, 3, 3, 3, + 3, 1, 2, 1, 1, 3, 2, 3, 3, 2, + 5, 7, 10, 9, 7, 8, 1, 1, 10, 11, + 9, 8, 8, 1, 1, 1, 3, 1, 3, 1, + 3, 0, 4, 3, 1, 3, 3, 3, 3, 3, + 1, 1, 2, 5, 4, 1, 3, 3, 2, 2, + 2, 2, 2, 1, 1, 1, 1, 2, 2, 6, + 12, 2, 0, 2, 0, 2, 1, 0, 2, 1, + 3, 3, 0, 1, 1, 3, 3, 6, 4, 7, + 8, 8, 8, 6, 3, 1, 1, 5, 0, 1, + 1, 1, 1, 2, 2, 2, 0, 1, 4, 4, + 4, 4, 4, 4, 2, 4, 1, 3, 1, 1, + 3, 4, 3, 3, 3, 5, 10, 0, 2, 0, + 2, 3, 5, 3, 4, 2, 3, 2, 3, 3, + 3, 3, 2, 2, 4, 4, 1, 1, 1, 1, + 1, 0, 2, 2, 3, 3, 2, 2, 2, 1, + 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 2, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, - 2, 1, 2, 1, 3, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, - 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 0, 3, 0, - 5, 1, 3, 0, 3, 5, 0, 1, 1, 0, - 1, 0, 3, 3, 2, 2, 2, 1, 2, 2, - 0, 1, 0, 2, 2, 5, 0, 1, 1, 2, - 1, 3, 2, 1, 1, 3, 3, 3, 0, 1, - 4, 3, 3, 4, 2, 0, 2, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, - 3, 4, 3, 1, 3, 1, 7, 6, 7, 7, - 8, 8, 0, 1, 5, 2, 1, 1, 1, 0, - 1, 3, 3, 1, 1, 2, 2, 2, 0, 1, - 1, 1, 2, 0, 1, 0, 1, 1, 3, 2, - 1, 2, 3, 3, 3, 4, 4, 3, 3, 3, - 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, + 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 5, 5, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 0, 3, + 0, 5, 1, 3, 0, 3, 5, 0, 1, 1, + 0, 1, 0, 3, 3, 2, 2, 2, 1, 2, + 2, 0, 1, 0, 2, 2, 5, 0, 1, 1, + 2, 1, 3, 2, 1, 1, 3, 3, 3, 0, + 1, 4, 3, 3, 4, 2, 0, 2, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 3, 3, 4, 3, 1, 3, 1, 7, 6, 7, + 7, 8, 8, 0, 1, 5, 2, 1, 1, 1, + 0, 1, 3, 3, 1, 1, 2, 2, 2, 0, + 1, 1, 1, 2, 0, 1, 0, 1, 1, 3, + 2, 1, 2, 3, 3, 3, 4, 4, 3, 3, + 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 4, 5, 0, 2, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 0, 1, 0, 2, 0, 2, 0, 2, 2, 0, - 1, 5, 1, 3, 7, 1, 3, 3, 1, 2, - 2, 2, 5, 5, 5, 6, 8, 5, 5, 4, - 4, 4, 6, 5, 5, 5, 2, 2, 2, 2, - 3, 3, 3, 4, 3, 3, 1, 3, 5, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 3, 4, 4, 2, 11, 3, 6, 8, 6, - 6, 6, 13, 8, 6, 10, 5, 5, 5, 7, - 5, 5, 5, 5, 5, 7, 7, 5, 5, 0, - 6, 5, 6, 4, 5, 0, 8, 9, 0, 3, - 0, 1, 0, 3, 8, 4, 1, 3, 3, 6, - 7, 7, 8, 4, 0, 1, 0, 1, 3, 3, - 1, 1, 2, 1, 1, 0, 2, 0, 2, 5, - 3, 7, 4, 4, 4, 4, 3, 3, 3, 7, + 3, 3, 4, 5, 0, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, + 2, 0, 1, 5, 1, 3, 7, 1, 3, 3, + 1, 2, 2, 2, 5, 5, 5, 6, 8, 5, + 5, 4, 4, 4, 6, 5, 5, 5, 2, 2, + 2, 2, 3, 3, 3, 4, 3, 3, 1, 3, + 5, 1, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 2, 3, 4, 4, 2, 11, 3, 6, + 8, 6, 6, 6, 13, 8, 6, 10, 5, 5, + 5, 7, 5, 5, 5, 5, 5, 7, 7, 5, + 5, 0, 6, 5, 6, 4, 5, 0, 8, 9, + 0, 3, 0, 1, 0, 3, 8, 4, 1, 3, + 3, 6, 7, 7, 8, 4, 0, 1, 0, 1, + 3, 3, 1, 1, 2, 1, 1, 0, 2, 0, + 2, 5, 3, 7, 4, 4, 4, 4, 3, 3, + 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 0, 2, 2, 1, 3, 2, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, + 1, 3, 3, 0, 2, 2, 2, 2, 2, 2, + 2, 4, 4, 3, 0, 1, 4, 3, 4, 4, + 3, 3, 3, 2, 1, 3, 3, 3, 5, 7, + 7, 6, 5, 3, 2, 3, 5, 5, 3, 3, + 7, 3, 3, 3, 3, 4, 7, 5, 2, 4, + 4, 4, 4, 4, 5, 5, 4, 4, 4, 4, + 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, + 4, 2, 3, 3, 3, 3, 5, 2, 3, 3, + 2, 3, 4, 4, 4, 3, 4, 4, 5, 3, + 0, 1, 0, 1, 1, 1, 0, 2, 2, 0, + 2, 2, 0, 2, 0, 1, 1, 1, 1, 2, + 1, 3, 1, 1, 1, 1, 1, 3, 0, 1, + 1, 3, 3, 2, 2, 1, 1, 5, 0, 1, + 0, 1, 2, 3, 0, 3, 3, 3, 3, 3, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 4, 4, 4, 2, 2, + 3, 1, 3, 2, 1, 2, 1, 2, 2, 4, + 3, 3, 6, 4, 7, 6, 1, 3, 2, 2, + 2, 2, 1, 1, 1, 3, 2, 1, 1, 1, + 0, 1, 1, 0, 3, 0, 2, 0, 2, 1, + 2, 2, 0, 1, 1, 0, 1, 1, 5, 5, + 4, 0, 2, 4, 4, 0, 1, 0, 1, 2, + 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 1, 2, 3, 5, 0, 1, 2, 1, 1, + 0, 1, 2, 1, 3, 1, 1, 1, 4, 3, + 1, 1, 2, 3, 7, 0, 3, 0, 1, 1, + 3, 1, 3, 1, 1, 3, 3, 1, 3, 4, + 4, 4, 3, 2, 4, 0, 1, 0, 2, 0, + 1, 0, 1, 2, 1, 1, 1, 2, 2, 1, + 2, 3, 2, 3, 2, 2, 2, 1, 1, 3, + 3, 0, 1, 1, 2, 6, 5, 6, 6, 0, + 2, 3, 3, 0, 2, 3, 3, 3, 2, 3, + 1, 6, 3, 4, 3, 1, 3, 4, 5, 6, + 3, 4, 5, 6, 3, 4, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 0, 2, 2, 1, 3, 2, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 3, 1, 3, - 3, 0, 2, 2, 2, 2, 2, 2, 2, 4, - 4, 3, 0, 1, 4, 3, 4, 4, 3, 3, - 3, 2, 1, 3, 3, 3, 5, 7, 7, 6, - 5, 3, 2, 3, 3, 3, 7, 3, 3, 3, - 3, 4, 7, 5, 2, 4, 4, 4, 4, 4, - 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 4, 4, 4, 4, 4, 2, 3, 3, - 3, 3, 5, 2, 3, 3, 2, 3, 4, 4, - 4, 3, 4, 4, 5, 3, 0, 1, 0, 1, - 1, 1, 0, 2, 2, 0, 2, 2, 0, 2, - 0, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 1, 1, 1, 3, 0, 1, 1, 3, 3, 2, - 2, 1, 1, 5, 0, 1, 0, 1, 2, 3, - 0, 3, 3, 3, 3, 3, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 4, 4, 4, 2, 2, 3, 1, 3, 2, - 1, 2, 1, 2, 2, 4, 3, 3, 6, 4, - 7, 6, 1, 3, 2, 2, 2, 2, 1, 1, - 1, 3, 2, 1, 1, 1, 0, 1, 1, 0, - 3, 0, 2, 0, 2, 1, 2, 2, 0, 1, - 1, 0, 1, 1, 5, 5, 4, 0, 2, 4, - 4, 0, 1, 0, 1, 2, 3, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 2, 3, - 5, 0, 1, 2, 1, 1, 0, 1, 2, 1, - 3, 1, 1, 1, 4, 3, 1, 1, 2, 3, - 7, 0, 3, 0, 1, 1, 3, 1, 3, 1, - 1, 3, 3, 1, 3, 4, 4, 4, 3, 2, - 4, 0, 1, 0, 2, 0, 1, 0, 1, 2, - 1, 1, 1, 2, 2, 1, 2, 3, 2, 3, - 2, 2, 2, 1, 1, 3, 3, 0, 1, 1, - 2, 6, 5, 6, 6, 0, 2, 3, 3, 0, - 2, 3, 3, 3, 2, 3, 1, 6, 3, 4, - 3, 1, 3, 4, 5, 6, 3, 4, 5, 6, - 3, 4, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 2, 2, 2, 2, - 1, 1, 2, 7, 7, 6, 6, 2, 2, 1, - 6, 3, 3, 3, 1, 3, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 2, 1, 1, 0, 1, 2, 5, 0, - 3, 0, 1, 4, 4, 2, 0, 1, 1, 2, - 2, 1, 1, 2, 2, 0, 1, 1, 1, 1, - 5, 1, 3, 0, 3, 1, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 4, 6, 4, 4, 8, 6, - 8, 6, 5, 4, 10, 2, 2, 1, 2, 2, - 2, 4, 5, 5, 5, 5, 5, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, - 6, 5, 4, 4, 4, 4, 4, 7, 4, 4, - 6, 6, 6, 8, 6, 6, 4, 4, 3, 4, - 6, 6, 4, 4, 4, 6, 8, 6, 4, 6, - 6, 8, 10, 7, 8, 8, 9, 4, 4, 4, - 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 4, 4, 6, 4, 6, 5, 9, 6, 9, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, - 6, 8, 10, 12, 14, 6, 8, 8, 10, 12, - 14, 6, 8, 10, 12, 6, 8, 4, 4, 3, - 4, 6, 6, 4, 6, 4, 6, 8, 0, 2, + 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 2, 2, 2, 2, 1, 1, 2, 7, 7, 6, + 6, 2, 2, 1, 6, 3, 3, 3, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, + 1, 2, 5, 0, 3, 0, 1, 4, 4, 2, + 0, 1, 1, 2, 2, 1, 1, 2, 2, 0, + 1, 1, 1, 1, 5, 1, 3, 0, 3, 1, + 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 4, 6, + 4, 4, 8, 6, 8, 6, 5, 4, 10, 2, + 2, 1, 2, 2, 2, 4, 5, 5, 5, 5, + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 8, 8, 8, 6, 5, 4, 4, 4, 4, + 4, 7, 4, 4, 6, 6, 6, 8, 6, 6, + 4, 4, 3, 4, 6, 6, 4, 4, 6, 8, + 4, 6, 8, 4, 6, 8, 4, 6, 8, 4, + 6, 8, 4, 6, 8, 4, 6, 8, 4, 6, + 8, 4, 4, 6, 8, 6, 4, 6, 6, 8, + 10, 7, 8, 8, 9, 4, 4, 4, 4, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, + 4, 4, 4, 4, 4, 6, 4, 6, 5, 9, + 6, 9, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 2, 6, 8, 10, 12, 14, 6, 8, 8, + 10, 12, 14, 6, 8, 10, 12, 6, 8, 4, + 4, 3, 4, 6, 6, 4, 6, 4, 6, 8, + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 0, 2, 3, 3, 4, + 4, 4, 4, 4, 0, 3, 4, 7, 3, 1, + 1, 1, 0, 5, 5, 2, 3, 1, 2, 2, + 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, + 0, 1, 0, 1, 0, 2, 1, 2, 4, 0, + 2, 1, 1, 3, 5, 1, 1, 1, 2, 2, + 0, 3, 0, 2, 2, 1, 3, 0, 1, 0, + 1, 3, 1, 3, 2, 0, 1, 1, 0, 1, + 2, 4, 4, 0, 2, 2, 1, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, + 0, 3, 1, 1, 0, 4, 0, 1, 1, 0, + 3, 1, 3, 2, 1, 1, 0, 1, 2, 4, + 9, 3, 5, 0, 3, 3, 0, 1, 0, 2, + 2, 0, 2, 2, 2, 0, 2, 1, 2, 3, + 3, 0, 2, 1, 2, 3, 4, 3, 0, 1, + 2, 1, 5, 4, 4, 1, 3, 3, 5, 0, + 5, 1, 3, 1, 2, 3, 4, 1, 1, 3, + 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 2, 0, 3, 0, 1, 0, 1, + 1, 5, 0, 1, 0, 1, 2, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 2, 0, 2, 3, 3, 4, 4, 4, - 4, 4, 0, 3, 4, 7, 3, 1, 1, 1, - 0, 5, 5, 2, 3, 1, 2, 2, 1, 2, - 1, 2, 2, 1, 2, 2, 1, 1, 0, 1, - 0, 1, 0, 2, 1, 2, 4, 0, 2, 1, - 1, 3, 5, 1, 1, 1, 2, 2, 0, 3, - 0, 2, 2, 1, 3, 0, 1, 0, 1, 3, - 1, 3, 2, 0, 1, 1, 0, 1, 2, 4, - 4, 0, 2, 2, 1, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 0, 3, 3, 3, 0, 3, - 1, 1, 0, 4, 0, 1, 1, 0, 3, 1, - 3, 2, 1, 1, 0, 1, 2, 4, 9, 3, - 5, 0, 3, 3, 0, 1, 0, 2, 2, 0, - 2, 2, 2, 0, 2, 1, 2, 3, 3, 0, - 2, 1, 2, 3, 4, 3, 0, 1, 2, 1, - 5, 4, 4, 1, 3, 3, 5, 0, 5, 1, - 3, 1, 2, 3, 4, 1, 1, 3, 3, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 0, 2, 0, 3, 0, 1, 0, 1, 1, 5, - 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -7696,394 +8014,405 @@ var yyR2 = [...]int{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 1, 1, } var yyChk = [...]int{ - -1000, -410, -77, -415, -7, -11, -20, -21, -22, -23, - -24, -25, -26, -27, -28, -29, -30, -31, -63, -64, - -65, -67, -68, -69, -70, -71, -14, -17, -66, -32, - -33, -72, -73, -74, -75, -76, -16, -18, -19, -9, - -8, -13, 10, 11, -106, -34, 33, -39, -49, 225, - -50, -40, 226, -51, 228, 227, 265, 229, 258, 75, - 313, 314, 316, 317, 318, 319, -107, 617, 263, 264, - 231, 37, 46, 34, 35, 38, 235, 271, 272, 234, - -10, -35, 9, -412, 12, 449, 260, 259, 29, -12, - 511, 87, -78, -411, 665, -250, -234, 23, 34, 30, - -233, -229, -125, -234, 21, 19, 8, -77, -77, -77, - 13, 14, -77, -350, -352, 87, 159, 87, -77, -56, - -55, -53, -52, -54, -57, 32, -46, -47, -374, -45, - -42, 230, 227, 275, 123, 124, 265, 266, 267, 229, - 249, 264, 268, 263, 284, -41, 82, 34, 511, 514, - -357, 226, 232, 233, 228, 450, 126, 125, 76, -354, - 372, 544, 635, -57, 637, 101, 104, 636, 45, 239, - 638, 639, 640, 551, 641, 248, 642, 643, 644, 645, - 651, 592, 652, 653, 654, 127, 8, -77, -301, -297, - 91, -290, 508, 251, 542, 543, 300, 82, 42, 517, - 369, 372, 544, 479, 635, 313, 329, 323, 484, 485, - 486, 352, 344, 509, 545, 518, 303, 252, 288, 629, - 342, 135, 637, 307, 546, 266, 377, 378, 547, 379, - 101, 316, 416, 650, 306, 548, 648, 104, 636, 321, - 80, 478, 52, 632, 45, 261, 340, 234, 336, 638, - 289, 549, 520, 282, 126, 123, 657, 37, 332, 51, - 31, 647, 125, 50, 639, 150, 550, 640, 551, 381, - 359, 623, 49, 382, 267, 552, 85, 272, 513, 310, - 631, 383, 498, 333, 384, 299, 646, 231, 553, 612, - 604, 605, 385, 386, 624, 364, 360, 365, 500, 554, - 408, 483, 387, 608, 609, 664, 53, 555, 556, 625, - 124, 557, 79, 641, 81, 327, 328, 558, 297, 250, - 503, 504, 410, 356, 461, 468, 469, 111, 112, 464, - 113, 470, 114, 471, 472, 473, 462, 115, 108, 463, - 474, 475, 357, 358, 116, 476, 110, 109, 465, 467, - 117, 477, 248, 36, 388, 510, 301, 59, 305, 276, - 411, 47, 362, 661, 46, 619, 505, 559, 622, 355, - 351, 458, 54, 560, 561, 562, 563, 480, 642, 354, - 326, 350, 656, 4, 294, 481, 643, 63, 233, 367, - 366, 368, 283, 407, 347, 564, 565, 566, 255, 83, - 567, 337, 22, 568, 569, 389, 290, 570, 57, 571, - 572, 414, 264, 573, 55, 644, 40, 574, 269, 658, - 645, 575, 576, 577, 618, 578, 271, 579, 391, 580, - 606, 607, 390, 361, 363, 506, 278, 392, 236, 512, - 581, 311, 331, 268, 649, 582, 256, 494, 495, 496, - 497, 630, 502, 501, 270, 275, 263, 415, 257, 583, - 584, 585, 586, 587, 304, 603, 588, 589, 317, 651, - 459, 44, 590, 591, 592, 593, 594, 298, 293, 409, - 418, 62, 84, 374, 595, 596, 628, 325, 322, 291, - 597, 314, 56, 652, 653, 654, 285, 655, 487, 488, - 489, 490, 10, 662, 663, 482, 394, 127, 295, 296, - 48, 348, 277, 598, 308, 599, 338, 339, 353, 324, - 349, 615, 315, 613, 279, 395, 460, 265, 600, 417, - 292, 370, 375, 309, 516, 499, 284, 396, 627, 515, - 491, 492, 346, 343, 286, 493, 601, 617, 397, 240, - 280, 281, 602, 614, 398, 399, 302, 400, 401, 402, - 403, 404, 406, 312, 405, 616, 610, 611, 287, 514, - 320, 341, 376, 430, 431, 432, 433, 434, 435, 436, + -1000, -411, -78, -416, -7, -11, -20, -21, -22, -23, + -24, -25, -26, -27, -28, -29, -30, -31, -63, -66, + -64, -65, -68, -69, -70, -71, -72, -14, -17, -67, + -32, -33, -73, -74, -75, -76, -77, -16, -18, -19, + -9, -8, -13, 10, 11, -107, -34, 33, -39, -49, + 225, -50, -40, 226, -51, 228, 227, 265, 229, 377, + 258, 75, 313, 314, 316, 317, 318, 319, -108, 627, + 263, 264, 231, 37, 46, 34, 35, 38, 235, 271, + 272, 234, -10, -35, 9, -413, 12, 451, 260, 259, + 29, -12, 521, 87, -79, -412, 675, -251, -235, 23, + 34, 30, -234, -230, -126, -235, 21, 19, 8, -78, + -78, -78, 13, 14, -78, -351, -353, 87, 159, 87, + -78, -56, -55, -53, -52, -54, -57, 32, -46, -47, + -375, -45, -42, 230, 227, 275, 123, 124, 265, 266, + 267, 229, 249, 264, 268, 263, 284, -41, 82, 34, + 521, 524, -358, 226, 232, 233, 228, 452, 126, 125, + 76, -355, 372, 554, 645, -57, 647, 101, 104, 646, + 45, 239, 648, 649, 650, 561, 651, 248, 652, 653, + 654, 655, 661, 602, 662, 663, 664, 127, 8, -78, + -302, -298, 91, -291, 518, 251, 552, 553, 300, 82, + 42, 527, 369, 372, 554, 481, 645, 378, 313, 329, + 323, 486, 487, 488, 352, 344, 519, 555, 528, 303, + 252, 288, 639, 342, 135, 647, 307, 556, 266, 379, + 380, 557, 381, 101, 316, 418, 660, 306, 558, 658, + 104, 646, 321, 80, 480, 52, 642, 45, 261, 340, + 234, 336, 648, 289, 559, 530, 282, 126, 123, 667, + 37, 332, 51, 31, 657, 125, 50, 649, 150, 560, + 650, 561, 383, 359, 633, 49, 384, 267, 562, 85, + 272, 523, 310, 641, 385, 500, 333, 386, 299, 656, + 231, 563, 622, 614, 615, 387, 388, 634, 364, 360, + 365, 502, 564, 410, 485, 389, 618, 619, 674, 53, + 565, 566, 635, 124, 567, 79, 651, 81, 327, 328, + 568, 297, 250, 505, 506, 412, 356, 463, 470, 471, + 111, 112, 466, 113, 472, 114, 473, 474, 475, 464, + 115, 108, 465, 476, 477, 357, 358, 116, 478, 110, + 109, 467, 469, 117, 479, 248, 36, 390, 520, 301, + 59, 305, 276, 413, 47, 362, 671, 46, 629, 507, + 569, 632, 355, 351, 460, 54, 570, 571, 572, 573, + 482, 652, 354, 326, 350, 666, 4, 294, 483, 653, + 63, 233, 367, 366, 368, 283, 409, 347, 574, 575, + 576, 255, 83, 577, 337, 22, 578, 579, 391, 290, + 580, 57, 581, 582, 416, 264, 583, 55, 654, 40, + 584, 269, 668, 655, 585, 586, 587, 628, 588, 271, + 589, 393, 590, 616, 617, 392, 361, 363, 508, 278, + 394, 377, 236, 522, 591, 311, 331, 268, 659, 592, + 256, 496, 497, 498, 499, 640, 504, 503, 270, 275, + 263, 417, 257, 593, 594, 595, 596, 597, 304, 613, + 598, 599, 317, 661, 461, 44, 600, 601, 602, 603, + 604, 298, 293, 411, 420, 62, 84, 374, 605, 606, + 638, 325, 322, 291, 607, 314, 56, 662, 663, 664, + 285, 665, 489, 490, 491, 492, 10, 509, 510, 511, + 512, 513, 514, 515, 516, 672, 673, 484, 396, 127, + 295, 296, 48, 348, 277, 608, 308, 609, 338, 339, + 353, 324, 349, 625, 315, 623, 279, 397, 462, 265, + 610, 419, 292, 370, 375, 309, 526, 501, 284, 398, + 637, 525, 493, 494, 346, 343, 286, 495, 611, 627, + 399, 240, 280, 281, 612, 624, 400, 401, 302, 402, + 403, 404, 405, 406, 408, 312, 407, 626, 620, 621, + 287, 524, 320, 341, 376, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, - 447, 457, 238, -77, 238, -188, -297, 238, -269, 378, - -287, 380, 393, 388, 398, 386, -278, 389, 391, 278, - -398, 408, 238, 395, 225, 381, 390, 399, 400, 302, - 406, 401, 312, 405, 287, 402, 403, 404, -381, 177, - 640, 655, 135, 345, 385, 383, 409, 619, 91, -303, - 91, 92, 93, -290, 315, -305, 320, -291, -381, -290, - 318, -77, -77, -307, -307, -127, 619, 621, -207, -142, - 143, -157, -160, -148, -152, -201, -202, -203, -204, -158, - -217, -256, 166, 167, 174, 144, -213, -161, 27, 507, - 451, 450, 177, 32, -151, 220, 69, 70, 453, 146, - 58, 12, 426, 427, -159, 421, 428, 423, 478, 480, - 481, 482, 479, 484, 485, 486, 487, 488, 489, 490, - 491, 492, 493, 483, 455, 456, 118, 457, 108, 110, - 109, 458, 459, 460, 342, 505, 506, 500, 503, 504, - 502, 501, 357, 358, 461, 462, 463, 111, 112, 113, - 114, 115, 116, 117, 464, 467, 465, 466, 468, 469, - 470, 475, 476, 471, 472, 473, 474, 477, 362, 361, - -87, -99, 533, 532, -100, -149, -150, -163, -164, -291, - -297, 243, 420, 237, 172, 449, -153, -146, -215, 107, - 92, 93, -8, -211, 419, 424, 425, 429, 422, 519, - 521, 536, 537, 539, 524, 529, 528, 531, 494, 495, - 496, 497, 498, 499, 604, 605, 606, 607, 608, 609, - 610, 611, -381, -290, 91, -155, -154, -197, 94, 99, - 102, 103, 105, -404, 261, 338, 339, 119, -412, 633, - 90, 95, 96, 97, 98, 120, 121, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 45, - 394, 394, -188, -77, -77, -77, -77, -227, -125, -229, - -10, -8, -412, 9, -77, -8, -9, -13, -35, -37, - 538, -36, -297, 100, -234, -250, 13, 162, 43, 51, - -232, -233, -12, -8, -142, 20, 24, 25, -130, 168, - -142, -297, -130, -276, 242, -77, -77, -265, -310, 315, - -267, 409, 619, 408, -257, -270, 91, -256, -269, 407, - -351, 159, -337, -341, -291, 253, -367, 249, -188, -360, - -359, -291, -412, -126, -286, 239, 247, 246, 136, -385, - 139, 295, 420, 237, -52, -53, -54, -269, 176, 639, - -108, 270, 274, 88, 88, -341, -340, -339, -386, 274, - 253, -366, -358, 245, 254, -347, 246, 247, -342, 239, - 137, -386, -342, 244, 254, 249, 253, 274, 274, 127, - 274, 127, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 269, -348, 151, -348, 515, 515, -354, -386, 249, - 239, -386, -386, 245, -288, -342, 241, 26, 241, 36, - 36, -348, -348, -348, -269, 176, -348, -348, -348, -348, - 282, 282, -348, -348, -348, -348, -348, -348, -348, -348, - -348, -348, -348, -348, -348, -348, -348, -348, -348, 238, - -385, -134, 405, 302, 82, -55, 284, -38, -188, -286, - 239, 240, -385, 271, -188, 221, -188, -280, 159, 16, - -280, -277, 394, 392, 379, 384, -280, -280, -280, -280, - 285, 377, -343, 239, 36, 250, 394, 285, 377, 285, - 286, 285, 286, 387, 397, 285, -302, 15, 162, 420, - 382, 386, 278, 238, 279, 240, 396, 286, -302, 90, - -281, 159, 285, 394, 281, -280, -280, -308, -412, -293, - -291, -289, 230, 24, 142, 26, 28, 145, 177, 130, - 20, 146, 38, 232, 345, 249, 176, 245, 450, 225, - 73, 519, 421, 423, 419, 426, 452, 453, 420, 380, - 32, 14, 521, 29, 259, 25, 39, 170, 227, 149, - 522, 262, 27, 260, 118, 121, 524, 23, 76, 254, - 15, 247, 41, 17, 525, 526, 18, 243, 242, 162, - 239, 71, 12, 220, 30, 158, 67, 527, 137, 528, - 529, 530, 531, 131, 69, 159, 21, 659, 424, 425, - 34, 620, 507, 273, 172, 74, 60, 621, 143, 422, - 532, 533, 119, 534, 122, 77, 626, 139, 19, 72, - 43, 535, 274, 536, 244, 660, 537, 412, 538, 160, - 228, 449, 70, 161, 633, 539, 634, 237, 393, 9, - 454, 33, 258, 246, 129, 68, 540, 238, 148, 455, - 456, 241, 132, 120, 8, 136, 35, 13, 75, 78, - 427, 428, 429, 58, 128, 511, 147, 16, 541, 413, - 141, -381, 622, -308, -308, 33, 92, -407, -408, -409, - 511, 412, 241, -291, -188, -83, 612, 229, -84, 618, - 24, 236, -132, 394, -120, 177, 640, 623, 624, 625, - 622, 391, 630, 628, 626, 285, 627, 88, 139, 141, - 142, 4, -142, 158, -198, 151, 152, 153, 154, 155, - 156, 157, 162, 143, 145, 159, -243, 140, 163, 164, - 165, 166, 167, 168, 169, 171, 170, 172, 173, 160, - 161, 176, 223, 224, -152, -152, -152, -152, -213, -219, - -218, -412, -215, -381, -290, -297, -412, -412, -152, -275, - -412, -412, -148, -412, -412, -412, -222, -142, -412, -412, - -416, -412, -416, -416, -326, -412, -326, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - -412, -412, -412, -412, -412, 221, -412, -412, -412, -412, - -412, -326, -326, -326, -326, -326, -412, -412, -412, -412, - -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, - 103, 99, 102, 94, -217, 105, 90, 90, 90, 90, - -8, -9, -207, -412, -307, -395, -396, -191, -188, -412, - 302, -291, -291, 271, -232, -12, -8, -227, -233, -229, - -8, -77, -118, -131, 64, 65, -133, 25, 39, 68, - 66, 24, -413, 89, -413, -250, -413, 88, -37, -253, - 87, 62, 44, 90, 90, 88, 22, -228, -230, -142, - 15, -295, 4, -294, 26, -291, 90, 221, 15, -189, - 30, -188, -276, -276, 88, 91, 315, -266, -268, 410, - 412, 151, -296, -291, 90, 32, 89, 88, -188, -315, - -318, -320, -319, -321, -316, -317, 342, 343, 177, 346, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 359, - 33, 261, 338, 339, 340, 341, 360, 361, 362, 363, - 365, 366, 367, 368, 323, 344, 509, 324, 325, 326, - 327, 328, 329, 331, 332, 335, 333, 334, 336, 337, - -382, -381, 87, 89, 88, -322, 87, -142, -134, 238, - -381, 239, 239, 239, -77, 449, -348, -348, -348, 269, - 20, -45, -42, -374, 19, -41, -42, 230, 123, 124, - 227, 87, -337, 87, -346, -382, -381, 87, 137, 244, - 136, -345, -342, -345, -346, -381, -215, -381, 137, 137, - -381, -381, -262, -291, -262, -262, 24, -262, 24, -262, - 24, 96, -291, -262, 24, -262, 24, -262, 24, -262, - 24, -262, 24, 32, 79, 80, 81, 32, 83, 84, - 85, -215, -381, -381, -215, -337, -215, -188, -381, -269, - 96, 96, 96, -348, -348, 96, 90, 90, 90, -348, - -348, 96, 90, -299, -297, 90, 90, -387, 255, 299, - 301, 96, 96, 96, 96, 32, 90, -388, 32, 647, - 646, 648, 649, 650, 90, 96, 32, 96, 32, 96, - -291, 87, -188, -140, 289, 225, 227, 230, 77, 90, - 305, 306, 303, 308, 309, 151, 45, 88, 241, 238, - -381, -282, 243, -282, -291, -298, -297, -289, 90, -142, - -344, 15, 162, -302, -302, -280, -188, -344, -302, -280, - -188, -280, -280, -280, -280, -302, -302, -302, -280, -297, - -297, -188, -188, -188, -188, -188, -188, -188, -308, -281, - -280, 622, 90, -274, 15, 77, -308, -308, 88, 321, - 413, 414, -306, 318, -79, -291, 90, -15, -11, -23, - -22, -24, 151, -15, 88, 511, -181, -188, 622, 622, - 622, 622, 622, 622, -142, -142, -142, -142, 534, -205, - 119, 143, 120, 121, -160, -206, -211, -213, 106, 162, - 145, 159, -243, -148, -152, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -309, -291, - 90, 177, -156, -155, 105, -404, -156, 508, 88, -218, - 221, -142, -142, -381, -142, -291, -128, -130, -128, -142, - -220, -221, 147, -215, -142, -413, -413, 96, 105, 168, - -124, 25, 39, -124, -124, -124, -124, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -124, -291, -291, - -117, -116, 431, 432, 433, 434, 436, 437, 438, 441, - 442, 446, 447, 430, 448, 435, 440, 443, 444, 445, - 439, 341, -142, -142, -142, -142, -142, -142, -85, -142, - 130, 131, 132, -207, -142, -148, -142, -142, -142, -413, - -142, -142, -142, -208, -207, -380, -379, -378, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -207, -142, -413, -142, -162, -146, 96, -258, 105, - 92, -142, -142, -129, -128, -293, -298, -289, -290, -128, - -129, -129, -128, -128, -142, -142, -142, -142, -142, -142, - -142, -142, -413, -142, -142, -142, -142, -142, -250, -413, - -207, 88, -397, 412, 413, 620, -300, 274, -299, 26, - -208, 90, 15, -260, 78, -291, -232, -232, 64, 65, - 60, -128, -133, -413, -36, 26, -252, -291, 63, 90, - -327, -269, 369, 370, 177, -142, -142, 88, -231, 28, - 29, -188, -294, 168, -298, -188, -261, 274, -188, -166, - -168, -169, -170, -191, -214, -412, -171, -8, 530, 527, - 15, -181, -182, -190, -297, -267, -310, -266, 88, 411, - 413, 414, 77, 122, -142, -328, 176, -356, -355, -354, - -337, -339, -340, -341, 89, -328, -333, 375, 374, -322, - -322, -322, -322, -322, -327, -327, -327, -327, 87, 87, - -322, -322, -322, -322, -330, 87, -330, -330, -331, -330, - 87, -331, -332, 87, -332, -367, -142, -364, -363, -361, - -362, 248, 101, 602, 558, 511, 551, 592, 78, -359, - -231, 96, -413, -140, -283, 243, -365, -362, -381, -381, - -381, -283, 91, 90, 91, 90, 91, 90, -109, -59, - -1, 659, 660, 661, 88, 20, -338, -337, -58, 299, - -370, -371, 274, -366, -360, -346, 137, -345, -346, -346, - -381, 88, 30, 127, 127, 127, 127, 511, 227, 33, - -284, 550, 143, 602, 558, -337, -58, 241, 241, -309, - -309, -309, 90, 90, -279, 655, -181, -136, 291, 151, - 280, 280, 238, 238, 293, -188, 304, 307, 305, 306, - 303, 308, 309, 24, 24, 24, 24, 24, 292, 294, - 296, 282, -188, -188, -282, 77, -183, -188, 27, -297, - -188, -280, -280, -188, -280, -280, -188, -409, 322, -291, - 356, 613, 614, 616, 615, -120, 412, 88, 511, 23, - -121, 23, -412, 119, 120, 121, -206, -148, -152, -148, - 142, 262, -412, -215, -413, -293, 26, 88, 78, -413, - 88, 88, -413, -413, 88, 15, -223, -221, 149, -142, - -413, 88, -413, -413, -413, -207, -142, -142, -142, -142, + 447, 448, 449, 459, 238, -78, 238, -189, -298, 238, + 177, -270, 380, -288, 382, 395, 390, 400, 388, -279, + 391, 393, 278, -399, 410, 238, 397, 225, 383, 392, + 401, 402, 302, 408, 403, 312, 407, 287, 404, 405, + 406, -382, 177, 650, 665, 135, 345, 387, 385, 411, + 629, 91, -304, 91, 92, 93, -291, 315, -306, 320, + -292, -382, -291, 318, -78, -78, -308, -308, -128, 629, + 631, -208, -143, 143, -158, -161, -149, -153, -202, -203, + -204, -205, -159, -218, -257, 166, 167, 174, 144, -214, + -162, 27, 517, 453, 452, 177, 32, -152, 220, 69, + 70, 455, 146, 58, 12, 428, 429, -160, 423, 430, + 425, 480, 482, 483, 484, 481, 486, 487, 488, 489, + 490, 491, 492, 493, 494, 495, 485, 457, 458, 118, + 459, 108, 110, 109, 460, 461, 462, 342, 507, 508, + 502, 505, 506, 504, 503, 357, 358, 463, 510, 509, + 511, 512, 513, 514, 515, 516, 464, 465, 111, 112, + 113, 114, 115, 116, 117, 466, 469, 467, 468, 470, + 471, 472, 477, 478, 473, 474, 475, 476, 479, 368, + 366, 367, 363, 362, 361, -88, -100, 543, 542, -101, + -150, -151, -164, -165, -292, -298, 243, 422, 237, 172, + 451, -154, -147, -216, 107, 92, 93, -8, -212, 421, + 426, 427, 431, 424, 529, 531, 546, 547, 549, 534, + 539, 538, 541, 496, 497, 498, 499, 500, 501, 614, + 615, 616, 617, 618, 619, 620, 621, -382, -291, 91, + -156, -155, -198, 94, 99, 102, 103, 105, -405, 261, + 338, 339, 119, -413, 643, 90, 95, 96, 97, 98, + 120, 121, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 45, 396, 396, -189, -78, -78, + -78, -78, -228, -126, -230, -10, -8, -413, 9, -78, + -8, -9, -13, -35, -37, 548, -36, -298, 100, -235, + -251, 13, 162, 43, 51, -233, -234, -12, -8, -143, + 20, 24, 25, -131, 168, -143, -298, -131, -277, 242, + -78, -78, -266, -311, 315, -268, 411, 629, 410, -258, + -271, 91, -257, -270, 409, -352, 159, -338, -342, -292, + 253, -368, 249, -189, -361, -360, -292, -413, -127, -287, + 239, 247, 246, 136, -386, 139, 295, 422, 237, -52, + -53, -54, -270, 176, 649, -109, 270, 274, 88, 88, + -342, -341, -340, -387, 274, 253, -367, -359, 245, 254, + -348, 246, 247, -343, 239, 137, -387, -343, 244, 254, + 249, 253, 274, 274, 127, 274, 127, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 269, -349, 151, -349, + 525, 525, -355, -387, 249, 239, -387, -387, 245, -289, + -343, 241, 26, 241, 36, 36, -349, -349, -349, -270, + 176, -349, -349, -349, -349, 282, 282, -349, -349, -349, + -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, + -349, -349, -349, -349, 238, -386, -135, 407, 302, 82, + -55, 284, -38, -189, -287, 239, 240, -386, 271, -189, + 221, -189, 632, -281, 159, 16, -281, -278, 396, 394, + 381, 386, -281, -281, -281, -281, 285, 379, -344, 239, + 36, 250, 396, 285, 379, 285, 286, 285, 286, 389, + 399, 285, -303, 15, 162, 422, 384, 388, 278, 238, + 279, 240, 398, 286, -303, 90, -282, 159, 285, 396, + 281, -281, -281, -309, -413, -294, -292, -290, 230, 24, + 142, 26, 28, 145, 177, 130, 20, 146, 38, 232, + 345, 249, 176, 245, 452, 225, 73, 529, 423, 425, + 421, 428, 454, 455, 422, 382, 32, 14, 531, 29, + 259, 25, 39, 170, 227, 149, 532, 262, 27, 260, + 118, 121, 534, 23, 76, 254, 15, 247, 41, 17, + 535, 536, 18, 243, 242, 162, 239, 71, 12, 220, + 30, 158, 67, 537, 137, 538, 539, 540, 541, 131, + 69, 159, 21, 669, 426, 427, 34, 630, 517, 273, + 172, 74, 60, 631, 143, 424, 542, 543, 119, 544, + 122, 77, 636, 139, 19, 72, 43, 545, 274, 546, + 244, 670, 547, 414, 548, 160, 228, 451, 70, 161, + 643, 549, 644, 237, 395, 9, 456, 33, 258, 246, + 129, 68, 550, 238, 148, 457, 458, 241, 132, 120, + 8, 136, 35, 13, 75, 78, 429, 430, 431, 58, + 128, 521, 147, 16, 551, 415, 141, -382, 632, -309, + -309, 33, 92, -408, -409, -410, 521, 414, 241, -292, + -189, -84, 622, 229, -85, 628, 24, 236, -133, 396, + -121, 177, 650, 633, 634, 635, 632, 393, 640, 638, + 636, 285, 637, 88, 139, 141, 142, 4, -143, 158, + -199, 151, 152, 153, 154, 155, 156, 157, 162, 143, + 145, 159, -244, 140, 163, 164, 165, 166, 167, 168, + 169, 171, 170, 172, 173, 160, 161, 176, 223, 224, + -153, -153, -153, -153, -214, -220, -219, -413, -216, -382, + -291, -298, -413, -413, -153, -276, -413, -413, -149, -413, + -413, -413, -223, -143, -413, -413, -417, -413, -417, -417, + -327, -413, -327, -413, -413, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, - -207, 88, 88, 15, -313, 26, -413, -413, -413, -413, - -413, -222, -413, 15, -413, 78, 88, 162, 88, -413, - -413, -413, 88, 88, -413, -413, 88, 88, -413, 88, - 88, 88, -413, 88, 88, 88, 88, -413, -413, -413, - -413, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, -413, -413, 88, -92, 535, -413, -413, 88, -413, - 88, -413, -412, 221, -413, -413, -413, -413, -413, 88, - 88, 88, 88, 88, 88, -413, -413, -413, 88, 88, - -413, 88, -413, 88, -413, -396, 619, 413, -195, -194, - -192, 75, 242, 76, -412, -299, -413, -156, -258, -259, - -258, -200, -291, 96, 105, -234, -165, -167, 15, -133, - -213, 89, 88, -327, -238, -244, -277, -291, 90, 177, - -329, 177, -329, 369, 370, -230, 221, -196, 16, -199, - 33, 58, -11, -412, -412, 33, 88, -184, -186, -185, - -187, 67, 71, 73, 68, 69, 70, 74, -304, 26, - -8, -166, -8, -412, -188, -181, -414, 15, 78, -414, - 88, 221, -268, -271, 415, 412, 418, -381, 90, -108, - 88, -354, -341, -235, -137, 41, -334, 376, -327, 518, - -327, -336, 90, -336, 96, 96, 96, 89, -48, -43, - -44, 34, 82, -361, -348, 90, 40, -348, -348, -291, - 89, -231, -136, -188, 143, 77, -365, -365, -365, -297, - -2, 658, 664, 137, 87, 379, 19, -252, 88, 89, - -216, 300, 89, -110, -291, 89, 87, -346, -346, -291, - -412, 238, 32, 32, 602, 558, 550, -58, -216, -215, - -381, -328, 657, 656, 89, 240, 298, -141, 426, -138, - 90, 91, -188, -188, -188, -188, -188, 230, 227, 402, - -405, 310, -405, 283, 241, -181, -188, 88, -82, 257, - 252, -302, -302, 34, -188, 412, 631, 629, -142, 142, - 262, -160, -152, -148, -311, 177, 342, 261, 340, 336, - 356, 347, 374, 338, 375, 333, 332, 331, -311, -309, - -207, -130, -142, -142, 150, -142, 148, -142, -413, -413, - -413, -413, -413, -227, -142, -142, -142, -413, 177, 342, - 15, -142, -309, -142, -142, -142, -142, -142, -378, -142, - -207, -142, -207, -142, -142, -142, -142, -142, -379, -379, - -379, -379, -379, -207, -207, -207, -207, -142, -412, -291, - -95, -94, -93, 585, 242, -92, -162, -95, -162, -129, - -293, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -192, -342, -342, -342, -262, 88, -273, 23, 15, - 58, 58, -165, -196, -166, -133, -291, -241, 612, -247, - 47, -245, -246, 48, -242, 49, 57, -329, -329, 168, - -232, -142, -263, 77, -264, -272, -215, -210, -212, -211, - -412, -251, -413, -291, -262, -264, -168, -169, -169, -168, - -169, 67, 67, 67, 72, 67, 72, 67, -185, -297, - -413, -142, -300, 78, -166, -166, -190, -297, 168, 412, - 416, 417, -354, -403, 119, 143, 32, 77, 372, 101, - -401, 176, 547, 597, 602, 558, 551, 592, -402, 244, - 136, 137, 256, 26, 42, 89, 88, 89, 88, 89, - 89, 88, -285, -284, -44, -43, -348, -348, 96, -381, - 90, 90, 240, 27, -188, 77, 77, 77, -111, 662, - 96, 87, -3, 82, -142, 87, 20, -337, -215, -372, - -323, -373, -324, -325, -5, -6, -349, -114, 58, 101, - -62, 45, 239, 642, 643, 127, -412, 655, -364, -252, - -368, -370, -188, -145, -412, -144, -146, -153, 166, 167, - 261, 338, 339, -216, -188, -135, 289, 297, 87, -139, - 92, -384, 78, 280, 372, 280, 90, -406, 311, 90, - -406, -188, -82, -48, -188, -280, -280, 34, -381, -413, - -160, -152, -123, 162, 511, -314, 517, -322, -322, -322, - -332, -322, 328, -322, 328, -322, -413, -413, -413, 88, - -413, 23, -413, -142, 88, -119, 454, 88, 88, -413, - 87, 87, -142, -413, -413, -413, 88, -413, -413, -413, - -413, -413, 88, -413, -413, -413, 88, -312, 603, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, - -91, -292, -291, -92, 567, 567, -413, -92, -224, 88, - -413, -413, 88, -413, 88, 88, -413, 88, -413, 88, - -413, -413, -413, -413, 88, -193, 23, -193, -193, -413, - -258, -188, -196, -225, 17, -238, 52, 348, -249, -248, - 56, 48, -246, 20, 50, 20, 31, -263, 88, 151, - 88, -413, -413, 88, 58, 221, -413, -196, -179, -178, - 77, 78, -180, 77, -178, 67, 67, -253, 88, -261, - -166, -196, -196, 221, 119, -412, -147, -159, -145, 13, - 90, 90, -381, -400, 646, 647, 32, 96, -348, -348, - 137, 137, -188, 87, -327, 90, -327, 96, 96, 32, - 83, 84, 85, 32, 79, 80, 81, -188, -188, -188, - -188, -369, 87, 20, -142, 87, 151, 89, -252, -252, - 276, 162, -348, 640, 282, 282, -348, -348, -348, -113, - -112, 662, 89, -413, 88, -335, 511, 514, -142, -154, - -154, -253, 89, -377, 511, -383, -291, -291, -291, -291, - 96, 98, -413, 509, 74, 512, -413, -327, -142, -142, - -142, -232, 90, -142, -142, 96, 96, -413, -142, -207, - -142, -413, -176, -175, -177, 623, 119, 32, -311, -413, - -209, 274, -98, -97, -96, 15, -413, -142, -142, -142, - -142, -142, -142, -142, -412, 67, 19, 17, -412, -412, - -300, -225, -226, 18, 20, -239, 54, -237, 53, -237, - -248, 20, 20, 90, 20, 90, 137, -272, -142, -212, - 58, -11, -291, -210, -291, -227, -142, 87, -142, -156, - -196, -196, -142, -202, 478, 480, 481, 482, 479, 484, - 485, 486, 487, 488, 489, 490, 491, 492, 493, 483, - 457, 108, 110, 109, 458, 459, 460, 342, 505, 506, - 500, 503, 504, 502, 501, 357, 358, 461, 462, 463, - 111, 112, 113, 114, 115, 116, 117, 464, 467, 465, - 468, 469, 470, 475, 476, 471, 472, 473, 474, 477, - 362, 361, 494, 495, 496, 497, 498, 499, 604, 605, - 606, 607, 608, 609, 610, 611, 90, 90, 87, -142, - 89, 89, -253, -368, -59, 89, -254, -252, 96, 89, - 277, -211, -412, 90, -348, -348, -348, 96, 96, -299, - -413, 88, -291, -402, -370, 515, 515, -413, 26, -376, - -375, -293, 87, 78, 63, 510, 513, -413, -413, 88, - -413, -413, -413, 89, 89, -413, -413, -413, 88, -413, - -175, -177, -413, 77, -156, -227, 20, -95, 299, 301, - -95, -413, 88, -413, -413, 88, -413, 88, -413, -413, - -255, -413, -291, 244, 20, 20, -255, -255, -195, -226, - -105, -104, -103, 541, -142, -207, -240, 55, 77, 122, - 90, 90, 90, 13, -210, 221, -232, -252, -173, 379, - -227, -413, -252, 89, 26, 89, 664, 137, 89, -211, - -122, -412, 273, -299, 90, 90, -112, -115, -11, 88, - 151, -252, -188, 63, -142, -207, -413, 77, 522, 623, - -90, -89, -86, 634, 660, -207, -92, -92, -142, -142, - -142, 88, -413, -413, -413, -105, 88, -102, -101, -291, - 77, 122, -264, -291, 89, -413, -412, -232, 89, -236, - -11, 87, -3, 273, -323, -373, -324, -325, -5, -6, - -349, -80, 511, -375, -353, -293, 90, 96, 89, 511, - -413, -413, -88, 145, 632, 600, -143, -154, -151, 220, - -413, 88, -413, 88, -413, 88, -291, 244, -103, 88, - 26, -300, -174, -172, -291, 564, -393, -392, 507, -403, - -399, 119, 143, 101, -401, 602, 558, 128, 129, -80, - -142, 87, -413, -81, 288, 619, -384, 512, -88, 633, - 578, 553, 578, 553, -142, -142, -142, -101, -412, -413, - 88, 23, -315, -61, 575, -390, -391, 77, -394, 385, - 574, 595, 119, 90, 89, -252, 249, -377, 513, 142, - -413, 88, -413, 88, -413, -91, -172, 571, -328, -156, - -391, 77, -390, 77, 14, 13, -4, 663, 89, 290, - -88, -142, -142, -413, -60, 27, -173, -389, 257, 252, - 255, 33, -389, 96, -4, -413, -413, 575, 251, 32, - 119, -156, -176, -175, -175, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, + -413, -413, -413, 221, -413, -413, -413, -413, -413, -327, + -327, -327, -327, -327, -413, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, 103, 99, + 102, 94, -218, 105, 90, 90, 90, 90, -8, -9, + -208, -413, -308, -396, -397, -192, -189, -413, 302, -292, + -292, 271, -233, -12, -8, -228, -234, -230, -8, -78, + -119, -132, 64, 65, -134, 25, 39, 68, 66, 24, + -414, 89, -414, -251, -414, 88, -37, -254, 87, 62, + 44, 90, 90, 88, 22, -229, -231, -143, 15, -296, + 4, -295, 26, -292, 90, 221, 15, -190, 30, -189, + -277, -277, 88, 91, 315, -267, -269, 412, 414, 151, + -297, -292, 90, 32, 89, 88, -189, -316, -319, -321, + -320, -322, -317, -318, 342, 343, 177, 346, 348, 349, + 350, 351, 352, 353, 354, 355, 356, 359, 33, 261, + 338, 339, 340, 341, 360, 361, 362, 363, 365, 366, + 367, 368, 323, 344, 519, 324, 325, 326, 327, 328, + 329, 331, 332, 335, 333, 334, 336, 337, -383, -382, + 87, 89, 88, -323, 87, -143, -135, 238, -382, 239, + 239, 239, -78, 451, -349, -349, -349, 269, 20, -45, + -42, -375, 19, -41, -42, 230, 123, 124, 227, 87, + -338, 87, -347, -383, -382, 87, 137, 244, 136, -346, + -343, -346, -347, -382, -216, -382, 137, 137, -382, -382, + -263, -292, -263, -263, 24, -263, 24, -263, 24, 96, + -292, -263, 24, -263, 24, -263, 24, -263, 24, -263, + 24, 32, 79, 80, 81, 32, 83, 84, 85, -216, + -382, -382, -216, -338, -216, -189, -382, -270, 96, 96, + 96, -349, -349, 96, 90, 90, 90, -349, -349, 96, + 90, -300, -298, 90, 90, -388, 255, 299, 301, 96, + 96, 96, 96, 32, 90, -389, 32, 657, 656, 658, + 659, 660, 90, 96, 32, 96, 32, 96, -292, 87, + -189, -141, 289, 225, 227, 230, 77, 90, 305, 306, + 303, 308, 309, 151, 45, 88, 241, 238, -382, -283, + 243, -283, -292, -299, -298, -290, 241, 378, 90, -143, + -345, 15, 162, -303, -303, -281, -189, -345, -303, -281, + -189, -281, -281, -281, -281, -303, -303, -303, -281, -298, + -298, -189, -189, -189, -189, -189, -189, -189, -309, -282, + -281, 632, 90, -275, 15, 77, -309, -309, 88, 321, + 415, 416, -307, 318, -80, -292, 90, -15, -11, -23, + -22, -24, 151, -15, 88, 521, -182, -189, 632, 632, + 632, 632, 632, 632, -143, -143, -143, -143, 544, -206, + 119, 143, 120, 121, -161, -207, -212, -214, 106, 162, + 145, 159, -244, -149, -153, -149, -149, -149, -149, -149, + -149, -149, -149, -149, -149, -149, -149, -149, -310, -292, + 90, 177, -157, -156, 105, -405, -157, 518, 88, -219, + 221, -143, -143, -382, -143, -292, -129, -131, -129, -143, + -221, -222, 147, -216, -143, -414, -414, 96, 105, 168, + -125, 25, 39, -125, -125, -125, -125, -143, -143, -143, + -143, -143, -143, -143, -143, -143, -143, -125, -292, -292, + -118, -117, 433, 434, 435, 436, 438, 439, 440, 443, + 444, 448, 449, 432, 450, 437, 442, 445, 446, 447, + 441, 341, -143, -143, -143, -143, -143, -143, -86, -143, + 130, 131, 132, -208, -143, -149, -143, -143, -143, -414, + -143, -143, -143, -209, -208, -143, -143, -143, -143, -143, + -143, -143, -143, -381, -380, -379, -143, -143, -143, -143, + -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, + -143, -143, -143, -143, -143, -143, -143, -143, -143, -208, + -208, -208, -208, -208, -143, -414, -143, -163, -147, 96, + -259, 105, 92, -143, -143, -130, -129, -294, -299, -290, + -291, -129, -130, -130, -129, -129, -143, -143, -143, -143, + -143, -143, -143, -143, -414, -143, -143, -143, -143, -143, + -251, -414, -208, 88, -398, 414, 415, 630, -301, 274, + -300, 26, -209, 90, 15, -261, 78, -292, -233, -233, + 64, 65, 60, -129, -134, -414, -36, 26, -253, -292, + 63, 90, -328, -270, 369, 370, 177, -143, -143, 88, + -232, 28, 29, -189, -295, 168, -299, -189, -262, 274, + -189, -167, -169, -170, -171, -192, -215, -413, -172, -8, + 540, 537, 15, -182, -183, -191, -298, -268, -311, -267, + 88, 413, 415, 416, 77, 122, -143, -329, 176, -357, + -356, -355, -338, -340, -341, -342, 89, -329, -334, 375, + 374, -323, -323, -323, -323, -323, -328, -328, -328, -328, + 87, 87, -323, -323, -323, -323, -331, 87, -331, -331, + -332, -331, 87, -332, -333, 87, -333, -368, -143, -365, + -364, -362, -363, 248, 101, 612, 568, 521, 561, 602, + 78, -360, -232, 96, -414, -141, -284, 243, -366, -363, + -382, -382, -382, -284, 91, 90, 91, 90, 91, 90, + -110, -59, -1, 669, 670, 671, 88, 20, -339, -338, + -58, 299, -371, -372, 274, -367, -361, -347, 137, -346, + -347, -347, -382, 88, 30, 127, 127, 127, 127, 521, + 227, 33, -285, 560, 143, 612, 568, -338, -58, 241, + 241, -310, -310, -310, 90, 90, -280, 665, -182, -137, + 291, 151, 280, 280, 238, 238, 293, -189, 304, 307, + 305, 306, 303, 308, 309, 24, 24, 24, 24, 24, + 292, 294, 296, 282, -189, -189, -283, 77, -184, -189, + 27, -298, 90, 90, -189, -281, -281, -189, -281, -281, + -189, -410, 322, -292, 356, 623, 624, 626, 625, -121, + 414, 88, 521, 23, -122, 23, -413, 119, 120, 121, + -207, -149, -153, -149, 142, 262, -413, -216, -414, -294, + 26, 88, 78, -414, 88, 88, -414, -414, 88, 15, + -224, -222, 149, -143, -414, 88, -414, -414, -414, -208, + -143, -143, -143, -143, -414, -414, -414, -414, -414, -414, + -414, -414, -414, -414, -208, 88, 88, 15, -314, 26, + -414, -414, -414, -414, -414, -223, -414, 15, -414, 78, + 88, 162, 88, -414, -414, -414, 88, 88, -414, -414, + 88, -414, 88, -414, 88, -414, 88, -414, 88, -414, + 88, -414, 88, -414, 88, -414, 88, 88, -414, 88, + 88, 88, -414, 88, 88, 88, 88, -414, -414, -414, + -414, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, -414, -414, -414, -414, -414, -414, 88, -93, 545, + -414, -414, 88, -414, 88, -414, -413, 221, -414, -414, + -414, -414, -414, 88, 88, 88, 88, 88, 88, -414, + -414, -414, 88, 88, -414, 88, -414, 88, -414, -397, + 629, 415, -196, -195, -193, 75, 242, 76, -413, -300, + -414, -157, -259, -260, -259, -201, -292, 96, 105, -235, + -166, -168, 15, -134, -214, 89, 88, -328, -239, -245, + -278, -292, 90, 177, -330, 177, -330, 369, 370, -231, + 221, -197, 16, -200, 33, 58, -11, -413, -413, 33, + 88, -185, -187, -186, -188, 67, 71, 73, 68, 69, + 70, 74, -305, 26, -8, -167, -8, -413, -189, -182, + -415, 15, 78, -415, 88, 221, -269, -272, 417, 414, + 420, -382, 90, -109, 88, -355, -342, -236, -138, 41, + -335, 376, -328, 528, -328, -337, 90, -337, 96, 96, + 96, 89, -48, -43, -44, 34, 82, -362, -349, 90, + 40, -349, -349, -292, 89, -232, -137, -189, 143, 77, + -366, -366, -366, -298, -2, 668, 674, 137, 87, 381, + 19, -253, 88, 89, -217, 300, 89, -111, -292, 89, + 87, -347, -347, -292, -413, 238, 32, 32, 612, 568, + 560, -58, -217, -216, -382, -329, 667, 666, 89, 240, + 298, -142, 428, -139, 90, 91, -189, -189, -189, -189, + -189, 230, 227, 404, -406, 310, -406, 283, 241, -182, + -189, 88, -83, 257, 252, -303, -303, 34, -189, 414, + 641, 639, -143, 142, 262, -161, -153, -149, -312, 177, + 342, 261, 340, 336, 356, 347, 374, 338, 375, 333, + 332, 331, -312, -310, -208, -131, -143, -143, 150, -143, + 148, -143, -414, -414, -414, -414, -414, -228, -143, -143, + -143, -414, 177, 342, 15, -143, -310, -143, -143, -143, + -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, + -379, -143, -208, -143, -208, -143, -143, -143, -143, -143, + -380, -380, -380, -380, -380, -208, -208, -208, -208, -143, + -413, -292, -96, -95, -94, 595, 242, -93, -163, -96, + -163, -130, -294, -143, -143, -143, -143, -143, -143, -143, + -143, -143, -143, -193, -343, -343, -343, -263, 88, -274, + 23, 15, 58, 58, -166, -197, -167, -134, -292, -242, + 622, -248, 47, -246, -247, 48, -243, 49, 57, -330, + -330, 168, -233, -143, -264, 77, -265, -273, -216, -211, + -213, -212, -413, -252, -414, -292, -263, -265, -169, -170, + -170, -169, -170, 67, 67, 67, 72, 67, 72, 67, + -186, -298, -414, -143, -301, 78, -167, -167, -191, -298, + 168, 414, 418, 419, -355, -404, 119, 143, 32, 77, + 372, 101, -402, 176, 557, 607, 612, 568, 561, 602, + -403, 244, 136, 137, 256, 26, 42, 89, 88, 89, + 88, 89, 89, 88, -286, -285, -44, -43, -349, -349, + 96, -382, 90, 90, 240, 27, -189, 77, 77, 77, + -112, 672, 96, 87, -3, 82, -143, 87, 20, -338, + -216, -373, -324, -374, -325, -326, -5, -6, -350, -115, + 58, 101, -62, 45, 239, 652, 653, 127, -413, 665, + -365, -253, -369, -371, -189, -146, -413, -145, -147, -154, + 166, 167, 261, 338, 339, -217, -189, -136, 289, 297, + 87, -140, 92, -385, 78, 280, 372, 280, 90, -407, + 311, 90, -407, -189, -83, -48, -189, -281, -281, 34, + -382, -414, -161, -153, -124, 162, 521, -315, 527, -323, + -323, -323, -333, -323, 328, -323, 328, -323, -414, -414, + -414, 88, -414, 23, -414, -143, 88, -120, 456, 88, + 88, -414, 87, 87, -143, -414, -414, -414, 88, -414, + -414, -414, -414, -414, 88, -414, 88, -414, 88, -414, + 88, -414, 88, -414, 88, -414, 88, -414, 88, -414, + 88, -414, -414, -414, 88, -313, 613, -414, -414, -414, + -414, -414, -414, -414, -414, -414, -414, -414, -92, -293, + -292, -93, 577, 577, -414, -93, -225, 88, -414, -414, + 88, -414, 88, 88, -414, 88, -414, 88, -414, -414, + -414, -414, 88, -194, 23, -194, -194, -414, -259, -189, + -197, -226, 17, -239, 52, 348, -250, -249, 56, 48, + -247, 20, 50, 20, 31, -264, 88, 151, 88, -414, + -414, 88, 58, 221, -414, -197, -180, -179, 77, 78, + -181, 77, -179, 67, 67, -254, 88, -262, -167, -197, + -197, 221, 119, -413, -148, -160, -146, 13, 90, 90, + -382, -401, 656, 657, 32, 96, -349, -349, 137, 137, + -189, 87, -328, 90, -328, 96, 96, 32, 83, 84, + 85, 32, 79, 80, 81, -189, -189, -189, -189, -370, + 87, 20, -143, 87, 151, 89, -253, -253, 276, 162, + -349, 650, 282, 282, -349, -349, -349, -114, -113, 672, + 89, -414, 88, -336, 521, 524, -143, -155, -155, -254, + 89, -378, 521, -384, -292, -292, -292, -292, 96, 98, + -414, 519, 74, 522, -414, -328, -143, -143, -143, -233, + 90, -143, -143, 96, 96, -414, -143, -143, -143, -143, + -143, -143, -143, -143, -143, -208, -143, -414, -177, -176, + -178, 633, 119, 32, -312, -414, -210, 274, -99, -98, + -97, 15, -414, -143, -143, -143, -143, -143, -143, -143, + -413, 67, 19, 17, -413, -413, -301, -226, -227, 18, + 20, -240, 54, -238, 53, -238, -249, 20, 20, 90, + 20, 90, 137, -273, -143, -213, 58, -11, -292, -211, + -292, -228, -143, 87, -143, -157, -197, -197, -143, -203, + 480, 482, 483, 484, 481, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 485, 459, 108, 110, 109, + 460, 461, 462, 342, 507, 508, 502, 505, 506, 504, + 503, 357, 358, 463, 510, 509, 511, 512, 513, 514, + 515, 516, 464, 465, 111, 112, 113, 114, 115, 116, + 117, 466, 469, 467, 470, 471, 472, 477, 478, 473, + 474, 475, 476, 479, 368, 366, 367, 363, 362, 361, + 496, 497, 498, 499, 500, 501, 614, 615, 616, 617, + 618, 619, 620, 621, 90, 90, 87, -143, 89, 89, + -254, -369, -59, 89, -255, -253, 96, 89, 277, -212, + -413, 90, -349, -349, -349, 96, 96, -300, -414, 88, + -292, -403, -371, 525, 525, -414, 26, -377, -376, -294, + 87, 78, 63, 520, 523, -414, -414, 88, -414, -414, + -414, 89, 89, -414, -414, -414, -414, -414, -414, -414, + -414, -414, -414, -414, 88, -414, -176, -178, -414, 77, + -157, -228, 20, -96, 299, 301, -96, -414, 88, -414, + -414, 88, -414, 88, -414, -414, -256, -414, -292, 244, + 20, 20, -256, -256, -196, -227, -106, -105, -104, 551, + -143, -208, -241, 55, 77, 122, 90, 90, 90, 13, + -211, 221, -233, -253, -174, 381, -228, -414, -253, 89, + 26, 89, 674, 137, 89, -212, -123, -413, 273, -300, + 90, 90, -113, -116, -11, 88, 151, -253, -189, 63, + -143, -208, -414, 77, 532, 633, -91, -90, -87, 644, + 670, -208, -93, -93, -143, -143, -143, 88, -414, -414, + -414, -106, 88, -103, -102, -292, 77, 122, -265, -292, + 89, -414, -413, -233, 89, -237, -11, 87, -3, 273, + -324, -374, -325, -326, -5, -6, -350, -81, 521, -376, + -354, -298, -294, 90, 96, 89, 521, -414, -414, -89, + 145, 642, 610, -144, -155, -152, 220, -414, 88, -414, + 88, -414, 88, -292, 244, -104, 88, 26, -301, -175, + -173, -292, 574, -394, -393, 517, -404, -400, 119, 143, + 101, -402, 612, 568, 128, 129, -81, -143, 87, -414, + -82, 288, 629, 221, -385, 522, -89, 643, 588, 563, + 588, 563, -143, -143, -143, -102, -413, -414, 88, 23, + -316, -61, 585, -391, -392, 77, -395, 387, 584, 605, + 119, 90, 89, -253, 249, -299, -378, 523, 142, -414, + 88, -414, 88, -414, -92, -173, 581, -329, -157, -392, + 77, -391, 77, 14, 13, -4, 673, 89, 290, -89, + -143, -143, -414, -60, 27, -174, -390, 257, 252, 255, + 33, -390, 96, -4, -414, -414, 585, 251, 32, 119, + -157, -177, -176, -176, } var yyDef = [...]int{ - 871, -2, -2, 873, 2, 4, 5, 6, 7, 8, + 875, -2, -2, 877, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 70, - 72, 73, 871, 871, 871, 0, 871, 0, 0, 871, - -2, -2, 871, 1481, 0, 871, 0, 0, -2, 786, - 792, 0, 801, -2, 0, 0, 871, 871, 2036, 2036, - 866, 0, 0, 0, 0, 0, 871, 871, 871, 871, - 1347, 50, 871, 0, 85, 86, 821, 822, 823, 65, - 0, 2034, 872, 1, 3, 71, 75, 0, 0, 0, - 58, 1356, 0, 78, 0, 0, 875, 0, 0, 1464, - 871, 871, 0, 126, 127, 0, 0, 0, -2, 130, - -2, 159, 160, 161, 0, 166, 599, 522, 574, 520, - 559, -2, 508, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 525, 398, 398, 0, 0, - -2, 508, 508, 508, 1466, 0, 0, 0, 556, 460, - 398, 398, 398, 0, 398, 398, 398, 398, 0, 0, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 1374, 165, 1482, - 1479, 1480, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, - 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, - 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, - 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 71, 73, 74, 875, 875, 875, 0, 875, 0, 0, + 875, -2, -2, 875, 1513, 0, 875, 0, 0, 0, + -2, 790, 796, 0, 805, -2, 0, 0, 875, 875, + 2078, 2078, 870, 0, 0, 0, 0, 0, 875, 875, + 875, 875, 1379, 51, 875, 0, 86, 87, 825, 826, + 827, 66, 0, 2076, 876, 1, 3, 72, 76, 0, + 0, 0, 59, 1388, 0, 79, 0, 0, 879, 0, + 0, 1496, 875, 875, 0, 127, 128, 0, 0, 0, + -2, 131, -2, 160, 161, 162, 0, 167, 601, 524, + 576, 522, 561, -2, 510, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 527, 399, 399, + 0, 0, -2, 510, 510, 510, 1498, 0, 0, 0, + 558, 461, 399, 399, 399, 0, 399, 399, 399, 399, + 0, 0, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 1406, + 166, 1514, 1511, 1512, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, @@ -8120,305 +8449,321 @@ var yyDef = [...]int{ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, - 2032, 2033, 0, 1458, 0, 712, 974, 0, 775, 775, - 0, 775, 775, 775, 775, 0, 0, 0, 724, 0, - 0, 0, 0, 772, 0, 740, 741, 0, 772, 0, - 747, 778, 0, 0, 753, 775, 775, 756, 2037, 0, - 2037, 2037, 1449, 0, 769, 767, 781, 782, 40, 785, - 788, 789, 790, 791, 794, 0, 805, 808, 1475, 1476, - 0, 810, 817, 834, 835, 0, 867, 868, 45, 1122, - 0, 996, 1001, 1012, 1027, 1028, 1029, 1030, 1031, 1033, - 1034, 1035, 0, 0, 0, 0, 1040, 1041, 0, 0, - 0, 0, 0, 1103, 1049, 0, 0, 0, 0, 1320, - 0, 0, 1281, 1281, 1137, 1281, 1283, 1283, 1683, 1819, - 1827, 1947, 1645, 1650, 1651, 1652, 1940, 1941, 1942, 1943, - 1982, 1983, 1987, 1743, 0, 0, 0, 2033, 1780, 1788, - 1789, 1813, 1912, 1968, 1662, 1808, 1877, 1740, 1762, 1763, - 1894, 1895, 1784, 1785, 1766, 1778, 1781, 1769, 1770, 1772, - 1774, 1779, 1786, 1792, 1771, 1791, 1790, 0, 1767, 1768, - 1773, 1783, 1787, 1775, 1776, 1777, 1782, 1793, 1804, 1875, - 0, 0, 0, 0, 0, 1220, 1221, 1222, 1223, 0, - 0, 0, 0, 0, 0, 0, 290, 291, 1333, 1334, - 43, 44, 1121, 1445, 1283, 1283, 1283, 1283, 1283, 1063, - 1064, 1065, 1066, 1067, 1091, 1092, 1098, 1099, 1889, 1890, - 1891, 1892, 1724, 1977, 1732, 1733, 1872, 1873, 1745, 1746, - 2008, 2009, -2, -2, -2, 231, 232, 233, 234, 235, - 236, 237, 238, 0, 1687, 1958, 1959, 227, 0, 0, - 295, 296, 292, 293, 294, 1105, 1106, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 2036, - 0, 844, 0, 0, 0, 0, 0, 1356, 0, 1348, - 1347, 63, 0, 871, -2, 0, 0, 0, 0, 47, - 0, 52, 931, 874, 77, 76, 1396, 0, 0, 0, - 59, 1357, 67, 69, 1358, 0, 876, 877, 0, 907, - 911, 0, 0, 0, 1465, 1464, 1464, 102, 0, 0, - 103, 123, 124, 125, 0, 0, 109, 110, 1451, 1452, - 0, 0, 177, 178, 0, 41, 425, 0, 173, 0, - 418, 357, 0, 1374, 0, 0, 0, 0, 0, 871, - 0, 1459, 154, 155, 162, 163, 164, 398, 398, 398, - 571, 0, 0, 165, 165, 529, 530, 531, 0, 0, - -2, 423, 0, 509, 0, 0, 412, 412, 416, 414, - 415, 0, 0, 0, 0, 0, 0, 0, 0, 548, - 0, 549, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 660, 0, 399, 0, 569, 570, 461, 0, 0, - 0, 0, 0, 0, 0, 0, 1467, 1468, 0, 546, - 547, 0, 0, 0, 398, 398, 0, 0, 0, 0, - 398, 398, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 153, 1387, 0, 0, 0, -2, 0, 704, 0, 0, - 0, 1460, 1460, 0, 711, 0, 713, 714, 0, 0, - 715, 0, 772, 772, 770, 771, 717, 718, 719, 720, - 775, 0, 0, 407, 408, 409, 772, 775, 0, 775, - 775, 775, 775, 772, 772, 772, 775, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2037, 778, 775, 0, - 748, 0, 749, 750, 751, 754, 755, 757, 2038, 2039, - 1477, 1478, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, - 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, - 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, - 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, - 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, - 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, - 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, - 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, - 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, - 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, - 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, - 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, - 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, - 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, - 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, - 1633, 2037, 2037, 761, 765, 1450, 787, 793, 795, 796, - 0, 0, 806, 809, 828, 49, 1731, 816, 49, 818, - 819, 820, 846, 847, 852, 0, 0, 0, 0, 858, - 859, 860, 0, 0, 863, 864, 865, 0, 0, 0, - 0, 0, 994, 0, 0, 1111, 1112, 1113, 1114, 1115, - 1116, 1117, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1013, - 1014, 0, 0, 0, 1036, 1037, 1038, 1039, 1042, 0, - 1054, 0, 1056, 1329, -2, 0, 0, 0, 1047, 1048, - 0, 0, 0, 0, 0, 0, 0, 1321, 0, 0, - 1135, 0, 1136, 1138, 1139, 0, 1140, 881, 881, 881, - 881, 881, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 881, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1470, 141, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 891, 0, 0, 891, 891, 0, - 0, 220, 221, 222, 223, 224, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 239, 240, 241, 242, 243, 244, 297, 245, 246, 247, - 1121, 0, 0, 0, 46, 836, 837, 0, 957, 1470, - 0, 0, 887, 0, 57, 66, 68, 1356, 61, 1356, - 0, 893, 0, 0, -2, -2, 894, 900, 901, 902, - 903, 904, 54, 2035, 55, 0, 74, 0, 48, 0, - 0, 0, 0, 371, 1399, 0, 0, 1349, 1350, 1353, - 0, 908, 1825, 912, 0, 914, 915, 0, 0, 100, - 0, 973, 0, 0, 0, 111, 0, 113, 114, 0, - 0, 0, 382, 1453, 1454, 1455, -2, 405, 0, 382, - 366, 305, 306, 307, 357, 309, 357, 357, 357, 357, - 371, 371, 371, 371, 340, 341, 342, 343, 344, 0, - 0, 326, 357, 357, 357, 357, 347, 348, 349, 350, - 351, 352, 353, 354, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 359, 359, 359, 359, 359, 363, 363, - 0, 42, 0, 386, 0, 1353, 0, 0, 1387, 1462, - 1472, 0, 0, 0, 1462, 132, 0, 0, 0, 572, - 610, 523, 560, 573, 0, 526, 527, -2, 0, 0, - 508, 0, 510, 0, 406, 0, -2, 0, 416, 0, - 412, 416, 413, 416, 404, 417, 550, 551, 552, 0, - 554, 555, 640, 943, 0, 0, 0, 0, 0, 646, - 647, 648, 0, 650, 651, 652, 653, 654, 655, 656, - 657, 658, 659, 561, 562, 563, 564, 565, 566, 567, - 568, 0, 0, 0, 0, 510, 0, 557, 0, 0, - 462, 463, 464, 0, 0, 467, 468, 469, 470, 0, - 0, 473, 474, 475, 960, 961, 476, 477, 502, 503, - 504, 478, 479, 480, 481, 482, 483, 484, 496, 497, - 498, 499, 500, 501, 485, 486, 487, 488, 489, 490, - 493, 0, 147, 1378, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1460, - 0, 0, 0, 0, 890, 975, 1483, 1484, 776, 777, - 0, 410, 411, 775, 775, 721, 762, 0, 775, 725, - 763, 726, 728, 727, 729, 742, 743, 775, 732, 773, - 774, 733, 734, 735, 736, 737, 738, 739, 758, 744, - 745, 746, 779, 0, 783, 784, 759, 760, 0, 0, - 799, 800, 0, 807, 831, 829, 830, 832, 824, 825, - 826, 827, 0, 833, 0, 0, 849, 96, 854, 855, - 856, 857, 869, 862, 1123, 991, 992, 993, 0, 995, - 998, 0, 1107, 1109, 1000, 1002, 1118, 1119, 1120, 0, - 0, 0, 0, 0, 1006, 1010, 1015, 1016, 1017, 1018, - 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1032, 1297, - 1298, 1299, 1051, 298, 299, 0, 1052, 0, 0, 0, - 0, 0, 0, 0, 1122, 1053, 0, 905, 0, 0, - 1327, 1324, 0, 0, 0, 1282, 1284, 0, 0, 0, - 0, 882, 883, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, - 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, - 1279, 1280, 1300, 0, 0, 0, 0, 0, 1320, 0, - 1058, 1059, 1060, 0, 0, 0, 0, 0, 0, 1178, - 0, 0, 0, 0, 1471, 0, 142, 143, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1224, 1225, 1226, 1227, - 39, 0, 0, 0, 892, 1331, 0, -2, -2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1249, 0, 0, 0, 0, 0, 0, 1443, - 0, 0, 839, 840, 842, 0, 977, 0, 958, 0, - 0, 845, 0, 886, 0, 889, 60, 62, 898, 899, - 0, 916, 895, 56, 51, 0, 0, 935, 1397, 371, - 1419, 0, 380, 380, 377, 1359, 1360, 0, 1352, 1354, - 1355, 79, 913, 909, 0, 989, 0, 0, 972, 0, - 919, 921, 922, 923, 955, 0, 926, 927, 0, 0, - 0, 0, 0, 98, 974, 104, 0, 112, 0, 0, - 117, 118, 105, 106, 107, 108, 0, 599, -2, 457, - 179, 181, 182, 183, 174, -2, 369, 367, 368, 308, - 371, 371, 334, 335, 336, 337, 338, 339, 0, 0, - 327, 328, 329, 330, 319, 0, 320, 321, 322, 361, - 0, 323, 324, 0, 325, 424, 0, 1361, 387, 388, - 390, 398, 0, 393, 394, 0, 398, 398, 0, 419, - 420, 0, 1353, 1378, 0, 0, 0, 1473, 1472, 1472, - 1472, 0, 167, 168, 169, 170, 171, 172, 635, 0, - 0, 611, 633, 634, 165, 0, 0, 175, 512, 511, - 0, 667, 0, 422, 0, 0, 416, 416, 401, 402, - 553, 0, 0, 642, 643, 644, 645, 0, 0, 0, - 539, 451, 0, 540, 541, 510, 512, 0, 0, 382, - 465, 466, 471, 472, 491, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 586, 587, 588, 591, - 593, 514, 597, 590, 592, 594, 514, 598, 1375, 1376, - 1377, 0, 0, 705, 0, 0, 448, 94, 1461, 710, - 772, 731, 764, 772, 723, 730, 752, 797, 798, 803, - 811, 812, 813, 814, 815, 853, 0, 0, 0, 0, - 861, 0, 0, 999, 1108, 1110, 1003, 0, 1007, 1011, - 0, 0, 0, 1057, 1055, 1331, 0, 0, 0, 1104, - 0, 0, 1126, 1127, 0, 0, 0, 1325, 0, 0, - 1133, 0, 1285, 1286, 1141, 0, 0, 0, 0, 0, - 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, - 1347, 0, 0, 0, 0, 0, 1162, 1163, 1164, 1165, - 1166, 0, 1168, 0, 1169, 0, 0, 0, 0, 1176, - 1177, 1179, 0, 0, 1182, 1183, 0, 0, 1184, 0, - 0, 0, 1188, 0, 0, 0, 0, 1197, 1198, 1199, - 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1211, 1212, 0, 1214, 0, 1086, 0, 0, 1086, - 0, 1124, 891, 0, 1287, 1288, 1289, 1290, 1291, 0, - 0, 0, 0, 0, 0, 1247, 1248, 1250, 0, 0, - 1253, 0, 1255, 0, 1444, 838, 841, 843, 929, 978, - 979, 0, 0, 0, 0, 959, 1469, 884, 885, 888, - 937, 0, 1335, 0, 0, 916, 989, 917, 0, 896, - 53, 932, 0, 1401, 1400, 1413, 1426, 380, 380, 374, - 375, 381, 376, 378, 379, 1351, 0, 1356, 0, 1437, - 0, 0, 1429, 0, 0, 0, 0, 0, 0, 0, - 0, 962, 0, 0, 965, 0, 0, 0, 0, 956, - 927, 0, 928, 0, -2, 0, 0, 92, 93, 0, - 0, 0, 115, 116, 0, 0, 122, 383, 384, 156, - 165, 459, 180, 432, 0, 0, 304, 370, 331, 332, - 333, 0, 355, 0, 0, 0, 0, 453, 128, 1365, - 1364, 398, 398, 389, 0, 392, 0, 0, 0, 1474, - 358, 421, 0, 146, 0, 0, 0, 0, 0, 152, - 605, 0, 0, 612, 0, 0, 0, 521, 0, 532, - 533, 0, 639, -2, 701, 386, 0, 400, 403, 944, - 0, 0, 534, 0, 537, 538, 452, 512, 543, 544, - 558, 545, 494, 495, 492, 0, 0, 1388, 1389, 1394, - 1392, 1393, 133, 579, 581, 580, 584, 0, 0, 0, - 516, 0, 516, 577, 0, 448, 1361, 0, 709, 449, - 450, 775, 775, 848, 97, 0, 851, 0, 0, 0, - 0, 1004, 1008, 1292, 1318, 357, 357, 1305, 357, 363, - 1308, 357, 1310, 357, 1313, 357, 1316, 1317, 0, 0, - 0, 906, 0, 0, 1132, 1328, 0, 0, 1142, 1143, - 1144, 1145, 1146, 1322, 0, 0, 0, 1161, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, - 0, 0, 0, 0, 0, 0, 1258, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1081, 1085, - 0, 1087, 1088, 0, 0, 1216, 0, 0, 1228, 0, - 1332, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 980, 985, 985, 985, 0, 0, 0, 1456, 1457, - 1336, 1337, 989, 1338, 918, 897, 936, 1419, 0, 1412, - 0, -2, 1421, 0, 0, 0, 1427, 372, 373, 910, - 80, 990, 83, 0, 1437, 1446, 0, 1428, 1439, 1441, - 0, 0, 0, 1433, 0, 989, 920, 951, 953, 0, - 948, 963, 964, 966, 0, 968, 0, 970, 971, 931, - 925, 0, 100, 0, 989, 989, 99, 0, 976, 119, - 120, 121, 458, 184, 189, 0, 0, 0, 194, 0, - 196, 0, 0, 0, 201, 202, 398, 398, 433, 0, - 301, 303, 0, 0, 187, 371, 0, 371, 0, 362, - 364, 0, 434, 454, 1362, 1363, 0, 0, 391, 395, - 396, 397, 0, 1463, 148, 0, 0, 0, 608, 0, - 636, 0, 0, 0, 0, 0, 0, 176, 513, 668, - 669, 670, 671, 672, 673, 674, 675, 676, 0, 398, - 0, 0, 0, 398, 398, 398, 0, 693, 385, 0, - 0, 664, 661, 535, 0, 225, 226, 228, 0, 0, - 0, 0, 0, 542, 931, 1379, 1380, 1381, 0, 1391, - 1395, 136, 0, 0, 0, 0, 589, 595, 0, 515, - 596, 706, 707, 708, 95, 716, 722, 850, 870, 997, - 1005, 1009, 0, 0, 0, 0, 1319, 1303, 371, 1306, - 1307, 1309, 1311, 1312, 1314, 1315, 1045, 1046, 1050, 0, - 1129, 0, 1131, 1326, 0, 1356, 0, 0, 0, 1160, - 0, 0, 0, 1171, 1170, 1172, 0, 1174, 1175, 1180, - 1181, 1185, 0, 1187, 1189, 1190, 0, 0, 0, 1201, - 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1213, - 0, 1079, 1082, 1215, 1089, 1090, 1095, 1218, 0, 0, - 1125, 1230, 0, 1235, 0, 0, 1241, 0, 1245, 0, - 1251, 1252, 1254, 1256, 0, 0, 0, 0, 0, 957, - 938, 64, 1338, 1340, 0, 1406, 1404, 1404, 1414, 1415, - 0, 0, 1422, 0, 0, 0, 0, 84, 0, 0, - 0, 1442, 0, 0, 0, 0, 101, 1347, 945, 952, - 0, 0, 946, 0, 947, 967, 969, 924, 0, 989, - 989, 90, 91, 0, 190, 0, 192, 218, 219, 0, - 195, 197, 198, 199, 205, 206, 207, 200, 0, 0, - 300, 302, 0, 0, 345, 356, 346, 0, 0, 1366, - 1367, 1368, 1369, 1370, 1371, 1372, 1373, 931, 149, 150, - 151, 600, 0, 610, 0, 933, 0, 603, 0, 524, - 0, 0, 0, 398, 398, 398, 0, 0, 0, 0, - 678, 0, 0, 641, 0, 649, 0, 0, 0, 229, - 230, 0, 1390, 578, 0, 134, 135, 0, 0, 583, - 517, 518, 1043, 0, 0, 0, 1044, 1304, 0, 0, - 0, 0, 1323, 0, 0, 0, 0, 1167, 0, 0, - 0, 1193, 0, 0, 0, 630, 631, 0, 1259, 1084, - 1347, 0, 1086, 1096, 1097, 0, 1086, 1229, 0, 0, - 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, - 977, 1340, 1345, 0, 0, 1409, 0, 1402, 1405, 1403, - 1416, 0, 0, 1423, 0, 1425, 0, 1447, 1448, 1440, - 0, 1432, 1435, 1431, 1434, 1356, 949, 0, 954, 0, - 1347, 89, 0, 193, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 203, 204, 0, 0, - 360, 365, 0, 0, 0, 601, 0, 934, 613, 604, - 0, 691, 0, 695, 0, 0, 0, 698, 699, 700, - 677, 0, 681, 426, 665, 662, 663, 536, 0, 137, - 138, 0, 0, 0, 1293, 0, 1296, 1128, 1130, 0, - 1157, 1158, 1159, 1301, 1302, 1173, 1186, 1191, 0, 1194, - 0, 0, 1195, 0, 632, 1075, 0, 0, 1093, 1094, - 0, 1231, 0, 1236, 1237, 0, 1242, 0, 1246, 1257, - 0, 982, 939, 940, 987, 988, 0, 0, 930, 1345, - 82, 1346, 1343, 0, 1341, 1339, 1398, 0, 1407, 1408, - 1417, 1418, 1424, 0, 1430, 0, 87, 0, 0, 0, - 1356, 191, 0, 210, 0, 609, 0, 612, 602, 689, - 690, 0, 702, 694, 696, 697, 679, -2, 1382, 0, - 0, 0, 585, 1294, 0, 0, 1196, 0, 628, 629, - 1083, 1076, 0, 1061, 1062, 1080, 1217, 1219, 0, 0, - 0, 0, 981, 983, 984, 81, 0, 1342, 1101, 0, - 1410, 1411, 1438, 1436, 950, 957, 0, 88, 439, 432, - 1382, 0, 0, 0, 682, 683, 684, 685, 686, 687, - 688, 575, 1384, 139, 140, 505, 506, 507, 133, 0, - 1134, 1192, 1077, 0, 0, 0, 0, 1073, 1074, 0, - 1232, 0, 1238, 0, 1243, 0, 941, 942, 1344, 0, - 0, 614, 0, 616, 0, -2, 427, 440, 0, 185, - 211, 212, 0, 0, 215, 216, 217, 208, 209, 129, - 0, 0, 703, 0, 1385, 1386, 136, 0, 0, 1068, - 1069, 1070, 1071, 1072, 0, 0, 0, 1102, 1081, 615, - 0, 0, 382, 0, 625, 428, 429, 0, 435, 436, - 437, 438, 213, 214, 637, 0, 0, 582, 1295, 0, - 1233, 0, 1239, 0, 1244, 0, 617, 618, 626, 0, - 430, 0, 431, 0, 0, 0, 606, 0, 637, 1383, - 1078, 0, 0, 1100, 0, 627, 623, 441, 443, 444, - 0, 0, 442, 638, 607, 1234, 1240, 0, 445, 446, - 447, 619, 620, 621, 622, + 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, + 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, + 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, + 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, + 2072, 2073, 2074, 2075, 0, 1490, 0, 714, 978, 0, + 0, 779, 779, 0, 779, 779, 779, 779, 0, 0, + 0, 728, 0, 0, 0, 0, 776, 0, 744, 745, + 0, 776, 0, 751, 782, 0, 0, 757, 779, 779, + 760, 2079, 0, 2079, 2079, 1481, 0, 773, 771, 785, + 786, 41, 789, 792, 793, 794, 795, 798, 0, 809, + 812, 1507, 1508, 0, 814, 821, 838, 839, 0, 871, + 872, 46, 1126, 0, 1000, 1005, 1016, 1031, 1032, 1033, + 1034, 1035, 1037, 1038, 1039, 0, 0, 0, 0, 1044, + 1045, 0, 0, 0, 0, 0, 1107, 1053, 0, 0, + 0, 0, 1352, 0, 0, 1313, 1313, 1141, 1313, 1315, + 1315, 1716, 1852, 1860, 1989, 1677, 1683, 1684, 1685, 1974, + 1975, 1976, 1977, 2024, 2025, 2029, 1776, 0, 0, 0, + 2075, 1813, 1821, 1822, 1846, 1946, 2010, 1695, 1841, 1910, + 1773, 1795, 1796, 1928, 1929, 1817, 1818, 1799, 1980, 1979, + 1981, 1982, 1983, 1984, 1985, 1986, 1811, 1814, 1802, 1803, + 1805, 1807, 1812, 1819, 1825, 1804, 1824, 1823, 0, 1800, + 1801, 1806, 1816, 1820, 1808, 1809, 1810, 1815, 1826, 1866, + 1865, 1864, 1909, 1837, 1908, 0, 0, 0, 0, 0, + 1252, 1253, 1254, 1255, 0, 0, 0, 0, 0, 0, + 0, 291, 292, 1365, 1366, 44, 45, 1125, 1477, 1315, + 1315, 1315, 1315, 1315, 1067, 1068, 1069, 1070, 1071, 1095, + 1096, 1102, 1103, 1923, 1924, 1925, 1926, 1757, 2019, 1765, + 1766, 1905, 1906, 1778, 1779, 2050, 2051, -2, -2, -2, + 232, 233, 234, 235, 236, 237, 238, 239, 0, 1720, + 2000, 2001, 228, 0, 0, 296, 297, 293, 294, 295, + 1109, 1110, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 2078, 0, 848, 0, 0, 0, + 0, 0, 1388, 0, 1380, 1379, 64, 0, 875, -2, + 0, 0, 0, 0, 48, 0, 53, 935, 878, 78, + 77, 1428, 0, 0, 0, 60, 1389, 68, 70, 1390, + 0, 880, 881, 0, 911, 915, 0, 0, 0, 1497, + 1496, 1496, 103, 0, 0, 104, 124, 125, 126, 0, + 0, 110, 111, 1483, 1484, 0, 0, 178, 179, 0, + 42, 426, 0, 174, 0, 419, 358, 0, 1406, 0, + 0, 0, 0, 0, 875, 0, 1491, 155, 156, 163, + 164, 165, 399, 399, 399, 573, 0, 0, 166, 166, + 531, 532, 533, 0, 0, -2, 424, 0, 511, 0, + 0, 413, 413, 417, 415, 416, 0, 0, 0, 0, + 0, 0, 0, 0, 550, 0, 551, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 662, 0, 400, 0, + 571, 572, 462, 0, 0, 0, 0, 0, 0, 0, + 0, 1499, 1500, 0, 548, 549, 0, 0, 0, 399, + 399, 0, 0, 0, 0, 399, 399, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 1419, 0, 0, 0, + -2, 0, 706, 0, 0, 0, 1492, 1492, 0, 713, + 0, 715, 0, 718, 0, 0, 719, 0, 776, 776, + 774, 775, 721, 722, 723, 724, 779, 0, 0, 408, + 409, 410, 776, 779, 0, 779, 779, 779, 779, 776, + 776, 776, 779, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2079, 782, 779, 0, 752, 0, 753, 754, + 755, 758, 759, 761, 2080, 2081, 1509, 1510, 1517, 1518, + 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, + 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, + 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, + 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, + 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, + 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, + 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, + 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, + 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, + 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, + 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, + 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, + 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, + 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, + 1659, 1660, 1661, 1662, 1663, 1664, 1665, 2079, 2079, 765, + 769, 1482, 791, 797, 799, 800, 0, 0, 810, 813, + 832, 50, 1764, 820, 50, 822, 823, 824, 850, 851, + 856, 0, 0, 0, 0, 862, 863, 864, 0, 0, + 867, 868, 869, 0, 0, 0, 0, 0, 998, 0, + 0, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1017, 1018, 0, 0, 0, + 1040, 1041, 1042, 1043, 1046, 0, 1058, 0, 1060, 1361, + -2, 0, 0, 0, 1051, 1052, 0, 0, 0, 0, + 0, 0, 0, 1353, 0, 0, 1139, 0, 1140, 1142, + 1143, 0, 1144, 885, 885, 885, 885, 885, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 885, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1502, + 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 895, 0, 0, 895, 895, 0, 0, 221, + 222, 223, 224, 225, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 240, 241, + 242, 243, 244, 245, 298, 246, 247, 248, 1125, 0, + 0, 0, 47, 840, 841, 0, 961, 1502, 0, 0, + 891, 0, 58, 67, 69, 1388, 62, 1388, 0, 897, + 0, 0, -2, -2, 898, 904, 905, 906, 907, 908, + 55, 2077, 56, 0, 75, 0, 49, 0, 0, 0, + 0, 372, 1431, 0, 0, 1381, 1382, 1385, 0, 912, + 1858, 916, 0, 918, 919, 0, 0, 101, 0, 977, + 0, 0, 0, 112, 0, 114, 115, 0, 0, 0, + 383, 1485, 1486, 1487, -2, 406, 0, 383, 367, 306, + 307, 308, 358, 310, 358, 358, 358, 358, 372, 372, + 372, 372, 341, 342, 343, 344, 345, 0, 0, 327, + 358, 358, 358, 358, 348, 349, 350, 351, 352, 353, + 354, 355, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 360, 360, 360, 360, 360, 364, 364, 0, 43, + 0, 387, 0, 1385, 0, 0, 1419, 1494, 1504, 0, + 0, 0, 1494, 133, 0, 0, 0, 574, 612, 525, + 562, 575, 0, 528, 529, -2, 0, 0, 510, 0, + 512, 0, 407, 0, -2, 0, 417, 0, 413, 417, + 414, 417, 405, 418, 552, 553, 554, 0, 556, 557, + 642, 947, 0, 0, 0, 0, 0, 648, 649, 650, + 0, 652, 653, 654, 655, 656, 657, 658, 659, 660, + 661, 563, 564, 565, 566, 567, 568, 569, 570, 0, + 0, 0, 0, 512, 0, 559, 0, 0, 463, 464, + 465, 0, 0, 468, 469, 470, 471, 0, 0, 474, + 475, 476, 964, 965, 477, 478, 503, 504, 505, 479, + 480, 481, 482, 483, 484, 485, 497, 498, 499, 500, + 501, 502, 486, 487, 488, 489, 490, 491, 494, 0, + 148, 1410, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1492, 0, 0, + 0, 0, 894, 979, 1515, 1516, 0, 0, 780, 781, + 0, 411, 412, 779, 779, 725, 766, 0, 779, 729, + 767, 730, 732, 731, 733, 746, 747, 779, 736, 777, + 778, 737, 738, 739, 740, 741, 742, 743, 762, 748, + 749, 750, 783, 0, 787, 788, 763, 764, 0, 0, + 803, 804, 0, 811, 835, 833, 834, 836, 828, 829, + 830, 831, 0, 837, 0, 0, 853, 97, 858, 859, + 860, 861, 873, 866, 1127, 995, 996, 997, 0, 999, + 1002, 0, 1111, 1113, 1004, 1006, 1122, 1123, 1124, 0, + 0, 0, 0, 0, 1010, 1014, 1019, 1020, 1021, 1022, + 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1036, 1329, + 1330, 1331, 1055, 299, 300, 0, 1056, 0, 0, 0, + 0, 0, 0, 0, 1126, 1057, 0, 909, 0, 0, + 1359, 1356, 0, 0, 0, 1314, 1316, 0, 0, 0, + 0, 886, 887, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, + 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, + 1311, 1312, 1332, 0, 0, 0, 0, 0, 1352, 0, + 1062, 1063, 1064, 0, 0, 0, 0, 0, 0, 1182, + 0, 0, 0, 0, 1503, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 143, 144, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1256, 1257, + 1258, 1259, 40, 0, 0, 0, 896, 1363, 0, -2, + -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1281, 0, 0, 0, 0, 0, + 0, 1475, 0, 0, 843, 844, 846, 0, 981, 0, + 962, 0, 0, 849, 0, 890, 0, 893, 61, 63, + 902, 903, 0, 920, 899, 57, 52, 0, 0, 939, + 1429, 372, 1451, 0, 381, 381, 378, 1391, 1392, 0, + 1384, 1386, 1387, 80, 917, 913, 0, 993, 0, 0, + 976, 0, 923, 925, 926, 927, 959, 0, 930, 931, + 0, 0, 0, 0, 0, 99, 978, 105, 0, 113, + 0, 0, 118, 119, 106, 107, 108, 109, 0, 601, + -2, 458, 180, 182, 183, 184, 175, -2, 370, 368, + 369, 309, 372, 372, 335, 336, 337, 338, 339, 340, + 0, 0, 328, 329, 330, 331, 320, 0, 321, 322, + 323, 362, 0, 324, 325, 0, 326, 425, 0, 1393, + 388, 389, 391, 399, 0, 394, 395, 0, 399, 399, + 0, 420, 421, 0, 1385, 1410, 0, 0, 0, 1505, + 1504, 1504, 1504, 0, 168, 169, 170, 171, 172, 173, + 637, 0, 0, 613, 635, 636, 166, 0, 0, 176, + 514, 513, 0, 669, 0, 423, 0, 0, 417, 417, + 402, 403, 555, 0, 0, 644, 645, 646, 647, 0, + 0, 0, 541, 452, 0, 542, 543, 512, 514, 0, + 0, 383, 466, 467, 472, 473, 492, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 588, 589, + 590, 593, 595, 516, 599, 592, 594, 596, 516, 600, + 1407, 1408, 1409, 0, 0, 707, 0, 0, 449, 95, + 1493, 712, 716, 717, 776, 735, 768, 776, 727, 734, + 756, 801, 802, 807, 815, 816, 817, 818, 819, 857, + 0, 0, 0, 0, 865, 0, 0, 1003, 1112, 1114, + 1007, 0, 1011, 1015, 0, 0, 0, 1061, 1059, 1363, + 0, 0, 0, 1108, 0, 0, 1130, 1131, 0, 0, + 0, 1357, 0, 0, 1137, 0, 1317, 1318, 1145, 0, + 0, 0, 0, 0, 1151, 1152, 1153, 1154, 1155, 1156, + 1157, 1158, 1159, 1160, 1379, 0, 0, 0, 0, 0, + 1166, 1167, 1168, 1169, 1170, 0, 1172, 0, 1173, 0, + 0, 0, 0, 1180, 1181, 1183, 0, 0, 1186, 1187, + 0, 1190, 0, 1193, 0, 1196, 0, 1199, 0, 1202, + 0, 1205, 0, 1208, 0, 1211, 0, 0, 1212, 0, + 0, 0, 1216, 0, 0, 0, 0, 1225, 1226, 1227, + 1228, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1239, 1240, 1241, 1242, 1243, 1244, 0, 1246, 0, + 1090, 0, 0, 1090, 0, 1128, 895, 0, 1319, 1320, + 1321, 1322, 1323, 0, 0, 0, 0, 0, 0, 1279, + 1280, 1282, 0, 0, 1285, 0, 1287, 0, 1476, 842, + 845, 847, 933, 982, 983, 0, 0, 0, 0, 963, + 1501, 888, 889, 892, 941, 0, 1367, 0, 0, 920, + 993, 921, 0, 900, 54, 936, 0, 1433, 1432, 1445, + 1458, 381, 381, 375, 376, 382, 377, 379, 380, 1383, + 0, 1388, 0, 1469, 0, 0, 1461, 0, 0, 0, + 0, 0, 0, 0, 0, 966, 0, 0, 969, 0, + 0, 0, 0, 960, 931, 0, 932, 0, -2, 0, + 0, 93, 94, 0, 0, 0, 116, 117, 0, 0, + 123, 384, 385, 157, 166, 460, 181, 433, 0, 0, + 305, 371, 332, 333, 334, 0, 356, 0, 0, 0, + 0, 454, 129, 1397, 1396, 399, 399, 390, 0, 393, + 0, 0, 0, 1506, 359, 422, 0, 147, 0, 0, + 0, 0, 0, 153, 607, 0, 0, 614, 0, 0, + 0, 523, 0, 534, 535, 0, 641, -2, 703, 387, + 0, 401, 404, 948, 0, 0, 536, 0, 539, 540, + 453, 514, 545, 546, 560, 547, 495, 496, 493, 0, + 0, 1420, 1421, 1426, 1424, 1425, 134, 581, 583, 582, + 586, 0, 0, 0, 518, 0, 518, 579, 0, 449, + 1393, 0, 711, 450, 451, 779, 779, 852, 98, 0, + 855, 0, 0, 0, 0, 1008, 1012, 1324, 1350, 358, + 358, 1337, 358, 364, 1340, 358, 1342, 358, 1345, 358, + 1348, 1349, 0, 0, 0, 910, 0, 0, 1136, 1360, + 0, 0, 1146, 1147, 1148, 1149, 1150, 1354, 0, 0, + 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 145, 146, 0, 0, 0, 0, 0, 0, 1290, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1085, 1089, 0, 1091, 1092, 0, 0, 1248, 0, 0, + 1260, 0, 1364, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 984, 989, 989, 989, 0, 0, 0, + 1488, 1489, 1368, 1369, 993, 1370, 922, 901, 940, 1451, + 0, 1444, 0, -2, 1453, 0, 0, 0, 1459, 373, + 374, 914, 81, 994, 84, 0, 1469, 1478, 0, 1460, + 1471, 1473, 0, 0, 0, 1465, 0, 993, 924, 955, + 957, 0, 952, 967, 968, 970, 0, 972, 0, 974, + 975, 935, 929, 0, 101, 0, 993, 993, 100, 0, + 980, 120, 121, 122, 459, 185, 190, 0, 0, 0, + 195, 0, 197, 0, 0, 0, 202, 203, 399, 399, + 434, 0, 302, 304, 0, 0, 188, 372, 0, 372, + 0, 363, 365, 0, 435, 455, 1394, 1395, 0, 0, + 392, 396, 397, 398, 0, 1495, 149, 0, 0, 0, + 610, 0, 638, 0, 0, 0, 0, 0, 0, 177, + 515, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 0, 399, 0, 0, 0, 399, 399, 399, 0, 695, + 386, 0, 0, 666, 663, 537, 0, 226, 227, 229, + 0, 0, 0, 0, 0, 544, 935, 1411, 1412, 1413, + 0, 1423, 1427, 137, 0, 0, 0, 0, 591, 597, + 0, 517, 598, 708, 709, 710, 96, 720, 726, 854, + 874, 1001, 1009, 1013, 0, 0, 0, 0, 1351, 1335, + 372, 1338, 1339, 1341, 1343, 1344, 1346, 1347, 1049, 1050, + 1054, 0, 1133, 0, 1135, 1358, 0, 1388, 0, 0, + 0, 1164, 0, 0, 0, 1175, 1174, 1176, 0, 1178, + 1179, 1184, 1185, 1188, 0, 1191, 0, 1194, 0, 1197, + 0, 1200, 0, 1203, 0, 1206, 0, 1209, 0, 1213, + 0, 1215, 1217, 1218, 0, 0, 0, 1229, 1230, 1231, + 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1245, 0, 1083, + 1086, 1247, 1093, 1094, 1099, 1250, 0, 0, 1129, 1262, + 0, 1267, 0, 0, 1273, 0, 1277, 0, 1283, 1284, + 1286, 1288, 0, 0, 0, 0, 0, 961, 942, 65, + 1370, 1372, 0, 1438, 1436, 1436, 1446, 1447, 0, 0, + 1454, 0, 0, 0, 0, 85, 0, 0, 0, 1474, + 0, 0, 0, 0, 102, 1379, 949, 956, 0, 0, + 950, 0, 951, 971, 973, 928, 0, 993, 993, 91, + 92, 0, 191, 0, 193, 219, 220, 0, 196, 198, + 199, 200, 206, 207, 208, 201, 0, 0, 301, 303, + 0, 0, 346, 357, 347, 0, 0, 1398, 1399, 1400, + 1401, 1402, 1403, 1404, 1405, 935, 150, 151, 152, 602, + 0, 612, 0, 937, 0, 605, 0, 526, 0, 0, + 0, 399, 399, 399, 0, 0, 0, 0, 680, 0, + 0, 643, 0, 651, 0, 0, 0, 230, 231, 0, + 1422, 580, 0, 135, 136, 0, 0, 585, 519, 520, + 1047, 0, 0, 0, 1048, 1336, 0, 0, 0, 0, + 1355, 0, 0, 0, 0, 1171, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1221, 0, 0, + 0, 632, 633, 0, 1291, 1088, 1379, 0, 1090, 1100, + 1101, 0, 1090, 1261, 0, 0, 0, 0, 0, 0, + 0, 990, 0, 0, 0, 0, 981, 1372, 1377, 0, + 0, 1441, 0, 1434, 1437, 1435, 1448, 0, 0, 1455, + 0, 1457, 0, 1479, 1480, 1472, 0, 1464, 1467, 1463, + 1466, 1388, 953, 0, 958, 0, 1379, 90, 0, 194, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 204, 205, 0, 0, 361, 366, + 0, 0, 0, 603, 0, 938, 615, 606, 0, 693, + 0, 697, 0, 0, 0, 700, 701, 702, 679, 0, + 683, 427, 667, 664, 665, 538, 0, 138, 139, 0, + 0, 0, 1325, 0, 1328, 1132, 1134, 0, 1161, 1162, + 1163, 1333, 1334, 1177, 1189, 1192, 1195, 1198, 1201, 1204, + 1207, 1210, 1214, 1219, 0, 1222, 0, 0, 1223, 0, + 634, 1079, 0, 0, 1097, 1098, 0, 1263, 0, 1268, + 1269, 0, 1274, 0, 1278, 1289, 0, 986, 943, 944, + 991, 992, 0, 0, 934, 1377, 83, 1378, 1375, 0, + 1373, 1371, 1430, 0, 1439, 1440, 1449, 1450, 1456, 0, + 1462, 0, 88, 0, 0, 0, 1388, 192, 0, 211, + 0, 611, 0, 614, 604, 691, 692, 0, 704, 696, + 698, 699, 681, -2, 1414, 0, 0, 0, 587, 1326, + 0, 0, 1224, 0, 630, 631, 1087, 1080, 0, 1065, + 1066, 1084, 1249, 1251, 0, 0, 0, 0, 985, 987, + 988, 82, 0, 1374, 1105, 0, 1442, 1443, 1470, 1468, + 954, 961, 0, 89, 440, 433, 1414, 0, 0, 0, + 684, 685, 686, 687, 688, 689, 690, 577, 1416, 140, + 141, 0, 507, 508, 509, 134, 0, 1138, 1220, 1081, + 0, 0, 0, 0, 1077, 1078, 0, 1264, 0, 1270, + 0, 1275, 0, 945, 946, 1376, 0, 0, 616, 0, + 618, 0, -2, 428, 441, 0, 186, 212, 213, 0, + 0, 216, 217, 218, 209, 210, 130, 0, 0, 705, + 0, 1417, 1418, 0, 137, 0, 0, 1072, 1073, 1074, + 1075, 1076, 0, 0, 0, 1106, 1085, 617, 0, 0, + 383, 0, 627, 429, 430, 0, 436, 437, 438, 439, + 214, 215, 639, 0, 0, 506, 584, 1327, 0, 1265, + 0, 1271, 0, 1276, 0, 619, 620, 628, 0, 431, + 0, 432, 0, 0, 0, 608, 0, 639, 1415, 1082, + 0, 0, 1104, 0, 629, 625, 442, 444, 445, 0, + 0, 443, 640, 609, 1266, 1272, 0, 446, 447, 448, + 621, 622, 623, 624, } var yyTok1 = [...]int{ @@ -8427,7 +8772,7 @@ var yyTok1 = [...]int{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 144, 3, 3, 3, 171, 163, 3, 87, 89, 168, 166, 88, 167, 221, 169, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 665, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 675, 152, 151, 153, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -8545,6 +8890,8 @@ var yyTok3 = [...]int{ 57975, 650, 57976, 651, 57977, 652, 57978, 653, 57979, 654, 57980, 655, 57981, 656, 57982, 657, 57983, 658, 57984, 659, 57985, 660, 57986, 661, 57987, 662, 57988, 663, 57989, 664, + 57990, 665, 57991, 666, 57992, 667, 57993, 668, 57994, 669, + 57995, 670, 57996, 671, 57997, 672, 57998, 673, 57999, 674, 0, } @@ -8895,7 +9242,7 @@ yydefault: case 1: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:602 +//line sql.y:606 { stmt := yyDollar[2].statementUnion() // If the statement is empty and we have comments @@ -8909,199 +9256,199 @@ yydefault: } case 2: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:615 +//line sql.y:619 { } case 3: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:616 +//line sql.y:620 { } case 4: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:620 +//line sql.y:624 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 38: + case 39: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:657 +//line sql.y:662 { setParseTree(yylex, nil) } - case 39: + case 40: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Variable -//line sql.y:663 +//line sql.y:668 { yyLOCAL = NewVariableExpression(yyDollar[1].str, SingleAt) } yyVAL.union = yyLOCAL - case 40: + case 41: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:669 +//line sql.y:674 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } - case 41: + case 42: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:674 +//line sql.y:679 { yyVAL.identifierCI = NewIdentifierCI("") } - case 42: + case 43: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:678 +//line sql.y:683 { yyVAL.identifierCI = yyDollar[1].identifierCI } - case 43: + case 44: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Variable -//line sql.y:684 +//line sql.y:689 { yyLOCAL = NewVariableExpression(string(yyDollar[1].str), SingleAt) } yyVAL.union = yyLOCAL - case 44: + case 45: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Variable -//line sql.y:688 +//line sql.y:693 { yyLOCAL = NewVariableExpression(string(yyDollar[1].str), DoubleAt) } yyVAL.union = yyLOCAL - case 45: + case 46: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:694 +//line sql.y:699 { yyLOCAL = &OtherAdmin{} } yyVAL.union = yyLOCAL - case 46: + case 47: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:700 +//line sql.y:705 { yyLOCAL = &Load{} } yyVAL.union = yyLOCAL - case 47: + case 48: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *With -//line sql.y:706 +//line sql.y:711 { yyLOCAL = &With{ctes: yyDollar[2].ctesUnion(), Recursive: false} } yyVAL.union = yyLOCAL - case 48: + case 49: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *With -//line sql.y:710 +//line sql.y:715 { yyLOCAL = &With{ctes: yyDollar[3].ctesUnion(), Recursive: true} } yyVAL.union = yyLOCAL - case 49: + case 50: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *With -//line sql.y:715 +//line sql.y:720 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 50: + case 51: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *With -//line sql.y:719 +//line sql.y:724 { yyLOCAL = yyDollar[1].withUnion() } yyVAL.union = yyLOCAL - case 51: + case 52: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:725 +//line sql.y:730 { yySLICE := (*[]*CommonTableExpr)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].cteUnion()) } - case 52: + case 53: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*CommonTableExpr -//line sql.y:729 +//line sql.y:734 { yyLOCAL = []*CommonTableExpr{yyDollar[1].cteUnion()} } yyVAL.union = yyLOCAL - case 53: + case 54: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *CommonTableExpr -//line sql.y:735 +//line sql.y:740 { yyLOCAL = &CommonTableExpr{ID: yyDollar[1].identifierCS, Columns: yyDollar[2].columnsUnion(), Subquery: yyDollar[4].subqueryUnion()} } yyVAL.union = yyLOCAL - case 54: + case 55: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:741 +//line sql.y:746 { yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 55: + case 56: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:745 +//line sql.y:750 { yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 56: + case 57: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:749 +//line sql.y:754 { setLockInSelect(yyDollar[2].selStmtUnion(), yyDollar[3].lockUnion()) yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 57: + case 58: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:772 +//line sql.y:777 { yyDollar[1].selStmtUnion().SetOrderBy(yyDollar[2].orderByUnion()) yyDollar[1].selStmtUnion().SetLimit(yyDollar[3].limitUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 58: + case 59: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:778 +//line sql.y:783 { yyDollar[1].selStmtUnion().SetLimit(yyDollar[2].limitUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 59: + case 60: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:783 +//line sql.y:788 { yyDollar[1].selStmtUnion().SetOrderBy(yyDollar[2].orderByUnion()) yyDollar[1].selStmtUnion().SetLimit(yyDollar[3].limitUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 60: + case 61: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:789 +//line sql.y:794 { yyDollar[2].selStmtUnion().SetWith(yyDollar[1].withUnion()) yyDollar[2].selStmtUnion().SetOrderBy(yyDollar[3].orderByUnion()) @@ -9109,20 +9456,20 @@ yydefault: yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 61: + case 62: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:796 +//line sql.y:801 { yyDollar[2].selStmtUnion().SetWith(yyDollar[1].withUnion()) yyDollar[2].selStmtUnion().SetLimit(yyDollar[3].limitUnion()) yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 62: + case 63: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:802 +//line sql.y:807 { yyDollar[2].selStmtUnion().SetWith(yyDollar[1].withUnion()) yyDollar[2].selStmtUnion().SetOrderBy(yyDollar[3].orderByUnion()) @@ -9130,175 +9477,175 @@ yydefault: yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 63: + case 64: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:809 +//line sql.y:814 { yyDollar[2].selStmtUnion().SetWith(yyDollar[1].withUnion()) } - case 64: + case 65: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:813 +//line sql.y:818 { yyLOCAL = NewSelect(Comments(yyDollar[2].strs), SelectExprs{&Nextval{Expr: yyDollar[5].exprUnion()}}, []string{yyDollar[3].str} /*options*/, nil, TableExprs{&AliasedTableExpr{Expr: yyDollar[7].tableName}}, nil /*where*/, nil /*groupBy*/, nil /*having*/, nil) } yyVAL.union = yyLOCAL - case 65: + case 66: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:819 +//line sql.y:824 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 66: + case 67: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:823 +//line sql.y:828 { yyLOCAL = &Union{Left: yyDollar[1].selStmtUnion(), Distinct: yyDollar[2].booleanUnion(), Right: yyDollar[3].selStmtUnion()} } yyVAL.union = yyLOCAL - case 67: + case 68: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:827 +//line sql.y:832 { yyLOCAL = &Union{Left: yyDollar[1].selStmtUnion(), Distinct: yyDollar[2].booleanUnion(), Right: yyDollar[3].selStmtUnion()} } yyVAL.union = yyLOCAL - case 68: + case 69: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:831 +//line sql.y:836 { yyLOCAL = &Union{Left: yyDollar[1].selStmtUnion(), Distinct: yyDollar[2].booleanUnion(), Right: yyDollar[3].selStmtUnion()} } yyVAL.union = yyLOCAL - case 69: + case 70: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:835 +//line sql.y:840 { yyLOCAL = &Union{Left: yyDollar[1].selStmtUnion(), Distinct: yyDollar[2].booleanUnion(), Right: yyDollar[3].selStmtUnion()} } yyVAL.union = yyLOCAL - case 70: + case 71: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:841 +//line sql.y:846 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 71: + case 72: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:845 +//line sql.y:850 { setLockInSelect(yyDollar[1].selStmtUnion(), yyDollar[2].lockUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 72: + case 73: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:850 +//line sql.y:855 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 73: + case 74: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:854 +//line sql.y:859 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 74: + case 75: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:860 +//line sql.y:865 { yyLOCAL = yyDollar[2].selStmtUnion() } yyVAL.union = yyLOCAL - case 75: + case 76: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:864 +//line sql.y:869 { yyDollar[1].selStmtUnion().SetInto(yyDollar[2].selectIntoUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 76: + case 77: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:869 +//line sql.y:874 { yyDollar[1].selStmtUnion().SetInto(yyDollar[2].selectIntoUnion()) yyDollar[1].selStmtUnion().SetLock(yyDollar[3].lockUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 77: + case 78: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:875 +//line sql.y:880 { yyDollar[1].selStmtUnion().SetInto(yyDollar[3].selectIntoUnion()) yyDollar[1].selStmtUnion().SetLock(yyDollar[2].lockUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 78: + case 79: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:881 +//line sql.y:886 { yyDollar[1].selStmtUnion().SetInto(yyDollar[2].selectIntoUnion()) yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 79: + case 80: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:888 +//line sql.y:893 { yyLOCAL = &Stream{Comments: Comments(yyDollar[2].strs).Parsed(), SelectExpr: yyDollar[3].selectExprUnion(), Table: yyDollar[5].tableName} } yyVAL.union = yyLOCAL - case 80: + case 81: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:894 +//line sql.y:899 { yyLOCAL = &VStream{Comments: Comments(yyDollar[2].strs).Parsed(), SelectExpr: yyDollar[3].selectExprUnion(), Table: yyDollar[5].tableName, Where: NewWhere(WhereClause, yyDollar[6].exprUnion()), Limit: yyDollar[7].limitUnion()} } yyVAL.union = yyLOCAL - case 81: + case 82: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:902 +//line sql.y:907 { yyLOCAL = NewSelect(Comments(yyDollar[2].strs), yyDollar[4].selectExprsUnion() /*SelectExprs*/, yyDollar[3].strs /*options*/, yyDollar[5].selectIntoUnion() /*into*/, yyDollar[6].tableExprsUnion() /*from*/, NewWhere(WhereClause, yyDollar[7].exprUnion()), GroupBy(yyDollar[8].exprsUnion()), NewWhere(HavingClause, yyDollar[9].exprUnion()), yyDollar[10].namedWindowsUnion()) } yyVAL.union = yyLOCAL - case 82: + case 83: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL SelectStatement -//line sql.y:906 +//line sql.y:911 { yyLOCAL = NewSelect(Comments(yyDollar[2].strs), yyDollar[4].selectExprsUnion() /*SelectExprs*/, yyDollar[3].strs /*options*/, nil, yyDollar[5].tableExprsUnion() /*from*/, NewWhere(WhereClause, yyDollar[6].exprUnion()), GroupBy(yyDollar[7].exprsUnion()), NewWhere(HavingClause, yyDollar[8].exprUnion()), yyDollar[9].namedWindowsUnion()) } yyVAL.union = yyLOCAL - case 83: + case 84: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:912 +//line sql.y:917 { // insert_data returns a *Insert pre-filled with Columns & Values ins := yyDollar[6].insUnion() @@ -9311,10 +9658,10 @@ yydefault: yyLOCAL = ins } yyVAL.union = yyLOCAL - case 84: + case 85: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Statement -//line sql.y:924 +//line sql.y:929 { cols := make(Columns, 0, len(yyDollar[7].updateExprsUnion())) vals := make(ValTuple, 0, len(yyDollar[8].updateExprsUnion())) @@ -9325,329 +9672,329 @@ yydefault: yyLOCAL = &Insert{Action: yyDollar[1].insertActionUnion(), Comments: Comments(yyDollar[2].strs).Parsed(), Ignore: yyDollar[3].ignoreUnion(), Table: yyDollar[4].tableName, Partitions: yyDollar[5].partitionsUnion(), Columns: cols, Rows: Values{vals}, OnDup: OnDup(yyDollar[8].updateExprsUnion())} } yyVAL.union = yyLOCAL - case 85: + case 86: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL InsertAction -//line sql.y:936 +//line sql.y:941 { yyLOCAL = InsertAct } yyVAL.union = yyLOCAL - case 86: + case 87: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL InsertAction -//line sql.y:940 +//line sql.y:945 { yyLOCAL = ReplaceAct } yyVAL.union = yyLOCAL - case 87: + case 88: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Statement -//line sql.y:946 +//line sql.y:951 { yyLOCAL = &Update{With: yyDollar[1].withUnion(), Comments: Comments(yyDollar[3].strs).Parsed(), Ignore: yyDollar[4].ignoreUnion(), TableExprs: yyDollar[5].tableExprsUnion(), Exprs: yyDollar[7].updateExprsUnion(), Where: NewWhere(WhereClause, yyDollar[8].exprUnion()), OrderBy: yyDollar[9].orderByUnion(), Limit: yyDollar[10].limitUnion()} } yyVAL.union = yyLOCAL - case 88: + case 89: yyDollar = yyS[yypt-11 : yypt+1] var yyLOCAL Statement -//line sql.y:952 +//line sql.y:957 { yyLOCAL = &Delete{With: yyDollar[1].withUnion(), Comments: Comments(yyDollar[3].strs).Parsed(), Ignore: yyDollar[4].ignoreUnion(), TableExprs: TableExprs{&AliasedTableExpr{Expr: yyDollar[6].tableName, As: yyDollar[7].identifierCS}}, Partitions: yyDollar[8].partitionsUnion(), Where: NewWhere(WhereClause, yyDollar[9].exprUnion()), OrderBy: yyDollar[10].orderByUnion(), Limit: yyDollar[11].limitUnion()} } yyVAL.union = yyLOCAL - case 89: + case 90: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Statement -//line sql.y:956 +//line sql.y:961 { yyLOCAL = &Delete{With: yyDollar[1].withUnion(), Comments: Comments(yyDollar[3].strs).Parsed(), Ignore: yyDollar[4].ignoreUnion(), Targets: yyDollar[6].tableNamesUnion(), TableExprs: yyDollar[8].tableExprsUnion(), Where: NewWhere(WhereClause, yyDollar[9].exprUnion())} } yyVAL.union = yyLOCAL - case 90: + case 91: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Statement -//line sql.y:960 +//line sql.y:965 { yyLOCAL = &Delete{With: yyDollar[1].withUnion(), Comments: Comments(yyDollar[3].strs).Parsed(), Ignore: yyDollar[4].ignoreUnion(), Targets: yyDollar[5].tableNamesUnion(), TableExprs: yyDollar[7].tableExprsUnion(), Where: NewWhere(WhereClause, yyDollar[8].exprUnion())} } yyVAL.union = yyLOCAL - case 91: + case 92: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Statement -//line sql.y:964 +//line sql.y:969 { yyLOCAL = &Delete{With: yyDollar[1].withUnion(), Comments: Comments(yyDollar[3].strs).Parsed(), Ignore: yyDollar[4].ignoreUnion(), Targets: yyDollar[5].tableNamesUnion(), TableExprs: yyDollar[7].tableExprsUnion(), Where: NewWhere(WhereClause, yyDollar[8].exprUnion())} } yyVAL.union = yyLOCAL - case 92: + case 93: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:969 +//line sql.y:974 { } - case 93: + case 94: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:970 +//line sql.y:975 { } - case 94: + case 95: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableNames -//line sql.y:974 +//line sql.y:979 { yyLOCAL = TableNames{yyDollar[1].tableName.ToViewName()} } yyVAL.union = yyLOCAL - case 95: + case 96: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:978 +//line sql.y:983 { yySLICE := (*TableNames)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableName.ToViewName()) } - case 96: + case 97: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableNames -//line sql.y:984 +//line sql.y:989 { yyLOCAL = TableNames{yyDollar[1].tableName} } yyVAL.union = yyLOCAL - case 97: + case 98: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:988 +//line sql.y:993 { yySLICE := (*TableNames)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableName) } - case 98: + case 99: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableNames -//line sql.y:994 +//line sql.y:999 { yyLOCAL = TableNames{yyDollar[1].tableName} } yyVAL.union = yyLOCAL - case 99: + case 100: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:998 +//line sql.y:1003 { yySLICE := (*TableNames)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableName) } - case 100: + case 101: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Partitions -//line sql.y:1003 +//line sql.y:1008 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 101: + case 102: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Partitions -//line sql.y:1007 +//line sql.y:1012 { yyLOCAL = yyDollar[3].partitionsUnion() } yyVAL.union = yyLOCAL - case 102: + case 103: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:1013 +//line sql.y:1018 { yyLOCAL = NewSetStatement(Comments(yyDollar[2].strs).Parsed(), yyDollar[3].setExprsUnion()) } yyVAL.union = yyLOCAL - case 103: + case 104: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SetExprs -//line sql.y:1019 +//line sql.y:1024 { yyLOCAL = SetExprs{yyDollar[1].setExprUnion()} } yyVAL.union = yyLOCAL - case 104: + case 105: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1023 +//line sql.y:1028 { yySLICE := (*SetExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].setExprUnion()) } - case 105: + case 106: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1029 +//line sql.y:1034 { yyLOCAL = &SetExpr{Var: yyDollar[1].variableUnion(), Expr: NewStrLiteral("on")} } yyVAL.union = yyLOCAL - case 106: + case 107: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1033 +//line sql.y:1038 { yyLOCAL = &SetExpr{Var: yyDollar[1].variableUnion(), Expr: NewStrLiteral("off")} } yyVAL.union = yyLOCAL - case 107: + case 108: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1037 +//line sql.y:1042 { yyLOCAL = &SetExpr{Var: yyDollar[1].variableUnion(), Expr: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 108: + case 109: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1041 +//line sql.y:1046 { yyLOCAL = &SetExpr{Var: NewSetVariable(string(yyDollar[1].str), SessionScope), Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 109: + case 110: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Variable -//line sql.y:1047 +//line sql.y:1052 { yyLOCAL = NewSetVariable(string(yyDollar[1].str), SessionScope) } yyVAL.union = yyLOCAL - case 110: + case 111: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Variable -//line sql.y:1051 +//line sql.y:1056 { yyLOCAL = yyDollar[1].variableUnion() } yyVAL.union = yyLOCAL - case 111: + case 112: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Variable -//line sql.y:1055 +//line sql.y:1060 { yyLOCAL = NewSetVariable(string(yyDollar[2].str), yyDollar[1].scopeUnion()) } yyVAL.union = yyLOCAL - case 112: + case 113: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:1061 +//line sql.y:1066 { yyLOCAL = NewSetStatement(Comments(yyDollar[2].strs).Parsed(), UpdateSetExprsScope(yyDollar[5].setExprsUnion(), yyDollar[3].scopeUnion())) } yyVAL.union = yyLOCAL - case 113: + case 114: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:1065 +//line sql.y:1070 { yyLOCAL = NewSetStatement(Comments(yyDollar[2].strs).Parsed(), yyDollar[4].setExprsUnion()) } yyVAL.union = yyLOCAL - case 114: + case 115: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SetExprs -//line sql.y:1071 +//line sql.y:1076 { yyLOCAL = SetExprs{yyDollar[1].setExprUnion()} } yyVAL.union = yyLOCAL - case 115: + case 116: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1075 +//line sql.y:1080 { yySLICE := (*SetExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].setExprUnion()) } - case 116: + case 117: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1081 +//line sql.y:1086 { yyLOCAL = &SetExpr{Var: NewSetVariable(TransactionIsolationStr, NextTxScope), Expr: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 117: + case 118: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1085 +//line sql.y:1090 { yyLOCAL = &SetExpr{Var: NewSetVariable(TransactionReadOnlyStr, NextTxScope), Expr: NewStrLiteral("off")} } yyVAL.union = yyLOCAL - case 118: + case 119: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SetExpr -//line sql.y:1089 +//line sql.y:1094 { yyLOCAL = &SetExpr{Var: NewSetVariable(TransactionReadOnlyStr, NextTxScope), Expr: NewStrLiteral("on")} } yyVAL.union = yyLOCAL - case 119: + case 120: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1095 +//line sql.y:1100 { yyVAL.str = RepeatableReadStr } - case 120: + case 121: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1099 +//line sql.y:1104 { yyVAL.str = ReadCommittedStr } - case 121: + case 122: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1103 +//line sql.y:1108 { yyVAL.str = ReadUncommittedStr } - case 122: + case 123: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1107 +//line sql.y:1112 { yyVAL.str = SerializableStr } - case 123: + case 124: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Scope -//line sql.y:1113 +//line sql.y:1118 { yyLOCAL = SessionScope } yyVAL.union = yyLOCAL - case 124: + case 125: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Scope -//line sql.y:1117 +//line sql.y:1122 { yyLOCAL = SessionScope } yyVAL.union = yyLOCAL - case 125: + case 126: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Scope -//line sql.y:1121 +//line sql.y:1126 { yyLOCAL = GlobalScope } yyVAL.union = yyLOCAL - case 126: + case 127: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:1127 +//line sql.y:1132 { yyDollar[1].createTableUnion().TableSpec = yyDollar[2].tableSpecUnion() yyDollar[1].createTableUnion().FullyParsed = true yyLOCAL = yyDollar[1].createTableUnion() } yyVAL.union = yyLOCAL - case 127: + case 128: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:1133 +//line sql.y:1138 { // Create table [name] like [name] yyDollar[1].createTableUnion().OptLike = yyDollar[2].optLikeUnion() @@ -9655,10 +10002,10 @@ yydefault: yyLOCAL = yyDollar[1].createTableUnion() } yyVAL.union = yyLOCAL - case 128: + case 129: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:1140 +//line sql.y:1145 { indexDef := yyDollar[1].alterTableUnion().AlterOptions[0].(*AddIndexDefinition).IndexDefinition indexDef.Columns = yyDollar[3].indexColumnsUnion() @@ -9668,413 +10015,413 @@ yydefault: yyLOCAL = yyDollar[1].alterTableUnion() } yyVAL.union = yyLOCAL - case 129: + case 130: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Statement -//line sql.y:1149 +//line sql.y:1154 { yyLOCAL = &CreateView{ViewName: yyDollar[8].tableName.ToViewName(), Comments: Comments(yyDollar[2].strs).Parsed(), IsReplace: yyDollar[3].booleanUnion(), Algorithm: yyDollar[4].str, Definer: yyDollar[5].definerUnion(), Security: yyDollar[6].str, Columns: yyDollar[9].columnsUnion(), Select: yyDollar[11].selStmtUnion(), CheckOption: yyDollar[12].str} } yyVAL.union = yyLOCAL - case 130: + case 131: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:1153 +//line sql.y:1158 { yyDollar[1].createDatabaseUnion().FullyParsed = true yyDollar[1].createDatabaseUnion().CreateOptions = yyDollar[2].databaseOptionsUnion() yyLOCAL = yyDollar[1].createDatabaseUnion() } yyVAL.union = yyLOCAL - case 131: + case 132: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:1160 +//line sql.y:1165 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 132: + case 133: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:1164 +//line sql.y:1169 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 133: + case 134: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:1169 +//line sql.y:1174 { yyVAL.identifierCI = NewIdentifierCI("") } - case 134: + case 135: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1173 +//line sql.y:1178 { yyVAL.identifierCI = yyDollar[2].identifierCI } - case 135: + case 136: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1179 +//line sql.y:1184 { yyVAL.identifierCI = yyDollar[1].identifierCI } - case 136: + case 137: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []VindexParam -//line sql.y:1184 +//line sql.y:1189 { var v []VindexParam yyLOCAL = v } yyVAL.union = yyLOCAL - case 137: + case 138: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []VindexParam -//line sql.y:1189 +//line sql.y:1194 { yyLOCAL = yyDollar[2].vindexParamsUnion() } yyVAL.union = yyLOCAL - case 138: + case 139: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []VindexParam -//line sql.y:1195 +//line sql.y:1200 { yyLOCAL = make([]VindexParam, 0, 4) yyLOCAL = append(yyLOCAL, yyDollar[1].vindexParam) } yyVAL.union = yyLOCAL - case 139: + case 140: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1200 +//line sql.y:1205 { yySLICE := (*[]VindexParam)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].vindexParam) } - case 140: + case 141: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1206 +//line sql.y:1211 { yyVAL.vindexParam = VindexParam{Key: yyDollar[1].identifierCI, Val: yyDollar[3].str} } - case 141: + case 142: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*JSONObjectParam -//line sql.y:1211 +//line sql.y:1216 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 142: + case 143: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*JSONObjectParam -//line sql.y:1215 +//line sql.y:1220 { yyLOCAL = yyDollar[1].jsonObjectParamsUnion() } yyVAL.union = yyLOCAL - case 143: + case 144: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*JSONObjectParam -//line sql.y:1221 +//line sql.y:1226 { yyLOCAL = []*JSONObjectParam{yyDollar[1].jsonObjectParam} } yyVAL.union = yyLOCAL - case 144: + case 145: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1225 +//line sql.y:1230 { yySLICE := (*[]*JSONObjectParam)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].jsonObjectParam) } - case 145: + case 146: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1231 +//line sql.y:1236 { yyVAL.jsonObjectParam = &JSONObjectParam{Key: yyDollar[1].exprUnion(), Value: yyDollar[3].exprUnion()} } - case 146: + case 147: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *CreateTable -//line sql.y:1237 +//line sql.y:1242 { yyLOCAL = &CreateTable{Comments: Comments(yyDollar[2].strs).Parsed(), Table: yyDollar[6].tableName, IfNotExists: yyDollar[5].booleanUnion(), Temp: yyDollar[3].booleanUnion()} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 147: + case 148: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *AlterTable -//line sql.y:1244 +//line sql.y:1249 { yyLOCAL = &AlterTable{Comments: Comments(yyDollar[2].strs).Parsed(), Table: yyDollar[4].tableName} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 148: + case 149: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *AlterTable -//line sql.y:1251 +//line sql.y:1256 { yyLOCAL = &AlterTable{Table: yyDollar[7].tableName, AlterOptions: []AlterOption{&AddIndexDefinition{IndexDefinition: &IndexDefinition{Info: &IndexInfo{Name: yyDollar[4].identifierCI, Type: string(yyDollar[3].str)}, Options: yyDollar[5].indexOptionsUnion()}}}} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 149: + case 150: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *AlterTable -//line sql.y:1256 +//line sql.y:1261 { yyLOCAL = &AlterTable{Table: yyDollar[8].tableName, AlterOptions: []AlterOption{&AddIndexDefinition{IndexDefinition: &IndexDefinition{Info: &IndexInfo{Name: yyDollar[5].identifierCI, Type: string(yyDollar[3].str) + " " + string(yyDollar[4].str), Fulltext: true}, Options: yyDollar[6].indexOptionsUnion()}}}} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 150: + case 151: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *AlterTable -//line sql.y:1261 +//line sql.y:1266 { yyLOCAL = &AlterTable{Table: yyDollar[8].tableName, AlterOptions: []AlterOption{&AddIndexDefinition{IndexDefinition: &IndexDefinition{Info: &IndexInfo{Name: yyDollar[5].identifierCI, Type: string(yyDollar[3].str) + " " + string(yyDollar[4].str), Spatial: true}, Options: yyDollar[6].indexOptionsUnion()}}}} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 151: + case 152: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *AlterTable -//line sql.y:1266 +//line sql.y:1271 { yyLOCAL = &AlterTable{Table: yyDollar[8].tableName, AlterOptions: []AlterOption{&AddIndexDefinition{IndexDefinition: &IndexDefinition{Info: &IndexInfo{Name: yyDollar[5].identifierCI, Type: string(yyDollar[3].str) + " " + string(yyDollar[4].str), Unique: true}, Options: yyDollar[6].indexOptionsUnion()}}}} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 152: + case 153: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *CreateDatabase -//line sql.y:1273 +//line sql.y:1278 { yyLOCAL = &CreateDatabase{Comments: Comments(yyDollar[4].strs).Parsed(), DBName: yyDollar[6].identifierCS, IfNotExists: yyDollar[5].booleanUnion()} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 153: + case 154: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *AlterDatabase -//line sql.y:1280 +//line sql.y:1285 { yyLOCAL = &AlterDatabase{} setDDL(yylex, yyLOCAL) } yyVAL.union = yyLOCAL - case 156: + case 157: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *TableSpec -//line sql.y:1291 +//line sql.y:1296 { yyLOCAL = yyDollar[2].tableSpecUnion() yyLOCAL.Options = yyDollar[4].tableOptionsUnion() yyLOCAL.PartitionOption = yyDollar[5].partitionOptionUnion() } yyVAL.union = yyLOCAL - case 157: + case 158: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []DatabaseOption -//line sql.y:1298 +//line sql.y:1303 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 158: + case 159: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []DatabaseOption -//line sql.y:1302 +//line sql.y:1307 { yyLOCAL = yyDollar[1].databaseOptionsUnion() } yyVAL.union = yyLOCAL - case 159: + case 160: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []DatabaseOption -//line sql.y:1308 +//line sql.y:1313 { yyLOCAL = []DatabaseOption{yyDollar[1].databaseOption} } yyVAL.union = yyLOCAL - case 160: + case 161: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []DatabaseOption -//line sql.y:1312 +//line sql.y:1317 { yyLOCAL = []DatabaseOption{yyDollar[1].databaseOption} } yyVAL.union = yyLOCAL - case 161: + case 162: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []DatabaseOption -//line sql.y:1316 +//line sql.y:1321 { yyLOCAL = []DatabaseOption{yyDollar[1].databaseOption} } yyVAL.union = yyLOCAL - case 162: + case 163: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1320 +//line sql.y:1325 { yySLICE := (*[]DatabaseOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].databaseOption) } - case 163: + case 164: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1324 +//line sql.y:1329 { yySLICE := (*[]DatabaseOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].databaseOption) } - case 164: + case 165: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1328 +//line sql.y:1333 { yySLICE := (*[]DatabaseOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].databaseOption) } - case 165: + case 166: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:1334 +//line sql.y:1339 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 166: + case 167: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:1338 +//line sql.y:1343 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 167: + case 168: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1344 +//line sql.y:1349 { yyVAL.databaseOption = DatabaseOption{Type: CharacterSetType, Value: string(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 168: + case 169: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1348 +//line sql.y:1353 { yyVAL.databaseOption = DatabaseOption{Type: CharacterSetType, Value: encodeSQLString(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 169: + case 170: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1354 +//line sql.y:1359 { yyVAL.databaseOption = DatabaseOption{Type: CollateType, Value: string(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 170: + case 171: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1358 +//line sql.y:1363 { yyVAL.databaseOption = DatabaseOption{Type: CollateType, Value: encodeSQLString(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 171: + case 172: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1364 +//line sql.y:1369 { yyVAL.databaseOption = DatabaseOption{Type: EncryptionType, Value: string(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 172: + case 173: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1368 +//line sql.y:1373 { yyVAL.databaseOption = DatabaseOption{Type: EncryptionType, Value: encodeSQLString(yyDollar[4].str), IsDefault: yyDollar[1].booleanUnion()} } - case 173: + case 174: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *OptLike -//line sql.y:1374 +//line sql.y:1379 { yyLOCAL = &OptLike{LikeTable: yyDollar[2].tableName} } yyVAL.union = yyLOCAL - case 174: + case 175: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *OptLike -//line sql.y:1378 +//line sql.y:1383 { yyLOCAL = &OptLike{LikeTable: yyDollar[3].tableName} } yyVAL.union = yyLOCAL - case 175: + case 176: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*ColumnDefinition -//line sql.y:1384 +//line sql.y:1389 { yyLOCAL = []*ColumnDefinition{yyDollar[1].columnDefinitionUnion()} } yyVAL.union = yyLOCAL - case 176: + case 177: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1388 +//line sql.y:1393 { yySLICE := (*[]*ColumnDefinition)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].columnDefinitionUnion()) } - case 177: + case 178: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *TableSpec -//line sql.y:1394 +//line sql.y:1399 { yyLOCAL = &TableSpec{} yyLOCAL.AddColumn(yyDollar[1].columnDefinitionUnion()) } yyVAL.union = yyLOCAL - case 178: + case 179: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *TableSpec -//line sql.y:1399 +//line sql.y:1404 { yyLOCAL = &TableSpec{} yyLOCAL.AddConstraint(yyDollar[1].constraintDefinitionUnion()) } yyVAL.union = yyLOCAL - case 179: + case 180: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1404 +//line sql.y:1409 { yyVAL.tableSpecUnion().AddColumn(yyDollar[3].columnDefinitionUnion()) } - case 180: + case 181: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1408 +//line sql.y:1413 { yyVAL.tableSpecUnion().AddColumn(yyDollar[3].columnDefinitionUnion()) yyVAL.tableSpecUnion().AddConstraint(yyDollar[4].constraintDefinitionUnion()) } - case 181: + case 182: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1413 +//line sql.y:1418 { yyVAL.tableSpecUnion().AddIndex(yyDollar[3].indexDefinitionUnion()) } - case 182: + case 183: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1417 +//line sql.y:1422 { yyVAL.tableSpecUnion().AddConstraint(yyDollar[3].constraintDefinitionUnion()) } - case 183: + case 184: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1421 +//line sql.y:1426 { yyVAL.tableSpecUnion().AddConstraint(yyDollar[3].constraintDefinitionUnion()) } - case 184: + case 185: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ColumnDefinition -//line sql.y:1432 +//line sql.y:1437 { yyDollar[2].columnType.Options = yyDollar[4].columnTypeOptionsUnion() if yyDollar[2].columnType.Options.Collate == "" { @@ -10084,10 +10431,10 @@ yydefault: yyLOCAL = &ColumnDefinition{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType} } yyVAL.union = yyLOCAL - case 185: + case 186: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL *ColumnDefinition -//line sql.y:1441 +//line sql.y:1446 { yyDollar[2].columnType.Options = yyDollar[9].columnTypeOptionsUnion() yyDollar[2].columnType.Options.As = yyDollar[7].exprUnion() @@ -10096,361 +10443,353 @@ yydefault: yyLOCAL = &ColumnDefinition{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType} } yyVAL.union = yyLOCAL - case 186: + case 187: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:1450 +//line sql.y:1455 { yyVAL.str = "" } - case 187: + case 188: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1454 +//line sql.y:1459 { yyVAL.str = "" } - case 188: + case 189: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1463 +//line sql.y:1468 { yyLOCAL = &ColumnTypeOptions{Null: nil, Default: nil, OnUpdate: nil, Autoincrement: false, KeyOpt: ColKeyNone, Comment: nil, As: nil, Invisible: nil, Format: UnspecifiedFormat, EngineAttribute: nil, SecondaryEngineAttribute: nil} } yyVAL.union = yyLOCAL - case 189: + case 190: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1467 +//line sql.y:1472 { val := true yyDollar[1].columnTypeOptionsUnion().Null = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 190: + case 191: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1473 +//line sql.y:1478 { val := false yyDollar[1].columnTypeOptionsUnion().Null = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 191: + case 192: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1479 +//line sql.y:1484 { yyDollar[1].columnTypeOptionsUnion().Default = yyDollar[4].exprUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 192: + case 193: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1484 +//line sql.y:1489 { yyDollar[1].columnTypeOptionsUnion().Default = yyDollar[3].exprUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 193: + case 194: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1489 +//line sql.y:1494 { yyDollar[1].columnTypeOptionsUnion().OnUpdate = yyDollar[4].exprUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 194: + case 195: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1494 +//line sql.y:1499 { yyDollar[1].columnTypeOptionsUnion().Autoincrement = true yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 195: + case 196: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1499 +//line sql.y:1504 { yyDollar[1].columnTypeOptionsUnion().Comment = NewStrLiteral(yyDollar[3].str) yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 196: + case 197: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1504 +//line sql.y:1509 { yyDollar[1].columnTypeOptionsUnion().KeyOpt = yyDollar[2].colKeyOptUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 197: + case 198: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1509 +//line sql.y:1514 { yyDollar[1].columnTypeOptionsUnion().Collate = encodeSQLString(yyDollar[3].str) } - case 198: + case 199: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1513 +//line sql.y:1518 { yyDollar[1].columnTypeOptionsUnion().Collate = string(yyDollar[3].identifierCI.String()) yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 199: + case 200: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1518 +//line sql.y:1523 { yyDollar[1].columnTypeOptionsUnion().Format = yyDollar[3].columnFormatUnion() } - case 200: + case 201: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1522 +//line sql.y:1527 { yyDollar[1].columnTypeOptionsUnion().SRID = NewIntLiteral(yyDollar[3].str) yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 201: + case 202: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1527 +//line sql.y:1532 { val := false yyDollar[1].columnTypeOptionsUnion().Invisible = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 202: + case 203: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1533 +//line sql.y:1538 { val := true yyDollar[1].columnTypeOptionsUnion().Invisible = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 203: + case 204: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1539 +//line sql.y:1544 { yyDollar[1].columnTypeOptionsUnion().EngineAttribute = NewStrLiteral(yyDollar[4].str) } - case 204: + case 205: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:1543 +//line sql.y:1548 { yyDollar[1].columnTypeOptionsUnion().SecondaryEngineAttribute = NewStrLiteral(yyDollar[4].str) } - case 205: + case 206: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnFormat -//line sql.y:1549 +//line sql.y:1554 { yyLOCAL = FixedFormat } yyVAL.union = yyLOCAL - case 206: + case 207: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnFormat -//line sql.y:1553 +//line sql.y:1558 { yyLOCAL = DynamicFormat } yyVAL.union = yyLOCAL - case 207: + case 208: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnFormat -//line sql.y:1557 +//line sql.y:1562 { yyLOCAL = DefaultFormat } yyVAL.union = yyLOCAL - case 208: + case 209: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnStorage -//line sql.y:1563 +//line sql.y:1568 { yyLOCAL = VirtualStorage } yyVAL.union = yyLOCAL - case 209: + case 210: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnStorage -//line sql.y:1567 +//line sql.y:1572 { yyLOCAL = StoredStorage } yyVAL.union = yyLOCAL - case 210: + case 211: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1572 +//line sql.y:1577 { yyLOCAL = &ColumnTypeOptions{} } yyVAL.union = yyLOCAL - case 211: + case 212: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1576 +//line sql.y:1581 { yyDollar[1].columnTypeOptionsUnion().Storage = yyDollar[2].columnStorageUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 212: + case 213: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1581 +//line sql.y:1586 { val := true yyDollar[1].columnTypeOptionsUnion().Null = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 213: + case 214: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1587 +//line sql.y:1592 { val := false yyDollar[1].columnTypeOptionsUnion().Null = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 214: + case 215: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1593 +//line sql.y:1598 { yyDollar[1].columnTypeOptionsUnion().Comment = NewStrLiteral(yyDollar[3].str) yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 215: + case 216: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1598 +//line sql.y:1603 { yyDollar[1].columnTypeOptionsUnion().KeyOpt = yyDollar[2].colKeyOptUnion() yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 216: + case 217: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1603 +//line sql.y:1608 { val := false yyDollar[1].columnTypeOptionsUnion().Invisible = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 217: + case 218: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColumnTypeOptions -//line sql.y:1609 +//line sql.y:1614 { val := true yyDollar[1].columnTypeOptionsUnion().Invisible = &val yyLOCAL = yyDollar[1].columnTypeOptionsUnion() } yyVAL.union = yyLOCAL - case 218: + case 219: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1617 +//line sql.y:1622 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 220: + case 221: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1624 +//line sql.y:1629 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("current_timestamp"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 221: + case 222: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1628 +//line sql.y:1633 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("localtime"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 222: + case 223: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1632 +//line sql.y:1637 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("localtimestamp"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 223: + case 224: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1636 +//line sql.y:1641 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("utc_timestamp"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 224: + case 225: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1640 +//line sql.y:1645 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("now"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 227: + case 228: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1650 +//line sql.y:1655 { yyLOCAL = &NullVal{} } yyVAL.union = yyLOCAL - case 229: + case 230: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1657 +//line sql.y:1662 { yyLOCAL = yyDollar[2].exprUnion() } yyVAL.union = yyLOCAL - case 230: + case 231: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1661 +//line sql.y:1666 { yyLOCAL = &UnaryExpr{Operator: UMinusOp, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 231: - yyDollar = yyS[yypt-1 : yypt+1] - var yyLOCAL Expr -//line sql.y:1667 - { - yyLOCAL = yyDollar[1].exprUnion() - } - yyVAL.union = yyLOCAL case 232: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1671 +//line sql.y:1672 { yyLOCAL = yyDollar[1].exprUnion() } @@ -10458,58 +10797,57 @@ yydefault: case 233: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1675 +//line sql.y:1676 { - yyLOCAL = yyDollar[1].boolValUnion() + yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL case 234: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1679 +//line sql.y:1680 { - yyLOCAL = NewHexLiteral(yyDollar[1].str) + yyLOCAL = yyDollar[1].boolValUnion() } yyVAL.union = yyLOCAL case 235: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1683 +//line sql.y:1684 { - yyLOCAL = NewHexNumLiteral(yyDollar[1].str) + yyLOCAL = NewHexLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 236: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1687 +//line sql.y:1688 { - yyLOCAL = NewBitLiteral(yyDollar[1].str[2:]) + yyLOCAL = NewHexNumLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 237: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1691 +//line sql.y:1692 { - yyLOCAL = NewBitLiteral(yyDollar[1].str) + yyLOCAL = NewBitLiteral(yyDollar[1].str[2:]) } yyVAL.union = yyLOCAL case 238: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1695 +//line sql.y:1696 { - yyLOCAL = NewArgument(yyDollar[1].str[1:]) - bindVariable(yylex, yyDollar[1].str[1:]) + yyLOCAL = NewBitLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 239: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr //line sql.y:1700 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewBitLiteral(yyDollar[2].str)} + yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) } yyVAL.union = yyLOCAL case 240: @@ -10517,7 +10855,7 @@ yydefault: var yyLOCAL Expr //line sql.y:1704 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewHexNumLiteral(yyDollar[2].str)} + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewBitLiteral(yyDollar[2].str)} } yyVAL.union = yyLOCAL case 241: @@ -10525,7 +10863,7 @@ yydefault: var yyLOCAL Expr //line sql.y:1708 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewBitLiteral(yyDollar[2].str[2:])} + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewHexNumLiteral(yyDollar[2].str)} } yyVAL.union = yyLOCAL case 242: @@ -10533,7 +10871,7 @@ yydefault: var yyLOCAL Expr //line sql.y:1712 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewHexLiteral(yyDollar[2].str)} + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewBitLiteral(yyDollar[2].str[2:])} } yyVAL.union = yyLOCAL case 243: @@ -10541,7 +10879,7 @@ yydefault: var yyLOCAL Expr //line sql.y:1716 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: yyDollar[2].exprUnion()} + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewHexLiteral(yyDollar[2].str)} } yyVAL.union = yyLOCAL case 244: @@ -10549,16 +10887,16 @@ yydefault: var yyLOCAL Expr //line sql.y:1720 { - bindVariable(yylex, yyDollar[2].str[1:]) - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewArgument(yyDollar[2].str[1:])} + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL case 245: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1725 +//line sql.y:1724 { - yyLOCAL = NewDateLiteral(yyDollar[2].str) + arg := parseBindVariable(yylex, yyDollar[2].str[1:]) + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: arg} } yyVAL.union = yyLOCAL case 246: @@ -10566,7 +10904,7 @@ yydefault: var yyLOCAL Expr //line sql.y:1729 { - yyLOCAL = NewTimeLiteral(yyDollar[2].str) + yyLOCAL = NewDateLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL case 247: @@ -10574,275 +10912,275 @@ yydefault: var yyLOCAL Expr //line sql.y:1733 { - yyLOCAL = NewTimestampLiteral(yyDollar[2].str) + yyLOCAL = NewTimeLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL case 248: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1739 + yyDollar = yyS[yypt-2 : yypt+1] + var yyLOCAL Expr +//line sql.y:1737 { - yyVAL.str = Armscii8Str + yyLOCAL = NewTimestampLiteral(yyDollar[2].str) } + yyVAL.union = yyLOCAL case 249: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1743 { - yyVAL.str = ASCIIStr + yyVAL.str = Armscii8Str } case 250: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1747 { - yyVAL.str = Big5Str + yyVAL.str = ASCIIStr } case 251: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1751 { - yyVAL.str = UBinaryStr + yyVAL.str = Big5Str } case 252: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1755 { - yyVAL.str = Cp1250Str + yyVAL.str = UBinaryStr } case 253: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1759 { - yyVAL.str = Cp1251Str + yyVAL.str = Cp1250Str } case 254: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1763 { - yyVAL.str = Cp1256Str + yyVAL.str = Cp1251Str } case 255: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1767 { - yyVAL.str = Cp1257Str + yyVAL.str = Cp1256Str } case 256: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1771 { - yyVAL.str = Cp850Str + yyVAL.str = Cp1257Str } case 257: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1775 { - yyVAL.str = Cp852Str + yyVAL.str = Cp850Str } case 258: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1779 { - yyVAL.str = Cp866Str + yyVAL.str = Cp852Str } case 259: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1783 { - yyVAL.str = Cp932Str + yyVAL.str = Cp866Str } case 260: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1787 { - yyVAL.str = Dec8Str + yyVAL.str = Cp932Str } case 261: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1791 { - yyVAL.str = EucjpmsStr + yyVAL.str = Dec8Str } case 262: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1795 { - yyVAL.str = EuckrStr + yyVAL.str = EucjpmsStr } case 263: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1799 { - yyVAL.str = Gb18030Str + yyVAL.str = EuckrStr } case 264: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1803 { - yyVAL.str = Gb2312Str + yyVAL.str = Gb18030Str } case 265: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1807 { - yyVAL.str = GbkStr + yyVAL.str = Gb2312Str } case 266: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1811 { - yyVAL.str = Geostd8Str + yyVAL.str = GbkStr } case 267: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1815 { - yyVAL.str = GreekStr + yyVAL.str = Geostd8Str } case 268: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1819 { - yyVAL.str = HebrewStr + yyVAL.str = GreekStr } case 269: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1823 { - yyVAL.str = Hp8Str + yyVAL.str = HebrewStr } case 270: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1827 { - yyVAL.str = Keybcs2Str + yyVAL.str = Hp8Str } case 271: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1831 { - yyVAL.str = Koi8rStr + yyVAL.str = Keybcs2Str } case 272: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1835 { - yyVAL.str = Koi8uStr + yyVAL.str = Koi8rStr } case 273: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1839 { - yyVAL.str = Latin1Str + yyVAL.str = Koi8uStr } case 274: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1843 { - yyVAL.str = Latin2Str + yyVAL.str = Latin1Str } case 275: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1847 { - yyVAL.str = Latin5Str + yyVAL.str = Latin2Str } case 276: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1851 { - yyVAL.str = Latin7Str + yyVAL.str = Latin5Str } case 277: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1855 { - yyVAL.str = MacceStr + yyVAL.str = Latin7Str } case 278: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1859 { - yyVAL.str = MacromanStr + yyVAL.str = MacceStr } case 279: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1863 { - yyVAL.str = SjisStr + yyVAL.str = MacromanStr } case 280: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1867 { - yyVAL.str = Swe7Str + yyVAL.str = SjisStr } case 281: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1871 { - yyVAL.str = Tis620Str + yyVAL.str = Swe7Str } case 282: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1875 { - yyVAL.str = Ucs2Str + yyVAL.str = Tis620Str } case 283: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1879 { - yyVAL.str = UjisStr + yyVAL.str = Ucs2Str } case 284: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1883 { - yyVAL.str = Utf16Str + yyVAL.str = UjisStr } case 285: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1887 { - yyVAL.str = Utf16leStr + yyVAL.str = Utf16Str } case 286: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1891 { - yyVAL.str = Utf32Str + yyVAL.str = Utf16leStr } case 287: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1895 { - yyVAL.str = Utf8Str + yyVAL.str = Utf32Str } case 288: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1899 { - yyVAL.str = Utf8mb4Str + yyVAL.str = Utf8Str } case 289: yyDollar = yyS[yypt-1 : yypt+1] //line sql.y:1903 { - yyVAL.str = Utf8Str + yyVAL.str = Utf8mb4Str } - case 292: + case 290: yyDollar = yyS[yypt-1 : yypt+1] - var yyLOCAL Expr -//line sql.y:1913 +//line sql.y:1907 { - yyLOCAL = NewIntLiteral(yyDollar[1].str) + yyVAL.str = Utf8Str } - yyVAL.union = yyLOCAL case 293: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr //line sql.y:1917 { - yyLOCAL = NewFloatLiteral(yyDollar[1].str) + yyLOCAL = NewIntLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 294: @@ -10850,15 +11188,15 @@ yydefault: var yyLOCAL Expr //line sql.y:1921 { - yyLOCAL = NewDecimalLiteral(yyDollar[1].str) + yyLOCAL = NewFloatLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 295: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:1927 +//line sql.y:1925 { - yyLOCAL = NewStrLiteral(yyDollar[1].str) + yyLOCAL = NewDecimalLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 296: @@ -10866,23 +11204,23 @@ yydefault: var yyLOCAL Expr //line sql.y:1931 { - yyLOCAL = &UnaryExpr{Operator: NStringOp, Expr: NewStrLiteral(yyDollar[1].str)} + yyLOCAL = NewStrLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL case 297: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr //line sql.y:1935 { - yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewStrLiteral(yyDollar[2].str)} + yyLOCAL = &UnaryExpr{Operator: NStringOp, Expr: NewStrLiteral(yyDollar[1].str)} } yyVAL.union = yyLOCAL case 298: - yyDollar = yyS[yypt-1 : yypt+1] + yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:1941 +//line sql.y:1939 { - yyLOCAL = yyDollar[1].exprUnion() + yyLOCAL = &IntroducerExpr{CharacterSet: yyDollar[1].str, Expr: NewStrLiteral(yyDollar[2].str)} } yyVAL.union = yyLOCAL case 299: @@ -10890,128 +11228,127 @@ yydefault: var yyLOCAL Expr //line sql.y:1945 { - yyLOCAL = NewArgument(yyDollar[1].str[1:]) - bindVariable(yylex, yyDollar[1].str[1:]) + yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL case 300: + yyDollar = yyS[yypt-1 : yypt+1] + var yyLOCAL Expr +//line sql.y:1949 + { + yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) + } + yyVAL.union = yyLOCAL + case 301: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ColumnKeyOption -//line sql.y:1952 +//line sql.y:1955 { yyLOCAL = ColKeyPrimary } yyVAL.union = yyLOCAL - case 301: + case 302: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnKeyOption -//line sql.y:1956 +//line sql.y:1959 { yyLOCAL = ColKeyUnique } yyVAL.union = yyLOCAL - case 302: + case 303: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ColumnKeyOption -//line sql.y:1960 +//line sql.y:1963 { yyLOCAL = ColKeyUniqueKey } yyVAL.union = yyLOCAL - case 303: + case 304: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColumnKeyOption -//line sql.y:1964 +//line sql.y:1967 { yyLOCAL = ColKey } yyVAL.union = yyLOCAL - case 304: + case 305: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:1970 +//line sql.y:1973 { yyVAL.columnType = yyDollar[1].columnType yyVAL.columnType.Unsigned = yyDollar[2].booleanUnion() yyVAL.columnType.Zerofill = yyDollar[3].booleanUnion() } - case 308: + case 309: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:1981 +//line sql.y:1984 { yyVAL.columnType = yyDollar[1].columnType yyVAL.columnType.Length = yyDollar[2].literalUnion() } - case 309: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1986 - { - yyVAL.columnType = yyDollar[1].columnType - } case 310: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1992 +//line sql.y:1989 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} + yyVAL.columnType = yyDollar[1].columnType } case 311: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:1996 +//line sql.y:1995 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 312: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2000 +//line sql.y:1999 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 313: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2004 +//line sql.y:2003 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 314: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2008 +//line sql.y:2007 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 315: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2012 +//line sql.y:2011 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 316: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2016 +//line sql.y:2015 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 317: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2020 +//line sql.y:2019 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 318: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2024 +//line sql.y:2023 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 319: - yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2030 + yyDollar = yyS[yypt-1 : yypt+1] +//line sql.y:2027 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} - yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length - yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale } case 320: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2036 +//line sql.y:2033 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length @@ -11019,7 +11356,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2042 +//line sql.y:2039 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length @@ -11027,7 +11364,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2048 +//line sql.y:2045 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length @@ -11035,7 +11372,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2054 +//line sql.y:2051 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length @@ -11043,7 +11380,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2060 +//line sql.y:2057 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length @@ -11051,1753 +11388,1767 @@ yydefault: } case 325: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2066 +//line sql.y:2063 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale } case 326: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2074 + yyDollar = yyS[yypt-2 : yypt+1] +//line sql.y:2069 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} + yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length + yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale } case 327: - yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2078 + yyDollar = yyS[yypt-1 : yypt+1] +//line sql.y:2077 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 328: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2082 +//line sql.y:2081 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } case 329: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2086 +//line sql.y:2085 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } case 330: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2090 +//line sql.y:2089 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } case 331: + yyDollar = yyS[yypt-2 : yypt+1] +//line sql.y:2093 + { + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} + } + case 332: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2096 +//line sql.y:2099 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion(), Charset: yyDollar[3].columnCharset} } - case 332: + case 333: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2100 +//line sql.y:2103 { // CHAR BYTE is an alias for binary. See also: // https://dev.mysql.com/doc/refman/8.0/en/string-type-syntax.html yyVAL.columnType = &ColumnType{Type: "binary", Length: yyDollar[2].literalUnion()} } - case 333: + case 334: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2106 +//line sql.y:2109 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion(), Charset: yyDollar[3].columnCharset} } - case 334: - yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2110 - { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} - } case 335: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2114 +//line sql.y:2113 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } case 336: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2118 +//line sql.y:2117 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Charset: yyDollar[2].columnCharset} + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } case 337: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2122 +//line sql.y:2121 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Charset: yyDollar[2].columnCharset} } case 338: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2126 +//line sql.y:2125 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Charset: yyDollar[2].columnCharset} } case 339: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2130 +//line sql.y:2129 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Charset: yyDollar[2].columnCharset} } case 340: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2134 + yyDollar = yyS[yypt-2 : yypt+1] +//line sql.y:2133 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), Charset: yyDollar[2].columnCharset} } case 341: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2138 +//line sql.y:2137 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 342: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2142 +//line sql.y:2141 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 343: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2146 +//line sql.y:2145 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 344: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2150 +//line sql.y:2149 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 345: - yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:2154 + yyDollar = yyS[yypt-1 : yypt+1] +//line sql.y:2153 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), EnumValues: yyDollar[3].strs, Charset: yyDollar[5].columnCharset} + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 346: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:2159 +//line sql.y:2157 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), EnumValues: yyDollar[3].strs, Charset: yyDollar[5].columnCharset} } case 347: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2165 + yyDollar = yyS[yypt-5 : yypt+1] +//line sql.y:2162 { - yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str), EnumValues: yyDollar[3].strs, Charset: yyDollar[5].columnCharset} } case 348: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2169 +//line sql.y:2168 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 349: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2173 +//line sql.y:2172 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 350: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2177 +//line sql.y:2176 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 351: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2181 +//line sql.y:2180 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 352: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2185 +//line sql.y:2184 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 353: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2189 +//line sql.y:2188 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 354: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2193 +//line sql.y:2192 { yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} } case 355: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2199 +//line sql.y:2196 + { + yyVAL.columnType = &ColumnType{Type: string(yyDollar[1].str)} + } + case 356: + yyDollar = yyS[yypt-1 : yypt+1] +//line sql.y:2202 { yyVAL.strs = make([]string, 0, 4) yyVAL.strs = append(yyVAL.strs, encodeSQLString(yyDollar[1].str)) } - case 356: + case 357: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2204 +//line sql.y:2207 { yyVAL.strs = append(yyDollar[1].strs, encodeSQLString(yyDollar[3].str)) } - case 357: + case 358: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Literal -//line sql.y:2209 +//line sql.y:2212 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 358: + case 359: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Literal -//line sql.y:2213 +//line sql.y:2216 { yyLOCAL = NewIntLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 359: + case 360: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2218 +//line sql.y:2221 { yyVAL.LengthScaleOption = LengthScaleOption{} } - case 360: + case 361: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:2222 +//line sql.y:2225 { yyVAL.LengthScaleOption = LengthScaleOption{ Length: NewIntLiteral(yyDollar[2].str), Scale: NewIntLiteral(yyDollar[4].str), } } - case 361: + case 362: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2231 +//line sql.y:2234 { yyVAL.LengthScaleOption = yyDollar[1].LengthScaleOption } - case 362: + case 363: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2235 +//line sql.y:2238 { yyVAL.LengthScaleOption = LengthScaleOption{ Length: NewIntLiteral(yyDollar[2].str), } } - case 363: + case 364: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2242 +//line sql.y:2245 { yyVAL.LengthScaleOption = LengthScaleOption{} } - case 364: + case 365: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2246 +//line sql.y:2249 { yyVAL.LengthScaleOption = LengthScaleOption{ Length: NewIntLiteral(yyDollar[2].str), } } - case 365: + case 366: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:2252 +//line sql.y:2255 { yyVAL.LengthScaleOption = LengthScaleOption{ Length: NewIntLiteral(yyDollar[2].str), Scale: NewIntLiteral(yyDollar[4].str), } } - case 366: + case 367: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:2260 +//line sql.y:2263 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 367: + case 368: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2264 +//line sql.y:2267 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 368: + case 369: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2268 +//line sql.y:2271 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 369: + case 370: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:2273 +//line sql.y:2276 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 370: + case 371: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2277 +//line sql.y:2280 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 371: + case 372: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2282 +//line sql.y:2285 { yyVAL.columnCharset = ColumnCharset{} } - case 372: + case 373: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2286 +//line sql.y:2289 { yyVAL.columnCharset = ColumnCharset{Name: string(yyDollar[2].identifierCI.String()), Binary: yyDollar[3].booleanUnion()} } - case 373: + case 374: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2290 +//line sql.y:2293 { yyVAL.columnCharset = ColumnCharset{Name: encodeSQLString(yyDollar[2].str), Binary: yyDollar[3].booleanUnion()} } - case 374: + case 375: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2294 +//line sql.y:2297 { yyVAL.columnCharset = ColumnCharset{Name: string(yyDollar[2].str)} } - case 375: + case 376: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2298 +//line sql.y:2301 { // ASCII: Shorthand for CHARACTER SET latin1. yyVAL.columnCharset = ColumnCharset{Name: "latin1", Binary: yyDollar[2].booleanUnion()} } - case 376: + case 377: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2303 +//line sql.y:2306 { // UNICODE: Shorthand for CHARACTER SET ucs2. yyVAL.columnCharset = ColumnCharset{Name: "ucs2", Binary: yyDollar[2].booleanUnion()} } - case 377: + case 378: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2308 +//line sql.y:2311 { // BINARY: Shorthand for default CHARACTER SET but with binary collation yyVAL.columnCharset = ColumnCharset{Name: "", Binary: true} } - case 378: + case 379: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2313 +//line sql.y:2316 { // BINARY ASCII: Shorthand for CHARACTER SET latin1 with binary collation yyVAL.columnCharset = ColumnCharset{Name: "latin1", Binary: true} } - case 379: + case 380: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2318 +//line sql.y:2321 { // BINARY UNICODE: Shorthand for CHARACTER SET ucs2 with binary collation yyVAL.columnCharset = ColumnCharset{Name: "ucs2", Binary: true} } - case 380: + case 381: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:2324 +//line sql.y:2327 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 381: + case 382: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2328 +//line sql.y:2331 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 382: + case 383: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2333 +//line sql.y:2336 { yyVAL.str = "" } - case 383: + case 384: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2337 +//line sql.y:2340 { yyVAL.str = string(yyDollar[2].identifierCI.String()) } - case 384: + case 385: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2341 +//line sql.y:2344 { yyVAL.str = encodeSQLString(yyDollar[2].str) } - case 385: + case 386: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *IndexDefinition -//line sql.y:2347 +//line sql.y:2350 { yyLOCAL = &IndexDefinition{Info: yyDollar[1].indexInfoUnion(), Columns: yyDollar[3].indexColumnsUnion(), Options: yyDollar[5].indexOptionsUnion()} } yyVAL.union = yyLOCAL - case 386: + case 387: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:2352 +//line sql.y:2355 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 387: + case 388: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:2356 +//line sql.y:2359 { yyLOCAL = yyDollar[1].indexOptionsUnion() } yyVAL.union = yyLOCAL - case 388: + case 389: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:2362 +//line sql.y:2365 { yyLOCAL = []*IndexOption{yyDollar[1].indexOptionUnion()} } yyVAL.union = yyLOCAL - case 389: + case 390: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2366 +//line sql.y:2369 { yySLICE := (*[]*IndexOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].indexOptionUnion()) } - case 390: + case 391: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2372 +//line sql.y:2375 { yyLOCAL = yyDollar[1].indexOptionUnion() } yyVAL.union = yyLOCAL - case 391: + case 392: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2376 +//line sql.y:2379 { // should not be string yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 392: + case 393: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2381 +//line sql.y:2384 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[2].str)} } yyVAL.union = yyLOCAL - case 393: + case 394: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2385 +//line sql.y:2388 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 394: + case 395: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2389 +//line sql.y:2392 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 395: + case 396: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2393 +//line sql.y:2396 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str) + " " + string(yyDollar[2].str), String: yyDollar[3].identifierCI.String()} } yyVAL.union = yyLOCAL - case 396: + case 397: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2397 +//line sql.y:2400 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 397: + case 398: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:2401 +//line sql.y:2404 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 398: + case 399: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2407 +//line sql.y:2410 { yyVAL.str = "" } - case 399: + case 400: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2411 +//line sql.y:2414 { yyVAL.str = string(yyDollar[1].str) } - case 400: + case 401: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *IndexInfo -//line sql.y:2417 +//line sql.y:2420 { yyLOCAL = &IndexInfo{Type: string(yyDollar[2].str) + " " + string(yyDollar[3].str), ConstraintName: NewIdentifierCI(yyDollar[1].str), Name: NewIdentifierCI("PRIMARY"), Primary: true, Unique: true} } yyVAL.union = yyLOCAL - case 401: + case 402: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexInfo -//line sql.y:2421 +//line sql.y:2424 { yyLOCAL = &IndexInfo{Type: string(yyDollar[1].str) + " " + string(yyDollar[2].str), Name: NewIdentifierCI(yyDollar[3].str), Spatial: true, Unique: false} } yyVAL.union = yyLOCAL - case 402: + case 403: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexInfo -//line sql.y:2425 +//line sql.y:2428 { yyLOCAL = &IndexInfo{Type: string(yyDollar[1].str) + " " + string(yyDollar[2].str), Name: NewIdentifierCI(yyDollar[3].str), Fulltext: true, Unique: false} } yyVAL.union = yyLOCAL - case 403: + case 404: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *IndexInfo -//line sql.y:2429 +//line sql.y:2432 { yyLOCAL = &IndexInfo{Type: string(yyDollar[2].str) + " " + string(yyDollar[3].str), ConstraintName: NewIdentifierCI(yyDollar[1].str), Name: NewIdentifierCI(yyDollar[4].str), Unique: true} } yyVAL.union = yyLOCAL - case 404: + case 405: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *IndexInfo -//line sql.y:2433 +//line sql.y:2436 { yyLOCAL = &IndexInfo{Type: string(yyDollar[1].str), Name: NewIdentifierCI(yyDollar[2].str), Unique: false} } yyVAL.union = yyLOCAL - case 405: + case 406: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2438 +//line sql.y:2441 { yyVAL.str = "" } - case 406: + case 407: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2442 +//line sql.y:2445 { yyVAL.str = yyDollar[2].str } - case 407: - yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2448 - { - yyVAL.str = string(yyDollar[1].str) - } case 408: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2452 +//line sql.y:2451 { yyVAL.str = string(yyDollar[1].str) } case 409: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2456 +//line sql.y:2455 { yyVAL.str = string(yyDollar[1].str) } case 410: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2462 +//line sql.y:2459 { yyVAL.str = string(yyDollar[1].str) } case 411: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2466 +//line sql.y:2465 { yyVAL.str = string(yyDollar[1].str) } case 412: + yyDollar = yyS[yypt-1 : yypt+1] +//line sql.y:2469 + { + yyVAL.str = string(yyDollar[1].str) + } + case 413: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2471 +//line sql.y:2474 { yyVAL.str = "key" } - case 413: + case 414: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2475 +//line sql.y:2478 { yyVAL.str = yyDollar[1].str } - case 414: + case 415: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2481 +//line sql.y:2484 { yyVAL.str = string(yyDollar[1].str) } - case 415: + case 416: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2485 +//line sql.y:2488 { yyVAL.str = string(yyDollar[1].str) } - case 416: + case 417: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2490 +//line sql.y:2493 { yyVAL.str = "" } - case 417: + case 418: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2494 +//line sql.y:2497 { yyVAL.str = string(yyDollar[1].identifierCI.String()) } - case 418: + case 419: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*IndexColumn -//line sql.y:2500 +//line sql.y:2503 { yyLOCAL = []*IndexColumn{yyDollar[1].indexColumnUnion()} } yyVAL.union = yyLOCAL - case 419: + case 420: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2504 +//line sql.y:2507 { yySLICE := (*[]*IndexColumn)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].indexColumnUnion()) } - case 420: + case 421: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *IndexColumn -//line sql.y:2510 +//line sql.y:2513 { yyLOCAL = &IndexColumn{Column: yyDollar[1].identifierCI, Length: yyDollar[2].literalUnion(), Direction: yyDollar[3].orderDirectionUnion()} } yyVAL.union = yyLOCAL - case 421: + case 422: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *IndexColumn -//line sql.y:2514 +//line sql.y:2517 { yyLOCAL = &IndexColumn{Expression: yyDollar[2].exprUnion(), Direction: yyDollar[4].orderDirectionUnion()} } yyVAL.union = yyLOCAL - case 422: + case 423: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ConstraintDefinition -//line sql.y:2520 +//line sql.y:2523 { yyLOCAL = &ConstraintDefinition{Name: yyDollar[2].identifierCI, Details: yyDollar[3].constraintInfoUnion()} } yyVAL.union = yyLOCAL - case 423: + case 424: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConstraintDefinition -//line sql.y:2524 +//line sql.y:2527 { yyLOCAL = &ConstraintDefinition{Details: yyDollar[1].constraintInfoUnion()} } yyVAL.union = yyLOCAL - case 424: + case 425: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ConstraintDefinition -//line sql.y:2530 +//line sql.y:2533 { yyLOCAL = &ConstraintDefinition{Name: yyDollar[2].identifierCI, Details: yyDollar[3].constraintInfoUnion()} } yyVAL.union = yyLOCAL - case 425: + case 426: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConstraintDefinition -//line sql.y:2534 +//line sql.y:2537 { yyLOCAL = &ConstraintDefinition{Details: yyDollar[1].constraintInfoUnion()} } yyVAL.union = yyLOCAL - case 426: + case 427: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL ConstraintInfo -//line sql.y:2540 +//line sql.y:2543 { yyLOCAL = &ForeignKeyDefinition{IndexName: NewIdentifierCI(yyDollar[3].str), Source: yyDollar[5].columnsUnion(), ReferenceDefinition: yyDollar[7].referenceDefinitionUnion()} } yyVAL.union = yyLOCAL - case 427: + case 428: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2546 +//line sql.y:2549 { yyLOCAL = &ReferenceDefinition{ReferencedTable: yyDollar[2].tableName, ReferencedColumns: yyDollar[4].columnsUnion(), Match: yyDollar[6].matchActionUnion()} } yyVAL.union = yyLOCAL - case 428: + case 429: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2550 +//line sql.y:2553 { yyLOCAL = &ReferenceDefinition{ReferencedTable: yyDollar[2].tableName, ReferencedColumns: yyDollar[4].columnsUnion(), Match: yyDollar[6].matchActionUnion(), OnDelete: yyDollar[7].referenceActionUnion()} } yyVAL.union = yyLOCAL - case 429: + case 430: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2554 +//line sql.y:2557 { yyLOCAL = &ReferenceDefinition{ReferencedTable: yyDollar[2].tableName, ReferencedColumns: yyDollar[4].columnsUnion(), Match: yyDollar[6].matchActionUnion(), OnUpdate: yyDollar[7].referenceActionUnion()} } yyVAL.union = yyLOCAL - case 430: + case 431: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2558 +//line sql.y:2561 { yyLOCAL = &ReferenceDefinition{ReferencedTable: yyDollar[2].tableName, ReferencedColumns: yyDollar[4].columnsUnion(), Match: yyDollar[6].matchActionUnion(), OnDelete: yyDollar[7].referenceActionUnion(), OnUpdate: yyDollar[8].referenceActionUnion()} } yyVAL.union = yyLOCAL - case 431: + case 432: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2562 +//line sql.y:2565 { yyLOCAL = &ReferenceDefinition{ReferencedTable: yyDollar[2].tableName, ReferencedColumns: yyDollar[4].columnsUnion(), Match: yyDollar[6].matchActionUnion(), OnUpdate: yyDollar[7].referenceActionUnion(), OnDelete: yyDollar[8].referenceActionUnion()} } yyVAL.union = yyLOCAL - case 432: + case 433: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2567 +//line sql.y:2570 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 433: + case 434: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ReferenceDefinition -//line sql.y:2571 +//line sql.y:2574 { yyLOCAL = yyDollar[1].referenceDefinitionUnion() } yyVAL.union = yyLOCAL - case 434: + case 435: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL ConstraintInfo -//line sql.y:2577 +//line sql.y:2580 { yyLOCAL = &CheckConstraintDefinition{Expr: yyDollar[3].exprUnion(), Enforced: yyDollar[5].booleanUnion()} } yyVAL.union = yyLOCAL - case 435: + case 436: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2583 +//line sql.y:2586 { yyLOCAL = yyDollar[2].matchActionUnion() } yyVAL.union = yyLOCAL - case 436: + case 437: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2589 +//line sql.y:2592 { yyLOCAL = Full } yyVAL.union = yyLOCAL - case 437: + case 438: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2593 +//line sql.y:2596 { yyLOCAL = Partial } yyVAL.union = yyLOCAL - case 438: + case 439: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2597 +//line sql.y:2600 { yyLOCAL = Simple } yyVAL.union = yyLOCAL - case 439: + case 440: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2602 +//line sql.y:2605 { yyLOCAL = DefaultMatch } yyVAL.union = yyLOCAL - case 440: + case 441: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL MatchAction -//line sql.y:2606 +//line sql.y:2609 { yyLOCAL = yyDollar[1].matchActionUnion() } yyVAL.union = yyLOCAL - case 441: + case 442: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2612 +//line sql.y:2615 { yyLOCAL = yyDollar[3].referenceActionUnion() } yyVAL.union = yyLOCAL - case 442: + case 443: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2618 +//line sql.y:2621 { yyLOCAL = yyDollar[3].referenceActionUnion() } yyVAL.union = yyLOCAL - case 443: + case 444: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2624 +//line sql.y:2627 { yyLOCAL = Restrict } yyVAL.union = yyLOCAL - case 444: + case 445: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2628 +//line sql.y:2631 { yyLOCAL = Cascade } yyVAL.union = yyLOCAL - case 445: + case 446: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2632 +//line sql.y:2635 { yyLOCAL = NoAction } yyVAL.union = yyLOCAL - case 446: + case 447: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2636 +//line sql.y:2639 { yyLOCAL = SetDefault } yyVAL.union = yyLOCAL - case 447: + case 448: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ReferenceAction -//line sql.y:2640 +//line sql.y:2643 { yyLOCAL = SetNull } yyVAL.union = yyLOCAL - case 448: + case 449: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2645 +//line sql.y:2648 { yyVAL.str = "" } - case 449: + case 450: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2649 +//line sql.y:2652 { yyVAL.str = string(yyDollar[1].str) } - case 450: + case 451: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2653 +//line sql.y:2656 { yyVAL.str = string(yyDollar[1].str) } - case 451: + case 452: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2659 +//line sql.y:2662 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 452: + case 453: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:2663 +//line sql.y:2666 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 453: + case 454: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:2668 +//line sql.y:2671 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 454: + case 455: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2672 +//line sql.y:2675 { yyLOCAL = yyDollar[1].booleanUnion() } yyVAL.union = yyLOCAL - case 455: + case 456: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL TableOptions -//line sql.y:2677 +//line sql.y:2680 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 456: + case 457: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableOptions -//line sql.y:2681 +//line sql.y:2684 { yyLOCAL = yyDollar[1].tableOptionsUnion() } yyVAL.union = yyLOCAL - case 457: + case 458: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableOptions -//line sql.y:2687 +//line sql.y:2690 { yyLOCAL = TableOptions{yyDollar[1].tableOptionUnion()} } yyVAL.union = yyLOCAL - case 458: + case 459: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2691 +//line sql.y:2694 { yySLICE := (*TableOptions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableOptionUnion()) } - case 459: + case 460: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2695 +//line sql.y:2698 { yySLICE := (*TableOptions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].tableOptionUnion()) } - case 460: + case 461: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableOptions -//line sql.y:2701 +//line sql.y:2704 { yyLOCAL = TableOptions{yyDollar[1].tableOptionUnion()} } yyVAL.union = yyLOCAL - case 461: + case 462: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2705 +//line sql.y:2708 { yySLICE := (*TableOptions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].tableOptionUnion()) } - case 462: + case 463: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2711 +//line sql.y:2714 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 463: + case 464: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2715 +//line sql.y:2718 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 464: + case 465: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2719 +//line sql.y:2722 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 465: + case 466: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2723 +//line sql.y:2726 { yyLOCAL = &TableOption{Name: (string(yyDollar[2].str)), String: yyDollar[4].str, CaseSensitive: true} } yyVAL.union = yyLOCAL - case 466: + case 467: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2727 +//line sql.y:2730 { yyLOCAL = &TableOption{Name: string(yyDollar[2].str), String: yyDollar[4].str, CaseSensitive: true} } yyVAL.union = yyLOCAL - case 467: + case 468: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2731 +//line sql.y:2734 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 468: + case 469: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2735 +//line sql.y:2738 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 469: + case 470: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2739 +//line sql.y:2742 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 470: + case 471: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2743 +//line sql.y:2746 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 471: + case 472: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2747 +//line sql.y:2750 { yyLOCAL = &TableOption{Name: (string(yyDollar[1].str) + " " + string(yyDollar[2].str)), Value: NewStrLiteral(yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 472: + case 473: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2751 +//line sql.y:2754 { yyLOCAL = &TableOption{Name: (string(yyDollar[1].str) + " " + string(yyDollar[2].str)), Value: NewStrLiteral(yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 473: + case 474: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2755 +//line sql.y:2758 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 474: + case 475: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2759 +//line sql.y:2762 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 475: + case 476: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2763 +//line sql.y:2766 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: yyDollar[3].identifierCS.String(), CaseSensitive: true} } yyVAL.union = yyLOCAL - case 476: + case 477: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2767 +//line sql.y:2770 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 477: + case 478: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2771 +//line sql.y:2774 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 478: + case 479: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2775 +//line sql.y:2778 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 479: + case 480: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2779 +//line sql.y:2782 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 480: + case 481: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2783 +//line sql.y:2786 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 481: + case 482: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2787 +//line sql.y:2790 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 482: + case 483: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2791 +//line sql.y:2794 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 483: + case 484: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2795 +//line sql.y:2798 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 484: + case 485: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2799 +//line sql.y:2802 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 485: + case 486: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2803 +//line sql.y:2806 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewStrLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 486: + case 487: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2807 +//line sql.y:2810 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 487: + case 488: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2811 +//line sql.y:2814 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 488: + case 489: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2815 +//line sql.y:2818 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 489: + case 490: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2819 +//line sql.y:2822 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 490: + case 491: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2823 +//line sql.y:2826 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Value: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 491: + case 492: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2827 +//line sql.y:2830 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), String: (yyDollar[3].identifierCI.String() + yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 492: + case 493: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *TableOption -//line sql.y:2831 +//line sql.y:2834 { yyLOCAL = &TableOption{Name: string(yyDollar[1].str), Tables: yyDollar[4].tableNamesUnion()} } yyVAL.union = yyLOCAL - case 493: + case 494: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2836 +//line sql.y:2839 { yyVAL.str = "" } - case 494: + case 495: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2840 +//line sql.y:2843 { yyVAL.str = " " + string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 495: + case 496: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2844 +//line sql.y:2847 { yyVAL.str = " " + string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 505: + case 506: + yyDollar = yyS[yypt-3 : yypt+1] +//line sql.y:2866 + { + yyVAL.str = String(TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS}) + } + case 507: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2863 +//line sql.y:2870 { yyVAL.str = yyDollar[1].identifierCI.String() } - case 506: + case 508: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2867 +//line sql.y:2874 { yyVAL.str = encodeSQLString(yyDollar[1].str) } - case 507: + case 509: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:2871 +//line sql.y:2878 { yyVAL.str = string(yyDollar[1].str) } - case 508: + case 510: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2876 +//line sql.y:2883 { yyVAL.str = "" } - case 510: + case 512: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:2882 +//line sql.y:2889 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 511: + case 513: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:2886 +//line sql.y:2893 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 512: + case 514: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ColName -//line sql.y:2891 +//line sql.y:2898 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 513: + case 515: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ColName -//line sql.y:2895 +//line sql.y:2902 { yyLOCAL = yyDollar[2].colNameUnion() } yyVAL.union = yyLOCAL - case 514: + case 516: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:2900 +//line sql.y:2907 { yyVAL.str = "" } - case 515: + case 517: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:2904 +//line sql.y:2911 { yyVAL.str = string(yyDollar[2].str) } - case 516: + case 518: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Literal -//line sql.y:2909 +//line sql.y:2916 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 517: + case 519: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Literal -//line sql.y:2913 +//line sql.y:2920 { yyLOCAL = NewIntLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 518: + case 520: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Literal -//line sql.y:2917 +//line sql.y:2924 { yyLOCAL = NewDecimalLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 519: + case 521: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:2922 +//line sql.y:2929 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 520: + case 522: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:2926 +//line sql.y:2933 { yyLOCAL = yyDollar[1].alterOptionsUnion() } yyVAL.union = yyLOCAL - case 521: + case 523: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:2930 +//line sql.y:2937 { yySLICE := (*[]AlterOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, &OrderByOption{Cols: yyDollar[5].columnsUnion()}) } - case 522: + case 524: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:2934 +//line sql.y:2941 { yyLOCAL = yyDollar[1].alterOptionsUnion() } yyVAL.union = yyLOCAL - case 523: + case 525: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2938 +//line sql.y:2945 { yySLICE := (*[]AlterOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].alterOptionsUnion()...) } - case 524: + case 526: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:2942 +//line sql.y:2949 { yyLOCAL = append(append(yyDollar[1].alterOptionsUnion(), yyDollar[3].alterOptionsUnion()...), &OrderByOption{Cols: yyDollar[7].columnsUnion()}) } yyVAL.union = yyLOCAL - case 525: + case 527: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:2948 +//line sql.y:2955 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 526: + case 528: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2952 +//line sql.y:2959 { yySLICE := (*[]AlterOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].alterOptionUnion()) } - case 527: + case 529: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:2956 +//line sql.y:2963 { yySLICE := (*[]AlterOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].alterOptionUnion()) } - case 528: + case 530: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2962 +//line sql.y:2969 { yyLOCAL = yyDollar[1].tableOptionsUnion() } yyVAL.union = yyLOCAL - case 529: + case 531: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2966 +//line sql.y:2973 { yyLOCAL = &AddConstraintDefinition{ConstraintDefinition: yyDollar[2].constraintDefinitionUnion()} } yyVAL.union = yyLOCAL - case 530: + case 532: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2970 +//line sql.y:2977 { yyLOCAL = &AddConstraintDefinition{ConstraintDefinition: yyDollar[2].constraintDefinitionUnion()} } yyVAL.union = yyLOCAL - case 531: + case 533: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2974 +//line sql.y:2981 { yyLOCAL = &AddIndexDefinition{IndexDefinition: yyDollar[2].indexDefinitionUnion()} } yyVAL.union = yyLOCAL - case 532: + case 534: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2978 +//line sql.y:2985 { yyLOCAL = &AddColumns{Columns: yyDollar[4].columnDefinitionsUnion()} } yyVAL.union = yyLOCAL - case 533: + case 535: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2982 +//line sql.y:2989 { yyLOCAL = &AddColumns{Columns: []*ColumnDefinition{yyDollar[3].columnDefinitionUnion()}, First: yyDollar[4].booleanUnion(), After: yyDollar[5].colNameUnion()} } yyVAL.union = yyLOCAL - case 534: + case 536: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2986 +//line sql.y:2993 { yyLOCAL = &AlterColumn{Column: yyDollar[3].colNameUnion(), DropDefault: true} } yyVAL.union = yyLOCAL - case 535: + case 537: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2990 +//line sql.y:2997 { yyLOCAL = &AlterColumn{Column: yyDollar[3].colNameUnion(), DropDefault: false, DefaultVal: yyDollar[6].exprUnion()} } yyVAL.union = yyLOCAL - case 536: + case 538: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2994 +//line sql.y:3001 { yyLOCAL = &AlterColumn{Column: yyDollar[3].colNameUnion(), DropDefault: false, DefaultVal: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 537: + case 539: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:2998 +//line sql.y:3005 { val := false yyLOCAL = &AlterColumn{Column: yyDollar[3].colNameUnion(), Invisible: &val} } yyVAL.union = yyLOCAL - case 538: + case 540: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3003 +//line sql.y:3010 { val := true yyLOCAL = &AlterColumn{Column: yyDollar[3].colNameUnion(), Invisible: &val} } yyVAL.union = yyLOCAL - case 539: + case 541: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3008 +//line sql.y:3015 { yyLOCAL = &AlterCheck{Name: yyDollar[3].identifierCI, Enforced: yyDollar[4].booleanUnion()} } yyVAL.union = yyLOCAL - case 540: + case 542: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3012 +//line sql.y:3019 { yyLOCAL = &AlterIndex{Name: yyDollar[3].identifierCI, Invisible: false} } yyVAL.union = yyLOCAL - case 541: + case 543: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3016 +//line sql.y:3023 { yyLOCAL = &AlterIndex{Name: yyDollar[3].identifierCI, Invisible: true} } yyVAL.union = yyLOCAL - case 542: + case 544: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3020 +//line sql.y:3027 { yyLOCAL = &ChangeColumn{OldColumn: yyDollar[3].colNameUnion(), NewColDefinition: yyDollar[4].columnDefinitionUnion(), First: yyDollar[5].booleanUnion(), After: yyDollar[6].colNameUnion()} } yyVAL.union = yyLOCAL - case 543: + case 545: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3024 +//line sql.y:3031 { yyLOCAL = &ModifyColumn{NewColDefinition: yyDollar[3].columnDefinitionUnion(), First: yyDollar[4].booleanUnion(), After: yyDollar[5].colNameUnion()} } yyVAL.union = yyLOCAL - case 544: + case 546: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3028 +//line sql.y:3035 { yyLOCAL = &RenameColumn{OldName: yyDollar[3].colNameUnion(), NewName: yyDollar[5].colNameUnion()} } yyVAL.union = yyLOCAL - case 545: + case 547: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3032 +//line sql.y:3039 { yyLOCAL = &AlterCharset{CharacterSet: yyDollar[4].str, Collate: yyDollar[5].str} } yyVAL.union = yyLOCAL - case 546: + case 548: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3036 +//line sql.y:3043 { yyLOCAL = &KeyState{Enable: false} } yyVAL.union = yyLOCAL - case 547: + case 549: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3040 +//line sql.y:3047 { yyLOCAL = &KeyState{Enable: true} } yyVAL.union = yyLOCAL - case 548: + case 550: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3044 +//line sql.y:3051 { yyLOCAL = &TablespaceOperation{Import: false} } yyVAL.union = yyLOCAL - case 549: + case 551: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3048 +//line sql.y:3055 { yyLOCAL = &TablespaceOperation{Import: true} } yyVAL.union = yyLOCAL - case 550: + case 552: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3052 +//line sql.y:3059 { yyLOCAL = &DropColumn{Name: yyDollar[3].colNameUnion()} } yyVAL.union = yyLOCAL - case 551: + case 553: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3056 +//line sql.y:3063 { yyLOCAL = &DropKey{Type: NormalKeyType, Name: yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 552: + case 554: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3060 +//line sql.y:3067 { yyLOCAL = &DropKey{Type: PrimaryKeyType} } yyVAL.union = yyLOCAL - case 553: + case 555: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3064 +//line sql.y:3071 { yyLOCAL = &DropKey{Type: ForeignKeyType, Name: yyDollar[4].identifierCI} } yyVAL.union = yyLOCAL - case 554: + case 556: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3068 +//line sql.y:3075 { yyLOCAL = &DropKey{Type: CheckKeyType, Name: yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 555: + case 557: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3072 +//line sql.y:3079 { yyLOCAL = &DropKey{Type: CheckKeyType, Name: yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 556: + case 558: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3076 +//line sql.y:3083 { yyLOCAL = &Force{} } yyVAL.union = yyLOCAL - case 557: + case 559: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3080 +//line sql.y:3087 { yyLOCAL = &RenameTableName{Table: yyDollar[3].tableName} } yyVAL.union = yyLOCAL - case 558: + case 560: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3084 +//line sql.y:3091 { yyLOCAL = &RenameIndex{OldName: yyDollar[3].identifierCI, NewName: yyDollar[5].identifierCI} } yyVAL.union = yyLOCAL - case 559: + case 561: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:3090 +//line sql.y:3097 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 560: + case 562: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3094 +//line sql.y:3101 { yySLICE := (*[]AlterOption)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].alterOptionUnion()) } - case 561: + case 563: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3100 +//line sql.y:3107 { yyLOCAL = AlgorithmValue(string(yyDollar[3].str)) } yyVAL.union = yyLOCAL - case 562: + case 564: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3104 +//line sql.y:3111 { yyLOCAL = AlgorithmValue(string(yyDollar[3].str)) } yyVAL.union = yyLOCAL - case 563: + case 565: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3108 +//line sql.y:3115 { yyLOCAL = AlgorithmValue(string(yyDollar[3].str)) } yyVAL.union = yyLOCAL - case 564: + case 566: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3112 +//line sql.y:3119 { yyLOCAL = AlgorithmValue(string(yyDollar[3].str)) } yyVAL.union = yyLOCAL - case 565: + case 567: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3116 +//line sql.y:3123 { yyLOCAL = &LockOption{Type: DefaultType} } yyVAL.union = yyLOCAL - case 566: + case 568: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3120 +//line sql.y:3127 { yyLOCAL = &LockOption{Type: NoneType} } yyVAL.union = yyLOCAL - case 567: + case 569: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3124 +//line sql.y:3131 { yyLOCAL = &LockOption{Type: SharedType} } yyVAL.union = yyLOCAL - case 568: + case 570: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3128 +//line sql.y:3135 { yyLOCAL = &LockOption{Type: ExclusiveType} } yyVAL.union = yyLOCAL - case 569: + case 571: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3132 +//line sql.y:3139 { yyLOCAL = &Validation{With: true} } yyVAL.union = yyLOCAL - case 570: + case 572: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL AlterOption -//line sql.y:3136 +//line sql.y:3143 { yyLOCAL = &Validation{With: false} } yyVAL.union = yyLOCAL - case 571: + case 573: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3142 +//line sql.y:3149 { yyDollar[1].alterTableUnion().FullyParsed = true yyDollar[1].alterTableUnion().AlterOptions = yyDollar[2].alterOptionsUnion() @@ -12805,10 +13156,10 @@ yydefault: yyLOCAL = yyDollar[1].alterTableUnion() } yyVAL.union = yyLOCAL - case 572: + case 574: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:3149 +//line sql.y:3156 { yyDollar[1].alterTableUnion().FullyParsed = true yyDollar[1].alterTableUnion().AlterOptions = yyDollar[2].alterOptionsUnion() @@ -12816,10 +13167,10 @@ yydefault: yyLOCAL = yyDollar[1].alterTableUnion() } yyVAL.union = yyLOCAL - case 573: + case 575: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:3156 +//line sql.y:3163 { yyDollar[1].alterTableUnion().FullyParsed = true yyDollar[1].alterTableUnion().AlterOptions = yyDollar[2].alterOptionsUnion() @@ -12827,28 +13178,28 @@ yydefault: yyLOCAL = yyDollar[1].alterTableUnion() } yyVAL.union = yyLOCAL - case 574: + case 576: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:3163 +//line sql.y:3170 { yyDollar[1].alterTableUnion().FullyParsed = true yyDollar[1].alterTableUnion().PartitionSpec = yyDollar[2].partSpecUnion() yyLOCAL = yyDollar[1].alterTableUnion() } yyVAL.union = yyLOCAL - case 575: + case 577: yyDollar = yyS[yypt-11 : yypt+1] var yyLOCAL Statement -//line sql.y:3169 +//line sql.y:3176 { yyLOCAL = &AlterView{ViewName: yyDollar[7].tableName.ToViewName(), Comments: Comments(yyDollar[2].strs).Parsed(), Algorithm: yyDollar[3].str, Definer: yyDollar[4].definerUnion(), Security: yyDollar[5].str, Columns: yyDollar[8].columnsUnion(), Select: yyDollar[10].selStmtUnion(), CheckOption: yyDollar[11].str} } yyVAL.union = yyLOCAL - case 576: + case 578: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3179 +//line sql.y:3186 { yyDollar[1].alterDatabaseUnion().FullyParsed = true yyDollar[1].alterDatabaseUnion().DBName = yyDollar[2].identifierCS @@ -12856,10 +13207,10 @@ yydefault: yyLOCAL = yyDollar[1].alterDatabaseUnion() } yyVAL.union = yyLOCAL - case 577: + case 579: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3186 +//line sql.y:3193 { yyDollar[1].alterDatabaseUnion().FullyParsed = true yyDollar[1].alterDatabaseUnion().DBName = yyDollar[2].identifierCS @@ -12867,10 +13218,10 @@ yydefault: yyLOCAL = yyDollar[1].alterDatabaseUnion() } yyVAL.union = yyLOCAL - case 578: + case 580: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Statement -//line sql.y:3193 +//line sql.y:3200 { yyLOCAL = &AlterVschema{ Action: CreateVindexDDLAction, @@ -12883,10 +13234,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 579: + case 581: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3205 +//line sql.y:3212 { yyLOCAL = &AlterVschema{ Action: DropVindexDDLAction, @@ -12897,26 +13248,26 @@ yydefault: } } yyVAL.union = yyLOCAL - case 580: + case 582: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3215 +//line sql.y:3222 { yyLOCAL = &AlterVschema{Action: AddVschemaTableDDLAction, Table: yyDollar[6].tableName} } yyVAL.union = yyLOCAL - case 581: + case 583: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3219 +//line sql.y:3226 { yyLOCAL = &AlterVschema{Action: DropVschemaTableDDLAction, Table: yyDollar[6].tableName} } yyVAL.union = yyLOCAL - case 582: + case 584: yyDollar = yyS[yypt-13 : yypt+1] var yyLOCAL Statement -//line sql.y:3223 +//line sql.y:3230 { yyLOCAL = &AlterVschema{ Action: AddColVindexDDLAction, @@ -12930,10 +13281,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 583: + case 585: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Statement -//line sql.y:3236 +//line sql.y:3243 { yyLOCAL = &AlterVschema{ Action: DropColVindexDDLAction, @@ -12944,18 +13295,18 @@ yydefault: } } yyVAL.union = yyLOCAL - case 584: + case 586: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3246 +//line sql.y:3253 { yyLOCAL = &AlterVschema{Action: AddSequenceDDLAction, Table: yyDollar[6].tableName} } yyVAL.union = yyLOCAL - case 585: + case 587: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Statement -//line sql.y:3250 +//line sql.y:3257 { yyLOCAL = &AlterVschema{ Action: AddAutoIncDDLAction, @@ -12967,10 +13318,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 586: + case 588: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3261 +//line sql.y:3268 { yyLOCAL = &AlterMigration{ Type: RetryMigrationType, @@ -12978,10 +13329,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 587: + case 589: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3268 +//line sql.y:3275 { yyLOCAL = &AlterMigration{ Type: CleanupMigrationType, @@ -12989,10 +13340,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 588: + case 590: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3275 +//line sql.y:3282 { yyLOCAL = &AlterMigration{ Type: LaunchMigrationType, @@ -13000,10 +13351,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 589: + case 591: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3282 +//line sql.y:3289 { yyLOCAL = &AlterMigration{ Type: LaunchMigrationType, @@ -13012,20 +13363,20 @@ yydefault: } } yyVAL.union = yyLOCAL - case 590: + case 592: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3290 +//line sql.y:3297 { yyLOCAL = &AlterMigration{ Type: LaunchAllMigrationType, } } yyVAL.union = yyLOCAL - case 591: + case 593: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3296 +//line sql.y:3303 { yyLOCAL = &AlterMigration{ Type: CompleteMigrationType, @@ -13033,20 +13384,20 @@ yydefault: } } yyVAL.union = yyLOCAL - case 592: + case 594: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3303 +//line sql.y:3310 { yyLOCAL = &AlterMigration{ Type: CompleteAllMigrationType, } } yyVAL.union = yyLOCAL - case 593: + case 595: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3309 +//line sql.y:3316 { yyLOCAL = &AlterMigration{ Type: CancelMigrationType, @@ -13054,20 +13405,20 @@ yydefault: } } yyVAL.union = yyLOCAL - case 594: + case 596: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3316 +//line sql.y:3323 { yyLOCAL = &AlterMigration{ Type: CancelAllMigrationType, } } yyVAL.union = yyLOCAL - case 595: + case 597: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3322 +//line sql.y:3329 { yyLOCAL = &AlterMigration{ Type: ThrottleMigrationType, @@ -13077,10 +13428,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 596: + case 598: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3331 +//line sql.y:3338 { yyLOCAL = &AlterMigration{ Type: ThrottleAllMigrationType, @@ -13089,10 +13440,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 597: + case 599: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3339 +//line sql.y:3346 { yyLOCAL = &AlterMigration{ Type: UnthrottleMigrationType, @@ -13100,28 +13451,28 @@ yydefault: } } yyVAL.union = yyLOCAL - case 598: + case 600: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3346 +//line sql.y:3353 { yyLOCAL = &AlterMigration{ Type: UnthrottleAllMigrationType, } } yyVAL.union = yyLOCAL - case 599: + case 601: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3353 +//line sql.y:3360 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 600: + case 602: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3357 +//line sql.y:3364 { yyDollar[3].partitionOptionUnion().Partitions = yyDollar[4].integerUnion() yyDollar[3].partitionOptionUnion().SubPartition = yyDollar[5].subPartitionUnion() @@ -13129,10 +13480,10 @@ yydefault: yyLOCAL = yyDollar[3].partitionOptionUnion() } yyVAL.union = yyLOCAL - case 601: + case 603: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3366 +//line sql.y:3373 { yyLOCAL = &PartitionOption{ IsLinear: yyDollar[1].booleanUnion(), @@ -13141,10 +13492,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 602: + case 604: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3374 +//line sql.y:3381 { yyLOCAL = &PartitionOption{ IsLinear: yyDollar[1].booleanUnion(), @@ -13154,10 +13505,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 603: + case 605: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3383 +//line sql.y:3390 { yyLOCAL = &PartitionOption{ Type: yyDollar[1].partitionByTypeUnion(), @@ -13165,10 +13516,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 604: + case 606: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *PartitionOption -//line sql.y:3390 +//line sql.y:3397 { yyLOCAL = &PartitionOption{ Type: yyDollar[1].partitionByTypeUnion(), @@ -13176,18 +13527,18 @@ yydefault: } } yyVAL.union = yyLOCAL - case 605: + case 607: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *SubPartition -//line sql.y:3398 +//line sql.y:3405 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 606: + case 608: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *SubPartition -//line sql.y:3402 +//line sql.y:3409 { yyLOCAL = &SubPartition{ IsLinear: yyDollar[3].booleanUnion(), @@ -13197,10 +13548,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 607: + case 609: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL *SubPartition -//line sql.y:3411 +//line sql.y:3418 { yyLOCAL = &SubPartition{ IsLinear: yyDollar[3].booleanUnion(), @@ -13211,682 +13562,682 @@ yydefault: } } yyVAL.union = yyLOCAL - case 608: + case 610: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*PartitionDefinition -//line sql.y:3422 +//line sql.y:3429 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 609: + case 611: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL []*PartitionDefinition -//line sql.y:3426 +//line sql.y:3433 { yyLOCAL = yyDollar[2].partDefsUnion() } yyVAL.union = yyLOCAL - case 610: + case 612: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:3431 +//line sql.y:3438 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 611: + case 613: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:3435 +//line sql.y:3442 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 612: + case 614: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL int -//line sql.y:3440 +//line sql.y:3447 { yyLOCAL = 0 } yyVAL.union = yyLOCAL - case 613: + case 615: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL int -//line sql.y:3444 +//line sql.y:3451 { yyLOCAL = convertStringToInt(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 614: + case 616: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL TableExpr -//line sql.y:3450 +//line sql.y:3457 { yyLOCAL = &JSONTableExpr{Expr: yyDollar[3].exprUnion(), Filter: yyDollar[5].exprUnion(), Columns: yyDollar[6].jtColumnListUnion(), Alias: yyDollar[8].identifierCS} } yyVAL.union = yyLOCAL - case 615: + case 617: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL []*JtColumnDefinition -//line sql.y:3456 +//line sql.y:3463 { yyLOCAL = yyDollar[3].jtColumnListUnion() } yyVAL.union = yyLOCAL - case 616: + case 618: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*JtColumnDefinition -//line sql.y:3462 +//line sql.y:3469 { yyLOCAL = []*JtColumnDefinition{yyDollar[1].jtColumnDefinitionUnion()} } yyVAL.union = yyLOCAL - case 617: + case 619: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3466 +//line sql.y:3473 { yySLICE := (*[]*JtColumnDefinition)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].jtColumnDefinitionUnion()) } - case 618: + case 620: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3472 +//line sql.y:3479 { yyLOCAL = &JtColumnDefinition{JtOrdinal: &JtOrdinalColDef{Name: yyDollar[1].identifierCI}} } yyVAL.union = yyLOCAL - case 619: + case 621: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3476 +//line sql.y:3483 { yyDollar[2].columnType.Options = &ColumnTypeOptions{Collate: yyDollar[3].str} jtPath := &JtPathColDef{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType, JtColExists: yyDollar[4].booleanUnion(), Path: yyDollar[6].exprUnion()} yyLOCAL = &JtColumnDefinition{JtPath: jtPath} } yyVAL.union = yyLOCAL - case 620: + case 622: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3482 +//line sql.y:3489 { yyDollar[2].columnType.Options = &ColumnTypeOptions{Collate: yyDollar[3].str} jtPath := &JtPathColDef{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType, JtColExists: yyDollar[4].booleanUnion(), Path: yyDollar[6].exprUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion()} yyLOCAL = &JtColumnDefinition{JtPath: jtPath} } yyVAL.union = yyLOCAL - case 621: + case 623: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3488 +//line sql.y:3495 { yyDollar[2].columnType.Options = &ColumnTypeOptions{Collate: yyDollar[3].str} jtPath := &JtPathColDef{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType, JtColExists: yyDollar[4].booleanUnion(), Path: yyDollar[6].exprUnion(), ErrorOnResponse: yyDollar[7].jtOnResponseUnion()} yyLOCAL = &JtColumnDefinition{JtPath: jtPath} } yyVAL.union = yyLOCAL - case 622: + case 624: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3494 +//line sql.y:3501 { yyDollar[2].columnType.Options = &ColumnTypeOptions{Collate: yyDollar[3].str} jtPath := &JtPathColDef{Name: yyDollar[1].identifierCI, Type: yyDollar[2].columnType, JtColExists: yyDollar[4].booleanUnion(), Path: yyDollar[6].exprUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion(), ErrorOnResponse: yyDollar[8].jtOnResponseUnion()} yyLOCAL = &JtColumnDefinition{JtPath: jtPath} } yyVAL.union = yyLOCAL - case 623: + case 625: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *JtColumnDefinition -//line sql.y:3500 +//line sql.y:3507 { jtNestedPath := &JtNestedPathColDef{Path: yyDollar[3].exprUnion(), Columns: yyDollar[4].jtColumnListUnion()} yyLOCAL = &JtColumnDefinition{JtNestedPath: jtNestedPath} } yyVAL.union = yyLOCAL - case 624: + case 626: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:3506 +//line sql.y:3513 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 625: + case 627: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:3510 +//line sql.y:3517 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 626: + case 628: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:3514 +//line sql.y:3521 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 627: + case 629: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:3518 +//line sql.y:3525 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 628: + case 630: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *JtOnResponse -//line sql.y:3524 +//line sql.y:3531 { yyLOCAL = yyDollar[1].jtOnResponseUnion() } yyVAL.union = yyLOCAL - case 629: + case 631: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *JtOnResponse -//line sql.y:3530 +//line sql.y:3537 { yyLOCAL = yyDollar[1].jtOnResponseUnion() } yyVAL.union = yyLOCAL - case 630: + case 632: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *JtOnResponse -//line sql.y:3536 +//line sql.y:3543 { yyLOCAL = &JtOnResponse{ResponseType: ErrorJSONType} } yyVAL.union = yyLOCAL - case 631: + case 633: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *JtOnResponse -//line sql.y:3540 +//line sql.y:3547 { yyLOCAL = &JtOnResponse{ResponseType: NullJSONType} } yyVAL.union = yyLOCAL - case 632: + case 634: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *JtOnResponse -//line sql.y:3544 +//line sql.y:3551 { yyLOCAL = &JtOnResponse{ResponseType: DefaultJSONType, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 633: + case 635: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL PartitionByType -//line sql.y:3550 +//line sql.y:3557 { yyLOCAL = RangeType } yyVAL.union = yyLOCAL - case 634: + case 636: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL PartitionByType -//line sql.y:3554 +//line sql.y:3561 { yyLOCAL = ListType } yyVAL.union = yyLOCAL - case 635: + case 637: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL int -//line sql.y:3559 +//line sql.y:3566 { yyLOCAL = -1 } yyVAL.union = yyLOCAL - case 636: + case 638: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL int -//line sql.y:3563 +//line sql.y:3570 { yyLOCAL = convertStringToInt(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 637: + case 639: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL int -//line sql.y:3568 +//line sql.y:3575 { yyLOCAL = -1 } yyVAL.union = yyLOCAL - case 638: + case 640: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL int -//line sql.y:3572 +//line sql.y:3579 { yyLOCAL = convertStringToInt(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 639: + case 641: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3578 +//line sql.y:3585 { yyLOCAL = &PartitionSpec{Action: AddAction, Definitions: []*PartitionDefinition{yyDollar[4].partDefUnion()}} } yyVAL.union = yyLOCAL - case 640: + case 642: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3582 +//line sql.y:3589 { yyLOCAL = &PartitionSpec{Action: DropAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 641: + case 643: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3586 +//line sql.y:3593 { yyLOCAL = &PartitionSpec{Action: ReorganizeAction, Names: yyDollar[3].partitionsUnion(), Definitions: yyDollar[6].partDefsUnion()} } yyVAL.union = yyLOCAL - case 642: + case 644: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3590 +//line sql.y:3597 { yyLOCAL = &PartitionSpec{Action: DiscardAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 643: + case 645: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3594 +//line sql.y:3601 { yyLOCAL = &PartitionSpec{Action: DiscardAction, IsAll: true} } yyVAL.union = yyLOCAL - case 644: + case 646: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3598 +//line sql.y:3605 { yyLOCAL = &PartitionSpec{Action: ImportAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 645: + case 647: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3602 +//line sql.y:3609 { yyLOCAL = &PartitionSpec{Action: ImportAction, IsAll: true} } yyVAL.union = yyLOCAL - case 646: + case 648: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3606 +//line sql.y:3613 { yyLOCAL = &PartitionSpec{Action: TruncateAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 647: + case 649: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3610 +//line sql.y:3617 { yyLOCAL = &PartitionSpec{Action: TruncateAction, IsAll: true} } yyVAL.union = yyLOCAL - case 648: + case 650: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3614 +//line sql.y:3621 { yyLOCAL = &PartitionSpec{Action: CoalesceAction, Number: NewIntLiteral(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 649: + case 651: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3618 +//line sql.y:3625 { yyLOCAL = &PartitionSpec{Action: ExchangeAction, Names: Partitions{yyDollar[3].identifierCI}, TableName: yyDollar[6].tableName, WithoutValidation: yyDollar[7].booleanUnion()} } yyVAL.union = yyLOCAL - case 650: + case 652: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3622 +//line sql.y:3629 { yyLOCAL = &PartitionSpec{Action: AnalyzeAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 651: + case 653: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3626 +//line sql.y:3633 { yyLOCAL = &PartitionSpec{Action: AnalyzeAction, IsAll: true} } yyVAL.union = yyLOCAL - case 652: + case 654: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3630 +//line sql.y:3637 { yyLOCAL = &PartitionSpec{Action: CheckAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 653: + case 655: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3634 +//line sql.y:3641 { yyLOCAL = &PartitionSpec{Action: CheckAction, IsAll: true} } yyVAL.union = yyLOCAL - case 654: + case 656: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3638 +//line sql.y:3645 { yyLOCAL = &PartitionSpec{Action: OptimizeAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 655: + case 657: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3642 +//line sql.y:3649 { yyLOCAL = &PartitionSpec{Action: OptimizeAction, IsAll: true} } yyVAL.union = yyLOCAL - case 656: + case 658: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3646 +//line sql.y:3653 { yyLOCAL = &PartitionSpec{Action: RebuildAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 657: + case 659: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3650 +//line sql.y:3657 { yyLOCAL = &PartitionSpec{Action: RebuildAction, IsAll: true} } yyVAL.union = yyLOCAL - case 658: + case 660: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3654 +//line sql.y:3661 { yyLOCAL = &PartitionSpec{Action: RepairAction, Names: yyDollar[3].partitionsUnion()} } yyVAL.union = yyLOCAL - case 659: + case 661: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3658 +//line sql.y:3665 { yyLOCAL = &PartitionSpec{Action: RepairAction, IsAll: true} } yyVAL.union = yyLOCAL - case 660: + case 662: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionSpec -//line sql.y:3662 +//line sql.y:3669 { yyLOCAL = &PartitionSpec{Action: UpgradeAction} } yyVAL.union = yyLOCAL - case 661: + case 663: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:3667 +//line sql.y:3674 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 662: + case 664: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:3671 +//line sql.y:3678 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 663: + case 665: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:3675 +//line sql.y:3682 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 664: + case 666: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*PartitionDefinition -//line sql.y:3681 +//line sql.y:3688 { yyLOCAL = []*PartitionDefinition{yyDollar[1].partDefUnion()} } yyVAL.union = yyLOCAL - case 665: + case 667: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3685 +//line sql.y:3692 { yySLICE := (*[]*PartitionDefinition)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].partDefUnion()) } - case 666: + case 668: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:3691 +//line sql.y:3698 { yyVAL.partDefUnion().Options = yyDollar[2].partitionDefinitionOptionsUnion() } - case 667: + case 669: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3696 +//line sql.y:3703 { yyLOCAL = &PartitionDefinitionOptions{} } yyVAL.union = yyLOCAL - case 668: + case 670: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3700 +//line sql.y:3707 { yyDollar[1].partitionDefinitionOptionsUnion().ValueRange = yyDollar[2].partitionValueRangeUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 669: + case 671: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3705 +//line sql.y:3712 { yyDollar[1].partitionDefinitionOptionsUnion().Comment = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 670: + case 672: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3710 +//line sql.y:3717 { yyDollar[1].partitionDefinitionOptionsUnion().Engine = yyDollar[2].partitionEngineUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 671: + case 673: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3715 +//line sql.y:3722 { yyDollar[1].partitionDefinitionOptionsUnion().DataDirectory = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 672: + case 674: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3720 +//line sql.y:3727 { yyDollar[1].partitionDefinitionOptionsUnion().IndexDirectory = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 673: + case 675: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3725 +//line sql.y:3732 { val := yyDollar[2].integerUnion() yyDollar[1].partitionDefinitionOptionsUnion().MaxRows = &val yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 674: + case 676: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3731 +//line sql.y:3738 { val := yyDollar[2].integerUnion() yyDollar[1].partitionDefinitionOptionsUnion().MinRows = &val yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 675: + case 677: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3737 +//line sql.y:3744 { yyDollar[1].partitionDefinitionOptionsUnion().TableSpace = yyDollar[2].str yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 676: + case 678: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinitionOptions -//line sql.y:3742 +//line sql.y:3749 { yyDollar[1].partitionDefinitionOptionsUnion().SubPartitionDefinitions = yyDollar[2].subPartitionDefinitionsUnion() yyLOCAL = yyDollar[1].partitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 677: + case 679: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SubPartitionDefinitions -//line sql.y:3748 +//line sql.y:3755 { yyLOCAL = yyDollar[2].subPartitionDefinitionsUnion() } yyVAL.union = yyLOCAL - case 678: + case 680: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SubPartitionDefinitions -//line sql.y:3754 +//line sql.y:3761 { yyLOCAL = SubPartitionDefinitions{yyDollar[1].subPartitionDefinitionUnion()} } yyVAL.union = yyLOCAL - case 679: + case 681: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3758 +//line sql.y:3765 { yySLICE := (*SubPartitionDefinitions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].subPartitionDefinitionUnion()) } - case 680: + case 682: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SubPartitionDefinition -//line sql.y:3764 +//line sql.y:3771 { yyLOCAL = &SubPartitionDefinition{Name: yyDollar[2].identifierCI, Options: yyDollar[3].subPartitionDefinitionOptionsUnion()} } yyVAL.union = yyLOCAL - case 681: + case 683: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3769 +//line sql.y:3776 { yyLOCAL = &SubPartitionDefinitionOptions{} } yyVAL.union = yyLOCAL - case 682: + case 684: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3773 +//line sql.y:3780 { yyDollar[1].subPartitionDefinitionOptionsUnion().Comment = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 683: + case 685: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3778 +//line sql.y:3785 { yyDollar[1].subPartitionDefinitionOptionsUnion().Engine = yyDollar[2].partitionEngineUnion() yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 684: + case 686: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3783 +//line sql.y:3790 { yyDollar[1].subPartitionDefinitionOptionsUnion().DataDirectory = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 685: + case 687: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3788 +//line sql.y:3795 { yyDollar[1].subPartitionDefinitionOptionsUnion().IndexDirectory = yyDollar[2].literalUnion() yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 686: + case 688: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3793 +//line sql.y:3800 { val := yyDollar[2].integerUnion() yyDollar[1].subPartitionDefinitionOptionsUnion().MaxRows = &val yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 687: + case 689: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3799 +//line sql.y:3806 { val := yyDollar[2].integerUnion() yyDollar[1].subPartitionDefinitionOptionsUnion().MinRows = &val yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 688: + case 690: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *SubPartitionDefinitionOptions -//line sql.y:3805 +//line sql.y:3812 { yyDollar[1].subPartitionDefinitionOptionsUnion().TableSpace = yyDollar[2].str yyLOCAL = yyDollar[1].subPartitionDefinitionOptionsUnion() } yyVAL.union = yyLOCAL - case 689: + case 691: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionValueRange -//line sql.y:3812 +//line sql.y:3819 { yyLOCAL = &PartitionValueRange{ Type: LessThanType, @@ -13894,10 +14245,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 690: + case 692: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionValueRange -//line sql.y:3819 +//line sql.y:3826 { yyLOCAL = &PartitionValueRange{ Type: LessThanType, @@ -13905,10 +14256,10 @@ yydefault: } } yyVAL.union = yyLOCAL - case 691: + case 693: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *PartitionValueRange -//line sql.y:3826 +//line sql.y:3833 { yyLOCAL = &PartitionValueRange{ Type: InType, @@ -13916,131 +14267,131 @@ yydefault: } } yyVAL.union = yyLOCAL - case 692: + case 694: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:3834 +//line sql.y:3841 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 693: + case 695: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:3838 +//line sql.y:3845 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 694: + case 696: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *PartitionEngine -//line sql.y:3844 +//line sql.y:3851 { yyLOCAL = &PartitionEngine{Storage: yyDollar[1].booleanUnion(), Name: yyDollar[4].identifierCS.String()} } yyVAL.union = yyLOCAL - case 695: + case 697: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Literal -//line sql.y:3850 +//line sql.y:3857 { yyLOCAL = NewStrLiteral(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 696: + case 698: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Literal -//line sql.y:3856 +//line sql.y:3863 { yyLOCAL = NewStrLiteral(yyDollar[4].str) } yyVAL.union = yyLOCAL - case 697: + case 699: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Literal -//line sql.y:3862 +//line sql.y:3869 { yyLOCAL = NewStrLiteral(yyDollar[4].str) } yyVAL.union = yyLOCAL - case 698: + case 700: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL int -//line sql.y:3868 +//line sql.y:3875 { yyLOCAL = convertStringToInt(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 699: + case 701: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL int -//line sql.y:3874 +//line sql.y:3881 { yyLOCAL = convertStringToInt(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 700: + case 702: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3880 +//line sql.y:3887 { yyVAL.str = yyDollar[3].identifierCS.String() } - case 701: + case 703: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *PartitionDefinition -//line sql.y:3886 +//line sql.y:3893 { yyLOCAL = &PartitionDefinition{Name: yyDollar[2].identifierCI} } yyVAL.union = yyLOCAL - case 702: + case 704: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:3892 +//line sql.y:3899 { yyVAL.str = "" } - case 703: + case 705: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:3896 +//line sql.y:3903 { yyVAL.str = "" } - case 704: + case 706: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3902 +//line sql.y:3909 { yyLOCAL = &RenameTable{TablePairs: yyDollar[3].renameTablePairsUnion()} } yyVAL.union = yyLOCAL - case 705: + case 707: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL []*RenameTablePair -//line sql.y:3908 +//line sql.y:3915 { yyLOCAL = []*RenameTablePair{{FromTable: yyDollar[1].tableName, ToTable: yyDollar[3].tableName}} } yyVAL.union = yyLOCAL - case 706: + case 708: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:3912 +//line sql.y:3919 { yySLICE := (*[]*RenameTablePair)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, &RenameTablePair{FromTable: yyDollar[3].tableName, ToTable: yyDollar[5].tableName}) } - case 707: + case 709: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3918 +//line sql.y:3925 { yyLOCAL = &DropTable{FromTables: yyDollar[6].tableNamesUnion(), IfExists: yyDollar[5].booleanUnion(), Comments: Comments(yyDollar[2].strs).Parsed(), Temp: yyDollar[3].booleanUnion()} } yyVAL.union = yyLOCAL - case 708: + case 710: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3922 +//line sql.y:3929 { // Change this to an alter statement if yyDollar[4].identifierCI.Lowered() == "primary" { @@ -14050,1319 +14401,1335 @@ yydefault: } } yyVAL.union = yyLOCAL - case 709: + case 711: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:3931 +//line sql.y:3938 { yyLOCAL = &DropView{FromTables: yyDollar[5].tableNamesUnion(), Comments: Comments(yyDollar[2].strs).Parsed(), IfExists: yyDollar[4].booleanUnion()} } yyVAL.union = yyLOCAL - case 710: + case 712: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3935 +//line sql.y:3942 { yyLOCAL = &DropDatabase{Comments: Comments(yyDollar[2].strs).Parsed(), DBName: yyDollar[5].identifierCS, IfExists: yyDollar[4].booleanUnion()} } yyVAL.union = yyLOCAL - case 711: + case 713: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3941 +//line sql.y:3948 { yyLOCAL = &TruncateTable{Table: yyDollar[3].tableName} } yyVAL.union = yyLOCAL - case 712: + case 714: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:3945 +//line sql.y:3952 { yyLOCAL = &TruncateTable{Table: yyDollar[2].tableName} } yyVAL.union = yyLOCAL - case 713: + case 715: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3951 +//line sql.y:3958 { yyLOCAL = &OtherRead{} } yyVAL.union = yyLOCAL - case 714: + case 716: + yyDollar = yyS[yypt-5 : yypt+1] + var yyLOCAL Statement +//line sql.y:3964 + { + yyLOCAL = &PurgeBinaryLogs{To: string(yyDollar[5].str)} + } + yyVAL.union = yyLOCAL + case 717: + yyDollar = yyS[yypt-5 : yypt+1] + var yyLOCAL Statement +//line sql.y:3968 + { + yyLOCAL = &PurgeBinaryLogs{Before: string(yyDollar[5].str)} + } + yyVAL.union = yyLOCAL + case 718: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3957 +//line sql.y:3974 { yyLOCAL = &Show{&ShowBasic{Command: Charset, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 715: + case 719: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3961 +//line sql.y:3978 { yyLOCAL = &Show{&ShowBasic{Command: Collation, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 716: + case 720: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3965 +//line sql.y:3982 { yyLOCAL = &Show{&ShowBasic{Full: yyDollar[2].booleanUnion(), Command: Column, Tbl: yyDollar[5].tableName, DbName: yyDollar[6].identifierCS, Filter: yyDollar[7].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 717: + case 721: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3969 +//line sql.y:3986 { yyLOCAL = &Show{&ShowBasic{Command: Database, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 718: + case 722: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3973 +//line sql.y:3990 { yyLOCAL = &Show{&ShowBasic{Command: Database, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 719: + case 723: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3977 +//line sql.y:3994 { yyLOCAL = &Show{&ShowBasic{Command: Keyspace, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 720: + case 724: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:3981 +//line sql.y:3998 { yyLOCAL = &Show{&ShowBasic{Command: Keyspace, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 721: + case 725: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:3985 +//line sql.y:4002 { yyLOCAL = &Show{&ShowBasic{Command: Function, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 722: + case 726: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:3989 +//line sql.y:4006 { yyLOCAL = &Show{&ShowBasic{Command: Index, Tbl: yyDollar[5].tableName, DbName: yyDollar[6].identifierCS, Filter: yyDollar[7].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 723: + case 727: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:3993 +//line sql.y:4010 { yyLOCAL = &Show{&ShowBasic{Command: OpenTable, DbName: yyDollar[4].identifierCS, Filter: yyDollar[5].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 724: + case 728: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:3997 +//line sql.y:4014 { yyLOCAL = &Show{&ShowBasic{Command: Privilege}} } yyVAL.union = yyLOCAL - case 725: + case 729: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4001 +//line sql.y:4018 { yyLOCAL = &Show{&ShowBasic{Command: Procedure, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 726: + case 730: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4005 +//line sql.y:4022 { yyLOCAL = &Show{&ShowBasic{Command: StatusSession, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 727: + case 731: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4009 +//line sql.y:4026 { yyLOCAL = &Show{&ShowBasic{Command: StatusGlobal, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 728: + case 732: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4013 +//line sql.y:4030 { yyLOCAL = &Show{&ShowBasic{Command: VariableSession, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 729: + case 733: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4017 +//line sql.y:4034 { yyLOCAL = &Show{&ShowBasic{Command: VariableGlobal, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 730: + case 734: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4021 +//line sql.y:4038 { yyLOCAL = &Show{&ShowBasic{Command: TableStatus, DbName: yyDollar[4].identifierCS, Filter: yyDollar[5].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 731: + case 735: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4025 +//line sql.y:4042 { yyLOCAL = &Show{&ShowBasic{Command: Table, Full: yyDollar[2].booleanUnion(), DbName: yyDollar[4].identifierCS, Filter: yyDollar[5].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 732: + case 736: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4029 +//line sql.y:4046 { yyLOCAL = &Show{&ShowBasic{Command: Trigger, DbName: yyDollar[3].identifierCS, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 733: + case 737: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4033 +//line sql.y:4050 { yyLOCAL = &Show{&ShowCreate{Command: CreateDb, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 734: + case 738: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4037 +//line sql.y:4054 { yyLOCAL = &Show{&ShowCreate{Command: CreateE, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 735: + case 739: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4041 +//line sql.y:4058 { yyLOCAL = &Show{&ShowCreate{Command: CreateF, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 736: + case 740: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4045 +//line sql.y:4062 { yyLOCAL = &Show{&ShowCreate{Command: CreateProc, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 737: + case 741: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4049 +//line sql.y:4066 { yyLOCAL = &Show{&ShowCreate{Command: CreateTbl, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 738: + case 742: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4053 +//line sql.y:4070 { yyLOCAL = &Show{&ShowCreate{Command: CreateTr, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 739: + case 743: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4057 +//line sql.y:4074 { yyLOCAL = &Show{&ShowCreate{Command: CreateV, Op: yyDollar[4].tableName}} } yyVAL.union = yyLOCAL - case 740: + case 744: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4061 +//line sql.y:4078 { yyLOCAL = &Show{&ShowBasic{Command: Engines}} } yyVAL.union = yyLOCAL - case 741: + case 745: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4065 +//line sql.y:4082 { yyLOCAL = &Show{&ShowBasic{Command: Plugins}} } yyVAL.union = yyLOCAL - case 742: + case 746: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4069 +//line sql.y:4086 { yyLOCAL = &Show{&ShowBasic{Command: GtidExecGlobal, DbName: yyDollar[4].identifierCS}} } yyVAL.union = yyLOCAL - case 743: + case 747: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4073 +//line sql.y:4090 { yyLOCAL = &Show{&ShowBasic{Command: VGtidExecGlobal, DbName: yyDollar[4].identifierCS}} } yyVAL.union = yyLOCAL - case 744: + case 748: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4077 +//line sql.y:4094 { yyLOCAL = &Show{&ShowBasic{Command: VitessVariables, Filter: yyDollar[4].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 745: + case 749: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4081 +//line sql.y:4098 { yyLOCAL = &Show{&ShowBasic{Command: VitessMigrations, Filter: yyDollar[4].showFilterUnion(), DbName: yyDollar[3].identifierCS}} } yyVAL.union = yyLOCAL - case 746: + case 750: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4085 +//line sql.y:4102 { yyLOCAL = &ShowMigrationLogs{UUID: string(yyDollar[3].str)} } yyVAL.union = yyLOCAL - case 747: + case 751: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4089 +//line sql.y:4106 { yyLOCAL = &ShowThrottledApps{} } yyVAL.union = yyLOCAL - case 748: + case 752: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4093 +//line sql.y:4110 { yyLOCAL = &Show{&ShowBasic{Command: VitessReplicationStatus, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 749: + case 753: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4097 +//line sql.y:4114 { yyLOCAL = &ShowThrottlerStatus{} } yyVAL.union = yyLOCAL - case 750: + case 754: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4101 +//line sql.y:4118 { yyLOCAL = &Show{&ShowBasic{Command: VschemaTables}} } yyVAL.union = yyLOCAL - case 751: + case 755: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4105 +//line sql.y:4122 { yyLOCAL = &Show{&ShowBasic{Command: VschemaVindexes}} } yyVAL.union = yyLOCAL - case 752: + case 756: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4109 +//line sql.y:4126 { yyLOCAL = &Show{&ShowBasic{Command: VschemaVindexes, Tbl: yyDollar[5].tableName}} } yyVAL.union = yyLOCAL - case 753: + case 757: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4113 +//line sql.y:4130 { yyLOCAL = &Show{&ShowBasic{Command: Warnings}} } yyVAL.union = yyLOCAL - case 754: + case 758: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4117 +//line sql.y:4134 { yyLOCAL = &Show{&ShowBasic{Command: VitessShards, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 755: + case 759: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4121 +//line sql.y:4138 { yyLOCAL = &Show{&ShowBasic{Command: VitessTablets, Filter: yyDollar[3].showFilterUnion()}} } yyVAL.union = yyLOCAL - case 756: + case 760: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4125 +//line sql.y:4142 { yyLOCAL = &Show{&ShowBasic{Command: VitessTarget}} } yyVAL.union = yyLOCAL - case 757: + case 761: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4132 +//line sql.y:4149 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].identifierCI.String())}} } yyVAL.union = yyLOCAL - case 758: + case 762: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4136 +//line sql.y:4153 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str) + " " + string(yyDollar[3].str)}} } yyVAL.union = yyLOCAL - case 759: + case 763: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4140 +//line sql.y:4157 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str) + " " + yyDollar[3].identifierCI.String()}} } yyVAL.union = yyLOCAL - case 760: + case 764: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4144 +//line sql.y:4161 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str) + " " + string(yyDollar[3].str)}} } yyVAL.union = yyLOCAL - case 761: + case 765: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4148 +//line sql.y:4165 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str)}} } yyVAL.union = yyLOCAL - case 762: + case 766: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4152 +//line sql.y:4169 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str) + " " + string(yyDollar[3].str) + " " + String(yyDollar[4].tableName)}} } yyVAL.union = yyLOCAL - case 763: + case 767: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4156 +//line sql.y:4173 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str) + " " + string(yyDollar[3].str) + " " + String(yyDollar[4].tableName)}} } yyVAL.union = yyLOCAL - case 764: + case 768: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4160 +//line sql.y:4177 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[3].str)}} } yyVAL.union = yyLOCAL - case 765: + case 769: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4164 +//line sql.y:4181 { yyLOCAL = &Show{&ShowOther{Command: string(yyDollar[2].str)}} } yyVAL.union = yyLOCAL - case 766: + case 770: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4170 +//line sql.y:4187 { yyVAL.str = "" } - case 767: + case 771: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4174 +//line sql.y:4191 { yyVAL.str = "extended " } - case 768: + case 772: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:4180 +//line sql.y:4197 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 769: + case 773: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4184 +//line sql.y:4201 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 770: + case 774: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4190 +//line sql.y:4207 { yyVAL.str = string(yyDollar[1].str) } - case 771: + case 775: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4194 +//line sql.y:4211 { yyVAL.str = string(yyDollar[1].str) } - case 772: + case 776: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4200 +//line sql.y:4217 { yyVAL.identifierCS = NewIdentifierCS("") } - case 773: + case 777: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4204 +//line sql.y:4221 { yyVAL.identifierCS = yyDollar[2].identifierCS } - case 774: + case 778: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4208 +//line sql.y:4225 { yyVAL.identifierCS = yyDollar[2].identifierCS } - case 775: + case 779: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ShowFilter -//line sql.y:4214 +//line sql.y:4231 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 776: + case 780: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ShowFilter -//line sql.y:4218 +//line sql.y:4235 { yyLOCAL = &ShowFilter{Like: string(yyDollar[2].str)} } yyVAL.union = yyLOCAL - case 777: + case 781: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ShowFilter -//line sql.y:4222 +//line sql.y:4239 { yyLOCAL = &ShowFilter{Filter: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 778: + case 782: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ShowFilter -//line sql.y:4228 +//line sql.y:4245 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 779: + case 783: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ShowFilter -//line sql.y:4232 +//line sql.y:4249 { yyLOCAL = &ShowFilter{Like: string(yyDollar[2].str)} } yyVAL.union = yyLOCAL - case 780: + case 784: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4238 +//line sql.y:4255 { yyVAL.empty = struct{}{} } - case 781: + case 785: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4242 +//line sql.y:4259 { yyVAL.empty = struct{}{} } - case 782: + case 786: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4246 +//line sql.y:4263 { yyVAL.empty = struct{}{} } - case 783: + case 787: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4252 +//line sql.y:4269 { yyVAL.str = string(yyDollar[1].str) } - case 784: + case 788: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4256 +//line sql.y:4273 { yyVAL.str = string(yyDollar[1].str) } - case 785: + case 789: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4262 +//line sql.y:4279 { yyLOCAL = &Use{DBName: yyDollar[2].identifierCS} } yyVAL.union = yyLOCAL - case 786: + case 790: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4266 +//line sql.y:4283 { yyLOCAL = &Use{DBName: IdentifierCS{v: ""}} } yyVAL.union = yyLOCAL - case 787: + case 791: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4270 +//line sql.y:4287 { yyLOCAL = &Use{DBName: NewIdentifierCS(yyDollar[2].identifierCS.String() + "@" + string(yyDollar[3].str))} } yyVAL.union = yyLOCAL - case 788: + case 792: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4277 +//line sql.y:4294 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 789: + case 793: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4281 +//line sql.y:4298 { yyVAL.identifierCS = NewIdentifierCS("@" + string(yyDollar[1].str)) } - case 790: + case 794: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4285 +//line sql.y:4302 { yyVAL.identifierCS = NewIdentifierCS("@@" + string(yyDollar[1].str)) } - case 791: + case 795: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4289 +//line sql.y:4306 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 792: + case 796: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4296 +//line sql.y:4313 { yyLOCAL = &Begin{} } yyVAL.union = yyLOCAL - case 793: + case 797: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4300 +//line sql.y:4317 { yyLOCAL = &Begin{TxAccessModes: yyDollar[3].txAccessModesUnion()} } yyVAL.union = yyLOCAL - case 794: + case 798: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []TxAccessMode -//line sql.y:4305 +//line sql.y:4322 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 795: + case 799: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []TxAccessMode -//line sql.y:4309 +//line sql.y:4326 { yyLOCAL = yyDollar[1].txAccessModesUnion() } yyVAL.union = yyLOCAL - case 796: + case 800: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []TxAccessMode -//line sql.y:4315 +//line sql.y:4332 { yyLOCAL = []TxAccessMode{yyDollar[1].txAccessModeUnion()} } yyVAL.union = yyLOCAL - case 797: + case 801: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4319 +//line sql.y:4336 { yySLICE := (*[]TxAccessMode)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].txAccessModeUnion()) } - case 798: + case 802: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL TxAccessMode -//line sql.y:4325 +//line sql.y:4342 { yyLOCAL = WithConsistentSnapshot } yyVAL.union = yyLOCAL - case 799: + case 803: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL TxAccessMode -//line sql.y:4329 +//line sql.y:4346 { yyLOCAL = ReadWrite } yyVAL.union = yyLOCAL - case 800: + case 804: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL TxAccessMode -//line sql.y:4333 +//line sql.y:4350 { yyLOCAL = ReadOnly } yyVAL.union = yyLOCAL - case 801: + case 805: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4340 +//line sql.y:4357 { yyLOCAL = &Commit{} } yyVAL.union = yyLOCAL - case 802: + case 806: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4346 +//line sql.y:4363 { yyLOCAL = &Rollback{} } yyVAL.union = yyLOCAL - case 803: + case 807: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4350 +//line sql.y:4367 { yyLOCAL = &SRollback{Name: yyDollar[5].identifierCI} } yyVAL.union = yyLOCAL - case 804: + case 808: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4355 +//line sql.y:4372 { yyVAL.empty = struct{}{} } - case 805: + case 809: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4357 +//line sql.y:4374 { yyVAL.empty = struct{}{} } - case 806: + case 810: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4360 +//line sql.y:4377 { yyVAL.empty = struct{}{} } - case 807: + case 811: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4362 +//line sql.y:4379 { yyVAL.empty = struct{}{} } - case 808: + case 812: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4366 +//line sql.y:4383 { yyLOCAL = &Savepoint{Name: yyDollar[2].identifierCI} } yyVAL.union = yyLOCAL - case 809: + case 813: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4372 +//line sql.y:4389 { yyLOCAL = &Release{Name: yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 810: + case 814: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4377 +//line sql.y:4394 { yyLOCAL = EmptyType } yyVAL.union = yyLOCAL - case 811: + case 815: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4381 +//line sql.y:4398 { yyLOCAL = JSONType } yyVAL.union = yyLOCAL - case 812: + case 816: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4385 +//line sql.y:4402 { yyLOCAL = TreeType } yyVAL.union = yyLOCAL - case 813: + case 817: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4389 +//line sql.y:4406 { yyLOCAL = VitessType } yyVAL.union = yyLOCAL - case 814: + case 818: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4393 +//line sql.y:4410 { yyLOCAL = VTExplainType } yyVAL.union = yyLOCAL - case 815: + case 819: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4397 +//line sql.y:4414 { yyLOCAL = TraditionalType } yyVAL.union = yyLOCAL - case 816: + case 820: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ExplainType -//line sql.y:4401 +//line sql.y:4418 { yyLOCAL = AnalyzeType } yyVAL.union = yyLOCAL - case 817: + case 821: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL VExplainType -//line sql.y:4406 +//line sql.y:4423 { yyLOCAL = PlanVExplainType } yyVAL.union = yyLOCAL - case 818: + case 822: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL VExplainType -//line sql.y:4410 +//line sql.y:4427 { yyLOCAL = PlanVExplainType } yyVAL.union = yyLOCAL - case 819: + case 823: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL VExplainType -//line sql.y:4414 +//line sql.y:4431 { yyLOCAL = AllVExplainType } yyVAL.union = yyLOCAL - case 820: + case 824: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL VExplainType -//line sql.y:4418 +//line sql.y:4435 { yyLOCAL = QueriesVExplainType } yyVAL.union = yyLOCAL - case 821: + case 825: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4424 +//line sql.y:4441 { yyVAL.str = yyDollar[1].str } - case 822: + case 826: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4428 +//line sql.y:4445 { yyVAL.str = yyDollar[1].str } - case 823: + case 827: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4432 +//line sql.y:4449 { yyVAL.str = yyDollar[1].str } - case 824: + case 828: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4438 +//line sql.y:4455 { yyLOCAL = yyDollar[1].selStmtUnion() } yyVAL.union = yyLOCAL - case 825: + case 829: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4442 +//line sql.y:4459 { yyLOCAL = yyDollar[1].statementUnion() } yyVAL.union = yyLOCAL - case 826: + case 830: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4446 +//line sql.y:4463 { yyLOCAL = yyDollar[1].statementUnion() } yyVAL.union = yyLOCAL - case 827: + case 831: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Statement -//line sql.y:4450 +//line sql.y:4467 { yyLOCAL = yyDollar[1].statementUnion() } yyVAL.union = yyLOCAL - case 828: + case 832: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4455 +//line sql.y:4472 { yyVAL.str = "" } - case 829: + case 833: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4459 +//line sql.y:4476 { yyVAL.str = yyDollar[1].identifierCI.val } - case 830: + case 834: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4463 +//line sql.y:4480 { yyVAL.str = encodeSQLString(yyDollar[1].str) } - case 831: + case 835: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4469 +//line sql.y:4486 { yyLOCAL = &ExplainTab{Table: yyDollar[3].tableName, Wild: yyDollar[4].str} } yyVAL.union = yyLOCAL - case 832: + case 836: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4473 +//line sql.y:4490 { yyLOCAL = &ExplainStmt{Type: yyDollar[3].explainTypeUnion(), Statement: yyDollar[4].statementUnion(), Comments: Comments(yyDollar[2].strs).Parsed()} } yyVAL.union = yyLOCAL - case 833: + case 837: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4479 +//line sql.y:4496 { yyLOCAL = &VExplainStmt{Type: yyDollar[3].vexplainTypeUnion(), Statement: yyDollar[4].statementUnion(), Comments: Comments(yyDollar[2].strs).Parsed()} } yyVAL.union = yyLOCAL - case 834: + case 838: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4485 +//line sql.y:4502 { yyLOCAL = &OtherAdmin{} } yyVAL.union = yyLOCAL - case 835: + case 839: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4489 +//line sql.y:4506 { yyLOCAL = &OtherAdmin{} } yyVAL.union = yyLOCAL - case 836: + case 840: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4495 +//line sql.y:4512 { yyLOCAL = &LockTables{Tables: yyDollar[3].tableAndLockTypesUnion()} } yyVAL.union = yyLOCAL - case 837: + case 841: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableAndLockTypes -//line sql.y:4501 +//line sql.y:4518 { yyLOCAL = TableAndLockTypes{yyDollar[1].tableAndLockTypeUnion()} } yyVAL.union = yyLOCAL - case 838: + case 842: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4505 +//line sql.y:4522 { yySLICE := (*TableAndLockTypes)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableAndLockTypeUnion()) } - case 839: + case 843: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *TableAndLockType -//line sql.y:4511 +//line sql.y:4528 { yyLOCAL = &TableAndLockType{Table: yyDollar[1].aliasedTableNameUnion(), Lock: yyDollar[2].lockTypeUnion()} } yyVAL.union = yyLOCAL - case 840: + case 844: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LockType -//line sql.y:4517 +//line sql.y:4534 { yyLOCAL = Read } yyVAL.union = yyLOCAL - case 841: + case 845: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL LockType -//line sql.y:4521 +//line sql.y:4538 { yyLOCAL = ReadLocal } yyVAL.union = yyLOCAL - case 842: + case 846: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LockType -//line sql.y:4525 +//line sql.y:4542 { yyLOCAL = Write } yyVAL.union = yyLOCAL - case 843: + case 847: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL LockType -//line sql.y:4529 +//line sql.y:4546 { yyLOCAL = LowPriorityWrite } yyVAL.union = yyLOCAL - case 844: + case 848: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Statement -//line sql.y:4535 +//line sql.y:4552 { yyLOCAL = &UnlockTables{} } yyVAL.union = yyLOCAL - case 845: + case 849: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4541 +//line sql.y:4558 { yyLOCAL = &RevertMigration{Comments: Comments(yyDollar[2].strs).Parsed(), UUID: string(yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 846: + case 850: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4547 +//line sql.y:4564 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion(), FlushOptions: yyDollar[3].strs} } yyVAL.union = yyLOCAL - case 847: + case 851: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Statement -//line sql.y:4551 +//line sql.y:4568 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion()} } yyVAL.union = yyLOCAL - case 848: + case 852: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:4555 +//line sql.y:4572 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion(), WithLock: true} } yyVAL.union = yyLOCAL - case 849: + case 853: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4559 +//line sql.y:4576 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion(), TableNames: yyDollar[4].tableNamesUnion()} } yyVAL.union = yyLOCAL - case 850: + case 854: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Statement -//line sql.y:4563 +//line sql.y:4580 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion(), TableNames: yyDollar[4].tableNamesUnion(), WithLock: true} } yyVAL.union = yyLOCAL - case 851: + case 855: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Statement -//line sql.y:4567 +//line sql.y:4584 { yyLOCAL = &Flush{IsLocal: yyDollar[2].booleanUnion(), TableNames: yyDollar[4].tableNamesUnion(), ForExport: true} } yyVAL.union = yyLOCAL - case 852: + case 856: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4573 +//line sql.y:4590 { yyVAL.strs = []string{yyDollar[1].str} } - case 853: + case 857: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4577 +//line sql.y:4594 { yyVAL.strs = append(yyDollar[1].strs, yyDollar[3].str) } - case 854: + case 858: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4583 +//line sql.y:4600 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 855: + case 859: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4587 +//line sql.y:4604 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 856: + case 860: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4591 +//line sql.y:4608 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 857: + case 861: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4595 +//line sql.y:4612 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 858: + case 862: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4599 +//line sql.y:4616 { yyVAL.str = string(yyDollar[1].str) } - case 859: + case 863: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4603 +//line sql.y:4620 { yyVAL.str = string(yyDollar[1].str) } - case 860: + case 864: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4607 +//line sql.y:4624 { yyVAL.str = string(yyDollar[1].str) } - case 861: + case 865: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4611 +//line sql.y:4628 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) + yyDollar[3].str } - case 862: + case 866: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4615 +//line sql.y:4632 { yyVAL.str = string(yyDollar[1].str) + " " + string(yyDollar[2].str) } - case 863: + case 867: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4619 +//line sql.y:4636 { yyVAL.str = string(yyDollar[1].str) } - case 864: + case 868: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4623 +//line sql.y:4640 { yyVAL.str = string(yyDollar[1].str) } - case 865: + case 869: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4627 +//line sql.y:4644 { yyVAL.str = string(yyDollar[1].str) } - case 866: + case 870: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:4632 +//line sql.y:4649 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 867: + case 871: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4636 +//line sql.y:4653 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 868: + case 872: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4640 +//line sql.y:4657 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 869: + case 873: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4645 +//line sql.y:4662 { yyVAL.str = "" } - case 870: + case 874: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4649 +//line sql.y:4666 { yyVAL.str = " " + string(yyDollar[1].str) + " " + string(yyDollar[2].str) + " " + yyDollar[3].identifierCI.String() } - case 871: + case 875: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4654 +//line sql.y:4671 { setAllowComments(yylex, true) } - case 872: + case 876: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4658 +//line sql.y:4675 { yyVAL.strs = yyDollar[2].strs setAllowComments(yylex, false) } - case 873: + case 877: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4664 +//line sql.y:4681 { yyVAL.strs = nil } - case 874: + case 878: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4668 +//line sql.y:4685 { yyVAL.strs = append(yyDollar[1].strs, yyDollar[2].str) } - case 875: + case 879: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4674 +//line sql.y:4691 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 876: + case 880: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:4678 +//line sql.y:4695 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 877: + case 881: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:4682 +//line sql.y:4699 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 878: + case 882: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4687 +//line sql.y:4704 { yyVAL.str = "" } - case 879: + case 883: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4691 +//line sql.y:4708 { yyVAL.str = SQLNoCacheStr } - case 880: + case 884: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4695 +//line sql.y:4712 { yyVAL.str = SQLCacheStr } - case 881: + case 885: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:4700 +//line sql.y:4717 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 882: + case 886: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4704 +//line sql.y:4721 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 883: + case 887: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:4708 +//line sql.y:4725 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 884: + case 888: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4714 +//line sql.y:4731 { yyLOCAL = &PrepareStmt{Name: yyDollar[3].identifierCI, Comments: Comments(yyDollar[2].strs).Parsed(), Statement: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 885: + case 889: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:4718 +//line sql.y:4735 { yyLOCAL = &PrepareStmt{ Name: yyDollar[3].identifierCI, @@ -15371,595 +15738,595 @@ yydefault: } } yyVAL.union = yyLOCAL - case 886: + case 890: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4728 +//line sql.y:4745 { yyLOCAL = &ExecuteStmt{Name: yyDollar[3].identifierCI, Comments: Comments(yyDollar[2].strs).Parsed(), Arguments: yyDollar[4].variablesUnion()} } yyVAL.union = yyLOCAL - case 887: + case 891: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*Variable -//line sql.y:4733 +//line sql.y:4750 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 888: + case 892: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []*Variable -//line sql.y:4737 +//line sql.y:4754 { yyLOCAL = yyDollar[2].variablesUnion() } yyVAL.union = yyLOCAL - case 889: + case 893: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4743 +//line sql.y:4760 { yyLOCAL = &DeallocateStmt{Type: DeallocateType, Comments: Comments(yyDollar[2].strs).Parsed(), Name: yyDollar[4].identifierCI} } yyVAL.union = yyLOCAL - case 890: + case 894: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Statement -//line sql.y:4747 +//line sql.y:4764 { yyLOCAL = &DeallocateStmt{Type: DropType, Comments: Comments(yyDollar[2].strs).Parsed(), Name: yyDollar[4].identifierCI} } yyVAL.union = yyLOCAL - case 891: + case 895: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL SelectExprs -//line sql.y:4752 +//line sql.y:4769 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 892: + case 896: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectExprs -//line sql.y:4756 +//line sql.y:4773 { yyLOCAL = yyDollar[1].selectExprsUnion() } yyVAL.union = yyLOCAL - case 893: + case 897: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4761 +//line sql.y:4778 { yyVAL.strs = nil } - case 894: + case 898: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4765 +//line sql.y:4782 { yyVAL.strs = []string{yyDollar[1].str} } - case 895: + case 899: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4769 +//line sql.y:4786 { // TODO: This is a hack since I couldn't get it to work in a nicer way. I got 'conflicts: 8 shift/reduce' yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str} } - case 896: + case 900: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4773 +//line sql.y:4790 { yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str, yyDollar[3].str} } - case 897: + case 901: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:4777 +//line sql.y:4794 { yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str, yyDollar[3].str, yyDollar[4].str} } - case 898: + case 902: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4783 +//line sql.y:4800 { yyVAL.str = SQLNoCacheStr } - case 899: + case 903: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4787 +//line sql.y:4804 { yyVAL.str = SQLCacheStr } - case 900: + case 904: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4791 +//line sql.y:4808 { yyVAL.str = DistinctStr } - case 901: + case 905: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4795 +//line sql.y:4812 { yyVAL.str = DistinctStr } - case 902: + case 906: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4799 +//line sql.y:4816 { yyVAL.str = StraightJoinHint } - case 903: + case 907: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4803 +//line sql.y:4820 { yyVAL.str = SQLCalcFoundRowsStr } - case 904: + case 908: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4807 +//line sql.y:4824 { yyVAL.str = AllStr // These are not picked up by NewSelect, and so ALL will be dropped. But this is OK, since it's redundant anyway } - case 905: + case 909: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectExprs -//line sql.y:4813 +//line sql.y:4830 { yyLOCAL = SelectExprs{yyDollar[1].selectExprUnion()} } yyVAL.union = yyLOCAL - case 906: + case 910: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4817 +//line sql.y:4834 { yySLICE := (*SelectExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].selectExprUnion()) } - case 907: + case 911: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4823 +//line sql.y:4840 { yyLOCAL = &StarExpr{} } yyVAL.union = yyLOCAL - case 908: + case 912: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4827 +//line sql.y:4844 { yyLOCAL = &AliasedExpr{Expr: yyDollar[1].exprUnion(), As: yyDollar[2].identifierCI} } yyVAL.union = yyLOCAL - case 909: + case 913: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4831 +//line sql.y:4848 { yyLOCAL = &StarExpr{TableName: TableName{Name: yyDollar[1].identifierCS}} } yyVAL.union = yyLOCAL - case 910: + case 914: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL SelectExpr -//line sql.y:4835 +//line sql.y:4852 { yyLOCAL = &StarExpr{TableName: TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS}} } yyVAL.union = yyLOCAL - case 911: + case 915: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:4840 +//line sql.y:4857 { yyVAL.identifierCI = IdentifierCI{} } - case 912: + case 916: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4844 +//line sql.y:4861 { yyVAL.identifierCI = yyDollar[1].identifierCI } - case 913: + case 917: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:4848 +//line sql.y:4865 { yyVAL.identifierCI = yyDollar[2].identifierCI } - case 915: + case 919: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:4855 +//line sql.y:4872 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } - case 916: + case 920: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4860 +//line sql.y:4877 { yyLOCAL = TableExprs{&AliasedTableExpr{Expr: TableName{Name: NewIdentifierCS("dual")}}} } yyVAL.union = yyLOCAL - case 917: + case 921: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4864 +//line sql.y:4881 { yyLOCAL = yyDollar[1].tableExprsUnion() } yyVAL.union = yyLOCAL - case 918: + case 922: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4870 +//line sql.y:4887 { yyLOCAL = yyDollar[2].tableExprsUnion() } yyVAL.union = yyLOCAL - case 919: + case 923: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExprs -//line sql.y:4876 +//line sql.y:4893 { yyLOCAL = TableExprs{yyDollar[1].tableExprUnion()} } yyVAL.union = yyLOCAL - case 920: + case 924: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4880 +//line sql.y:4897 { yySLICE := (*TableExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].tableExprUnion()) } - case 923: + case 927: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExpr -//line sql.y:4890 +//line sql.y:4907 { yyLOCAL = yyDollar[1].aliasedTableNameUnion() } yyVAL.union = yyLOCAL - case 924: + case 928: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:4894 +//line sql.y:4911 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].derivedTableUnion(), As: yyDollar[3].identifierCS, Columns: yyDollar[4].columnsUnion()} } yyVAL.union = yyLOCAL - case 925: + case 929: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL TableExpr -//line sql.y:4898 +//line sql.y:4915 { yyLOCAL = &ParenTableExpr{Exprs: yyDollar[2].tableExprsUnion()} } yyVAL.union = yyLOCAL - case 926: + case 930: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TableExpr -//line sql.y:4902 +//line sql.y:4919 { yyLOCAL = yyDollar[1].tableExprUnion() } yyVAL.union = yyLOCAL - case 927: + case 931: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *DerivedTable -//line sql.y:4908 +//line sql.y:4925 { yyLOCAL = &DerivedTable{Lateral: false, Select: yyDollar[1].selStmtUnion()} } yyVAL.union = yyLOCAL - case 928: + case 932: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *DerivedTable -//line sql.y:4912 +//line sql.y:4929 { yyLOCAL = &DerivedTable{Lateral: true, Select: yyDollar[2].selStmtUnion()} } yyVAL.union = yyLOCAL - case 929: + case 933: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *AliasedTableExpr -//line sql.y:4918 +//line sql.y:4935 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].tableName, As: yyDollar[2].identifierCS, Hints: yyDollar[3].indexHintsUnion()} } yyVAL.union = yyLOCAL - case 930: + case 934: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL *AliasedTableExpr -//line sql.y:4922 +//line sql.y:4939 { yyLOCAL = &AliasedTableExpr{Expr: yyDollar[1].tableName, Partitions: yyDollar[4].partitionsUnion(), As: yyDollar[6].identifierCS, Hints: yyDollar[7].indexHintsUnion()} } yyVAL.union = yyLOCAL - case 931: + case 935: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Columns -//line sql.y:4927 +//line sql.y:4944 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 932: + case 936: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Columns -//line sql.y:4931 +//line sql.y:4948 { yyLOCAL = yyDollar[2].columnsUnion() } yyVAL.union = yyLOCAL - case 933: + case 937: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Columns -//line sql.y:4936 +//line sql.y:4953 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 934: + case 938: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:4940 +//line sql.y:4957 { yyLOCAL = yyDollar[1].columnsUnion() } yyVAL.union = yyLOCAL - case 935: + case 939: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:4946 +//line sql.y:4963 { yyLOCAL = Columns{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL - case 936: + case 940: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4950 +//line sql.y:4967 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } - case 937: + case 941: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*Variable -//line sql.y:4956 +//line sql.y:4973 { yyLOCAL = []*Variable{yyDollar[1].variableUnion()} } yyVAL.union = yyLOCAL - case 938: + case 942: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4960 +//line sql.y:4977 { yySLICE := (*[]*Variable)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].variableUnion()) } - case 939: + case 943: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:4966 +//line sql.y:4983 { yyLOCAL = Columns{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL - case 940: + case 944: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:4970 +//line sql.y:4987 { yyLOCAL = Columns{NewIdentifierCI(string(yyDollar[1].str))} } yyVAL.union = yyLOCAL - case 941: + case 945: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4974 +//line sql.y:4991 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } - case 942: + case 946: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4978 +//line sql.y:4995 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, NewIdentifierCI(string(yyDollar[3].str))) } - case 943: + case 947: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Partitions -//line sql.y:4984 +//line sql.y:5001 { yyLOCAL = Partitions{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL - case 944: + case 948: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:4988 +//line sql.y:5005 { yySLICE := (*Partitions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } - case 945: + case 949: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5001 +//line sql.y:5018 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } yyVAL.union = yyLOCAL - case 946: + case 950: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5005 +//line sql.y:5022 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } yyVAL.union = yyLOCAL - case 947: + case 951: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5009 +//line sql.y:5026 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion(), Condition: yyDollar[4].joinCondition} } yyVAL.union = yyLOCAL - case 948: + case 952: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL TableExpr -//line sql.y:5013 +//line sql.y:5030 { yyLOCAL = &JoinTableExpr{LeftExpr: yyDollar[1].tableExprUnion(), Join: yyDollar[2].joinTypeUnion(), RightExpr: yyDollar[3].tableExprUnion()} } yyVAL.union = yyLOCAL - case 949: + case 953: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5019 +//line sql.y:5036 { yyVAL.joinCondition = &JoinCondition{On: yyDollar[2].exprUnion()} } - case 950: + case 954: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:5021 +//line sql.y:5038 { yyVAL.joinCondition = &JoinCondition{Using: yyDollar[3].columnsUnion()} } - case 951: + case 955: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5025 +//line sql.y:5042 { yyVAL.joinCondition = &JoinCondition{} } - case 952: + case 956: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5027 +//line sql.y:5044 { yyVAL.joinCondition = yyDollar[1].joinCondition } - case 953: + case 957: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5031 +//line sql.y:5048 { yyVAL.joinCondition = &JoinCondition{} } - case 954: + case 958: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5033 +//line sql.y:5050 { yyVAL.joinCondition = &JoinCondition{On: yyDollar[2].exprUnion()} } - case 955: + case 959: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5036 +//line sql.y:5053 { yyVAL.empty = struct{}{} } - case 956: + case 960: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5038 +//line sql.y:5055 { yyVAL.empty = struct{}{} } - case 957: + case 961: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5041 +//line sql.y:5058 { yyVAL.identifierCS = NewIdentifierCS("") } - case 958: + case 962: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5045 +//line sql.y:5062 { yyVAL.identifierCS = yyDollar[1].identifierCS } - case 959: + case 963: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5049 +//line sql.y:5066 { yyVAL.identifierCS = yyDollar[2].identifierCS } - case 961: + case 965: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5056 +//line sql.y:5073 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 962: + case 966: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL JoinType -//line sql.y:5062 +//line sql.y:5079 { yyLOCAL = NormalJoinType } yyVAL.union = yyLOCAL - case 963: + case 967: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5066 +//line sql.y:5083 { yyLOCAL = NormalJoinType } yyVAL.union = yyLOCAL - case 964: + case 968: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5070 +//line sql.y:5087 { yyLOCAL = NormalJoinType } yyVAL.union = yyLOCAL - case 965: + case 969: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL JoinType -//line sql.y:5076 +//line sql.y:5093 { yyLOCAL = StraightJoinType } yyVAL.union = yyLOCAL - case 966: + case 970: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5082 +//line sql.y:5099 { yyLOCAL = LeftJoinType } yyVAL.union = yyLOCAL - case 967: + case 971: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL JoinType -//line sql.y:5086 +//line sql.y:5103 { yyLOCAL = LeftJoinType } yyVAL.union = yyLOCAL - case 968: + case 972: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5090 +//line sql.y:5107 { yyLOCAL = RightJoinType } yyVAL.union = yyLOCAL - case 969: + case 973: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL JoinType -//line sql.y:5094 +//line sql.y:5111 { yyLOCAL = RightJoinType } yyVAL.union = yyLOCAL - case 970: + case 974: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5100 +//line sql.y:5117 { yyLOCAL = NaturalJoinType } yyVAL.union = yyLOCAL - case 971: + case 975: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL JoinType -//line sql.y:5104 +//line sql.y:5121 { if yyDollar[2].joinTypeUnion() == LeftJoinType { yyLOCAL = NaturalLeftJoinType @@ -15968,593 +16335,593 @@ yydefault: } } yyVAL.union = yyLOCAL - case 972: + case 976: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5114 +//line sql.y:5131 { yyVAL.tableName = yyDollar[2].tableName } - case 973: + case 977: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5118 +//line sql.y:5135 { yyVAL.tableName = yyDollar[1].tableName } - case 974: + case 978: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5124 +//line sql.y:5141 { yyVAL.tableName = TableName{Name: yyDollar[1].identifierCS} } - case 975: + case 979: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5128 +//line sql.y:5145 { yyVAL.tableName = TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS} } - case 976: + case 980: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5134 +//line sql.y:5151 { yyVAL.tableName = TableName{Name: yyDollar[1].identifierCS} } - case 977: + case 981: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5139 +//line sql.y:5156 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 978: + case 982: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5143 +//line sql.y:5160 { yyLOCAL = yyDollar[1].indexHintsUnion() } yyVAL.union = yyLOCAL - case 979: + case 983: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IndexHints -//line sql.y:5149 +//line sql.y:5166 { yyLOCAL = IndexHints{yyDollar[1].indexHintUnion()} } yyVAL.union = yyLOCAL - case 980: + case 984: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:5153 +//line sql.y:5170 { yySLICE := (*IndexHints)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].indexHintUnion()) } - case 981: + case 985: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5159 +//line sql.y:5176 { yyLOCAL = &IndexHint{Type: UseOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } yyVAL.union = yyLOCAL - case 982: + case 986: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5163 +//line sql.y:5180 { yyLOCAL = &IndexHint{Type: UseOp, ForType: yyDollar[3].indexHintForTypeUnion()} } yyVAL.union = yyLOCAL - case 983: + case 987: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5167 +//line sql.y:5184 { yyLOCAL = &IndexHint{Type: IgnoreOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } yyVAL.union = yyLOCAL - case 984: + case 988: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL *IndexHint -//line sql.y:5171 +//line sql.y:5188 { yyLOCAL = &IndexHint{Type: ForceOp, ForType: yyDollar[3].indexHintForTypeUnion(), Indexes: yyDollar[5].columnsUnion()} } yyVAL.union = yyLOCAL - case 985: + case 989: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5176 +//line sql.y:5193 { yyLOCAL = NoForType } yyVAL.union = yyLOCAL - case 986: + case 990: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5180 +//line sql.y:5197 { yyLOCAL = JoinForType } yyVAL.union = yyLOCAL - case 987: + case 991: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5184 +//line sql.y:5201 { yyLOCAL = OrderByForType } yyVAL.union = yyLOCAL - case 988: + case 992: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL IndexHintForType -//line sql.y:5188 +//line sql.y:5205 { yyLOCAL = GroupByForType } yyVAL.union = yyLOCAL - case 989: + case 993: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:5194 +//line sql.y:5211 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 990: + case 994: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5198 +//line sql.y:5215 { yyLOCAL = yyDollar[2].exprUnion() } yyVAL.union = yyLOCAL - case 991: + case 995: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5205 +//line sql.y:5222 { yyLOCAL = &OrExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 992: + case 996: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5209 +//line sql.y:5226 { yyLOCAL = &XorExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 993: + case 997: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5213 +//line sql.y:5230 { yyLOCAL = &AndExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 994: + case 998: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5217 +//line sql.y:5234 { yyLOCAL = &NotExpr{Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 995: + case 999: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5221 +//line sql.y:5238 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: yyDollar[3].isExprOperatorUnion()} } yyVAL.union = yyLOCAL - case 996: + case 1000: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5225 +//line sql.y:5242 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 997: + case 1001: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5229 +//line sql.y:5246 { yyLOCAL = &MemberOfExpr{Value: yyDollar[1].exprUnion(), JSONArr: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 998: + case 1002: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5235 +//line sql.y:5252 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: IsNullOp} } yyVAL.union = yyLOCAL - case 999: + case 1003: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5239 +//line sql.y:5256 { yyLOCAL = &IsExpr{Left: yyDollar[1].exprUnion(), Right: IsNotNullOp} } yyVAL.union = yyLOCAL - case 1000: + case 1004: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5243 +//line sql.y:5260 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: yyDollar[2].comparisonExprOperatorUnion(), Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1001: + case 1005: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5247 +//line sql.y:5264 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1002: + case 1006: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5253 +//line sql.y:5270 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: InOp, Right: yyDollar[3].colTupleUnion()} } yyVAL.union = yyLOCAL - case 1003: + case 1007: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5257 +//line sql.y:5274 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotInOp, Right: yyDollar[4].colTupleUnion()} } yyVAL.union = yyLOCAL - case 1004: + case 1008: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5261 +//line sql.y:5278 { yyLOCAL = &BetweenExpr{Left: yyDollar[1].exprUnion(), IsBetween: true, From: yyDollar[3].exprUnion(), To: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1005: + case 1009: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5265 +//line sql.y:5282 { yyLOCAL = &BetweenExpr{Left: yyDollar[1].exprUnion(), IsBetween: false, From: yyDollar[4].exprUnion(), To: yyDollar[6].exprUnion()} } yyVAL.union = yyLOCAL - case 1006: + case 1010: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5269 +//line sql.y:5286 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: LikeOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1007: + case 1011: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5273 +//line sql.y:5290 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotLikeOp, Right: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1008: + case 1012: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5277 +//line sql.y:5294 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: LikeOp, Right: yyDollar[3].exprUnion(), Escape: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1009: + case 1013: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5281 +//line sql.y:5298 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotLikeOp, Right: yyDollar[4].exprUnion(), Escape: yyDollar[6].exprUnion()} } yyVAL.union = yyLOCAL - case 1010: + case 1014: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5285 +//line sql.y:5302 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: RegexpOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1011: + case 1015: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5289 +//line sql.y:5306 { yyLOCAL = &ComparisonExpr{Left: yyDollar[1].exprUnion(), Operator: NotRegexpOp, Right: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1012: + case 1016: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5293 +//line sql.y:5310 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1013: + case 1017: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5299 +//line sql.y:5316 { } - case 1014: + case 1018: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5302 +//line sql.y:5319 { } - case 1015: + case 1019: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5308 +//line sql.y:5325 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitOrOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1016: + case 1020: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5312 +//line sql.y:5329 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitAndOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1017: + case 1021: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5316 +//line sql.y:5333 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ShiftLeftOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1018: + case 1022: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5320 +//line sql.y:5337 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ShiftRightOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1019: + case 1023: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5324 +//line sql.y:5341 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: PlusOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1020: + case 1024: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5328 +//line sql.y:5345 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: MinusOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1021: + case 1025: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5332 +//line sql.y:5349 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: MultOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1022: + case 1026: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5336 +//line sql.y:5353 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: DivOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1023: + case 1027: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5340 +//line sql.y:5357 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ModOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1024: + case 1028: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5344 +//line sql.y:5361 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: IntDivOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1025: + case 1029: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5348 +//line sql.y:5365 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: ModOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1026: + case 1030: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5352 +//line sql.y:5369 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: BitXorOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1027: + case 1031: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5356 +//line sql.y:5373 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1028: + case 1032: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5362 +//line sql.y:5379 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1029: + case 1033: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5366 +//line sql.y:5383 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1030: + case 1034: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5370 +//line sql.y:5387 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1031: + case 1035: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5374 +//line sql.y:5391 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1032: + case 1036: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5378 +//line sql.y:5395 { yyLOCAL = &CollateExpr{Expr: yyDollar[1].exprUnion(), Collation: yyDollar[3].str} } yyVAL.union = yyLOCAL - case 1033: + case 1037: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5382 +//line sql.y:5399 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1034: + case 1038: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5386 +//line sql.y:5403 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1035: + case 1039: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5390 +//line sql.y:5407 { yyLOCAL = yyDollar[1].variableUnion() } yyVAL.union = yyLOCAL - case 1036: + case 1040: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5394 +//line sql.y:5411 { yyLOCAL = yyDollar[2].exprUnion() // TODO: do we really want to ignore unary '+' before any kind of literals? } yyVAL.union = yyLOCAL - case 1037: + case 1041: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5398 +//line sql.y:5415 { yyLOCAL = &UnaryExpr{Operator: UMinusOp, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1038: + case 1042: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5402 +//line sql.y:5419 { yyLOCAL = &UnaryExpr{Operator: TildaOp, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1039: + case 1043: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5406 +//line sql.y:5423 { yyLOCAL = &UnaryExpr{Operator: BangOp, Expr: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1040: + case 1044: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5410 +//line sql.y:5427 { yyLOCAL = yyDollar[1].subqueryUnion() } yyVAL.union = yyLOCAL - case 1041: + case 1045: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5414 +//line sql.y:5431 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1042: + case 1046: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5418 +//line sql.y:5435 { yyLOCAL = &ExistsExpr{Subquery: yyDollar[2].subqueryUnion()} } yyVAL.union = yyLOCAL - case 1043: + case 1047: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:5422 +//line sql.y:5439 { yyLOCAL = &MatchExpr{Columns: yyDollar[2].colNamesUnion(), Expr: yyDollar[5].exprUnion(), Option: yyDollar[6].matchExprOptionUnion()} } yyVAL.union = yyLOCAL - case 1044: + case 1048: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:5426 +//line sql.y:5443 { yyLOCAL = &CastExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].convertTypeUnion(), Array: yyDollar[6].booleanUnion()} } yyVAL.union = yyLOCAL - case 1045: + case 1049: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5430 +//line sql.y:5447 { yyLOCAL = &ConvertExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].convertTypeUnion()} } yyVAL.union = yyLOCAL - case 1046: + case 1050: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5434 +//line sql.y:5451 { yyLOCAL = &ConvertUsingExpr{Expr: yyDollar[3].exprUnion(), Type: yyDollar[5].str} } yyVAL.union = yyLOCAL - case 1047: + case 1051: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5438 +//line sql.y:5455 { // From: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#operator_binary // To convert a string expression to a binary string, these constructs are equivalent: @@ -16563,18 +16930,18 @@ yydefault: yyLOCAL = &ConvertExpr{Expr: yyDollar[2].exprUnion(), Type: &ConvertType{Type: yyDollar[1].str}} } yyVAL.union = yyLOCAL - case 1048: + case 1052: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5446 +//line sql.y:5463 { yyLOCAL = &Default{ColName: yyDollar[2].str} } yyVAL.union = yyLOCAL - case 1049: + case 1053: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5450 +//line sql.y:5467 { // INTERVAL can trigger a shift / reduce conflict. We want // to shift here for the interval rule. In case we do have @@ -16583,2208 +16950,2430 @@ yydefault: yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1050: + case 1054: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5458 +//line sql.y:5475 { yyLOCAL = &IntervalFuncExpr{Expr: yyDollar[3].exprUnion(), Exprs: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1051: + case 1055: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5462 +//line sql.y:5479 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: JSONExtractOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1052: + case 1056: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5466 +//line sql.y:5483 { yyLOCAL = &BinaryExpr{Left: yyDollar[1].exprUnion(), Operator: JSONUnquoteExtractOp, Right: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1053: + case 1057: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:5472 +//line sql.y:5489 { yyLOCAL = &IntervalExpr{Expr: yyDollar[2].exprUnion(), Unit: yyDollar[3].identifierCI.String()} } yyVAL.union = yyLOCAL - case 1054: + case 1058: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5478 +//line sql.y:5495 { yyLOCAL = yyDollar[1].colNamesUnion() } yyVAL.union = yyLOCAL - case 1055: + case 1059: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5482 +//line sql.y:5499 { yyLOCAL = yyDollar[2].colNamesUnion() } yyVAL.union = yyLOCAL - case 1056: + case 1060: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*ColName -//line sql.y:5488 +//line sql.y:5505 { yyLOCAL = []*ColName{yyDollar[1].colNameUnion()} } yyVAL.union = yyLOCAL - case 1057: + case 1061: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5492 +//line sql.y:5509 { yySLICE := (*[]*ColName)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].colNameUnion()) } - case 1058: + case 1062: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5498 +//line sql.y:5515 { yyLOCAL = BothTrimType } yyVAL.union = yyLOCAL - case 1059: + case 1063: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5502 +//line sql.y:5519 { yyLOCAL = LeadingTrimType } yyVAL.union = yyLOCAL - case 1060: + case 1064: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL TrimType -//line sql.y:5506 +//line sql.y:5523 { yyLOCAL = TrailingTrimType } yyVAL.union = yyLOCAL - case 1061: + case 1065: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FrameUnitType -//line sql.y:5512 +//line sql.y:5529 { yyLOCAL = FrameRowsType } yyVAL.union = yyLOCAL - case 1062: + case 1066: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FrameUnitType -//line sql.y:5516 +//line sql.y:5533 { yyLOCAL = FrameRangeType } yyVAL.union = yyLOCAL - case 1063: + case 1067: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5523 +//line sql.y:5540 { yyLOCAL = CumeDistExprType } yyVAL.union = yyLOCAL - case 1064: + case 1068: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5527 +//line sql.y:5544 { yyLOCAL = DenseRankExprType } yyVAL.union = yyLOCAL - case 1065: + case 1069: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5531 +//line sql.y:5548 { yyLOCAL = PercentRankExprType } yyVAL.union = yyLOCAL - case 1066: + case 1070: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5535 +//line sql.y:5552 { yyLOCAL = RankExprType } yyVAL.union = yyLOCAL - case 1067: + case 1071: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ArgumentLessWindowExprType -//line sql.y:5539 +//line sql.y:5556 { yyLOCAL = RowNumberExprType } yyVAL.union = yyLOCAL - case 1068: + case 1072: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5545 +//line sql.y:5562 { yyLOCAL = &FramePoint{Type: CurrentRowType} } yyVAL.union = yyLOCAL - case 1069: + case 1073: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5549 +//line sql.y:5566 { yyLOCAL = &FramePoint{Type: UnboundedPrecedingType} } yyVAL.union = yyLOCAL - case 1070: + case 1074: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5553 +//line sql.y:5570 { yyLOCAL = &FramePoint{Type: UnboundedFollowingType} } yyVAL.union = yyLOCAL - case 1071: + case 1075: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5557 +//line sql.y:5574 { yyLOCAL = &FramePoint{Type: ExprPrecedingType, Expr: yyDollar[1].exprUnion()} } yyVAL.union = yyLOCAL - case 1072: + case 1076: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FramePoint -//line sql.y:5561 +//line sql.y:5578 { yyLOCAL = &FramePoint{Type: ExprFollowingType, Expr: yyDollar[1].exprUnion()} } yyVAL.union = yyLOCAL - case 1073: + case 1077: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5567 +//line sql.y:5584 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1074: + case 1078: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5571 +//line sql.y:5588 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1075: + case 1079: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5576 +//line sql.y:5593 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1076: + case 1080: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5580 +//line sql.y:5597 { yyLOCAL = yyDollar[1].frameClauseUnion() } yyVAL.union = yyLOCAL - case 1077: + case 1081: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5586 +//line sql.y:5603 { yyLOCAL = &FrameClause{Unit: yyDollar[1].frameUnitTypeUnion(), Start: yyDollar[2].framePointUnion()} } yyVAL.union = yyLOCAL - case 1078: + case 1082: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *FrameClause -//line sql.y:5590 +//line sql.y:5607 { yyLOCAL = &FrameClause{Unit: yyDollar[1].frameUnitTypeUnion(), Start: yyDollar[3].framePointUnion(), End: yyDollar[5].framePointUnion()} } yyVAL.union = yyLOCAL - case 1079: + case 1083: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Exprs -//line sql.y:5595 +//line sql.y:5612 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1080: + case 1084: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Exprs -//line sql.y:5599 +//line sql.y:5616 { yyLOCAL = yyDollar[3].exprsUnion() } yyVAL.union = yyLOCAL - case 1081: + case 1085: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5604 +//line sql.y:5621 { } - case 1082: + case 1086: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:5607 +//line sql.y:5624 { yyVAL.identifierCI = yyDollar[1].identifierCI } - case 1083: + case 1087: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *WindowSpecification -//line sql.y:5613 +//line sql.y:5630 { yyLOCAL = &WindowSpecification{Name: yyDollar[1].identifierCI, PartitionClause: yyDollar[2].exprsUnion(), OrderClause: yyDollar[3].orderByUnion(), FrameClause: yyDollar[4].frameClauseUnion()} } yyVAL.union = yyLOCAL - case 1084: + case 1088: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5619 +//line sql.y:5636 { yyLOCAL = &OverClause{WindowSpec: yyDollar[3].windowSpecificationUnion()} } yyVAL.union = yyLOCAL - case 1085: + case 1089: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *OverClause -//line sql.y:5623 +//line sql.y:5640 { yyLOCAL = &OverClause{WindowName: yyDollar[2].identifierCI} } yyVAL.union = yyLOCAL - case 1086: + case 1090: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *NullTreatmentClause -//line sql.y:5628 +//line sql.y:5645 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1088: + case 1092: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *NullTreatmentClause -//line sql.y:5635 +//line sql.y:5652 { yyLOCAL = &NullTreatmentClause{yyDollar[1].nullTreatmentTypeUnion()} } yyVAL.union = yyLOCAL - case 1089: + case 1093: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL NullTreatmentType -//line sql.y:5641 +//line sql.y:5658 { yyLOCAL = RespectNullsType } yyVAL.union = yyLOCAL - case 1090: + case 1094: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL NullTreatmentType -//line sql.y:5645 +//line sql.y:5662 { yyLOCAL = IgnoreNullsType } yyVAL.union = yyLOCAL - case 1091: + case 1095: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FirstOrLastValueExprType -//line sql.y:5651 +//line sql.y:5668 { yyLOCAL = FirstValueExprType } yyVAL.union = yyLOCAL - case 1092: + case 1096: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL FirstOrLastValueExprType -//line sql.y:5655 +//line sql.y:5672 { yyLOCAL = LastValueExprType } yyVAL.union = yyLOCAL - case 1093: + case 1097: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL FromFirstLastType -//line sql.y:5661 +//line sql.y:5678 { yyLOCAL = FromFirstType } yyVAL.union = yyLOCAL - case 1094: + case 1098: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL FromFirstLastType -//line sql.y:5665 +//line sql.y:5682 { yyLOCAL = FromLastType } yyVAL.union = yyLOCAL - case 1095: + case 1099: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *FromFirstLastClause -//line sql.y:5670 +//line sql.y:5687 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1097: + case 1101: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *FromFirstLastClause -//line sql.y:5677 +//line sql.y:5694 { yyLOCAL = &FromFirstLastClause{yyDollar[1].fromFirstLastTypeUnion()} } yyVAL.union = yyLOCAL - case 1098: + case 1102: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LagLeadExprType -//line sql.y:5683 +//line sql.y:5700 { yyLOCAL = LagExprType } yyVAL.union = yyLOCAL - case 1099: + case 1103: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL LagLeadExprType -//line sql.y:5687 +//line sql.y:5704 { yyLOCAL = LeadExprType } yyVAL.union = yyLOCAL - case 1100: + case 1104: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *WindowDefinition -//line sql.y:5693 +//line sql.y:5710 { yyLOCAL = &WindowDefinition{Name: yyDollar[1].identifierCI, WindowSpec: yyDollar[4].windowSpecificationUnion()} } yyVAL.union = yyLOCAL - case 1101: + case 1105: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL WindowDefinitions -//line sql.y:5699 +//line sql.y:5716 { yyLOCAL = WindowDefinitions{yyDollar[1].windowDefinitionUnion()} } yyVAL.union = yyLOCAL - case 1102: + case 1106: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5703 +//line sql.y:5720 { yySLICE := (*WindowDefinitions)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].windowDefinitionUnion()) } - case 1103: + case 1107: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:5709 +//line sql.y:5726 { yyVAL.str = "" } - case 1104: + case 1108: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5713 +//line sql.y:5730 { yyVAL.str = string(yyDollar[2].identifierCI.String()) } - case 1105: + case 1109: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL BoolVal -//line sql.y:5719 +//line sql.y:5736 { yyLOCAL = BoolVal(true) } yyVAL.union = yyLOCAL - case 1106: + case 1110: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL BoolVal -//line sql.y:5723 +//line sql.y:5740 { yyLOCAL = BoolVal(false) } yyVAL.union = yyLOCAL - case 1107: + case 1111: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5730 +//line sql.y:5747 { yyLOCAL = IsTrueOp } yyVAL.union = yyLOCAL - case 1108: + case 1112: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5734 +//line sql.y:5751 { yyLOCAL = IsNotTrueOp } yyVAL.union = yyLOCAL - case 1109: + case 1113: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5738 +//line sql.y:5755 { yyLOCAL = IsFalseOp } yyVAL.union = yyLOCAL - case 1110: + case 1114: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL IsExprOperator -//line sql.y:5742 +//line sql.y:5759 { yyLOCAL = IsNotFalseOp } yyVAL.union = yyLOCAL - case 1111: + case 1115: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5748 +//line sql.y:5765 { yyLOCAL = EqualOp } yyVAL.union = yyLOCAL - case 1112: + case 1116: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5752 +//line sql.y:5769 { yyLOCAL = LessThanOp } yyVAL.union = yyLOCAL - case 1113: + case 1117: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5756 +//line sql.y:5773 { yyLOCAL = GreaterThanOp } yyVAL.union = yyLOCAL - case 1114: + case 1118: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5760 +//line sql.y:5777 { yyLOCAL = LessEqualOp } yyVAL.union = yyLOCAL - case 1115: + case 1119: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5764 +//line sql.y:5781 { yyLOCAL = GreaterEqualOp } yyVAL.union = yyLOCAL - case 1116: + case 1120: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5768 +//line sql.y:5785 { yyLOCAL = NotEqualOp } yyVAL.union = yyLOCAL - case 1117: + case 1121: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ComparisonExprOperator -//line sql.y:5772 +//line sql.y:5789 { yyLOCAL = NullSafeEqualOp } yyVAL.union = yyLOCAL - case 1118: + case 1122: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5778 +//line sql.y:5795 { yyLOCAL = yyDollar[1].valTupleUnion() } yyVAL.union = yyLOCAL - case 1119: + case 1123: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5782 +//line sql.y:5799 { yyLOCAL = yyDollar[1].subqueryUnion() } yyVAL.union = yyLOCAL - case 1120: + case 1124: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ColTuple -//line sql.y:5786 +//line sql.y:5803 { yyLOCAL = ListArg(yyDollar[1].str[2:]) - bindVariable(yylex, yyDollar[1].str[2:]) + markBindVariable(yylex, yyDollar[1].str[2:]) } yyVAL.union = yyLOCAL - case 1121: + case 1125: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Subquery -//line sql.y:5793 +//line sql.y:5810 { yyLOCAL = &Subquery{yyDollar[1].selStmtUnion()} } yyVAL.union = yyLOCAL - case 1122: + case 1126: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Exprs -//line sql.y:5799 +//line sql.y:5816 { yyLOCAL = Exprs{yyDollar[1].exprUnion()} } yyVAL.union = yyLOCAL - case 1123: + case 1127: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:5803 +//line sql.y:5820 { yySLICE := (*Exprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].exprUnion()) } - case 1124: + case 1128: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5813 +//line sql.y:5830 { yyLOCAL = &FuncExpr{Name: yyDollar[1].identifierCI, Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1125: + case 1129: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5817 +//line sql.y:5834 { yyLOCAL = &FuncExpr{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCI, Exprs: yyDollar[5].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1126: + case 1130: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5827 +//line sql.y:5844 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("left"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1127: + case 1131: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5831 +//line sql.y:5848 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("right"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1128: + case 1132: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:5835 +//line sql.y:5852 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion(), To: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1129: + case 1133: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5839 +//line sql.y:5856 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1130: + case 1134: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:5843 +//line sql.y:5860 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion(), To: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1131: + case 1135: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5847 +//line sql.y:5864 { yyLOCAL = &SubstrExpr{Name: yyDollar[3].exprUnion(), From: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1132: + case 1136: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5851 +//line sql.y:5868 { yyLOCAL = &CaseExpr{Expr: yyDollar[2].exprUnion(), Whens: yyDollar[3].whensUnion(), Else: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1133: + case 1137: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5855 +//line sql.y:5872 { yyLOCAL = &ValuesFuncExpr{Name: yyDollar[3].colNameUnion()} } yyVAL.union = yyLOCAL - case 1134: + case 1138: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:5859 +//line sql.y:5876 { yyLOCAL = &InsertExpr{Str: yyDollar[3].exprUnion(), Pos: yyDollar[5].exprUnion(), Len: yyDollar[7].exprUnion(), NewStr: yyDollar[9].exprUnion()} } yyVAL.union = yyLOCAL - case 1135: + case 1139: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5863 +//line sql.y:5880 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1136: + case 1140: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5874 +//line sql.y:5891 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("utc_date")} } yyVAL.union = yyLOCAL - case 1137: + case 1141: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:5878 +//line sql.y:5895 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1138: + case 1142: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5884 +//line sql.y:5901 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("current_date")} } yyVAL.union = yyLOCAL - case 1139: + case 1143: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5888 +//line sql.y:5905 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("utc_time"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1140: + case 1144: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:5893 +//line sql.y:5910 { yyLOCAL = &CurTimeFuncExpr{Name: NewIdentifierCI("current_time"), Fsp: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1141: + case 1145: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5897 +//line sql.y:5914 { yyLOCAL = &CountStar{} } yyVAL.union = yyLOCAL - case 1142: + case 1146: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5901 +//line sql.y:5918 { yyLOCAL = &Count{Distinct: yyDollar[3].booleanUnion(), Args: yyDollar[4].exprsUnion()} } yyVAL.union = yyLOCAL - case 1143: + case 1147: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5905 +//line sql.y:5922 { yyLOCAL = &Max{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1144: + case 1148: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5909 +//line sql.y:5926 { yyLOCAL = &Min{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1145: + case 1149: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5913 +//line sql.y:5930 { yyLOCAL = &Sum{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1146: + case 1150: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5917 +//line sql.y:5934 { yyLOCAL = &Avg{Distinct: yyDollar[3].booleanUnion(), Arg: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1147: + case 1151: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5921 +//line sql.y:5938 { yyLOCAL = &BitAnd{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1148: + case 1152: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5925 +//line sql.y:5942 { yyLOCAL = &BitOr{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1149: + case 1153: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5929 +//line sql.y:5946 { yyLOCAL = &BitXor{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1150: + case 1154: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5933 +//line sql.y:5950 { yyLOCAL = &Std{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1151: + case 1155: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5937 +//line sql.y:5954 { yyLOCAL = &StdDev{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1152: + case 1156: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5941 +//line sql.y:5958 { yyLOCAL = &StdPop{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1153: + case 1157: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5945 +//line sql.y:5962 { yyLOCAL = &StdSamp{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1154: + case 1158: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5949 +//line sql.y:5966 { yyLOCAL = &VarPop{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1155: + case 1159: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5953 +//line sql.y:5970 { yyLOCAL = &VarSamp{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1156: + case 1160: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5957 +//line sql.y:5974 { yyLOCAL = &Variance{Arg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1157: + case 1161: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:5961 +//line sql.y:5978 { yyLOCAL = &GroupConcatExpr{Distinct: yyDollar[3].booleanUnion(), Exprs: yyDollar[4].exprsUnion(), OrderBy: yyDollar[5].orderByUnion(), Separator: yyDollar[6].str, Limit: yyDollar[7].limitUnion()} } yyVAL.union = yyLOCAL - case 1158: + case 1162: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:5965 +//line sql.y:5982 { yyLOCAL = &TimestampFuncExpr{Name: string("timestampadd"), Unit: yyDollar[3].identifierCI.String(), Expr1: yyDollar[5].exprUnion(), Expr2: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1159: + case 1163: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:5969 +//line sql.y:5986 { yyLOCAL = &TimestampFuncExpr{Name: string("timestampdiff"), Unit: yyDollar[3].identifierCI.String(), Expr1: yyDollar[5].exprUnion(), Expr2: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1160: + case 1164: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:5973 +//line sql.y:5990 { yyLOCAL = &ExtractFuncExpr{IntervalTypes: yyDollar[3].intervalTypeUnion(), Expr: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1161: + case 1165: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:5977 +//line sql.y:5994 { yyLOCAL = &WeightStringFuncExpr{Expr: yyDollar[3].exprUnion(), As: yyDollar[4].convertTypeUnion()} } yyVAL.union = yyLOCAL - case 1162: + case 1166: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5981 +//line sql.y:5998 { yyLOCAL = &JSONPrettyExpr{JSONVal: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1163: + case 1167: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5985 +//line sql.y:6002 { yyLOCAL = &JSONStorageFreeExpr{JSONVal: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1164: + case 1168: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5989 +//line sql.y:6006 { yyLOCAL = &JSONStorageSizeExpr{JSONVal: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1165: + case 1169: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5993 +//line sql.y:6010 { yyLOCAL = &TrimFuncExpr{TrimFuncType: LTrimType, StringArg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1166: + case 1170: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:5997 +//line sql.y:6014 { yyLOCAL = &TrimFuncExpr{TrimFuncType: RTrimType, StringArg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1167: + case 1171: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:6001 +//line sql.y:6018 { yyLOCAL = &TrimFuncExpr{Type: yyDollar[3].trimTypeUnion(), TrimArg: yyDollar[4].exprUnion(), StringArg: yyDollar[6].exprUnion()} } yyVAL.union = yyLOCAL - case 1168: + case 1172: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6005 +//line sql.y:6022 { yyLOCAL = &TrimFuncExpr{StringArg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1169: + case 1173: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6009 +//line sql.y:6026 { yyLOCAL = &CharExpr{Exprs: yyDollar[3].exprsUnion()} } yyVAL.union = yyLOCAL - case 1170: + case 1174: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6013 +//line sql.y:6030 { yyLOCAL = &CharExpr{Exprs: yyDollar[3].exprsUnion(), Charset: yyDollar[5].str} } yyVAL.union = yyLOCAL - case 1171: + case 1175: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6017 +//line sql.y:6034 { yyLOCAL = &TrimFuncExpr{TrimArg: yyDollar[3].exprUnion(), StringArg: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1172: + case 1176: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6021 +//line sql.y:6038 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1173: + case 1177: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6025 +//line sql.y:6042 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion(), Pos: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1174: + case 1178: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6029 +//line sql.y:6046 { yyLOCAL = &LocateExpr{SubStr: yyDollar[3].exprUnion(), Str: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1175: + case 1179: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6033 +//line sql.y:6050 { yyLOCAL = &LockingFunc{Type: GetLock, Name: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1176: + case 1180: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6037 +//line sql.y:6054 { yyLOCAL = &LockingFunc{Type: IsFreeLock, Name: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1177: + case 1181: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6041 +//line sql.y:6058 { yyLOCAL = &LockingFunc{Type: IsUsedLock, Name: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1178: + case 1182: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6045 +//line sql.y:6062 { yyLOCAL = &LockingFunc{Type: ReleaseAllLocks} } yyVAL.union = yyLOCAL - case 1179: + case 1183: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6049 +//line sql.y:6066 { yyLOCAL = &LockingFunc{Type: ReleaseLock, Name: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1180: + case 1184: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6053 +//line sql.y:6070 { yyLOCAL = &JSONSchemaValidFuncExpr{Schema: yyDollar[3].exprUnion(), Document: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1181: + case 1185: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6057 +//line sql.y:6074 { yyLOCAL = &JSONSchemaValidationReportFuncExpr{Schema: yyDollar[3].exprUnion(), Document: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1182: + case 1186: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6061 +//line sql.y:6078 { yyLOCAL = &JSONArrayExpr{Params: yyDollar[3].exprsUnion()} } yyVAL.union = yyLOCAL - case 1183: + case 1187: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6082 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1188: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6086 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1189: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6090 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1190: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6094 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1191: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6098 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1192: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6102 + { + yyLOCAL = &GeomFromTextExpr{Type: GeometryCollectionFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1193: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6106 + { + yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1194: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6110 + { + yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1195: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6114 + { + yyLOCAL = &GeomFromTextExpr{Type: LineStringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1196: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6118 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1197: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6122 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1198: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6126 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiLinestringFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1199: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6130 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1200: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6134 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1201: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6138 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1202: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6142 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1203: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6146 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1204: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6150 + { + yyLOCAL = &GeomFromTextExpr{Type: MultiPolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1205: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6154 + { + yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1206: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6158 + { + yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1207: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6162 + { + yyLOCAL = &GeomFromTextExpr{Type: PointFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1208: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6166 + { + yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1209: + yyDollar = yyS[yypt-6 : yypt+1] + var yyLOCAL Expr +//line sql.y:6170 + { + yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1210: + yyDollar = yyS[yypt-8 : yypt+1] + var yyLOCAL Expr +//line sql.y:6174 + { + yyLOCAL = &GeomFromTextExpr{Type: PolygonFromText, WktText: yyDollar[3].exprUnion(), Srid: yyDollar[5].exprUnion(), AxisOrderOpt: yyDollar[7].exprUnion()} + } + yyVAL.union = yyLOCAL + case 1211: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6065 +//line sql.y:6178 { yyLOCAL = &JSONObjectExpr{Params: yyDollar[3].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1184: + case 1212: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6069 +//line sql.y:6182 { yyLOCAL = &JSONQuoteExpr{StringArg: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1185: + case 1213: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6073 +//line sql.y:6186 { yyLOCAL = &JSONContainsExpr{Target: yyDollar[3].exprUnion(), Candidate: yyDollar[5].exprsUnion()[0], PathList: yyDollar[5].exprsUnion()[1:]} } yyVAL.union = yyLOCAL - case 1186: + case 1214: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6077 +//line sql.y:6190 { yyLOCAL = &JSONContainsPathExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), PathList: yyDollar[7].exprsUnion()} } yyVAL.union = yyLOCAL - case 1187: + case 1215: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6081 +//line sql.y:6194 { yyLOCAL = &JSONExtractExpr{JSONDoc: yyDollar[3].exprUnion(), PathList: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1188: + case 1216: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6085 +//line sql.y:6198 { yyLOCAL = &JSONKeysExpr{JSONDoc: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1189: + case 1217: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6089 +//line sql.y:6202 { yyLOCAL = &JSONKeysExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1190: + case 1218: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6093 +//line sql.y:6206 { yyLOCAL = &JSONOverlapsExpr{JSONDoc1: yyDollar[3].exprUnion(), JSONDoc2: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1191: + case 1219: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6097 +//line sql.y:6210 { yyLOCAL = &JSONSearchExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), SearchStr: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1192: + case 1220: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6101 +//line sql.y:6214 { yyLOCAL = &JSONSearchExpr{JSONDoc: yyDollar[3].exprUnion(), OneOrAll: yyDollar[5].exprUnion(), SearchStr: yyDollar[7].exprUnion(), EscapeChar: yyDollar[9].exprsUnion()[0], PathList: yyDollar[9].exprsUnion()[1:]} } yyVAL.union = yyLOCAL - case 1193: + case 1221: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL Expr -//line sql.y:6105 +//line sql.y:6218 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion()} } yyVAL.union = yyLOCAL - case 1194: + case 1222: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6109 +//line sql.y:6222 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion()} } yyVAL.union = yyLOCAL - case 1195: + case 1223: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6113 +//line sql.y:6226 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), ErrorOnResponse: yyDollar[7].jtOnResponseUnion()} } yyVAL.union = yyLOCAL - case 1196: + case 1224: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6117 +//line sql.y:6230 { yyLOCAL = &JSONValueExpr{JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion(), ReturningType: yyDollar[6].convertTypeUnion(), EmptyOnResponse: yyDollar[7].jtOnResponseUnion(), ErrorOnResponse: yyDollar[8].jtOnResponseUnion()} } yyVAL.union = yyLOCAL - case 1197: + case 1225: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6121 +//line sql.y:6234 { yyLOCAL = &JSONAttributesExpr{Type: DepthAttributeType, JSONDoc: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1198: + case 1226: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6125 +//line sql.y:6238 { yyLOCAL = &JSONAttributesExpr{Type: ValidAttributeType, JSONDoc: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1199: + case 1227: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6129 +//line sql.y:6242 { yyLOCAL = &JSONAttributesExpr{Type: TypeAttributeType, JSONDoc: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1200: + case 1228: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6133 +//line sql.y:6246 { yyLOCAL = &JSONAttributesExpr{Type: LengthAttributeType, JSONDoc: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1201: + case 1229: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6137 +//line sql.y:6250 { yyLOCAL = &JSONAttributesExpr{Type: LengthAttributeType, JSONDoc: yyDollar[3].exprUnion(), Path: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1202: + case 1230: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6141 +//line sql.y:6254 { yyLOCAL = &JSONValueModifierExpr{Type: JSONArrayAppendType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1203: + case 1231: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6145 +//line sql.y:6258 { yyLOCAL = &JSONValueModifierExpr{Type: JSONArrayInsertType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1204: + case 1232: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6149 +//line sql.y:6262 { yyLOCAL = &JSONValueModifierExpr{Type: JSONInsertType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1205: + case 1233: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6153 +//line sql.y:6266 { yyLOCAL = &JSONValueModifierExpr{Type: JSONReplaceType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1206: + case 1234: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6157 +//line sql.y:6270 { yyLOCAL = &JSONValueModifierExpr{Type: JSONSetType, JSONDoc: yyDollar[3].exprUnion(), Params: yyDollar[5].jsonObjectParamsUnion()} } yyVAL.union = yyLOCAL - case 1207: + case 1235: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6161 +//line sql.y:6274 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergeType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1208: + case 1236: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6165 +//line sql.y:6278 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergePatchType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1209: + case 1237: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6169 +//line sql.y:6282 { yyLOCAL = &JSONValueMergeExpr{Type: JSONMergePreserveType, JSONDoc: yyDollar[3].exprUnion(), JSONDocList: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1210: + case 1238: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6173 +//line sql.y:6286 { yyLOCAL = &JSONRemoveExpr{JSONDoc: yyDollar[3].exprUnion(), PathList: yyDollar[5].exprsUnion()} } yyVAL.union = yyLOCAL - case 1211: + case 1239: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6177 +//line sql.y:6290 { yyLOCAL = &JSONUnquoteExpr{JSONValue: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1212: + case 1240: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6181 +//line sql.y:6294 + { + yyLOCAL = &MultiPolygonExpr{PolygonParams: yyDollar[3].exprsUnion()} + } + yyVAL.union = yyLOCAL + case 1241: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6298 + { + yyLOCAL = &MultiPointExpr{PointParams: yyDollar[3].exprsUnion()} + } + yyVAL.union = yyLOCAL + case 1242: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6302 + { + yyLOCAL = &MultiLinestringExpr{LinestringParams: yyDollar[3].exprsUnion()} + } + yyVAL.union = yyLOCAL + case 1243: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6306 + { + yyLOCAL = &PolygonExpr{LinestringParams: yyDollar[3].exprsUnion()} + } + yyVAL.union = yyLOCAL + case 1244: + yyDollar = yyS[yypt-4 : yypt+1] + var yyLOCAL Expr +//line sql.y:6310 { yyLOCAL = &LineStringExpr{PointParams: yyDollar[3].exprsUnion()} } yyVAL.union = yyLOCAL - case 1213: + case 1245: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6185 +//line sql.y:6314 { yyLOCAL = &PointExpr{XCordinate: yyDollar[3].exprUnion(), YCordinate: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1214: + case 1246: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6189 +//line sql.y:6318 { yyLOCAL = &ArgumentLessWindowExpr{Type: yyDollar[1].argumentLessWindowExprTypeUnion(), OverClause: yyDollar[4].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1215: + case 1247: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6193 +//line sql.y:6322 { yyLOCAL = &FirstOrLastValueExpr{Type: yyDollar[1].firstOrLastValueExprTypeUnion(), Expr: yyDollar[3].exprUnion(), NullTreatmentClause: yyDollar[5].nullTreatmentClauseUnion(), OverClause: yyDollar[6].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1216: + case 1248: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Expr -//line sql.y:6197 +//line sql.y:6326 { yyLOCAL = &NtileExpr{N: yyDollar[3].exprUnion(), OverClause: yyDollar[5].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1217: + case 1249: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6201 +//line sql.y:6330 { yyLOCAL = &NTHValueExpr{Expr: yyDollar[3].exprUnion(), N: yyDollar[5].exprUnion(), FromFirstLastClause: yyDollar[7].fromFirstLastClauseUnion(), NullTreatmentClause: yyDollar[8].nullTreatmentClauseUnion(), OverClause: yyDollar[9].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1218: + case 1250: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6205 +//line sql.y:6334 { yyLOCAL = &LagLeadExpr{Type: yyDollar[1].lagLeadExprTypeUnion(), Expr: yyDollar[3].exprUnion(), NullTreatmentClause: yyDollar[5].nullTreatmentClauseUnion(), OverClause: yyDollar[6].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1219: + case 1251: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL Expr -//line sql.y:6209 +//line sql.y:6338 { yyLOCAL = &LagLeadExpr{Type: yyDollar[1].lagLeadExprTypeUnion(), Expr: yyDollar[3].exprUnion(), N: yyDollar[5].exprUnion(), Default: yyDollar[6].exprUnion(), NullTreatmentClause: yyDollar[8].nullTreatmentClauseUnion(), OverClause: yyDollar[9].overClauseUnion()} } yyVAL.union = yyLOCAL - case 1224: + case 1256: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6219 +//line sql.y:6348 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1225: + case 1257: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6223 +//line sql.y:6352 { yyLOCAL = NewIntLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL - case 1226: + case 1258: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6227 +//line sql.y:6356 { yyLOCAL = yyDollar[1].variableUnion() } yyVAL.union = yyLOCAL - case 1227: + case 1259: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6231 +//line sql.y:6360 { - yyLOCAL = NewArgument(yyDollar[1].str[1:]) - bindVariable(yylex, yyDollar[1].str[1:]) + yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) } yyVAL.union = yyLOCAL - case 1228: + case 1260: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6237 +//line sql.y:6365 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1229: + case 1261: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6241 +//line sql.y:6369 { yyLOCAL = yyDollar[2].exprUnion() } yyVAL.union = yyLOCAL - case 1230: + case 1262: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6247 +//line sql.y:6375 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1231: + case 1263: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6251 +//line sql.y:6379 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1232: + case 1264: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6255 +//line sql.y:6383 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion()} } yyVAL.union = yyLOCAL - case 1233: + case 1265: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6259 +//line sql.y:6387 { yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), ReturnOption: yyDollar[11].exprUnion()} } yyVAL.union = yyLOCAL - case 1234: + case 1266: yyDollar = yyS[yypt-14 : yypt+1] var yyLOCAL Expr -//line sql.y:6263 +//line sql.y:6391 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpInstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), ReturnOption: yyDollar[11].exprUnion(), MatchType: yyDollar[13].exprUnion()} } yyVAL.union = yyLOCAL - case 1235: + case 1267: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6268 +//line sql.y:6396 { yyLOCAL = &RegexpLikeExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1236: + case 1268: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6272 +//line sql.y:6400 { yyLOCAL = &RegexpLikeExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), MatchType: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1237: + case 1269: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6276 +//line sql.y:6404 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1238: + case 1270: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6280 +//line sql.y:6408 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion()} } yyVAL.union = yyLOCAL - case 1239: + case 1271: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6284 +//line sql.y:6412 { yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion(), Occurrence: yyDollar[11].exprUnion()} } yyVAL.union = yyLOCAL - case 1240: + case 1272: yyDollar = yyS[yypt-14 : yypt+1] var yyLOCAL Expr -//line sql.y:6288 +//line sql.y:6416 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpReplaceExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Repl: yyDollar[7].exprUnion(), Position: yyDollar[9].exprUnion(), Occurrence: yyDollar[11].exprUnion(), MatchType: yyDollar[13].exprUnion()} } yyVAL.union = yyLOCAL - case 1241: + case 1273: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6293 +//line sql.y:6421 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1242: + case 1274: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6297 +//line sql.y:6425 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1243: + case 1275: yyDollar = yyS[yypt-10 : yypt+1] var yyLOCAL Expr -//line sql.y:6301 +//line sql.y:6429 { yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion()} } yyVAL.union = yyLOCAL - case 1244: + case 1276: yyDollar = yyS[yypt-12 : yypt+1] var yyLOCAL Expr -//line sql.y:6305 +//line sql.y:6433 { // Match type is kept expression as TRIM( ' m ') is accepted yyLOCAL = &RegexpSubstrExpr{Expr: yyDollar[3].exprUnion(), Pattern: yyDollar[5].exprUnion(), Position: yyDollar[7].exprUnion(), Occurrence: yyDollar[9].exprUnion(), MatchType: yyDollar[11].exprUnion()} } yyVAL.union = yyLOCAL - case 1245: + case 1277: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6312 +//line sql.y:6440 { yyLOCAL = &ExtractValueExpr{Fragment: yyDollar[3].exprUnion(), XPathExpr: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1246: + case 1278: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6316 +//line sql.y:6444 { yyLOCAL = &UpdateXMLExpr{Target: yyDollar[3].exprUnion(), XPathExpr: yyDollar[5].exprUnion(), NewXML: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1247: + case 1279: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6322 +//line sql.y:6450 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: FormatBytesType, Argument: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1248: + case 1280: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6326 +//line sql.y:6454 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: FormatPicoTimeType, Argument: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1249: + case 1281: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6330 +//line sql.y:6458 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: PsCurrentThreadIDType} } yyVAL.union = yyLOCAL - case 1250: + case 1282: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6334 +//line sql.y:6462 { yyLOCAL = &PerformanceSchemaFuncExpr{Type: PsThreadIDType, Argument: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1251: + case 1283: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6340 +//line sql.y:6468 { yyLOCAL = >IDFuncExpr{Type: GTIDSubsetType, Set1: yyDollar[3].exprUnion(), Set2: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1252: + case 1284: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6344 +//line sql.y:6472 { yyLOCAL = >IDFuncExpr{Type: GTIDSubtractType, Set1: yyDollar[3].exprUnion(), Set2: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1253: + case 1285: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6348 +//line sql.y:6476 { yyLOCAL = >IDFuncExpr{Type: WaitForExecutedGTIDSetType, Set1: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1254: + case 1286: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6352 +//line sql.y:6480 { yyLOCAL = >IDFuncExpr{Type: WaitForExecutedGTIDSetType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1255: + case 1287: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6356 +//line sql.y:6484 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1256: + case 1288: yyDollar = yyS[yypt-6 : yypt+1] var yyLOCAL Expr -//line sql.y:6360 +//line sql.y:6488 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion()} } yyVAL.union = yyLOCAL - case 1257: + case 1289: yyDollar = yyS[yypt-8 : yypt+1] var yyLOCAL Expr -//line sql.y:6364 +//line sql.y:6492 { yyLOCAL = >IDFuncExpr{Type: WaitUntilSQLThreadAfterGTIDSType, Set1: yyDollar[3].exprUnion(), Timeout: yyDollar[5].exprUnion(), Channel: yyDollar[7].exprUnion()} } yyVAL.union = yyLOCAL - case 1258: + case 1290: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6369 +//line sql.y:6497 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1259: + case 1291: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6373 +//line sql.y:6501 { yyLOCAL = yyDollar[2].convertTypeUnion() } yyVAL.union = yyLOCAL - case 1260: + case 1292: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6379 +//line sql.y:6507 { } - case 1261: + case 1293: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6381 +//line sql.y:6509 { yyLOCAL = IntervalDayHour } yyVAL.union = yyLOCAL - case 1262: + case 1294: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6385 +//line sql.y:6513 { yyLOCAL = IntervalDayMicrosecond } yyVAL.union = yyLOCAL - case 1263: + case 1295: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6389 +//line sql.y:6517 { yyLOCAL = IntervalDayMinute } yyVAL.union = yyLOCAL - case 1264: + case 1296: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6393 +//line sql.y:6521 { yyLOCAL = IntervalDaySecond } yyVAL.union = yyLOCAL - case 1265: + case 1297: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6397 +//line sql.y:6525 { yyLOCAL = IntervalHourMicrosecond } yyVAL.union = yyLOCAL - case 1266: + case 1298: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6401 +//line sql.y:6529 { yyLOCAL = IntervalHourMinute } yyVAL.union = yyLOCAL - case 1267: + case 1299: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6405 +//line sql.y:6533 { yyLOCAL = IntervalHourSecond } yyVAL.union = yyLOCAL - case 1268: + case 1300: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6409 +//line sql.y:6537 { yyLOCAL = IntervalMinuteMicrosecond } yyVAL.union = yyLOCAL - case 1269: + case 1301: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6413 +//line sql.y:6541 { yyLOCAL = IntervalMinuteSecond } yyVAL.union = yyLOCAL - case 1270: + case 1302: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6417 +//line sql.y:6545 { yyLOCAL = IntervalSecondMicrosecond } yyVAL.union = yyLOCAL - case 1271: + case 1303: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6421 +//line sql.y:6549 { yyLOCAL = IntervalYearMonth } yyVAL.union = yyLOCAL - case 1272: + case 1304: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6427 +//line sql.y:6555 { yyLOCAL = IntervalDay } yyVAL.union = yyLOCAL - case 1273: + case 1305: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6431 +//line sql.y:6559 { yyLOCAL = IntervalWeek } yyVAL.union = yyLOCAL - case 1274: + case 1306: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6435 +//line sql.y:6563 { yyLOCAL = IntervalHour } yyVAL.union = yyLOCAL - case 1275: + case 1307: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6439 +//line sql.y:6567 { yyLOCAL = IntervalMinute } yyVAL.union = yyLOCAL - case 1276: + case 1308: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6443 +//line sql.y:6571 { yyLOCAL = IntervalMonth } yyVAL.union = yyLOCAL - case 1277: + case 1309: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6447 +//line sql.y:6575 { yyLOCAL = IntervalQuarter } yyVAL.union = yyLOCAL - case 1278: + case 1310: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6451 +//line sql.y:6579 { yyLOCAL = IntervalSecond } yyVAL.union = yyLOCAL - case 1279: + case 1311: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6455 +//line sql.y:6583 { yyLOCAL = IntervalMicrosecond } yyVAL.union = yyLOCAL - case 1280: + case 1312: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL IntervalTypes -//line sql.y:6459 +//line sql.y:6587 { yyLOCAL = IntervalYear } yyVAL.union = yyLOCAL - case 1283: + case 1315: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6469 +//line sql.y:6597 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1284: + case 1316: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6473 +//line sql.y:6601 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1285: + case 1317: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6477 +//line sql.y:6605 { yyLOCAL = NewIntLiteral(yyDollar[2].str) } yyVAL.union = yyLOCAL - case 1286: + case 1318: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Expr -//line sql.y:6481 +//line sql.y:6609 { - yyLOCAL = NewArgument(yyDollar[2].str[1:]) - bindVariable(yylex, yyDollar[2].str[1:]) + yyLOCAL = parseBindVariable(yylex, yyDollar[2].str[1:]) } yyVAL.union = yyLOCAL - case 1287: + case 1319: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6492 +//line sql.y:6619 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("if"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1288: + case 1320: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6496 +//line sql.y:6623 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("database"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1289: + case 1321: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6500 +//line sql.y:6627 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("schema"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1290: + case 1322: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6504 +//line sql.y:6631 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("mod"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1291: + case 1323: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Expr -//line sql.y:6508 +//line sql.y:6635 { yyLOCAL = &FuncExpr{Name: NewIdentifierCI("replace"), Exprs: yyDollar[3].selectExprsUnion()} } yyVAL.union = yyLOCAL - case 1292: + case 1324: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:6514 +//line sql.y:6641 { yyLOCAL = NoOption } yyVAL.union = yyLOCAL - case 1293: + case 1325: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:6518 +//line sql.y:6645 { yyLOCAL = BooleanModeOpt } yyVAL.union = yyLOCAL - case 1294: + case 1326: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:6522 +//line sql.y:6649 { yyLOCAL = NaturalLanguageModeOpt } yyVAL.union = yyLOCAL - case 1295: + case 1327: yyDollar = yyS[yypt-7 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:6526 +//line sql.y:6653 { yyLOCAL = NaturalLanguageModeWithQueryExpansionOpt } yyVAL.union = yyLOCAL - case 1296: + case 1328: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL MatchExprOption -//line sql.y:6530 +//line sql.y:6657 { yyLOCAL = QueryExpansionOpt } yyVAL.union = yyLOCAL - case 1297: + case 1329: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6536 +//line sql.y:6663 { yyVAL.str = string(yyDollar[1].identifierCI.String()) } - case 1298: + case 1330: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6540 +//line sql.y:6667 { yyVAL.str = string(yyDollar[1].str) } - case 1299: + case 1331: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6544 +//line sql.y:6671 { yyVAL.str = string(yyDollar[1].str) } - case 1300: + case 1332: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6550 +//line sql.y:6677 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1301: + case 1333: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6554 +//line sql.y:6681 { yyLOCAL = &ConvertType{Type: string(yyDollar[2].str), Length: NewIntLiteral(yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 1302: + case 1334: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6558 +//line sql.y:6685 { yyLOCAL = &ConvertType{Type: string(yyDollar[2].str), Length: NewIntLiteral(yyDollar[4].str)} } yyVAL.union = yyLOCAL - case 1303: + case 1335: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6564 +//line sql.y:6691 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } yyVAL.union = yyLOCAL - case 1304: + case 1336: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6568 +//line sql.y:6695 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion(), Charset: yyDollar[3].columnCharset} } yyVAL.union = yyLOCAL - case 1305: + case 1337: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6572 +//line sql.y:6699 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1306: + case 1338: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6576 +//line sql.y:6703 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } yyVAL.union = yyLOCAL - case 1307: + case 1339: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6580 +//line sql.y:6707 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} yyLOCAL.Length = yyDollar[2].LengthScaleOption.Length yyLOCAL.Scale = yyDollar[2].LengthScaleOption.Scale } yyVAL.union = yyLOCAL - case 1308: + case 1340: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6586 +//line sql.y:6713 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1309: + case 1341: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6590 +//line sql.y:6717 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } yyVAL.union = yyLOCAL - case 1310: + case 1342: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6594 +//line sql.y:6721 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1311: + case 1343: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6598 +//line sql.y:6725 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1312: + case 1344: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6602 +//line sql.y:6729 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } yyVAL.union = yyLOCAL - case 1313: + case 1345: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6606 +//line sql.y:6733 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1314: + case 1346: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6610 +//line sql.y:6737 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1315: + case 1347: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6614 +//line sql.y:6741 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str), Length: yyDollar[2].literalUnion()} } yyVAL.union = yyLOCAL - case 1316: + case 1348: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6618 +//line sql.y:6745 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1317: + case 1349: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ConvertType -//line sql.y:6622 +//line sql.y:6749 { yyLOCAL = &ConvertType{Type: string(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1318: + case 1350: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:6628 +//line sql.y:6755 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 1319: + case 1351: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:6632 +//line sql.y:6759 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 1320: + case 1352: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6637 +//line sql.y:6764 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1321: + case 1353: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6641 +//line sql.y:6768 { yyLOCAL = yyDollar[1].exprUnion() } yyVAL.union = yyLOCAL - case 1322: + case 1354: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6646 +//line sql.y:6773 { yyVAL.str = string("") } - case 1323: + case 1355: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:6650 +//line sql.y:6777 { yyVAL.str = encodeSQLString(yyDollar[2].str) } - case 1324: + case 1356: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*When -//line sql.y:6656 +//line sql.y:6783 { yyLOCAL = []*When{yyDollar[1].whenUnion()} } yyVAL.union = yyLOCAL - case 1325: + case 1357: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:6660 +//line sql.y:6787 { yySLICE := (*[]*When)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[2].whenUnion()) } - case 1326: + case 1358: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *When -//line sql.y:6666 +//line sql.y:6793 { yyLOCAL = &When{Cond: yyDollar[2].exprUnion(), Val: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1327: + case 1359: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6671 +//line sql.y:6798 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1328: + case 1360: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6675 +//line sql.y:6802 { yyLOCAL = yyDollar[2].exprUnion() } yyVAL.union = yyLOCAL - case 1329: + case 1361: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ColName -//line sql.y:6681 +//line sql.y:6808 { yyLOCAL = &ColName{Name: yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL - case 1330: + case 1362: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *ColName -//line sql.y:6685 +//line sql.y:6812 { yyLOCAL = &ColName{Name: NewIdentifierCI(string(yyDollar[1].str))} } yyVAL.union = yyLOCAL - case 1331: + case 1363: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *ColName -//line sql.y:6689 +//line sql.y:6816 { yyLOCAL = &ColName{Qualifier: TableName{Name: yyDollar[1].identifierCS}, Name: yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 1332: + case 1364: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *ColName -//line sql.y:6693 +//line sql.y:6820 { yyLOCAL = &ColName{Qualifier: TableName{Qualifier: yyDollar[1].identifierCS, Name: yyDollar[3].identifierCS}, Name: yyDollar[5].identifierCI} } yyVAL.union = yyLOCAL - case 1333: + case 1365: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6699 +//line sql.y:6826 { yyLOCAL = yyDollar[1].colNameUnion() } yyVAL.union = yyLOCAL - case 1334: + case 1366: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6703 +//line sql.y:6830 { yyLOCAL = &Offset{V: convertStringToInt(yyDollar[1].str)} } yyVAL.union = yyLOCAL - case 1335: + case 1367: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:6709 +//line sql.y:6836 { // TODO(sougou): Deprecate this construct. if yyDollar[1].identifierCI.Lowered() != "value" { @@ -18794,427 +19383,426 @@ yydefault: yyLOCAL = NewIntLiteral("1") } yyVAL.union = yyLOCAL - case 1336: + case 1368: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6718 +//line sql.y:6845 { yyLOCAL = NewIntLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL - case 1337: + case 1369: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6722 +//line sql.y:6849 { - yyLOCAL = NewArgument(yyDollar[1].str[1:]) - bindVariable(yylex, yyDollar[1].str[1:]) + yyLOCAL = parseBindVariable(yylex, yyDollar[1].str[1:]) } yyVAL.union = yyLOCAL - case 1338: + case 1370: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Exprs -//line sql.y:6728 +//line sql.y:6854 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1339: + case 1371: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Exprs -//line sql.y:6732 +//line sql.y:6858 { yyLOCAL = yyDollar[3].exprsUnion() } yyVAL.union = yyLOCAL - case 1340: + case 1372: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Expr -//line sql.y:6737 +//line sql.y:6863 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1341: + case 1373: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Expr -//line sql.y:6741 +//line sql.y:6867 { yyLOCAL = yyDollar[2].exprUnion() } yyVAL.union = yyLOCAL - case 1342: + case 1374: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *NamedWindow -//line sql.y:6747 +//line sql.y:6873 { yyLOCAL = &NamedWindow{yyDollar[2].windowDefinitionsUnion()} } yyVAL.union = yyLOCAL - case 1343: + case 1375: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:6753 +//line sql.y:6879 { yyLOCAL = NamedWindows{yyDollar[1].namedWindowUnion()} } yyVAL.union = yyLOCAL - case 1344: + case 1376: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6757 +//line sql.y:6883 { yySLICE := (*NamedWindows)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].namedWindowUnion()) } - case 1345: + case 1377: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:6762 +//line sql.y:6888 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1346: + case 1378: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL NamedWindows -//line sql.y:6766 +//line sql.y:6892 { yyLOCAL = yyDollar[1].namedWindowsUnion() } yyVAL.union = yyLOCAL - case 1347: + case 1379: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL OrderBy -//line sql.y:6771 +//line sql.y:6897 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1348: + case 1380: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderBy -//line sql.y:6775 +//line sql.y:6901 { yyLOCAL = yyDollar[1].orderByUnion() } yyVAL.union = yyLOCAL - case 1349: + case 1381: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL OrderBy -//line sql.y:6781 +//line sql.y:6907 { yyLOCAL = yyDollar[3].orderByUnion() } yyVAL.union = yyLOCAL - case 1350: + case 1382: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderBy -//line sql.y:6787 +//line sql.y:6913 { yyLOCAL = OrderBy{yyDollar[1].orderUnion()} } yyVAL.union = yyLOCAL - case 1351: + case 1383: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6791 +//line sql.y:6917 { yySLICE := (*OrderBy)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].orderUnion()) } - case 1352: + case 1384: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Order -//line sql.y:6797 +//line sql.y:6923 { yyLOCAL = &Order{Expr: yyDollar[1].exprUnion(), Direction: yyDollar[2].orderDirectionUnion()} } yyVAL.union = yyLOCAL - case 1353: + case 1385: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:6802 +//line sql.y:6928 { yyLOCAL = AscOrder } yyVAL.union = yyLOCAL - case 1354: + case 1386: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:6806 +//line sql.y:6932 { yyLOCAL = AscOrder } yyVAL.union = yyLOCAL - case 1355: + case 1387: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL OrderDirection -//line sql.y:6810 +//line sql.y:6936 { yyLOCAL = DescOrder } yyVAL.union = yyLOCAL - case 1356: + case 1388: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Limit -//line sql.y:6815 +//line sql.y:6941 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1357: + case 1389: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Limit -//line sql.y:6819 +//line sql.y:6945 { yyLOCAL = yyDollar[1].limitUnion() } yyVAL.union = yyLOCAL - case 1358: + case 1390: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Limit -//line sql.y:6825 +//line sql.y:6951 { yyLOCAL = &Limit{Rowcount: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1359: + case 1391: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Limit -//line sql.y:6829 +//line sql.y:6955 { yyLOCAL = &Limit{Offset: yyDollar[2].exprUnion(), Rowcount: yyDollar[4].exprUnion()} } yyVAL.union = yyLOCAL - case 1360: + case 1392: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Limit -//line sql.y:6833 +//line sql.y:6959 { yyLOCAL = &Limit{Offset: yyDollar[4].exprUnion(), Rowcount: yyDollar[2].exprUnion()} } yyVAL.union = yyLOCAL - case 1361: + case 1393: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:6838 +//line sql.y:6964 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1362: + case 1394: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:6842 +//line sql.y:6968 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion(), yyDollar[2].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 1363: + case 1395: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:6846 +//line sql.y:6972 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion(), yyDollar[2].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 1364: + case 1396: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:6850 +//line sql.y:6976 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 1365: + case 1397: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []AlterOption -//line sql.y:6854 +//line sql.y:6980 { yyLOCAL = []AlterOption{yyDollar[1].alterOptionUnion()} } yyVAL.union = yyLOCAL - case 1366: + case 1398: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6861 +//line sql.y:6987 { yyLOCAL = &LockOption{Type: DefaultType} } yyVAL.union = yyLOCAL - case 1367: + case 1399: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6865 +//line sql.y:6991 { yyLOCAL = &LockOption{Type: NoneType} } yyVAL.union = yyLOCAL - case 1368: + case 1400: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6869 +//line sql.y:6995 { yyLOCAL = &LockOption{Type: SharedType} } yyVAL.union = yyLOCAL - case 1369: + case 1401: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6873 +//line sql.y:6999 { yyLOCAL = &LockOption{Type: ExclusiveType} } yyVAL.union = yyLOCAL - case 1370: + case 1402: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6879 +//line sql.y:7005 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 1371: + case 1403: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6883 +//line sql.y:7009 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 1372: + case 1404: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6887 +//line sql.y:7013 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 1373: + case 1405: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL AlterOption -//line sql.y:6891 +//line sql.y:7017 { yyLOCAL = AlgorithmValue(yyDollar[3].str) } yyVAL.union = yyLOCAL - case 1374: + case 1406: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6896 +//line sql.y:7022 { yyVAL.str = "" } - case 1375: + case 1407: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6900 +//line sql.y:7026 { yyVAL.str = string(yyDollar[3].str) } - case 1376: + case 1408: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6904 +//line sql.y:7030 { yyVAL.str = string(yyDollar[3].str) } - case 1377: + case 1409: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6908 +//line sql.y:7034 { yyVAL.str = string(yyDollar[3].str) } - case 1378: + case 1410: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6913 +//line sql.y:7039 { yyVAL.str = "" } - case 1379: + case 1411: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:6917 +//line sql.y:7043 { yyVAL.str = yyDollar[3].str } - case 1380: + case 1412: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6923 +//line sql.y:7049 { yyVAL.str = string(yyDollar[1].str) } - case 1381: + case 1413: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6927 +//line sql.y:7053 { yyVAL.str = string(yyDollar[1].str) } - case 1382: + case 1414: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6932 +//line sql.y:7058 { yyVAL.str = "" } - case 1383: + case 1415: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:6936 +//line sql.y:7062 { yyVAL.str = yyDollar[2].str } - case 1384: + case 1416: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6941 +//line sql.y:7067 { yyVAL.str = "cascaded" } - case 1385: + case 1417: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6945 +//line sql.y:7071 { yyVAL.str = string(yyDollar[1].str) } - case 1386: + case 1418: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6949 +//line sql.y:7075 { yyVAL.str = string(yyDollar[1].str) } - case 1387: + case 1419: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL *Definer -//line sql.y:6954 +//line sql.y:7080 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1388: + case 1420: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Definer -//line sql.y:6958 +//line sql.y:7084 { yyLOCAL = yyDollar[3].definerUnion() } yyVAL.union = yyLOCAL - case 1389: + case 1421: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Definer -//line sql.y:6964 +//line sql.y:7090 { yyLOCAL = &Definer{ Name: string(yyDollar[1].str), } } yyVAL.union = yyLOCAL - case 1390: + case 1422: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *Definer -//line sql.y:6970 +//line sql.y:7096 { yyLOCAL = &Definer{ Name: string(yyDollar[1].str), } } yyVAL.union = yyLOCAL - case 1391: + case 1423: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Definer -//line sql.y:6976 +//line sql.y:7102 { yyLOCAL = &Definer{ Name: yyDollar[1].str, @@ -19222,369 +19810,369 @@ yydefault: } } yyVAL.union = yyLOCAL - case 1392: + case 1424: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6985 +//line sql.y:7111 { yyVAL.str = encodeSQLString(yyDollar[1].str) } - case 1393: + case 1425: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6989 +//line sql.y:7115 { yyVAL.str = formatIdentifier(yyDollar[1].str) } - case 1394: + case 1426: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:6994 +//line sql.y:7120 { yyVAL.str = "" } - case 1395: + case 1427: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:6998 +//line sql.y:7124 { yyVAL.str = formatAddress(yyDollar[1].str) } - case 1396: + case 1428: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL Lock -//line sql.y:7004 +//line sql.y:7130 { yyLOCAL = ForUpdateLock } yyVAL.union = yyLOCAL - case 1397: + case 1429: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL Lock -//line sql.y:7008 +//line sql.y:7134 { yyLOCAL = ShareModeLock } yyVAL.union = yyLOCAL - case 1398: + case 1430: yyDollar = yyS[yypt-9 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7014 +//line sql.y:7140 { yyLOCAL = &SelectInto{Type: IntoOutfileS3, FileName: encodeSQLString(yyDollar[4].str), Charset: yyDollar[5].columnCharset, FormatOption: yyDollar[6].str, ExportOption: yyDollar[7].str, Manifest: yyDollar[8].str, Overwrite: yyDollar[9].str} } yyVAL.union = yyLOCAL - case 1399: + case 1431: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7018 +//line sql.y:7144 { yyLOCAL = &SelectInto{Type: IntoDumpfile, FileName: encodeSQLString(yyDollar[3].str), Charset: ColumnCharset{}, FormatOption: "", ExportOption: "", Manifest: "", Overwrite: ""} } yyVAL.union = yyLOCAL - case 1400: + case 1432: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *SelectInto -//line sql.y:7022 +//line sql.y:7148 { yyLOCAL = &SelectInto{Type: IntoOutfile, FileName: encodeSQLString(yyDollar[3].str), Charset: yyDollar[4].columnCharset, FormatOption: "", ExportOption: yyDollar[5].str, Manifest: "", Overwrite: ""} } yyVAL.union = yyLOCAL - case 1401: + case 1433: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7027 +//line sql.y:7153 { yyVAL.str = "" } - case 1402: + case 1434: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7031 +//line sql.y:7157 { yyVAL.str = " format csv" + yyDollar[3].str } - case 1403: + case 1435: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7035 +//line sql.y:7161 { yyVAL.str = " format text" + yyDollar[3].str } - case 1404: + case 1436: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7040 +//line sql.y:7166 { yyVAL.str = "" } - case 1405: + case 1437: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7044 +//line sql.y:7170 { yyVAL.str = " header" } - case 1406: + case 1438: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7049 +//line sql.y:7175 { yyVAL.str = "" } - case 1407: + case 1439: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7053 +//line sql.y:7179 { yyVAL.str = " manifest on" } - case 1408: + case 1440: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7057 +//line sql.y:7183 { yyVAL.str = " manifest off" } - case 1409: + case 1441: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7062 +//line sql.y:7188 { yyVAL.str = "" } - case 1410: + case 1442: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7066 +//line sql.y:7192 { yyVAL.str = " overwrite on" } - case 1411: + case 1443: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7070 +//line sql.y:7196 { yyVAL.str = " overwrite off" } - case 1412: + case 1444: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7076 +//line sql.y:7202 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } - case 1413: + case 1445: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7081 +//line sql.y:7207 { yyVAL.str = "" } - case 1414: + case 1446: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7085 +//line sql.y:7211 { yyVAL.str = " lines" + yyDollar[2].str } - case 1415: + case 1447: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7091 +//line sql.y:7217 { yyVAL.str = yyDollar[1].str } - case 1416: + case 1448: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7095 +//line sql.y:7221 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } - case 1417: + case 1449: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7101 +//line sql.y:7227 { yyVAL.str = " starting by " + encodeSQLString(yyDollar[3].str) } - case 1418: + case 1450: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7105 +//line sql.y:7231 { yyVAL.str = " terminated by " + encodeSQLString(yyDollar[3].str) } - case 1419: + case 1451: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7110 +//line sql.y:7236 { yyVAL.str = "" } - case 1420: + case 1452: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7114 +//line sql.y:7240 { yyVAL.str = " " + yyDollar[1].str + yyDollar[2].str } - case 1421: + case 1453: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7120 +//line sql.y:7246 { yyVAL.str = yyDollar[1].str } - case 1422: + case 1454: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7124 +//line sql.y:7250 { yyVAL.str = yyDollar[1].str + yyDollar[2].str } - case 1423: + case 1455: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7130 +//line sql.y:7256 { yyVAL.str = " terminated by " + encodeSQLString(yyDollar[3].str) } - case 1424: + case 1456: yyDollar = yyS[yypt-4 : yypt+1] -//line sql.y:7134 +//line sql.y:7260 { yyVAL.str = yyDollar[1].str + " enclosed by " + encodeSQLString(yyDollar[4].str) } - case 1425: + case 1457: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7138 +//line sql.y:7264 { yyVAL.str = " escaped by " + encodeSQLString(yyDollar[3].str) } - case 1426: + case 1458: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7143 +//line sql.y:7269 { yyVAL.str = "" } - case 1427: + case 1459: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7147 +//line sql.y:7273 { yyVAL.str = " optionally" } - case 1428: + case 1460: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *Insert -//line sql.y:7160 +//line sql.y:7286 { yyLOCAL = &Insert{Rows: yyDollar[2].valuesUnion()} } yyVAL.union = yyLOCAL - case 1429: + case 1461: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL *Insert -//line sql.y:7164 +//line sql.y:7290 { yyLOCAL = &Insert{Rows: yyDollar[1].selStmtUnion()} } yyVAL.union = yyLOCAL - case 1430: + case 1462: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL *Insert -//line sql.y:7168 +//line sql.y:7294 { yyLOCAL = &Insert{Columns: yyDollar[2].columnsUnion(), Rows: yyDollar[5].valuesUnion()} } yyVAL.union = yyLOCAL - case 1431: + case 1463: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Insert -//line sql.y:7172 +//line sql.y:7298 { yyLOCAL = &Insert{Columns: []IdentifierCI{}, Rows: yyDollar[4].valuesUnion()} } yyVAL.union = yyLOCAL - case 1432: + case 1464: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL *Insert -//line sql.y:7176 +//line sql.y:7302 { yyLOCAL = &Insert{Columns: yyDollar[2].columnsUnion(), Rows: yyDollar[4].selStmtUnion()} } yyVAL.union = yyLOCAL - case 1433: + case 1465: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Columns -//line sql.y:7182 +//line sql.y:7308 { yyLOCAL = Columns{yyDollar[1].identifierCI} } yyVAL.union = yyLOCAL - case 1434: + case 1466: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL Columns -//line sql.y:7186 +//line sql.y:7312 { yyLOCAL = Columns{yyDollar[3].identifierCI} } yyVAL.union = yyLOCAL - case 1435: + case 1467: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7190 +//line sql.y:7316 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].identifierCI) } - case 1436: + case 1468: yyDollar = yyS[yypt-5 : yypt+1] -//line sql.y:7194 +//line sql.y:7320 { yySLICE := (*Columns)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[5].identifierCI) } - case 1437: + case 1469: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7199 +//line sql.y:7325 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1438: + case 1470: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7203 +//line sql.y:7329 { yyLOCAL = yyDollar[5].updateExprsUnion() } yyVAL.union = yyLOCAL - case 1439: + case 1471: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Values -//line sql.y:7209 +//line sql.y:7335 { yyLOCAL = Values{yyDollar[1].valTupleUnion()} } yyVAL.union = yyLOCAL - case 1440: + case 1472: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7213 +//line sql.y:7339 { yySLICE := (*Values)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].valTupleUnion()) } - case 1441: + case 1473: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7219 +//line sql.y:7345 { yyLOCAL = yyDollar[1].valTupleUnion() } yyVAL.union = yyLOCAL - case 1442: + case 1474: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7223 +//line sql.y:7349 { yyLOCAL = ValTuple{} } yyVAL.union = yyLOCAL - case 1443: + case 1475: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7229 +//line sql.y:7355 { yyLOCAL = ValTuple(yyDollar[2].exprsUnion()) } yyVAL.union = yyLOCAL - case 1444: + case 1476: yyDollar = yyS[yypt-4 : yypt+1] var yyLOCAL ValTuple -//line sql.y:7233 +//line sql.y:7359 { yyLOCAL = ValTuple(yyDollar[3].exprsUnion()) } yyVAL.union = yyLOCAL - case 1445: + case 1477: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7238 +//line sql.y:7364 { if len(yyDollar[1].valTupleUnion()) == 1 { yyLOCAL = yyDollar[1].valTupleUnion()[0] @@ -19593,273 +20181,273 @@ yydefault: } } yyVAL.union = yyLOCAL - case 1446: + case 1478: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL UpdateExprs -//line sql.y:7248 +//line sql.y:7374 { yyLOCAL = UpdateExprs{yyDollar[1].updateExprUnion()} } yyVAL.union = yyLOCAL - case 1447: + case 1479: yyDollar = yyS[yypt-3 : yypt+1] -//line sql.y:7252 +//line sql.y:7378 { yySLICE := (*UpdateExprs)(yyIaddr(yyVAL.union)) *yySLICE = append(*yySLICE, yyDollar[3].updateExprUnion()) } - case 1448: + case 1480: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL *UpdateExpr -//line sql.y:7258 +//line sql.y:7384 { yyLOCAL = &UpdateExpr{Name: yyDollar[1].colNameUnion(), Expr: yyDollar[3].exprUnion()} } yyVAL.union = yyLOCAL - case 1450: + case 1482: yyDollar = yyS[yypt-2 : yypt+1] -//line sql.y:7265 +//line sql.y:7391 { yyVAL.str = "charset" } - case 1453: + case 1485: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7275 +//line sql.y:7401 { yyLOCAL = NewStrLiteral(yyDollar[1].identifierCI.String()) } yyVAL.union = yyLOCAL - case 1454: + case 1486: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7279 +//line sql.y:7405 { yyLOCAL = NewStrLiteral(yyDollar[1].str) } yyVAL.union = yyLOCAL - case 1455: + case 1487: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Expr -//line sql.y:7283 +//line sql.y:7409 { yyLOCAL = &Default{} } yyVAL.union = yyLOCAL - case 1458: + case 1490: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:7292 +//line sql.y:7418 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 1459: + case 1491: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL bool -//line sql.y:7294 +//line sql.y:7420 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 1460: + case 1492: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:7297 +//line sql.y:7423 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 1461: + case 1493: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL bool -//line sql.y:7299 +//line sql.y:7425 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 1462: + case 1494: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL bool -//line sql.y:7302 +//line sql.y:7428 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 1463: + case 1495: yyDollar = yyS[yypt-3 : yypt+1] var yyLOCAL bool -//line sql.y:7304 +//line sql.y:7430 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 1464: + case 1496: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Ignore -//line sql.y:7307 +//line sql.y:7433 { yyLOCAL = false } yyVAL.union = yyLOCAL - case 1465: + case 1497: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Ignore -//line sql.y:7309 +//line sql.y:7435 { yyLOCAL = true } yyVAL.union = yyLOCAL - case 1466: + case 1498: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7312 +//line sql.y:7438 { yyVAL.empty = struct{}{} } - case 1467: + case 1499: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7314 +//line sql.y:7440 { yyVAL.empty = struct{}{} } - case 1468: + case 1500: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7316 +//line sql.y:7442 { yyVAL.empty = struct{}{} } - case 1469: + case 1501: yyDollar = yyS[yypt-5 : yypt+1] var yyLOCAL Statement -//line sql.y:7320 +//line sql.y:7446 { yyLOCAL = &CallProc{Name: yyDollar[2].tableName, Params: yyDollar[4].exprsUnion()} } yyVAL.union = yyLOCAL - case 1470: + case 1502: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL Exprs -//line sql.y:7325 +//line sql.y:7451 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1471: + case 1503: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL Exprs -//line sql.y:7329 +//line sql.y:7455 { yyLOCAL = yyDollar[1].exprsUnion() } yyVAL.union = yyLOCAL - case 1472: + case 1504: yyDollar = yyS[yypt-0 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:7334 +//line sql.y:7460 { yyLOCAL = nil } yyVAL.union = yyLOCAL - case 1473: + case 1505: yyDollar = yyS[yypt-1 : yypt+1] var yyLOCAL []*IndexOption -//line sql.y:7336 +//line sql.y:7462 { yyLOCAL = []*IndexOption{yyDollar[1].indexOptionUnion()} } yyVAL.union = yyLOCAL - case 1474: + case 1506: yyDollar = yyS[yypt-2 : yypt+1] var yyLOCAL *IndexOption -//line sql.y:7340 +//line sql.y:7466 { yyLOCAL = &IndexOption{Name: string(yyDollar[1].str), String: string(yyDollar[2].identifierCI.String())} } yyVAL.union = yyLOCAL - case 1475: + case 1507: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7346 +//line sql.y:7472 { yyVAL.identifierCI = yyDollar[1].identifierCI } - case 1476: + case 1508: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7350 +//line sql.y:7476 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } - case 1478: + case 1510: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7357 +//line sql.y:7483 { yyVAL.identifierCI = NewIdentifierCI(string(yyDollar[1].str)) } - case 1479: + case 1511: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7363 +//line sql.y:7489 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 1480: + case 1512: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7367 +//line sql.y:7493 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 1481: + case 1513: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7373 +//line sql.y:7499 { yyVAL.identifierCS = NewIdentifierCS("") } - case 1482: + case 1514: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7377 +//line sql.y:7503 { yyVAL.identifierCS = yyDollar[1].identifierCS } - case 1484: + case 1516: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7384 +//line sql.y:7510 { yyVAL.identifierCS = NewIdentifierCS(string(yyDollar[1].str)) } - case 2034: + case 2076: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7960 +//line sql.y:8096 { if incNesting(yylex) { yylex.Error("max nesting level reached") return 1 } } - case 2035: + case 2077: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7969 +//line sql.y:8105 { decNesting(yylex) } - case 2036: + case 2078: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7974 +//line sql.y:8110 { skipToEnd(yylex) } - case 2037: + case 2079: yyDollar = yyS[yypt-0 : yypt+1] -//line sql.y:7979 +//line sql.y:8115 { skipToEnd(yylex) } - case 2038: + case 2080: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7983 +//line sql.y:8119 { skipToEnd(yylex) } - case 2039: + case 2081: yyDollar = yyS[yypt-1 : yypt+1] -//line sql.y:7987 +//line sql.y:8123 { skipToEnd(yylex) } diff --git a/go/vt/sqlparser/sql.y b/go/vt/sqlparser/sql.y index 57b0aebf856..3eda7126892 100644 --- a/go/vt/sqlparser/sql.y +++ b/go/vt/sqlparser/sql.y @@ -47,7 +47,7 @@ func skipToEnd(yylex yyLexer) { yylex.(*Tokenizer).SkipToEnd = true } -func bindVariable(yylex yyLexer, bvar string) { +func markBindVariable(yylex yyLexer, bvar string) { yylex.(*Tokenizer).BindVars[bvar] = struct{}{} } @@ -334,6 +334,9 @@ func bindVariable(yylex yyLexer, bvar string) { // Type Modifiers %token NULLX AUTO_INCREMENT APPROXNUM SIGNED UNSIGNED ZEROFILL +// PURGE tokens +%token PURGE BEFORE + // SHOW tokens %token CODE COLLATION COLUMNS DATABASES ENGINES EVENT EXTENDED FIELDS FULL FUNCTION GTID_EXECUTED %token KEYSPACES OPEN PLUGINS PRIVILEGES PROCESSLIST SCHEMAS TABLES TRIGGERS USER @@ -362,6 +365,7 @@ func bindVariable(yylex yyLexer, bvar string) { %token ExtractValue UpdateXML %token GET_LOCK RELEASE_LOCK RELEASE_ALL_LOCKS IS_FREE_LOCK IS_USED_LOCK %token LOCATE POSITION +%token ST_GeometryCollectionFromText ST_GeometryFromText ST_LineStringFromText ST_MultiLineStringFromText ST_MultiPointFromText ST_MultiPolygonFromText ST_PointFromText ST_PolygonFromText // Match %token MATCH AGAINST BOOLEAN LANGUAGE WITH QUERY EXPANSION WITHOUT VALIDATION @@ -424,7 +428,7 @@ func bindVariable(yylex yyLexer, bvar string) { %type collate character_set encryption %type create_options create_options_opt %type default_optional first_opt linear_opt jt_exists_opt jt_path_opt partition_storage_opt -%type analyze_statement show_statement use_statement other_statement +%type analyze_statement show_statement use_statement purge_statement other_statement %type begin_statement commit_statement rollback_statement savepoint_statement release_statement load_statement %type lock_statement unlock_statement call_statement %type revert_statement @@ -633,6 +637,7 @@ command: | drop_statement | truncate_statement | analyze_statement +| purge_statement | show_statement | use_statement | begin_statement @@ -1693,8 +1698,7 @@ text_literal } | VALUE_ARG { - $$ = NewArgument($1[1:]) - bindVariable(yylex, $1[1:]) + $$ = parseBindVariable(yylex, $1[1:]) } | underscore_charsets BIT_LITERAL %prec UNARY { @@ -1718,8 +1722,8 @@ text_literal } | underscore_charsets VALUE_ARG %prec UNARY { - bindVariable(yylex, $2[1:]) - $$ = &IntroducerExpr{CharacterSet: $1, Expr: NewArgument($2[1:])} + arg := parseBindVariable(yylex, $2[1:]) + $$ = &IntroducerExpr{CharacterSet: $1, Expr: arg} } | DATE STRING { @@ -1943,8 +1947,7 @@ text_literal_or_arg: } | VALUE_ARG { - $$ = NewArgument($1[1:]) - bindVariable(yylex, $1[1:]) + $$ = parseBindVariable(yylex, $1[1:]) } keys: @@ -2859,7 +2862,11 @@ insert_method_options: | LAST table_opt_value: - reserved_sql_id + table_id '.' reserved_table_id + { + $$ = String(TableName{Qualifier: $1, Name: $3}) + } +| reserved_sql_id { $$ = $1.String() } @@ -3952,6 +3959,16 @@ analyze_statement: $$ = &OtherRead{} } +purge_statement: + PURGE BINARY LOGS TO STRING + { + $$ = &PurgeBinaryLogs{To: string($5)} + } +| PURGE BINARY LOGS BEFORE STRING + { + $$ = &PurgeBinaryLogs{Before: string($5)} + } + show_statement: SHOW charset_or_character_set like_or_where_opt { @@ -5785,7 +5802,7 @@ col_tuple: | LIST_ARG { $$ = ListArg($1[2:]) - bindVariable(yylex, $1[2:]) + markBindVariable(yylex, $1[2:]) } subquery: @@ -6061,6 +6078,102 @@ UTC_DATE func_paren_opt { $$ = &JSONArrayExpr{ Params:$3 } } +| ST_GeometryFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryFromText, WktText: $3 } + } +| ST_GeometryFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryFromText, WktText: $3, Srid: $5 } + } +| ST_GeometryFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_GeometryCollectionFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryCollectionFromText, WktText: $3 } + } +| ST_GeometryCollectionFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryCollectionFromText, WktText: $3, Srid: $5 } + } +| ST_GeometryCollectionFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: GeometryCollectionFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_LineStringFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: LineStringFromText, WktText: $3 } + } +| ST_LineStringFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: LineStringFromText, WktText: $3, Srid: $5 } + } +| ST_LineStringFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: LineStringFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_MultiLineStringFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiLinestringFromText, WktText: $3 } + } +| ST_MultiLineStringFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiLinestringFromText, WktText: $3, Srid: $5 } + } +| ST_MultiLineStringFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiLinestringFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_MultiPointFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPointFromText, WktText: $3 } + } +| ST_MultiPointFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPointFromText, WktText: $3, Srid: $5 } + } +| ST_MultiPointFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPointFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_MultiPolygonFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPolygonFromText, WktText: $3 } + } +| ST_MultiPolygonFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPolygonFromText, WktText: $3, Srid: $5 } + } +| ST_MultiPolygonFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: MultiPolygonFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_PointFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: PointFromText, WktText: $3 } + } +| ST_PointFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: PointFromText, WktText: $3, Srid: $5 } + } +| ST_PointFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: PointFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } +| ST_PolygonFromText openb expression closeb + { + $$ = &GeomFromTextExpr{ Type: PolygonFromText, WktText: $3 } + } +| ST_PolygonFromText openb expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: PolygonFromText, WktText: $3, Srid: $5 } + } +| ST_PolygonFromText openb expression ',' expression ',' expression closeb + { + $$ = &GeomFromTextExpr{ Type: PolygonFromText, WktText: $3, Srid: $5, AxisOrderOpt: $7 } + } | JSON_OBJECT openb json_object_param_opt closeb { $$ = &JSONObjectExpr{ Params:$3 } @@ -6177,6 +6290,22 @@ UTC_DATE func_paren_opt { $$ = &JSONUnquoteExpr{JSONValue:$3} } +| MULTIPOLYGON openb expression_list closeb + { + $$ = &MultiPolygonExpr{ PolygonParams:$3 } + } +| MULTIPOINT openb expression_list closeb + { + $$ = &MultiPointExpr{ PointParams:$3 } + } +| MULTILINESTRING openb expression_list closeb + { + $$ = &MultiLinestringExpr{ LinestringParams:$3 } + } +| POLYGON openb expression_list closeb + { + $$ = &PolygonExpr{ LinestringParams:$3 } + } | LINESTRING openb expression_list closeb { $$ = &LineStringExpr{ PointParams:$3 } @@ -6229,8 +6358,7 @@ null_int_variable_arg: } | VALUE_ARG { - $$ = NewArgument($1[1:]) - bindVariable(yylex, $1[1:]) + $$ = parseBindVariable(yylex, $1[1:]) } default_with_comma_opt: @@ -6479,8 +6607,7 @@ func_datetime_precision: } | openb VALUE_ARG closeb { - $$ = NewArgument($2[1:]) - bindVariable(yylex, $2[1:]) + $$ = parseBindVariable(yylex, $2[1:]) } /* @@ -6720,8 +6847,7 @@ num_val: } | VALUE_ARG VALUES { - $$ = NewArgument($1[1:]) - bindVariable(yylex, $1[1:]) + $$ = parseBindVariable(yylex, $1[1:]) } group_by_opt: @@ -7565,6 +7691,7 @@ non_reserved_keyword: | AUTOEXTEND_SIZE | AVG %prec FUNCTION_CALL_NON_KEYWORD | AVG_ROW_LENGTH +| BEFORE | BEGIN | BIGINT | BIT @@ -7749,9 +7876,9 @@ non_reserved_keyword: | MIN_ROWS | MODE | MODIFY -| MULTILINESTRING -| MULTIPOINT -| MULTIPOLYGON +| MULTILINESTRING %prec FUNCTION_CALL_NON_KEYWORD +| MULTIPOINT %prec FUNCTION_CALL_NON_KEYWORD +| MULTIPOLYGON %prec FUNCTION_CALL_NON_KEYWORD | NAME | NAMES | NCHAR @@ -7794,10 +7921,11 @@ non_reserved_keyword: | PS_THREAD_ID %prec FUNCTION_CALL_NON_KEYWORD | PLUGINS | POINT %prec FUNCTION_CALL_NON_KEYWORD -| POLYGON +| POLYGON %prec FUNCTION_CALL_NON_KEYWORD | POSITION %prec FUNCTION_CALL_NON_KEYWORD | PROCEDURE | PROCESSLIST +| PURGE | QUERIES | QUERY | RANDOM @@ -7863,6 +7991,14 @@ non_reserved_keyword: | STDDEV_POP %prec FUNCTION_CALL_NON_KEYWORD | STDDEV_SAMP %prec FUNCTION_CALL_NON_KEYWORD | STREAM +| ST_GeometryCollectionFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_GeometryFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_LineStringFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_MultiLineStringFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_MultiPointFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_MultiPolygonFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_PointFromText %prec FUNCTION_CALL_NON_KEYWORD +| ST_PolygonFromText %prec FUNCTION_CALL_NON_KEYWORD | SUBPARTITION | SUBPARTITIONS | SUM %prec FUNCTION_CALL_NON_KEYWORD diff --git a/go/vt/sqlparser/testdata/select_cases.txt b/go/vt/sqlparser/testdata/select_cases.txt index 15f20510512..b776722c563 100644 --- a/go/vt/sqlparser/testdata/select_cases.txt +++ b/go/vt/sqlparser/testdata/select_cases.txt @@ -278,7 +278,7 @@ INPUT select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("point(2 4)")); END OUTPUT -select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('point(2 4)')) from dual +select mbrwithin(st_geometryfromtext('point(2 4)'), st_geometryfromtext('point(2 4)')) from dual END INPUT select concat(@a, table_name), @a, table_name from information_schema.tables where table_schema = 'test' order by table_name; @@ -440,7 +440,7 @@ INPUT select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20),(10 10,20 20,15 0))')) as result; END OUTPUT -select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20),(10 10,20 20,15 0))')) as result from dual +select ST_Crosses(st_geometryfromtext('MULTIPOINT(1 0,15 0,10 10)'), st_geometryfromtext('MULTILINESTRING((15 0,20 0,20 20),(10 10,20 20,15 0))')) as result from dual END INPUT select std(s1/s2) from bug22555 where i=1 group by i; @@ -800,7 +800,7 @@ INPUT select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_contains(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select space(-18446744073709551617); @@ -860,7 +860,7 @@ INPUT select ST_astext(ST_intersection(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))); END OUTPUT -select ST_astext(ST_intersection(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual +select ST_astext(ST_intersection(st_geometryfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), st_geometryfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual END INPUT select * from t1 left join t2 on m_id = id where match(d, e, f) against ('+aword +bword' in boolean mode); @@ -1178,7 +1178,7 @@ INPUT select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_difference(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select a as like_l from t1 where a like 'l%'; @@ -1238,13 +1238,13 @@ INPUT select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_crosses(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_intersection(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select distinct t1.a from t1,t2 order by t2.a; @@ -1448,7 +1448,7 @@ INPUT select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'),Point('-0', '0'), Point('0', '0'))))) as result; END OUTPUT -select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(point('0', '-0'), point('-0', '0'), point('0', '0'))))) as result from dual +select ST_astext(ST_MPointFromWKB(ST_AsWKB(multipoint(point('0', '-0'), point('-0', '0'), point('0', '0'))))) as result from dual END INPUT select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' order by table_name; @@ -1532,7 +1532,7 @@ INPUT select ST_AsText(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1,1), Point(0, 1), Point(0, 0)))); END OUTPUT -select ST_AsText(Polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 1), point(0, 0)))) from dual +select ST_AsText(polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 1), point(0, 0)))) from dual END INPUT select get_lock('ee_16407_5', 60); @@ -1622,7 +1622,7 @@ INPUT select st_touches(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')); END OUTPUT -select st_touches(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual +select st_touches(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual END INPUT select 'c' like '_' as want0; @@ -1778,7 +1778,7 @@ INPUT select mbrcontains(ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))"), ST_GeomFromText("point(2 4)")); END OUTPUT -select mbrcontains(ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), ST_GeomFromText('point(2 4)')) from dual +select mbrcontains(st_geometryfromtext('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), st_geometryfromtext('point(2 4)')) from dual END INPUT select t1.*,t2.* from { oj t2 left outer join t1 on (t1.a=t2.a) }; @@ -2036,7 +2036,7 @@ INPUT select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))")); END OUTPUT -select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual +select mbrwithin(st_geometryfromtext('point(2 4)'), st_geometryfromtext('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual END INPUT select locate('HE','hello' collate utf8_bin); @@ -2060,7 +2060,7 @@ INPUT select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))')); END OUTPUT -select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))')) from dual +select ST_Disjoint(st_geometryfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), st_geometryfromtext('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))')) from dual END INPUT select insert('hello', -4294967295, 1, 'hi'); @@ -2180,7 +2180,7 @@ INPUT select mbrwithin(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("linestring(0 0, 3 0)")); END OUTPUT -select mbrwithin(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('linestring(0 0, 3 0)')) from dual +select mbrwithin(st_geometryfromtext('linestring(1 0, 2 0)'), st_geometryfromtext('linestring(0 0, 3 0)')) from dual END INPUT select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin); @@ -2402,7 +2402,7 @@ INPUT select ST_astext(st_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result; END OUTPUT -select ST_astext(st_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual +select ST_astext(st_symdifference(st_geometryfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), st_geometryfromtext('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual END INPUT select TRIGGER_NAME from information_schema.triggers where trigger_schema='test'; @@ -2570,7 +2570,7 @@ INPUT select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))); END OUTPUT -select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))) from dual +select ST_astext(st_difference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_geometryfromtext('multipoint(0 0, 4 4)'))) from dual END INPUT select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; @@ -2714,7 +2714,7 @@ INPUT select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_touches(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select a, t1.* as 'with_alias' from t1; @@ -2840,7 +2840,7 @@ INPUT select ST_astext(ST_centroid(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); END OUTPUT -select ST_astext(ST_centroid(ST_PolyFromWKB(ST_AsWKB(Polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual +select ST_astext(ST_centroid(ST_PolyFromWKB(ST_AsWKB(polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual END INPUT select null sounds like 'null'; @@ -2852,7 +2852,7 @@ INPUT select ST_Contains(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0))'),ST_GeomFromText('LINESTRING(1 2,5 5)')) as result; END OUTPUT -select ST_Contains(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0))'), ST_GeomFromText('LINESTRING(1 2,5 5)')) as result from dual +select ST_Contains(st_geometryfromtext('POLYGON((0 0,5 0,5 5,0 5,0 0))'), st_geometryfromtext('LINESTRING(1 2,5 5)')) as result from dual END INPUT select * from t1 where a like '%PESA%'; @@ -2882,7 +2882,7 @@ INPUT select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_symdifference(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select @@session.transaction_isolation; @@ -3044,7 +3044,7 @@ INPUT select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_disjoint(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select _latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin; @@ -3608,7 +3608,7 @@ INPUT select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 1)')); END OUTPUT -select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 1)')) from dual +select st_touches(st_geometryfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), st_geometryfromtext('point(1 1)')) from dual END INPUT select date_add("1997-12-31 23:59:59",INTERVAL 1 MINUTE); @@ -3662,7 +3662,7 @@ INPUT select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_intersection(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_difference(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select 'a' union select concat('a', -0.0); @@ -3704,7 +3704,7 @@ INPUT select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('linestring(0 1, 1 0)')); END OUTPUT -select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('linestring(0 1, 1 0)')) from dual +select ST_DISTANCE(st_geometryfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), st_geometryfromtext('linestring(0 1, 1 0)')) from dual END INPUT select mod(12.0, NULL) as 'NULL'; @@ -3746,7 +3746,7 @@ INPUT select ST_area(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')); END OUTPUT -select ST_area(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual +select ST_area(st_polygonfromtext('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual END INPUT select min(a3) from t1 where a2 = 2 and a3 >= 'SEA' and a3 = 'MIN'; @@ -3950,7 +3950,7 @@ INPUT select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_symdifference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select 2; @@ -3986,7 +3986,7 @@ INPUT select ST_astext(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))); END OUTPUT -select ST_astext(Polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0)))) from dual +select ST_astext(polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0)))) from dual END INPUT select host,user from mysql.user where User='myuser'; @@ -4166,7 +4166,7 @@ INPUT select ST_astext(ST_buffer(ST_geometryfromtext('point(1 1)'), 1)); END OUTPUT -select ST_astext(ST_buffer(ST_geometryfromtext('point(1 1)'), 1)) from dual +select ST_astext(ST_buffer(st_geometryfromtext('point(1 1)'), 1)) from dual END INPUT select concat(a,if(b<10,_ucs2 0x00C0,_ucs2 0x0062)) from t1; @@ -4316,7 +4316,7 @@ INPUT select ST_astext(st_intersection(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_intersection(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_intersection(st_geometryfromtext('multipoint(2 2, 3 3)'), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 1 0, 1 1, 0 1, 0 0))'), st_geomfromtext('polygon((2 0, 3 0, 3 1, 2 1, 2 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 2 0, 2 1, 0 1, 0 0))'), st_geomfromtext('polygon((1 0, 3 0, 3 1, 1 1, 1 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 1 0, 1 1, 0 1, 0 0))'), st_geomfromtext('polygon((1 0, 2 0, 2 1, 1 1, 1 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 4 3, 4 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 4 3, 4 0, 6 0, 6 3, 5 3, 5 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 0, 10 0, 10 3, 6 3, 6 5, 0 5))'))) SELECT ST_AsText(ST_GeomFromText("POINT(10 11) POINT(11 12)")) as result; @@ -4550,7 +4550,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200)'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200)'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('LINESTRING(-10 -10, 200 200)'))) from dual END INPUT select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA ='mysqltest_LC2'; @@ -4808,7 +4808,7 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual +select 1, ST_Intersects(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual END INPUT select substring_index('aaaaaaaaa1','aaa',2); @@ -4952,7 +4952,7 @@ INPUT select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'),ST_GeomFromText('point(100 100)')); END OUTPUT -select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), ST_GeomFromText('point(100 100)')) from dual +select st_distance(st_geometryfromtext('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), st_geometryfromtext('point(100 100)')) from dual END INPUT select group_concat(c1 order by c1) from t1 group by c1 collate utf8_polish_ci; @@ -5042,7 +5042,7 @@ INPUT select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_crosses(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select * from v1c; @@ -5498,7 +5498,7 @@ INPUT select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_intersects(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select * from t1 where id=000000000001; @@ -5612,7 +5612,7 @@ INPUT select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_crosses(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); @@ -5726,7 +5726,7 @@ INPUT select 1, ST_Within(ST_GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), ST_GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))')); END OUTPUT -select 1, ST_Within(ST_GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), ST_GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))')) from dual +select 1, ST_Within(st_geometryfromtext('POLYGON((1 1,20 10,10 30, 1 1))'), st_geometryfromtext('POLYGON((0 0,30 5,10 40, 0 0))')) from dual END INPUT select hex(substr(_utf16 0x00e400e50068,-2)); @@ -5738,7 +5738,7 @@ INPUT select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 2)')); END OUTPUT -select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 2)')) from dual +select st_touches(st_geometryfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), st_geometryfromtext('point(1 2)')) from dual END INPUT select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; @@ -5834,7 +5834,7 @@ INPUT select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_union(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select column_type from information_schema.columns where table_schema="information_schema" and table_name="COLUMNS" and (column_name="character_set_name" or column_name="collation_name"); @@ -6104,7 +6104,7 @@ INPUT select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g); END OUTPUT -select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) +select ST_astext(g) from t1 where ST_Contains(st_geometryfromtext('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) END INPUT select timestamp("2001-12-01", "25:01:01"); @@ -6164,7 +6164,7 @@ INPUT select ST_astext(ST_Intersection(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))); END OUTPUT -select ST_astext(ST_Intersection(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual END INPUT select (select d from t2 where d > a) as 'x', t1.* from t1; @@ -6302,13 +6302,13 @@ INPUT select mbrwithin(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); END OUTPUT -select mbrwithin(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual +select mbrwithin(st_geometryfromtext('linestring(1 0, 2 0)'), st_geometryfromtext('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual END INPUT select ST_astext(ST_convexhull(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); END OUTPUT -select ST_astext(ST_convexhull(ST_PolyFromWKB(ST_AsWKB(Polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual +select ST_astext(ST_convexhull(ST_PolyFromWKB(ST_AsWKB(polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual END INPUT select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc'); @@ -6860,7 +6860,7 @@ INPUT select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_contains(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'l' order by table_name; @@ -7412,7 +7412,7 @@ INPUT select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual +select st_astext(st_union(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual END INPUT select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.columns where table_name= 't1'; @@ -7496,7 +7496,7 @@ INPUT select mbrwithin(ST_GeomFromText("linestring(1 1, 2 1)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); END OUTPUT -select mbrwithin(ST_GeomFromText('linestring(1 1, 2 1)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual +select mbrwithin(st_geometryfromtext('linestring(1 1, 2 1)'), st_geometryfromtext('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual END INPUT select ST_GeomFromText('linestring(7 6, 15 4)') into @l; @@ -7520,7 +7520,7 @@ INPUT select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_equals(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select table_schema, table_name, column_name from information_schema.columns where table_schema not in ('performance_schema', 'sys', 'mysql') and data_type = 'longtext' order by table_name, column_name; @@ -7706,7 +7706,7 @@ INPUT select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual +select st_astext(st_symdifference(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual END INPUT select mysqltest1.f1(); @@ -7724,7 +7724,7 @@ INPUT select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_disjoint(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select substring('hello', 1, -18446744073709551617); @@ -7748,7 +7748,7 @@ INPUT select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), ST_GeomFromText('point(3 3)')); END OUTPUT -select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), ST_GeomFromText('point(3 3)')) from dual +select ST_DISTANCE(st_geometryfromtext('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), st_geometryfromtext('point(3 3)')) from dual END INPUT select hex(min(binary a)),count(*) from t1 group by a; @@ -7874,7 +7874,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual END INPUT select cast('18446744073709551616' as signed); @@ -8168,7 +8168,7 @@ INPUT select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'),Point('-0', '0'), Point('0', '-0')))))) as result; END OUTPUT -select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(point('0', '0'), point('-0', '0'), point('0', '-0')))))) as result from dual +select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(multipoint(point('0', '0'), point('-0', '0'), point('0', '-0')))))) as result from dual END INPUT select constraint_name from information_schema.table_constraints where table_schema='test' order by constraint_name; @@ -8360,7 +8360,7 @@ INPUT select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual +select st_astext(st_difference(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual END INPUT select date_add("1997-12-31 23:59:59",INTERVAL "1:1" DAY_HOUR); @@ -8372,7 +8372,7 @@ INPUT select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))); END OUTPUT -select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual +select ST_astext(ST_Union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual END INPUT select hex(convert(_big5 0xC84041 using ucs2)); @@ -8690,7 +8690,7 @@ INPUT select mbrcovers(ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))"), ST_GeomFromText("point(2 4)")); END OUTPUT -select mbrcovers(ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), ST_GeomFromText('point(2 4)')) from dual +select mbrcovers(st_geometryfromtext('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), st_geometryfromtext('point(2 4)')) from dual END INPUT select uncompress(b) from t1; @@ -8720,13 +8720,13 @@ INPUT select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 6)")); END OUTPUT -select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 6)')) from dual +select mbrwithin(st_geometryfromtext('point(2 4)'), st_geometryfromtext('linestring(2 0, 2 6)')) from dual END INPUT select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(-22 -11)'))); END OUTPUT -select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(-22 -11)'))) from dual +select st_astext(st_makeenvelope(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(-22 -11)'))) from dual END INPUT select _latin1'B' collate latin1_general_ci between _latin1'a' collate latin1_bin and _latin1'b'; @@ -8876,7 +8876,7 @@ INPUT select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual +select st_astext(st_symdifference(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual END INPUT select distinct t1.a from t1,t3 where t1.a=t3.a; @@ -9074,7 +9074,7 @@ INPUT select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_intersects(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select t1.* as 'with_alias', (select a from t2 where d > a) as 'x' from t1; @@ -9422,7 +9422,7 @@ INPUT select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0),point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(1, 1), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result; END OUTPUT -select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(point(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), linestring(point(0, 0), point(10, 10)), MULTILINESTRING(linestring(point(1, 2), point(1, 3))), POLYGON(linestring(point(10, 20), point(1, 1), point(2, 2), point(1, 1), point(10, 20))), MULTIPOLYGON(Polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 0)))))))) as Result from dual +select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(point(0, 0), multipoint(point(0, 0), point(1, 1)), linestring(point(0, 0), point(10, 10)), multilinestring(linestring(point(1, 2), point(1, 3))), polygon(linestring(point(10, 20), point(1, 1), point(2, 2), point(1, 1), point(10, 20))), multipolygon(polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 0)))))))) as Result from dual END INPUT select s1*0 as s1 from t1 group by s1 having s1 <> 0; @@ -9440,7 +9440,7 @@ INPUT select st_distance_sphere(st_geomfromtext('point(-120 45)'), st_geomfromtext('point(30.24 68.37)')); END OUTPUT -select st_distance_sphere(st_geomfromtext('point(-120 45)'), st_geomfromtext('point(30.24 68.37)')) from dual +select st_distance_sphere(st_geometryfromtext('point(-120 45)'), st_geometryfromtext('point(30.24 68.37)')) from dual END INPUT select group_concat(distinct s1 order by s2) from t1; @@ -9512,7 +9512,7 @@ INPUT select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); END OUTPUT -select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual +select ST_DISTANCE(st_geometryfromtext('polygon((0 0, 3 6, 6 3, 0 0))'), st_geometryfromtext('polygon((2 2, 3 4, 4 3, 2 2))')) from dual END INPUT select (with recursive dt as (select t1.a as a union select a+1 from dt where a<10) select concat(count(*), ' - ', avg(dt.a)) from dt ) as subq from t1; @@ -9554,13 +9554,13 @@ INPUT select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 4)")); END OUTPUT -select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 4)')) from dual +select mbrwithin(st_geometryfromtext('point(2 4)'), st_geometryfromtext('linestring(2 0, 2 4)')) from dual END INPUT select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))); END OUTPUT -select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))) from dual +select ST_astext(st_symdifference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_geometryfromtext('multipoint(0 0, 4 4)'))) from dual END INPUT select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1; @@ -9704,7 +9704,7 @@ INPUT select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_difference(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_difference(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select * from information_schema.user_privileges where grantee like "'mysqltest_8'%"; @@ -9944,7 +9944,7 @@ INPUT select 0, ST_Within(ST_GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); END OUTPUT -select 0, ST_Within(ST_GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual +select 0, ST_Within(st_geometryfromtext('LINESTRING(15 15, 50 50, 60 60)'), st_geometryfromtext('POLYGON((10 10,30 20,20 40, 10 10))')) from dual END INPUT select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); @@ -9974,7 +9974,7 @@ INPUT select st_overlaps(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))')); END OUTPUT -select st_overlaps(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))')) from dual +select st_overlaps(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))')) from dual END INPUT select 1, min(1) from t1i where 1=99; @@ -10100,7 +10100,7 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(50 15, 15 50)')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(50 15, 15 50)')) from dual +select 1, ST_Intersects(st_geometryfromtext('LINESTRING(15 15, 50 50)'), st_geometryfromtext('LINESTRING(50 15, 15 50)')) from dual END INPUT select UNIQUE_CONSTRAINT_NAME from information_schema.referential_constraints where constraint_schema = schema(); @@ -10196,7 +10196,7 @@ INPUT select ST_Touches(ST_GeomFromText('LINESTRING(15 5,15 25)'),ST_GeomFromText('LINESTRING(15 5,15 25)')) as result; END OUTPUT -select ST_Touches(ST_GeomFromText('LINESTRING(15 5,15 25)'), ST_GeomFromText('LINESTRING(15 5,15 25)')) as result from dual +select ST_Touches(st_geometryfromtext('LINESTRING(15 5,15 25)'), st_geometryfromtext('LINESTRING(15 5,15 25)')) as result from dual END INPUT select distinct a from t1 order by rand(10); @@ -10244,7 +10244,7 @@ INPUT select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_touches(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select column_name as 'Field',column_type as 'Type',is_nullable as 'Null',column_key as 'Key',column_default as 'Default',extra as 'Extra' from information_schema.columns where table_schema='mysqltest_db1' and table_name='t_column_priv_only'; @@ -10430,7 +10430,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POINT(20 20)'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POINT(20 20)'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('POINT(20 20)'))) from dual END INPUT select group_concat(bar order by concat(bar,bar)) from t1; @@ -10544,7 +10544,7 @@ INPUT select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 6)")); END OUTPUT -select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 6)')) from dual +select mbrtouches(st_geometryfromtext('point(2 4)'), st_geometryfromtext('linestring(2 0, 2 6)')) from dual END INPUT select substring_index('aaaaaaaaa1','aa',-1); @@ -10814,7 +10814,7 @@ INPUT select 1, @empty_geom = st_geomfromtext('geometrycollection()') as equal; END OUTPUT -select 1, @empty_geom = st_geomfromtext('geometrycollection()') as equal from dual +select 1, @empty_geom = st_geometryfromtext('geometrycollection()') as equal from dual END INPUT select hex(convert(char(2557 using latin1) using utf8)); @@ -11102,7 +11102,7 @@ INPUT select mbrwithin(ST_GeomFromText("linestring(0 1, 3 1)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); END OUTPUT -select mbrwithin(ST_GeomFromText('linestring(0 1, 3 1)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual +select mbrwithin(st_geometryfromtext('linestring(0 1, 3 1)'), st_geometryfromtext('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual END INPUT select a, count(a) from t1 group by a with rollup; @@ -11204,7 +11204,7 @@ INPUT select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_overlaps(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select * from (t4 natural join t5) natural join t1 where t4.y > 7; @@ -11342,7 +11342,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('POLYGON((50 5, 55 10, 0 45, 50 5))'))) from dual END INPUT select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0; @@ -11570,7 +11570,7 @@ INPUT select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g); END OUTPUT -select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g) +select ST_astext(g) from t1 where ST_Contains(st_geometryfromtext('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g) END INPUT select week(19981231,0) as '0', week(19981231,1) as '1', week(19981231,2) as '2', week(19981231,3) as '3', week(19981231,4) as '4', week(19981231,5) as '5', week(19981231,6) as '6', week(19981231,7) as '7'; @@ -11654,13 +11654,13 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), ST_GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), ST_GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))')) from dual +select 1, ST_Intersects(st_geometryfromtext('POLYGON((0 0,20 0,20 20,0 20,0 0))'), st_geometryfromtext('POLYGON((10 10,30 10,30 30,10 30,10 10))')) from dual END INPUT select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual +select st_astext(st_union(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual END INPUT select _latin1'a' regexp _latin1'A' collate latin1_general_ci; @@ -11786,7 +11786,7 @@ INPUT select ST_DISTANCE(ST_GeomFromText('linestring(0 0, 3 6, 6 3, 0 0)'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); END OUTPUT -select ST_DISTANCE(ST_GeomFromText('linestring(0 0, 3 6, 6 3, 0 0)'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual +select ST_DISTANCE(st_geometryfromtext('linestring(0 0, 3 6, 6 3, 0 0)'), st_geometryfromtext('polygon((2 2, 3 4, 4 3, 2 2))')) from dual END INPUT select distinct t1_outer.a from t1 t1_outer order by (select max(t1_outer.b+t1_inner.b) from t1 t1_inner); @@ -12050,7 +12050,7 @@ INPUT select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'),Point('-0', '0'), Point('0', '-0'))))) as result; END OUTPUT -select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(point('0', '0'), point('-0', '0'), point('0', '-0'))))) as result from dual +select ST_astext(ST_MPointFromWKB(ST_AsWKB(multipoint(point('0', '0'), point('-0', '0'), point('0', '-0'))))) as result from dual END INPUT select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0; @@ -12068,13 +12068,13 @@ INPUT select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20,15 0))')) as result; END OUTPUT -select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20,15 0))')) as result from dual +select ST_Crosses(st_geometryfromtext('MULTIPOINT(1 0,15 0,10 10)'), st_geometryfromtext('MULTILINESTRING((15 0,20 0,20 20,15 0))')) as result from dual END INPUT select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) or MBRContains(ST_GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a); END OUTPUT -select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) or MBRContains(ST_GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a) +select ST_AsText(a) from t1 where MBRContains(st_geometryfromtext('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) or MBRContains(st_geometryfromtext('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a) END INPUT select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" DAY_HOUR); @@ -12086,7 +12086,7 @@ INPUT select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_contains(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select hex(soundex(_ucs2 0x041004110412)); @@ -12194,7 +12194,7 @@ INPUT select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_disjoint(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; @@ -12476,7 +12476,7 @@ INPUT select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1, 1 0, 2 0, 1 1))')); END OUTPUT -select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1, 1 0, 2 0, 1 1))')) from dual +select st_touches(st_geometryfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), st_geometryfromtext('polygon((1 1, 1 0, 2 0, 1 1))')) from dual END INPUT select t1.* as 'with_alias', (select a from t2 where d > a) from t1; @@ -12494,7 +12494,7 @@ INPUT select mbrcoveredby(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))")); END OUTPUT -select mbrcoveredby(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual +select mbrcoveredby(st_geometryfromtext('point(2 4)'), st_geometryfromtext('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual END INPUT select date,format,str_to_date(date, format) as str_to_date from t1; @@ -12506,7 +12506,7 @@ INPUT select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_symdifference(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_difference(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select user() like _latin1"%@%"; @@ -12590,7 +12590,7 @@ INPUT select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); END OUTPUT -select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual +select ST_DISTANCE(st_geometryfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), st_geometryfromtext('polygon((2 2, 3 4, 4 3, 2 2))')) from dual END INPUT select p from t1; @@ -13142,7 +13142,7 @@ INPUT select ST_geomfromtext(col9,col89) as a from t1; END OUTPUT -select ST_geomfromtext(col9, col89) as a from t1 +select st_geometryfromtext(col9, col89) as a from t1 END INPUT select * from t4 order by b,a limit 3; @@ -13196,7 +13196,7 @@ INPUT select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 6 2, 6 6, 2 6, 2 2))")); END OUTPUT -select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 6 2, 6 6, 2 6, 2 2))')) from dual +select mbrtouches(st_geometryfromtext('point(2 4)'), st_geometryfromtext('polygon((2 2, 6 2, 6 6, 2 6, 2 2))')) from dual END INPUT select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; @@ -13532,7 +13532,7 @@ INPUT select st_touches(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')); END OUTPUT -select st_touches(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')) from dual +select st_touches(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')) from dual END INPUT select left(_utf8 0xD0B0D0B1D0B2,1); @@ -13580,7 +13580,7 @@ INPUT select 0, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))')); END OUTPUT -select 0, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))')) from dual +select 0, ST_Intersects(st_geometryfromtext('POLYGON((0 0,20 10,10 30, 0 0))'), st_geometryfromtext('POLYGON((10 40, 40 50, 20 70, 10 40))')) from dual END INPUT select a, group_concat(distinct b order by b) from t1 group by a with rollup; @@ -13640,7 +13640,7 @@ INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), st_geometryfromtext('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual END INPUT select 1 from t1 group by b; @@ -13748,7 +13748,7 @@ INPUT select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('LINESTRING(15 0,20 0,10 10,20 20)')) as result; END OUTPUT -select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('LINESTRING(15 0,20 0,10 10,20 20)')) as result from dual +select ST_Crosses(st_geometryfromtext('MULTIPOINT(1 0,15 0,10 10)'), st_geometryfromtext('LINESTRING(15 0,20 0,10 10,20 20)')) as result from dual END INPUT select date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND); @@ -14078,7 +14078,7 @@ INPUT select mbrtouches(ST_GeomFromText("point (2 4)"), ST_GeomFromText("point (2 4)")); END OUTPUT -select mbrtouches(ST_GeomFromText('point (2 4)'), ST_GeomFromText('point (2 4)')) from dual +select mbrtouches(st_geometryfromtext('point (2 4)'), st_geometryfromtext('point (2 4)')) from dual END INPUT select distinct t1.a1,t2.a1 from t1,t2; @@ -14366,7 +14366,7 @@ INPUT select ST_Touches(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,3 1,3 3,1 3,1 1))'),ST_GeomFromText('LINESTRING(3 3,10 10)')) as result; END OUTPUT -select ST_Touches(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,3 1,3 3,1 3,1 1))'), ST_GeomFromText('LINESTRING(3 3,10 10)')) as result from dual +select ST_Touches(st_geometryfromtext('POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,3 1,3 3,1 3,1 1))'), st_geometryfromtext('LINESTRING(3 3,10 10)')) as result from dual END INPUT select strcmp(_koi8r'a', _koi8r'A' COLLATE koi8r_general_ci); @@ -14570,7 +14570,7 @@ INPUT select ST_AsText(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')); END OUTPUT -select ST_AsText(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual +select ST_AsText(st_polygonfromtext('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual END INPUT select 10.0+'10'; @@ -14672,7 +14672,7 @@ INPUT select ST_contains(ST_GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), ST_GeomFromText('POINT(5 10)')); END OUTPUT -select ST_contains(ST_GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), ST_GeomFromText('POINT(5 10)')) from dual +select ST_contains(st_geometryfromtext('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), st_geometryfromtext('POINT(5 10)')) from dual END INPUT select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_unicode_520_ci; @@ -15356,7 +15356,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('LINESTRING(0 0, 50 45, 40 50, 0 0)'), st_geometryfromtext('LINESTRING(50 5, 55 10, 0 45, 50 5)'))) from dual END INPUT select load_file("/proc/self/fd/0"); @@ -15380,7 +15380,7 @@ INPUT select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual +select st_astext(st_intersection(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual END INPUT select Fld1, max(Fld2) from t1 group by Fld1 having std(Fld2) is not null; @@ -15434,13 +15434,13 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(16 16, 51 51)')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(16 16, 51 51)')) from dual +select 1, ST_Intersects(st_geometryfromtext('LINESTRING(15 15, 50 50)'), st_geometryfromtext('LINESTRING(16 16, 51 51)')) from dual END INPUT select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))); END OUTPUT -select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))) from dual +select ST_astext(st_difference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_geometryfromtext('multipoint(2 2, 3 3)'))) from dual END INPUT select bit_length('; @@ -15458,7 +15458,7 @@ INPUT select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual +select st_astext(st_difference(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual END INPUT select coercibility(col1), collation(col1)from v2; @@ -15506,7 +15506,7 @@ INPUT select st_touches(ST_GeomFromText('point(1 1)'), ST_GeomFromText('point(1 1)')); END OUTPUT -select st_touches(ST_GeomFromText('point(1 1)'), ST_GeomFromText('point(1 1)')) from dual +select st_touches(st_geometryfromtext('point(1 1)'), st_geometryfromtext('point(1 1)')) from dual END INPUT select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_bin,_latin1'd',2); @@ -15530,7 +15530,7 @@ INPUT select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_within(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002"); @@ -15554,7 +15554,7 @@ INPUT select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 0, 0 0,0 1, 0 0))'))) as result; END OUTPUT -select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 0, 0 0,0 1, 0 0))'))) as result from dual +select ST_astext(ST_symdifference(st_geometryfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), st_geometryfromtext('polygon((0 0, 1 0, 0 0,0 1, 0 0))'))) as result from dual END INPUT select extract(HOUR_SECOND FROM "10:11:12"); @@ -15662,7 +15662,7 @@ INPUT select st_crosses(ST_GeometryFromText('geometrycollection(multipoint(0 0, 1 0, 1 1, 0 1, 0 0))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')); END OUTPUT -select st_crosses(ST_GeometryFromText('geometrycollection(multipoint(0 0, 1 0, 1 1, 0 1, 0 0))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual +select st_crosses(st_geometryfromtext('geometrycollection(multipoint(0 0, 1 0, 1 1, 0 1, 0 0))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual END INPUT select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1; @@ -15740,7 +15740,7 @@ INPUT select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'),ST_GeomFromText('linestring(0 0,10 10)')); END OUTPUT -select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), ST_GeomFromText('linestring(0 0,10 10)')) from dual +select st_distance(st_geometryfromtext('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), st_geometryfromtext('linestring(0 0,10 10)')) from dual END INPUT select day("1997-12-31 23:59:59.000001"); @@ -15842,7 +15842,7 @@ INPUT select 1, ST_Within(ST_GeomFromText('LINESTRING(15 15, 16 16)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); END OUTPUT -select 1, ST_Within(ST_GeomFromText('LINESTRING(15 15, 16 16)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual +select 1, ST_Within(st_geometryfromtext('LINESTRING(15 15, 16 16)'), st_geometryfromtext('POLYGON((10 10,30 20,20 40, 10 10))')) from dual END INPUT select count(distinct n) from t1; @@ -16604,7 +16604,7 @@ INPUT select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_union(st_geometryfromtext('multipoint(2 2, 3 3)'), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select * from t3_trans; @@ -16646,7 +16646,7 @@ INPUT select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 0)')); END OUTPUT -select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 0)')) from dual +select st_touches(st_geometryfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), st_geometryfromtext('point(1 0)')) from dual END INPUT select distinct s1 from t1 order by s2,s1; @@ -17018,7 +17018,7 @@ INPUT select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_overlaps(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select _latin1'B' between _latin1'a' collate latin1_bin and _latin1'c'; @@ -17030,7 +17030,7 @@ INPUT select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_overlaps(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select locate('HE','hello' collate utf8mb4_bin); @@ -17078,7 +17078,7 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual +select 1, ST_Intersects(st_geometryfromtext('POLYGON((0 0,20 10,10 30, 0 0))'), st_geometryfromtext('POLYGON((10 10,30 20,20 40, 10 10))')) from dual END INPUT select concat("-",a,"-",b,"-") from t1 where a="hello"; @@ -17954,7 +17954,7 @@ INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), st_geometryfromtext('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual END INPUT select count(distinct vs) from t1; @@ -18104,7 +18104,7 @@ INPUT select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1.2, 1 0, 2 0, 1 1.2))')); END OUTPUT -select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1.2, 1 0, 2 0, 1 1.2))')) from dual +select st_touches(st_geometryfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), st_geometryfromtext('polygon((1 1.2, 1 0, 2 0, 1 1.2))')) from dual END INPUT select ifnull(NULL, _utf8mb4'string'); @@ -18200,7 +18200,7 @@ INPUT select mbrtouches(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); END OUTPUT -select mbrtouches(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual +select mbrtouches(st_geometryfromtext('linestring(1 0, 2 0)'), st_geometryfromtext('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual END INPUT select count(*) from information_schema.events where event_schema = database() and event_name = 'event_35981' and on_completion = 'NOT PRESERVE'; @@ -18386,7 +18386,7 @@ INPUT select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 4)")); END OUTPUT -select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 4)')) from dual +select mbrtouches(st_geometryfromtext('point(2 4)'), st_geometryfromtext('linestring(2 0, 2 4)')) from dual END INPUT select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; @@ -18722,7 +18722,7 @@ INPUT select ST_astext(g) from t1 where ST_Intersects(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g); END OUTPUT -select ST_astext(g) from t1 where ST_Intersects(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) +select ST_astext(g) from t1 where ST_Intersects(st_geometryfromtext('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) END INPUT select t1.f1,t.* from t1, t1 t group by 1; @@ -18914,7 +18914,7 @@ INPUT select 0, ST_Within(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); END OUTPUT -select 0, ST_Within(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual +select 0, ST_Within(st_geometryfromtext('POLYGON((0 0,20 10,10 30, 0 0))'), st_geometryfromtext('POLYGON((10 10,30 20,20 40, 10 10))')) from dual END INPUT select c cz from t1 where c='z'; @@ -19220,7 +19220,7 @@ INPUT select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))); END OUTPUT -select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))) from dual +select ST_astext(st_symdifference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_geometryfromtext('multipoint(2 2, 3 3)'))) from dual END INPUT select t2.fld3 FROM t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; @@ -19376,7 +19376,7 @@ INPUT select ST_Crosses(ST_GeomFromText('MULTIPOINT(0 0,3 3)'),ST_GeomFromText('LINESTRING(1 1,10 10)')) as result; END OUTPUT -select ST_Crosses(ST_GeomFromText('MULTIPOINT(0 0,3 3)'), ST_GeomFromText('LINESTRING(1 1,10 10)')) as result from dual +select ST_Crosses(st_geometryfromtext('MULTIPOINT(0 0,3 3)'), st_geometryfromtext('LINESTRING(1 1,10 10)')) as result from dual END INPUT select 7; @@ -19472,7 +19472,7 @@ INPUT select ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')); END OUTPUT -select ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual +select ST_Intersects(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual END INPUT select crc32("123"); @@ -19598,7 +19598,7 @@ INPUT select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))); END OUTPUT -select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual +select ST_astext(ST_symdifference(st_geometryfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), st_geometryfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual END INPUT select ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'without distinct: how it should be' from t1; @@ -19670,7 +19670,7 @@ INPUT select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0),point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result; END OUTPUT -select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(point(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), linestring(point(0, 0), point(10, 10)), MULTILINESTRING(linestring(point(1, 2), point(1, 3))), POLYGON(linestring(point(10, 20), point(1, 1), point(2, 2), point(10, 20))), MULTIPOLYGON(Polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 0)))))))) as Result from dual +select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(point(0, 0), multipoint(point(0, 0), point(1, 1)), linestring(point(0, 0), point(10, 10)), multilinestring(linestring(point(1, 2), point(1, 3))), polygon(linestring(point(10, 20), point(1, 1), point(2, 2), point(10, 20))), multipolygon(polygon(linestring(point(0, 0), point(1, 0), point(1, 1), point(0, 0)))))))) as Result from dual END INPUT select bar from t1 having group_concat(bar)=''; @@ -19814,7 +19814,7 @@ INPUT select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')); END OUTPUT -select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual +select ST_Overlaps(st_geometryfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), st_geometryfromtext('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual END INPUT select spid,count(*) from t1 where spid between 1 and 2 group by spid order by spid desc; @@ -20078,7 +20078,7 @@ INPUT select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))); END OUTPUT -select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))) from dual +select ST_astext(ST_Intersection(st_geometryfromtext('LINESTRING(0 0, 50 45, 40 50)'), st_geometryfromtext('LINESTRING(50 5, 55 10, 0 45)'))) from dual END INPUT select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1; @@ -20378,7 +20378,7 @@ INPUT select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'),Point('-0', '0'), Point('0', '0')))))) as result; END OUTPUT -select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(point('0', '-0'), point('-0', '0'), point('0', '0')))))) as result from dual +select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(multipoint(point('0', '-0'), point('-0', '0'), point('0', '0')))))) as result from dual END INPUT select date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND); @@ -20522,7 +20522,7 @@ INPUT select ST_astext(g) from t1 where ST_Within(g, ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))')); END OUTPUT -select ST_astext(g) from t1 where ST_Within(g, ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))')) +select ST_astext(g) from t1 where ST_Within(g, st_geometryfromtext('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))')) END INPUT select table_name, is_updatable from information_schema.views where table_schema != 'sys' order by table_name; @@ -20654,7 +20654,7 @@ INPUT select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_intersects(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select count(*), min(7), max(7) from t1m, t2i; @@ -20774,7 +20774,7 @@ INPUT select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(2 2)'))); END OUTPUT -select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(2 2)'))) from dual +select st_astext(st_makeenvelope(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(2 2)'))) from dual END INPUT select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; @@ -20948,7 +20948,7 @@ INPUT select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))')); END OUTPUT -select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))')) from dual +select ST_Overlaps(st_geometryfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), st_geometryfromtext('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))')) from dual END INPUT select length(@test_compress_string); @@ -20960,13 +20960,13 @@ INPUT select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual +select st_astext(st_intersection(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual END INPUT select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_equals(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select distinct *,if(1,'',f1) from t1; @@ -21068,7 +21068,7 @@ INPUT select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_touches(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select i, count(*), variance(s1/s2) from bug22555 group by i order by i; @@ -21212,7 +21212,7 @@ INPUT select ST_astext(st_difference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result; END OUTPUT -select ST_astext(st_difference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual +select ST_astext(st_difference(st_geometryfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), st_geometryfromtext('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual END INPUT select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; @@ -21428,7 +21428,7 @@ INPUT select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')); END OUTPUT -select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual +select ST_Disjoint(st_geometryfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), st_geometryfromtext('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual END INPUT select insert(_ucs2 0x006100620063,10,2,_ucs2 0x006400650066); @@ -21560,7 +21560,7 @@ INPUT select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_within(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select collation(group_concat(a)) from t1; @@ -21632,7 +21632,7 @@ INPUT select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_equals(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, cast(_latin1'abc' AS char(2)) as c3, cast(_latin1'a ' AS char(2)) as c4, hex(cast(_latin1'a' AS char(2))) as c5; @@ -21842,7 +21842,7 @@ INPUT select mbrtouches(ST_GeomFromText("linestring(3 2, 4 2)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); END OUTPUT -select mbrtouches(ST_GeomFromText('linestring(3 2, 4 2)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual +select mbrtouches(st_geometryfromtext('linestring(3 2, 4 2)'), st_geometryfromtext('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual END INPUT select round(1.1e1, 4294967295), truncate(1.1e1, 4294967295); @@ -21992,7 +21992,7 @@ INPUT select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); END OUTPUT -select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual +select ST_astext(ST_UNION(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual END INPUT select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1); @@ -22172,7 +22172,7 @@ INPUT select ST_astext(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))))); END OUTPUT -select ST_astext(ST_PolyFromWKB(ST_AsWKB(Polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0)))))) from dual +select ST_astext(ST_PolyFromWKB(ST_AsWKB(polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0)))))) from dual END INPUT select count(*) from `load`; @@ -22310,7 +22310,7 @@ INPUT select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POINT(10 10)')); END OUTPUT -select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POINT(10 10)')) from dual +select 1, ST_Intersects(st_geometryfromtext('POLYGON((0 0,20 10,10 30, 0 0))'), st_geometryfromtext('POINT(10 10)')) from dual END INPUT select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1; @@ -22322,7 +22322,7 @@ INPUT select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_difference(st_geometryfromtext('multipoint(2 2, 3 3)'), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select * from v1b; @@ -22436,7 +22436,7 @@ INPUT select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_within(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select distinct a,c from t1 group by b,c,a having a > 2 order by a desc; @@ -22484,7 +22484,7 @@ INPUT select ST_Intersects(ST_GeomFromText('LINESTRING(15 10,10 0)'),ST_GeomFromText('POINT(15 10)')) as result; END OUTPUT -select ST_Intersects(ST_GeomFromText('LINESTRING(15 10,10 0)'), ST_GeomFromText('POINT(15 10)')) as result from dual +select ST_Intersects(st_geometryfromtext('LINESTRING(15 10,10 0)'), st_geometryfromtext('POINT(15 10)')) as result from dual END INPUT select date_add(date,INTERVAL 1 SECOND) from t1; @@ -22646,7 +22646,7 @@ INPUT select ST_geometryfromtext(b) IS NULL, ST_geometryfromwkb(b) IS NULL, ST_astext(b) IS NULL, ST_aswkb(b) IS NULL, ST_geometrytype(b) IS NULL, ST_centroid(b) IS NULL, ST_envelope(b) IS NULL, ST_startpoint(b) IS NULL, ST_endpoint(b) IS NULL, ST_exteriorring(b) IS NULL, ST_pointn(b, 1) IS NULL, ST_geometryn(b, 1) IS NULL, ST_interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, ST_isempty(b) IS NULL, ST_issimple(b) IS NULL, ST_isclosed(b) IS NULL, ST_dimension(b) IS NULL, ST_numgeometries(b) IS NULL, ST_numinteriorrings(b) IS NULL, ST_numpoints(b) IS NULL, ST_area(b) IS NULL, ST_length(b) IS NULL, ST_srid(b) IS NULL, ST_x(b) IS NULL, ST_y(b) IS NULL from t1; END OUTPUT -select ST_geometryfromtext(b) is null, ST_geometryfromwkb(b) is null, ST_astext(b) is null, ST_aswkb(b) is null, ST_geometrytype(b) is null, ST_centroid(b) is null, ST_envelope(b) is null, ST_startpoint(b) is null, ST_endpoint(b) is null, ST_exteriorring(b) is null, ST_pointn(b, 1) is null, ST_geometryn(b, 1) is null, ST_interiorringn(b, 1) is null, multipoint(b) is null, ST_isempty(b) is null, ST_issimple(b) is null, ST_isclosed(b) is null, ST_dimension(b) is null, ST_numgeometries(b) is null, ST_numinteriorrings(b) is null, ST_numpoints(b) is null, ST_area(b) is null, ST_length(b) is null, ST_srid(b) is null, ST_x(b) is null, ST_y(b) is null from t1 +select st_geometryfromtext(b) is null, ST_geometryfromwkb(b) is null, ST_astext(b) is null, ST_aswkb(b) is null, ST_geometrytype(b) is null, ST_centroid(b) is null, ST_envelope(b) is null, ST_startpoint(b) is null, ST_endpoint(b) is null, ST_exteriorring(b) is null, ST_pointn(b, 1) is null, ST_geometryn(b, 1) is null, ST_interiorringn(b, 1) is null, multipoint(b) is null, ST_isempty(b) is null, ST_issimple(b) is null, ST_isclosed(b) is null, ST_dimension(b) is null, ST_numgeometries(b) is null, ST_numinteriorrings(b) is null, ST_numpoints(b) is null, ST_area(b) is null, ST_length(b) is null, ST_srid(b) is null, ST_x(b) is null, ST_y(b) is null from t1 END INPUT select inet6_ntoa(null),inet6_aton(null); @@ -22760,7 +22760,7 @@ INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result from dual END INPUT select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_esperanto_ci; @@ -22910,7 +22910,7 @@ INPUT select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) and MBRContains(ST_GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a); END OUTPUT -select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) and MBRContains(ST_GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a) +select ST_AsText(a) from t1 where MBRContains(st_geometryfromtext('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) and MBRContains(st_geometryfromtext('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a) END INPUT select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_spanish_ci; @@ -23120,5 +23120,5 @@ INPUT select ST_astext(ST_envelope(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); END OUTPUT -select ST_astext(ST_envelope(ST_PolyFromWKB(ST_AsWKB(Polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual +select ST_astext(ST_envelope(ST_PolyFromWKB(ST_AsWKB(polygon(linestring(point(0, 0), point(30, 0), point(30, 30), point(1, 0), point(0, 0))))))) from dual END diff --git a/go/vt/sqlparser/testdata/union_cases.txt b/go/vt/sqlparser/testdata/union_cases.txt index 0f74e8a3cda..43d498ea44d 100644 --- a/go/vt/sqlparser/testdata/union_cases.txt +++ b/go/vt/sqlparser/testdata/union_cases.txt @@ -2,7 +2,7 @@ INPUT SELECT ST_ASTEXT(ST_UNION(ST_ENVELOPE(ST_GEOMFROMTEXT('LINESTRING(5 9,-1 10,-2 -6,2 9,2 0,3 6,-3 3,9 -2,-3 -10,-7 -4,1 4)')), ST_UNION(ST_GEOMFROMTEXT('MULTILINESTRING((6 -8,10 -8,3 0,-6 1,0 8,-1 8,-3 -3,6 -6,0 6,1 -6,-1 7,8 3),(-9 -10,-4 0,0 1,-9 1,6 9,-8 7,-2 -6,2 10,-1 -5,3 -5,-1 -10))'), ST_GEOMFROMTEXT('MULTILINESTRING((8 7,2 6,-6 -8,-2 10,4 1,9 7,5 9,4 1,8 2,-2 10,8 -5))')))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_ENVELOPE(ST_GEOMFROMTEXT('LINESTRING(5 9,-1 10,-2 -6,2 9,2 0,3 6,-3 3,9 -2,-3 -10,-7 -4,1 4)')), ST_UNION(ST_GEOMFROMTEXT('MULTILINESTRING((6 -8,10 -8,3 0,-6 1,0 8,-1 8,-3 -3,6 -6,0 6,1 -6,-1 7,8 3),(-9 -10,-4 0,0 1,-9 1,6 9,-8 7,-2 -6,2 10,-1 -5,3 -5,-1 -10))'), ST_GEOMFROMTEXT('MULTILINESTRING((8 7,2 6,-6 -8,-2 10,4 1,9 7,5 9,4 1,8 2,-2 10,8 -5))')))) as result from dual +select ST_ASTEXT(ST_UNION(ST_ENVELOPE(st_geometryfromtext('LINESTRING(5 9,-1 10,-2 -6,2 9,2 0,3 6,-3 3,9 -2,-3 -10,-7 -4,1 4)')), ST_UNION(st_geometryfromtext('MULTILINESTRING((6 -8,10 -8,3 0,-6 1,0 8,-1 8,-3 -3,6 -6,0 6,1 -6,-1 7,8 3),(-9 -10,-4 0,0 1,-9 1,6 9,-8 7,-2 -6,2 10,-1 -5,3 -5,-1 -10))'), st_geometryfromtext('MULTILINESTRING((8 7,2 6,-6 -8,-2 10,4 1,9 7,5 9,4 1,8 2,-2 10,8 -5))')))) as result from dual END INPUT SELECT i FROM t2 UNION SELECT c FROM t1; @@ -50,7 +50,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(0 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT select ST_astext(st_union( st_intersection( multipoint(point(-1,-1)), point(1,-1) ), st_difference( multipoint(point(-1,1)), point(-1,-1) ))); @@ -68,7 +68,7 @@ INPUT select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_union(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT SELECT sleep(0.5) FROM t17059925 UNION ALL SELECT * FROM t17059925 WHERE a= 10 AND a= 20 UNION ALL SELECT * FROM t2; @@ -140,7 +140,7 @@ INPUT select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_overlaps(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT * FROM t1 LIMIT 5) UNION ALL (SELECT * FROM t2 LIMIT 4) LIMIT 7; @@ -224,7 +224,7 @@ INPUT select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_touches(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT 1 UNION SELECT 1 INTO @var FOR UPDATE; @@ -236,13 +236,13 @@ INPUT select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_intersects(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); END OUTPUT -select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual +select ST_astext(ST_UNION(st_geometryfromtext('POLYGON((0 0, 50 45, 40 50, 0 0))'), st_geometryfromtext('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual END INPUT SELECT NULL as "my_col1",2 AS "my_col2" UNION SELECT NULL,1; @@ -254,19 +254,19 @@ INPUT select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_contains(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(LINESTRING(4 1, 6 1), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(4 1, 6 1), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(LINESTRING(4 1, 6 1), LINESTRING(0 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((10 10,10 20,20 10,10 10)),((20 10,30 20,30 10,20 10)),((10 20,10 30,20 20,10 20)),((20 20,30 30,30 20,20 20)))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((10 10,10 20,20 10,10 10)),((20 10,30 20,30 10,20 10)),((10 20,10 30,20 20,10 20)),((20 20,30 30,30 20,20 20)))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), st_geometryfromtext('MULTIPOLYGON(((10 10,10 20,20 10,10 10)),((20 10,30 20,30 10,20 10)),((10 20,10 30,20 20,10 20)),((20 20,30 30,30 20,20 20)))'))) from dual END INPUT (SELECT * FROM t1 LIMIT 5 OFFSET 4) UNION (SELECT * FROM t2 LIMIT 4 OFFSET 2) ORDER BY a LIMIT 7 OFFSET 1; @@ -302,7 +302,7 @@ INPUT SELECT ST_CONTAINS(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(-3 3)'), ST_GEOMFROMTEXT('POLYGON((8 3,-2 9,-10 2,-10 -9,7 -1,4 1,7 6,5 -10,5 3,2 1,-10 0, 8 3))')), ST_CONVEXHULL(ST_GEOMFROMTEXT('MULTIPOINT(8 -8,-7 5)'))), ST_UNION(ST_GEOMFROMTEXT('POINT(4 1)'), ST_GEOMFROMTEXT('MULTIPOINT(-10 -10,5 -2,-6 -7,1 5,-3 0)'))) as result; END OUTPUT -select ST_CONTAINS(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(-3 3)'), ST_GEOMFROMTEXT('POLYGON((8 3,-2 9,-10 2,-10 -9,7 -1,4 1,7 6,5 -10,5 3,2 1,-10 0, 8 3))')), ST_CONVEXHULL(ST_GEOMFROMTEXT('MULTIPOINT(8 -8,-7 5)'))), ST_UNION(ST_GEOMFROMTEXT('POINT(4 1)'), ST_GEOMFROMTEXT('MULTIPOINT(-10 -10,5 -2,-6 -7,1 5,-3 0)'))) as result from dual +select ST_CONTAINS(ST_UNION(ST_INTERSECTION(st_geometryfromtext('POINT(-3 3)'), st_geometryfromtext('POLYGON((8 3,-2 9,-10 2,-10 -9,7 -1,4 1,7 6,5 -10,5 3,2 1,-10 0, 8 3))')), ST_CONVEXHULL(st_geometryfromtext('MULTIPOINT(8 -8,-7 5)'))), ST_UNION(st_geometryfromtext('POINT(4 1)'), st_geometryfromtext('MULTIPOINT(-10 -10,5 -2,-6 -7,1 5,-3 0)'))) as result from dual END INPUT select * from (select * from t1 union all select * from t1 limit 2) a; @@ -344,7 +344,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT select 'a' union select concat('a', -concat('3',4)); @@ -392,13 +392,13 @@ INPUT select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual +select st_astext(st_union(st_geometryfromtext('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual END INPUT select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_equals(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT * FROM t1 LIMIT 5) UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 8; @@ -410,7 +410,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 6,-11 -6,6 0,0 6),(3 1,5 0,-2 0,3 1))'), ST_GEOMFROMTEXT('POLYGON((5 4,6 0,9 12,-7 -12,5 -19,5 4))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 6,-11 -6,6 0,0 6),(3 1,5 0,-2 0,3 1))'), ST_GEOMFROMTEXT('POLYGON((5 4,6 0,9 12,-7 -12,5 -19,5 4))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('POLYGON((0 6,-11 -6,6 0,0 6),(3 1,5 0,-2 0,3 1))'), st_geometryfromtext('POLYGON((5 4,6 0,9 12,-7 -12,5 -19,5 4))'))) from dual END INPUT (SELECT * FROM t1 ORDER BY a DESC LIMIT 5 OFFSET 4) UNION ALL (SELECT * FROM t2 ORDER BY a DESC LIMIT 4 OFFSET 2) LIMIT 7 OFFSET 1; @@ -428,7 +428,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((0 0, 5 0, 5 5, 0 5,0 0)), POLYGON((5 0,10 0, 10 3,5 3,5 0)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0, 5 0, 5 5, 0 5,0 0)), POLYGON((5 0,10 0, 10 3,5 3,5 0)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(POLYGON((0 0, 5 0, 5 5, 0 5,0 0)), POLYGON((5 0,10 0, 10 3,5 3,5 0)))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT select f1 from t1 union select f1 from t1; @@ -446,7 +446,7 @@ INPUT select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_intersects(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT a FROM t1 ORDER BY COUNT(*)) UNION ALL SELECT a FROM t1; @@ -554,7 +554,7 @@ INPUT select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_disjoint(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT alias2 . `col_int_nokey` AS field1 FROM ( CC AS alias1 INNER JOIN ( ( BB AS alias2 INNER JOIN ( SELECT SQ1_alias1 . * FROM C AS SQ1_alias1 ) AS alias3 ON (alias3 . `col_int_key` = alias2 . `col_int_nokey` ) ) ) ON (alias3 . `col_varchar_nokey` = alias2 . `col_varchar_key` ) ) WHERE ( ( alias2 . `pk` , alias3 . `col_int_nokey` ) IN ( SELECT 4 , 7 UNION SELECT 137, 6 ) ) AND alias1 . `pk` > 149 AND alias1 . `pk` < ( 149 + 7 ) OR alias3 . `col_varchar_key` < 'o'; @@ -584,13 +584,13 @@ INPUT SELECT ST_AsText(st_union(ST_GeomFromText('GeometryCollection(GeometryCollection(Point(1 1)), GeometryCollection(linestring(1 1, 2 2)))'), ST_GeomFromText('GeometryCollection(GeometryCollection(Point(1 1)))'))); END OUTPUT -select ST_AsText(st_union(ST_GeomFromText('GeometryCollection(GeometryCollection(Point(1 1)), GeometryCollection(linestring(1 1, 2 2)))'), ST_GeomFromText('GeometryCollection(GeometryCollection(Point(1 1)))'))) from dual +select ST_AsText(st_union(st_geometryfromtext('GeometryCollection(GeometryCollection(Point(1 1)), GeometryCollection(linestring(1 1, 2 2)))'), st_geometryfromtext('GeometryCollection(GeometryCollection(Point(1 1)))'))) from dual END INPUT select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); END OUTPUT -select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual +select ST_astext(st_union(st_geometryfromtext('multipoint(2 2, 3 3)'), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)')))) from dual END INPUT select group_concat('x') UNION ALL select 1; @@ -626,7 +626,7 @@ INPUT select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_equals(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT * FROM t1 LIMIT 5 OFFSET 4) UNION ALL (SELECT * FROM t2 LIMIT 4 OFFSET 2) ORDER BY a LIMIT 7 OFFSET 1; @@ -644,7 +644,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10))'), ST_GEOMFROMTEXT('POLYGON((5 15,5 30,30 15,5 15))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10))'), ST_GEOMFROMTEXT('POLYGON((5 15,5 30,30 15,5 15))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('POLYGON((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10))'), st_geometryfromtext('POLYGON((5 15,5 30,30 15,5 15))'))) from dual END INPUT (SELECT * FROM t1 ORDER BY a DESC LIMIT 5) UNION ALL (SELECT * FROM t2 ORDER BY a DESC LIMIT 4) LIMIT 7; @@ -674,19 +674,19 @@ INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), st_geometryfromtext('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual END INPUT SELECT ST_ISVALID( ST_UNION( ST_GEOMFROMTEXT(' LINESTRING(-9 -17,17 -11) '), ST_GEOMFROMTEXT(' GEOMETRYCOLLECTION( LINESTRING(8 16,-8 -3), POLYGON((2 3,-9 -7,12 -13,2 3)), MULTILINESTRING((-2 2,11 -10),(6 0,-15 0,16 0)) ) ') ) ) AS valid; END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT(' LINESTRING(-9 -17,17 -11) '), ST_GEOMFROMTEXT(' GEOMETRYCOLLECTION( LINESTRING(8 16,-8 -3), POLYGON((2 3,-9 -7,12 -13,2 3)), MULTILINESTRING((-2 2,11 -10),(6 0,-15 0,16 0)) ) '))) as valid from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext(' LINESTRING(-9 -17,17 -11) '), st_geometryfromtext(' GEOMETRYCOLLECTION( LINESTRING(8 16,-8 -3), POLYGON((2 3,-9 -7,12 -13,2 3)), MULTILINESTRING((-2 2,11 -10),(6 0,-15 0,16 0)) ) '))) as valid from dual END INPUT select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))); END OUTPUT -select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual +select ST_astext(ST_Union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual END INPUT SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b; @@ -722,7 +722,7 @@ INPUT select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_touches(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT * FROM t1 ORDER BY a DESC LIMIT 5 OFFSET 4) UNION ALL (SELECT * FROM t2 ORDER BY a DESC LIMIT 4 OFFSET 2) ORDER BY a LIMIT 7 OFFSET 1; @@ -764,7 +764,7 @@ INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result from dual END INPUT SELECT 1 LOCK IN SHARE MODE UNION SELECT 2; @@ -824,7 +824,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT SELECT (a DIV 254576881) FROM t1 UNION ALL SELECT (a DIV 254576881) FROM t1; @@ -848,7 +848,7 @@ INPUT select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_crosses(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT 1 UNION SELECT 2 FOR UPDATE; @@ -860,7 +860,7 @@ INPUT select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_disjoint(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1); @@ -884,7 +884,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((15 10,10 15,10 17,15 10)),((15 10,10 20,10 22,15 10)),((15 10,10 25,10 27,15 10)),((25 10,30 17,30 15,25 10)),((25 10,30 22,30 20,25 10)),((25 10,30 27,30 25,25 10)),((18 10,20 30,19 10,18 10)),((21 10,20 30,22 10,21 10)))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((15 10,10 15,10 17,15 10)),((15 10,10 20,10 22,15 10)),((15 10,10 25,10 27,15 10)),((25 10,30 17,30 15,25 10)),((25 10,30 22,30 20,25 10)),((25 10,30 27,30 25,25 10)),((18 10,20 30,19 10,18 10)),((21 10,20 30,22 10,21 10)))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('MULTIPOLYGON(((0 0,0 40,40 40,40 0,0 0),(10 10,30 10,30 30,10 30,10 10)))'), st_geometryfromtext('MULTIPOLYGON(((15 10,10 15,10 17,15 10)),((15 10,10 20,10 22,15 10)),((15 10,10 25,10 27,15 10)),((25 10,30 17,30 15,25 10)),((25 10,30 22,30 20,25 10)),((25 10,30 27,30 25,25 10)),((18 10,20 30,19 10,18 10)),((21 10,20 30,22 10,21 10)))'))) from dual END INPUT SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a) FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d GROUP BY a WITH ROLLUP ORDER BY GROUPING(a),a; @@ -896,13 +896,13 @@ INPUT SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom from dual END INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(linestring(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(linestring(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(linestring(0 0,100 100), MULTIPOINT(1 1, 2 2)))'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT (SELECT a FROM t1 ORDER BY COUNT(*) LIMIT 1) UNION (SELECT a FROM t1 ORDER BY COUNT(*) LIMIT 1 OFFSET 1); @@ -944,13 +944,13 @@ INPUT select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_contains(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(LINESTRING(3 1, 6 1), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(3 1, 6 1), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(LINESTRING(3 1, 6 1), LINESTRING(0 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT select * from (select * from t1 union all select * from t1) a; @@ -1022,7 +1022,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), MULTIPOINT(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), MULTIPOINT(1 1, 2 2)))'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT (SELECT * FROM t1 ORDER BY a DESC LIMIT 5 OFFSET 4) UNION ALL SELECT * FROM t2 LIMIT 8 OFFSET 1; @@ -1034,7 +1034,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('LINESTRING(12 6,9 4,-9 1,-4 -6,12 -9,-9 -17,17 -11,-16 17,19 -19,0 -16,6 -5,15 3,14 -5,18 13,-9 10,-11 8)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-18 2,1 7),(-19 -3,-16 -12),(10 0,3 8,12 19,8 -15)),MULTILINESTRING((8 16,-8 -3),(18 3,8 12),(-19 4,20 14)),POLYGON((2 3,-9 -7,12 -13,2 3)),MULTILINESTRING((16 -7,-2 2,11 -10,-1 8),(6 0,-15 0,16 0,-6 -14)))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('LINESTRING(12 6,9 4,-9 1,-4 -6,12 -9,-9 -17,17 -11,-16 17,19 -19,0 -16,6 -5,15 3,14 -5,18 13,-9 10,-11 8)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-18 2,1 7),(-19 -3,-16 -12),(10 0,3 8,12 19,8 -15)),MULTILINESTRING((8 16,-8 -3),(18 3,8 12),(-19 4,20 14)),POLYGON((2 3,-9 -7,12 -13,2 3)),MULTILINESTRING((16 -7,-2 2,11 -10,-1 8),(6 0,-15 0,16 0,-6 -14)))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('LINESTRING(12 6,9 4,-9 1,-4 -6,12 -9,-9 -17,17 -11,-16 17,19 -19,0 -16,6 -5,15 3,14 -5,18 13,-9 10,-11 8)'), st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((-18 2,1 7),(-19 -3,-16 -12),(10 0,3 8,12 19,8 -15)),MULTILINESTRING((8 16,-8 -3),(18 3,8 12),(-19 4,20 14)),POLYGON((2 3,-9 -7,12 -13,2 3)),MULTILINESTRING((16 -7,-2 2,11 -10,-1 8),(6 0,-15 0,16 0,-6 -14)))'))) from dual END INPUT select s1 from t1 where s1 in (select version from information_schema.tables) union select version from information_schema.tables; @@ -1058,7 +1058,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), linestring(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), linestring(1 1, 2 2)))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0,100 100), linestring(1 1, 2 2)))'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT SELECT 'case+union+test' UNION SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END; @@ -1070,7 +1070,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 0, 3 1, 4 2))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 0, 3 1, 4 2))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(POLYGON((0 0, 3 0, 3 3, 0 3, 0 0)), LINESTRING(3 0, 3 1, 4 2))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT SELECT 1 UNION SELECT 1 FOR UPDATE INTO @var; @@ -1082,7 +1082,7 @@ INPUT SELECT ST_ASTEXT(ST_VALIDATE(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), ST_GEOMFROMTEXT('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))')))) as result; END OUTPUT -select ST_ASTEXT(ST_VALIDATE(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), ST_GEOMFROMTEXT('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))')))) as result from dual +select ST_ASTEXT(ST_VALIDATE(ST_UNION(st_geometryfromtext('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), st_geometryfromtext('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))')))) as result from dual END INPUT SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a) FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d GROUP BY a WITH ROLLUP ORDER BY SUM(a); @@ -1100,7 +1100,7 @@ INPUT select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_within(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT (SELECT a FROM t1 ORDER BY COUNT(*) LIMIT 1) UNION ALL (SELECT a FROM t1 ORDER BY COUNT(*) LIMIT 1 OFFSET 1); @@ -1118,7 +1118,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('MULTIPOINT(0 0,100 100)'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('MULTIPOINT(0 0,100 100)'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('MULTIPOINT(0 0,100 100)'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 5; @@ -1136,7 +1136,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((4 5,12 11,-12 -3,4 5))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((5 4,-14 0,1 0,5 4)),((1 6,13 0,10 12,1 6)))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((4 5,12 11,-12 -3,4 5))'), ST_GEOMFROMTEXT('MULTIPOLYGON(((5 4,-14 0,1 0,5 4)),((1 6,13 0,10 12,1 6)))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('POLYGON((4 5,12 11,-12 -3,4 5))'), st_geometryfromtext('MULTIPOLYGON(((5 4,-14 0,1 0,5 4)),((1 6,13 0,10 12,1 6)))'))) from dual END INPUT select 1 as a from t1 union all select 1 from dual limit 1; @@ -1160,13 +1160,13 @@ INPUT select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_overlaps(st_union(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_intersection(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(LINESTRING(3 1, 3 3), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(3 1, 3 3), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(LINESTRING(3 1, 3 3), LINESTRING(0 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT SELECT * FROM t1 UNION ALL SELECT * FROM t2 LIMIT 5; @@ -1196,7 +1196,7 @@ INPUT SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1), GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1), GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1), GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())))'))) as geom from dual END INPUT select 'a' union select concat('a', -4.5); @@ -1232,13 +1232,13 @@ INPUT select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_crosses(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), st_geometryfromtext('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual END INPUT SELECT * FROM t1 UNION SELECT * FROM t2 LIMIT 5 OFFSET 6; @@ -1268,7 +1268,7 @@ INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((5 0,0 10,10 10,5 0)), POLYGON((5 0,0 -10,10 -10,5 0)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((5 0,0 10,10 10,5 0)), POLYGON((5 0,0 -10,10 -10,5 0)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(POLYGON((5 0,0 10,10 10,5 0)), POLYGON((5 0,0 -10,10 -10,5 0)))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1; @@ -1286,7 +1286,7 @@ INPUT SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), ST_GEOMFROMTEXT('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))'))) as result; END OUTPUT -select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), ST_GEOMFROMTEXT('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))'))) as result from dual +select ST_ASTEXT(ST_UNION(st_geometryfromtext('MULTIPOLYGON(((-7 -9,-3 7,0 -10,-6 5,10 10,-3 -4,7 9,2 -9)),((1 -10,-3 10,-2 5)))'), st_geometryfromtext('POLYGON((6 10,-7 10,-1 -6,0 5,5 4,1 -9,1 3,-10 -7,-10 8))'))) as result from dual END INPUT (SELECT * FROM t1 LIMIT 5) UNION ALL (SELECT * FROM t2 LIMIT 4) ORDER BY a LIMIT 7; @@ -1340,25 +1340,25 @@ INPUT SELECT ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), polygon((0 0, 1 0, 1 1, 0 1, 0 0))))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), polygon((0 0, 1 0, 1 1, 0 1, 0 0))))'), ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(polygon((0 0,10 0, 10 10, 0 10, 0 0)), polygon((0 0, 1 0, 1 1, 0 1, 0 0))))'), st_geometryfromtext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(),GEOMETRYCOLLECTION())'))) as result from dual END INPUT select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); END OUTPUT -select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual +select st_astext(st_union(st_geometryfromtext('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), st_geometryfromtext('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual END INPUT select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); END OUTPUT -select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual +select st_within(st_intersection(st_geometryfromtext('point(1 1)'), st_geometryfromtext('multipoint(2 2, 3 3)')), st_union(st_geometryfromtext('point(0 0)'), st_geometryfromtext('point(1 1)'))) from dual END INPUT SELECT ST_AsText(ST_Union(ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(LINESTRING(3 0, 3 3), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result; END OUTPUT -select ST_AsText(ST_Union(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(3 0, 3 3), LINESTRING(0 1, 4 1))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'))) as result from dual +select ST_AsText(ST_Union(st_geometryfromtext('GEOMETRYCOLLECTION(LINESTRING(3 0, 3 3), LINESTRING(0 1, 4 1))'), st_geometryfromtext('GEOMETRYCOLLECTION()'))) as result from dual END INPUT (SELECT * FROM t1 ORDER BY a DESC LIMIT 5 OFFSET 4) UNION SELECT * FROM t2 ORDER BY a LIMIT 8 OFFSET 1; @@ -1388,7 +1388,7 @@ INPUT SELECT ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 0,10 10,20 0,0 0))'), ST_GEOMFROMTEXT('POLYGON((10 5,20 7,10 10,30 10,20 0,20 5,10 5))'))); END OUTPUT -select ST_ISVALID(ST_UNION(ST_GEOMFROMTEXT('POLYGON((0 0,10 10,20 0,0 0))'), ST_GEOMFROMTEXT('POLYGON((10 5,20 7,10 10,30 10,20 0,20 5,10 5))'))) from dual +select ST_ISVALID(ST_UNION(st_geometryfromtext('POLYGON((0 0,10 10,20 0,0 0))'), st_geometryfromtext('POLYGON((10 5,20 7,10 10,30 10,20 0,20 5,10 5))'))) from dual END INPUT select * from t1 union select * from t2 order by 1, 2; diff --git a/go/vt/sqlparser/tracked_buffer_test.go b/go/vt/sqlparser/tracked_buffer_test.go index d27d5ea69ed..af1de7c843e 100644 --- a/go/vt/sqlparser/tracked_buffer_test.go +++ b/go/vt/sqlparser/tracked_buffer_test.go @@ -248,6 +248,10 @@ func TestCanonicalOutput(t *testing.T) { "create table x(location geometry default (linestring(point(7.0, 3.0), point(7.0, 3.0))))", "CREATE TABLE `x` (\n\t`location` geometry DEFAULT (LINESTRING(POINT(7.0, 3.0), POINT(7.0, 3.0)))\n)", }, + { + "create table x(a geometry default (polygon(linestring(point(7.0, 3.0), point(7.0, 3.0)))))", + "CREATE TABLE `x` (\n\t`a` geometry DEFAULT (POLYGON(LINESTRING(POINT(7.0, 3.0), POINT(7.0, 3.0))))\n)", + }, { "alter vschema create vindex lookup_vdx using lookup with owner=user, table=name_user_idx, from=name, to=user_id", "ALTER VSCHEMA CREATE VINDEX `lookup_vdx` USING `lookup` WITH owner=user, table=name_user_idx, from=name, to=user_id", diff --git a/go/vt/srvtopo/status.go b/go/vt/srvtopo/status.go index 0ee6751cea4..350390c4c6c 100644 --- a/go/vt/srvtopo/status.go +++ b/go/vt/srvtopo/status.go @@ -37,7 +37,7 @@ const TopoTemplate = ` padding: 0.2rem; } -
HealthCheck Tablet Cache
+
@@ -57,7 +57,7 @@ const TopoTemplate = ` {{end}}
SrvKeyspace Names Cache

- +
diff --git a/go/vt/tableacl/tableacl.go b/go/vt/tableacl/tableacl.go index 4f83edf18e7..4ee46ae7739 100644 --- a/go/vt/tableacl/tableacl.go +++ b/go/vt/tableacl/tableacl.go @@ -113,7 +113,7 @@ func (tacl *tableACL) init(configFile string, aclCB func()) error { return err } config := &tableaclpb.Config{} - if err := proto.Unmarshal(data, config); err != nil { + if err := config.UnmarshalVT(data); err != nil { // try to parse tableacl as json file if jsonErr := json2.Unmarshal(data, config); jsonErr != nil { log.Infof("unable to parse tableACL config file as a protobuf or json file. protobuf err: %v json err: %v", err, jsonErr) diff --git a/go/vt/throttler/throttlerlogz.go b/go/vt/throttler/throttlerlogz.go index 6952b34feec..758fcdce65a 100644 --- a/go/vt/throttler/throttlerlogz.go +++ b/go/vt/throttler/throttlerlogz.go @@ -24,6 +24,8 @@ import ( "strings" "time" + "golang.org/x/exp/slices" + "vitess.io/vitess/go/vt/logz" ) @@ -109,8 +111,7 @@ func throttlerlogzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl parts := strings.SplitN(r.URL.Path, "/", 3) if len(parts) != 3 { - errMsg := fmt.Sprintf("invalid /throttlerlogz path: %q expected paths: /throttlerlogz/ or /throttlerlogz/", r.URL.Path) - http.Error(w, errMsg, http.StatusInternalServerError) + http.Error(w, "invalid /throttlerlogz path", http.StatusNotFound) return } @@ -121,6 +122,11 @@ func throttlerlogzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl return } + if !slices.Contains(m.Throttlers(), name) { + http.Error(w, "throttler not found", http.StatusNotFound) + return + } + showThrottlerLog(w, m, name) } diff --git a/go/vt/throttler/throttlerlogz_test.go b/go/vt/throttler/throttlerlogz_test.go index 82ebb77e7a1..6fdb137577c 100644 --- a/go/vt/throttler/throttlerlogz_test.go +++ b/go/vt/throttler/throttlerlogz_test.go @@ -41,7 +41,7 @@ func TestThrottlerlogzHandler_NonExistantThrottler(t *testing.T) { throttlerlogzHandler(response, request, newManager()) - if got, want := response.Body.String(), `throttler: t1 does not exist`; !strings.Contains(got, want) { + if got, want := response.Body.String(), `throttler not found`; !strings.Contains(got, want) { t.Fatalf("/throttlerlogz page for non-existent t1 should not succeed. got = %v, want = %v", got, want) } } diff --git a/go/vt/throttler/throttlerz.go b/go/vt/throttler/throttlerz.go index 44987dd7702..c63c2670c33 100644 --- a/go/vt/throttler/throttlerz.go +++ b/go/vt/throttler/throttlerz.go @@ -17,11 +17,12 @@ limitations under the License. package throttler import ( - "fmt" "html/template" "net/http" "strings" + "golang.org/x/exp/slices" + "vitess.io/vitess/go/vt/log" ) @@ -59,8 +60,7 @@ func throttlerzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl) { parts := strings.SplitN(r.URL.Path, "/", 3) if len(parts) != 3 { - errMsg := fmt.Sprintf("invalid /throttlerz path: %q expected paths: /throttlerz or /throttlerz/", r.URL.Path) - http.Error(w, errMsg, http.StatusInternalServerError) + http.Error(w, "invalid /throttlerz path", http.StatusNotFound) return } @@ -70,6 +70,11 @@ func throttlerzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl) { return } + if !slices.Contains(m.Throttlers(), name) { + http.Error(w, "throttler not found", http.StatusNotFound) + return + } + showThrottlerDetails(w, name) } diff --git a/go/vt/topo/cell_info.go b/go/vt/topo/cell_info.go index 2af867a8ffc..fd7a4a5249e 100644 --- a/go/vt/topo/cell_info.go +++ b/go/vt/topo/cell_info.go @@ -21,9 +21,7 @@ import ( "path" "strings" - "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" - + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/vterrors" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -74,7 +72,7 @@ func (ts *Server) GetCellInfo(ctx context.Context, cell string, strongRead bool) // Unpack the contents. ci := &topodatapb.CellInfo{} - if err := proto.Unmarshal(contents, ci); err != nil { + if err := ci.UnmarshalVT(contents); err != nil { return nil, err } return ci, nil @@ -83,7 +81,7 @@ func (ts *Server) GetCellInfo(ctx context.Context, cell string, strongRead bool) // CreateCellInfo creates a new CellInfo with the provided content. func (ts *Server) CreateCellInfo(ctx context.Context, cell string, ci *topodatapb.CellInfo) error { // Pack the content. - contents, err := proto.Marshal(ci) + contents, err := ci.MarshalVT() if err != nil { return err } @@ -108,7 +106,7 @@ func (ts *Server) UpdateCellInfoFields(ctx context.Context, cell string, update contents, version, err := ts.globalCell.Get(ctx, filePath) switch { case err == nil: - if err := proto.Unmarshal(contents, ci); err != nil { + if err := ci.UnmarshalVT(contents); err != nil { return err } case IsErrType(err, NoNode): @@ -126,7 +124,7 @@ func (ts *Server) UpdateCellInfoFields(ctx context.Context, cell string, update } // Pack and save. - contents, err = proto.Marshal(ci) + contents, err = ci.MarshalVT() if err != nil { return err } diff --git a/go/vt/topo/cells_aliases.go b/go/vt/topo/cells_aliases.go index ee47ec62604..683fa08f6ba 100644 --- a/go/vt/topo/cells_aliases.go +++ b/go/vt/topo/cells_aliases.go @@ -20,8 +20,6 @@ import ( "fmt" "path" - "google.golang.org/protobuf/proto" - "context" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -63,7 +61,7 @@ func (ts *Server) GetCellsAliases(ctx context.Context, strongRead bool) (ret map // Unpack the contents. cellsAlias := &topodatapb.CellsAlias{} - if err := proto.Unmarshal(contents, cellsAlias); err != nil { + if err := cellsAlias.UnmarshalVT(contents); err != nil { return nil, err } @@ -90,7 +88,7 @@ func (ts *Server) GetCellsAlias(ctx context.Context, name string, strongRead boo // Unpack the contents. cellsAlias := &topodatapb.CellsAlias{} - if err := proto.Unmarshal(contents, cellsAlias); err != nil { + if err := cellsAlias.UnmarshalVT(contents); err != nil { return nil, err } @@ -119,7 +117,7 @@ func (ts *Server) CreateCellsAlias(ctx context.Context, alias string, cellsAlias ts.clearCellAliasesCache() // Pack the content. - contents, err := proto.Marshal(cellsAlias) + contents, err := cellsAlias.MarshalVT() if err != nil { return err } @@ -142,7 +140,7 @@ func (ts *Server) UpdateCellsAlias(ctx context.Context, alias string, update fun contents, version, err := ts.globalCell.Get(ctx, filePath) switch { case err == nil: - if err := proto.Unmarshal(contents, cellsAlias); err != nil { + if err := cellsAlias.UnmarshalVT(contents); err != nil { return err } case IsErrType(err, NoNode): @@ -169,7 +167,7 @@ func (ts *Server) UpdateCellsAlias(ctx context.Context, alias string, update fun } // Pack and save. - contents, err = proto.Marshal(cellsAlias) + contents, err = cellsAlias.MarshalVT() if err != nil { return err } diff --git a/go/vt/topo/external_vitess_cluster.go b/go/vt/topo/external_vitess_cluster.go index 81633312f12..a7d0a69bf2c 100644 --- a/go/vt/topo/external_vitess_cluster.go +++ b/go/vt/topo/external_vitess_cluster.go @@ -20,8 +20,6 @@ import ( "context" "path" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/event" topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo/events" @@ -49,7 +47,7 @@ func GetExternalVitessClusterPath(clusterName string) string { // CreateExternalVitessCluster creates a topo record for the passed vitess cluster func (ts *Server) CreateExternalVitessCluster(ctx context.Context, clusterName string, value *topodatapb.ExternalVitessCluster) error { - data, err := proto.Marshal(value) + data, err := value.MarshalVT() if err != nil { return err } @@ -77,7 +75,7 @@ func (ts *Server) GetExternalVitessCluster(ctx context.Context, clusterName stri return nil, err } vc := &topodatapb.ExternalVitessCluster{} - if err = proto.Unmarshal(data, vc); err != nil { + if err = vc.UnmarshalVT(data); err != nil { return nil, vterrors.Wrap(err, "bad vitess cluster data") } @@ -91,7 +89,7 @@ func (ts *Server) GetExternalVitessCluster(ctx context.Context, clusterName stri // UpdateExternalVitessCluster updates the topo record for the named vitess cluster func (ts *Server) UpdateExternalVitessCluster(ctx context.Context, vc *ExternalVitessClusterInfo) error { //FIXME: check for cluster lock - data, err := proto.Marshal(vc.ExternalVitessCluster) + data, err := vc.ExternalVitessCluster.MarshalVT() if err != nil { return err } diff --git a/go/vt/topo/k8stopo/directory.go b/go/vt/topo/k8stopo/directory.go index bc53b56f8a0..abc18cf8bef 100644 --- a/go/vt/topo/k8stopo/directory.go +++ b/go/vt/topo/k8stopo/directory.go @@ -17,13 +17,11 @@ limitations under the License. package k8stopo import ( + "context" "path/filepath" "sort" "strings" - "context" - - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" vtv1beta1 "vitess.io/vitess/go/vt/topo/k8stopo/apis/topo/v1beta1" ) @@ -33,9 +31,6 @@ import ( // a slice of results sorted alphabetically to emulate the behavior of etcd, zk, consul, etc func (s *Server) ListDir(ctx context.Context, dirPath string, full bool) ([]topo.DirEntry, error) { dirPath = filepath.Join(s.root, dirPath) - - log.V(7).Infof("Listing dir at: '%s', full: %v", dirPath, full) - dirMap := map[string]topo.DirEntry{} if children, err := s.memberIndexer.ByIndex("by_parent", dirPath); err == nil { diff --git a/go/vt/topo/k8stopo/file.go b/go/vt/topo/k8stopo/file.go index bdc1cf42f13..0a186235cde 100644 --- a/go/vt/topo/k8stopo/file.go +++ b/go/vt/topo/k8stopo/file.go @@ -33,7 +33,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/retry" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" vtv1beta1 "vitess.io/vitess/go/vt/topo/k8stopo/apis/topo/v1beta1" ) @@ -136,8 +135,6 @@ func (s *Server) buildFileResource(filePath string, contents []byte) (*vtv1beta1 // Create is part of the topo.Conn interface. func (s *Server) Create(ctx context.Context, filePath string, contents []byte) (topo.Version, error) { - log.V(7).Infof("Create at '%s' Contents: '%s'", filePath, string(contents)) - resource, err := s.buildFileResource(filePath, contents) if err != nil { return nil, convertError(err, filePath) @@ -159,8 +156,6 @@ func (s *Server) Create(ctx context.Context, filePath string, contents []byte) ( // Update is part of the topo.Conn interface. func (s *Server) Update(ctx context.Context, filePath string, contents []byte, version topo.Version) (topo.Version, error) { - log.V(7).Infof("Update at '%s' Contents: '%s'", filePath, string(contents)) - resource, err := s.buildFileResource(filePath, contents) if err != nil { return nil, convertError(err, filePath) @@ -213,8 +208,6 @@ func (s *Server) Update(ctx context.Context, filePath string, contents []byte, v // Get is part of the topo.Conn interface. func (s *Server) Get(ctx context.Context, filePath string) ([]byte, topo.Version, error) { - log.V(7).Infof("Get at '%s'", filePath) - node := s.newNodeReference(filePath) result, err := s.resourceClient.Get(ctx, node.id, metav1.GetOptions{}) @@ -262,8 +255,6 @@ func (s *Server) List(ctx context.Context, filePathPrefix string) ([]topo.KVInfo // Delete is part of the topo.Conn interface. func (s *Server) Delete(ctx context.Context, filePath string, version topo.Version) error { - log.V(7).Infof("Delete at '%s'", filePath) - node := s.newNodeReference(filePath) // Check version before delete diff --git a/go/vt/topo/k8stopo/server.go b/go/vt/topo/k8stopo/server.go index b76410dd22c..2507ae254b1 100644 --- a/go/vt/topo/k8stopo/server.go +++ b/go/vt/topo/k8stopo/server.go @@ -183,7 +183,6 @@ func NewServer(_, root string) (*Server, error) { // respect the context flag if configContext != "" { configOverrides.CurrentContext = configContext - log.V(7).Info("Overriding Kubernetes config context with: ", configOverrides.CurrentContext) } configLoader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( @@ -206,7 +205,6 @@ func NewServer(_, root string) (*Server, error) { // respect the namespace flag if configNamespace != "" { namespace = configNamespace - log.V(7).Info("Overriding Kubernetes config namespace with: ", namespace) } // create the kubernetes client diff --git a/go/vt/topo/keyspace.go b/go/vt/topo/keyspace.go index 5a20c1d9ebd..fa41d423fd3 100755 --- a/go/vt/topo/keyspace.go +++ b/go/vt/topo/keyspace.go @@ -19,8 +19,6 @@ package topo import ( "path" - "google.golang.org/protobuf/proto" - "context" "vitess.io/vitess/go/vt/sidecardb" @@ -162,7 +160,7 @@ func (ki *KeyspaceInfo) ComputeCellServedFrom(cell string) []*topodatapb.SrvKeys // CreateKeyspace wraps the underlying Conn.Create // and dispatches the event. func (ts *Server) CreateKeyspace(ctx context.Context, keyspace string, value *topodatapb.Keyspace) error { - data, err := proto.Marshal(value) + data, err := value.MarshalVT() if err != nil { return err } @@ -189,7 +187,7 @@ func (ts *Server) GetKeyspace(ctx context.Context, keyspace string) (*KeyspaceIn } k := &topodatapb.Keyspace{} - if err = proto.Unmarshal(data, k); err != nil { + if err = k.UnmarshalVT(data); err != nil { return nil, vterrors.Wrap(err, "bad keyspace data") } @@ -240,7 +238,7 @@ func (ts *Server) UpdateKeyspace(ctx context.Context, ki *KeyspaceInfo) error { return err } - data, err := proto.Marshal(ki.Keyspace) + data, err := ki.Keyspace.MarshalVT() if err != nil { return err } diff --git a/go/vt/topo/replication.go b/go/vt/topo/replication.go index 7b452f30447..ace6b4445da 100644 --- a/go/vt/topo/replication.go +++ b/go/vt/topo/replication.go @@ -186,7 +186,7 @@ func (ts *Server) UpdateShardReplicationFields(ctx context.Context, cell, keyspa // Empty node, version is nil case err == nil: // Use any data we got. - if err = proto.Unmarshal(data, sr); err != nil { + if err = sr.UnmarshalVT(data); err != nil { return vterrors.Wrap(err, "bad ShardReplication data") } default: @@ -204,7 +204,7 @@ func (ts *Server) UpdateShardReplicationFields(ctx context.Context, cell, keyspa } // marshall and save - data, err = proto.Marshal(sr) + data, err = sr.MarshalVT() if err != nil { return err } @@ -243,7 +243,7 @@ func (ts *Server) GetShardReplication(ctx context.Context, cell, keyspace, shard } sr := &topodatapb.ShardReplication{} - if err = proto.Unmarshal(data, sr); err != nil { + if err = sr.UnmarshalVT(data); err != nil { return nil, vterrors.Wrap(err, "bad ShardReplication data") } diff --git a/go/vt/topo/shard.go b/go/vt/topo/shard.go index c2af6c08069..c6aca7b67c1 100644 --- a/go/vt/topo/shard.go +++ b/go/vt/topo/shard.go @@ -210,7 +210,7 @@ func (ts *Server) GetShard(ctx context.Context, keyspace, shard string) (*ShardI } value := &topodatapb.Shard{} - if err = proto.Unmarshal(data, value); err != nil { + if err = value.UnmarshalVT(data); err != nil { return nil, vterrors.Wrapf(err, "GetShard(%v,%v): bad shard data", keyspace, shard) } return &ShardInfo{ @@ -229,7 +229,7 @@ func (ts *Server) updateShard(ctx context.Context, si *ShardInfo) error { span.Annotate("shard", si.shardName) defer span.Finish() - data, err := proto.Marshal(si.Shard) + data, err := si.Shard.MarshalVT() if err != nil { return err } @@ -305,14 +305,14 @@ func (ts *Server) CreateShard(ctx context.Context, keyspace, shard string) (err return err } for _, si := range sis { - if si.KeyRange == nil || key.KeyRangesIntersect(si.KeyRange, keyRange) { + if si.KeyRange == nil || key.KeyRangeIntersect(si.KeyRange, keyRange) { value.IsPrimaryServing = false break } } // Marshal and save. - data, err := proto.Marshal(value) + data, err := value.MarshalVT() if err != nil { return err } @@ -676,7 +676,7 @@ func (ts *Server) WatchShard(ctx context.Context, keyspace, shard string) (*Watc return nil, nil, err } value := &topodatapb.Shard{} - if err := proto.Unmarshal(current.Contents, value); err != nil { + if err := value.UnmarshalVT(current.Contents); err != nil { // Cancel the watch, drain channel. cancel() for range wdChannel { @@ -704,7 +704,7 @@ func (ts *Server) WatchShard(ctx context.Context, keyspace, shard string) (*Watc } value := &topodatapb.Shard{} - if err := proto.Unmarshal(wd.Contents, value); err != nil { + if err := value.UnmarshalVT(wd.Contents); err != nil { cancel() for range wdChannel { } diff --git a/go/vt/topo/srv_keyspace.go b/go/vt/topo/srv_keyspace.go index e431ce55c40..8054764eeff 100644 --- a/go/vt/topo/srv_keyspace.go +++ b/go/vt/topo/srv_keyspace.go @@ -23,8 +23,6 @@ import ( "path" "sync" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/concurrency" @@ -64,7 +62,7 @@ func (ts *Server) WatchSrvKeyspace(ctx context.Context, cell, keyspace string) ( return nil, nil, err } value := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(current.Contents, value); err != nil { + if err := value.UnmarshalVT(current.Contents); err != nil { // Cancel the watch, drain channel. cancel() for range wdChannel { @@ -93,7 +91,7 @@ func (ts *Server) WatchSrvKeyspace(ctx context.Context, cell, keyspace string) ( } value := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, value); err != nil { + if err := value.UnmarshalVT(wd.Contents); err != nil { cancel() for range wdChannel { } @@ -637,7 +635,7 @@ func (ts *Server) UpdateSrvKeyspace(ctx context.Context, cell, keyspace string, } nodePath := srvKeyspaceFileName(keyspace) - data, err := proto.Marshal(srvKeyspace) + data, err := srvKeyspace.MarshalVT() if err != nil { return err } @@ -691,7 +689,7 @@ func (ts *Server) GetSrvKeyspace(ctx context.Context, cell, keyspace string) (*t return nil, err } srvKeyspace := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(data, srvKeyspace); err != nil { + if err := srvKeyspace.UnmarshalVT(data); err != nil { return nil, vterrors.Wrapf(err, "SrvKeyspace unmarshal failed: %v", data) } return srvKeyspace, nil diff --git a/go/vt/topo/srv_vschema.go b/go/vt/topo/srv_vschema.go index 204b2696370..453e8c5f8d0 100644 --- a/go/vt/topo/srv_vschema.go +++ b/go/vt/topo/srv_vschema.go @@ -21,8 +21,6 @@ import ( "fmt" "sync" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vterrors" @@ -54,7 +52,7 @@ func (ts *Server) WatchSrvVSchema(ctx context.Context, cell string) (*WatchSrvVS return nil, nil, err } value := &vschemapb.SrvVSchema{} - if err := proto.Unmarshal(current.Contents, value); err != nil { + if err := value.UnmarshalVT(current.Contents); err != nil { // Cancel the watch, drain channel. cancel() for range wdChannel { @@ -83,7 +81,7 @@ func (ts *Server) WatchSrvVSchema(ctx context.Context, cell string) (*WatchSrvVS } value := &vschemapb.SrvVSchema{} - if err := proto.Unmarshal(wd.Contents, value); err != nil { + if err := value.UnmarshalVT(wd.Contents); err != nil { cancel() for range wdChannel { } @@ -105,7 +103,7 @@ func (ts *Server) UpdateSrvVSchema(ctx context.Context, cell string, srvVSchema } nodePath := SrvVSchemaFile - data, err := proto.Marshal(srvVSchema) + data, err := srvVSchema.MarshalVT() if err != nil { return err } @@ -126,7 +124,7 @@ func (ts *Server) GetSrvVSchema(ctx context.Context, cell string) (*vschemapb.Sr return nil, err } srvVSchema := &vschemapb.SrvVSchema{} - if err := proto.Unmarshal(data, srvVSchema); err != nil { + if err := srvVSchema.UnmarshalVT(data); err != nil { return nil, vterrors.Wrapf(err, "SrvVSchema unmarshal failed: %v", data) } return srvVSchema, nil diff --git a/go/vt/topo/tablet.go b/go/vt/topo/tablet.go index 77c174aeff2..339df24c8d4 100644 --- a/go/vt/topo/tablet.go +++ b/go/vt/topo/tablet.go @@ -245,7 +245,7 @@ func (ts *Server) GetTablet(ctx context.Context, alias *topodatapb.TabletAlias) return nil, err } tablet := &topodatapb.Tablet{} - if err := proto.Unmarshal(data, tablet); err != nil { + if err := tablet.UnmarshalVT(data); err != nil { return nil, err } @@ -310,7 +310,7 @@ func (ts *Server) GetTabletsByCell(ctx context.Context, cellAlias string) ([]*Ta tablets := make([]*TabletInfo, len(listResults)) for n := range listResults { tablet := &topodatapb.Tablet{} - if err := proto.Unmarshal(listResults[n].Value, tablet); err != nil { + if err := tablet.UnmarshalVT(listResults[n].Value); err != nil { return nil, err } tablets[n] = &TabletInfo{Tablet: tablet, version: listResults[n].Version} @@ -363,7 +363,7 @@ func (ts *Server) UpdateTablet(ctx context.Context, ti *TabletInfo) error { span.Annotate("tablet", topoproto.TabletAliasString(ti.Alias)) defer span.Finish() - data, err := proto.Marshal(ti.Tablet) + data, err := ti.Tablet.MarshalVT() if err != nil { return err } @@ -441,7 +441,7 @@ func (ts *Server) CreateTablet(ctx context.Context, tablet *topodatapb.Tablet) e return err } - data, err := proto.Marshal(tablet) + data, err := tablet.MarshalVT() if err != nil { return err } diff --git a/go/vt/topo/test/watch.go b/go/vt/topo/test/watch.go index 24e831718d1..08dec8cd56f 100644 --- a/go/vt/topo/test/watch.go +++ b/go/vt/topo/test/watch.go @@ -57,7 +57,7 @@ func waitForInitialValue(t *testing.T, conn topo.Conn, srvKeyspace *topodatapb.S break } got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(current.Contents, got); err != nil { + if err := got.UnmarshalVT(current.Contents); err != nil { cancel() t.Fatalf("cannot proto-unmarshal data: %v", err) } @@ -100,7 +100,7 @@ func waitForInitialValueRecursive(t *testing.T, conn topo.Conn, srvKeyspace *top break } got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(current[0].Contents, got); err != nil { + if err := got.UnmarshalVT(current[0].Contents); err != nil { cancel() t.Fatalf("cannot proto-unmarshal data: %v", err) } @@ -173,7 +173,7 @@ func checkWatch(t *testing.T, ts *topo.Server) { t.Fatalf("watch interrupted: %v", wd.Err) } got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } @@ -210,7 +210,7 @@ func checkWatch(t *testing.T, ts *topo.Server) { } // we got something, better be the right value got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } if got.Partitions[0].ShardReferences[0].Name == "new_name" { @@ -278,7 +278,7 @@ func checkWatchInterrupt(t *testing.T, ts *topo.Server) { } // we got something, better be the right value got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } if got.Partitions[0].ShardReferences[0].Name == "name" { @@ -356,7 +356,7 @@ func checkWatchRecursive(t *testing.T, ts *topo.Server) { t.Fatalf("watch interrupted: %v", wd.Err) } got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } @@ -394,7 +394,7 @@ func checkWatchRecursive(t *testing.T, ts *topo.Server) { } // we got something, better be the right value got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } if got.Partitions[0].ShardReferences[0].Name == "new_name" { @@ -424,7 +424,7 @@ func checkWatchRecursive(t *testing.T, ts *topo.Server) { } // we got something, better be the right value got := &topodatapb.SrvKeyspace{} - if err := proto.Unmarshal(wd.Contents, got); err != nil { + if err := got.UnmarshalVT(wd.Contents); err != nil { t.Fatalf("cannot proto-unmarshal data: %v", err) } if got.Partitions[0].ShardReferences[0].Name == "name" { diff --git a/go/vt/topo/topoproto/srvkeyspace.go b/go/vt/topo/topoproto/srvkeyspace.go index 24618233fb2..88cfe4b9986 100644 --- a/go/vt/topo/topoproto/srvkeyspace.go +++ b/go/vt/topo/topoproto/srvkeyspace.go @@ -17,9 +17,10 @@ limitations under the License. package topoproto import ( - "bytes" "sort" + "vitess.io/vitess/go/vt/key" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -29,18 +30,12 @@ type ShardReferenceArray []*topodatapb.ShardReference // Len implements sort.Interface func (sra ShardReferenceArray) Len() int { return len(sra) } -// Len implements sort.Interface +// Less implements sort.Interface func (sra ShardReferenceArray) Less(i, j int) bool { - if sra[i].KeyRange == nil || len(sra[i].KeyRange.Start) == 0 { - return true - } - if sra[j].KeyRange == nil || len(sra[j].KeyRange.Start) == 0 { - return false - } - return bytes.Compare(sra[i].KeyRange.Start, sra[j].KeyRange.Start) < 0 + return key.KeyRangeLess(sra[i].KeyRange, sra[j].KeyRange) } -// Len implements sort.Interface +// Swap implements sort.Interface func (sra ShardReferenceArray) Swap(i, j int) { sra[i], sra[j] = sra[j], sra[i] } diff --git a/go/vt/topo/topoproto/tablet.go b/go/vt/topo/topoproto/tablet.go index 395f8f0fa47..117ccc41af0 100644 --- a/go/vt/topo/topoproto/tablet.go +++ b/go/vt/topo/topoproto/tablet.go @@ -28,9 +28,8 @@ import ( "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" - "vitess.io/vitess/go/netutil" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/vterrors" topodatapb "vitess.io/vitess/go/vt/proto/topodata" diff --git a/go/vt/topo/topotests/shard_watch_test.go b/go/vt/topo/topotests/shard_watch_test.go index 89be0064f31..a8333251a2d 100644 --- a/go/vt/topo/topotests/shard_watch_test.go +++ b/go/vt/topo/topotests/shard_watch_test.go @@ -151,7 +151,7 @@ func TestWatchShard(t *testing.T) { t.Fatalf("expected an initial error setting watch on bad content, but got: %v", err) } - data, err := proto.Marshal(wanted) + data, err := wanted.MarshalVT() if err != nil { t.Fatalf("error marshalling proto data: %v", err) } diff --git a/go/vt/topo/vschema.go b/go/vt/topo/vschema.go index 85f763fc7bf..a2503673deb 100644 --- a/go/vt/topo/vschema.go +++ b/go/vt/topo/vschema.go @@ -39,7 +39,7 @@ func (ts *Server) SaveVSchema(ctx context.Context, keyspace string, vschema *vsc } nodePath := path.Join(KeyspacesPath, keyspace, VSchemaFile) - data, err := proto.Marshal(vschema) + data, err := vschema.MarshalVT() if err != nil { return err } @@ -97,7 +97,7 @@ func (ts *Server) EnsureVSchema(ctx context.Context, keyspace string) error { // SaveRoutingRules saves the routing rules into the topo. func (ts *Server) SaveRoutingRules(ctx context.Context, routingRules *vschemapb.RoutingRules) error { - data, err := proto.Marshal(routingRules) + data, err := routingRules.MarshalVT() if err != nil { return err } @@ -124,7 +124,7 @@ func (ts *Server) GetRoutingRules(ctx context.Context) (*vschemapb.RoutingRules, } return nil, err } - err = proto.Unmarshal(data, rr) + err = rr.UnmarshalVT(data) if err != nil { return nil, vterrors.Wrapf(err, "bad routing rules data: %q", data) } @@ -133,7 +133,7 @@ func (ts *Server) GetRoutingRules(ctx context.Context) (*vschemapb.RoutingRules, // SaveShardRoutingRules saves the shard routing rules into the topo. func (ts *Server) SaveShardRoutingRules(ctx context.Context, shardRoutingRules *vschemapb.ShardRoutingRules) error { - data, err := proto.Marshal(shardRoutingRules) + data, err := shardRoutingRules.MarshalVT() if err != nil { return err } @@ -159,7 +159,7 @@ func (ts *Server) GetShardRoutingRules(ctx context.Context) (*vschemapb.ShardRou } return nil, err } - err = proto.Unmarshal(data, srr) + err = srr.UnmarshalVT(data) if err != nil { return nil, vterrors.Wrapf(err, "invalid shard routing rules: %q", data) } diff --git a/go/vt/topo/workflow.go b/go/vt/topo/workflow.go index 24b40aabe1e..54d4ecbbea1 100644 --- a/go/vt/topo/workflow.go +++ b/go/vt/topo/workflow.go @@ -21,8 +21,6 @@ import ( "context" - "google.golang.org/protobuf/proto" - workflowpb "vitess.io/vitess/go/vt/proto/workflow" ) @@ -62,7 +60,7 @@ func (ts *Server) GetWorkflowNames(ctx context.Context) ([]string, error) { // WorkflowInfo. func (ts *Server) CreateWorkflow(ctx context.Context, w *workflowpb.Workflow) (*WorkflowInfo, error) { // Pack the content. - contents, err := proto.Marshal(w) + contents, err := w.MarshalVT() if err != nil { return nil, err } @@ -90,7 +88,7 @@ func (ts *Server) GetWorkflow(ctx context.Context, uuid string) (*WorkflowInfo, // Unpack the contents. w := &workflowpb.Workflow{} - if err := proto.Unmarshal(contents, w); err != nil { + if err := w.UnmarshalVT(contents); err != nil { return nil, err } @@ -104,7 +102,7 @@ func (ts *Server) GetWorkflow(ctx context.Context, uuid string) (*WorkflowInfo, // good any more, ErrBadVersion is returned. func (ts *Server) SaveWorkflow(ctx context.Context, wi *WorkflowInfo) error { // Pack the content. - contents, err := proto.Marshal(wi.Workflow) + contents, err := wi.Workflow.MarshalVT() if err != nil { return err } diff --git a/go/vt/topotools/split.go b/go/vt/topotools/split.go index 00cfd49cdae..ace3dda94a7 100644 --- a/go/vt/topotools/split.go +++ b/go/vt/topotools/split.go @@ -222,7 +222,7 @@ func findOverlappingShards(shardMap map[string]*topo.ShardInfo) ([]*OverlappingS func findIntersectingShard(shardMap map[string]*topo.ShardInfo, sourceArray []*topo.ShardInfo) *topo.ShardInfo { for name, si := range shardMap { for _, sourceShardInfo := range sourceArray { - if si.KeyRange == nil || sourceShardInfo.KeyRange == nil || key.KeyRangesIntersect(si.KeyRange, sourceShardInfo.KeyRange) { + if si.KeyRange == nil || sourceShardInfo.KeyRange == nil || key.KeyRangeIntersect(si.KeyRange, sourceShardInfo.KeyRange) { delete(shardMap, name) return si } @@ -235,7 +235,7 @@ func findIntersectingShard(shardMap map[string]*topo.ShardInfo, sourceArray []*t // in the destination array func intersect(si *topo.ShardInfo, allShards []*topo.ShardInfo) bool { for _, shard := range allShards { - if key.KeyRangesIntersect(si.KeyRange, shard.KeyRange) { + if key.KeyRangeIntersect(si.KeyRange, shard.KeyRange) { return true } } diff --git a/go/vt/topotools/split_test.go b/go/vt/topotools/split_test.go index 0ba13a3524d..003dc767317 100644 --- a/go/vt/topotools/split_test.go +++ b/go/vt/topotools/split_test.go @@ -129,6 +129,10 @@ func TestValidateForReshard(t *testing.T) { sources: []string{"0"}, targets: []string{"-40", "40-"}, out: "", + }, { + sources: []string{"0003-"}, + targets: []string{"000300-000380", "000380-000400", "0004-"}, + out: "", }, { sources: []string{"-40", "40-80", "80-"}, targets: []string{"-40", "40-"}, diff --git a/go/vt/topotools/tablet.go b/go/vt/topotools/tablet.go index af6f4b3c3c6..ef458ae7cd3 100644 --- a/go/vt/topotools/tablet.go +++ b/go/vt/topotools/tablet.go @@ -218,7 +218,6 @@ func DeleteTablet(ctx context.Context, ts *topo.Server, tablet *topodatapb.Table // try to remove replication data, no fatal if we fail if err := topo.DeleteTabletReplicationData(ctx, ts, tablet); err != nil { if topo.IsErrType(err, topo.NoNode) { - log.V(6).Infof("no ShardReplication object for cell %v", tablet.Alias.Cell) err = nil } if err != nil { diff --git a/go/vt/topotools/vschema_ddl.go b/go/vt/topotools/vschema_ddl.go index 30cce3bd5db..e8da2734b4f 100644 --- a/go/vt/topotools/vschema_ddl.go +++ b/go/vt/topotools/vschema_ddl.go @@ -17,7 +17,6 @@ limitations under the License. package topotools import ( - "fmt" "reflect" "vitess.io/vitess/go/vt/sqlparser" @@ -226,15 +225,9 @@ func ApplyVSchemaDDL(ksName string, ks *vschemapb.Keyspace, alterVschema *sqlpar return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "vschema already contains auto inc %v on table %s in keyspace %s", table.AutoIncrement, name, ksName) } - sequence := alterVschema.AutoIncSpec.Sequence - sequenceFqn := sequence.Name.String() - if sequence.Qualifier.String() != "" { - sequenceFqn = fmt.Sprintf("%s.%s", sequence.Qualifier.String(), sequenceFqn) - } - table.AutoIncrement = &vschemapb.AutoIncrement{ Column: alterVschema.AutoIncSpec.Column.String(), - Sequence: sequenceFqn, + Sequence: sqlparser.String(alterVschema.AutoIncSpec.Sequence), } return ks, nil diff --git a/go/vt/vitessdriver/driver.go b/go/vt/vitessdriver/driver.go index b525084493c..638e31523f3 100644 --- a/go/vt/vitessdriver/driver.go +++ b/go/vt/vitessdriver/driver.go @@ -26,7 +26,6 @@ import ( "fmt" "google.golang.org/grpc" - "google.golang.org/protobuf/proto" "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" @@ -89,7 +88,7 @@ func OpenWithConfiguration(c Configuration) (*sql.DB, error) { } if len(c.GRPCDialOptions) != 0 { - vtgateconn.RegisterDialer(c.Protocol, grpcvtgateconn.DialWithOpts(context.TODO(), c.GRPCDialOptions...)) + vtgateconn.RegisterDialer(c.Protocol, grpcvtgateconn.Dial(c.GRPCDialOptions...)) } return sql.Open(c.DriverName, json) @@ -354,7 +353,7 @@ func newSessionTokenRow(session *vtgatepb.Session, c *converter) (driver.Rows, e } func sessionToSessionToken(session *vtgatepb.Session) (string, error) { - b, err := proto.Marshal(session) + b, err := session.MarshalVT() if err != nil { return "", err } @@ -369,7 +368,7 @@ func sessionTokenToSession(sessionToken string) (*vtgatepb.Session, error) { } session := &vtgatepb.Session{} - err = proto.Unmarshal(b, session) + err = session.UnmarshalVT(b) if err != nil { return nil, err } diff --git a/go/vt/vtadmin/api.go b/go/vt/vtadmin/api.go index 59360cde337..84453b8b72d 100644 --- a/go/vt/vtadmin/api.go +++ b/go/vt/vtadmin/api.go @@ -31,8 +31,8 @@ import ( "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/patrickmn/go-cache" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" @@ -73,6 +73,10 @@ type API struct { authz *rbac.Authorizer options Options + + // vtexplain is now global again due to stat exporters in the tablet layer + // we're not super concerned because we will be deleting vtexplain Soon(TM). + vtexplainLock sync.Mutex } // Options wraps the configuration options for different components of the @@ -1943,6 +1947,16 @@ func (api *API) VTExplain(ctx context.Context, req *vtadminpb.VTExplainRequest) return nil, nil } + lockWaitStart := time.Now() + + api.vtexplainLock.Lock() + defer api.vtexplainLock.Unlock() + + lockWaitTime := time.Since(lockWaitStart) + log.Infof("vtexplain lock wait time: %s", lockWaitTime) + + span.Annotate("vtexplain_lock_wait_time", lockWaitTime.String()) + tablet, err := c.FindTablet(ctx, func(t *vtadminpb.Tablet) bool { return t.Tablet.Keyspace == req.Keyspace && topo.IsInServingGraph(t.Tablet.Type) && t.Tablet.Type != topodatapb.TabletType_PRIMARY && t.State == vtadminpb.Tablet_SERVING }) diff --git a/go/vt/vtadmin/api_authz_test.go b/go/vt/vtadmin/api_authz_test.go index 45d3e443c6e..eb67757a1c1 100644 --- a/go/vt/vtadmin/api_authz_test.go +++ b/go/vt/vtadmin/api_authz_test.go @@ -2939,16 +2939,16 @@ func TestVTExplain(t *testing.T) { err := opts.RBAC.Reify() require.NoError(t, err, "failed to reify authorization rules: %+v", opts.RBAC.Rules) - api := vtadmin.NewAPI(testClusters(t), opts) - t.Cleanup(func() { - if err := api.Close(); err != nil { - t.Logf("api did not close cleanly: %s", err.Error()) - } - }) - t.Run("unauthorized actor", func(t *testing.T) { t.Parallel() + api := vtadmin.NewAPI(testClusters(t), opts) + t.Cleanup(func() { + if err := api.Close(); err != nil { + t.Logf("api did not close cleanly: %s", err.Error()) + } + }) + actor := &rbac.Actor{Name: "other"} ctx := context.Background() if actor != nil { @@ -2966,6 +2966,13 @@ func TestVTExplain(t *testing.T) { t.Run("authorized actor", func(t *testing.T) { t.Parallel() + api := vtadmin.NewAPI(testClusters(t), opts) + t.Cleanup(func() { + if err := api.Close(); err != nil { + t.Logf("api did not close cleanly: %s", err.Error()) + } + }) + actor := &rbac.Actor{Name: "allowed"} ctx := context.Background() if actor != nil { diff --git a/go/vt/vtadmin/api_test.go b/go/vt/vtadmin/api_test.go index b707f2036aa..50f76fc7805 100644 --- a/go/vt/vtadmin/api_test.go +++ b/go/vt/vtadmin/api_test.go @@ -4601,8 +4601,6 @@ func TestGetWorkflows(t *testing.T) { } func TestVTExplain(t *testing.T) { - t.Parallel() - tests := []struct { name string keyspaces []*vtctldatapb.Keyspace @@ -4826,8 +4824,6 @@ func TestVTExplain(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { - t.Parallel() - toposerver := memorytopo.NewServer("c0_cell1") tmc := testutil.TabletManagerClient{ diff --git a/go/vt/vtadmin/cluster/cluster.go b/go/vt/vtadmin/cluster/cluster.go index 068416ee359..a9246832060 100644 --- a/go/vt/vtadmin/cluster/cluster.go +++ b/go/vt/vtadmin/cluster/cluster.go @@ -31,10 +31,10 @@ import ( "time" "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/pools" "vitess.io/vitess/go/protoutil" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/textutil" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/concurrency" @@ -2131,7 +2131,7 @@ func (c *Cluster) reloadShardSchemas(ctx context.Context, req *vtadminpb.ReloadS ) for ks, shards := range shardSets { - for _, shard := range shards.UnsortedList() { + for _, shard := range sets.List(shards) { wg.Add(1) go func(keyspace, shard string) { defer wg.Done() diff --git a/go/vt/vtadmin/cluster/cluster_internal_test.go b/go/vt/vtadmin/cluster/cluster_internal_test.go index 66901b06682..696d7783d15 100644 --- a/go/vt/vtadmin/cluster/cluster_internal_test.go +++ b/go/vt/vtadmin/cluster/cluster_internal_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/pools" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/test/utils" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" diff --git a/go/vt/vtadmin/cluster/cluster_test.go b/go/vt/vtadmin/cluster/cluster_test.go index e2317d8ab4b..202937bb95f 100644 --- a/go/vt/vtadmin/cluster/cluster_test.go +++ b/go/vt/vtadmin/cluster/cluster_test.go @@ -28,10 +28,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/protoutil" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/test/utils" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vtadmin/cluster" diff --git a/go/vt/vtadmin/cluster/config.go b/go/vt/vtadmin/cluster/config.go index 7cda15e8386..9fb03f6a2c4 100644 --- a/go/vt/vtadmin/cluster/config.go +++ b/go/vt/vtadmin/cluster/config.go @@ -346,16 +346,14 @@ func parseCacheConfigFlag(cfg *cache.Config, name, val string) (err error) { case "backfill-request-duplicate-interval": cfg.BackfillRequestDuplicateInterval, err = time.ParseDuration(val) case "backfill-queue-size": - size, err := strconv.ParseInt(val, 10, 64) + cfg.BackfillQueueSize, err = strconv.Atoi(val) if err != nil { return err } - if size < 0 { - return fmt.Errorf("%w: backfill queue size must be non-negative; got %d", strconv.ErrRange, size) + if cfg.BackfillQueueSize < 0 { + return fmt.Errorf("%w: backfill queue size must be non-negative; got %d", strconv.ErrRange, cfg.BackfillQueueSize) } - - cfg.BackfillQueueSize = int(size) case "backfill-enqueue-wait-time": cfg.BackfillEnqueueWaitTime, err = time.ParseDuration(val) default: @@ -443,16 +441,14 @@ func (cfg *RPCPoolConfig) merge(override *RPCPoolConfig) *RPCPoolConfig { func (cfg *RPCPoolConfig) parseFlag(name string, val string) (err error) { switch name { case "size": - size, err := strconv.ParseInt(val, 10, 64) + cfg.Size, err = strconv.Atoi(val) if err != nil { return err } - if size < 0 { - return fmt.Errorf("%w: pool size must be non-negative; got %d", strconv.ErrRange, size) + if cfg.Size < 0 { + return fmt.Errorf("%w: pool size must be non-negative; got %d", strconv.ErrRange, cfg.Size) } - - cfg.Size = int(size) case "timeout": cfg.WaitTimeout, err = time.ParseDuration(val) if err != nil { diff --git a/go/vt/vtadmin/http/shards.go b/go/vt/vtadmin/http/shards.go index 79a5f9fdb7d..b8b83335f99 100644 --- a/go/vt/vtadmin/http/shards.go +++ b/go/vt/vtadmin/http/shards.go @@ -22,8 +22,8 @@ import ( "fmt" "github.com/gorilla/mux" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vtadmin/errors" diff --git a/go/vt/vtadmin/rbac/config.go b/go/vt/vtadmin/rbac/config.go index f3c3cfd847b..19179f0fa29 100644 --- a/go/vt/vtadmin/rbac/config.go +++ b/go/vt/vtadmin/rbac/config.go @@ -21,8 +21,8 @@ import ( "strings" "github.com/spf13/viper" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" ) diff --git a/go/vt/vtadmin/rbac/rule.go b/go/vt/vtadmin/rbac/rule.go index c10890f5747..8067eb21849 100644 --- a/go/vt/vtadmin/rbac/rule.go +++ b/go/vt/vtadmin/rbac/rule.go @@ -19,7 +19,7 @@ package rbac import ( "fmt" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" ) // Rule is a single rule governing access to a particular resource. diff --git a/go/vt/vtadmin/testutil/authztestgen/config.json b/go/vt/vtadmin/testutil/authztestgen/config.json index ac89d7f5557..01b0da66465 100644 --- a/go/vt/vtadmin/testutil/authztestgen/config.json +++ b/go/vt/vtadmin/testutil/authztestgen/config.json @@ -1736,6 +1736,7 @@ } ], "request": "&vtadminpb.VTExplainRequest{\nCluster: \"test\",\nKeyspace: \"test\",\nSql: \"select id from t1;\",}", + "serialize_cases": true, "cases": [ { "name": "unauthorized actor", diff --git a/go/vt/vtadmin/vtctldclient/fakevtctldclient/vtctldclient.go b/go/vt/vtadmin/vtctldclient/fakevtctldclient/vtctldclient.go index cf0d7b3f72b..e2701a1f594 100644 --- a/go/vt/vtadmin/vtctldclient/fakevtctldclient/vtctldclient.go +++ b/go/vt/vtadmin/vtctldclient/fakevtctldclient/vtctldclient.go @@ -139,6 +139,10 @@ type VtctldClient struct { Response *vtctldatapb.ValidateVersionKeyspaceResponse Error error } + WorkflowUpdateResults map[string]struct { + Response *vtctldatapb.WorkflowUpdateResponse + Error error + } } // Compile-time type assertion to make sure we haven't overriden a method @@ -671,3 +675,16 @@ func (fake *VtctldClient) ValidateVersionKeyspace(ctx context.Context, req *vtct return nil, fmt.Errorf("%w: no result set for %s", assert.AnError, key) } + +// WorkflowUpdate is part of the vtctldclient.VtctldClient interface. +func (fake *VtctldClient) WorkflowUpdate(ctx context.Context, req *vtctldatapb.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowUpdateResponse, error) { + if fake.WorkflowUpdateResults == nil { + return nil, fmt.Errorf("%w: WorkflowUpdateResults not set on fake vtctldclient", assert.AnError) + } + + if result, ok := fake.WorkflowUpdateResults[req.Keyspace]; ok { + return result.Response, result.Error + } + + return nil, fmt.Errorf("%w: no result set for keyspace %s", assert.AnError, req.Keyspace) +} diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 33548e1e1d3..4c70a5230db 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -861,18 +861,18 @@ func (itmc *internalTabletManagerClient) WaitForPosition(context.Context, *topod return fmt.Errorf("not implemented in vtcombo") } -func (itmc *internalTabletManagerClient) VExec(context.Context, *topodatapb.Tablet, string, string, string) (*querypb.QueryResult, error) { - return nil, fmt.Errorf("not implemented in vtcombo") -} - func (itmc *internalTabletManagerClient) VReplicationExec(context.Context, *topodatapb.Tablet, string) (*querypb.QueryResult, error) { return nil, fmt.Errorf("not implemented in vtcombo") } -func (itmc *internalTabletManagerClient) VReplicationWaitForPos(context.Context, *topodatapb.Tablet, int, string) error { +func (itmc *internalTabletManagerClient) VReplicationWaitForPos(context.Context, *topodatapb.Tablet, int32, string) error { return fmt.Errorf("not implemented in vtcombo") } +func (itmc *internalTabletManagerClient) UpdateVRWorkflow(context.Context, *topodatapb.Tablet, *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) { + return nil, fmt.Errorf("not implemented in vtcombo") +} + func (itmc *internalTabletManagerClient) ResetReplication(context.Context, *topodatapb.Tablet) error { return fmt.Errorf("not implemented in vtcombo") } diff --git a/go/vt/vtctl/grpcvtctldclient/client_gen.go b/go/vt/vtctl/grpcvtctldclient/client_gen.go index 97889c8a87d..91e01f10977 100644 --- a/go/vt/vtctl/grpcvtctldclient/client_gen.go +++ b/go/vt/vtctl/grpcvtctldclient/client_gen.go @@ -884,3 +884,12 @@ func (client *gRPCVtctldClient) ValidateVersionShard(ctx context.Context, in *vt return client.c.ValidateVersionShard(ctx, in, opts...) } + +// WorkflowUpdate is part of the vtctlservicepb.VtctldClient interface. +func (client *gRPCVtctldClient) WorkflowUpdate(ctx context.Context, in *vtctldatapb.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowUpdateResponse, error) { + if client.c == nil { + return nil, status.Error(codes.Unavailable, connClosedMsg) + } + + return client.c.WorkflowUpdate(ctx, in, opts...) +} diff --git a/go/vt/vtctl/grpcvtctldserver/endtoend/init_shard_primary_test.go b/go/vt/vtctl/grpcvtctldserver/endtoend/init_shard_primary_test.go index e100bad310b..c1e5899aac6 100644 --- a/go/vt/vtctl/grpcvtctldserver/endtoend/init_shard_primary_test.go +++ b/go/vt/vtctl/grpcvtctldserver/endtoend/init_shard_primary_test.go @@ -60,6 +60,7 @@ func TestInitShardPrimary(t *testing.T) { tablet2.FakeMysqlDaemon.ExpectedExecuteSuperQueryList = []string{ // These come from tablet startup + "STOP SLAVE", "RESET SLAVE ALL", "FAKE SET MASTER", "START SLAVE", @@ -73,6 +74,7 @@ func TestInitShardPrimary(t *testing.T) { tablet2.FakeMysqlDaemon.SetReplicationSourceInputs = append(tablet2.FakeMysqlDaemon.SetReplicationSourceInputs, fmt.Sprintf("%v:%v", tablet1.Tablet.Hostname, tablet1.Tablet.MysqlPort)) tablet3.FakeMysqlDaemon.ExpectedExecuteSuperQueryList = []string{ + "STOP SLAVE", "RESET SLAVE ALL", "FAKE SET MASTER", "START SLAVE", diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index c5c51104198..df2e770bb79 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -33,12 +33,12 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" boostclient "vitess.io/vitess/go/boost/topo/client" "vitess.io/vitess/go/event" "vitess.io/vitess/go/netutil" "vitess.io/vitess/go/protoutil" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/sqlescape" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/callerid" @@ -4358,6 +4358,23 @@ func (s *VtctldServer) ValidateVSchema(ctx context.Context, req *vtctldatapb.Val return resp, err } +// WorkflowUpdate is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) WorkflowUpdate(ctx context.Context, req *vtctldatapb.WorkflowUpdateRequest) (resp *vtctldatapb.WorkflowUpdateResponse, err error) { + span, ctx := trace.NewSpan(ctx, "VtctldServer.WorkflowUpdate") + defer span.Finish() + + defer panicHandler(&err) + + span.Annotate("keyspace", req.Keyspace) + span.Annotate("workflow", req.TabletRequest.Workflow) + span.Annotate("cells", req.TabletRequest.Cells) + span.Annotate("tablet_types", req.TabletRequest.TabletTypes) + span.Annotate("on_ddl", req.TabletRequest.OnDdl) + + resp, err = s.ws.WorkflowUpdate(ctx, req) + return resp, err +} + // StartServer registers a VtctldServer for RPCs on the given gRPC server. func StartServer(s *grpc.Server, ts *topo.Server, boost *boostclient.Client) { srv := NewVtctldServer(ts) @@ -4444,6 +4461,18 @@ var getVersionFromTabletDebugVars = func(tabletAddr string) (string, error) { var versionFuncMu sync.Mutex var getVersionFromTablet = getVersionFromTabletDebugVars +func SetVersionFunc(versionFunc func(string) (string, error)) { + versionFuncMu.Lock() + defer versionFuncMu.Unlock() + getVersionFromTablet = versionFunc +} + +func GetVersionFunc() func(string) (string, error) { + versionFuncMu.Lock() + defer versionFuncMu.Unlock() + return getVersionFromTablet +} + // helper method to asynchronously get and diff a version func (s *VtctldServer) diffVersion(ctx context.Context, primaryVersion string, primaryAlias *topodatapb.TabletAlias, alias *topodatapb.TabletAlias, wg *sync.WaitGroup, er concurrency.ErrorRecorder) { defer wg.Done() @@ -4527,15 +4556,3 @@ func boostDo[T any](t T, err error) (T, error) { return *new(T), status.Error(berr.Code.GRPCCode(), err.Error()) } - -func SetVersionFunc(versionFunc func(string) (string, error)) { - versionFuncMu.Lock() - defer versionFuncMu.Unlock() - getVersionFromTablet = versionFunc -} - -func GetVersionFunc() func(string) (string, error) { - versionFuncMu.Lock() - defer versionFuncMu.Unlock() - return getVersionFromTablet -} diff --git a/go/vt/vtctl/localvtctldclient/client_gen.go b/go/vt/vtctl/localvtctldclient/client_gen.go index 3c7acfd97d8..5a97b21be9d 100644 --- a/go/vt/vtctl/localvtctldclient/client_gen.go +++ b/go/vt/vtctl/localvtctldclient/client_gen.go @@ -642,3 +642,8 @@ func (client *localVtctldClient) ValidateVersionKeyspace(ctx context.Context, in func (client *localVtctldClient) ValidateVersionShard(ctx context.Context, in *vtctldatapb.ValidateVersionShardRequest, opts ...grpc.CallOption) (*vtctldatapb.ValidateVersionShardResponse, error) { return client.s.ValidateVersionShard(ctx, in) } + +// WorkflowUpdate is part of the vtctlservicepb.VtctldClient interface. +func (client *localVtctldClient) WorkflowUpdate(ctx context.Context, in *vtctldatapb.WorkflowUpdateRequest, opts ...grpc.CallOption) (*vtctldatapb.WorkflowUpdateResponse, error) { + return client.s.WorkflowUpdate(ctx, in) +} diff --git a/go/vt/vtctl/reparentutil/emergency_reparenter.go b/go/vt/vtctl/reparentutil/emergency_reparenter.go index b13d56a2f5e..536d77bdaad 100644 --- a/go/vt/vtctl/reparentutil/emergency_reparenter.go +++ b/go/vt/vtctl/reparentutil/emergency_reparenter.go @@ -24,10 +24,9 @@ import ( "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/util/sets" - "vitess.io/vitess/go/event" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/stats" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/logutil" diff --git a/go/vt/vtctl/reparentutil/emergency_reparenter_test.go b/go/vt/vtctl/reparentutil/emergency_reparenter_test.go index b7d8045f136..fad4dfeb15b 100644 --- a/go/vt/vtctl/reparentutil/emergency_reparenter_test.go +++ b/go/vt/vtctl/reparentutil/emergency_reparenter_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/memorytopo" diff --git a/go/vt/vtctl/reparentutil/replication.go b/go/vt/vtctl/reparentutil/replication.go index dcda5d02cbf..ddc83ad43f4 100644 --- a/go/vt/vtctl/reparentutil/replication.go +++ b/go/vt/vtctl/reparentutil/replication.go @@ -21,10 +21,9 @@ import ( "sync" "time" - "k8s.io/apimachinery/pkg/util/sets" - "vitess.io/vitess/go/event" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" diff --git a/go/vt/vtctl/reparentutil/replication_test.go b/go/vt/vtctl/reparentutil/replication_test.go index bdeb029b7a2..5c7adc42ec4 100644 --- a/go/vt/vtctl/reparentutil/replication_test.go +++ b/go/vt/vtctl/reparentutil/replication_test.go @@ -25,10 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/sets" - _flag "vitess.io/vitess/go/internal/flag" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" diff --git a/go/vt/vtctl/vdiff2_test.go b/go/vt/vtctl/vdiff2_test.go index d2aedf6625a..368f21eb93b 100644 --- a/go/vt/vtctl/vdiff2_test.go +++ b/go/vt/vtctl/vdiff2_test.go @@ -35,7 +35,7 @@ var ( ) func TestVDiff2Unsharded(t *testing.T) { - env := newTestVDiffEnv([]string{"0"}, []string{"0"}, "", nil) + env := newTestVDiffEnv(t, []string{"0"}, []string{"0"}, "", nil) defer env.close() UUID := uuid.New().String() @@ -275,7 +275,7 @@ func TestVDiff2Unsharded(t *testing.T) { } func TestVDiff2Sharded(t *testing.T) { - env := newTestVDiffEnv([]string{"-40", "40-"}, []string{"-80", "80-"}, "", map[string]string{ + env := newTestVDiffEnv(t, []string{"-40", "40-"}, []string{"-80", "80-"}, "", map[string]string{ "-80": "MySQL56/0e45e704-7cb9-11ed-a1eb-0242ac120002:1-890", "80-": "MySQL56/1497ddb0-7cb9-11ed-a1eb-0242ac120002:1-891", }) diff --git a/go/vt/vtctl/vdiff_env_test.go b/go/vt/vtctl/vdiff_env_test.go index 3de307cb2cf..5fb854284ae 100644 --- a/go/vt/vtctl/vdiff_env_test.go +++ b/go/vt/vtctl/vdiff_env_test.go @@ -19,7 +19,9 @@ package vtctl import ( "context" "fmt" + "math/rand" "sync" + "testing" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/grpcclient" @@ -64,25 +66,10 @@ type testVDiffEnv struct { tablets map[int]*testVDiffTablet } -// vdiffEnv has to be a global for RegisterDialer to work. -var vdiffEnv *testVDiffEnv - -func init() { - tabletconn.RegisterDialer("VDiffTest", func(tablet *topodatapb.Tablet, failFast grpcclient.FailFast) (queryservice.QueryService, error) { - vdiffEnv.mu.Lock() - defer vdiffEnv.mu.Unlock() - if qs, ok := vdiffEnv.tablets[int(tablet.Alias.Uid)]; ok { - return qs, nil - } - return nil, fmt.Errorf("tablet %d not found", tablet.Alias.Uid) - }) -} - //---------------------------------------------- // testVDiffEnv -func newTestVDiffEnv(sourceShards, targetShards []string, query string, positions map[string]string) *testVDiffEnv { - tabletconntest.SetProtocol("go.vt.vtctl.vdiff_env_test", "VDiffTest") +func newTestVDiffEnv(t testing.TB, sourceShards, targetShards []string, query string, positions map[string]string) *testVDiffEnv { env := &testVDiffEnv{ workflow: "vdiffTest", tablets: make(map[int]*testVDiffTablet), @@ -94,6 +81,18 @@ func newTestVDiffEnv(sourceShards, targetShards []string, query string, position } env.wr = wrangler.NewTestWrangler(env.cmdlog, env.topoServ, env.tmc) + // Generate a unique dialer name. + dialerName := fmt.Sprintf("VDiffTest-%s-%d", t.Name(), rand.Intn(1000000000)) + tabletconn.RegisterDialer(dialerName, func(tablet *topodatapb.Tablet, failFast grpcclient.FailFast) (queryservice.QueryService, error) { + env.mu.Lock() + defer env.mu.Unlock() + if qs, ok := env.tablets[int(tablet.Alias.Uid)]; ok { + return qs, nil + } + return nil, fmt.Errorf("tablet %d not found", tablet.Alias.Uid) + }) + tabletconntest.SetProtocol("go.vt.vtctl.vdiff_env_test", dialerName) + tabletID := 100 for _, shard := range sourceShards { _ = env.addTablet(tabletID, "source", shard, topodatapb.TabletType_PRIMARY) diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 44213640900..9ffc054533b 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -103,7 +103,6 @@ import ( "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/textutil" - "vitess.io/vitess/go/vt/discovery" hk "vitess.io/vitess/go/vt/hook" "vitess.io/vitess/go/vt/key" "vitess.io/vitess/go/vt/log" @@ -117,7 +116,6 @@ import ( vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/proto/vttime" "vitess.io/vitess/go/vt/schema" - "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/sidecardb" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/topo" @@ -128,38 +126,10 @@ import ( "vitess.io/vitess/go/vt/wrangler" ) -var ( - // ErrUnknownCommand is returned for an unknown command - ErrUnknownCommand = errors.New("unknown command") +// ErrUnknownCommand is returned for an unknown command. +var ErrUnknownCommand = errors.New("unknown command") - // Flag variables. - healthCheckRetryDelay = 5 * time.Second - healthCheckTimeout = time.Minute -) - -func init() { - servenv.OnParseFor("vtctl", registerFlags) - servenv.OnParseFor("vtctld", registerFlags) -} - -func registerFlags(fs *pflag.FlagSet) { - // TODO: https://github.com/vitessio/vitess/issues/11973 - // Then remove this function and associated code (NewHealthCheck, servenv - // OnParseFor hooks, etc) entirely. - fs.Duration("vtctl_healthcheck_topology_refresh", 30*time.Second, "refresh interval for re-reading the topology") - fs.MarkDeprecated("vtctl_healthcheck_topology_refresh", "") - - fs.DurationVar(&healthCheckRetryDelay, "vtctl_healthcheck_retry_delay", healthCheckRetryDelay, "delay before retrying a failed healthcheck") - fs.MarkDeprecated("vtctl_healthcheck_retry_delay", "This is used only by the legacy vtctld UI that is already deprecated and will be removed in the next release.") - fs.DurationVar(&healthCheckTimeout, "vtctl_healthcheck_timeout", healthCheckTimeout, "the health check timeout period") - fs.MarkDeprecated("vtctl_healthcheck_timeout", "This is used only by the legacy vtctld UI that is already deprecated and will be removed in the next release.") -} - -// NewHealthCheck returns a healthcheck implementation based on the vtctl flags. -// It is exported for use in go/vt/vtctld. -func NewHealthCheck(ctx context.Context, ts *topo.Server, local string, cellsToWatch []string) discovery.HealthCheck { - return discovery.NewHealthCheck(ctx, healthCheckRetryDelay, healthCheckTimeout, ts, local, strings.Join(cellsToWatch, ",")) -} +const errWorkflowUpdateWithoutChanges = "no updates were provided; use --cells, --tablet-types, or --on-ddl to specify new values" type command struct { name string @@ -615,8 +585,8 @@ var commands = []commandGroup{ { name: "ApplySchema", method: commandApplySchema, - params: "[--allow_long_unavailability] [--wait_replicas_timeout=10s] [--ddl_strategy=] [--uuid_list=] [--migration_context=] [--skip_preflight] {--sql= || --sql-file=} ", - help: "Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication. If --allow_long_unavailability is set, schema changes affecting a large number of rows (and possibly incurring a longer period of unavailability) will not be rejected. -ddl_strategy is used to instruct migrations via vreplication, gh-ost or pt-osc with optional parameters. -migration_context allows the user to specify a custom request context for online DDL migrations. If -skip_preflight, SQL goes directly to shards without going through sanity checks.", + params: "[--allow_long_unavailability] [--wait_replicas_timeout=10s] [--ddl_strategy=] [--uuid_list=] [--migration_context=] {--sql= || --sql-file=} ", + help: "Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication. If --allow_long_unavailability is set, schema changes affecting a large number of rows (and possibly incurring a longer period of unavailability) will not be rejected. -ddl_strategy is used to instruct migrations via vreplication, gh-ost or pt-osc with optional parameters. -migration_context allows the user to specify a custom request context for online DDL migrations.", }, { name: "CopySchemaShard", @@ -751,8 +721,8 @@ var commands = []commandGroup{ { name: "Workflow", method: commandWorkflow, - params: " --dry-run", - help: "Start/Stop/Delete/Show/ListAll/Tags Workflow on all target tablets in workflow. Example: Workflow merchant.morders Start", + params: "[--dry-run] [--cells] [--tablet-types] [.] start/stop/update/delete/show/listall/tags []", + help: "Start/Stop/Update/Delete/Show/ListAll/Tags Workflow on all target tablets in workflow. Example: Workflow merchant.morders Start", }, }, }, @@ -1641,11 +1611,11 @@ func commandSourceShardDelete(ctx context.Context, wr *wrangler.Wrangler, subFla if err != nil { return err } - uid, err := strconv.Atoi(subFlags.Arg(1)) + uid, err := strconv.ParseInt(subFlags.Arg(1), 10, 32) if err != nil { return err } - return wr.SourceShardDelete(ctx, keyspace, shard, uint32(uid)) + return wr.SourceShardDelete(ctx, keyspace, shard, int32(uid)) } func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { @@ -1661,7 +1631,7 @@ func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags if err != nil { return err } - uid, err := strconv.Atoi(subFlags.Arg(1)) + uid, err := strconv.ParseInt(subFlags.Arg(1), 10, 32) if err != nil { return err } @@ -1679,7 +1649,7 @@ func commandSourceShardAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags return err } } - return wr.SourceShardAdd(ctx, keyspace, shard, uint32(uid), skeyspace, sshard, kr, tables) + return wr.SourceShardAdd(ctx, keyspace, shard, int32(uid), skeyspace, sshard, kr, tables) } func commandShardReplicationAdd(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { @@ -2880,7 +2850,7 @@ func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pf migrationContext := subFlags.String("migration_context", "", "For Online DDL, optionally supply a custom unique string used as context for the migration(s) in this command. By default a unique context is auto-generated by Vitess") requestContext := subFlags.String("request_context", "", "synonym for --migration_context") waitReplicasTimeout := subFlags.Duration("wait_replicas_timeout", wrangler.DefaultWaitReplicasTimeout, "The amount of time to wait for replicas to receive the schema change via replication.") - skipPreflight := subFlags.Bool("skip_preflight", false, "Skip pre-apply schema checks, and directly forward schema change query to shards") + skipPreflight := subFlags.Bool("skip_preflight", false, "Deprecated. Always assumed to be 'true'") callerID := subFlags.String("caller_id", "", "This is the effective caller ID used for the operation and should map to an ACL name which grants this identity the necessary permissions to perform the operation (this is only necessary when strict table ACLs are used)") if err := subFlags.Parse(args); err != nil { @@ -2889,6 +2859,9 @@ func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pf if subFlags.NArg() != 1 { return fmt.Errorf("the argument is required for the commandApplySchema command") } + if *skipPreflight { + log.Warningf("--skip_preflight flag is deprecated. Always assumed to be 'true'") + } keyspace := subFlags.Arg(0) change, err := getFileParam(*sql, *sqlFile, "sql") @@ -2920,7 +2893,7 @@ func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *pf AllowLongUnavailability: *allowLongUnavailability, DdlStrategy: *ddlStrategy, Sql: parts, - SkipPreflight: *skipPreflight, + SkipPreflight: true, UuidList: textutil.SplitDelimitedList(*uuidList), MigrationContext: *migrationContext, WaitReplicasTimeout: protoutil.DurationToProto(*waitReplicasTimeout), @@ -3638,19 +3611,19 @@ func commandHelp(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.Fla } func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error { - dryRun := subFlags.Bool("dry_run", false, "Does a dry run of Workflow and only reports the final query and list of tablets on which the operation will be applied") + usage := "usage: Workflow [--dry-run] [--cells] [--tablet-types] [.] start/stop/update/delete/show/listall/tags []" + dryRun := subFlags.Bool("dry-run", false, "Does a dry run of the Workflow action and reports the query and list of tablets on which the operation will be applied") + cells := subFlags.StringSlice("cells", []string{}, "New Cell(s) or CellAlias(es) (comma-separated) to replicate from. (Update only)") + tabletTypes := subFlags.StringSlice("tablet-types", []string{}, "New source tablet types to replicate from (e.g. PRIMARY, REPLICA, RDONLY). (Update only)") + onDDL := subFlags.String("on-ddl", "", "New instruction on what to do when DDL is encountered in the VReplication stream. Possible values are IGNORE, STOP, EXEC, and EXEC_IGNORE. (Update only)") if err := subFlags.Parse(args); err != nil { return err } if subFlags.NArg() < 2 { - return fmt.Errorf("usage: Workflow --dry-run keyspace[.workflow] start/stop/delete/show/listall/tags []") + return fmt.Errorf(usage) } keyspace := subFlags.Arg(0) action := strings.ToLower(subFlags.Arg(1)) - // Note: List is deprecated and replaced by show. - if action == "list" { - action = "show" - } var workflow string var err error if action != "listall" { @@ -3679,13 +3652,57 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag } } else { if subFlags.NArg() != 2 { - return fmt.Errorf("usage: Workflow --dry-run keyspace[.workflow] start/stop/delete/show/listall") + return fmt.Errorf(usage) + } + var rpcReq any = nil + if action == "update" { + changes := false + // We need to implicitly distinguish between an empty value (which is valid) + // and no value having been provided. We will use NULL for this purpose. + if subFlags.Lookup("cells").Changed { // Validate the provided value(s) + changes = true + for i, cell := range *cells { // Which only means trimming whitespace + (*cells)[i] = strings.TrimSpace(cell) + } + } else { + cells = &textutil.SimulatedNullStringSlice + } + if subFlags.Lookup("tablet-types").Changed { // Validate the provided value(s) + changes = true + for i, tabletType := range *tabletTypes { + (*tabletTypes)[i] = strings.ToUpper(strings.TrimSpace(tabletType)) + if _, err = topoproto.ParseTabletType((*tabletTypes)[i]); err != nil { + return err + } + } + } else { + tabletTypes = &textutil.SimulatedNullStringSlice + } + onddl := int32(textutil.SimulatedNullInt) // To signify no value has been provided + if subFlags.Lookup("on-ddl").Changed { // Validate the provided value + changes = true + ival, valid := binlogdatapb.OnDDLAction_value[strings.ToUpper(*onDDL)] + if !valid { + return fmt.Errorf("invalid on-ddl action: %s", *onDDL) + } + onddl = ival + } + if !changes { + return fmt.Errorf(errWorkflowUpdateWithoutChanges) + } + rpcReq = &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + Cells: *cells, + TabletTypes: *tabletTypes, + OnDdl: binlogdatapb.OnDDLAction(onddl), + } } - results, err = wr.WorkflowAction(ctx, workflow, keyspace, action, *dryRun) + results, err = wr.WorkflowAction(ctx, workflow, keyspace, action, *dryRun, rpcReq) // Only update currently uses the new RPC path if err != nil { return err } - if action == "show" || action == "listall" { + if action == "show" || action == "listall" || (action == "update" && *dryRun) { + // No final results left to print. return nil } } @@ -3906,7 +3923,6 @@ func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error } } - wr.Logger().Printf("Unknown command: %v\n", action) return ErrUnknownCommand } diff --git a/go/vt/vtctl/vtctldclient/codegen/main.go b/go/vt/vtctl/vtctldclient/codegen/main.go index baeb7af8d00..ad3544826cf 100644 --- a/go/vt/vtctl/vtctldclient/codegen/main.go +++ b/go/vt/vtctl/vtctldclient/codegen/main.go @@ -332,7 +332,7 @@ func extractSourceInterface(pkg *packages.Package, name string) (*types.Interfac return nil, fmt.Errorf("symbol %s was not an interface but %T", name, obj.Type()) } -var vitessProtoRegexp = regexp.MustCompile(`^vitess.io.*/proto/.*`) +var vitessProtoRegexp = regexp.MustCompile(`^vitess\.io.*/proto/.*`) func rewriteProtoImports(pkg *types.Package) string { if vitessProtoRegexp.MatchString(pkg.Path()) { diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index b26e198c2cd..b29851a3f8a 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -26,8 +26,8 @@ import ( "time" "google.golang.org/protobuf/encoding/prototext" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/concurrency" @@ -35,10 +35,12 @@ import ( "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vtctl/workflow/vexec" + "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tmclient" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" "vitess.io/vitess/go/vt/proto/vttime" @@ -370,8 +372,8 @@ func (s *Server) GetWorkflows(ctx context.Context, req *vtctldatapb.GetWorkflows if tags != "" { tagArray = strings.Split(tags, ",") } - workflowType, _ := row["workflow_type"].ToInt64() - workflowSubType, _ := row["workflow_sub_type"].ToInt64() + workflowType, _ := row["workflow_type"].ToInt32() + workflowSubType, _ := row["workflow_sub_type"].ToInt32() stream := &vtctldatapb.Workflow_Stream{ Id: id, Shard: tablet.Shard, @@ -390,8 +392,8 @@ func (s *Server) GetWorkflows(ctx context.Context, req *vtctldatapb.GetWorkflows Message: message, Tags: tagArray, } - workflow.WorkflowType = binlogdatapb.VReplicationWorkflowType_name[int32(workflowType)] - workflow.WorkflowSubType = binlogdatapb.VReplicationWorkflowSubType_name[int32(workflowSubType)] + workflow.WorkflowType = binlogdatapb.VReplicationWorkflowType_name[workflowType] + workflow.WorkflowSubType = binlogdatapb.VReplicationWorkflowSubType_name[workflowSubType] stream.CopyStates, err = s.getWorkflowCopyStates(ctx, tablet, id) if err != nil { return err @@ -749,3 +751,50 @@ func (s *Server) getWorkflowCopyStates(ctx context.Context, tablet *topo.TabletI return copyStates, nil } + +// WorkflowUpdate is part of the vtctlservicepb.VtctldServer interface. +// It passes the embedded TabletRequest object to the given keyspace's +// target primary tablets that are participating in the given workflow. +func (s *Server) WorkflowUpdate(ctx context.Context, req *vtctldatapb.WorkflowUpdateRequest) (*vtctldatapb.WorkflowUpdateResponse, error) { + span, ctx := trace.NewSpan(ctx, "workflow.Server.WorkflowUpdate") + defer span.Finish() + + span.Annotate("keyspace", req.Keyspace) + span.Annotate("workflow", req.TabletRequest.Workflow) + span.Annotate("cells", req.TabletRequest.Cells) + span.Annotate("tablet_types", req.TabletRequest.TabletTypes) + span.Annotate("on_ddl", req.TabletRequest.OnDdl) + + vx := vexec.NewVExec(req.Keyspace, req.TabletRequest.Workflow, s.ts, s.tmc) + callback := func(ctx context.Context, tablet *topo.TabletInfo) (*querypb.QueryResult, error) { + res, err := s.tmc.UpdateVRWorkflow(ctx, tablet.Tablet, req.TabletRequest) + if err != nil { + return nil, err + } + return res.Result, err + } + res, err := vx.CallbackContext(ctx, callback) + if err != nil { + if topo.IsErrType(err, topo.NoNode) { + return nil, vterrors.Wrapf(err, "%s keyspace does not exist", req.Keyspace) + } + return nil, err + } + + if len(res) == 0 { + return nil, fmt.Errorf("the %s workflow does not exist in the %s keyspace", req.TabletRequest.Workflow, req.Keyspace) + } + + response := &vtctldatapb.WorkflowUpdateResponse{} + response.Summary = fmt.Sprintf("Successfully updated the %s workflow on (%d) target primary tablets in the %s keyspace", req.TabletRequest.Workflow, len(res), req.Keyspace) + details := make([]*vtctldatapb.WorkflowUpdateResponse_TabletInfo, 0, len(res)) + for tinfo, tres := range res { + result := &vtctldatapb.WorkflowUpdateResponse_TabletInfo{ + Tablet: fmt.Sprintf("%s-%d (%s/%s)", tinfo.Alias.Cell, tinfo.Alias.Uid, tinfo.Keyspace, tinfo.Shard), + Changed: tres.RowsAffected > 0, // Can be more than one with shard merges + } + details = append(details, result) + } + response.Details = details + return response, nil +} diff --git a/go/vt/vtctl/workflow/stream_migrator.go b/go/vt/vtctl/workflow/stream_migrator.go index 8266b59aea9..6d6929a9b4a 100644 --- a/go/vt/vtctl/workflow/stream_migrator.go +++ b/go/vt/vtctl/workflow/stream_migrator.go @@ -214,7 +214,7 @@ func (sm *StreamMigrator) readTabletStreams(ctx context.Context, ti *topo.Tablet tabletStreams := make([]*VReplicationStream, 0, len(qr.Rows)) for _, row := range qr.Named().Rows { - id, err := row["id"].ToInt64() + id, err := row["id"].ToInt32() if err != nil { return nil, err } @@ -229,11 +229,11 @@ func (sm *StreamMigrator) readTabletStreams(ctx context.Context, ti *topo.Tablet ti.Keyspace, ti.Shard, id) } - workflowType, err := row["workflow_type"].ToInt64() + workflowType, err := row["workflow_type"].ToInt32() if err != nil { return nil, err } - workflowSubType, err := row["workflow_sub_type"].ToInt64() + workflowSubType, err := row["workflow_sub_type"].ToInt32() if err != nil { return nil, err } @@ -268,7 +268,7 @@ func (sm *StreamMigrator) readTabletStreams(ctx context.Context, ti *topo.Tablet } tabletStreams = append(tabletStreams, &VReplicationStream{ - ID: uint32(id), + ID: id, Workflow: workflowName, BinlogSource: &bls, Position: pos, @@ -478,7 +478,7 @@ func (sm *StreamMigrator) syncSourceStreams(ctx context.Context) (map[string]mys } sm.ts.Logger().Infof("Waiting for keyspace:shard: %v:%v, position %v", sm.ts.SourceKeyspaceName(), shard, pos) - if err := sm.ts.TabletManagerClient().VReplicationWaitForPos(ctx, primary.Tablet, int(vrs.ID), mysql.EncodePosition(pos)); err != nil { + if err := sm.ts.TabletManagerClient().VReplicationWaitForPos(ctx, primary.Tablet, vrs.ID, mysql.EncodePosition(pos)); err != nil { allErrors.RecordError(err) return } @@ -580,7 +580,7 @@ func (sm *StreamMigrator) createTargetStreams(ctx context.Context, tmpl []*VRepl } ig.AddRow(vrs.Workflow, vrs.BinlogSource, mysql.EncodePosition(vrs.Position), "", "", - int64(vrs.WorkflowType), int64(vrs.WorkflowSubType), vrs.DeferSecondaryKeys) + vrs.WorkflowType, vrs.WorkflowSubType, vrs.DeferSecondaryKeys) } _, err := sm.ts.VReplicationExec(ctx, target.GetPrimary().GetAlias(), ig.String()) @@ -659,7 +659,7 @@ func (sm *StreamMigrator) templatizeRule(ctx context.Context, rule *binlogdatapb switch { case rule.Filter == "": return StreamTypeUnknown, fmt.Errorf("rule %v does not have a select expression in vreplication", rule) - case key.IsKeyRange(rule.Filter): + case key.IsValidKeyRange(rule.Filter): rule.Filter = "{{.}}" return StreamTypeSharded, nil case rule.Filter == vreplication.ExcludeStr: diff --git a/go/vt/vtctl/workflow/stream_migrator_test.go b/go/vt/vtctl/workflow/stream_migrator_test.go index 6b515679e77..903e873a130 100644 --- a/go/vt/vtctl/workflow/stream_migrator_test.go +++ b/go/vt/vtctl/workflow/stream_migrator_test.go @@ -329,7 +329,7 @@ func stringifyVRS(streams []*VReplicationStream) string { } type testVRS struct { - ID uint32 + ID int32 Workflow string BinlogSource *binlogdatapb.BinlogSource } diff --git a/go/vt/vtctl/workflow/traffic_switcher.go b/go/vt/vtctl/workflow/traffic_switcher.go index 7289ea155dd..53a6e0ede9d 100644 --- a/go/vt/vtctl/workflow/traffic_switcher.go +++ b/go/vt/vtctl/workflow/traffic_switcher.go @@ -27,8 +27,8 @@ import ( "strings" "google.golang.org/protobuf/encoding/prototext" - "k8s.io/apimachinery/pkg/util/sets" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/logutil" @@ -121,7 +121,7 @@ type ITrafficSwitcher interface { ForAllSources(f func(source *MigrationSource) error) error ForAllTargets(f func(target *MigrationTarget) error) error - ForAllUIDs(f func(target *MigrationTarget, uid uint32) error) error + ForAllUIDs(f func(target *MigrationTarget, uid int32) error) error SourceShards() []*topo.ShardInfo TargetShards() []*topo.ShardInfo } @@ -169,7 +169,7 @@ func (source *MigrationSource) GetPrimary() *topo.TabletInfo { type MigrationTarget struct { si *topo.ShardInfo primary *topo.TabletInfo - Sources map[uint32]*binlogdatapb.BinlogSource + Sources map[int32]*binlogdatapb.BinlogSource Position string } @@ -239,12 +239,12 @@ func BuildTargets(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManag target := &MigrationTarget{ si: si, primary: primary, - Sources: make(map[uint32]*binlogdatapb.BinlogSource), + Sources: make(map[int32]*binlogdatapb.BinlogSource), } qr := sqltypes.Proto3ToResult(p3qr) for _, row := range qr.Named().Rows { - id, err := row["id"].ToInt64() + id, err := row["id"].ToInt32() if err != nil { return nil, err } @@ -262,7 +262,7 @@ func BuildTargets(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManag frozen = true } - target.Sources[uint32(id)] = &bls + target.Sources[id] = &bls optCells = row["cell"].ToString() optTabletTypes = row["tablet_types"].ToString() @@ -289,12 +289,12 @@ func BuildTargets(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManag } func getVReplicationWorkflowType(row sqltypes.RowNamedValues) binlogdatapb.VReplicationWorkflowType { - i, _ := row["workflow_type"].ToInt64() + i, _ := row["workflow_type"].ToInt32() return binlogdatapb.VReplicationWorkflowType(i) } func getVReplicationWorkflowSubType(row sqltypes.RowNamedValues) binlogdatapb.VReplicationWorkflowSubType { - i, _ := row["workflow_sub_type"].ToInt64() + i, _ := row["workflow_sub_type"].ToInt32() return binlogdatapb.VReplicationWorkflowSubType(i) } diff --git a/go/vt/vtctl/workflow/vexec/vexec.go b/go/vt/vtctl/workflow/vexec/vexec.go index 77bb0b98d3f..6fdeb3e3909 100644 --- a/go/vt/vtctl/workflow/vexec/vexec.go +++ b/go/vt/vtctl/workflow/vexec/vexec.go @@ -20,11 +20,15 @@ import ( "context" "errors" "fmt" + "sync" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/concurrency" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tmclient" @@ -36,9 +40,6 @@ const ( // are prefixed by. VExecTableQualifier = "_vt" - // SchemaMigrationsTableName is the unqualified name of the schema - // migrations table supported by vexec. - SchemaMigrationsTableName = "schema_migrations" // VReplicationLogTableName is the unqualified name of the vreplication_log // table supported by vexec. VReplicationLogTableName = "vreplication_log" @@ -150,6 +151,55 @@ func (vx *VExec) QueryContext(ctx context.Context, query string) (map[*topo.Tabl return qp.ExecuteScatter(ctx, vx.primaries...) } +// CallbackContext executes the given callback, returning a mapping of tablet +// to querypb.QueryResult. +// +// On first use, QueryContext will also cause the VExec instance to discover +// target tablets from the topo; that target list will be reused for all future +// callbacks executed by this instance. +func (vx *VExec) CallbackContext(ctx context.Context, callback func(context.Context, *topo.TabletInfo) (*querypb.QueryResult, error)) (map[*topo.TabletInfo]*querypb.QueryResult, error) { + if vx.primaries == nil { + if err := vx.initialize(ctx); err != nil { + return nil, err + } + } + return vx.execCallback(ctx, callback) +} + +// execCallback runs the provided callback function on backend shard primaries. +// It collects query results from all shards and returns an aggregate (UNION +// ALL -like) result. +// Note: any nil results from the callback are ignored. +func (vx *VExec) execCallback(ctx context.Context, callback func(context.Context, *topo.TabletInfo) (*querypb.QueryResult, error)) (map[*topo.TabletInfo]*querypb.QueryResult, error) { + var ( + wg sync.WaitGroup + mu sync.Mutex + + allErrors = &concurrency.AllErrorRecorder{} + results = make(map[*topo.TabletInfo]*querypb.QueryResult) + ) + for _, primary := range vx.primaries { + wg.Add(1) + go func(ctx context.Context, primary *topo.TabletInfo) { + defer wg.Done() + qr, err := callback(ctx, primary) + if err != nil { + allErrors.RecordError(err) + } else { + if qr == nil { + log.Infof("Callback returned nil result for tablet %s-%s", primary.Alias.Cell, primary.Alias.Uid) + return // no result + } + mu.Lock() + defer mu.Unlock() + results[primary] = qr + } + }(ctx, primary) + } + wg.Wait() + return results, allErrors.AggrError(vterrors.Aggregate) +} + func (vx *VExec) initialize(ctx context.Context) error { vx.primaries = nil @@ -237,8 +287,6 @@ func (vx *VExec) GetPlanner(ctx context.Context, table string) (QueryPlanner, er } return NewVReplicationLogQueryPlanner(vx.tmc, tabletStreamIDMap), nil - case qualifiedTableName(SchemaMigrationsTableName): - return nil, errors.New("Schema Migrations not yet supported in new workflow package") default: return nil, fmt.Errorf("%w: %v", ErrUnsupportedTable, table) } diff --git a/go/vt/vtctl/workflow/vreplication_stream.go b/go/vt/vtctl/workflow/vreplication_stream.go index 55b668e30f1..7d3c2b94145 100644 --- a/go/vt/vtctl/workflow/vreplication_stream.go +++ b/go/vt/vtctl/workflow/vreplication_stream.go @@ -30,7 +30,7 @@ import ( // VReplicationStream represents a single stream of a vreplication workflow. type VReplicationStream struct { - ID uint32 + ID int32 Workflow string BinlogSource *binlogdatapb.BinlogSource Position mysql.Position diff --git a/go/vt/vtctld/api.go b/go/vt/vtctld/api.go index faebd04bfdc..07eda0a1470 100644 --- a/go/vt/vtctld/api.go +++ b/go/vt/vtctld/api.go @@ -30,7 +30,6 @@ import ( "vitess.io/vitess/go/acl" "vitess.io/vitess/go/netutil" - "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/mysqlctl" @@ -45,7 +44,6 @@ import ( "vitess.io/vitess/go/vt/wrangler" logutilpb "vitess.io/vitess/go/vt/proto/logutil" - querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -62,16 +60,8 @@ const ( jsonContentType = "application/json; charset=utf-8" ) -// TabletStats represents realtime stats from a discovery.TabletHealth struct. -type TabletStats struct { - LastError string `json:"last_error,omitempty"` - Realtime *querypb.RealtimeStats `json:"realtime,omitempty"` - Serving bool `json:"serving"` - Up bool `json:"up"` -} - -// TabletWithStatsAndURL wraps topo.Tablet, adding a URL property and optional realtime stats. -type TabletWithStatsAndURL struct { +// TabletWithURL wraps topo.Tablet, adding a URL property. +type TabletWithURL struct { Alias *topodatapb.TabletAlias `json:"alias,omitempty"` Hostname string `json:"hostname,omitempty"` PortMap map[string]int32 `json:"port_map,omitempty"` @@ -84,7 +74,6 @@ type TabletWithStatsAndURL struct { MysqlHostname string `json:"mysql_hostname,omitempty"` MysqlPort int32 `json:"mysql_port,omitempty"` PrimaryTermStartTime *vttime.Time `json:"primary_term_start_time,omitempty"` - Stats *TabletStats `json:"stats,omitempty"` URL string `json:"url,omitempty"` } @@ -101,8 +90,8 @@ func registerVtctldAPIFlags(fs *pflag.FlagSet) { fs.MarkDeprecated("vtctld_show_topology_crud", "It is no longer applicable because vtctld no longer provides a UI.") } -func newTabletWithStatsAndURL(t *topodatapb.Tablet, healthcheck discovery.HealthCheck) *TabletWithStatsAndURL { - tablet := &TabletWithStatsAndURL{ +func newTabletWithURL(t *topodatapb.Tablet) *TabletWithURL { + tablet := &TabletWithURL{ Alias: t.Alias, Hostname: t.Hostname, PortMap: t.PortMap, @@ -123,19 +112,6 @@ func newTabletWithStatsAndURL(t *topodatapb.Tablet, healthcheck discovery.Health tablet.URL = "http://" + netutil.JoinHostPort(t.Hostname, t.PortMap["vt"]) } - if healthcheck != nil { - if health, err := healthcheck.GetTabletHealth(discovery.KeyFromTablet(t), tablet.Alias); err == nil { - tablet.Stats = &TabletStats{ - Realtime: health.Stats, - Serving: health.Serving, - Up: true, - } - if health.LastError != nil { - tablet.Stats.LastError = health.LastError.Error() - } - } - } - return tablet } @@ -205,7 +181,7 @@ func unmarshalRequest(r *http.Request, v any) error { return json.Unmarshal(data, v) } -func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, healthcheck discovery.HealthCheck) { +func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository) { tabletHealthCache := newTabletHealthCache(ts) tmClient := tmclient.NewTabletManagerClient() @@ -293,7 +269,7 @@ func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, he filterCells = strings.Split(cells, ",") // list of cells } - tablets := [](*TabletWithStatsAndURL){} + tablets := [](*TabletWithURL){} for _, shard := range shardNames { // Get tablets for this shard. tabletAliases, err := ts.FindAllTabletAliasesInShardByCell(ctx, keyspace, shard, filterCells) @@ -305,7 +281,7 @@ func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, he if err != nil { return nil, err } - tablet := newTabletWithStatsAndURL(t.Tablet, healthcheck) + tablet := newTabletWithURL(t.Tablet) tablets = append(tablets, tablet) } } @@ -478,113 +454,23 @@ func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, he return nil, err } - return newTabletWithStatsAndURL(t.Tablet, nil), nil + return newTabletWithURL(t.Tablet), nil }) // Healthcheck real time status per (cell, keyspace, tablet type, metric). - handleCollection("tablet_statuses", func(r *http.Request) (any, error) { - targetPath := getItemPath(r.URL.Path) - - // Get the heatmap data based on query parameters. - if targetPath == "" { - if err := r.ParseForm(); err != nil { - return nil, err - } - keyspace := r.FormValue("keyspace") - cell := r.FormValue("cell") - tabletType := r.FormValue("type") - _, err := topoproto.ParseTabletType(tabletType) - // Excluding the case where parse fails because all tabletTypes was chosen. - if err != nil && tabletType != "all" { - return nil, fmt.Errorf("invalid tablet type: %v ", err) - } - metric := r.FormValue("metric") - - // Setting default values if none was specified in the query params. - if keyspace == "" { - keyspace = "all" - } - if cell == "" { - cell = "all" - } - if tabletType == "" { - tabletType = "all" - } - if metric == "" { - metric = "health" - } - - if healthcheck == nil { - return nil, fmt.Errorf("healthcheck not initialized") - } - - heatmap, err := heatmapData(healthcheck, keyspace, cell, tabletType, metric) - if err != nil { - return nil, fmt.Errorf("couldn't get heatmap data: %v", err) - } - return heatmap, nil - } - - return nil, fmt.Errorf("invalid target path: %q expected path: ?keyspace=&cell=&type=&metric=", targetPath) + handleAPI("tablet_statuses/", func(w http.ResponseWriter, r *http.Request) error { + http.NotFound(w, r) + return nil }) - handleCollection("tablet_health", func(r *http.Request) (any, error) { - tabletPath := getItemPath(r.URL.Path) - parts := strings.SplitN(tabletPath, "/", 2) - - // Request was incorrectly formatted. - if len(parts) != 2 { - return nil, fmt.Errorf("invalid tablet_health path: %q expected path: /tablet_health//", tabletPath) - } - - if healthcheck == nil { - return nil, fmt.Errorf("healthcheck not initialized") - } - - cell := parts[0] - uidStr := parts[1] - uid, err := topoproto.ParseUID(uidStr) - if err != nil { - return nil, fmt.Errorf("incorrect uid: %v", err) - } - - tabletAlias := topodatapb.TabletAlias{ - Cell: cell, - Uid: uid, - } - tabletStat, err := healthcheck.GetTabletHealthByAlias(&tabletAlias) - if err != nil { - return nil, fmt.Errorf("could not get tabletStats: %v", err) - } - return tabletStat, nil + handleAPI("tablet_health/", func(w http.ResponseWriter, r *http.Request) error { + http.NotFound(w, r) + return nil }) - handleCollection("topology_info", func(r *http.Request) (any, error) { - targetPath := getItemPath(r.URL.Path) - - // Retrieving topology information (keyspaces, cells, and types) based on query params. - if targetPath == "" { - if err := r.ParseForm(); err != nil { - return nil, err - } - keyspace := r.FormValue("keyspace") - cell := r.FormValue("cell") - - // Setting default values if none was specified in the query params. - if keyspace == "" { - keyspace = "all" - } - if cell == "" { - cell = "all" - } - - if healthcheck == nil { - return nil, fmt.Errorf("realtimeStats not initialized") - } - - return getTopologyInfo(healthcheck, keyspace, cell), nil - } - return nil, fmt.Errorf("invalid target path: %q expected path: ?keyspace=&cell=", targetPath) + handleAPI("topology_info/", func(w http.ResponseWriter, r *http.Request) error { + http.NotFound(w, r) + return nil }) // Vtctl Command @@ -667,7 +553,7 @@ func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, he resp := make(map[string]any) resp["activeReparents"] = !mysqlctl.DisableActiveReparents - resp["showStatus"] = enableRealtimeStats + resp["showStatus"] = false /* enableRealtimeStats = false, always */ data, err := json.MarshalIndent(resp, "", " ") if err != nil { return fmt.Errorf("json error: %v", err) diff --git a/go/vt/vtctld/api_test.go b/go/vt/vtctld/api_test.go index 7605ecb0099..8a7e53c7f2d 100644 --- a/go/vt/vtctld/api_test.go +++ b/go/vt/vtctld/api_test.go @@ -28,45 +28,13 @@ import ( "github.com/stretchr/testify/require" - "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/topo/memorytopo" "vitess.io/vitess/go/vt/wrangler" - querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vschemapb "vitess.io/vitess/go/vt/proto/vschema" ) -// tabletStats will create a discovery.TabletHealth object based on the given tablet configuration. -func tabletStats(keyspace, cell, shard string, tabletType topodatapb.TabletType, uid uint32) (*topodatapb.Tablet, *discovery.TabletHealth) { - target := &querypb.Target{ - Keyspace: keyspace, - Shard: shard, - TabletType: tabletType, - } - tablet := &topodatapb.Tablet{ - Alias: &topodatapb.TabletAlias{Cell: cell, Uid: uid}, - Keyspace: keyspace, - Shard: shard, - Type: tabletType, - PortMap: map[string]int32{"vt": int32(uid), "grpc": int32(uid + 1)}, - } - realtimeStats := &querypb.RealtimeStats{ - HealthError: "", - // uid is used for ReplicationLagSeconds to give it a unique value. - ReplicationLagSeconds: uid, - } - stats := &discovery.TabletHealth{ - Tablet: tablet, - Target: target, - // Up: true, - Serving: true, - Stats: realtimeStats, - LastError: nil, - } - return tablet, stats -} - func compactJSON(in []byte) string { buf := &bytes.Buffer{} json.Compact(buf, in) @@ -152,32 +120,7 @@ func TestAPI(t *testing.T) { return "TestTabletAction Result", nil }) - healthcheck := discovery.NewFakeHealthCheck(nil) - initAPI(ctx, ts, actionRepo, healthcheck) - - t1, ts1 := tabletStats("ks1", "cell1", "-80", topodatapb.TabletType_REPLICA, 100) - t2, ts2 := tabletStats("ks1", "cell1", "-80", topodatapb.TabletType_RDONLY, 200) - t3, ts3 := tabletStats("ks1", "cell2", "80-", topodatapb.TabletType_REPLICA, 300) - t4, ts4 := tabletStats("ks1", "cell2", "80-", topodatapb.TabletType_RDONLY, 400) - - t5, ts5 := tabletStats("ks2", "cell1", "0", topodatapb.TabletType_REPLICA, 500) - t6, ts6 := tabletStats("ks2", "cell2", "0", topodatapb.TabletType_REPLICA, 600) - - healthcheck.AddTablet(t1) - healthcheck.AddTablet(t2) - healthcheck.AddTablet(t3) - healthcheck.AddTablet(t4) - - healthcheck.AddTablet(t5) - healthcheck.AddTablet(t6) - - healthcheck.UpdateHealth(ts1) - healthcheck.UpdateHealth(ts2) - healthcheck.UpdateHealth(ts3) - healthcheck.UpdateHealth(ts4) - - healthcheck.UpdateHealth(ts5) - healthcheck.UpdateHealth(ts6) + initAPI(ctx, ts, actionRepo) // all-tablets response for keyspace/ks1/tablets/ endpoints keyspaceKs1AllTablets := `[ @@ -198,13 +141,6 @@ func TestAPI(t *testing.T) { "type": 2, "mysql_hostname": "mysql1-cell1.test.net", "mysql_port": 3306, - "stats": { - "realtime": { - "replication_lag_seconds": 100 - }, - "serving": true, - "up": true - }, "url": "http://mysql1-cell1.test.net:100" }, { @@ -269,13 +205,6 @@ func TestAPI(t *testing.T) { "type": 2, "mysql_hostname": "mysql1-cell1.test.net", "mysql_port": 3306, - "stats": { - "realtime": { - "replication_lag_seconds": 100 - }, - "serving": true, - "up": true - }, "url": "http://mysql1-cell1.test.net:100" } ]`, http.StatusOK}, @@ -378,71 +307,17 @@ func TestAPI(t *testing.T) { }`, http.StatusOK}, // Tablet Updates - {"GET", "tablet_statuses/?keyspace=ks1&cell=cell1&type=REPLICA&metric=lag", "", `[ - { - "Data": [ [100, -1] ], - "Aliases": [[ { "cell": "cell1", "uid": 100 }, null ]], - "KeyspaceLabel": { "Name": "ks1", "Rowspan": 1 }, - "CellAndTypeLabels": [{ "CellLabel": { "Name": "cell1", "Rowspan": 1 }, "TypeLabels": [{"Name": "REPLICA", "Rowspan": 1}] }] , - "ShardLabels": ["-80", "80-"], - "YGridLines": [0.5] - } - ]`, http.StatusOK}, - {"GET", "tablet_statuses/?keyspace=ks1&cell=all&type=all&metric=lag", "", `[ - { - "Data":[[-1,400],[-1,300],[200,-1],[100,-1]], - "Aliases":[[null,{"cell":"cell2","uid":400}],[null,{"cell":"cell2","uid":300}],[{"cell":"cell1","uid":200},null],[{"cell":"cell1","uid":100},null]], - "KeyspaceLabel":{"Name":"ks1","Rowspan":4}, - "CellAndTypeLabels":[ - {"CellLabel":{"Name":"cell1","Rowspan":2},"TypeLabels":[{"Name":"REPLICA","Rowspan":1},{"Name":"RDONLY","Rowspan":1}]}, - {"CellLabel":{"Name":"cell2","Rowspan":2},"TypeLabels":[{"Name":"REPLICA","Rowspan":1},{"Name":"RDONLY","Rowspan":1}]}], - "ShardLabels":["-80","80-"], - "YGridLines":[0.5,1.5,2.5,3.5] - } - ]`, http.StatusOK}, - {"GET", "tablet_statuses/?keyspace=all&cell=all&type=all&metric=lag", "", `[ - { - "Data":[[-1,300],[200,-1]], - "Aliases":null, - "KeyspaceLabel":{"Name":"ks1","Rowspan":2}, - "CellAndTypeLabels":[ - {"CellLabel":{"Name":"cell1","Rowspan":1},"TypeLabels":null}, - {"CellLabel":{"Name":"cell2","Rowspan":1},"TypeLabels":null}], - "ShardLabels":["-80","80-"], - "YGridLines":[0.5,1.5] - }, - { - "Data":[[600],[500]], - "Aliases":null, - "KeyspaceLabel":{"Name":"ks2","Rowspan":2}, - "CellAndTypeLabels":[ - {"CellLabel":{"Name":"cell1","Rowspan":1},"TypeLabels":null}, - {"CellLabel":{"Name":"cell2","Rowspan":1},"TypeLabels":null}], - "ShardLabels":["0"], - "YGridLines":[0.5, 1.5] - } - ]`, http.StatusOK}, - {"GET", "tablet_statuses/cell1/REPLICA/lag", "", "can't get tablet_statuses: invalid target path: \"cell1/REPLICA/lag\" expected path: ?keyspace=&cell=&type=&metric=", http.StatusInternalServerError}, - {"GET", "tablet_statuses/?keyspace=ks1&cell=cell1&type=hello&metric=lag", "", "can't get tablet_statuses: invalid tablet type: unknown TabletType hello", http.StatusInternalServerError}, + {"GET", "tablet_statuses/?keyspace=all&cell=all&type=all&metric=lag", "", "404 page not found", http.StatusNotFound}, + {"GET", "tablet_statuses/cell1/REPLICA/lag", "", "404 page not found", http.StatusNotFound}, + {"GET", "tablet_statuses/?keyspace=ks1&cell=cell1&type=hello&metric=lag", "", "404 page not found", http.StatusNotFound}, // Tablet Health - {"GET", "tablet_health/cell1/100", "", `{ "Key": ",grpc:101,vt:100", "Tablet": { "alias": { "cell": "cell1", "uid": 100 },"port_map": { "grpc": 101, "vt": 100 }, "keyspace": "ks1", "shard": "-80", "type": 2}, - "Name": "cell1-0000000100", "Target": { "keyspace": "ks1", "shard": "-80", "tablet_type": 2 }, "Up": true, "Serving": true, "PrimaryTermStartTime": 0, "TabletExternallyReparentedTimestamp": 0, - "Stats": { "replication_lag_seconds": 100 }, "LastError": null }`, http.StatusOK}, - {"GET", "tablet_health/cell1", "", "can't get tablet_health: invalid tablet_health path: \"cell1\" expected path: /tablet_health//", http.StatusInternalServerError}, - {"GET", "tablet_health/cell1/gh", "", "can't get tablet_health: incorrect uid", http.StatusInternalServerError}, + {"GET", "tablet_health/cell1/100", "", "404 page not found", http.StatusNotFound}, + {"GET", "tablet_health/cell1", "", "404 page not found", http.StatusNotFound}, + {"GET", "tablet_health/cell1/gh", "", "404 page not found", http.StatusNotFound}, // Topology Info - {"GET", "topology_info/?keyspace=all&cell=all", "", `{ - "Keyspaces": ["ks1", "ks2"], - "Cells": ["cell1","cell2"], - "TabletTypes": ["REPLICA","RDONLY"] - }`, http.StatusOK}, - {"GET", "topology_info/?keyspace=ks1&cell=cell1", "", `{ - "Keyspaces": ["ks1", "ks2"], - "Cells": ["cell1","cell2"], - "TabletTypes": ["REPLICA", "RDONLY"] - }`, http.StatusOK}, + {"GET", "topology_info/?keyspace=all&cell=all", "", "404 page not found", http.StatusNotFound}, // vtctl RunCommand {"POST", "vtctl/", `["GetKeyspace","ks1"]`, `{ diff --git a/go/vt/vtctld/api_utils.go b/go/vt/vtctld/api_utils.go deleted file mode 100644 index 772e15c1ce7..00000000000 --- a/go/vt/vtctld/api_utils.go +++ /dev/null @@ -1,500 +0,0 @@ -/* -Copyright 2022 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vtctld - -import ( - "fmt" - "sort" - "strings" - - "vitess.io/vitess/go/vt/discovery" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" - "vitess.io/vitess/go/vt/topo/topoproto" -) - -const ( - // tabletMissing represents a missing/non-existent tablet for any metric. - tabletMissing = -1 - // These values represent the threshold for replication lag. - lagThresholdDegraded = 60 - lagThresholdUnhealthy = 120 - // These values represent the health of the tablet - 1 is healthy, 2 is degraded, 3 is unhealthy - tabletHealthy = 0 - tabletDegraded = 1 - tabletUnhealthy = 2 -) - -type ( - // yLabel is used to keep track of the cell and type labels of the heatmap. - yLabel struct { - CellLabel label - TypeLabels []label - } - - // label is used to keep track of one label of a heatmap and how many rows it should span. - label struct { - Name string - Rowspan int - } - - // heatmap stores all the needed info to construct the heatmap. - heatmap struct { - // Data is a 2D array of values of the specified metric. - Data [][]float64 - // Aliases is a 2D array holding references to the tablet aliases. - Aliases [][]*topodatapb.TabletAlias - KeyspaceLabel label - CellAndTypeLabels []yLabel - ShardLabels []string - - // YGridLines is used to draw gridLines on the map in the right places. - YGridLines []float64 - } - - topologyInfo struct { - Keyspaces []string - Cells []string - TabletTypes []string - } -) - -// availableTabletTypes is an array of tabletTypes that are being considered to display on the heatmap. -// Note: this list must always be sorted by the order they should appear (i.e. PRIMARY first, then REPLICA, then RDONLY) -var availableTabletTypes = []topodatapb.TabletType{topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY} - -func makeStringTypeList(types []topodatapb.TabletType) []string { - var list []string - for _, t := range types { - list = append(list, t.String()) - } - return list -} - -func sortTypes(types map[topodatapb.TabletType]bool) []topodatapb.TabletType { - var listOfTypes []topodatapb.TabletType - for _, tabType := range availableTabletTypes { - if t := types[tabType]; t { - listOfTypes = append(listOfTypes, tabType) - } - } - return listOfTypes -} - -func health(stat *discovery.TabletHealth) float64 { - // The tablet is unhealthy if there is an health error. - if stat.Stats.HealthError != "" { - return tabletUnhealthy - } - - // The tablet is healthy/degraded/unheathy depending on the lag. - lag := stat.Stats.ReplicationLagSeconds - switch { - case lag >= lagThresholdUnhealthy: - return tabletUnhealthy - case lag >= lagThresholdDegraded: - return tabletDegraded - } - - // The tablet is degraded if there was an error previously. - if stat.LastError != nil { - return tabletDegraded - } - - // The tablet is healthy or degraded based on serving status. - if !stat.Serving { - return tabletDegraded - } - - // All else is ok so tablet is healthy. - return tabletHealthy -} - -func replicationLag(stat *discovery.TabletHealth) float64 { - return float64(stat.Stats.ReplicationLagSeconds) -} - -func qps(stat *discovery.TabletHealth) float64 { - return stat.Stats.Qps -} - -func getTabletHealthWithCellFilter(hc discovery.HealthCheck, ks, shard, cell string, tabletType topodatapb.TabletType) []*discovery.TabletHealth { - tabletTypeStr := topoproto.TabletTypeLString(tabletType) - m := hc.CacheStatusMap() - key := fmt.Sprintf("%v.%v.%v.%v", cell, ks, shard, strings.ToUpper(tabletTypeStr)) - if _, ok := m[key]; !ok { - return nil - } - return m[key].TabletsStats -} - -func getShardInKeyspace(hc discovery.HealthCheck, ks string) []string { - shards := []string{} - shardsMap := map[string]bool{} - cache := hc.CacheStatus() - for _, status := range cache { - if status.Target.Keyspace != ks { - continue - } - if ok := shardsMap[status.Target.Shard]; !ok { - shardsMap[status.Target.Shard] = true - shards = append(shards, status.Target.Shard) - } - } - return shards -} - -func getTabletTypesForKeyspaceShardAndCell(hc discovery.HealthCheck, ks, shard, cell string) []topodatapb.TabletType { - tabletTypes := []topodatapb.TabletType{} - tabletTypeMap := map[topodatapb.TabletType]bool{} - cache := hc.CacheStatus() - for _, status := range cache { - if status.Target.Keyspace != ks || status.Cell != cell || status.Target.Shard != shard { - continue - } - if ok := tabletTypeMap[status.Target.TabletType]; !ok { - tabletTypeMap[status.Target.TabletType] = true - tabletTypes = append(tabletTypes, status.Target.TabletType) - } - } - return tabletTypes -} - -func getTopologyInfo(healthcheck discovery.HealthCheck, selectedKeyspace, selectedCell string) *topologyInfo { - return &topologyInfo{ - Keyspaces: keyspacesLocked(healthcheck, "all"), - Cells: cellsInTopology(healthcheck, selectedKeyspace), - TabletTypes: makeStringTypeList(typesInTopology(healthcheck, selectedKeyspace, selectedCell)), - } -} - -// keyspacesLocked returns the keyspaces to be displayed in the heatmap based on the dropdown filters. -// It returns one keyspace if a specific one was chosen or returns all of them if 'all' is chosen. -// This method is used by heatmapData to traverse over desired keyspaces and -// topologyInfo to send all available options for the keyspace dropdown. -func keyspacesLocked(healthcheck discovery.HealthCheck, keyspace string) []string { - if keyspace != "all" { - return []string{keyspace} - } - seenKs := map[string]bool{} - keyspaces := []string{} - cache := healthcheck.CacheStatus() - for _, status := range cache { - if _, ok := seenKs[status.Target.Keyspace]; !ok { - seenKs[status.Target.Keyspace] = true - keyspaces = append(keyspaces, status.Target.Keyspace) - } - } - sort.Strings(keyspaces) - return keyspaces -} - -func getShardsForKeyspace(healthcheck discovery.HealthCheck, keyspace string) []string { - seenShards := map[string]bool{} - shards := []string{} - cache := healthcheck.CacheStatus() - for _, status := range cache { - if status.Target.Keyspace != keyspace { - continue - } - if _, ok := seenShards[status.Target.Shard]; !ok { - seenShards[status.Target.Shard] = true - shards = append(shards, status.Target.Shard) - } - } - sort.Strings(shards) - return shards -} - -// cellsInTopology returns all the cells in the given keyspace. -// If all keyspaces is chosen, it returns the cells from every keyspace. -// This method is used by topologyInfo to send all available options for the cell dropdown -func cellsInTopology(healthcheck discovery.HealthCheck, keyspace string) []string { - kss := []string{keyspace} - if keyspace == "all" { - kss = keyspacesLocked(healthcheck, keyspace) - } - cells := map[string]bool{} - cache := healthcheck.CacheStatus() - for _, status := range cache { - found := false - for _, ks := range kss { - if status.Target.Keyspace == ks { - found = true - break - } - } - if !found { - continue - } - if _, ok := cells[status.Cell]; !ok { - cells[status.Cell] = true - } - } - var cellList []string - for cell := range cells { - cellList = append(cellList, cell) - } - sort.Strings(cellList) - return cellList -} - -// typesInTopology returns all the types in the given keyspace and cell. -// If all keyspaces and cells is chosen, it returns the types from every cell in every keyspace. -// This method is used by topologyInfo to send all available options for the tablet type dropdown -func typesInTopology(healthcheck discovery.HealthCheck, keyspace, cell string) []topodatapb.TabletType { - keyspaces := keyspacesLocked(healthcheck, keyspace) - types := make(map[topodatapb.TabletType]bool) - // Going through the shards in every cell in every keyspace to get existing tablet types - for _, ks := range keyspaces { - cellsPerKeyspace := cellsLocked(healthcheck, ks, cell) - for _, cl := range cellsPerKeyspace { - shardsPerKeyspace := getShardInKeyspace(healthcheck, ks) - for _, s := range shardsPerKeyspace { - typesPerShard := getTabletTypesForKeyspaceShardAndCell(healthcheck, ks, s, cl) - for _, t := range typesPerShard { - types[t] = true - if len(types) == len(availableTabletTypes) { - break - } - } - } - } - } - typesList := sortTypes(types) - return typesList -} - -// tabletTypesLocked returns the tablet types needed to be displayed in the heatmap based on the dropdown filters. -// It returns tablet type if a specific one was chosen or returns all of them if 'all' is chosen for keyspace and/or cell. -// This method is used by heatmapData to traverse over the desired tablet types. -func tabletTypesLocked(healthcheck discovery.HealthCheck, keyspace, cell, tabletType string) []topodatapb.TabletType { - if tabletType != "all" { - tabletTypeObj, _ := topoproto.ParseTabletType(tabletType) - return []topodatapb.TabletType{tabletTypeObj} - } - return typesInTopology(healthcheck, keyspace, cell) -} - -// cellsLocked returns the cells needed to be displayed in the heatmap based on the dropdown filters. -// returns one cell if a specific one was chosen or returns all of them if 'all' is chosen. -// This method is used by heatmapData to traverse over the desired cells. -func cellsLocked(healthcheck discovery.HealthCheck, keyspace, cell string) []string { - if cell != "all" { - return []string{cell} - } - return cellsInTopology(healthcheck, keyspace) -} - -// aggregatedData gets heatmapData by taking the average of the metric value of all tablets within the keyspace and cell of the -// specified type (or from all types if 'all' was selected). -func aggregatedData(healthcheck discovery.HealthCheck, keyspace, cell, selectedType, selectedMetric string, metricFunc func(stats *discovery.TabletHealth) float64) ([][]float64, [][]*topodatapb.TabletAlias, yLabel) { - shards := getShardsForKeyspace(healthcheck, keyspace) - tabletTypes := tabletTypesLocked(healthcheck, keyspace, cell, selectedType) - - var cellData [][]float64 - dataRow := make([]float64, len(shards)) - // This loop goes through each shard in the (keyspace-cell) combination. - for shardIndex, shard := range shards { - var sum, count float64 - hasTablets := false - unhealthyFound := false - // Going through all the types of tablets and aggregating their information. - for _, tabletType := range tabletTypes { - tablets := getTabletHealthWithCellFilter(healthcheck, keyspace, shard, cell, tabletType) - if len(tablets) == 0 { - continue - } - for _, tablet := range tablets { - hasTablets = true - // If even one tablet is unhealthy then the entire group becomes unhealthy. - metricVal := metricFunc(tablet) - if (selectedMetric == "health" && metricVal == tabletUnhealthy) || - (selectedMetric == "lag" && metricVal > lagThresholdUnhealthy) { - sum = metricVal - count = 1 - unhealthyFound = true - break - } - sum += metricVal - count++ - } - if unhealthyFound { - break - } - } - if hasTablets { - dataRow[shardIndex] = sum / count - } else { - dataRow[shardIndex] = tabletMissing - } - } - cellData = append(cellData, dataRow) - cellLabel := yLabel{ - CellLabel: label{Name: cell, Rowspan: 1}, - } - - return cellData, nil, cellLabel -} - -func unaggregatedData(healthcheck discovery.HealthCheck, keyspace, cell, selectedType string, metricFunc func(stats *discovery.TabletHealth) float64) ([][]float64, [][]*topodatapb.TabletAlias, yLabel) { - // This loop goes through every nested label (in this case, tablet type). - var cellData [][]float64 - var cellAliases [][]*topodatapb.TabletAlias - var cellLabel yLabel - cellLabelSpan := 0 - tabletTypes := tabletTypesLocked(healthcheck, keyspace, cell, selectedType) - shards := getShardsForKeyspace(healthcheck, keyspace) - for _, tabletType := range tabletTypes { - maxRowLength := 0 - - // The loop calculates the maximum number of rows needed. - for _, shard := range shards { - tabletsCount := len(getTabletHealthWithCellFilter(healthcheck, keyspace, shard, cell, tabletType)) - if maxRowLength < tabletsCount { - maxRowLength = tabletsCount - } - } - - // dataRowsPerType is a 2D array that will hold the data of the tablets of one (cell, type) combination. - dataRowsPerType := make([][]float64, maxRowLength) - // aliasRowsPerType is a 2D array that will hold the aliases of the tablets of one (cell, type) combination. - aliasRowsPerType := make([][]*topodatapb.TabletAlias, maxRowLength) - for i := range dataRowsPerType { - dataRowsPerType[i] = make([]float64, len(shards)) - aliasRowsPerType[i] = make([]*topodatapb.TabletAlias, len(shards)) - } - - // Filling in the 2D array with tablet data by columns. - for shardIndex, shard := range shards { - for tabletIndex := 0; tabletIndex < maxRowLength; tabletIndex++ { - // If the key doesn't exist then the tablet must not exist so that data is set to -1 (tabletMissing). - filteredHealthData := getTabletHealthWithCellFilter(healthcheck, keyspace, shard, cell, tabletType) - if tabletIndex < len(filteredHealthData) { - dataRowsPerType[tabletIndex][shardIndex] = metricFunc(filteredHealthData[tabletIndex]) - aliasRowsPerType[tabletIndex][shardIndex] = filteredHealthData[tabletIndex].Tablet.Alias - } else { - dataRowsPerType[tabletIndex][shardIndex] = tabletMissing - aliasRowsPerType[tabletIndex][shardIndex] = nil - } - } - } - - if maxRowLength > 0 { - cellLabel.TypeLabels = append(cellLabel.TypeLabels, label{Name: tabletType.String(), Rowspan: maxRowLength}) - } - cellLabelSpan += maxRowLength - - for i := 0; i < len(dataRowsPerType); i++ { - cellData = append(cellData, dataRowsPerType[i]) - cellAliases = append(cellAliases, aliasRowsPerType[i]) - } - } - - cellLabel.CellLabel = label{Name: cell, Rowspan: cellLabelSpan} - - return cellData, cellAliases, cellLabel -} - -// heatmapData returns a 2D array of data (based on the specified metric) as well as the labels for the heatmap. -func heatmapData(healthcheck discovery.HealthCheck, selectedKeyspace, selectedCell, selectedTabletType, selectedMetric string) ([]heatmap, error) { - // Get the metric data. - var metricFunc func(stats *discovery.TabletHealth) float64 - switch selectedMetric { - case "lag": - metricFunc = replicationLag - case "qps": - metricFunc = qps - case "health": - metricFunc = health - default: - return nil, fmt.Errorf("invalid metric: %v Select 'lag', 'cpu', or 'qps'", selectedMetric) - } - - // Get the proper data (unaggregated tablets or aggregated tablets by types) - aggregated := false - if selectedKeyspace == "all" && selectedTabletType == "all" { - aggregated = true - } - - keyspaces := keyspacesLocked(healthcheck, selectedKeyspace) - var heatmaps []heatmap - for _, keyspace := range keyspaces { - var h heatmap - h.ShardLabels = getShardsForKeyspace(healthcheck, keyspace) - keyspaceLabelSpan := 0 - - cells := cellsLocked(healthcheck, keyspace, selectedCell) - // The loop goes through every outer label (in this case, cell). - for _, cell := range cells { - var cellData [][]float64 - var cellAliases [][]*topodatapb.TabletAlias - var cellLabel yLabel - - if aggregated { - cellData, cellAliases, cellLabel = aggregatedData(healthcheck, keyspace, cell, selectedTabletType, selectedMetric, metricFunc) - } else { - cellData, cellAliases, cellLabel = unaggregatedData(healthcheck, keyspace, cell, selectedTabletType, metricFunc) - } - - if cellLabel.CellLabel.Rowspan > 0 { - // Iterating over the rows of data for the current cell. - for i := 0; i < len(cellData); i++ { - // Adding the data in reverse to match the format that the plotly map takes in. - h.Data = append([][]float64{cellData[i]}, h.Data...) - if cellAliases != nil { - h.Aliases = append([][]*topodatapb.TabletAlias{cellAliases[i]}, h.Aliases...) - } - } - h.CellAndTypeLabels = append(h.CellAndTypeLabels, cellLabel) - } - keyspaceLabelSpan += cellLabel.CellLabel.Rowspan - } - - // Setting the values for the yGridLines by going in reverse and subtracting 0.5 as an offset. - sum := 0 - for c := len(h.CellAndTypeLabels) - 1; c >= 0; c-- { - // If the current view is aggregated then we need to traverse the cell labels - // to calculate the values for the grid line since that is the innermost label. - // For example if h.CellAndTypeLabels = - // { CellLabel: {Name: 'cell1', Rowspan: 2}, TypeLabels: nil }, - // { CellLabel: {Name: 'cell2', Rowspan: 3}, TypeLabels: nil }, - // then the resulting array will be [2.5, 4.5] which specifies the grid line indexes - // starting from 0 which is at the bottom of the heatmap. - if h.CellAndTypeLabels[c].TypeLabels == nil { - sum += h.CellAndTypeLabels[c].CellLabel.Rowspan - h.YGridLines = append(h.YGridLines, float64(sum)-0.5) - continue - } - // Otherwise traverse the type labels because that is the innermost label. - // For example if h.CellAndTypeLabels = - // { CellLabel: {Name: 'cell1', Rowspan: 3}, TypeLabels: [{Name: 'Primary', Rowspan: 1}, {Name: 'Replica', Rowspan: 2}] }, - // { CellLabel: {Name: 'cell2', Rowspan: 3}, TypeLabels: [{Name: 'Primary', Rowspan: 1}, {Name: 'Replica', Rowspan: 2}] }, - // then the resulting array will be [1.5, 2.5, 4.5, 5.5] which specifies the grid line indexes - // starting from 0 which is at the bottom of the heatmap. - for t := len(h.CellAndTypeLabels[c].TypeLabels) - 1; t >= 0; t-- { - sum += h.CellAndTypeLabels[c].TypeLabels[t].Rowspan - h.YGridLines = append(h.YGridLines, float64(sum)-0.5) - } - } - - h.KeyspaceLabel = label{Name: keyspace, Rowspan: keyspaceLabelSpan} - - heatmaps = append(heatmaps, h) - } - - return heatmaps, nil -} diff --git a/go/vt/vtctld/vtctld.go b/go/vt/vtctld/vtctld.go index 2b143882f21..b9ecef23162 100644 --- a/go/vt/vtctld/vtctld.go +++ b/go/vt/vtctld/vtctld.go @@ -26,10 +26,7 @@ import ( "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/acl" - "vitess.io/vitess/go/vt/discovery" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" - "vitess.io/vitess/go/vt/vtctl" "vitess.io/vitess/go/vt/wrangler" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -37,7 +34,6 @@ import ( ) var ( - enableRealtimeStats = false durabilityPolicy = "none" sanitizeLogMessages = false ) @@ -131,19 +127,8 @@ func InitVtctld(ts *topo.Server) error { return "", err }) - var healthCheck discovery.HealthCheck - if enableRealtimeStats { - ctx := context.Background() - cells, err := ts.GetKnownCells(ctx) - if err != nil { - log.Errorf("Failed to get the list of known cells, failed to instantiate the healthcheck at startup: %v", err) - } else { - healthCheck = vtctl.NewHealthCheck(ctx, ts, localCell, cells) - } - } - // Serve the REST API - initAPI(context.Background(), ts, actionRepo, healthCheck) + initAPI(context.Background(), ts, actionRepo) // Serve the topology endpoint in the REST API at /topodata initExplorer(ts) diff --git a/go/vt/vterrors/code.go b/go/vt/vterrors/code.go index 33de1d4e208..dab0de300db 100644 --- a/go/vt/vterrors/code.go +++ b/go/vt/vterrors/code.go @@ -41,9 +41,9 @@ var ( VT03016 = errorWithoutState("VT03016", vtrpcpb.Code_INVALID_ARGUMENT, "unknown vindex column: '%s'", "The given column is unknown in the vindex table.") VT03017 = errorWithState("VT03017", vtrpcpb.Code_INVALID_ARGUMENT, SyntaxError, "where clause can only be of the type 'pos > '", "This vstream where clause can only be a greater than filter.") VT03018 = errorWithoutState("VT03018", vtrpcpb.Code_INVALID_ARGUMENT, "NEXT used on a non-sequence table", "You cannot use the NEXT syntax on a table that is not a sequence table.") - VT03019 = errorWithoutState("VT03019", vtrpcpb.Code_INVALID_ARGUMENT, "symbol %s not found", "The given symbol was not found or is not available.") - VT03020 = errorWithoutState("VT03020", vtrpcpb.Code_INVALID_ARGUMENT, "symbol %s not found in subquery", "The given symbol was not found in the subquery.") - VT03021 = errorWithoutState("VT03021", vtrpcpb.Code_INVALID_ARGUMENT, "ambiguous symbol reference: %v", "The given symbol is ambiguous. You can use a table qualifier to make it unambiguous.") + VT03019 = errorWithoutState("VT03019", vtrpcpb.Code_INVALID_ARGUMENT, "column %s not found", "The given column was not found or is not available.") + VT03020 = errorWithoutState("VT03020", vtrpcpb.Code_INVALID_ARGUMENT, "column %s not found in subquery", "The given column was not found in the subquery.") + VT03021 = errorWithoutState("VT03021", vtrpcpb.Code_INVALID_ARGUMENT, "ambiguous column reference: %v", "The given column is ambiguous. You can use a table qualifier to make it unambiguous.") VT03022 = errorWithoutState("VT03022", vtrpcpb.Code_INVALID_ARGUMENT, "column %v not found in %v", "The given column cannot be found.") VT03023 = errorWithoutState("VT03023", vtrpcpb.Code_INVALID_ARGUMENT, "INSERT not supported when targeting a key range: %s", "When targeting a range of shards, Vitess does not know which shard to send the INSERT to.") diff --git a/go/vt/vtexplain/testdata/multi-output/comments-output.txt b/go/vt/vtexplain/testdata/multi-output/comments-output.txt index db6c63b250a..030163fb111 100644 --- a/go/vt/vtexplain/testdata/multi-output/comments-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/comments-output.txt @@ -17,25 +17,25 @@ select /* ; */ 1 from user ---------------------------------------------------------------------- select 1 from user where x=';' -1 ks_sharded/-40: select 1 from `user` where x = ';' limit 10001 -1 ks_sharded/40-80: select 1 from `user` where x = ';' limit 10001 -1 ks_sharded/80-c0: select 1 from `user` where x = ';' limit 10001 -1 ks_sharded/c0-: select 1 from `user` where x = ';' limit 10001 +1 ks_sharded/-40: select 1 from `user` where x = ';' limit 10001 /* VARCHAR */ +1 ks_sharded/40-80: select 1 from `user` where x = ';' limit 10001 /* VARCHAR */ +1 ks_sharded/80-c0: select 1 from `user` where x = ';' limit 10001 /* VARCHAR */ +1 ks_sharded/c0-: select 1 from `user` where x = ';' limit 10001 /* VARCHAR */ ---------------------------------------------------------------------- select 1 from user where x='/* hello */' -1 ks_sharded/-40: select 1 from `user` where x = '/* hello */' limit 10001 -1 ks_sharded/40-80: select 1 from `user` where x = '/* hello */' limit 10001 -1 ks_sharded/80-c0: select 1 from `user` where x = '/* hello */' limit 10001 -1 ks_sharded/c0-: select 1 from `user` where x = '/* hello */' limit 10001 +1 ks_sharded/-40: select 1 from `user` where x = '/* hello */' limit 10001 /* VARCHAR */ +1 ks_sharded/40-80: select 1 from `user` where x = '/* hello */' limit 10001 /* VARCHAR */ +1 ks_sharded/80-c0: select 1 from `user` where x = '/* hello */' limit 10001 /* VARCHAR */ +1 ks_sharded/c0-: select 1 from `user` where x = '/* hello */' limit 10001 /* VARCHAR */ ---------------------------------------------------------------------- select 1 from user where x='/* ; */' -1 ks_sharded/-40: select 1 from `user` where x = '/* ; */' limit 10001 -1 ks_sharded/40-80: select 1 from `user` where x = '/* ; */' limit 10001 -1 ks_sharded/80-c0: select 1 from `user` where x = '/* ; */' limit 10001 -1 ks_sharded/c0-: select 1 from `user` where x = '/* ; */' limit 10001 +1 ks_sharded/-40: select 1 from `user` where x = '/* ; */' limit 10001 /* VARCHAR */ +1 ks_sharded/40-80: select 1 from `user` where x = '/* ; */' limit 10001 /* VARCHAR */ +1 ks_sharded/80-c0: select 1 from `user` where x = '/* ; */' limit 10001 /* VARCHAR */ +1 ks_sharded/c0-: select 1 from `user` where x = '/* ; */' limit 10001 /* VARCHAR */ ---------------------------------------------------------------------- diff --git a/go/vt/vtexplain/testdata/multi-output/deletesharded-output.txt b/go/vt/vtexplain/testdata/multi-output/deletesharded-output.txt index e6edbcdb0d1..d88fddbfd4f 100644 --- a/go/vt/vtexplain/testdata/multi-output/deletesharded-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/deletesharded-output.txt @@ -2,14 +2,14 @@ delete from music_extra where id=1 1 ks_sharded/-40: begin -1 ks_sharded/-40: delete from music_extra where id = 1 limit 10001 +1 ks_sharded/-40: delete from music_extra where id = 1 limit 10001 /* INT64 */ 1 ks_sharded/-40: commit ---------------------------------------------------------------------- delete from music_extra where id=1 and extra='abc' 1 ks_sharded/-40: begin -1 ks_sharded/-40: delete from music_extra where id = 1 and extra = 'abc' limit 10001 +1 ks_sharded/-40: delete from music_extra where id = 1 and extra = 'abc' limit 10001 /* VARCHAR */ 1 ks_sharded/-40: commit ---------------------------------------------------------------------- @@ -19,7 +19,7 @@ delete from user where id=1 1 ks_sharded/-40: select id, `name` from `user` where id = 1 limit 10001 for update 2 ks_sharded/40-80: begin 2 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001 -3 ks_sharded/-40: delete from `user` where id = 1 limit 10001 +3 ks_sharded/-40: delete from `user` where id = 1 limit 10001 /* INT64 */ 4 ks_sharded/-40: commit 5 ks_sharded/40-80: commit @@ -32,7 +32,7 @@ delete from user where name='billy' 2 ks_sharded/-40: select id, `name` from `user` where `name` = 'billy' limit 10001 for update 3 ks_sharded/40-80: begin 3 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001 -4 ks_sharded/-40: delete from `user` where `name` = 'billy' limit 10001 +4 ks_sharded/-40: delete from `user` where `name` = 'billy' limit 10001 /* VARCHAR */ 5 ks_sharded/c0-: commit 6 ks_sharded/-40: commit 7 ks_sharded/40-80: commit @@ -41,24 +41,24 @@ delete from user where name='billy' delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra='abc' 1 ks_sharded/-40: begin -1 ks_sharded/-40: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 +1 ks_sharded/-40: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 /* VARCHAR */ 1 ks_sharded/-40: commit 1 ks_sharded/40-80: begin -1 ks_sharded/40-80: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 +1 ks_sharded/40-80: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 /* VARCHAR */ 1 ks_sharded/40-80: commit 1 ks_sharded/80-c0: begin -1 ks_sharded/80-c0: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 +1 ks_sharded/80-c0: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 /* VARCHAR */ 1 ks_sharded/80-c0: commit 1 ks_sharded/c0-: begin -1 ks_sharded/c0-: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 +1 ks_sharded/c0-: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10001 /* VARCHAR */ 1 ks_sharded/c0-: commit ---------------------------------------------------------------------- delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from `ks_sharded[-]`.music_extra where extra='abc' LIMIT 10 -1 ks_sharded/-40: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 -1 ks_sharded/40-80: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 -1 ks_sharded/80-c0: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 -1 ks_sharded/c0-: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 +1 ks_sharded/-40: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 /* INT64 */ +1 ks_sharded/40-80: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 /* INT64 */ +1 ks_sharded/80-c0: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 /* INT64 */ +1 ks_sharded/c0-: delete /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ from music_extra where extra = 'abc' limit 10 /* INT64 */ ---------------------------------------------------------------------- diff --git a/go/vt/vtexplain/testdata/multi-output/gen4-output.txt b/go/vt/vtexplain/testdata/multi-output/gen4-output.txt index 826f51e12ae..e3e58379aa5 100644 --- a/go/vt/vtexplain/testdata/multi-output/gen4-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/gen4-output.txt @@ -1,12 +1,12 @@ ---------------------------------------------------------------------- select * from user_region where regionId = 4611686018427387904 and userId = 100 /* exact shard */ -1 ks_sharded/40-80: select * from user_region where regionId = 4611686018427387904 and userId = 100 limit 10001 /* exact shard */ +1 ks_sharded/40-80: select * from user_region where regionId = 4611686018427387904 and userId = 100 limit 10001 /* INT64 */ /* exact shard */ ---------------------------------------------------------------------- select * from user_region where regionId = 4611686018427387904 /* subshard */ -1 ks_sharded/40-80: select * from user_region where regionId = 4611686018427387904 limit 10001 /* subshard */ +1 ks_sharded/40-80: select * from user_region where regionId = 4611686018427387904 limit 10001 /* INT64 */ /* subshard */ ---------------------------------------------------------------------- select * from user_region where regionId in (4611686018427387903, 4611686018427387904) /* subshard */ @@ -17,9 +17,9 @@ select * from user_region where regionId in (4611686018427387903, 46116860184273 ---------------------------------------------------------------------- select * from user_region where userId = 100 /* scatter, needs prefix columns for subshard routing */ -1 ks_sharded/-40: select * from user_region where userId = 100 limit 10001 /* scatter, needs prefix columns for subshard routing */ -1 ks_sharded/40-80: select * from user_region where userId = 100 limit 10001 /* scatter, needs prefix columns for subshard routing */ -1 ks_sharded/80-c0: select * from user_region where userId = 100 limit 10001 /* scatter, needs prefix columns for subshard routing */ -1 ks_sharded/c0-: select * from user_region where userId = 100 limit 10001 /* scatter, needs prefix columns for subshard routing */ +1 ks_sharded/-40: select * from user_region where userId = 100 limit 10001 /* INT64 */ /* scatter, needs prefix columns for subshard routing */ +1 ks_sharded/40-80: select * from user_region where userId = 100 limit 10001 /* INT64 */ /* scatter, needs prefix columns for subshard routing */ +1 ks_sharded/80-c0: select * from user_region where userId = 100 limit 10001 /* INT64 */ /* scatter, needs prefix columns for subshard routing */ +1 ks_sharded/c0-: select * from user_region where userId = 100 limit 10001 /* INT64 */ /* scatter, needs prefix columns for subshard routing */ ---------------------------------------------------------------------- diff --git a/go/vt/vtexplain/testdata/multi-output/insertsharded-output.txt b/go/vt/vtexplain/testdata/multi-output/insertsharded-output.txt index 95e4823abce..9227ddd6797 100644 --- a/go/vt/vtexplain/testdata/multi-output/insertsharded-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/insertsharded-output.txt @@ -47,7 +47,7 @@ insert into user (id, name, nickname) values(2, 'bob', 'bobby') on duplicate key 1 ks_sharded/c0-: insert ignore into name_user_map(`name`, user_id) values ('bob', 2) 2 ks_sharded/c0-: select `name` from name_user_map where `name` = 'bob' and user_id = 2 limit 10001 3 ks_sharded/-40: begin -3 ks_sharded/-40: insert into `user`(id, `name`, nickname) values (2, 'bob', 'bobby') on duplicate key update nickname = 'bobby' +3 ks_sharded/-40: insert into `user`(id, `name`, nickname) values (2, 'bob', 'bobby') on duplicate key update nickname = 'bobby' /* VARCHAR */ 4 ks_sharded/c0-: commit 5 ks_sharded/-40: commit @@ -82,10 +82,10 @@ insert into member (lkp, more_id, id) values ("a", 1, 1), ("b", 1, 3), ("c", 1, 4 ks_sharded/40-80: select lkp from lkp_idx where lkp = 'c' and id = 1 limit 10001 5 ks_sharded/-40: begin 5 ks_sharded/-40: savepoint x1 -5 ks_sharded/-40: insert into `member`(lkp, more_id, id) values ('a', 1, 1), ('c', 1, 1) on duplicate key update more_id = 2 +5 ks_sharded/-40: insert into `member`(lkp, more_id, id) values ('a', 1, 1), ('c', 1, 1) on duplicate key update more_id = 2 /* INT64 */ 5 ks_sharded/40-80: begin 5 ks_sharded/40-80: savepoint x1 -5 ks_sharded/40-80: insert into `member`(lkp, more_id, id) values ('b', 1, 3) on duplicate key update more_id = 2 +5 ks_sharded/40-80: insert into `member`(lkp, more_id, id) values ('b', 1, 3) on duplicate key update more_id = 2 /* INT64 */ ---------------------------------------------------------------------- commit @@ -93,4 +93,4 @@ commit 6 ks_sharded/-40: commit 7 ks_sharded/40-80: commit ----------------------------------------------------------------------- \ No newline at end of file +---------------------------------------------------------------------- diff --git a/go/vt/vtexplain/testdata/multi-output/selectsharded-output.txt b/go/vt/vtexplain/testdata/multi-output/selectsharded-output.txt index b7d0c359002..4cba82b3945 100644 --- a/go/vt/vtexplain/testdata/multi-output/selectsharded-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/selectsharded-output.txt @@ -9,29 +9,29 @@ select * from user /* scatter */ ---------------------------------------------------------------------- select * from user where id = 1 /* equal unique */ -1 ks_sharded/-40: select * from `user` where id = 1 limit 10001 /* equal unique */ +1 ks_sharded/-40: select * from `user` where id = 1 limit 10001 /* INT64 */ /* equal unique */ ---------------------------------------------------------------------- select * from user where id > 100 /* scatter range */ -1 ks_sharded/-40: select * from `user` where id > 100 limit 10001 /* scatter range */ -1 ks_sharded/40-80: select * from `user` where id > 100 limit 10001 /* scatter range */ -1 ks_sharded/80-c0: select * from `user` where id > 100 limit 10001 /* scatter range */ -1 ks_sharded/c0-: select * from `user` where id > 100 limit 10001 /* scatter range */ +1 ks_sharded/-40: select * from `user` where id > 100 limit 10001 /* INT64 */ /* scatter range */ +1 ks_sharded/40-80: select * from `user` where id > 100 limit 10001 /* INT64 */ /* scatter range */ +1 ks_sharded/80-c0: select * from `user` where id > 100 limit 10001 /* INT64 */ /* scatter range */ +1 ks_sharded/c0-: select * from `user` where id > 100 limit 10001 /* INT64 */ /* scatter range */ ---------------------------------------------------------------------- select * from user where name = 'bob' /* vindex lookup */ 1 ks_sharded/c0-: select `name`, user_id from name_user_map where `name` in ('bob') limit 10001 /* vindex lookup */ -2 ks_sharded/-40: select * from `user` where `name` = 'bob' limit 10001 /* vindex lookup */ +2 ks_sharded/-40: select * from `user` where `name` = 'bob' limit 10001 /* VARCHAR */ /* vindex lookup */ ---------------------------------------------------------------------- select * from user where name = 'bob' or nickname = 'bob' /* vindex lookup */ -1 ks_sharded/-40: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* vindex lookup */ -1 ks_sharded/40-80: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* vindex lookup */ -1 ks_sharded/80-c0: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* vindex lookup */ -1 ks_sharded/c0-: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* vindex lookup */ +1 ks_sharded/-40: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* VARCHAR */ /* vindex lookup */ +1 ks_sharded/40-80: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* VARCHAR */ /* vindex lookup */ +1 ks_sharded/80-c0: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* VARCHAR */ /* vindex lookup */ +1 ks_sharded/c0-: select * from `user` where `name` = 'bob' or nickname = 'bob' limit 10001 /* VARCHAR */ /* vindex lookup */ ---------------------------------------------------------------------- select u.id, u.name, u.nickname, n.info from user u join name_info n on u.name = n.name /* join on varchar */ @@ -48,13 +48,13 @@ select u.id, u.name, u.nickname, n.info from user u join name_info n on u.name = ---------------------------------------------------------------------- select m.id, m.song, e.extra from music m join music_extra e on m.id = e.id where m.user_id = 100 /* join on int */ -1 ks_sharded/80-c0: select m.id, m.song from music as m where m.user_id = 100 limit 10001 /* join on int */ +1 ks_sharded/80-c0: select m.id, m.song from music as m where m.user_id = 100 limit 10001 /* INT64 */ /* join on int */ 2 ks_sharded/-40: select e.extra from music_extra as e where e.id = 1 limit 10001 /* join on int */ ---------------------------------------------------------------------- select count(*) from user where id = 1 /* point aggregate */ -1 ks_sharded/-40: select count(*) from `user` where id = 1 limit 10001 /* point aggregate */ +1 ks_sharded/-40: select count(*) from `user` where id = 1 limit 10001 /* INT64 */ /* point aggregate */ ---------------------------------------------------------------------- select count(*) from user where name in ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j') /* scatter aggregate */ @@ -145,48 +145,48 @@ select * from name_info order by info /* select * and order by varchar column */ ---------------------------------------------------------------------- select distinct(name) from user where id = 1 /* select distinct */ -1 ks_sharded/-40: select distinct `name` from `user` where id = 1 limit 10001 /* select distinct */ +1 ks_sharded/-40: select distinct `name` from `user` where id = 1 limit 10001 /* INT64 */ /* select distinct */ ---------------------------------------------------------------------- select distinct name from user where id = 1 /* select distinct */ -1 ks_sharded/-40: select distinct `name` from `user` where id = 1 limit 10001 /* select distinct */ +1 ks_sharded/-40: select distinct `name` from `user` where id = 1 limit 10001 /* INT64 */ /* select distinct */ ---------------------------------------------------------------------- select id, substring(name, 1, -1) from user where id = 123 /* select substring */ -1 ks_sharded/-40: select id, substr(`name`, 1, -1) from `user` where id = 123 limit 10001 /* select substring */ +1 ks_sharded/-40: select id, substr(`name`, 1, -1) from `user` where id = 123 limit 10001 /* INT64 */ /* select substring */ ---------------------------------------------------------------------- select id, substring_index(name, '123456', -1) from user where id = 123 /* select substring_index */ -1 ks_sharded/-40: select id, substring_index(`name`, '123456', -1) from `user` where id = 123 limit 10001 /* select substring_index */ +1 ks_sharded/-40: select id, substring_index(`name`, '123456', -1) from `user` where id = 123 limit 10001 /* INT64 */ /* select substring_index */ ---------------------------------------------------------------------- select id, case when name = 'alice' then 'ALICE' when name = 'bob' then 'BOB' end as name from user where id = 1 /* select case */ -1 ks_sharded/-40: select id, case when `name` = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' end as `name` from `user` where id = 1 limit 10001 /* select case */ +1 ks_sharded/-40: select id, case when `name` = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' end as `name` from `user` where id = 1 limit 10001 /* INT64 */ /* select case */ ---------------------------------------------------------------------- select id, case when name = 'alice' then 'ALICE' when name = 'bob' then 'BOB' else 'OTHER' end as name from user where id = 1 /* select case */ -1 ks_sharded/-40: select id, case when `name` = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' else 'OTHER' end as `name` from `user` where id = 1 limit 10001 /* select case */ +1 ks_sharded/-40: select id, case when `name` = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' else 'OTHER' end as `name` from `user` where id = 1 limit 10001 /* INT64 */ /* select case */ ---------------------------------------------------------------------- select id, case when substr(name, 1, 5) = 'alice' then 'ALICE' when name = 'bob' then 'BOB' else 'OTHER' end as name from user where id = 1 /* select case */ -1 ks_sharded/-40: select id, case when substr(`name`, 1, 5) = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' else 'OTHER' end as `name` from `user` where id = 1 limit 10001 /* select case */ +1 ks_sharded/-40: select id, case when substr(`name`, 1, 5) = 'alice' then 'ALICE' when `name` = 'bob' then 'BOB' else 'OTHER' end as `name` from `user` where id = 1 limit 10001 /* INT64 */ /* select case */ ---------------------------------------------------------------------- select id, 'abc' as test from user where id = 1 union all select id, 'def' as test from user where id = 1 union all select id, 'ghi' as test from user where id = 1 /* union all */ -1 ks_sharded/-40: select id, 'abc' as test from `user` where id = 1 union all select id, 'def' as test from `user` where id = 1 union all select id, 'ghi' as test from `user` where id = 1 limit 10001 /* union all */ +1 ks_sharded/-40: select id, 'abc' as test from `user` where id = 1 union all select id, 'def' as test from `user` where id = 1 union all select id, 'ghi' as test from `user` where id = 1 limit 10001 /* INT64 */ /* union all */ ---------------------------------------------------------------------- select id from user where not id in (select col from music where music.user_id = 42) and id in (select col from music where music.user_id = 411) -1 ks_sharded/40-80: select col from music where music.user_id = 411 limit 10001 -2 ks_sharded/40-80: select col from music where music.user_id = 42 limit 10001 +1 ks_sharded/40-80: select col from music where music.user_id = 411 limit 10001 /* INT64 */ +2 ks_sharded/40-80: select col from music where music.user_id = 42 limit 10001 /* INT64 */ ---------------------------------------------------------------------- SELECT user.id, user.name, name_info.info FROM user INNER JOIN music ON (user.id = music.user_id) LEFT OUTER JOIN name_info ON (user.name = name_info.name) diff --git a/go/vt/vtexplain/testdata/multi-output/unsharded-output.txt b/go/vt/vtexplain/testdata/multi-output/unsharded-output.txt index 0adc5661077..aab1ab0234f 100644 --- a/go/vt/vtexplain/testdata/multi-output/unsharded-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/unsharded-output.txt @@ -17,27 +17,27 @@ insert into t1 (id,intval,floatval) values (1,2,3.14) update t1 set intval = 10 1 ks_unsharded/-: begin -1 ks_unsharded/-: update t1 set intval = 10 limit 10001 +1 ks_unsharded/-: update t1 set intval = 10 limit 10001 /* INT64 */ 1 ks_unsharded/-: commit ---------------------------------------------------------------------- update t1 set floatval = 9.99 1 ks_unsharded/-: begin -1 ks_unsharded/-: update t1 set floatval = 9.99 limit 10001 +1 ks_unsharded/-: update t1 set floatval = 9.99 limit 10001 /* DECIMAL */ 1 ks_unsharded/-: commit ---------------------------------------------------------------------- delete from t1 where id = 100 1 ks_unsharded/-: begin -1 ks_unsharded/-: delete from t1 where id = 100 limit 10001 +1 ks_unsharded/-: delete from t1 where id = 100 limit 10001 /* INT64 */ 1 ks_unsharded/-: commit ---------------------------------------------------------------------- insert into t1 (id,intval,floatval) values (1,2,3.14) on duplicate key update intval=3, floatval=3.14 -1 ks_unsharded/-: insert into t1(id, intval, floatval) values (1, 2, 3.14) on duplicate key update intval = 3, floatval = 3.14 +1 ks_unsharded/-: insert into t1(id, intval, floatval) values (1, 2, 3.14) on duplicate key update intval = 3, floatval = 3.14 /* DECIMAL */ ---------------------------------------------------------------------- select ID from t1 diff --git a/go/vt/vtexplain/testdata/multi-output/updatesharded-output.txt b/go/vt/vtexplain/testdata/multi-output/updatesharded-output.txt index 41723325eba..b5e055bd856 100644 --- a/go/vt/vtexplain/testdata/multi-output/updatesharded-output.txt +++ b/go/vt/vtexplain/testdata/multi-output/updatesharded-output.txt @@ -2,7 +2,7 @@ update user set nickname='alice' where id=1 1 ks_sharded/-40: begin -1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 +1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 /* INT64 */ 1 ks_sharded/-40: commit ---------------------------------------------------------------------- @@ -11,7 +11,7 @@ update user set nickname='alice' where name='alice' 1 ks_sharded/40-80: begin 1 ks_sharded/40-80: select `name`, user_id from name_user_map where `name` in ('alice') limit 10001 for update 2 ks_sharded/-40: begin -2 ks_sharded/-40: update `user` set nickname = 'alice' where `name` = 'alice' limit 10001 +2 ks_sharded/-40: update `user` set nickname = 'alice' where `name` = 'alice' limit 10001 /* VARCHAR */ 3 ks_sharded/40-80: commit 4 ks_sharded/-40: commit @@ -19,7 +19,7 @@ update user set nickname='alice' where name='alice' update user set pet='fido' where id=1 1 ks_sharded/-40: begin -1 ks_sharded/-40: update `user` set pet = 'fido' where id = 1 limit 10001 +1 ks_sharded/-40: update `user` set pet = 'fido' where id = 1 limit 10001 /* INT64 */ 1 ks_sharded/-40: commit ---------------------------------------------------------------------- @@ -31,7 +31,7 @@ update user set name='alicia' where id=1 2 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001 3 ks_sharded/c0-: begin 3 ks_sharded/c0-: insert into name_user_map(`name`, user_id) values ('alicia', 1) -4 ks_sharded/-40: update `user` set `name` = 'alicia' where id = 1 limit 10001 +4 ks_sharded/-40: update `user` set `name` = 'alicia' where id = 1 limit 10001 /* INT64 */ 5 ks_sharded/-40: commit 6 ks_sharded/40-80: commit 7 ks_sharded/c0-: commit @@ -46,7 +46,7 @@ update user set name='alicia' where name='alice' 3 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001 4 ks_sharded/c0-: begin 4 ks_sharded/c0-: insert into name_user_map(`name`, user_id) values ('alicia', 1) -5 ks_sharded/-40: update `user` set `name` = 'alicia' where `name` = 'alice' limit 10001 +5 ks_sharded/-40: update `user` set `name` = 'alicia' where `name` = 'alice' limit 10001 /* VARCHAR */ 6 ks_sharded/40-80: commit 7 ks_sharded/-40: commit 8 ks_sharded/c0-: commit @@ -55,16 +55,16 @@ update user set name='alicia' where name='alice' update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info='apa' where name != 'hog' 1 ks_sharded/-40: begin -1 ks_sharded/-40: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 +1 ks_sharded/-40: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 /* VARCHAR */ 1 ks_sharded/-40: commit 1 ks_sharded/40-80: begin -1 ks_sharded/40-80: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 +1 ks_sharded/40-80: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 /* VARCHAR */ 1 ks_sharded/40-80: commit 1 ks_sharded/80-c0: begin -1 ks_sharded/80-c0: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 +1 ks_sharded/80-c0: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 /* VARCHAR */ 1 ks_sharded/80-c0: commit 1 ks_sharded/c0-: begin -1 ks_sharded/c0-: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 +1 ks_sharded/c0-: update /*vt+ MULTI_SHARD_AUTOCOMMIT=1 */ name_info set info = 'apa' where `name` != 'hog' limit 10001 /* VARCHAR */ 1 ks_sharded/c0-: commit ---------------------------------------------------------------------- @@ -73,7 +73,7 @@ update user set pet='rover' where name='alice' 1 ks_sharded/40-80: begin 1 ks_sharded/40-80: select `name`, user_id from name_user_map where `name` in ('alice') limit 10001 for update 2 ks_sharded/-40: begin -2 ks_sharded/-40: update `user` set pet = 'rover' where `name` = 'alice' limit 10001 +2 ks_sharded/-40: update `user` set pet = 'rover' where `name` = 'alice' limit 10001 /* VARCHAR */ 3 ks_sharded/40-80: commit 4 ks_sharded/-40: commit @@ -85,12 +85,12 @@ begin update user set nickname='alice' where id=1 1 ks_sharded/-40: begin -1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 +1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 /* INT64 */ ---------------------------------------------------------------------- update user set nickname='bob' where id=1 -2 ks_sharded/-40: update `user` set nickname = 'bob' where id = 1 limit 10001 +2 ks_sharded/-40: update `user` set nickname = 'bob' where id = 1 limit 10001 /* INT64 */ ---------------------------------------------------------------------- commit @@ -105,13 +105,13 @@ begin update user set nickname='alice' where id=1 1 ks_sharded/-40: begin -1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 +1 ks_sharded/-40: update `user` set nickname = 'alice' where id = 1 limit 10001 /* INT64 */ ---------------------------------------------------------------------- update user set nickname='bob' where id=3 2 ks_sharded/40-80: begin -2 ks_sharded/40-80: update `user` set nickname = 'bob' where id = 3 limit 10001 +2 ks_sharded/40-80: update `user` set nickname = 'bob' where id = 3 limit 10001 /* INT64 */ ---------------------------------------------------------------------- commit diff --git a/go/vt/vtexplain/vtexplain.go b/go/vt/vtexplain/vtexplain.go index 9153c535bac..74810dc618f 100644 --- a/go/vt/vtexplain/vtexplain.go +++ b/go/vt/vtexplain/vtexplain.go @@ -299,7 +299,6 @@ func (vte *VTExplain) Run(sql string) ([]*Explain, error) { if vte.vtgateSession == nil || !vte.vtgateSession.GetInTransaction() { vte.batchTime = sync2.NewBatcher(batchInterval) } - log.V(100).Infof("explain %s", sql) e, err := vte.explain(sql) if err != nil { return nil, err diff --git a/go/vt/vtexplain/vtexplain_test.go b/go/vt/vtexplain/vtexplain_test.go index 8145c59b44d..30fd289b671 100644 --- a/go/vt/vtexplain/vtexplain_test.go +++ b/go/vt/vtexplain/vtexplain_test.go @@ -24,15 +24,15 @@ import ( "strings" "testing" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv/tabletenvtest" - "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/key" - querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv/tabletenvtest" + + querypb "vitess.io/vitess/go/vt/proto/query" ) func defaultTestOpts() *Options { @@ -261,7 +261,7 @@ func TestJSONOutput(t *testing.T) { "ks_sharded/-40": { "MysqlQueries": [ { - "SQL": "select 1 from ` + "`user`" + ` where id = 1 limit 10001", + "SQL": "select 1 from ` + "`user`" + ` where id = 1 limit 10001 /* INT64 */", "Time": 1 } ], @@ -271,7 +271,7 @@ func TestJSONOutput(t *testing.T) { "#maxLimit": "10001", "vtg1": "1" }, - "SQL": "select :vtg1 from ` + "`user`" + ` where id = :vtg1", + "SQL": "select :vtg1 /* INT64 */ from ` + "`user`" + ` where id = :vtg1 /* INT64 */", "Time": 1 } ] diff --git a/go/vt/vtexplain/vtexplain_vtgate.go b/go/vt/vtexplain/vtexplain_vtgate.go index a4287377c4b..676e9757266 100644 --- a/go/vt/vtexplain/vtexplain_vtgate.go +++ b/go/vt/vtexplain/vtexplain_vtgate.go @@ -25,6 +25,7 @@ import ( "sort" "strings" + "vitess.io/vitess/go/vt/vtgate/logstats" "vitess.io/vitess/go/vt/vtgate/vindexes" "vitess.io/vitess/go/cache" @@ -75,7 +76,7 @@ func (vte *VTExplain) initVtgateExecutor(vSchemaStr, ksShardMapStr string, opts vte.vtgateExecutor = vtgate.NewExecutor(context.Background(), vte.explainTopo, vtexplainCell, resolver, opts.Normalize, false, streamSize, cache.DefaultConfig, schemaTracker, false, opts.PlannerVersion) queryLogBufferSize := 10 - vtgate.SetQueryLogger(streamlog.New("VTGate", queryLogBufferSize)) + vtgate.SetQueryLogger(streamlog.New[*logstats.LogStats]("VTGate", queryLogBufferSize)) return nil } diff --git a/go/vt/vtexplain/vtexplain_vttablet.go b/go/vt/vtexplain/vtexplain_vttablet.go index 4f0a3f7d102..8fcda129219 100644 --- a/go/vt/vtexplain/vtexplain_vttablet.go +++ b/go/vt/vtexplain/vtexplain_vttablet.go @@ -18,7 +18,6 @@ package vtexplain import ( "context" - "encoding/json" "fmt" "reflect" "strings" @@ -497,6 +496,30 @@ func (t *explainTablet) HandleQuery(c *mysql.Conn, query string, callback func(* t.mu.Lock() defer t.mu.Unlock() + // If query is part of rejected list then return error right away. + if err := t.db.GetRejectedQueryResult(query); err != nil { + return err + } + + // If query is expected to have a specific result then return the result. + if result := t.db.GetQueryResult(query); result != nil { + if f := result.BeforeFunc; f != nil { + f() + } + return callback(result.Result) + } + + // return result if query is part of defined pattern. + if userCallback, expResult, ok, err := t.db.GetQueryPatternResult(query); ok { + if userCallback != nil { + userCallback(query) + } + if err != nil { + return err + } + return callback(expResult.Result) + } + if !strings.Contains(query, "1 != 1") { t.mysqlQueries = append(t.mysqlQueries, &MysqlQuery{ Time: t.currentTime, @@ -514,6 +537,7 @@ func (t *explainTablet) HandleQuery(c *mysql.Conn, query string, callback func(* if result != nil { return callback(result) } + switch sqlparser.Preview(query) { case sqlparser.StmtSelect: var err error @@ -637,9 +661,6 @@ func (t *explainTablet) handleSelect(query string) (*sqltypes.Result, error) { InsertID: 0, Rows: rows, } - - resultJSON, _ := json.MarshalIndent(result, "", " ") - log.V(100).Infof("query %s result %s\n", query, string(resultJSON)) return result, nil } diff --git a/go/vt/vtgate/endtoend/lookup_test.go b/go/vt/vtgate/endtoend/lookup_test.go index f609cb1202e..01fc3aee32d 100644 --- a/go/vt/vtgate/endtoend/lookup_test.go +++ b/go/vt/vtgate/endtoend/lookup_test.go @@ -62,7 +62,7 @@ func TestConsistentLookup(t *testing.T) { exec(t, conn, "rollback") require.Error(t, err) mysqlErr := err.(*mysql.SQLError) - assert.Equal(t, 1062, mysqlErr.Num) + assert.Equal(t, mysql.ERDupEntry, mysqlErr.Num) assert.Equal(t, "23000", mysqlErr.State) // Simple delete. diff --git a/go/vt/vtgate/endtoend/main_test.go b/go/vt/vtgate/endtoend/main_test.go index 48872965cb9..1bf13ceadb5 100644 --- a/go/vt/vtgate/endtoend/main_test.go +++ b/go/vt/vtgate/endtoend/main_test.go @@ -50,6 +50,12 @@ create table t1_copy_basic( primary key(id1) ) Engine=InnoDB; +create table t1_copy_all( + id1 bigint, + id2 bigint, + primary key(id1) +) Engine=InnoDB; + create table t1_copy_resume( id1 bigint, id2 bigint, @@ -150,6 +156,12 @@ create table t1_sharded( Name: "hash", }}, }, + "t1_copy_all": { + ColumnVindexes: []*vschemapb.ColumnVindex{{ + Column: "id1", + Name: "hash", + }}, + }, "t1_copy_resume": { ColumnVindexes: []*vschemapb.ColumnVindex{{ Column: "id1", @@ -217,6 +229,31 @@ create table t1_sharded( }, }, } + + schema2 = ` +create table t1_copy_all_ks2( + id1 bigint, + id2 bigint, + primary key(id1) +) Engine=InnoDB; +` + + vschema2 = &vschemapb.Keyspace{ + Sharded: true, + Vindexes: map[string]*vschemapb.Vindex{ + "hash": { + Type: "hash", + }, + }, + Tables: map[string]*vschemapb.Table{ + "t1_copy_all_ks2": { + ColumnVindexes: []*vschemapb.ColumnVindex{{ + Column: "id1", + Name: "hash", + }}, + }, + }, + } ) func TestMain(m *testing.M) { @@ -225,14 +262,24 @@ func TestMain(m *testing.M) { exitCode := func() int { var cfg vttest.Config cfg.Topology = &vttestpb.VTTestTopology{ - Keyspaces: []*vttestpb.Keyspace{{ - Name: "ks", - Shards: []*vttestpb.Shard{{ - Name: "-80", - }, { - Name: "80-", - }}, - }}, + Keyspaces: []*vttestpb.Keyspace{ + { + Name: "ks", + Shards: []*vttestpb.Shard{{ + Name: "-80", + }, { + Name: "80-", + }}, + }, + { + Name: "ks2", + Shards: []*vttestpb.Shard{{ + Name: "-80", + }, { + Name: "80-", + }}, + }, + }, } if err := cfg.InitSchemas("ks", schema, vschema); err != nil { fmt.Fprintf(os.Stderr, "%v\n", err) @@ -240,6 +287,11 @@ func TestMain(m *testing.M) { return 1 } defer os.RemoveAll(cfg.SchemaDir) + if err := cfg.InitSchemas("ks2", schema2, vschema2); err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.RemoveAll(cfg.SchemaDir) + return 1 + } cluster = &vttest.LocalCluster{ Config: cfg, diff --git a/go/vt/vtgate/endtoend/misc_test.go b/go/vt/vtgate/endtoend/misc_test.go index 138b68d0aa3..aeeb1c122db 100644 --- a/go/vt/vtgate/endtoend/misc_test.go +++ b/go/vt/vtgate/endtoend/misc_test.go @@ -19,6 +19,7 @@ package endtoend import ( "context" "fmt" + osExec "os/exec" "testing" "github.com/stretchr/testify/assert" @@ -55,6 +56,16 @@ func TestCreateAndDropDatabase(t *testing.T) { require.NoError(t, err) defer conn.Close() + // cleanup the keyspace from the topology. + defer func() { + // the corresponding database needs to be created in advance. + // a subsequent DeleteKeyspace command returns the error of 'node doesn't exist' without it. + _ = exec(t, conn, "create database testitest") + + _, err := osExec.Command("vtctldclient", "--server", grpcAddress, "DeleteKeyspace", "--recursive", "--force", "testitest").CombinedOutput() + require.NoError(t, err) + }() + // run it 3 times. for count := 0; count < 3; count++ { t.Run(fmt.Sprintf("exec:%d", count), func(t *testing.T) { diff --git a/go/vt/vtgate/endtoend/row_count_test.go b/go/vt/vtgate/endtoend/row_count_test.go index 9ac200b33fa..5a29f6177a9 100644 --- a/go/vt/vtgate/endtoend/row_count_test.go +++ b/go/vt/vtgate/endtoend/row_count_test.go @@ -24,6 +24,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/test/endtoend/utils" ) func TestRowCount(t *testing.T) { @@ -31,6 +32,7 @@ func TestRowCount(t *testing.T) { conn, err := mysql.Connect(ctx, &vtParams) require.NoError(t, err) defer conn.Close() + utils.Exec(t, conn, "use ks") type tc struct { query string expected int diff --git a/go/vt/vtgate/endtoend/vstream_test.go b/go/vt/vtgate/endtoend/vstream_test.go index 832799366b1..0fa325ecac5 100644 --- a/go/vt/vtgate/endtoend/vstream_test.go +++ b/go/vt/vtgate/endtoend/vstream_test.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "io" + "regexp" "sort" "sync" "testing" @@ -234,12 +235,7 @@ func TestVStreamCopyBasic(t *testing.T) { printEvents(evs) // for debugging ci failures if len(evs) == numExpectedEvents { - // The arrival order of COPY_COMPLETED events with keyspace/shard is not constant. - // On the other hand, the last event should always be a fully COPY_COMPLETED event. - // That's why the sort.Slice doesn't have to handle the last element in completedEvs. - sort.Slice(completedEvs[:len(completedEvs)-1], func(i, j int) bool { - return completedEvs[i].GetShard() < completedEvs[j].GetShard() - }) + sortCopyCompletedEvents(completedEvs) for i, ev := range completedEvs { require.Regexp(t, expectedCompletedEvents[i], ev.String()) } @@ -258,6 +254,139 @@ func TestVStreamCopyBasic(t *testing.T) { } } +// TestVStreamCopyUnspecifiedShardGtid tests the case where the keyspace contains wildcards and/or the shard is not specified in the request. +// Verify that the Vstream API resolves the unspecified ShardGtid input to a list of all the matching keyspaces and all the shards in the topology. +// - If the keyspace contains wildcards and the shard is not specified, the copy operation should be performed on all shards of all matching keyspaces. +// - If the keyspace is specified and the shard is not specified, the copy operation should be performed on all shards of the specified keyspace. +func TestVStreamCopyUnspecifiedShardGtid(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + conn, err := mysql.Connect(ctx, &vtParams) + if err != nil { + require.NoError(t, err) + } + defer conn.Close() + + _, err = conn.ExecuteFetch("insert into t1_copy_all(id1,id2) values(1,1), (2,2), (3,3), (4,4), (5,5), (6,6), (7,7), (8,8)", 1, false) + if err != nil { + require.NoError(t, err) + } + + _, err = conn.ExecuteFetch("insert into t1_copy_all_ks2(id1,id2) values(10,10), (20,20)", 1, false) + if err != nil { + require.NoError(t, err) + } + + filter := &binlogdatapb.Filter{ + Rules: []*binlogdatapb.Rule{{ + Match: "/t1_copy_all.*/", + }}, + } + flags := &vtgatepb.VStreamFlags{} + + // We have 2 shards in each keyspace. We assume the rows are + // evenly split across each shard. For each INSERT statement, which + // is a transaction and gets a global transaction identifier or GTID, we + // have 1 each of the following events: + // begin, field, position, lastpk, commit (5) + // For each row created in the INSERT statement -- 8 on ks1 and + // 2 on ks2 -- we have 1 row event between the begin and commit. + // When we have copied all rows for a table in the shard, the shard + // also gets events marking the transition from the copy phase to + // the streaming phase for that table with 1 each of the following: + // begin, vgtid, commit (3) + // As the copy phase completes for all tables on the shard, the shard + // gets 1 copy phase completed event. + // Lastly the stream has 1 final event to mark the final end to all + // copy phase operations in the vstream. + expectedKs1EventNum := 2 /* num shards */ * (9 /* begin/field/vgtid:pos/4 rowevents avg/vgitd: lastpk/commit) */ + 3 /* begin/vgtid/commit for completed table */ + 1 /* copy operation completed */) + expectedKs2EventNum := 2 /* num shards */ * (6 /* begin/field/vgtid:pos/1 rowevents avg/vgitd: lastpk/commit) */ + 3 /* begin/vgtid/commit for completed table */ + 1 /* copy operation completed */) + expectedFullyCopyCompletedNum := 1 + + cases := []struct { + name string + shardGtid *binlogdatapb.ShardGtid + expectedEventNum int + expectedCompletedEvents []string + }{ + { + name: "copy from all keyspaces", + shardGtid: &binlogdatapb.ShardGtid{ + Keyspace: "/.*", + }, + expectedEventNum: expectedKs1EventNum + expectedKs2EventNum + expectedFullyCopyCompletedNum, + expectedCompletedEvents: []string{ + `type:COPY_COMPLETED keyspace:"ks" shard:"-80"`, + `type:COPY_COMPLETED keyspace:"ks" shard:"80-"`, + `type:COPY_COMPLETED keyspace:"ks2" shard:"-80"`, + `type:COPY_COMPLETED keyspace:"ks2" shard:"80-"`, + `type:COPY_COMPLETED`, + }, + }, + { + name: "copy from all shards in one keyspace", + shardGtid: &binlogdatapb.ShardGtid{ + Keyspace: "ks", + }, + expectedEventNum: expectedKs1EventNum + expectedFullyCopyCompletedNum, + expectedCompletedEvents: []string{ + `type:COPY_COMPLETED keyspace:"ks" shard:"-80"`, + `type:COPY_COMPLETED keyspace:"ks" shard:"80-"`, + `type:COPY_COMPLETED`, + }, + }, + } + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + gconn, conn, mconn, closeConnections := initialize(ctx, t) + defer closeConnections() + + var vgtid = &binlogdatapb.VGtid{} + vgtid.ShardGtids = []*binlogdatapb.ShardGtid{c.shardGtid} + reader, err := gconn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags) + _, _ = conn, mconn + if err != nil { + require.NoError(t, err) + } + require.NotNil(t, reader) + var evs []*binlogdatapb.VEvent + var completedEvs []*binlogdatapb.VEvent + for { + e, err := reader.Recv() + switch err { + case nil: + evs = append(evs, e...) + + for _, ev := range e { + if ev.Type == binlogdatapb.VEventType_COPY_COMPLETED { + completedEvs = append(completedEvs, ev) + } + } + + if len(evs) == c.expectedEventNum { + sortCopyCompletedEvents(completedEvs) + for i, ev := range completedEvs { + require.Equal(t, c.expectedCompletedEvents[i], ev.String()) + } + t.Logf("TestVStreamCopyUnspecifiedShardGtid was successful") + return + } else if c.expectedEventNum < len(evs) { + printEvents(evs) // for debugging ci failures + require.FailNow(t, fmt.Sprintf("len(events)=%d are not expected\n", len(evs))) + } + case io.EOF: + log.Infof("stream ended\n") + cancel() + default: + log.Errorf("Returned err %v", err) + require.FailNow(t, "remote error: %v\n", err) + } + } + }) + } +} + func TestVStreamCopyResume(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -337,7 +466,11 @@ func TestVStreamCopyResume(t *testing.T) { `type:ROW row_event:{table_name:"ks.t1_copy_resume" row_changes:{after:{lengths:1 lengths:2 values:"990"}} keyspace:"ks" shard:"-80"} keyspace:"ks" shard:"-80"`, `type:ROW timestamp:[0-9]+ row_event:{table_name:"ks.t1_copy_resume" row_changes:{before:{lengths:1 lengths:1 values:"99"} after:{lengths:1 lengths:2 values:"990"}} keyspace:"ks" shard:"-80"} current_time:[0-9]+ keyspace:"ks" shard:"-80"`, } + redash80 := regexp.MustCompile(`(?i)type:VGTID vgtid:{shard_gtids:{keyspace:"ks" shard:"-80" gtid:".+" table_p_ks:{table_name:"t1_copy_resume" lastpk:{fields:{name:"id1" type:INT64} rows:{lengths:1 values:"[0-9]"}}}} shard_gtids:{keyspace:"ks" shard:"80-" gtid:".+"}} keyspace:"ks" shard:"(-80|80-)"`) + re80dash := regexp.MustCompile(`(?i)type:VGTID vgtid:{shard_gtids:{keyspace:"ks" shard:"-80" gtid:".+"} shard_gtids:{keyspace:"ks" shard:"80-" gtid:".+" table_p_ks:{table_name:"t1_copy_resume" lastpk:{fields:{name:"id1" type:INT64} rows:{lengths:1 values:"[0-9]"}}}}} keyspace:"ks" shard:"(-80|80-)"`) + both := regexp.MustCompile(`(?i)type:VGTID vgtid:{shard_gtids:{keyspace:"ks" shard:"-80" gtid:".+" table_p_ks:{table_name:"t1_copy_resume" lastpk:{fields:{name:"id1" type:INT64} rows:{lengths:1 values:"[0-9]"}}}} shard_gtids:{keyspace:"ks" shard:"80-" gtid:".+" table_p_ks:{table_name:"t1_copy_resume" lastpk:{fields:{name:"id1" type:INT64} rows:{lengths:1 values:"[0-9]"}}}}} keyspace:"ks" shard:"(-80|80-)"`) var evs []*binlogdatapb.VEvent + for { e, err := reader.Recv() switch err { @@ -352,6 +485,19 @@ func TestVStreamCopyResume(t *testing.T) { } printEvents(evs) // for debugging ci failures } + if ev.Type == binlogdatapb.VEventType_VGTID { + // Validate that the vgtid event the client receives from the vstream copy + // has a complete TableLastPK proto message. + // Also, to ensure that the client can resume properly, make sure that + // the Fields value is present in the sqltypes.Result field and not missing. + // It's not guaranteed that BOTH shards have streamed a row yet as the order + // of events in the stream is non-determinstic. So we check to be sure that + // at least one shard has copied rows and thus has a full TableLastPK proto + // message. + eventStr := ev.String() + require.True(t, redash80.MatchString(eventStr) || re80dash.MatchString(eventStr) || both.MatchString(eventStr), + "VGTID event does not have a complete TableLastPK proto message for either shard; event: %s", eventStr) + } } if expectedCatchupEvents == replCatchupEvents && expectedRowCopyEvents == rowCopyEvents { sort.Sort(VEventSorter(evs)) @@ -563,3 +709,19 @@ func (v VEventSorter) Less(i, j int) bool { } return valI < valJ } + +// The arrival order of COPY_COMPLETED events with keyspace/shard is not constant. +// On the other hand, the last event should always be a fully COPY_COMPLETED event. +// That's why the sort.Slice doesn't have to handle the last element in completedEvs. +func sortCopyCompletedEvents(completedEvs []*binlogdatapb.VEvent) { + sortVEventByKeyspaceAndShard(completedEvs[:len(completedEvs)-1]) +} + +func sortVEventByKeyspaceAndShard(evs []*binlogdatapb.VEvent) { + sort.Slice(evs, func(i, j int) bool { + if evs[i].Keyspace == evs[j].Keyspace { + return evs[i].Shard < evs[j].Shard + } + return evs[i].Keyspace < evs[j].Keyspace + }) +} diff --git a/go/vt/vtgate/engine/concatenate.go b/go/vt/vtgate/engine/concatenate.go index 7858ccfc938..4cc5fcc440b 100644 --- a/go/vt/vtgate/engine/concatenate.go +++ b/go/vt/vtgate/engine/concatenate.go @@ -82,8 +82,8 @@ func formatTwoOptionsNicely(a, b string) string { return a + "_" + b } -// ErrWrongNumberOfColumnsInSelect is an error -var ErrWrongNumberOfColumnsInSelect = vterrors.NewErrorf(vtrpcpb.Code_FAILED_PRECONDITION, vterrors.WrongNumberOfColumnsInSelect, "The used SELECT statements have a different number of columns") +// errWrongNumberOfColumnsInSelect is an error +var errWrongNumberOfColumnsInSelect = vterrors.NewErrorf(vtrpcpb.Code_FAILED_PRECONDITION, vterrors.WrongNumberOfColumnsInSelect, "The used SELECT statements have a different number of columns") // TryExecute performs a non-streaming exec. func (c *Concatenate) TryExecute(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable, wantfields bool) (*sqltypes.Result, error) { @@ -106,7 +106,7 @@ func (c *Concatenate) TryExecute(ctx context.Context, vcursor VCursor, bindVars if len(rows) > 0 && len(r.Rows) > 0 && len(rows[0]) != len(r.Rows[0]) { - return nil, ErrWrongNumberOfColumnsInSelect + return nil, errWrongNumberOfColumnsInSelect } rows = append(rows, r.Rows...) @@ -350,7 +350,7 @@ func (c *Concatenate) description() PrimitiveDescription { func (c *Concatenate) compareFields(fields1 []*querypb.Field, fields2 []*querypb.Field) error { if len(fields1) != len(fields2) { - return ErrWrongNumberOfColumnsInSelect + return errWrongNumberOfColumnsInSelect } for i, field1 := range fields1 { if _, found := c.NoNeedToTypeCheck[i]; found { diff --git a/go/vt/vtgate/engine/delete_test.go b/go/vt/vtgate/engine/delete_test.go index 900c33e0757..4cd0efcde67 100644 --- a/go/vt/vtgate/engine/delete_test.go +++ b/go/vt/vtgate/engine/delete_test.go @@ -21,7 +21,6 @@ import ( "errors" "testing" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/vtgate/evalengine" "github.com/stretchr/testify/require" @@ -90,7 +89,7 @@ func TestDeleteEqual(t *testing.T) { }) // Failure case - expr := evalengine.NewBindVar("aa", collations.TypedCollation{}) + expr := evalengine.NewBindVar("aa") del.Values = []evalengine.Expr{expr} _, err = del.TryExecute(context.Background(), vc, map[string]*querypb.BindVariable{}, false) require.EqualError(t, err, "query arguments missing for aa") @@ -122,7 +121,7 @@ func TestDeleteEqualMultiCol(t *testing.T) { }) // Failure case - expr := evalengine.NewBindVar("aa", collations.TypedCollation{}) + expr := evalengine.NewBindVar("aa") del.Values = []evalengine.Expr{expr} _, err = del.TryExecute(context.Background(), vc, map[string]*querypb.BindVariable{}, false) require.EqualError(t, err, "query arguments missing for aa") diff --git a/go/vt/vtgate/engine/fake_vcursor_test.go b/go/vt/vtgate/engine/fake_vcursor_test.go index 464502f5099..fbbdeb90f2c 100644 --- a/go/vt/vtgate/engine/fake_vcursor_test.go +++ b/go/vt/vtgate/engine/fake_vcursor_test.go @@ -255,6 +255,10 @@ func (t *noopVCursor) SetWorkload(querypb.ExecuteOptions_Workload) { panic("implement me") } +func (t *noopVCursor) SetWorkloadName(string) { + panic("implement me") +} + func (t *noopVCursor) SetPlannerVersion(querypb.ExecuteOptions_PlannerVersion) { panic("implement me") } @@ -682,6 +686,10 @@ func (f *loggingVCursor) SetWorkload(querypb.ExecuteOptions_Workload) { panic("implement me") } +func (f *loggingVCursor) SetWorkloadName(string) { + panic("implement me") +} + func (f *loggingVCursor) SetPlannerVersion(querypb.ExecuteOptions_PlannerVersion) { panic("implement me") } diff --git a/go/vt/vtgate/engine/filter.go b/go/vt/vtgate/engine/filter.go index f36467a7526..49b5863bb17 100644 --- a/go/vt/vtgate/engine/filter.go +++ b/go/vt/vtgate/engine/filter.go @@ -59,9 +59,8 @@ func (f *Filter) TryExecute(ctx context.Context, vcursor VCursor, bindVars map[s if err != nil { return nil, err } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) var rows [][]sqltypes.Value - env.Fields = result.Fields for _, row := range result.Rows { env.Row = row evalResult, err := env.Evaluate(f.Predicate) @@ -82,10 +81,9 @@ func (f *Filter) TryExecute(ctx context.Context, vcursor VCursor, bindVars map[s // TryStreamExecute satisfies the Primitive interface. func (f *Filter) TryStreamExecute(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable, wantfields bool, callback func(*sqltypes.Result) error) error { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) filter := func(results *sqltypes.Result) error { var rows [][]sqltypes.Value - env.Fields = results.Fields for _, row := range results.Rows { env.Row = row evalResult, err := env.Evaluate(f.Predicate) diff --git a/go/vt/vtgate/engine/filter_test.go b/go/vt/vtgate/engine/filter_test.go index b6d8730a869..01ba7175db4 100644 --- a/go/vt/vtgate/engine/filter_test.go +++ b/go/vt/vtgate/engine/filter_test.go @@ -23,74 +23,56 @@ import ( "github.com/stretchr/testify/require" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" ) -type dummyTranslator struct{} - -func (d dummyTranslator) ColumnLookup(col *sqlparser.ColName) (int, error) { - switch col.Name.String() { - case "left": - return 0, nil - case "right": - return 1, nil - default: - panic("unexpected column name") - } -} - -func (d dummyTranslator) CollationForExpr(_ sqlparser.Expr) collations.ID { - return collationEnv.LookupByName("utf8mb4_bin").ID() -} - -func (d dummyTranslator) DefaultCollation() collations.ID { - return collationEnv.LookupByName("utf8mb4_bin").ID() -} - func TestFilterPass(t *testing.T) { + utf8mb4Bin := collationEnv.LookupByName("utf8mb4_bin").ID() predicate := &sqlparser.ComparisonExpr{ Operator: sqlparser.GreaterThanOp, Left: sqlparser.NewColName("left"), Right: sqlparser.NewColName("right"), } - pred, err := evalengine.Translate(predicate, &dummyTranslator{}) - require.NoError(t, err) - tcases := []struct { name string res *sqltypes.Result expRes string }{{ name: "int32", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "int32|int32"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "int32|int32"), "0|1", "1|0", "2|3"), expRes: `[[INT32(1) INT32(0)]]`, }, { name: "uint16", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "uint16|uint16"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "uint16|uint16"), "0|1", "1|0", "2|3"), expRes: `[[UINT16(1) UINT16(0)]]`, }, { name: "uint64_int64", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "uint64|int64"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "uint64|int64"), "0|1", "1|0", "2|3"), expRes: `[[UINT64(1) INT64(0)]]`, }, { name: "int32_uint32", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "int32|uint32"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "int32|uint32"), "0|1", "1|0", "2|3"), expRes: `[[INT32(1) UINT32(0)]]`, }, { name: "uint16_int8", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "uint16|int8"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "uint16|int8"), "0|1", "1|0", "2|3"), expRes: `[[UINT16(1) INT8(0)]]`, }, { name: "uint64_int32", - res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("a|b", "uint64|int32"), "0|1", "1|0", "2|3"), + res: sqltypes.MakeTestResult(sqltypes.MakeTestFields("left|right", "uint64|int32"), "0|1", "1|0", "2|3"), expRes: `[[UINT64(1) INT32(0)]]`, }} for _, tc := range tcases { t.Run(tc.name, func(t *testing.T) { + pred, err := evalengine.Translate(predicate, &evalengine.Config{ + Collation: utf8mb4Bin, + ResolveColumn: evalengine.FieldResolver(tc.res.Fields).Column, + }) + require.NoError(t, err) + filter := &Filter{ Predicate: pred, Input: &fakePrimitive{results: []*sqltypes.Result{tc.res}}, diff --git a/go/vt/vtgate/engine/insert.go b/go/vt/vtgate/engine/insert.go index 744ad756c49..f55a9d27c7b 100644 --- a/go/vt/vtgate/engine/insert.go +++ b/go/vt/vtgate/engine/insert.go @@ -466,11 +466,11 @@ func (ins *Insert) getInsertSelectQueries( bvs := sqltypes.CopyBindVariables(bindVars) // we don't want to create one huge bindvars for all values var mids sqlparser.Values for _, indexValue := range indexesPerRss[i] { - index, _ := strconv.ParseInt(string(indexValue.Value), 0, 64) + index, _ := strconv.Atoi(string(indexValue.Value)) if keyspaceIDs[index] != nil { row := sqlparser.ValTuple{} for colOffset, value := range rows[index] { - bvName := insertVarOffset(int(index), colOffset) + bvName := insertVarOffset(index, colOffset) bvs[bvName] = sqltypes.ValueBindVariable(value) row = append(row, sqlparser.NewArgument(bvName)) } @@ -535,7 +535,7 @@ func (ins *Insert) processGenerateFromValues( // Scan input values to compute the number of values to generate, and // keep track of where they should be filled. - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) resolved, err := env.Evaluate(ins.Generate.Values) if err != nil { return 0, err @@ -667,7 +667,7 @@ func (ins *Insert) getInsertShardedRoute( // require inputs in that format. vindexRowsValues := make([][]sqltypes.Row, len(ins.VindexValues)) rowCount := 0 - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) colVindexes := ins.ColVindexes if colVindexes == nil { colVindexes = ins.Table.ColumnVindexes diff --git a/go/vt/vtgate/engine/limit.go b/go/vt/vtgate/engine/limit.go index 14fd0d7e15f..51e9e0660ad 100644 --- a/go/vt/vtgate/engine/limit.go +++ b/go/vt/vtgate/engine/limit.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "io" + "strconv" "vitess.io/vitess/go/vt/vtgate/evalengine" @@ -163,7 +164,7 @@ func (l *Limit) NeedsTransaction() bool { } func (l *Limit) getCountAndOffset(vcursor VCursor, bindVars map[string]*querypb.BindVariable) (count int, offset int, err error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) count, err = getIntFrom(env, l.Count) if err != nil { return @@ -188,13 +189,13 @@ func getIntFrom(env *evalengine.ExpressionEnv, expr evalengine.Expr) (int, error return 0, nil } - num, err := value.ToUint64() - if err != nil { - return 0, err + if !value.IsIntegral() { + return 0, sqltypes.ErrIncompatibleTypeCast } - count := int(num) - if count < 0 { - return 0, fmt.Errorf("requested limit is out of range: %v", num) + + count, err := strconv.Atoi(value.RawStr()) + if err != nil || count < 0 { + return 0, fmt.Errorf("requested limit is out of range: %v", value.RawStr()) } return count, nil } diff --git a/go/vt/vtgate/engine/limit_test.go b/go/vt/vtgate/engine/limit_test.go index dcdc43880a0..b5551bf66fc 100644 --- a/go/vt/vtgate/engine/limit_test.go +++ b/go/vt/vtgate/engine/limit_test.go @@ -23,7 +23,6 @@ import ( "github.com/stretchr/testify/assert" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/vtgate/evalengine" "github.com/stretchr/testify/require" @@ -129,7 +128,7 @@ func TestLimitExecute(t *testing.T) { results: []*sqltypes.Result{inputResult}, } l = &Limit{ - Count: evalengine.NewBindVar("l", collations.TypedCollation{}), + Count: evalengine.NewBindVar("l"), Input: fp, } @@ -342,8 +341,8 @@ func TestLimitOffsetExecute(t *testing.T) { } l = &Limit{ - Count: evalengine.NewBindVar("l", collations.TypedCollation{}), - Offset: evalengine.NewBindVar("o", collations.TypedCollation{}), + Count: evalengine.NewBindVar("l"), + Offset: evalengine.NewBindVar("o"), Input: fp, } result, err = l.TryExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(1), "o": sqltypes.Int64BindVariable(1)}, false) @@ -395,7 +394,7 @@ func TestLimitStreamExecute(t *testing.T) { // Test with bind vars. fp.rewind() - l.Count = evalengine.NewBindVar("l", collations.TypedCollation{}) + l.Count = evalengine.NewBindVar("l") results = nil err = l.TryStreamExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(2)}, true, func(qr *sqltypes.Result) error { results = append(results, qr) @@ -539,7 +538,7 @@ func TestLimitInputFail(t *testing.T) { func TestLimitInvalidCount(t *testing.T) { l := &Limit{ - Count: evalengine.NewBindVar("l", collations.TypedCollation{}), + Count: evalengine.NewBindVar("l"), } _, _, err := l.getCountAndOffset(&noopVCursor{}, nil) assert.EqualError(t, err, "query arguments missing for l") diff --git a/go/vt/vtgate/engine/memory_sort.go b/go/vt/vtgate/engine/memory_sort.go index 6085f36a7ed..e567ec535f1 100644 --- a/go/vt/vtgate/engine/memory_sort.go +++ b/go/vt/vtgate/engine/memory_sort.go @@ -23,6 +23,7 @@ import ( "math" "reflect" "sort" + "strconv" "strings" "vitess.io/vitess/go/vt/vtgate/evalengine" @@ -162,18 +163,18 @@ func (ms *MemorySort) fetchCount(vcursor VCursor, bindVars map[string]*querypb.B if ms.UpperLimit == nil { return math.MaxInt64, nil } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) resolved, err := env.Evaluate(ms.UpperLimit) if err != nil { return 0, err } - num, err := resolved.Value().ToUint64() - if err != nil { - return 0, err + if !resolved.Value().IsIntegral() { + return 0, sqltypes.ErrIncompatibleTypeCast } - count := int(num) - if count < 0 { - return 0, fmt.Errorf("requested limit is out of range: %v", num) + + count, err := strconv.Atoi(resolved.Value().RawStr()) + if err != nil || count < 0 { + return 0, fmt.Errorf("requested limit is out of range: %v", resolved.Value().RawStr()) } return count, nil } diff --git a/go/vt/vtgate/engine/memory_sort_test.go b/go/vt/vtgate/engine/memory_sort_test.go index 93b76876783..bb06291ad6d 100644 --- a/go/vt/vtgate/engine/memory_sort_test.go +++ b/go/vt/vtgate/engine/memory_sort_test.go @@ -77,7 +77,7 @@ func TestMemorySortExecute(t *testing.T) { utils.MustMatch(t, wantResult, result) fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} result, err = ms.TryExecute(context.Background(), &noopVCursor{}, bv, false) @@ -138,7 +138,7 @@ func TestMemorySortStreamExecuteWeightString(t *testing.T) { t.Run("Limit test", func(t *testing.T) { fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} results = nil @@ -196,7 +196,7 @@ func TestMemorySortExecuteWeightString(t *testing.T) { utils.MustMatch(t, wantResult, result) fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} result, err = ms.TryExecute(context.Background(), &noopVCursor{}, bv, false) @@ -279,7 +279,7 @@ func TestMemorySortStreamExecuteCollation(t *testing.T) { t.Run("Limit test", func(t *testing.T) { fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} results = nil @@ -338,7 +338,7 @@ func TestMemorySortExecuteCollation(t *testing.T) { utils.MustMatch(t, wantResult, result) fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} result, err = ms.TryExecute(context.Background(), &noopVCursor{}, bv, false) @@ -395,7 +395,7 @@ func TestMemorySortStreamExecute(t *testing.T) { utils.MustMatch(t, wantResults, results) fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} results = nil @@ -554,7 +554,7 @@ func TestMemorySortMultiColumn(t *testing.T) { utils.MustMatch(t, wantResult, result) fp.rewind() - ms.UpperLimit = evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + ms.UpperLimit = evalengine.NewBindVar("__upper_limit") bv := map[string]*querypb.BindVariable{"__upper_limit": sqltypes.Int64BindVariable(3)} result, err = ms.TryExecute(context.Background(), &noopVCursor{}, bv, false) diff --git a/go/vt/vtgate/engine/opcode/constants.go b/go/vt/vtgate/engine/opcode/constants.go new file mode 100644 index 00000000000..37b5f9fd288 --- /dev/null +++ b/go/vt/vtgate/engine/opcode/constants.go @@ -0,0 +1,113 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package opcode + +import ( + "fmt" + + "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" +) + +// PulloutOpcode is a number representing the opcode +// for the PulloutSubquery primitive. +type PulloutOpcode int + +// This is the list of PulloutOpcode values. +const ( + PulloutValue = PulloutOpcode(iota) + PulloutIn + PulloutNotIn + PulloutExists +) + +var pulloutName = map[PulloutOpcode]string{ + PulloutValue: "PulloutValue", + PulloutIn: "PulloutIn", + PulloutNotIn: "PulloutNotIn", + PulloutExists: "PulloutExists", +} + +func (code PulloutOpcode) String() string { + return pulloutName[code] +} + +// MarshalJSON serializes the PulloutOpcode as a JSON string. +// It's used for testing and diagnostics. +func (code PulloutOpcode) MarshalJSON() ([]byte, error) { + return ([]byte)(fmt.Sprintf("\"%s\"", code.String())), nil +} + +// AggregateOpcode is the aggregation Opcode. +type AggregateOpcode int + +// These constants list the possible aggregate opcodes. +const ( + AggregateUnassigned = AggregateOpcode(iota) + AggregateCount + AggregateSum + AggregateMin + AggregateMax + AggregateCountDistinct + AggregateSumDistinct + AggregateGtid + AggregateRandom + AggregateCountStar +) + +var ( + // OpcodeType keeps track of the known output types for different aggregate functions + OpcodeType = map[AggregateOpcode]querypb.Type{ + AggregateCountDistinct: sqltypes.Int64, + AggregateCount: sqltypes.Int64, + AggregateCountStar: sqltypes.Int64, + AggregateSumDistinct: sqltypes.Decimal, + AggregateSum: sqltypes.Decimal, + AggregateGtid: sqltypes.VarChar, + } +) + +// SupportedAggregates maps the list of supported aggregate +// functions to their opcodes. +var SupportedAggregates = map[string]AggregateOpcode{ + "count": AggregateCount, + "sum": AggregateSum, + "min": AggregateMin, + "max": AggregateMax, + // These functions don't exist in mysql, but are used + // to display the plan. + "count_distinct": AggregateCountDistinct, + "sum_distinct": AggregateSumDistinct, + "vgtid": AggregateGtid, + "count_star": AggregateCountStar, + "random": AggregateRandom, +} + +func (code AggregateOpcode) String() string { + for k, v := range SupportedAggregates { + if v == code { + return k + } + } + return "ERROR" +} + +// MarshalJSON serializes the AggregateOpcode as a JSON string. +// It's used for testing and diagnostics. +func (code AggregateOpcode) MarshalJSON() ([]byte, error) { + return ([]byte)(fmt.Sprintf("\"%s\"", code.String())), nil +} diff --git a/go/vt/vtgate/engine/ordered_aggregate.go b/go/vt/vtgate/engine/ordered_aggregate.go index a93d45e0d31..4b7559ca740 100644 --- a/go/vt/vtgate/engine/ordered_aggregate.go +++ b/go/vt/vtgate/engine/ordered_aggregate.go @@ -25,15 +25,21 @@ import ( "vitess.io/vitess/go/vt/sqlparser" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/sqltypes" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/evalengine" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" ) +var ( + // Some predefined values + countZero = sqltypes.MakeTrusted(sqltypes.Int64, []byte("0")) + countOne = sqltypes.MakeTrusted(sqltypes.Int64, []byte("1")) + sumZero = sqltypes.MakeTrusted(sqltypes.Decimal, []byte("0")) +) + var _ Primitive = (*OrderedAggregate)(nil) // OrderedAggregate is a primitive that expects the underlying primitive @@ -141,70 +147,6 @@ func (ap *AggregateParams) String() string { return fmt.Sprintf("%s%s(%s)", ap.Opcode.String(), dispOrigOp, keyCol) } -// AggregateOpcode is the aggregation Opcode. -type AggregateOpcode int - -// These constants list the possible aggregate opcodes. -const ( - AggregateUnassigned = AggregateOpcode(iota) - AggregateCount - AggregateSum - AggregateMin - AggregateMax - AggregateCountDistinct - AggregateSumDistinct - AggregateGtid - AggregateRandom - AggregateCountStar -) - -var ( - // OpcodeType keeps track of the known output types for different aggregate functions - OpcodeType = map[AggregateOpcode]querypb.Type{ - AggregateCountDistinct: sqltypes.Int64, - AggregateCount: sqltypes.Int64, - AggregateCountStar: sqltypes.Int64, - AggregateSumDistinct: sqltypes.Decimal, - AggregateSum: sqltypes.Decimal, - AggregateGtid: sqltypes.VarChar, - } - // Some predefined values - countZero = sqltypes.MakeTrusted(sqltypes.Int64, []byte("0")) - countOne = sqltypes.MakeTrusted(sqltypes.Int64, []byte("1")) - sumZero = sqltypes.MakeTrusted(sqltypes.Decimal, []byte("0")) -) - -// SupportedAggregates maps the list of supported aggregate -// functions to their opcodes. -var SupportedAggregates = map[string]AggregateOpcode{ - "count": AggregateCount, - "sum": AggregateSum, - "min": AggregateMin, - "max": AggregateMax, - // These functions don't exist in mysql, but are used - // to display the plan. - "count_distinct": AggregateCountDistinct, - "sum_distinct": AggregateSumDistinct, - "vgtid": AggregateGtid, - "count_star": AggregateCountStar, - "random": AggregateRandom, -} - -func (code AggregateOpcode) String() string { - for k, v := range SupportedAggregates { - if v == code { - return k - } - } - return "ERROR" -} - -// MarshalJSON serializes the AggregateOpcode as a JSON string. -// It's used for testing and diagnostics. -func (code AggregateOpcode) MarshalJSON() ([]byte, error) { - return ([]byte)(fmt.Sprintf("\"%s\"", code.String())), nil -} - // RouteType returns a description of the query routing type used by the primitive func (oa *OrderedAggregate) RouteType() string { return oa.Input.RouteType() @@ -401,7 +343,7 @@ func convertRow(row []sqltypes.Value, preProcess bool, aggregates []*AggregatePa Shard: row[aggr.Col+1].ToString(), Gtid: row[aggr.Col].ToString(), }) - data, _ := proto.Marshal(vgtid) + data, _ := vgtid.MarshalVT() val, _ := sqltypes.NewValue(sqltypes.VarBinary, data) newRow[aggr.Col] = val } @@ -515,7 +457,7 @@ func merge( if err != nil { return nil, nil, err } - err = proto.Unmarshal(rowBytes, vgtid) + err = vgtid.UnmarshalVT(rowBytes) if err != nil { return nil, nil, err } @@ -524,7 +466,7 @@ func merge( Shard: row2[aggr.Col+1].ToString(), Gtid: row2[aggr.Col].ToString(), }) - data, _ := proto.Marshal(vgtid) + data, _ := vgtid.MarshalVT() val, _ := sqltypes.NewValue(sqltypes.VarBinary, data) result[aggr.Col] = val case AggregateRandom: @@ -574,7 +516,7 @@ func convertFinal(current []sqltypes.Value, aggregates []*AggregateParams) ([]sq if err != nil { return nil, err } - err = proto.Unmarshal(currentBytes, vgtid) + err = vgtid.UnmarshalVT(currentBytes) if err != nil { return nil, err } diff --git a/go/vt/vtgate/engine/ordered_aggregate_test.go b/go/vt/vtgate/engine/ordered_aggregate_test.go index a24ba88fd5e..c522cd03f69 100644 --- a/go/vt/vtgate/engine/ordered_aggregate_test.go +++ b/go/vt/vtgate/engine/ordered_aggregate_test.go @@ -32,6 +32,7 @@ import ( binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/servenv" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) var collationEnv *collations.Environment diff --git a/go/vt/vtgate/engine/primitive.go b/go/vt/vtgate/engine/primitive.go index 36d0719796b..ef7c5a2dbd3 100644 --- a/go/vt/vtgate/engine/primitive.go +++ b/go/vt/vtgate/engine/primitive.go @@ -145,6 +145,7 @@ type ( SetWorkload(querypb.ExecuteOptions_Workload) SetPlannerVersion(querypb.ExecuteOptions_PlannerVersion) SetConsolidator(querypb.ExecuteOptions_Consolidator) + SetWorkloadName(string) SetFoundRows(uint64) SetDDLStrategy(string) diff --git a/go/vt/vtgate/engine/projection.go b/go/vt/vtgate/engine/projection.go index 0c0875d19d9..b79253b358d 100644 --- a/go/vt/vtgate/engine/projection.go +++ b/go/vt/vtgate/engine/projection.go @@ -57,8 +57,7 @@ func (p *Projection) TryExecute(ctx context.Context, vcursor VCursor, bindVars m return nil, err } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) - env.Fields = result.Fields + env := evalengine.EnvWithBindVars(bindVars) var resultRows []sqltypes.Row for _, row := range result.Rows { resultRow := make(sqltypes.Row, 0, len(p.Exprs)) @@ -73,7 +72,7 @@ func (p *Projection) TryExecute(ctx context.Context, vcursor VCursor, bindVars m resultRows = append(resultRows, resultRow) } if wantfields { - err := p.addFields(env, result) + result.Fields, err = p.evalFields(env, result.Fields) if err != nil { return nil, err } @@ -84,21 +83,18 @@ func (p *Projection) TryExecute(ctx context.Context, vcursor VCursor, bindVars m // TryStreamExecute implements the Primitive interface func (p *Projection) TryStreamExecute(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable, wantfields bool, callback func(*sqltypes.Result) error) error { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) var once sync.Once var fields []*querypb.Field return vcursor.StreamExecutePrimitive(ctx, p.Input, bindVars, wantfields, func(qr *sqltypes.Result) error { var err error if wantfields { once.Do(func() { - env.Fields = qr.Fields - fieldRes := &sqltypes.Result{} - err = p.addFields(env, fieldRes) + fields, err = p.evalFields(env, qr.Fields) if err != nil { return } - fields = fieldRes.Fields - err = callback(fieldRes) + err = callback(&sqltypes.Result{Fields: fields}) if err != nil { return } @@ -132,27 +128,27 @@ func (p *Projection) GetFields(ctx context.Context, vcursor VCursor, bindVars ma if err != nil { return nil, err } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) - err = p.addFields(env, qr) + env := evalengine.EnvWithBindVars(bindVars) + qr.Fields, err = p.evalFields(env, nil) if err != nil { return nil, err } return qr, nil } -func (p *Projection) addFields(env *evalengine.ExpressionEnv, qr *sqltypes.Result) error { - qr.Fields = nil +func (p *Projection) evalFields(env *evalengine.ExpressionEnv, infields []*querypb.Field) ([]*querypb.Field, error) { + var fields []*querypb.Field for i, col := range p.Cols { - q, err := env.TypeOf(p.Exprs[i]) + q, err := env.TypeOf(p.Exprs[i], infields) if err != nil { - return err + return nil, err } - qr.Fields = append(qr.Fields, &querypb.Field{ + fields = append(fields, &querypb.Field{ Name: col, Type: q, }) } - return nil + return fields, nil } // Inputs implements the Primitive interface diff --git a/go/vt/vtgate/engine/projection_test.go b/go/vt/vtgate/engine/projection_test.go index 701ee8e2aaf..8013c923806 100644 --- a/go/vt/vtgate/engine/projection_test.go +++ b/go/vt/vtgate/engine/projection_test.go @@ -106,7 +106,7 @@ func TestEmptyInput(t *testing.T) { } func TestHexAndBinaryArgument(t *testing.T) { - hexExpr, err := evalengine.Translate(sqlparser.Argument("vtg1"), nil) + hexExpr, err := evalengine.Translate(sqlparser.NewArgument("vtg1"), nil) require.NoError(t, err) proj := &Projection{ Cols: []string{"hex"}, diff --git a/go/vt/vtgate/engine/pullout_subquery.go b/go/vt/vtgate/engine/pullout_subquery.go index d3c614b4dd6..545e795ee60 100644 --- a/go/vt/vtgate/engine/pullout_subquery.go +++ b/go/vt/vtgate/engine/pullout_subquery.go @@ -18,10 +18,10 @@ package engine import ( "context" - "fmt" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/vterrors" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" @@ -189,32 +189,3 @@ func (ps *PulloutSubquery) description() PrimitiveDescription { Other: other, } } - -// PulloutOpcode is a number representing the opcode -// for the PulloutSubquery primitive. -type PulloutOpcode int - -// This is the list of PulloutOpcode values. -const ( - PulloutValue = PulloutOpcode(iota) - PulloutIn - PulloutNotIn - PulloutExists -) - -var pulloutName = map[PulloutOpcode]string{ - PulloutValue: "PulloutValue", - PulloutIn: "PulloutIn", - PulloutNotIn: "PulloutNotIn", - PulloutExists: "PulloutExists", -} - -func (code PulloutOpcode) String() string { - return pulloutName[code] -} - -// MarshalJSON serializes the PulloutOpcode as a JSON string. -// It's used for testing and diagnostics. -func (code PulloutOpcode) MarshalJSON() ([]byte, error) { - return ([]byte)(fmt.Sprintf("\"%s\"", code.String())), nil -} diff --git a/go/vt/vtgate/engine/pullout_subquery_test.go b/go/vt/vtgate/engine/pullout_subquery_test.go index d2f57383e99..9b6e7c490f0 100644 --- a/go/vt/vtgate/engine/pullout_subquery_test.go +++ b/go/vt/vtgate/engine/pullout_subquery_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/sqltypes" - querypb "vitess.io/vitess/go/vt/proto/query" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) func TestPulloutSubqueryValueGood(t *testing.T) { diff --git a/go/vt/vtgate/engine/route_test.go b/go/vt/vtgate/engine/route_test.go index 1866465bf5c..ef0b494e999 100644 --- a/go/vt/vtgate/engine/route_test.go +++ b/go/vt/vtgate/engine/route_test.go @@ -1447,7 +1447,7 @@ func TestExecFail(t *testing.T) { }} _, err = wrapStreamExecute(sel, vc, map[string]*querypb.BindVariable{}, false) require.NoError(t, err, "unexpected ScatterErrorsAsWarnings error %v", err) - vc.ExpectWarnings(t, []*querypb.QueryWarning{{Code: mysql.ERQueryInterrupted, Message: "query timeout -20 (errno 1317) (sqlstate HY000)"}}) + vc.ExpectWarnings(t, []*querypb.QueryWarning{{Code: uint32(mysql.ERQueryInterrupted), Message: "query timeout -20 (errno 1317) (sqlstate HY000)"}}) }) } diff --git a/go/vt/vtgate/engine/routing.go b/go/vt/vtgate/engine/routing.go index e4ec06aeaba..f03c0152404 100644 --- a/go/vt/vtgate/engine/routing.go +++ b/go/vt/vtgate/engine/routing.go @@ -190,7 +190,7 @@ func (rp *RoutingParameters) routeInfoSchemaQuery(ctx context.Context, vcursor V return defaultRoute() } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) var specifiedKS string for _, tableSchema := range rp.SysTableTableSchema { result, err := env.Evaluate(tableSchema) @@ -333,7 +333,7 @@ func (rp *RoutingParameters) byDestination(ctx context.Context, vcursor VCursor, } func (rp *RoutingParameters) equal(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]*srvtopo.ResolvedShard, []map[string]*querypb.BindVariable, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) value, err := env.Evaluate(rp.Values[0]) if err != nil { return nil, nil, err @@ -350,7 +350,7 @@ func (rp *RoutingParameters) equal(ctx context.Context, vcursor VCursor, bindVar } func (rp *RoutingParameters) equalMultiCol(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]*srvtopo.ResolvedShard, []map[string]*querypb.BindVariable, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) var rowValue []sqltypes.Value for _, rvalue := range rp.Values { v, err := env.Evaluate(rvalue) @@ -372,7 +372,7 @@ func (rp *RoutingParameters) equalMultiCol(ctx context.Context, vcursor VCursor, } func (rp *RoutingParameters) in(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]*srvtopo.ResolvedShard, []map[string]*querypb.BindVariable, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) value, err := env.Evaluate(rp.Values[0]) if err != nil { return nil, nil, err @@ -398,7 +398,7 @@ func (rp *RoutingParameters) inMultiCol(ctx context.Context, vcursor VCursor, bi } func (rp *RoutingParameters) multiEqual(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]*srvtopo.ResolvedShard, []map[string]*querypb.BindVariable, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) value, err := env.Evaluate(rp.Values[0]) if err != nil { return nil, nil, err @@ -416,7 +416,7 @@ func (rp *RoutingParameters) multiEqual(ctx context.Context, vcursor VCursor, bi func (rp *RoutingParameters) multiEqualMultiCol(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]*srvtopo.ResolvedShard, []map[string]*querypb.BindVariable, error) { var multiColValues [][]sqltypes.Value - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) for _, rvalue := range rp.Values { v, err := env.Evaluate(rvalue) if err != nil { @@ -564,7 +564,7 @@ func generateRowColValues(vcursor VCursor, bindVars map[string]*querypb.BindVari var multiColValues [][]sqltypes.Value var lv []sqltypes.Value isSingleVal := map[int]any{} - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) for colIdx, rvalue := range values { result, err := env.Evaluate(rvalue) if err != nil { diff --git a/go/vt/vtgate/engine/scalar_aggregation.go b/go/vt/vtgate/engine/scalar_aggregation.go index a1a76091689..a0cf09bed9d 100644 --- a/go/vt/vtgate/engine/scalar_aggregation.go +++ b/go/vt/vtgate/engine/scalar_aggregation.go @@ -25,6 +25,7 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) var _ Primitive = (*ScalarAggregate)(nil) diff --git a/go/vt/vtgate/engine/scalar_aggregation_test.go b/go/vt/vtgate/engine/scalar_aggregation_test.go index 15e72639f3d..ec2fa06c970 100644 --- a/go/vt/vtgate/engine/scalar_aggregation_test.go +++ b/go/vt/vtgate/engine/scalar_aggregation_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/sqltypes" + . "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) func TestEmptyRows(outer *testing.T) { diff --git a/go/vt/vtgate/engine/set.go b/go/vt/vtgate/engine/set.go index 844d49b8552..c1c5aad5689 100644 --- a/go/vt/vtgate/engine/set.go +++ b/go/vt/vtgate/engine/set.go @@ -125,9 +125,8 @@ func (s *Set) TryExecute(ctx context.Context, vcursor VCursor, bindVars map[stri if len(input.Rows) != 1 { return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "should get a single row") } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) env.Row = input.Rows[0] - env.Fields = input.Fields for _, setOp := range s.Ops { err := setOp.Execute(ctx, vcursor, env) if err != nil { diff --git a/go/vt/vtgate/engine/set_test.go b/go/vt/vtgate/engine/set_test.go index e6d305be68c..7d5748ab6da 100644 --- a/go/vt/vtgate/engine/set_test.go +++ b/go/vt/vtgate/engine/set_test.go @@ -27,7 +27,6 @@ import ( "github.com/stretchr/testify/require" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/sqltypes" @@ -108,7 +107,7 @@ func TestSetTable(t *testing.T) { setOps: []SetOp{ &UserDefinedVariable{ Name: "x", - Expr: evalengine.NewColumn(0, collations.TypedCollation{}), + Expr: evalengine.NewColumn(0), }, }, qr: []*sqltypes.Result{sqltypes.MakeTestResult( diff --git a/go/vt/vtgate/engine/update.go b/go/vt/vtgate/engine/update.go index 8a26fa87629..8da4156cbaf 100644 --- a/go/vt/vtgate/engine/update.go +++ b/go/vt/vtgate/engine/update.go @@ -120,7 +120,7 @@ func (upd *Update) updateVindexEntries(ctx context.Context, vcursor VCursor, bin for colNum, field := range subQueryResult.Fields { fieldColNumMap[field.Name] = colNum } - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) for _, row := range subQueryResult.Rows { ksid, err := resolveKeyspaceID(ctx, vcursor, upd.KsidVindex, row[0:upd.KsidLength]) diff --git a/go/vt/vtgate/engine/update_test.go b/go/vt/vtgate/engine/update_test.go index e75f8dec3f6..e87919611ba 100644 --- a/go/vt/vtgate/engine/update_test.go +++ b/go/vt/vtgate/engine/update_test.go @@ -21,7 +21,6 @@ import ( "errors" "testing" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/vtgate/evalengine" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -94,7 +93,7 @@ func TestUpdateEqual(t *testing.T) { }) // Failure case - upd.Values = []evalengine.Expr{evalengine.NewBindVar("aa", collations.TypedCollation{})} + upd.Values = []evalengine.Expr{evalengine.NewBindVar("aa")} _, err = upd.TryExecute(context.Background(), vc, map[string]*querypb.BindVariable{}, false) require.EqualError(t, err, `query arguments missing for aa`) } diff --git a/go/vt/vtgate/engine/vindex_func.go b/go/vt/vtgate/engine/vindex_func.go index 7e1802077d1..ec57aa63122 100644 --- a/go/vt/vtgate/engine/vindex_func.go +++ b/go/vt/vtgate/engine/vindex_func.go @@ -111,7 +111,7 @@ func (vf *VindexFunc) GetFields(ctx context.Context, vcursor VCursor, bindVars m } func (vf *VindexFunc) mapVindex(ctx context.Context, vcursor VCursor, bindVars map[string]*querypb.BindVariable) (*sqltypes.Result, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) k, err := env.Evaluate(vf.Value) if err != nil { return nil, err diff --git a/go/vt/vtgate/engine/vindex_lookup.go b/go/vt/vtgate/engine/vindex_lookup.go index 816507ae086..b090e2146fc 100644 --- a/go/vt/vtgate/engine/vindex_lookup.go +++ b/go/vt/vtgate/engine/vindex_lookup.go @@ -247,7 +247,7 @@ func (vr *VindexLookup) executeBatch(ctx context.Context, vcursor VCursor, ids [ } func (vr *VindexLookup) generateIds(vcursor VCursor, bindVars map[string]*querypb.BindVariable) ([]sqltypes.Value, error) { - env := evalengine.EnvWithBindVars(bindVars, vcursor.ConnCollation()) + env := evalengine.EnvWithBindVars(bindVars) value, err := env.Evaluate(vr.Values[0]) if err != nil { return nil, err diff --git a/go/vt/vtgate/evalengine/api_arithmetic_test.go b/go/vt/vtgate/evalengine/api_arithmetic_test.go index 9a941d5242e..cadd979ca41 100644 --- a/go/vt/vtgate/evalengine/api_arithmetic_test.go +++ b/go/vt/vtgate/evalengine/api_arithmetic_test.go @@ -350,7 +350,7 @@ func TestArithmetics(t *testing.T) { // testing for overflow of float64 v1: NewFloat64(math.MaxFloat64), v2: NewFloat64(0.5), - err: dataOutOfRangeError(math.MaxFloat64, 0.5, "BIGINT", "/").Error(), + err: dataOutOfRangeError(math.MaxFloat64, 0.5, "DOUBLE", "/").Error(), }}, }, { operator: "*", diff --git a/go/vt/vtgate/evalengine/api_compare_test.go b/go/vt/vtgate/evalengine/api_compare_test.go index b031db178c3..12470c3b745 100644 --- a/go/vt/vtgate/evalengine/api_compare_test.go +++ b/go/vt/vtgate/evalengine/api_compare_test.go @@ -65,7 +65,6 @@ func defaultCollation() collations.TypedCollation { Repertoire: collations.RepertoireASCII, } } - func (tc testCase) run(t *testing.T) { if tc.bv == nil { tc.bv = map[string]*querypb.BindVariable{} @@ -77,9 +76,14 @@ func (tc testCase) run(t *testing.T) { env := &ExpressionEnv{ BindVars: tc.bv, Row: tc.row, - Fields: fields, } - cmp, err := (&astCompiler{}).translateComparisonExpr2(tc.op, tc.v1, tc.v2) + ast := &astCompiler{ + cfg: &Config{ + Collation: collations.CollationUtf8mb4ID, + Optimization: OptimizationLevelSimplify, + }, + } + cmp, err := ast.translateComparisonExpr2(tc.op, tc.v1, tc.v2) if err != nil { t.Fatalf("failed to convert: %v", err) } @@ -104,7 +108,7 @@ func TestCompareIntegers(t *testing.T) { tests := []testCase{ { name: "integers are equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewInt64(18)}, }, @@ -125,25 +129,25 @@ func TestCompareIntegers(t *testing.T) { }, { name: "integers are not equal (3)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewInt64(18), sqltypes.NewInt64(98)}, }, { name: "unsigned integers are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewUint64(18)}, }, { name: "unsigned integer and integer are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewUint64(18), sqltypes.NewInt64(18)}, }, { name: "unsigned integer and integer are not equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewUint64(18), sqltypes.NewInt64(42)}, }, @@ -201,7 +205,7 @@ func TestCompareFloats(t *testing.T) { tests := []testCase{ { name: "floats are equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(18)}, }, @@ -222,7 +226,7 @@ func TestCompareFloats(t *testing.T) { }, { name: "floats are not equal (3)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(16516.84), sqltypes.NewFloat64(219541.01)}, }, @@ -280,37 +284,37 @@ func TestCompareDecimals(t *testing.T) { tests := []testCase{ { name: "decimals are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("12.9019")}, }, { name: "decimals are not equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("12.9019"), sqltypes.NewDecimal("489.156849")}, }, { name: "decimal is greater than decimal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.129"), sqltypes.NewDecimal("192.128")}, }, { name: "decimal is not greater than decimal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.128"), sqltypes.NewDecimal("192.129")}, }, { name: "decimal is less than decimal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.128"), sqltypes.NewDecimal("192.129")}, }, { name: "decimal is not less than decimal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.129"), sqltypes.NewDecimal("192.128")}, }, @@ -328,151 +332,151 @@ func TestCompareNumerics(t *testing.T) { tests := []testCase{ { name: "decimal and float are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(189.6), sqltypes.NewDecimal("189.6")}, }, { name: "decimal and float with negative values are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(-98.1839), sqltypes.NewDecimal("-98.1839")}, }, { name: "decimal and float with negative values are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(-98.9381), sqltypes.NewDecimal("-98.1839")}, }, { name: "decimal and float with negative values are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewFloat64(-98.9381), sqltypes.NewDecimal("-98.1839")}, }, { name: "decimal and integer are equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewInt64(8979), sqltypes.NewDecimal("8979")}, }, { name: "decimal and integer are equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("8979.0000"), sqltypes.NewInt64(8979)}, }, { name: "decimal and unsigned integer are equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewUint64(901), sqltypes.NewDecimal("901")}, }, { name: "decimal and unsigned integer are equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("901.00"), sqltypes.NewUint64(901)}, }, { name: "decimal and unsigned integer are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.129"), sqltypes.NewUint64(192)}, }, { name: "decimal and unsigned integer are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("192.129"), sqltypes.NewUint64(192)}, }, { name: "decimal is greater than integer", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("1.01"), sqltypes.NewInt64(1)}, }, { name: "decimal is greater-equal to integer", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("1.00"), sqltypes.NewInt64(1)}, }, { name: "decimal is less than integer", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDecimal(".99"), sqltypes.NewInt64(1)}, }, { name: "decimal is less-equal to integer", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("1.00"), sqltypes.NewInt64(1)}, }, { name: "decimal is greater than float", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("849.896"), sqltypes.NewFloat64(86.568)}, }, { name: "decimal is not greater than float", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("15.23"), sqltypes.NewFloat64(8689.5)}, }, { name: "decimal is greater-equal to float (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("65"), sqltypes.NewFloat64(65)}, }, { name: "decimal is greater-equal to float (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("65"), sqltypes.NewFloat64(60)}, }, { name: "decimal is less than float", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDecimal("0.998"), sqltypes.NewFloat64(0.999)}, }, { name: "decimal is less-equal to float", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDecimal("1.000101"), sqltypes.NewFloat64(1.00101)}, }, { name: "different int types are equal for 8 bit", - v1: NewColumn(0, defaultCollation()), v2: NewLiteralInt(0), + v1: NewColumn(0), v2: NewLiteralInt(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewInt8(0)}, }, { name: "different int types are equal for 32 bit", - v1: NewColumn(0, defaultCollation()), v2: NewLiteralInt(0), + v1: NewColumn(0), v2: NewLiteralInt(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewInt32(0)}, }, { name: "different int types are equal for float32 bit", - v1: NewColumn(0, defaultCollation()), v2: NewLiteralFloat(1.0), + v1: NewColumn(0), v2: NewLiteralFloat(1.0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.MakeTrusted(sqltypes.Float32, []byte("1.0"))}, }, { name: "different unsigned int types are equal for 8 bit", - v1: NewColumn(0, defaultCollation()), v2: NewLiteralInt(0), + v1: NewColumn(0), v2: NewLiteralInt(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.MakeTrusted(sqltypes.Uint8, []byte("0"))}, }, { name: "different unsigned int types are equal for 32 bit", - v1: NewColumn(0, defaultCollation()), v2: NewLiteralInt(0), + v1: NewColumn(0), v2: NewLiteralInt(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewUint32(0)}, }, @@ -490,73 +494,73 @@ func TestCompareDatetime(t *testing.T) { tests := []testCase{ { name: "datetimes are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-22 12:00:00")}, }, { name: "datetimes are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-22 12:00:00"), sqltypes.NewDatetime("2020-10-22 12:00:00")}, }, { name: "datetimes are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-22 12:00:00"), sqltypes.NewDatetime("2021-10-22 10:23:56")}, }, { name: "datetimes are not equal (3)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-01 00:00:00"), sqltypes.NewDatetime("2021-02-01 00:00:00")}, }, { name: "datetime is greater than datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-30 10:42:50"), sqltypes.NewDatetime("2021-10-01 13:10:02")}, }, { name: "datetime is not greater than datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-01 13:10:02"), sqltypes.NewDatetime("2021-10-30 10:42:50")}, }, { name: "datetime is less than datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-01 13:10:02"), sqltypes.NewDatetime("2021-10-30 10:42:50")}, }, { name: "datetime is not less than datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-30 10:42:50"), sqltypes.NewDatetime("2021-10-01 13:10:02")}, }, { name: "datetime is greater-equal to datetime (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-30 10:42:50"), sqltypes.NewDatetime("2021-10-30 10:42:50")}, }, { name: "datetime is greater-equal to datetime (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-30 10:42:50"), sqltypes.NewDatetime("2021-10-01 13:10:02")}, }, { name: "datetime is less-equal to datetime (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-30 10:42:50"), sqltypes.NewDatetime("2021-10-30 10:42:50")}, }, { name: "datetime is less-equal to datetime (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDatetime("2021-10-01 13:10:02"), sqltypes.NewDatetime("2021-10-30 10:42:50")}, }, @@ -574,73 +578,73 @@ func TestCompareTimestamp(t *testing.T) { tests := []testCase{ { name: "timestamps are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-22 12:00:00")}, }, { name: "timestamps are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-22 12:00:00"), sqltypes.NewTimestamp("2020-10-22 12:00:00")}, }, { name: "timestamps are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-22 12:00:00"), sqltypes.NewTimestamp("2021-10-22 10:23:56")}, }, { name: "timestamps are not equal (3)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-01 00:00:00"), sqltypes.NewTimestamp("2021-02-01 00:00:00")}, }, { name: "timestamp is greater than timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-30 10:42:50"), sqltypes.NewTimestamp("2021-10-01 13:10:02")}, }, { name: "timestamp is not greater than timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-01 13:10:02"), sqltypes.NewTimestamp("2021-10-30 10:42:50")}, }, { name: "timestamp is less than timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-01 13:10:02"), sqltypes.NewTimestamp("2021-10-30 10:42:50")}, }, { name: "timestamp is not less than timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-30 10:42:50"), sqltypes.NewTimestamp("2021-10-01 13:10:02")}, }, { name: "timestamp is greater-equal to timestamp (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-30 10:42:50"), sqltypes.NewTimestamp("2021-10-30 10:42:50")}, }, { name: "timestamp is greater-equal to timestamp (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-30 10:42:50"), sqltypes.NewTimestamp("2021-10-01 13:10:02")}, }, { name: "timestamp is less-equal to timestamp (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-30 10:42:50"), sqltypes.NewTimestamp("2021-10-30 10:42:50")}, }, { name: "timestamp is less-equal to timestamp (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewTimestamp("2021-10-01 13:10:02"), sqltypes.NewTimestamp("2021-10-30 10:42:50")}, }, @@ -658,67 +662,67 @@ func TestCompareDate(t *testing.T) { tests := []testCase{ { name: "dates are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22")}, }, { name: "dates are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22"), sqltypes.NewDate("2020-10-21")}, }, { name: "dates are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-01"), sqltypes.NewDate("2021-02-01")}, }, { name: "date is greater than date", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-30"), sqltypes.NewDate("2021-10-01")}, }, { name: "date is not greater than date", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-01"), sqltypes.NewDate("2021-10-30")}, }, { name: "date is less than date", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-01"), sqltypes.NewDate("2021-10-30")}, }, { name: "date is not less than date", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-30"), sqltypes.NewDate("2021-10-01")}, }, { name: "date is greater-equal to date (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-30"), sqltypes.NewDate("2021-10-30")}, }, { name: "date is greater-equal to date (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-30"), sqltypes.NewDate("2021-10-01")}, }, { name: "date is less-equal to date (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-30"), sqltypes.NewDate("2021-10-30")}, }, { name: "date is less-equal to date (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-01"), sqltypes.NewDate("2021-10-30")}, }, @@ -736,67 +740,67 @@ func TestCompareTime(t *testing.T) { tests := []testCase{ { name: "times are equal", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(0, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(0), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewTime("12:00:00")}, }, { name: "times are not equal (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewTime("12:00:00"), sqltypes.NewTime("10:23:56")}, }, { name: "times are not equal (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewTime("00:00:00"), sqltypes.NewTime("10:15:00")}, }, { name: "time is greater than time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewTime("18:14:35"), sqltypes.NewTime("13:01:38")}, }, { name: "time is not greater than time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.GreaterThanOp, row: []sqltypes.Value{sqltypes.NewTime("02:46:02"), sqltypes.NewTime("10:42:50")}, }, { name: "time is less than time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewTime("04:30:00"), sqltypes.NewTime("09:23:48")}, }, { name: "time is not less than time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &F, op: sqlparser.LessThanOp, row: []sqltypes.Value{sqltypes.NewTime("15:21:00"), sqltypes.NewTime("10:00:00")}, }, { name: "time is greater-equal to time (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewTime("10:42:50"), sqltypes.NewTime("10:42:50")}, }, { name: "time is greater-equal to time (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.GreaterEqualOp, row: []sqltypes.Value{sqltypes.NewTime("19:42:50"), sqltypes.NewTime("13:10:02")}, }, { name: "time is less-equal to time (1)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewTime("10:42:50"), sqltypes.NewTime("10:42:50")}, }, { name: "time is less-equal to time (2)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.LessEqualOp, row: []sqltypes.Value{sqltypes.NewTime("10:10:02"), sqltypes.NewTime("10:42:50")}, }, @@ -814,13 +818,13 @@ func TestCompareDates(t *testing.T) { tests := []testCase{ { name: "date equal datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22"), sqltypes.NewDatetime("2021-10-22 00:00:00")}, }, { name: "date equal datetime through bind variables", - v1: NewBindVar("k1", defaultCollation()), v2: NewBindVar("k2", defaultCollation()), + v1: NewBindVar("k1"), v2: NewBindVar("k2"), out: &T, op: sqlparser.EqualOp, bv: map[string]*querypb.BindVariable{ "k1": {Type: sqltypes.Date, Value: []byte("2021-10-22")}, @@ -829,7 +833,7 @@ func TestCompareDates(t *testing.T) { }, { name: "date not equal datetime through bind variables", - v1: NewBindVar("k1", defaultCollation()), v2: NewBindVar("k2", defaultCollation()), + v1: NewBindVar("k1"), v2: NewBindVar("k2"), out: &T, op: sqlparser.NotEqualOp, bv: map[string]*querypb.BindVariable{ "k1": {Type: sqltypes.Date, Value: []byte("2021-02-20")}, @@ -838,73 +842,73 @@ func TestCompareDates(t *testing.T) { }, { name: "date not equal datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22"), sqltypes.NewDatetime("2021-10-20 00:06:00")}, }, { name: "date equal timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22"), sqltypes.NewTimestamp("2021-10-22 00:00:00")}, }, { name: "date not equal timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-10-22"), sqltypes.NewTimestamp("2021-10-22 16:00:00")}, }, { name: "date equal time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewDate(time.Now().Format("2006-01-02")), sqltypes.NewTime("00:00:00")}, }, { name: "date not equal time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDate(time.Now().Format("2006-01-02")), sqltypes.NewTime("12:00:00")}, }, { name: "string equal datetime", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("2021-10-22"), sqltypes.NewDatetime("2021-10-22 00:00:00")}, }, { name: "string equal timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("2021-10-22 00:00:00"), sqltypes.NewTimestamp("2021-10-22 00:00:00")}, }, { name: "string not equal timestamp", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("2021-10-22 06:00:30"), sqltypes.NewTimestamp("2021-10-20 15:02:10")}, }, { name: "string equal time", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("00:05:12"), sqltypes.NewTime("00:05:12")}, }, { name: "string equal date", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("2021-02-22"), sqltypes.NewDate("2021-02-22")}, }, { name: "string not equal date (1, date on the RHS)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("2021-02-20"), sqltypes.NewDate("2021-03-30")}, }, { name: "string not equal date (2, date on the LHS)", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumn(0), v2: NewColumn(1), out: &T, op: sqlparser.NotEqualOp, row: []sqltypes.Value{sqltypes.NewDate("2021-03-30"), sqltypes.NewVarChar("2021-02-20")}, }, @@ -922,13 +926,13 @@ func TestCompareStrings(t *testing.T) { tests := []testCase{ { name: "string equal string", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumnWithCollation(0, defaultCollation()), v2: NewColumnWithCollation(1, defaultCollation()), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("toto"), sqltypes.NewVarChar("toto")}, }, { name: "string equal number", - v1: NewColumn(0, defaultCollation()), v2: NewColumn(1, defaultCollation()), + v1: NewColumnWithCollation(0, defaultCollation()), v2: NewColumnWithCollation(1, defaultCollation()), out: &T, op: sqlparser.EqualOp, row: []sqltypes.Value{sqltypes.NewVarChar("1"), sqltypes.NewInt64(1)}, }, diff --git a/go/vt/vtgate/evalengine/api_literal.go b/go/vt/vtgate/evalengine/api_literal.go index 77756a21849..ac8189ab0d1 100644 --- a/go/vt/vtgate/evalengine/api_literal.go +++ b/go/vt/vtgate/evalengine/api_literal.go @@ -19,10 +19,12 @@ package evalengine import ( "encoding/hex" "math" + "math/big" "strconv" "unicode/utf8" "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" @@ -154,6 +156,15 @@ func parseHexNumber(val []byte) ([]byte, error) { return parseHexLiteral(val[1:]) } +func parseBitLiteral(val []byte) ([]byte, error) { + var i big.Int + _, ok := i.SetString(string(val), 2) + if !ok { + panic("malformed bit literal from parser") + } + return i.Bytes(), nil +} + func NewLiteralBinary(val []byte) *Literal { return &Literal{newEvalBinary(val)} } @@ -174,30 +185,46 @@ func NewLiteralBinaryFromHexNum(val []byte) (*Literal, error) { return &Literal{newEvalBytesHex(raw)}, nil } +func NewLiteralBinaryFromBit(val []byte) (*Literal, error) { + raw, err := parseBitLiteral(val) + if err != nil { + return nil, err + } + return &Literal{newEvalBytesBit(raw)}, nil +} + // NewBindVar returns a bind variable -func NewBindVar(key string, collation collations.TypedCollation) Expr { +func NewBindVar(key string) *BindVariable { return &BindVariable{ - Key: key, - col: collation, - coerce: -1, + Key: key, + Collation: collations.TypedCollation{ + Collation: collations.Unknown, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireUnicode, + }, } } // NewBindVarTuple returns a bind variable containing a tuple -func NewBindVarTuple(key string) Expr { +func NewBindVarTuple(key string) *BindVariable { return &BindVariable{ - Key: key, - tuple: true, - coerce: -1, + Key: key, + Type: sqltypes.Tuple, + typed: true, } } // NewColumn returns a column expression -func NewColumn(offset int, collation collations.TypedCollation) Expr { - return &Column{ - Offset: offset, - coll: collation, - } +func NewColumn(offset int) *Column { + return NewColumnWithCollation(offset, collations.TypedCollation{ + Collation: collations.Unknown, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireUnicode, + }) +} + +func NewColumnWithCollation(offset int, coll collations.TypedCollation) *Column { + return &Column{Offset: offset, Type: -1, Collation: coll} } // NewTupleExpr returns a tuple expression diff --git a/go/vt/vtgate/evalengine/api_types.go b/go/vt/vtgate/evalengine/api_types.go index 817689d04c8..4a403823f63 100644 --- a/go/vt/vtgate/evalengine/api_types.go +++ b/go/vt/vtgate/evalengine/api_types.go @@ -17,9 +17,6 @@ limitations under the License. package evalengine import ( - "fmt" - "strconv" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" @@ -147,7 +144,7 @@ func ToFloat64(v sqltypes.Value) (float64, error) { } func LiteralToValue(literal *sqlparser.Literal) (sqltypes.Value, error) { - lit, err := (&astCompiler{}).translateLiteral(literal) + lit, err := translateLiteral(literal, collations.Default()) if err != nil { return sqltypes.Value{}, err } @@ -175,28 +172,3 @@ func ToNative(v sqltypes.Value) (any, error) { } return out, err } - -func NormalizeValue(v sqltypes.Value, coll collations.ID) string { - typ := v.Type() - if typ == sqltypes.Null { - return "NULL" - } - if typ == sqltypes.VarChar && coll == collations.CollationBinaryID { - return fmt.Sprintf("VARBINARY(%q)", v.Raw()) - } - if v.IsQuoted() || typ == sqltypes.Bit { - return fmt.Sprintf("%v(%q)", typ, v.Raw()) - } - if typ == sqltypes.Float32 || typ == sqltypes.Float64 { - var bitsize = 64 - if typ == sqltypes.Float32 { - bitsize = 32 - } - f, err := strconv.ParseFloat(v.RawStr(), bitsize) - if err != nil { - panic(err) - } - return fmt.Sprintf("%v(%s)", typ, FormatFloat(typ, f)) - } - return fmt.Sprintf("%v(%s)", typ, v.Raw()) -} diff --git a/go/vt/vtgate/evalengine/arena.go b/go/vt/vtgate/evalengine/arena.go new file mode 100644 index 00000000000..0a4627636ae --- /dev/null +++ b/go/vt/vtgate/evalengine/arena.go @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" +) + +// Arena is an arena memory allocator for eval types. +// It allocates the types from reusable slices to prevent heap allocations. +// After each evaluation execution, (*Arena).reset() should be called to reset the arena. +type Arena struct { + aInt64 []evalInt64 + aUint64 []evalUint64 + aFloat64 []evalFloat + aDecimal []evalDecimal + aBytes []evalBytes +} + +func (a *Arena) reset() { + a.aInt64 = a.aInt64[:0] + a.aUint64 = a.aUint64[:0] + a.aFloat64 = a.aFloat64[:0] + a.aDecimal = a.aDecimal[:0] + a.aBytes = a.aBytes[:0] +} + +func (a *Arena) newEvalDecimalWithPrec(dec decimal.Decimal, prec int32) *evalDecimal { + if cap(a.aDecimal) > len(a.aDecimal) { + a.aDecimal = a.aDecimal[:len(a.aDecimal)+1] + } else { + a.aDecimal = append(a.aDecimal, evalDecimal{}) + } + val := &a.aDecimal[len(a.aDecimal)-1] + val.dec = dec + val.length = prec + return val +} + +func (a *Arena) newEvalDecimal(dec decimal.Decimal, m, d int32) *evalDecimal { + if m == 0 && d == 0 { + return a.newEvalDecimalWithPrec(dec, -dec.Exponent()) + } + return a.newEvalDecimalWithPrec(dec.Clamp(m-d, d), d) +} + +func (a *Arena) newEvalBool(b bool) *evalInt64 { + if b { + return a.newEvalInt64(1) + } + return a.newEvalInt64(0) +} + +func (a *Arena) newEvalInt64(i int64) *evalInt64 { + if cap(a.aInt64) > len(a.aInt64) { + a.aInt64 = a.aInt64[:len(a.aInt64)+1] + } else { + a.aInt64 = append(a.aInt64, evalInt64{}) + } + val := &a.aInt64[len(a.aInt64)-1] + val.i = i + return val +} + +func (a *Arena) newEvalUint64(u uint64) *evalUint64 { + if cap(a.aUint64) > len(a.aUint64) { + a.aUint64 = a.aUint64[:len(a.aUint64)+1] + } else { + a.aUint64 = append(a.aUint64, evalUint64{}) + } + val := &a.aUint64[len(a.aUint64)-1] + val.u = u + val.hexLiteral = false + return val +} + +func (a *Arena) newEvalFloat(f float64) *evalFloat { + if cap(a.aFloat64) > len(a.aFloat64) { + a.aFloat64 = a.aFloat64[:len(a.aFloat64)+1] + } else { + a.aFloat64 = append(a.aFloat64, evalFloat{}) + } + val := &a.aFloat64[len(a.aFloat64)-1] + val.f = f + return val +} + +func (a *Arena) newEvalBytesEmpty() *evalBytes { + if cap(a.aBytes) > len(a.aBytes) { + a.aBytes = a.aBytes[:len(a.aBytes)+1] + } else { + a.aBytes = append(a.aBytes, evalBytes{}) + } + return &a.aBytes[len(a.aBytes)-1] +} + +func (a *Arena) newEvalBinary(raw []byte) *evalBytes { + b := a.newEvalBytesEmpty() + b.tt = int16(sqltypes.VarBinary) + b.col = collationBinary + b.bytes = raw + return b +} + +func (a *Arena) newEvalText(raw []byte, tc collations.TypedCollation) *evalBytes { + b := a.newEvalBytesEmpty() + b.tt = int16(sqltypes.VarChar) + b.col = tc + b.bytes = raw + return b +} diff --git a/go/vt/vtgate/evalengine/arithmetic.go b/go/vt/vtgate/evalengine/arithmetic.go index 47a2880a746..89ecb6fd22f 100644 --- a/go/vt/vtgate/evalengine/arithmetic.go +++ b/go/vt/vtgate/evalengine/arithmetic.go @@ -17,6 +17,7 @@ limitations under the License. package evalengine import ( + "math" "strings" "golang.org/x/exp/constraints" @@ -25,12 +26,17 @@ import ( "vitess.io/vitess/go/sqltypes" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" ) func dataOutOfRangeError[N1, N2 constraints.Integer | constraints.Float](v1 N1, v2 N2, typ, sign string) error { return vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "%s value is out of range in '(%v %s %v)'", typ, v1, sign, v2) } +func dataOutOfRangeErrorDecimal(v1 decimal.Decimal, v2 decimal.Decimal, typ, sign string) error { + return vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "%s value is out of range in '(%v %s %v)'", typ, v1.String(), sign, v2.String()) +} + func addNumericWithError(left, right eval) (eval, error) { v1, v2 := makeNumericAndPrioritize(left, right) switch v1 := v1.(type) { @@ -126,6 +132,108 @@ func divideNumericWithError(left, right eval, precise bool) (eval, error) { return mathDiv_xx(v1, v2, divPrecisionIncrement) } +func integerDivideNumericWithError(left, right eval, precise bool) (eval, error) { + v1 := evalToNumeric(left) + v2 := evalToNumeric(right) + switch v1 := v1.(type) { + case *evalInt64: + switch v2 := v2.(type) { + case *evalInt64: + return mathIntDiv_ii(v1, v2) + case *evalUint64: + return mathIntDiv_iu(v1, v2) + case *evalFloat: + return mathIntDiv_di(v1.toDecimal(0, 0), v2.toDecimal(0, 0)) + case *evalDecimal: + return mathIntDiv_di(v1.toDecimal(0, 0), v2) + } + case *evalUint64: + switch v2 := v2.(type) { + case *evalInt64: + return mathIntDiv_ui(v1, v2) + case *evalUint64: + return mathIntDiv_uu(v1, v2) + case *evalFloat: + return mathIntDiv_du(v1.toDecimal(0, 0), v2.toDecimal(0, 0)) + case *evalDecimal: + return mathIntDiv_du(v1.toDecimal(0, 0), v2) + } + case *evalFloat: + switch v2 := v2.(type) { + case *evalUint64: + return mathIntDiv_du(v1.toDecimal(0, 0), v2.toDecimal(0, 0)) + default: + return mathIntDiv_di(v1.toDecimal(0, 0), v2.toDecimal(0, 0)) + } + case *evalDecimal: + switch v2 := v2.(type) { + case *evalUint64: + return mathIntDiv_du(v1, v2.toDecimal(0, 0)) + default: + return mathIntDiv_di(v1, v2.toDecimal(0, 0)) + } + } + + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "invalid arithmetic between: %s %s", evalToSQLValue(v1), evalToSQLValue(v2)) +} + +func modNumericWithError(left, right eval, precise bool) (eval, error) { + v1 := evalToNumeric(left) + v2 := evalToNumeric(right) + + switch v1 := v1.(type) { + case *evalInt64: + switch v2 := v2.(type) { + case *evalInt64: + return mathMod_ii(v1, v2) + case *evalUint64: + return mathMod_iu(v1, v2) + case *evalFloat: + v1f, ok := v1.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathMod_ff(v1f, v2) + case *evalDecimal: + return mathMod_dd(v1.toDecimal(0, 0), v2) + } + case *evalUint64: + switch v2 := v2.(type) { + case *evalInt64: + return mathMod_ui(v1, v2) + case *evalUint64: + return mathMod_uu(v1, v2) + case *evalFloat: + v1f, ok := v1.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathMod_ff(v1f, v2) + case *evalDecimal: + return mathMod_dd(v1.toDecimal(0, 0), v2) + } + case *evalDecimal: + switch v2 := v2.(type) { + case *evalFloat: + v1f, ok := v1.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathMod_ff(v1f, v2) + default: + return mathMod_dd(v1, v2.toDecimal(0, 0)) + } + case *evalFloat: + v2f, ok := v2.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathMod_ff(v1, v2f) + } + + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "invalid arithmetic between: %s %s", evalToSQLValue(v1), evalToSQLValue(v2)) +} + // makeNumericAndPrioritize reorders the input parameters // to be Float64, Decimal, Uint64, Int64. func makeNumericAndPrioritize(left, right eval) (evalNumeric, evalNumeric) { @@ -161,28 +269,68 @@ func mathAdd_ii0(v1, v2 int64) (int64, error) { return result, nil } -func mathSub_ii(v1, v2 int64) (*evalInt64, error) { - result, err := mathSub_ii0(v1, v2) - return newEvalInt64(result), err +func mathAdd_ui(v1 uint64, v2 int64) (*evalUint64, error) { + result, err := mathAdd_ui0(v1, v2) + return newEvalUint64(result), err } -func mathSub_ii0(v1, v2 int64) (int64, error) { - result := v1 - v2 - if (result < v1) != (v2 > 0) { - return 0, dataOutOfRangeError(v1, v2, "BIGINT", "-") +func mathAdd_ui0(v1 uint64, v2 int64) (uint64, error) { + result := v1 + uint64(v2) + if v2 < 0 && v1 < uint64(-v2) || v2 > 0 && (result < v1 || result < uint64(v2)) { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "+") } return result, nil } -func mathMul_ii(v1, v2 int64) (*evalInt64, error) { - result, err := mathMul_ii0(v1, v2) +func mathAdd_uu(v1, v2 uint64) (*evalUint64, error) { + result, err := mathAdd_uu0(v1, v2) + return newEvalUint64(result), err +} + +func mathAdd_uu0(v1, v2 uint64) (uint64, error) { + result := v1 + v2 + if result < v1 || result < v2 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "+") + } + return result, nil +} + +var errDecimalOutOfRange = vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "DECIMAL value is out of range") + +func mathAdd_fx(v1 float64, v2 evalNumeric) (*evalFloat, error) { + v2f, ok := v2.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathAdd_ff(v1, v2f.f), nil +} + +func mathAdd_ff(v1, v2 float64) *evalFloat { + return newEvalFloat(v1 + v2) +} + +func mathAdd_dx(v1 *evalDecimal, v2 evalNumeric) *evalDecimal { + return mathAdd_dd(v1, v2.toDecimal(0, 0)) +} + +func mathAdd_dd(v1, v2 *evalDecimal) *evalDecimal { + return newEvalDecimalWithPrec(v1.dec.Add(v2.dec), maxprec(v1.length, v2.length)) +} + +func mathAdd_dd0(v1, v2 *evalDecimal) { + v1.dec = v1.dec.Add(v2.dec) + v1.length = maxprec(v1.length, v2.length) +} + +func mathSub_ii(v1, v2 int64) (*evalInt64, error) { + result, err := mathSub_ii0(v1, v2) return newEvalInt64(result), err } -func mathMul_ii0(v1, v2 int64) (int64, error) { - result := v1 * v2 - if v1 != 0 && result/v1 != v2 { - return 0, dataOutOfRangeError(v1, v2, "BIGINT", "*") +func mathSub_ii0(v1, v2 int64) (int64, error) { + result := v1 - v2 + if (result < v1) != (v2 > 0) { + return 0, dataOutOfRangeError(v1, v2, "BIGINT", "-") } return result, nil } @@ -193,80 +341,104 @@ func mathSub_iu(v1 int64, v2 uint64) (*evalUint64, error) { } func mathSub_iu0(v1 int64, v2 uint64) (uint64, error) { - if v1 < 0 || v1 < int64(v2) { + if v1 < 0 { return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "-") } return mathSub_uu0(uint64(v1), v2) } -func mathAdd_ui(v1 uint64, v2 int64) (*evalUint64, error) { - result, err := mathAdd_ui0(v1, v2) - return newEvalUint64(result), err -} - -func mathAdd_ui0(v1 uint64, v2 int64) (uint64, error) { - result := v1 + uint64(v2) - if v2 < 0 && v1 < uint64(-v2) || v2 > 0 && (result < v1 || result < uint64(v2)) { - return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "+") - } - return result, nil -} - func mathSub_ui(v1 uint64, v2 int64) (*evalUint64, error) { result, err := mathSub_ui0(v1, v2) return newEvalUint64(result), err } func mathSub_ui0(v1 uint64, v2 int64) (uint64, error) { - if int64(v1) < v2 && v2 > 0 { + if v2 > 0 && v1 < uint64(v2) { return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "-") } // uint - (- int) = uint + int if v2 < 0 { - return mathAdd_ui0(v1, -v2) + return mathAdd_uu0(v1, uint64(-v2)) } return mathSub_uu0(v1, uint64(v2)) } -func mathMul_ui(v1 uint64, v2 int64) (*evalUint64, error) { - result, err := mathMul_ui0(v1, v2) +func mathSub_uu(v1, v2 uint64) (*evalUint64, error) { + result, err := mathSub_uu0(v1, v2) return newEvalUint64(result), err } -func mathMul_ui0(v1 uint64, v2 int64) (uint64, error) { - if v1 == 0 || v2 == 0 { - return 0, nil +func mathSub_uu0(v1, v2 uint64) (uint64, error) { + result := v1 - v2 + if v2 > v1 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "-") } - if v2 < 0 || int64(v1) < 0 { - return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "*") + return result, nil +} + +func mathSub_fx(v1 float64, v2 evalNumeric) (*evalFloat, error) { + v2f, ok := v2.toFloat() + if !ok { + return nil, errDecimalOutOfRange } - return mathMul_uu0(v1, uint64(v2)) + return mathSub_ff(v1, v2f.f), nil } -func mathAdd_uu(v1, v2 uint64) (*evalUint64, error) { - result, err := mathAdd_uu0(v1, v2) - return newEvalUint64(result), err +func mathSub_xf(v1 evalNumeric, v2 float64) (*evalFloat, error) { + v1f, ok := v1.toFloat() + if !ok { + return nil, errDecimalOutOfRange + } + return mathSub_ff(v1f.f, v2), nil } -func mathAdd_uu0(v1, v2 uint64) (uint64, error) { - result := v1 + v2 - if result < v1 || result < v2 { - return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "+") +func mathSub_ff(v1, v2 float64) *evalFloat { + return newEvalFloat(v1 - v2) +} + +func mathSub_dx(v1 *evalDecimal, v2 evalNumeric) *evalDecimal { + return mathSub_dd(v1, v2.toDecimal(0, 0)) +} + +func mathSub_xd(v1 evalNumeric, v2 *evalDecimal) *evalDecimal { + return mathSub_dd(v1.toDecimal(0, 0), v2) +} + +func mathSub_dd(v1, v2 *evalDecimal) *evalDecimal { + return newEvalDecimalWithPrec(v1.dec.Sub(v2.dec), maxprec(v1.length, v2.length)) +} + +func mathSub_dd0(v1, v2 *evalDecimal) { + v1.dec = v1.dec.Sub(v2.dec) + v1.length = maxprec(v1.length, v2.length) +} + +func mathMul_ii(v1, v2 int64) (*evalInt64, error) { + result, err := mathMul_ii0(v1, v2) + return newEvalInt64(result), err +} + +func mathMul_ii0(v1, v2 int64) (int64, error) { + result := v1 * v2 + if v1 != 0 && result/v1 != v2 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT", "*") } return result, nil } -func mathSub_uu(v1, v2 uint64) (*evalUint64, error) { - result, err := mathSub_uu0(v1, v2) +func mathMul_ui(v1 uint64, v2 int64) (*evalUint64, error) { + result, err := mathMul_ui0(v1, v2) return newEvalUint64(result), err } -func mathSub_uu0(v1, v2 uint64) (uint64, error) { - result := v1 - v2 - if v2 > v1 { - return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "-") +func mathMul_ui0(v1 uint64, v2 int64) (uint64, error) { + if v1 == 0 || v2 == 0 { + return 0, nil } - return result, nil + if v2 < 0 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "*") + } + return mathMul_uu0(v1, uint64(v2)) } func mathMul_uu(v1, v2 uint64) (*evalUint64, error) { @@ -285,28 +457,6 @@ func mathMul_uu0(v1, v2 uint64) (uint64, error) { return result, nil } -var errDecimalOutOfRange = vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "DECIMAL value is out of range") - -func mathAdd_fx(v1 float64, v2 evalNumeric) (*evalFloat, error) { - v2f, ok := v2.toFloat() - if !ok { - return nil, errDecimalOutOfRange - } - return mathAdd_ff(v1, v2f.f), nil -} - -func mathAdd_ff(v1, v2 float64) *evalFloat { - return newEvalFloat(v1 + v2) -} - -func mathSub_fx(v1 float64, v2 evalNumeric) (*evalFloat, error) { - v2f, ok := v2.toFloat() - if !ok { - return nil, errDecimalOutOfRange - } - return mathSub_ff(v1, v2f.f), nil -} - func mathMul_fx(v1 float64, v2 evalNumeric) (eval, error) { v2f, ok := v2.toFloat() if !ok { @@ -326,36 +476,6 @@ func maxprec(a, b int32) int32 { return b } -func mathAdd_dx(v1 *evalDecimal, v2 evalNumeric) *evalDecimal { - return mathAdd_dd(v1, v2.toDecimal(0, 0)) -} - -func mathAdd_dd(v1, v2 *evalDecimal) *evalDecimal { - return newEvalDecimalWithPrec(v1.dec.Add(v2.dec), maxprec(v1.length, v2.length)) -} - -func mathAdd_dd0(v1, v2 *evalDecimal) { - v1.dec = v1.dec.Add(v2.dec) - v1.length = maxprec(v1.length, v2.length) -} - -func mathSub_dx(v1 *evalDecimal, v2 evalNumeric) *evalDecimal { - return mathSub_dd(v1, v2.toDecimal(0, 0)) -} - -func mathSub_xd(v1 evalNumeric, v2 *evalDecimal) *evalDecimal { - return mathSub_dd(v1.toDecimal(0, 0), v2) -} - -func mathSub_dd(v1, v2 *evalDecimal) *evalDecimal { - return newEvalDecimalWithPrec(v1.dec.Sub(v2.dec), maxprec(v1.length, v2.length)) -} - -func mathSub_dd0(v1, v2 *evalDecimal) { - v1.dec = v1.dec.Sub(v2.dec) - v1.length = maxprec(v1.length, v2.length) -} - func mathMul_dx(v1 *evalDecimal, v2 evalNumeric) *evalDecimal { return mathMul_dd(v1, v2.toDecimal(0, 0)) } @@ -405,25 +525,181 @@ func mathDiv_ff(v1, v2 float64) (eval, error) { func mathDiv_ff0(v1, v2 float64) (float64, error) { result := v1 / v2 - divisorLessThanOne := v2 < 1 - resultMismatch := v2*result != v1 - if divisorLessThanOne && resultMismatch { - return 0, dataOutOfRangeError(v1, v2, "BIGINT", "/") + if math.IsInf(result, 1) || math.IsInf(result, -1) { + return 0, dataOutOfRangeError(v1, v2, "DOUBLE", "/") } return result, nil } -func mathSub_xf(v1 evalNumeric, v2 float64) (*evalFloat, error) { - v1f, ok := v1.toFloat() +func mathIntDiv_ii(v1, v2 *evalInt64) (eval, error) { + if v2.i == 0 { + return nil, nil + } + result := v1.i / v2.i + return newEvalInt64(result), nil +} + +func mathIntDiv_iu(v1 *evalInt64, v2 *evalUint64) (eval, error) { + if v2.u == 0 { + return nil, nil + } + result, err := mathIntDiv_iu0(v1.i, v2.u) + return newEvalUint64(result), err +} + +func mathIntDiv_iu0(v1 int64, v2 uint64) (uint64, error) { + if v1 < 0 { + if v2 >= math.MaxInt64 { + // We know here that v2 is always so large the result + // must be 0. + return 0, nil + } + result := v1 / int64(v2) + if result < 0 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "DIV") + } + return uint64(result), nil + + } + return uint64(v1) / v2, nil +} + +func mathIntDiv_ui(v1 *evalUint64, v2 *evalInt64) (eval, error) { + if v2.i == 0 { + return nil, nil + } + result, err := mathIntDiv_ui0(v1.u, v2.i) + return newEvalUint64(result), err +} + +func mathIntDiv_ui0(v1 uint64, v2 int64) (uint64, error) { + if v2 < 0 { + if v1 >= math.MaxInt64 { + // We know that v1 is always large here and with v2, the result + // must be at least -1 so we can't store this in the available range. + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "DIV") + } + // Safe to cast since we know it fits in int64 when we get here. + result := int64(v1) / v2 + if result < 0 { + return 0, dataOutOfRangeError(v1, v2, "BIGINT UNSIGNED", "DIV") + } + return uint64(result), nil + } + return v1 / uint64(v2), nil +} + +func mathIntDiv_uu(v1, v2 *evalUint64) (eval, error) { + if v2.u == 0 { + return nil, nil + } + return newEvalUint64(v1.u / v2.u), nil +} + +func mathIntDiv_di(v1, v2 *evalDecimal) (eval, error) { + if v2.dec.IsZero() { + return nil, nil + } + result, err := mathIntDiv_di0(v1, v2) + return newEvalInt64(result), err +} + +func mathIntDiv_di0(v1, v2 *evalDecimal) (int64, error) { + div, _ := v1.dec.QuoRem(v2.dec, 0) + result, ok := div.Int64() if !ok { - return nil, errDecimalOutOfRange + return 0, dataOutOfRangeErrorDecimal(v1.dec, v2.dec, "BIGINT", "DIV") } - return mathSub_ff(v1f.f, v2), nil + return result, nil } -func mathSub_ff(v1, v2 float64) *evalFloat { - return newEvalFloat(v1 - v2) +func mathIntDiv_du(v1, v2 *evalDecimal) (eval, error) { + if v2.dec.IsZero() { + return nil, nil + } + result, err := mathIntDiv_du0(v1, v2) + return newEvalUint64(result), err +} + +func mathIntDiv_du0(v1, v2 *evalDecimal) (uint64, error) { + div, _ := v1.dec.QuoRem(v2.dec, 0) + result, ok := div.Uint64() + if !ok { + return 0, dataOutOfRangeErrorDecimal(v1.dec, v2.dec, "BIGINT UNSIGNED", "DIV") + } + return result, nil +} + +func mathMod_ii(v1, v2 *evalInt64) (eval, error) { + if v2.i == 0 { + return nil, nil + } + return newEvalInt64(v1.i % v2.i), nil +} + +func mathMod_iu(v1 *evalInt64, v2 *evalUint64) (eval, error) { + if v2.u == 0 { + return nil, nil + } + return newEvalInt64(mathMod_iu0(v1.i, v2.u)), nil +} + +func mathMod_iu0(v1 int64, v2 uint64) int64 { + if v1 == math.MinInt64 && v2 == math.MaxInt64+1 { + return 0 + } + if v2 > math.MaxInt64 { + return v1 + } + return v1 % int64(v2) +} + +func mathMod_ui(v1 *evalUint64, v2 *evalInt64) (eval, error) { + if v2.i == 0 { + return nil, nil + } + result, err := mathMod_ui0(v1.u, v2.i) + return newEvalUint64(result), err +} + +func mathMod_ui0(v1 uint64, v2 int64) (uint64, error) { + if v2 < 0 { + return v1 % uint64(-v2), nil + } + return v1 % uint64(v2), nil +} + +func mathMod_uu(v1, v2 *evalUint64) (eval, error) { + if v2.u == 0 { + return nil, nil + } + return newEvalUint64(v1.u % v2.u), nil +} + +func mathMod_ff(v1, v2 *evalFloat) (eval, error) { + if v2.f == 0.0 { + return nil, nil + } + return newEvalFloat(math.Mod(v1.f, v2.f)), nil +} + +func mathMod_dd(v1, v2 *evalDecimal) (eval, error) { + if v2.dec.IsZero() { + return nil, nil + } + + dec, prec := mathMod_dd0(v1, v2) + return newEvalDecimalWithPrec(dec, prec), nil +} + +func mathMod_dd0(v1, v2 *evalDecimal) (decimal.Decimal, int32) { + length := v1.length + if v2.length > length { + length = v2.length + } + _, rem := v1.dec.QuoRem(v2.dec, 0) + return rem, length } func parseStringToFloat(str string) float64 { diff --git a/go/vt/vtgate/evalengine/cached_size.go b/go/vt/vtgate/evalengine/cached_size.go index 1e0740cbb50..c0c195d4d2e 100644 --- a/go/vt/vtgate/evalengine/cached_size.go +++ b/go/vt/vtgate/evalengine/cached_size.go @@ -17,13 +17,7 @@ limitations under the License. package evalengine -import ( - "math" - "reflect" - "unsafe" - - hack "vitess.io/vitess/go/hack" -) +import hack "vitess.io/vitess/go/hack" type cachedObject interface { CachedSize(alloc bool) int64 @@ -163,7 +157,7 @@ func (cached *Column) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } return size } @@ -183,6 +177,24 @@ func (cached *ComparisonExpr) CachedSize(alloc bool) int64 { } return size } +func (cached *CompiledExpr) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(64) + } + // field code []vitess.io/vitess/go/vt/vtgate/evalengine.frame + { + size += hack.RuntimeAllocSize(int64(cap(cached.code)) * int64(8)) + } + // field original vitess.io/vitess/go/vt/vtgate/evalengine.Expr + if cc, ok := cached.original.(cachedObject); ok { + size += cc.CachedSize(true) + } + return size +} func (cached *ConvertExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -209,8 +221,6 @@ func (cached *ConvertUsingExpr) CachedSize(alloc bool) int64 { size += cached.UnaryExpr.CachedSize(false) return size } - -//go:nocheckptr func (cached *InExpr) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -221,17 +231,6 @@ func (cached *InExpr) CachedSize(alloc bool) int64 { } // field BinaryExpr vitess.io/vitess/go/vt/vtgate/evalengine.BinaryExpr size += cached.BinaryExpr.CachedSize(false) - // field Hashed map[[16]byte]int - if cached.Hashed != nil { - size += int64(48) - hmap := reflect.ValueOf(cached.Hashed) - numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9))))))) - numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10)))) - size += hack.RuntimeAllocSize(int64(numOldBuckets * 208)) - if len(cached.Hashed) > 0 || numBuckets > 1 { - size += hack.RuntimeAllocSize(int64(numBuckets * 208)) - } - } return size } func (cached *IsExpr) CachedSize(alloc bool) int64 { @@ -358,6 +357,66 @@ func (cached *builtinASCII) CachedSize(alloc bool) int64 { size += cached.CallExpr.CachedSize(false) return size } +func (cached *builtinAbs) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinAcos) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinAsin) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinAtan) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinAtan2) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} func (cached *builtinBitCount) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -442,6 +501,54 @@ func (cached *builtinCollation) CachedSize(alloc bool) int64 { size += cached.CallExpr.CachedSize(false) return size } +func (cached *builtinCos) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinCot) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinDegrees) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinFloor) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} func (cached *builtinFromBase64) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -586,6 +693,30 @@ func (cached *builtinMultiComparison) CachedSize(alloc bool) int64 { size += cached.CallExpr.CachedSize(false) return size } +func (cached *builtinPi) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinRadians) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} func (cached *builtinRepeat) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -598,6 +729,30 @@ func (cached *builtinRepeat) CachedSize(alloc bool) int64 { size += cached.CallExpr.CachedSize(false) return size } +func (cached *builtinSin) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} +func (cached *builtinTan) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(48) + } + // field CallExpr vitess.io/vitess/go/vt/vtgate/evalengine.CallExpr + size += cached.CallExpr.CachedSize(false) + return size +} func (cached *builtinToBase64) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) diff --git a/go/vt/vtgate/evalengine/compare.go b/go/vt/vtgate/evalengine/compare.go index 4f638727413..f8c357590ac 100644 --- a/go/vt/vtgate/evalengine/compare.go +++ b/go/vt/vtgate/evalengine/compare.go @@ -17,6 +17,7 @@ limitations under the License. package evalengine import ( + "bytes" "time" "vitess.io/vitess/go/sqltypes" @@ -24,6 +25,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json" ) func compareNumeric(left, right eval) (int, error) { @@ -200,3 +202,117 @@ func compareStrings(l, r eval) (int, error) { } return collation.Collate(l.(*evalBytes).bytes, r.(*evalBytes).bytes, false), nil } + +func compareJSON(l, r eval) (int, error) { + lj, err := argToJSON(l) + if err != nil { + return 0, err + } + + rj, err := argToJSON(r) + if err != nil { + return 0, err + } + + return compareJSONValue(lj, rj) +} + +// compareJSONValue compares two JSON values. +// See https://dev.mysql.com/doc/refman/8.0/en/json.html#json-comparison for all the rules. +func compareJSONValue(lj, rj *json.Value) (int, error) { + cmp := int(lj.Type()) - int(rj.Type()) + if cmp != 0 { + return cmp, nil + } + + switch lj.Type() { + case json.TypeNull: + return 0, nil + case json.TypeNumber: + ld, ok := lj.Decimal() + if !ok { + return 0, vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "DECIMAL value is out of range") + } + rd, ok := rj.Decimal() + if !ok { + return 0, vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "DECIMAL value is out of range") + } + return ld.Cmp(rd), nil + case json.TypeString: + return collationJSON.Collation.Get().Collate(lj.ToRawBytes(), rj.ToRawBytes(), false), nil + case json.TypeBlob, json.TypeBit, json.TypeOpaque: + return bytes.Compare(lj.ToUnencodedBytes(), rj.ToUnencodedBytes()), nil + case json.TypeBoolean: + if lj == rj { + return 0, nil + } + if lj == json.ValueFalse { + return -1, nil + } + return 1, nil + case json.TypeDate: + ld, _ := lj.Date() + rd, _ := rj.Date() + return ld.Compare(rd), nil + case json.TypeDateTime: + ld, _ := lj.DateTime() + rd, _ := rj.DateTime() + return ld.Compare(rd), nil + case json.TypeTime: + ld, _ := lj.Time() + rd, _ := rj.Time() + return ld.Compare(rd), nil + case json.TypeArray: + la, _ := lj.Array() + ra, _ := rj.Array() + until := len(la) + if len(la) > len(ra) { + until = len(ra) + } + for i := 0; i < until; i++ { + cmp, err := compareJSONValue(la[i], ra[i]) + if err != nil { + return 0, err + } + if cmp != 0 { + return cmp, nil + } + } + return len(la) - len(ra), nil + case json.TypeObject: + // These rules are not documented but this is the so far + // best effort reverse engineered implementation based on + // what MySQL returns in our tests. + lo, _ := lj.Object() + ro, _ := rj.Object() + + if lo.Len() != ro.Len() { + return lo.Len() - ro.Len(), nil + } + + rks := ro.Keys() + lks := lo.Keys() + + for i := 0; i < len(lks); i++ { + if lks[i] < rks[i] { + return -1, nil + } + if lks[i] > rks[i] { + return 1, nil + } + } + + for i := 0; i < len(lks); i++ { + cmp, err := compareJSONValue(lo.Get(lks[i]), ro.Get(rks[i])) + if err != nil { + return 0, err + } + if cmp != 0 { + return cmp, nil + } + } + return 0, nil + } + + return cmp, nil +} diff --git a/go/vt/vtgate/evalengine/compiler.go b/go/vt/vtgate/evalengine/compiler.go new file mode 100644 index 00000000000..38d05cea06f --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler.go @@ -0,0 +1,340 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" +) + +type frame func(env *ExpressionEnv) int + +type compiler struct { + cfg *Config + asm assembler +} + +type CompilerLog interface { + Instruction(ins string, args ...any) + Stack(old, new int) +} + +type compiledCoercion struct { + col collations.Collation + left collations.Coercion + right collations.Coercion +} + +type ctype struct { + Type sqltypes.Type + Flag typeFlag + Col collations.TypedCollation +} + +func (ct ctype) nullable() bool { + return ct.Flag&flagNullable != 0 +} + +func (ct ctype) isTextual() bool { + return sqltypes.IsText(ct.Type) || sqltypes.IsBinary(ct.Type) +} + +func (ct ctype) isHexOrBitLiteral() bool { + return ct.Flag&flagBit != 0 || ct.Flag&flagHex != 0 +} + +func (c *compiler) unsupported(expr Expr) error { + return vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "unsupported compilation for expression '%s'", FormatExpr(expr)) +} + +func (c *compiler) compileExpr(expr Expr) (ctype, error) { + switch expr := expr.(type) { + case *Literal: + if expr.inner == nil { + c.asm.PushNull() + } else if err := c.asm.PushLiteral(expr.inner); err != nil { + return ctype{}, err + } + + t, f := expr.typeof(nil, nil) + return ctype{t, f, evalCollation(expr.inner)}, nil + + case *BindVariable: + return c.compileBindVar(expr) + + case *Column: + return c.compileColumn(expr) + + case *ArithmeticExpr: + return c.compileArithmetic(expr) + + case *BitwiseExpr: + return c.compileBitwise(expr) + + case *BitwiseNotExpr: + return c.compileBitwiseNot(expr) + + case *NegateExpr: + return c.compileNegate(expr) + + case *ComparisonExpr: + return c.compileComparison(expr) + + case *CollateExpr: + return c.compileCollate(expr) + + case *ConvertExpr: + return c.compileConvert(expr) + + case *ConvertUsingExpr: + return c.compileConvertUsing(expr) + + case *CaseExpr: + return c.compileCase(expr) + + case *LikeExpr: + return c.compileLike(expr) + + case *IsExpr: + return c.compileIs(expr) + + case *InExpr: + return c.compileIn(expr) + + case *NotExpr: + return c.compileNot(expr) + + case *LogicalExpr: + return c.compileLogical(expr) + + case callable: + return c.compileFn(expr) + + case TupleExpr: + return c.compileTuple(expr) + + default: + return ctype{}, c.unsupported(expr) + } +} + +func (c *compiler) compileBindVar(bvar *BindVariable) (ctype, error) { + if !bvar.typed { + return ctype{}, c.unsupported(bvar) + } + + switch tt := bvar.Type; { + case sqltypes.IsSigned(tt): + c.asm.PushBVar_i(bvar.Key) + case sqltypes.IsUnsigned(tt): + c.asm.PushBVar_u(bvar.Key) + case sqltypes.IsFloat(tt): + c.asm.PushBVar_f(bvar.Key) + case sqltypes.IsDecimal(tt): + c.asm.PushBVar_d(bvar.Key) + case sqltypes.IsText(tt): + if tt == sqltypes.HexNum { + c.asm.PushBVar_hexnum(bvar.Key) + } else if tt == sqltypes.HexVal { + c.asm.PushBVar_hexval(bvar.Key) + } else { + c.asm.PushBVar_text(bvar.Key, bvar.Collation) + } + case sqltypes.IsBinary(tt): + c.asm.PushBVar_bin(bvar.Key) + case sqltypes.IsNull(tt): + c.asm.PushNull() + case tt == sqltypes.TypeJSON: + c.asm.PushBVar_json(bvar.Key) + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "Type is not supported: %s", tt) + } + + return ctype{ + Type: bvar.Type, + Col: bvar.Collation, + }, nil +} + +func (c *compiler) compileColumn(column *Column) (ctype, error) { + if !column.typed { + return ctype{}, c.unsupported(column) + } + + col := column.Collation + if col.Collation != collations.CollationBinaryID { + col.Repertoire = collations.RepertoireUnicode + } + + switch tt := column.Type; { + case sqltypes.IsSigned(tt): + c.asm.PushColumn_i(column.Offset) + case sqltypes.IsUnsigned(tt): + c.asm.PushColumn_u(column.Offset) + case sqltypes.IsFloat(tt): + c.asm.PushColumn_f(column.Offset) + case sqltypes.IsDecimal(tt): + c.asm.PushColumn_d(column.Offset) + case sqltypes.IsText(tt): + if tt == sqltypes.HexNum { + c.asm.PushColumn_hexnum(column.Offset) + } else if tt == sqltypes.HexVal { + c.asm.PushColumn_hexval(column.Offset) + } else { + c.asm.PushColumn_text(column.Offset, col) + } + case sqltypes.IsBinary(tt): + c.asm.PushColumn_bin(column.Offset) + case sqltypes.IsNull(tt): + c.asm.PushNull() + case tt == sqltypes.TypeJSON: + c.asm.PushColumn_json(column.Offset) + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "Type is not supported: %s", tt) + } + + return ctype{ + Type: column.Type, + Flag: flagNullable, + Col: col, + }, nil +} + +func (c *compiler) compileTuple(tuple TupleExpr) (ctype, error) { + for _, arg := range tuple { + _, err := c.compileExpr(arg) + if err != nil { + return ctype{}, err + } + } + c.asm.PackTuple(len(tuple)) + return ctype{Type: sqltypes.Tuple, Col: collationBinary}, nil +} + +func (c *compiler) compileToNumeric(ct ctype, offset int) ctype { + if sqltypes.IsNumber(ct.Type) { + return ct + } + if ct.Type == sqltypes.VarBinary && (ct.Flag&flagHex) != 0 { + c.asm.Convert_hex(offset) + return ctype{sqltypes.Uint64, ct.Flag, collationNumeric} + } + c.asm.Convert_xf(offset) + return ctype{sqltypes.Float64, ct.Flag, collationNumeric} +} + +func (c *compiler) compileToInt64(ct ctype, offset int) ctype { + switch ct.Type { + case sqltypes.Int64: + return ct + case sqltypes.Uint64: + c.asm.Convert_ui(offset) + // TODO: specialization + default: + c.asm.Convert_xi(offset) + } + return ctype{sqltypes.Int64, ct.Flag, collationNumeric} +} + +func (c *compiler) compileToUint64(ct ctype, offset int) ctype { + switch ct.Type { + case sqltypes.Uint64: + return ct + case sqltypes.Int64: + c.asm.Convert_iu(offset) + // TODO: specialization + default: + c.asm.Convert_xu(offset) + } + return ctype{sqltypes.Uint64, ct.Flag, collationNumeric} +} + +func (c *compiler) compileToBitwiseUint64(ct ctype, offset int) ctype { + switch ct.Type { + case sqltypes.Uint64: + return ct + case sqltypes.Int64: + c.asm.Convert_iu(offset) + case sqltypes.Decimal: + c.asm.Convert_dbit(offset) + // TODO: specialization + default: + c.asm.Convert_xu(offset) + } + return ctype{sqltypes.Uint64, ct.Flag, collationNumeric} +} + +func (c *compiler) compileToFloat(ct ctype, offset int) ctype { + if sqltypes.IsFloat(ct.Type) { + return ct + } + switch ct.Type { + case sqltypes.Int64: + c.asm.Convert_if(offset) + case sqltypes.Uint64: + // only emit u->f conversion if this is not a hex value; hex values + // will already be converted + c.asm.Convert_uf(offset) + default: + c.asm.Convert_xf(offset) + } + return ctype{sqltypes.Float64, ct.Flag, collationNumeric} +} + +func (c *compiler) compileToDecimal(ct ctype, offset int) ctype { + if sqltypes.IsDecimal(ct.Type) { + return ct + } + switch ct.Type { + case sqltypes.Int64: + c.asm.Convert_id(offset) + case sqltypes.Uint64: + c.asm.Convert_ud(offset) + default: + c.asm.Convert_xd(offset, 0, 0) + } + return ctype{sqltypes.Decimal, ct.Flag, collationNumeric} +} + +func (c *compiler) compileNullCheck1(ct ctype) *jump { + if ct.nullable() { + j := c.asm.jumpFrom() + c.asm.NullCheck1(j) + return j + } + return nil +} + +func (c *compiler) compileNullCheck1r(ct ctype) *jump { + if ct.nullable() { + j := c.asm.jumpFrom() + c.asm.NullCheck1r(j) + return j + } + return nil +} + +func (c *compiler) compileNullCheck2(lt, rt ctype) *jump { + if lt.nullable() || rt.nullable() { + j := c.asm.jumpFrom() + c.asm.NullCheck2(j) + return j + } + return nil +} diff --git a/go/vt/vtgate/evalengine/compiler_arithmetic.go b/go/vt/vtgate/evalengine/compiler_arithmetic.go new file mode 100644 index 00000000000..0a74216407a --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_arithmetic.go @@ -0,0 +1,466 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" +) + +func (c *compiler) compileNegate(expr *NegateExpr) (ctype, error) { + arg, err := c.compileExpr(expr.Inner) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(arg) + arg = c.compileToNumeric(arg, 1) + var neg sqltypes.Type + + switch arg.Type { + case sqltypes.Int64: + neg = sqltypes.Int64 + c.asm.Neg_i() + case sqltypes.Uint64: + if arg.Flag&flagHex != 0 { + neg = sqltypes.Float64 + c.asm.Neg_hex() + } else { + neg = sqltypes.Int64 + c.asm.Neg_u() + } + case sqltypes.Float64: + neg = sqltypes.Float64 + c.asm.Neg_f() + case sqltypes.Decimal: + neg = sqltypes.Decimal + c.asm.Neg_d() + default: + panic("unexpected Numeric type") + } + + c.asm.jumpDestination(skip) + return ctype{Type: neg, Col: collationNumeric}, nil +} + +func (c *compiler) compileArithmetic(expr *ArithmeticExpr) (ctype, error) { + switch expr.Op.(type) { + case *opArithAdd: + return c.compileArithmeticAdd(expr.Left, expr.Right) + case *opArithSub: + return c.compileArithmeticSub(expr.Left, expr.Right) + case *opArithMul: + return c.compileArithmeticMul(expr.Left, expr.Right) + case *opArithDiv: + return c.compileArithmeticDiv(expr.Left, expr.Right) + case *opArithIntDiv: + return c.compileArithmeticIntDiv(expr.Left, expr.Right) + case *opArithMod: + return c.compileArithmeticMod(expr.Left, expr.Right) + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "not implemented") + } +} + +func (c *compiler) compileNumericPriority(lt, rt ctype) (ctype, ctype, bool) { + switch lt.Type { + case sqltypes.Int64: + if rt.Type == sqltypes.Uint64 || rt.Type == sqltypes.Float64 || rt.Type == sqltypes.Decimal { + return rt, lt, true + } + case sqltypes.Uint64: + if rt.Type == sqltypes.Float64 || rt.Type == sqltypes.Decimal { + return rt, lt, true + } + case sqltypes.Decimal: + if rt.Type == sqltypes.Float64 { + return rt, lt, true + } + } + return lt, rt, false +} + +func (c *compiler) compileArithmeticAdd(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + swap := false + skip2 := c.compileNullCheck1r(rt) + + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + lt, rt, swap = c.compileNumericPriority(lt, rt) + + var sumtype sqltypes.Type + + switch lt.Type { + case sqltypes.Int64: + c.asm.Add_ii() + sumtype = sqltypes.Int64 + case sqltypes.Uint64: + switch rt.Type { + case sqltypes.Int64: + c.asm.Add_ui(swap) + case sqltypes.Uint64: + c.asm.Add_uu() + } + sumtype = sqltypes.Uint64 + case sqltypes.Decimal: + if swap { + c.compileToDecimal(rt, 2) + } else { + c.compileToDecimal(rt, 1) + } + c.asm.Add_dd() + sumtype = sqltypes.Decimal + case sqltypes.Float64: + if swap { + c.compileToFloat(rt, 2) + } else { + c.compileToFloat(rt, 1) + } + c.asm.Add_ff() + sumtype = sqltypes.Float64 + } + + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: sumtype, Col: collationNumeric}, nil +} + +func (c *compiler) compileArithmeticSub(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + skip2 := c.compileNullCheck1r(rt) + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + + var subtype sqltypes.Type + + switch lt.Type { + case sqltypes.Int64: + switch rt.Type { + case sqltypes.Int64: + c.asm.Sub_ii() + subtype = sqltypes.Int64 + case sqltypes.Uint64: + c.asm.Sub_iu() + subtype = sqltypes.Uint64 + case sqltypes.Float64: + c.compileToFloat(lt, 2) + c.asm.Sub_ff() + subtype = sqltypes.Float64 + case sqltypes.Decimal: + c.compileToDecimal(lt, 2) + c.asm.Sub_dd() + subtype = sqltypes.Decimal + } + case sqltypes.Uint64: + switch rt.Type { + case sqltypes.Int64: + c.asm.Sub_ui() + subtype = sqltypes.Uint64 + case sqltypes.Uint64: + c.asm.Sub_uu() + subtype = sqltypes.Uint64 + case sqltypes.Float64: + c.compileToFloat(lt, 2) + c.asm.Sub_ff() + subtype = sqltypes.Float64 + case sqltypes.Decimal: + c.compileToDecimal(lt, 2) + c.asm.Sub_dd() + subtype = sqltypes.Decimal + } + case sqltypes.Float64: + c.compileToFloat(rt, 1) + c.asm.Sub_ff() + subtype = sqltypes.Float64 + case sqltypes.Decimal: + switch rt.Type { + case sqltypes.Float64: + c.compileToFloat(lt, 2) + c.asm.Sub_ff() + subtype = sqltypes.Float64 + default: + c.compileToDecimal(rt, 1) + c.asm.Sub_dd() + subtype = sqltypes.Decimal + } + } + + if subtype == 0 { + panic("did not compile?") + } + + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: subtype, Col: collationNumeric}, nil +} + +func (c *compiler) compileArithmeticMul(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + swap := false + skip2 := c.compileNullCheck1r(rt) + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + lt, rt, swap = c.compileNumericPriority(lt, rt) + + var multype sqltypes.Type + + switch lt.Type { + case sqltypes.Int64: + c.asm.Mul_ii() + multype = sqltypes.Int64 + case sqltypes.Uint64: + switch rt.Type { + case sqltypes.Int64: + c.asm.Mul_ui(swap) + case sqltypes.Uint64: + c.asm.Mul_uu() + } + multype = sqltypes.Uint64 + case sqltypes.Float64: + if swap { + c.compileToFloat(rt, 2) + } else { + c.compileToFloat(rt, 1) + } + c.asm.Mul_ff() + multype = sqltypes.Float64 + case sqltypes.Decimal: + if swap { + c.compileToDecimal(rt, 2) + } else { + c.compileToDecimal(rt, 1) + } + c.asm.Mul_dd() + multype = sqltypes.Decimal + } + + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: multype, Col: collationNumeric}, nil +} + +func (c *compiler) compileArithmeticDiv(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + skip2 := c.compileNullCheck1r(rt) + + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + + ct := ctype{Col: collationNumeric, Flag: flagNullable} + if lt.Type == sqltypes.Float64 || rt.Type == sqltypes.Float64 { + ct.Type = sqltypes.Float64 + c.compileToFloat(lt, 2) + c.compileToFloat(rt, 1) + c.asm.Div_ff() + } else { + ct.Type = sqltypes.Decimal + c.compileToDecimal(lt, 2) + c.compileToDecimal(rt, 1) + c.asm.Div_dd() + } + c.asm.jumpDestination(skip1, skip2) + return ct, nil +} + +func (c *compiler) compileArithmeticIntDiv(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + skip2 := c.compileNullCheck1r(rt) + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + + ct := ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagNullable} + switch lt.Type { + case sqltypes.Int64: + switch rt.Type { + case sqltypes.Int64: + c.asm.IntDiv_ii() + case sqltypes.Uint64: + ct.Type = sqltypes.Uint64 + c.asm.IntDiv_iu() + case sqltypes.Float64: + c.asm.Convert_xd(2, 0, 0) + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_di() + case sqltypes.Decimal: + c.asm.Convert_xd(2, 0, 0) + c.asm.IntDiv_di() + } + case sqltypes.Uint64: + switch rt.Type { + case sqltypes.Int64: + c.asm.IntDiv_ui() + case sqltypes.Uint64: + ct.Type = sqltypes.Uint64 + c.asm.IntDiv_uu() + case sqltypes.Float64: + c.asm.Convert_xd(2, 0, 0) + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_du() + case sqltypes.Decimal: + c.asm.Convert_xd(2, 0, 0) + c.asm.IntDiv_du() + } + case sqltypes.Float64: + switch rt.Type { + case sqltypes.Decimal: + c.asm.Convert_xd(2, 0, 0) + c.asm.IntDiv_di() + case sqltypes.Uint64: + ct.Type = sqltypes.Uint64 + c.asm.Convert_xd(2, 0, 0) + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_du() + default: + c.asm.Convert_xd(2, 0, 0) + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_di() + } + case sqltypes.Decimal: + switch rt.Type { + case sqltypes.Decimal: + c.asm.IntDiv_di() + case sqltypes.Uint64: + ct.Type = sqltypes.Uint64 + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_du() + default: + c.asm.Convert_xd(1, 0, 0) + c.asm.IntDiv_di() + } + } + c.asm.jumpDestination(skip1, skip2) + return ct, nil +} + +func (c *compiler) compileArithmeticMod(left, right Expr) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + skip2 := c.compileNullCheck1r(rt) + lt = c.compileToNumeric(lt, 2) + rt = c.compileToNumeric(rt, 1) + + ct := ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagNullable} + switch lt.Type { + case sqltypes.Int64: + ct.Type = sqltypes.Int64 + switch rt.Type { + case sqltypes.Int64: + c.asm.Mod_ii() + case sqltypes.Uint64: + c.asm.Mod_iu() + case sqltypes.Float64: + ct.Type = sqltypes.Float64 + c.asm.Convert_xf(2) + c.asm.Mod_ff() + case sqltypes.Decimal: + ct.Type = sqltypes.Decimal + c.asm.Convert_xd(2, 0, 0) + c.asm.Mod_dd() + } + case sqltypes.Uint64: + ct.Type = sqltypes.Uint64 + switch rt.Type { + case sqltypes.Int64: + c.asm.Mod_ui() + case sqltypes.Uint64: + c.asm.Mod_uu() + case sqltypes.Float64: + ct.Type = sqltypes.Float64 + c.asm.Convert_xf(2) + c.asm.Mod_ff() + case sqltypes.Decimal: + ct.Type = sqltypes.Decimal + c.asm.Convert_xd(2, 0, 0) + c.asm.Mod_dd() + } + case sqltypes.Decimal: + ct.Type = sqltypes.Decimal + switch rt.Type { + case sqltypes.Float64: + ct.Type = sqltypes.Float64 + c.asm.Convert_xf(2) + c.asm.Mod_ff() + default: + c.asm.Convert_xd(1, 0, 0) + c.asm.Mod_dd() + } + case sqltypes.Float64: + ct.Type = sqltypes.Float64 + c.asm.Convert_xf(1) + c.asm.Mod_ff() + } + + c.asm.jumpDestination(skip1, skip2) + return ct, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_asm.go b/go/vt/vtgate/evalengine/compiler_asm.go new file mode 100644 index 00000000000..bae000eab87 --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_asm.go @@ -0,0 +1,2403 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "bytes" + "math" + "math/bits" + + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/mysql/collations/charset" + "vitess.io/vitess/go/slices2" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json" + "vitess.io/vitess/go/vt/vthash" +) + +type jump struct { + from, to int +} + +func (j *jump) offset() int { + return j.to - j.from +} + +type assembler struct { + ins []frame + log CompilerLog + stack struct { + cur int + max int + } +} + +func (asm *assembler) jumpFrom() *jump { + return &jump{from: len(asm.ins)} +} + +func (asm *assembler) jumpDestination(jumps ...*jump) { + for _, j := range jumps { + if j != nil { + j.to = len(asm.ins) + } + } +} + +func (asm *assembler) adjustStack(offset int) { + asm.stack.cur += offset + if asm.stack.cur < 0 { + panic("negative stack position") + } + if asm.stack.cur > asm.stack.max { + asm.stack.max = asm.stack.cur + } + if asm.log != nil { + asm.log.Stack(asm.stack.cur-offset, asm.stack.cur) + } +} + +func (asm *assembler) emit(f frame, instruction string, args ...any) { + if asm.log != nil { + asm.log.Instruction(instruction, args...) + } + asm.ins = append(asm.ins, f) +} + +func (asm *assembler) Add_dd() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + mathAdd_dd0(l, r) + env.vm.sp-- + return 1 + }, "ADD DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Add_ff() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + l.f += r.f + env.vm.sp-- + return 1 + }, "ADD FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) Add_ii() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.i, env.vm.err = mathAdd_ii0(l.i, r.i) + env.vm.sp-- + return 1 + }, "ADD INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Add_ui(swap bool) { + asm.adjustStack(-1) + + if swap { + asm.emit(func(env *ExpressionEnv) int { + var u uint64 + l := env.vm.stack[env.vm.sp-1].(*evalUint64) + r := env.vm.stack[env.vm.sp-2].(*evalInt64) + u, env.vm.err = mathAdd_ui0(l.u, r.i) + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalUint64(u) + env.vm.sp-- + return 1 + }, "ADD UINT64(SP-1), INT64(SP-2)") + } else { + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.u, env.vm.err = mathAdd_ui0(l.u, r.i) + env.vm.sp-- + return 1 + }, "ADD UINT64(SP-2), INT64(SP-1)") + } +} + +func (asm *assembler) Add_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u, env.vm.err = mathAdd_uu0(l.u, r.u) + env.vm.sp-- + return 1 + }, "ADD UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitCount_b() { + asm.emit(func(env *ExpressionEnv) int { + a := env.vm.stack[env.vm.sp-1].(*evalBytes) + count := 0 + for _, b := range a.bytes { + count += bits.OnesCount8(b) + } + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(count)) + return 1 + }, "BIT_COUNT BINARY(SP-1)") +} + +func (asm *assembler) BitCount_u() { + asm.emit(func(env *ExpressionEnv) int { + a := env.vm.stack[env.vm.sp-1].(*evalUint64) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(bits.OnesCount64(a.u))) + return 1 + }, "BIT_COUNT UINT64(SP-1)") +} + +func (asm *assembler) BitOp_and_bb() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + if len(l.bytes) != len(r.bytes) { + env.vm.err = errBitwiseOperandsLength + return 0 + } + for i := range l.bytes { + l.bytes[i] = l.bytes[i] & r.bytes[i] + } + env.vm.sp-- + return 1 + }, "AND BINARY(SP-2), BINARY(SP-1)") +} + +func (asm *assembler) BitOp_or_bb() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + if len(l.bytes) != len(r.bytes) { + env.vm.err = errBitwiseOperandsLength + return 0 + } + for i := range l.bytes { + l.bytes[i] = l.bytes[i] | r.bytes[i] + } + env.vm.sp-- + return 1 + }, "OR BINARY(SP-2), BINARY(SP-1)") +} + +func (asm *assembler) BitOp_xor_bb() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + if len(l.bytes) != len(r.bytes) { + env.vm.err = errBitwiseOperandsLength + return 0 + } + for i := range l.bytes { + l.bytes[i] = l.bytes[i] ^ r.bytes[i] + } + env.vm.sp-- + return 1 + }, "XOR BINARY(SP-2), BINARY(SP-1)") +} + +func (asm *assembler) BitOp_and_uu() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u = l.u & r.u + env.vm.sp-- + return 1 + }, "AND UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitOp_or_uu() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u = l.u | r.u + env.vm.sp-- + return 1 + }, "OR UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitOp_xor_uu() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u = l.u ^ r.u + env.vm.sp-- + return 1 + }, "XOR UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitShiftLeft_bu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + + var ( + bits = int(r.u & 7) + bytes = int(r.u >> 3) + length = len(l.bytes) + out = make([]byte, length) + ) + + for i := 0; i < length; i++ { + pos := i + bytes + 1 + switch { + case pos < length: + out[i] = l.bytes[pos] >> (8 - bits) + fallthrough + case pos == length: + out[i] |= l.bytes[pos-1] << bits + } + } + l.bytes = out + + env.vm.sp-- + return 1 + }, "BIT_SHL BINARY(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitShiftLeft_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u = l.u << r.u + + env.vm.sp-- + return 1 + }, "BIT_SHL UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitShiftRight_bu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + + var ( + bits = int(r.u & 7) + bytes = int(r.u >> 3) + length = len(l.bytes) + out = make([]byte, length) + ) + + for i := length - 1; i >= 0; i-- { + switch { + case i > bytes: + out[i] = l.bytes[i-bytes-1] << (8 - bits) + fallthrough + case i == bytes: + out[i] |= l.bytes[i-bytes] >> bits + } + } + l.bytes = out + + env.vm.sp-- + return 1 + }, "BIT_SHR BINARY(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitShiftRight_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u = l.u >> r.u + + env.vm.sp-- + return 1 + }, "BIT_SHR UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) BitwiseNot_b() { + asm.emit(func(env *ExpressionEnv) int { + a := env.vm.stack[env.vm.sp-1].(*evalBytes) + for i := range a.bytes { + a.bytes[i] = ^a.bytes[i] + } + return 1 + }, "BIT_NOT BINARY(SP-1)") +} + +func (asm *assembler) BitwiseNot_u() { + asm.emit(func(env *ExpressionEnv) int { + a := env.vm.stack[env.vm.sp-1].(*evalUint64) + a.u = ^a.u + return 1 + }, "BIT_NOT UINT64(SP-1)") +} + +func (asm *assembler) Cmp_eq() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp == 0) + env.vm.sp++ + return 1 + }, "CMPFLAG EQ") +} + +func (asm *assembler) Cmp_eq_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp == 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG EQ [NULL]") +} + +func (asm *assembler) Cmp_ge() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp >= 0) + env.vm.sp++ + return 1 + }, "CMPFLAG GE") +} + +func (asm *assembler) Cmp_ge_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp >= 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG GE [NULL]") +} + +func (asm *assembler) Cmp_gt() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp > 0) + env.vm.sp++ + return 1 + }, "CMPFLAG GT") +} + +func (asm *assembler) Cmp_gt_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp > 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG GT [NULL]") +} + +func (asm *assembler) Cmp_le() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp <= 0) + env.vm.sp++ + return 1 + }, "CMPFLAG LE") +} + +func (asm *assembler) Cmp_le_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp <= 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG LE [NULL]") +} + +func (asm *assembler) Cmp_lt() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp < 0) + env.vm.sp++ + return 1 + }, "CMPFLAG LT") +} + +func (asm *assembler) Cmp_lt_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp < 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG LT [NULL]") +} +func (asm *assembler) Cmp_ne() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp != 0) + env.vm.sp++ + return 1 + }, "CMPFLAG NE") +} + +func (asm *assembler) Cmp_ne_n() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + if env.vm.flags.null { + env.vm.stack[env.vm.sp] = nil + } else { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalBool(env.vm.flags.cmp != 0) + } + env.vm.sp++ + return 1 + }, "CMPFLAG NE [NULL]") +} + +func (asm *assembler) CmpCase(cases int, hasElse bool, tt sqltypes.Type, cc collations.TypedCollation) { + elseOffset := 0 + if hasElse { + elseOffset = 1 + } + + stackDepth := 2*cases + elseOffset + asm.adjustStack(-(stackDepth - 1)) + + asm.emit(func(env *ExpressionEnv) int { + end := env.vm.sp - elseOffset + for sp := env.vm.sp - stackDepth; sp < end; sp += 2 { + if env.vm.stack[sp].(*evalInt64).i != 0 { + env.vm.stack[env.vm.sp-stackDepth], env.vm.err = evalCoerce(env.vm.stack[sp+1], tt, cc.Collation) + goto done + } + } + if elseOffset != 0 { + env.vm.stack[env.vm.sp-stackDepth], env.vm.err = evalCoerce(env.vm.stack[env.vm.sp-1], tt, cc.Collation) + } else { + env.vm.stack[env.vm.sp-stackDepth] = nil + } + done: + env.vm.sp -= stackDepth - 1 + return 1 + }, "CASE [%d cases, else = %v]", cases, hasElse) +} + +func (asm *assembler) CmpNum_dd() { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + env.vm.sp -= 2 + env.vm.flags.cmp = l.dec.Cmp(r.dec) + return 1 + }, "CMP DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) CmpNum_fd(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalFloat) + r := env.vm.stack[env.vm.sp-right].(*evalDecimal) + env.vm.sp -= 2 + fval, ok := r.dec.Float64() + if !ok { + env.vm.err = errDecimalOutOfRange + } + env.vm.flags.cmp = cmpnum(l.f, fval) + return 1 + }, "CMP FLOAT64(SP-%d), DECIMAL(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_ff() { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + env.vm.sp -= 2 + env.vm.flags.cmp = cmpnum(l.f, r.f) + return 1 + }, "CMP FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) CmpNum_id(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalInt64) + r := env.vm.stack[env.vm.sp-right].(*evalDecimal) + env.vm.sp -= 2 + env.vm.flags.cmp = decimal.NewFromInt(l.i).Cmp(r.dec) + return 1 + }, "CMP INT64(SP-%d), DECIMAL(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_if(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalInt64) + r := env.vm.stack[env.vm.sp-right].(*evalFloat) + env.vm.sp -= 2 + env.vm.flags.cmp = cmpnum(float64(l.i), r.f) + return 1 + }, "CMP INT64(SP-%d), FLOAT64(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_ii() { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + env.vm.sp -= 2 + env.vm.flags.cmp = cmpnum(l.i, r.i) + return 1 + }, "CMP INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) CmpNum_iu(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalInt64) + r := env.vm.stack[env.vm.sp-right].(*evalUint64) + env.vm.sp -= 2 + if l.i < 0 { + env.vm.flags.cmp = -1 + } else { + env.vm.flags.cmp = cmpnum(uint64(l.i), r.u) + } + return 1 + }, "CMP INT64(SP-%d), UINT64(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_ud(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalUint64) + r := env.vm.stack[env.vm.sp-right].(*evalDecimal) + env.vm.sp -= 2 + env.vm.flags.cmp = decimal.NewFromUint(l.u).Cmp(r.dec) + return 1 + }, "CMP UINT64(SP-%d), DECIMAL(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_uf(left, right int) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-left].(*evalUint64) + r := env.vm.stack[env.vm.sp-right].(*evalFloat) + env.vm.sp -= 2 + env.vm.flags.cmp = cmpnum(float64(l.u), r.f) + return 1 + }, "CMP UINT64(SP-%d), FLOAT64(SP-%d)", left, right) +} + +func (asm *assembler) CmpNum_uu() { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + env.vm.sp -= 2 + env.vm.flags.cmp = cmpnum(l.u, r.u) + return 1 + }, "CMP UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) CmpString_coerce(coercion *compiledCoercion) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.sp -= 2 + + var bl, br []byte + bl, env.vm.err = coercion.left(nil, l.bytes) + if env.vm.err != nil { + return 0 + } + br, env.vm.err = coercion.right(nil, r.bytes) + if env.vm.err != nil { + return 0 + } + env.vm.flags.cmp = coercion.col.Collate(bl, br, false) + return 1 + }, "CMP VARCHAR(SP-2), VARCHAR(SP-1) COERCE AND COLLATE '%s'", coercion.col.Name()) +} + +func (asm *assembler) CmpString_collate(collation collations.Collation) { + asm.adjustStack(-2) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.sp -= 2 + env.vm.flags.cmp = collation.Collate(l.bytes, r.bytes, false) + return 1 + }, "CMP VARCHAR(SP-2), VARCHAR(SP-1) COLLATE '%s'", collation.Name()) +} + +func (asm *assembler) CmpJSON() { + asm.adjustStack(-2) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalJSON) + r := env.vm.stack[env.vm.sp-1].(*evalJSON) + env.vm.sp -= 2 + env.vm.flags.cmp, env.vm.err = compareJSONValue(l, r) + return 1 + }, "CMP JSON(SP-2), JSON(SP-1)") +} + +func (asm *assembler) CmpTuple(fullEquality bool) { + asm.adjustStack(-2) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalTuple) + r := env.vm.stack[env.vm.sp-1].(*evalTuple) + env.vm.sp -= 2 + env.vm.flags.cmp, env.vm.flags.null, env.vm.err = evalCompareMany(l.t, r.t, fullEquality) + return 1 + }, "CMP TUPLE(SP-2), TUPLE(SP-1)") +} + +func (asm *assembler) CmpTupleNullsafe() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalTuple) + r := env.vm.stack[env.vm.sp-1].(*evalTuple) + + var equals bool + equals, env.vm.err = evalCompareTuplesNullSafe(l.t, r.t) + + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalBool(equals) + env.vm.sp -= 1 + return 1 + }, "CMP NULLSAFE TUPLE(SP-2), TUPLE(SP-1)") +} + +func (asm *assembler) Collate(col collations.ID) { + asm.emit(func(env *ExpressionEnv) int { + a := env.vm.stack[env.vm.sp-1].(*evalBytes) + a.tt = int16(sqltypes.VarChar) + a.col.Collation = col + return 1 + }, "COLLATE VARCHAR(SP-1), %d", col) +} + +func (asm *assembler) Convert_bB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset] + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(arg != nil && parseStringToFloat(arg.(*evalBytes).string()) != 0.0) + return 1 + }, "CONV VARBINARY(SP-%d), BOOL", offset) +} + +func (asm *assembler) Convert_jB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + b := false + arg := env.vm.stack[env.vm.sp-offset].(*evalJSON) + switch arg.Type() { + case json.TypeNumber: + switch arg.NumberType() { + case json.NumberTypeInteger: + if i, ok := arg.Int64(); ok { + b = i != 0 + } else { + d, _ := arg.Decimal() + b = !d.IsZero() + } + case json.NumberTypeDouble: + d, _ := arg.Float64() + b = d != 0.0 + } + default: + b = true + } + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(b) + return 1 + }, "CONV JSON(SP-%d), BOOL", offset) +} + +func (asm *assembler) Convert_bj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset] = evalConvert_bj(arg) + return 1 + }, "CONV VARBINARY(SP-%d), JSON", offset) +} + +func (asm *assembler) ConvertArg_cj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset], env.vm.err = evalConvertArg_cj(arg) + return 1 + }, "CONVA VARCHAR(SP-%d), JSON", offset) +} + +func (asm *assembler) Convert_cj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset], env.vm.err = evalConvert_cj(arg) + return 1 + }, "CONV VARCHAR(SP-%d), JSON", offset) +} + +func (asm *assembler) Convert_dj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset] = evalConvert_dj(arg) + return 1 + }, "CONV DATE(SP-%d), JSON", offset) +} + +func (asm *assembler) Convert_dtj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset] = evalConvert_dtj(arg) + return 1 + }, "CONV DATETIME(SP-%d), JSON", offset) +} + +func (asm *assembler) Convert_tj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset] = evalConvert_tj(arg) + return 1 + }, "CONV TIME(SP-%d), JSON", offset) +} + +func (asm *assembler) Convert_dB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset] + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(arg != nil && !arg.(*evalDecimal).dec.IsZero()) + return 1 + }, "CONV DECIMAL(SP-%d), BOOL", offset) +} + +// Convert_dbit is a special instruction emission for converting +// a bigdecimal in preparation for a bitwise operation. In that case +// we need to convert the bigdecimal to an int64 and then cast to +// uint64 to ensure we match the behavior of MySQL. +func (asm *assembler) Convert_dbit(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := evalToNumeric(env.vm.stack[env.vm.sp-offset]) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalUint64(uint64(arg.toInt64().i)) + return 1 + }, "CONV DECIMAL_BITWISE(SP-%d), UINT64", offset) +} + +func (asm *assembler) Convert_fB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset] + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(arg != nil && arg.(*evalFloat).f != 0.0) + return 1 + }, "CONV FLOAT64(SP-%d), BOOL", offset) +} + +func (asm *assembler) Convert_fj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalFloat) + env.vm.stack[env.vm.sp-offset] = evalConvert_fj(arg) + return 1 + }, "CONV FLOAT64(SP-%d), JSON") +} + +func (asm *assembler) Convert_hex(offset int) { + asm.emit(func(env *ExpressionEnv) int { + var ok bool + env.vm.stack[env.vm.sp-offset], ok = env.vm.stack[env.vm.sp-offset].(*evalBytes).toNumericHex() + if !ok { + env.vm.err = errDeoptimize + } + return 1 + }, "CONV VARBINARY(SP-%d), HEX", offset) +} + +func (asm *assembler) Convert_iB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset] + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(arg != nil && arg.(*evalInt64).i != 0) + return 1 + }, "CONV INT64(SP-%d), BOOL", offset) +} + +func (asm *assembler) Convert_id(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalInt64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalDecimalWithPrec(decimal.NewFromInt(arg.i), 0) + return 1 + }, "CONV INT64(SP-%d), FLOAT64", offset) +} + +func (asm *assembler) Convert_if(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalInt64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalFloat(arg.toFloat0()) + return 1 + }, "CONV INT64(SP-%d), FLOAT64", offset) +} + +func (asm *assembler) Convert_iu(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalInt64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalUint64(uint64(arg.i)) + return 1 + }, "CONV INT64(SP-%d), UINT64", offset) +} + +func (asm *assembler) Convert_nj(offset int, isBool bool) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(evalNumeric) + if intArg, ok := arg.(*evalInt64); isBool && ok { + switch intArg.i { + case 0: + env.vm.stack[env.vm.sp-offset] = json.ValueFalse + case 1: + env.vm.stack[env.vm.sp-offset] = json.ValueTrue + default: + env.vm.stack[env.vm.sp-offset] = json.NewNumber(intArg.ToRawBytes()) + } + } else { + env.vm.stack[env.vm.sp-offset] = json.NewNumber(arg.ToRawBytes()) + } + return 1 + }, "CONV numeric(SP-%d), JSON") +} + +func (asm *assembler) Convert_Nj(offset int) { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset] = json.ValueNull + return 1 + }, "CONV NULL(SP-%d), JSON") +} + +func (asm *assembler) Convert_uB(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset] + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(arg != nil && arg.(*evalUint64).u != 0) + return 1 + }, "CONV UINT64(SP-%d), BOOL", offset) +} + +func (asm *assembler) Convert_ud(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalUint64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalDecimalWithPrec(decimal.NewFromUint(arg.u), 0) + return 1 + }, "CONV UINT64(SP-%d), FLOAT64)", offset) +} + +func (asm *assembler) Convert_uf(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalUint64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalFloat(arg.toFloat0()) + return 1 + }, "CONV UINT64(SP-%d), FLOAT64)", offset) +} + +func (asm *assembler) Convert_ui(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-offset].(*evalUint64) + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalInt64(int64(arg.u)) + return 1 + }, "CONV UINT64(SP-%d), INT64", offset) +} + +func (asm *assembler) Convert_xb(offset int, t sqltypes.Type, length int, hasLength bool) { + if hasLength { + asm.emit(func(env *ExpressionEnv) int { + arg := evalToBinary(env.vm.stack[env.vm.sp-offset]) + arg.truncateInPlace(length) + arg.tt = int16(t) + env.vm.stack[env.vm.sp-offset] = arg + return 1 + }, "CONV (SP-%d), VARBINARY[%d]", offset, length) + } else { + asm.emit(func(env *ExpressionEnv) int { + arg := evalToBinary(env.vm.stack[env.vm.sp-offset]) + arg.tt = int16(t) + env.vm.stack[env.vm.sp-offset] = arg + return 1 + }, "CONV (SP-%d), VARBINARY", offset) + } +} + +func (asm *assembler) Convert_xc(offset int, t sqltypes.Type, collation collations.ID, length int, hasLength bool) { + if hasLength { + asm.emit(func(env *ExpressionEnv) int { + arg, err := evalToVarchar(env.vm.stack[env.vm.sp-offset], collation, true) + if err != nil { + env.vm.stack[env.vm.sp-offset] = nil + } else { + arg.truncateInPlace(length) + arg.tt = int16(t) + env.vm.stack[env.vm.sp-offset] = arg + } + return 1 + }, "CONV (SP-%d), VARCHAR[%d]", offset, length) + } else { + asm.emit(func(env *ExpressionEnv) int { + arg, err := evalToVarchar(env.vm.stack[env.vm.sp-offset], collation, true) + if err != nil { + env.vm.stack[env.vm.sp-offset] = nil + } else { + arg.tt = int16(t) + env.vm.stack[env.vm.sp-offset] = arg + } + return 1 + }, "CONV (SP-%d), VARCHAR", offset) + } +} + +func (asm *assembler) Convert_xd(offset int, m, d int32) { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset] = evalToNumeric(env.vm.stack[env.vm.sp-offset]).toDecimal(m, d) + return 1 + }, "CONV (SP-%d), FLOAT64", offset) +} + +func (asm *assembler) Convert_xf(offset int) { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset], _ = evalToNumeric(env.vm.stack[env.vm.sp-offset]).toFloat() + return 1 + }, "CONV (SP-%d), FLOAT64", offset) +} +func (asm *assembler) Convert_xi(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := evalToNumeric(env.vm.stack[env.vm.sp-offset]) + env.vm.stack[env.vm.sp-offset] = arg.toInt64() + return 1 + }, "CONV (SP-%d), INT64", offset) +} + +func (asm *assembler) Convert_xu(offset int) { + asm.emit(func(env *ExpressionEnv) int { + arg := evalToNumeric(env.vm.stack[env.vm.sp-offset]) + env.vm.stack[env.vm.sp-offset] = arg.toUint64() + return 1 + }, "CONV (SP-%d), UINT64", offset) +} + +func (asm *assembler) Div_dd() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + if r.dec.IsZero() { + env.vm.stack[env.vm.sp-2] = nil + } else { + mathDiv_dd0(l, r, divPrecisionIncrement) + } + env.vm.sp-- + return 1 + }, "DIV DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Div_ff() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + if r.f == 0.0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.f, env.vm.err = mathDiv_ff0(l.f, r.f) + } + env.vm.sp-- + return 1 + }, "DIV FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) IntDiv_ii() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + if r.i == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.i = l.i / r.i + } + env.vm.sp-- + return 1 + }, "INTDIV INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) IntDiv_iu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + if r.u == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + r.u, env.vm.err = mathIntDiv_iu0(l.i, r.u) + env.vm.stack[env.vm.sp-2] = r + } + env.vm.sp-- + return 1 + }, "INTDIV INT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) IntDiv_ui() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + if r.i == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.u, env.vm.err = mathIntDiv_ui0(l.u, r.i) + } + env.vm.sp-- + return 1 + }, "INTDIV UINT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) IntDiv_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + if r.u == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.u = l.u / r.u + } + env.vm.sp-- + return 1 + }, "INTDIV UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) IntDiv_di() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + if r.dec.IsZero() { + env.vm.stack[env.vm.sp-2] = nil + } else { + var res int64 + res, env.vm.err = mathIntDiv_di0(l, r) + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalInt64(res) + } + env.vm.sp-- + return 1 + }, "INTDIV DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) IntDiv_du() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + if r.dec.IsZero() { + env.vm.stack[env.vm.sp-2] = nil + } else { + var res uint64 + res, env.vm.err = mathIntDiv_du0(l, r) + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalUint64(res) + } + env.vm.sp-- + return 1 + }, "UINTDIV DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Mod_ii() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + if r.i == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.i = l.i % r.i + } + env.vm.sp-- + return 1 + }, "MOD INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Mod_iu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + if r.u == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.i = mathMod_iu0(l.i, r.u) + } + env.vm.sp-- + return 1 + }, "MOD INT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) Mod_ui() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + if r.i == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.u, env.vm.err = mathMod_ui0(l.u, r.i) + } + env.vm.sp-- + return 1 + }, "MOD UINT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Mod_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + if r.u == 0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.u = l.u % r.u + } + env.vm.sp-- + return 1 + }, "MOD UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) Mod_ff() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + if r.f == 0.0 { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.f = math.Mod(l.f, r.f) + } + env.vm.sp-- + return 1 + }, "MOD FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) Mod_dd() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + if r.dec.IsZero() { + env.vm.stack[env.vm.sp-2] = nil + } else { + l.dec, l.length = mathMod_dd0(l, r) + } + env.vm.sp-- + return 1 + }, "MOD DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Fn_ASCII() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalBytes) + if len(arg.bytes) == 0 { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(0) + } else { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(arg.bytes[0])) + } + return 1 + }, "FN ASCII VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_CEIL_d() { + asm.emit(func(env *ExpressionEnv) int { + d := env.vm.stack[env.vm.sp-1].(*evalDecimal) + c := d.dec.Ceil() + i, valid := c.Int64() + if valid { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(i) + } else { + env.vm.err = errDeoptimize + } + return 1 + }, "FN CEIL DECIMAL(SP-1)") +} + +func (asm *assembler) Fn_CEIL_f() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Ceil(f.f) + return 1 + }, "FN CEIL FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_FLOOR_d() { + asm.emit(func(env *ExpressionEnv) int { + d := env.vm.stack[env.vm.sp-1].(*evalDecimal) + c := d.dec.Floor() + i, valid := c.Int64() + if valid { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(i) + } else { + env.vm.err = errDeoptimize + } + return 1 + }, "FN FLOOR DECIMAL(SP-1)") +} + +func (asm *assembler) Fn_FLOOR_f() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Floor(f.f) + return 1 + }, "FN FLOOR FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_ABS_i() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalInt64) + if f.i >= 0 { + return 1 + } + if f.i == math.MinInt64 { + env.vm.err = vterrors.NewErrorf(vtrpc.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "BIGINT value is out of range") + return 1 + } + f.i = -f.i + return 1 + }, "FN ABS INT64(SP-1)") +} + +func (asm *assembler) Fn_ABS_d() { + asm.emit(func(env *ExpressionEnv) int { + d := env.vm.stack[env.vm.sp-1].(*evalDecimal) + d.dec = d.dec.Abs() + return 1 + }, "FN ABS DECIMAL(SP-1)") +} + +func (asm *assembler) Fn_ABS_f() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + if f.f >= 0 { + return 1 + } + f.f = -f.f + return 1 + }, "FN ABS FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_PI() { + asm.adjustStack(1) + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalFloat(math.Pi) + env.vm.sp++ + return 1 + }, "FN PI") +} + +func (asm *assembler) Fn_ACOS() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + if f.f < -1 || f.f > 1 { + env.vm.stack[env.vm.sp-1] = nil + return 1 + } + f.f = math.Acos(f.f) + return 1 + }, "FN ACOS FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_ASIN() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + if f.f < -1 || f.f > 1 { + env.vm.stack[env.vm.sp-1] = nil + return 1 + } + f.f = math.Asin(f.f) + return 1 + }, "FN ASIN FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_ATAN() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Atan(f.f) + return 1 + }, "FN ATAN FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_ATAN2() { + asm.adjustStack(-1) + asm.emit(func(env *ExpressionEnv) int { + f1 := env.vm.stack[env.vm.sp-2].(*evalFloat) + f2 := env.vm.stack[env.vm.sp-1].(*evalFloat) + f1.f = math.Atan2(f1.f, f2.f) + env.vm.sp-- + return 1 + }, "FN ATAN2 FLOAT64(SP-2) FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_COS() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Cos(f.f) + return 1 + }, "FN COS FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_COT() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = 1.0 / math.Tan(f.f) + return 1 + }, "FN COT FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_SIN() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Sin(f.f) + return 1 + }, "FN SIN FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_TAN() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = math.Tan(f.f) + return 1 + }, "FN TAN FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_DEGREES() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = f.f * (180 / math.Pi) + return 1 + }, "FN DEGREES FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_RADIANS() { + asm.emit(func(env *ExpressionEnv) int { + f := env.vm.stack[env.vm.sp-1].(*evalFloat) + f.f = f.f * (math.Pi / 180) + return 1 + }, "FN RADIANS FLOAT64(SP-1)") +} + +func (asm *assembler) Fn_COLLATION(col collations.TypedCollation) { + asm.emit(func(env *ExpressionEnv) int { + v := evalCollation(env.vm.stack[env.vm.sp-1]) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalText([]byte(v.Collation.Get().Name()), col) + return 1 + }, "FN COLLATION (SP-1)") +} + +func (asm *assembler) Fn_FROM_BASE64(t sqltypes.Type) { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + + decoded, err := mysqlBase64Decode(str.bytes) + if err != nil { + env.vm.stack[env.vm.sp-1] = nil + return 1 + } + str.tt = int16(t) + str.bytes = decoded + return 1 + }, "FN FROM_BASE64 VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_HEX_c(t sqltypes.Type, col collations.TypedCollation) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalBytes) + encoded := env.vm.arena.newEvalText(hexEncodeBytes(arg.bytes), col) + encoded.tt = int16(t) + env.vm.stack[env.vm.sp-1] = encoded + return 1 + }, "FN HEX VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_HEX_d(col collations.TypedCollation) { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(evalNumeric) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalText(hexEncodeUint(uint64(arg.toInt64().i)), col) + return 1 + }, "FN HEX NUMERIC(SP-1)") +} + +func (asm *assembler) Fn_JSON_ARRAY(args int) { + asm.adjustStack(-(args - 1)) + asm.emit(func(env *ExpressionEnv) int { + ary := make([]*json.Value, 0, args) + for sp := env.vm.sp - args; sp < env.vm.sp; sp++ { + ary = append(ary, env.vm.stack[sp].(*json.Value)) + } + env.vm.stack[env.vm.sp-args] = json.NewArray(ary) + env.vm.sp -= args - 1 + return 1 + }, "FN JSON_ARRAY (SP-%d)...(SP-1)", args) +} + +func (asm *assembler) Fn_JSON_CONTAINS_PATH(match jsonMatch, paths []*json.Path) { + switch match { + case jsonMatchOne: + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalJSON) + matched := false + for _, p := range paths { + p.Match(arg, true, func(*json.Value) { matched = true }) + if matched { + break + } + } + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(matched) + return 1 + }, "FN JSON_CONTAINS_PATH, SP-1, 'one', [static]") + case jsonMatchAll: + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalJSON) + matched := true + for _, p := range paths { + matched = false + p.Match(arg, true, func(*json.Value) { matched = true }) + if !matched { + break + } + } + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(matched) + return 1 + }, "FN JSON_CONTAINS_PATH, SP-1, 'all', [static]") + } +} + +func (asm *assembler) Fn_JSON_EXTRACT0(jp []*json.Path) { + multi := len(jp) > 1 || slices2.Any(jp, func(path *json.Path) bool { return path.ContainsWildcards() }) + + if multi { + asm.emit(func(env *ExpressionEnv) int { + matches := make([]*json.Value, 0, 4) + arg := env.vm.stack[env.vm.sp-1].(*evalJSON) + for _, jp := range jp { + jp.Match(arg, true, func(value *json.Value) { + matches = append(matches, value) + }) + } + if len(matches) == 0 { + env.vm.stack[env.vm.sp-1] = nil + } else { + env.vm.stack[env.vm.sp-1] = json.NewArray(matches) + } + return 1 + }, "FN JSON_EXTRACT, SP-1, [static]") + } else { + asm.emit(func(env *ExpressionEnv) int { + var match *json.Value + arg := env.vm.stack[env.vm.sp-1].(*evalJSON) + jp[0].Match(arg, true, func(value *json.Value) { + match = value + }) + if match == nil { + env.vm.stack[env.vm.sp-1] = nil + } else { + env.vm.stack[env.vm.sp-1] = match + } + return 1 + }, "FN JSON_EXTRACT, SP-1, [static]") + } +} + +func (asm *assembler) Fn_JSON_KEYS(jp *json.Path) { + if jp == nil { + asm.emit(func(env *ExpressionEnv) int { + doc := env.vm.stack[env.vm.sp-1] + if doc == nil { + return 1 + } + j := doc.(*evalJSON) + if obj, ok := j.Object(); ok { + var keys []*json.Value + obj.Visit(func(key []byte, _ *json.Value) { + keys = append(keys, json.NewString(key)) + }) + env.vm.stack[env.vm.sp-1] = json.NewArray(keys) + } else { + env.vm.stack[env.vm.sp-1] = nil + } + return 1 + }, "FN JSON_KEYS (SP-1)") + } else { + asm.emit(func(env *ExpressionEnv) int { + doc := env.vm.stack[env.vm.sp-1] + if doc == nil { + return 1 + } + var obj *json.Object + jp.Match(doc.(*evalJSON), false, func(value *json.Value) { + obj, _ = value.Object() + }) + if obj != nil { + var keys []*json.Value + obj.Visit(func(key []byte, _ *json.Value) { + keys = append(keys, json.NewString(key)) + }) + env.vm.stack[env.vm.sp-1] = json.NewArray(keys) + } else { + env.vm.stack[env.vm.sp-1] = nil + } + return 1 + }, "FN JSON_KEYS (SP-1), %q", jp.String()) + } +} + +func (asm *assembler) Fn_JSON_OBJECT(args int) { + asm.adjustStack(-(args - 1)) + asm.emit(func(env *ExpressionEnv) int { + j := json.NewObject() + obj, _ := j.Object() + + for sp := env.vm.sp - args; sp < env.vm.sp; sp += 2 { + key := env.vm.stack[sp] + val := env.vm.stack[sp+1] + + if key == nil { + env.vm.err = errJSONKeyIsNil + return 0 + } + + obj.Set(key.(*evalBytes).string(), val.(*evalJSON), json.Set) + } + env.vm.stack[env.vm.sp-args] = j + env.vm.sp -= args - 1 + return 1 + }, "FN JSON_ARRAY (SP-%d)...(SP-1)", args) +} + +func (asm *assembler) Fn_JSON_UNQUOTE() { + asm.emit(func(env *ExpressionEnv) int { + j := env.vm.stack[env.vm.sp-1].(*evalJSON) + b := env.vm.arena.newEvalBytesEmpty() + b.tt = int16(sqltypes.Blob) + b.col = collationJSON + if jbytes, ok := j.StringBytes(); ok { + b.bytes = jbytes + } else { + b.bytes = j.MarshalTo(nil) + } + env.vm.stack[env.vm.sp-1] = b + return 1 + }, "FN JSON_UNQUOTE (SP-1)") +} + +func (asm *assembler) Fn_CHAR_LENGTH() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalBytes) + + if sqltypes.IsBinary(arg.SQLType()) { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(len(arg.bytes))) + } else { + coll := arg.col.Collation.Get() + count := charset.Length(coll.Charset(), arg.bytes) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(count)) + } + return 1 + }, "FN CHAR_LENGTH VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_LENGTH() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(len(arg.bytes))) + return 1 + }, "FN LENGTH VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_BIT_LENGTH() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(int64(len(arg.bytes) * 8)) + return 1 + }, "FN BIT_LENGTH VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_LUCASE(upcase bool) { + if upcase { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + + coll := str.col.Collation.Get() + csa, ok := coll.(collations.CaseAwareCollation) + if !ok { + env.vm.err = vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "not implemented") + } else { + str.bytes = csa.ToUpper(nil, str.bytes) + } + str.tt = int16(sqltypes.VarChar) + return 1 + }, "FN UPPER VARCHAR(SP-1)") + } else { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + + coll := str.col.Collation.Get() + csa, ok := coll.(collations.CaseAwareCollation) + if !ok { + env.vm.err = vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "not implemented") + } else { + str.bytes = csa.ToLower(nil, str.bytes) + } + str.tt = int16(sqltypes.VarChar) + return 1 + }, "FN LOWER VARCHAR(SP-1)") + } +} + +func (asm *assembler) Fn_MULTICMP_b(args int, lessThan bool) { + asm.adjustStack(-(args - 1)) + + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].ToRawBytes() + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].ToRawBytes() + if lessThan == (bytes.Compare(y, x) < 0) { + x = y + } + } + env.vm.stack[env.vm.sp-args] = env.vm.arena.newEvalBinary(x) + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP VARBINARY(SP-%d)...VARBINARY(SP-1)", args) +} + +func (asm *assembler) Fn_MULTICMP_c(args int, lessThan bool, tc collations.TypedCollation) { + col := tc.Collation.Get() + + asm.adjustStack(-(args - 1)) + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].ToRawBytes() + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].ToRawBytes() + if lessThan == (col.Collate(y, x, false) < 0) { + x = y + } + } + env.vm.stack[env.vm.sp-args] = env.vm.arena.newEvalText(x, tc) + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP FLOAT64(SP-%d)...FLOAT64(SP-1)", args) +} + +func (asm *assembler) Fn_MULTICMP_d(args int, lessThan bool) { + asm.adjustStack(-(args - 1)) + + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].(*evalDecimal) + xprec := x.length + + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].(*evalDecimal) + if lessThan == (y.dec.Cmp(x.dec) < 0) { + x = y + } + if y.length > xprec { + xprec = y.length + } + } + env.vm.stack[env.vm.sp-args] = env.vm.arena.newEvalDecimalWithPrec(x.dec, xprec) + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP DECIMAL(SP-%d)...DECIMAL(SP-1)", args) +} + +func (asm *assembler) Fn_MULTICMP_f(args int, lessThan bool) { + asm.adjustStack(-(args - 1)) + + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].(*evalFloat) + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].(*evalFloat) + if lessThan == (y.f < x.f) { + x = y + } + } + env.vm.stack[env.vm.sp-args] = x + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP FLOAT64(SP-%d)...FLOAT64(SP-1)", args) +} + +func (asm *assembler) Fn_MULTICMP_i(args int, lessThan bool) { + asm.adjustStack(-(args - 1)) + + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].(*evalInt64) + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].(*evalInt64) + if lessThan == (y.i < x.i) { + x = y + } + } + env.vm.stack[env.vm.sp-args] = x + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP INT64(SP-%d)...INT64(SP-1)", args) +} + +func (asm *assembler) Fn_MULTICMP_u(args int, lessThan bool) { + asm.adjustStack(-(args - 1)) + + asm.emit(func(env *ExpressionEnv) int { + x := env.vm.stack[env.vm.sp-args].(*evalUint64) + for sp := env.vm.sp - args + 1; sp < env.vm.sp; sp++ { + y := env.vm.stack[sp].(*evalUint64) + if lessThan == (y.u < x.u) { + x = y + } + } + env.vm.stack[env.vm.sp-args] = x + env.vm.sp -= args - 1 + return 1 + }, "FN MULTICMP UINT64(SP-%d)...UINT64(SP-1)", args) +} + +func (asm *assembler) Fn_REPEAT(i int) { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-2].(*evalBytes) + repeat := env.vm.stack[env.vm.sp-1].(*evalInt64) + + if repeat.i < 0 { + repeat.i = 0 + } + + if !checkMaxLength(int64(len(str.bytes)), repeat.i) { + env.vm.stack[env.vm.sp-2] = nil + env.vm.sp-- + return 1 + } + + str.tt = int16(sqltypes.VarChar) + str.bytes = bytes.Repeat(str.bytes, int(repeat.i)) + env.vm.sp-- + return 1 + }, "FN REPEAT VARCHAR(SP-2) INT64(SP-1)") +} + +func (asm *assembler) Fn_TO_BASE64(t sqltypes.Type, col collations.TypedCollation) { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + encoded := mysqlBase64Encode(str.bytes) + str.tt = int16(t) + str.col = col + str.bytes = encoded + return 1 + }, "FN TO_BASE64 VARCHAR(SP-1)") +} + +func (asm *assembler) Fn_WEIGHT_STRING_b(length int) { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + w := collations.Binary.WeightString(make([]byte, 0, length), str.bytes, collations.PadToMax) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBinary(w) + return 1 + }, "FN WEIGHT_STRING VARBINARY(SP-1)") +} + +func (asm *assembler) Fn_WEIGHT_STRING_c(col collations.Collation, length int) { + asm.emit(func(env *ExpressionEnv) int { + str := env.vm.stack[env.vm.sp-1].(*evalBytes) + w := col.WeightString(nil, str.bytes, length) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBinary(w) + return 1 + }, "FN WEIGHT_STRING VARCHAR(SP-1)") +} + +func (asm *assembler) In_table(not bool, table map[vthash.Hash]struct{}) { + if not { + asm.emit(func(env *ExpressionEnv) int { + lhs := env.vm.stack[env.vm.sp-1] + if lhs != nil { + env.vm.hash.Reset() + lhs.(hashable).Hash(&env.vm.hash) + _, in := table[env.vm.hash.Sum128()] + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(!in) + } + return 1 + }, "NOT IN (SP-1), [static table]") + } else { + asm.emit(func(env *ExpressionEnv) int { + lhs := env.vm.stack[env.vm.sp-1] + if lhs != nil { + env.vm.hash.Reset() + lhs.(hashable).Hash(&env.vm.hash) + _, in := table[env.vm.hash.Sum128()] + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(in) + } + return 1 + }, "IN (SP-1), [static table]") + } +} + +func (asm *assembler) In_slow(not bool) { + asm.adjustStack(-1) + + if not { + asm.emit(func(env *ExpressionEnv) int { + lhs := env.vm.stack[env.vm.sp-2] + rhs := env.vm.stack[env.vm.sp-1].(*evalTuple) + + var in boolean + in, env.vm.err = evalInExpr(lhs, rhs) + + env.vm.stack[env.vm.sp-2] = in.not().eval() + env.vm.sp -= 1 + return 1 + }, "NOT IN (SP-2), TUPLE(SP-1)") + } else { + asm.emit(func(env *ExpressionEnv) int { + lhs := env.vm.stack[env.vm.sp-2] + rhs := env.vm.stack[env.vm.sp-1].(*evalTuple) + + var in boolean + in, env.vm.err = evalInExpr(lhs, rhs) + + env.vm.stack[env.vm.sp-2] = in.eval() + env.vm.sp -= 1 + return 1 + }, "IN (SP-2), TUPLE(SP-1)") + } +} + +func (asm *assembler) Is(check func(eval) bool) { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(check(env.vm.stack[env.vm.sp-1])) + return 1 + }, "IS (SP-1), [static]") +} + +func (asm *assembler) Not_i() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalInt64) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(arg.i == 0) + return 1 + }, "NOT INT64(SP-1)") +} + +func (asm *assembler) Not_u() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalUint64) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(arg.u == 0) + return 1 + }, "NOT UINT64(SP-1)") +} + +func (asm *assembler) Not_f() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalFloat) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(arg.f == 0.0) + return 1 + }, "NOT FLOAT64(SP-1)") +} + +func (asm *assembler) Not_d() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalDecimal) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(arg.dec.IsZero()) + return 1 + }, "NOT DECIMAL(SP-1)") +} + +func (asm *assembler) LogicalLeft(opname string) *jump { + switch opname { + case "AND": + j := asm.jumpFrom() + asm.emit(func(env *ExpressionEnv) int { + left, ok := env.vm.stack[env.vm.sp-1].(*evalInt64) + if ok && left.i == 0 { + return j.offset() + } + return 1 + }, "AND CHECK INT64(SP-1)") + return j + case "OR": + j := asm.jumpFrom() + asm.emit(func(env *ExpressionEnv) int { + left, ok := env.vm.stack[env.vm.sp-1].(*evalInt64) + if ok && left.i != 0 { + left.i = 1 + return j.offset() + } + return 1 + }, "OR CHECK INT64(SP-1)") + return j + case "XOR": + j := asm.jumpFrom() + asm.emit(func(env *ExpressionEnv) int { + if env.vm.stack[env.vm.sp-1] == nil { + return j.offset() + } + return 1 + }, "XOR CHECK INT64(SP-1)") + return j + } + return nil +} + +func (asm *assembler) LogicalRight(opname string) { + asm.adjustStack(-1) + switch opname { + case "AND": + asm.emit(func(env *ExpressionEnv) int { + left, lok := env.vm.stack[env.vm.sp-2].(*evalInt64) + right, rok := env.vm.stack[env.vm.sp-1].(*evalInt64) + + isLeft := lok && left.i != 0 + isRight := rok && right.i != 0 + + if isLeft && isRight { + left.i = 1 + } else if rok && !isRight { + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalBool(false) + } else { + env.vm.stack[env.vm.sp-2] = nil + } + env.vm.sp-- + return 1 + }, "AND INT64(SP-2), INT64(SP-1)") + case "OR": + asm.emit(func(env *ExpressionEnv) int { + left, lok := env.vm.stack[env.vm.sp-2].(*evalInt64) + right, rok := env.vm.stack[env.vm.sp-1].(*evalInt64) + + isLeft := lok && left.i != 0 + isRight := rok && right.i != 0 + + switch { + case !lok: + if isRight { + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalBool(true) + } + case !rok: + env.vm.stack[env.vm.sp-2] = nil + default: + if isLeft || isRight { + left.i = 1 + } else { + left.i = 0 + } + } + env.vm.sp-- + return 1 + }, "OR INT64(SP-2), INT64(SP-1)") + case "XOR": + asm.emit(func(env *ExpressionEnv) int { + left := env.vm.stack[env.vm.sp-2].(*evalInt64) + right, rok := env.vm.stack[env.vm.sp-1].(*evalInt64) + + isLeft := left.i != 0 + isRight := rok && right.i != 0 + + switch { + case !rok: + env.vm.stack[env.vm.sp-2] = nil + default: + if isLeft != isRight { + left.i = 1 + } else { + left.i = 0 + } + } + env.vm.sp-- + return 1 + }, "XOR INT64(SP-2), INT64(SP-1)") + } +} + +func (asm *assembler) Like_coerce(expr *LikeExpr, coercion *compiledCoercion) { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.sp-- + + var bl, br []byte + bl, env.vm.err = coercion.left(nil, l.bytes) + if env.vm.err != nil { + return 0 + } + br, env.vm.err = coercion.right(nil, r.bytes) + if env.vm.err != nil { + return 0 + } + + match := expr.matchWildcard(bl, br, coercion.col.ID()) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(match) + return 1 + }, "LIKE VARCHAR(SP-2), VARCHAR(SP-1) COERCE AND COLLATE '%s'", coercion.col.Name()) +} + +func (asm *assembler) Like_collate(expr *LikeExpr, collation collations.Collation) { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalBytes) + r := env.vm.stack[env.vm.sp-1].(*evalBytes) + env.vm.sp-- + + match := expr.matchWildcard(l.bytes, r.bytes, collation.ID()) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalBool(match) + return 1 + }, "LIKE VARCHAR(SP-2), VARCHAR(SP-1) COLLATE '%s'", collation.Name()) +} + +func (asm *assembler) Mul_dd() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + mathMul_dd0(l, r) + env.vm.sp-- + return 1 + }, "MUL DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Mul_ff() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + l.f *= r.f + env.vm.sp-- + return 1 + }, "MUL FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) Mul_ii() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.i, env.vm.err = mathMul_ii0(l.i, r.i) + env.vm.sp-- + return 1 + }, "MUL INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Mul_ui(swap bool) { + asm.adjustStack(-1) + + if swap { + asm.emit(func(env *ExpressionEnv) int { + var u uint64 + l := env.vm.stack[env.vm.sp-1].(*evalUint64) + r := env.vm.stack[env.vm.sp-2].(*evalInt64) + u, env.vm.err = mathMul_ui0(l.u, r.i) + env.vm.stack[env.vm.sp-2] = env.vm.arena.newEvalUint64(u) + env.vm.sp-- + return 1 + }, "MUL UINT64(SP-1), INT64(SP-2)") + } else { + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.u, env.vm.err = mathMul_ui0(l.u, r.i) + env.vm.sp-- + return 1 + }, "MUL UINT64(SP-2), INT64(SP-1)") + } +} + +func (asm *assembler) Mul_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u, env.vm.err = mathMul_uu0(l.u, r.u) + env.vm.sp-- + return 1 + }, "MUL UINT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) Neg_d() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalDecimal) + arg.dec = arg.dec.Neg() + return 1 + }, "NEG DECIMAL(SP-1)") +} + +func (asm *assembler) Neg_f() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalFloat) + arg.f = -arg.f + return 1 + }, "NEG FLOAT64(SP-1)") +} + +func (asm *assembler) Neg_hex() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalUint64) + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalFloat(-float64(arg.u)) + return 1 + }, "NEG HEX(SP-1)") +} + +func (asm *assembler) Neg_i() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalInt64) + if arg.i == math.MinInt64 { + env.vm.err = errDeoptimize + } else { + arg.i = -arg.i + } + return 1 + }, "NEG INT64(SP-1)") +} + +func (asm *assembler) Neg_u() { + asm.emit(func(env *ExpressionEnv) int { + arg := env.vm.stack[env.vm.sp-1].(*evalUint64) + if arg.u > math.MaxInt64+1 { + env.vm.err = errDeoptimize + } else { + env.vm.stack[env.vm.sp-1] = env.vm.arena.newEvalInt64(-int64(arg.u)) + } + return 1 + }, "NEG UINT64(SP-1)") +} + +func (asm *assembler) NullCheck1(j *jump) { + asm.emit(func(env *ExpressionEnv) int { + if env.vm.stack[env.vm.sp-1] == nil { + return j.offset() + } + return 1 + }, "NULLCHECK SP-1") +} + +func (asm *assembler) NullCheck1r(j *jump) { + asm.emit(func(env *ExpressionEnv) int { + if env.vm.stack[env.vm.sp-1] == nil { + env.vm.stack[env.vm.sp-2] = nil + env.vm.sp-- + return j.offset() + } + return 1 + }, "NULLCHECK SP-1 [rhs]") +} + +func (asm *assembler) NullCheck2(j *jump) { + asm.emit(func(env *ExpressionEnv) int { + if env.vm.stack[env.vm.sp-2] == nil || env.vm.stack[env.vm.sp-1] == nil { + env.vm.stack[env.vm.sp-2] = nil + env.vm.sp-- + return j.offset() + } + return 1 + }, "NULLCHECK SP-1, SP-2") +} + +func (asm *assembler) Cmp_nullsafe(j *jump) { + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2] + r := env.vm.stack[env.vm.sp-1] + if l == nil || r == nil { + if l == r { + env.vm.flags.cmp = 0 + } else { + env.vm.flags.cmp = 1 + } + env.vm.sp -= 2 + return j.offset() + } + return 1 + }, "NULLCMP SP-1, SP-2") +} + +func (asm *assembler) PackTuple(tlen int) { + asm.adjustStack(-(tlen - 1)) + asm.emit(func(env *ExpressionEnv) int { + tuple := make([]eval, tlen) + copy(tuple, env.vm.stack[env.vm.sp-tlen:]) + env.vm.stack[env.vm.sp-tlen] = &evalTuple{tuple} + env.vm.sp -= tlen - 1 + return 1 + }, "TUPLE (SP-%d)...(SP-1)", tlen) +} + +func (asm *assembler) Parse_j(offset int) { + asm.emit(func(env *ExpressionEnv) int { + var p json.Parser + arg := env.vm.stack[env.vm.sp-offset].(*evalBytes) + env.vm.stack[env.vm.sp-offset], env.vm.err = p.ParseBytes(arg.bytes) + return 1 + }, "PARSE_JSON VARCHAR(SP-%d)", offset) +} + +func (asm *assembler) SetBool(offset int, b bool) { + if b { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(true) + return 1 + }, "SET (SP-%d), BOOL(true)", offset) + } else { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset] = env.vm.arena.newEvalBool(false) + return 1 + }, "SET (SP-%d), BOOL(false)", offset) + } +} + +func (asm *assembler) SetNull(offset int) { + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp-offset] = nil + return 1 + }, "SET (SP-%d), NULL", offset) +} + +func (asm *assembler) Sub_dd() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalDecimal) + r := env.vm.stack[env.vm.sp-1].(*evalDecimal) + mathSub_dd0(l, r) + env.vm.sp-- + return 1 + }, "SUB DECIMAL(SP-2), DECIMAL(SP-1)") +} + +func (asm *assembler) Sub_ff() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalFloat) + r := env.vm.stack[env.vm.sp-1].(*evalFloat) + l.f -= r.f + env.vm.sp-- + return 1 + }, "SUB FLOAT64(SP-2), FLOAT64(SP-1)") +} + +func (asm *assembler) Sub_ii() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.i, env.vm.err = mathSub_ii0(l.i, r.i) + env.vm.sp-- + return 1 + }, "SUB INT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Sub_iu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalInt64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + r.u, env.vm.err = mathSub_iu0(l.i, r.u) + env.vm.stack[env.vm.sp-2] = r + env.vm.sp-- + return 1 + }, "SUB INT64(SP-2), UINT64(SP-1)") +} + +func (asm *assembler) Sub_ui() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalInt64) + l.u, env.vm.err = mathSub_ui0(l.u, r.i) + env.vm.sp-- + return 1 + }, "SUB UINT64(SP-2), INT64(SP-1)") +} + +func (asm *assembler) Sub_uu() { + asm.adjustStack(-1) + + asm.emit(func(env *ExpressionEnv) int { + l := env.vm.stack[env.vm.sp-2].(*evalUint64) + r := env.vm.stack[env.vm.sp-1].(*evalUint64) + l.u, env.vm.err = mathSub_uu0(l.u, r.u) + env.vm.sp-- + return 1 + }, "SUB UINT64(SP-2), UINT64(SP-1)") +} + +func cmpnum[N interface{ int64 | uint64 | float64 }](a, b N) int { + switch { + case a == b: + return 0 + case a < b: + return -1 + default: + return 1 + } +} diff --git a/go/vt/vtgate/evalengine/compiler_asm_push.go b/go/vt/vtgate/evalengine/compiler_asm_push.go new file mode 100644 index 00000000000..840ca9b4d82 --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_asm_push.go @@ -0,0 +1,319 @@ +package evalengine + +import ( + "vitess.io/vitess/go/hack" + "vitess.io/vitess/go/mysql/collations" + querypb "vitess.io/vitess/go/vt/proto/query" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json/fastparse" +) + +func push_i(env *ExpressionEnv, raw []byte) int { + var ival int64 + ival, env.vm.err = fastparse.ParseInt64(hack.String(raw)) + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalInt64(ival) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_i(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_i(env, env.Row[offset].Raw()) + }, "PUSH INT64(:%d)", offset) +} + +func (asm *assembler) PushBVar_i(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_i(env, bvar.Value) + }, "PUSH INT64(:%q)", key) +} + +func push_bin(env *ExpressionEnv, raw []byte) int { + env.vm.stack[env.vm.sp] = newEvalBinary(raw) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_bin(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_bin(env, env.Row[offset].Raw()) + }, "PUSH VARBINARY(:%d)", offset) +} + +func (asm *assembler) PushBVar_bin(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_bin(env, bvar.Value) + }, "PUSH VARBINARY(:%q)", key) +} + +func push_d(env *ExpressionEnv, raw []byte) int { + var dec decimal.Decimal + dec, env.vm.err = decimal.NewFromMySQL(raw) + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalDecimal(dec, 0, 0) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_d(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_d(env, env.Row[offset].Raw()) + }, "PUSH DECIMAL(:%d)", offset) +} + +func (asm *assembler) PushBVar_d(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_d(env, bvar.Value) + }, "PUSH DECIMAL(:%q)", key) +} + +func push_f(env *ExpressionEnv, raw []byte) int { + var fval float64 + fval, env.vm.err = fastparse.ParseFloat64(hack.String(raw)) + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalFloat(fval) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_f(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_f(env, env.Row[offset].Raw()) + }, "PUSH FLOAT64(:%d)", offset) +} + +func (asm *assembler) PushBVar_f(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_f(env, bvar.Value) + }, "PUSH FLOAT64(:%q)", key) +} + +func push_hexnum(env *ExpressionEnv, raw []byte) int { + raw, env.vm.err = parseHexNumber(raw) + env.vm.stack[env.vm.sp] = newEvalBytesHex(raw) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_hexnum(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_hexnum(env, env.Row[offset].Raw()) + }, "PUSH HEXNUM(:%d)", offset) +} + +func (asm *assembler) PushBVar_hexnum(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_hexnum(env, bvar.Value) + }, "PUSH HEXNUM(:%q)", key) +} + +func push_hexval(env *ExpressionEnv, raw []byte) int { + raw, env.vm.err = parseHexLiteral(raw[2 : len(raw)-1]) + env.vm.stack[env.vm.sp] = newEvalBytesHex(raw) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_hexval(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_hexval(env, env.Row[offset].Raw()) + }, "PUSH HEXVAL(:%d)", offset) +} + +func (asm *assembler) PushBVar_hexval(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_hexval(env, bvar.Value) + }, "PUSH HEXVAL(:%q)", key) +} + +func push_json(env *ExpressionEnv, raw []byte) int { + var parser json.Parser + env.vm.stack[env.vm.sp], env.vm.err = parser.ParseBytes(raw) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_json(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_json(env, env.Row[offset].Raw()) + }, "PUSH JSON(:%d)", offset) +} + +func (asm *assembler) PushBVar_json(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_json(env, bvar.Value) + }, "PUSH JSON(:%q)", key) +} + +func push_text(env *ExpressionEnv, raw []byte, col collations.TypedCollation) int { + env.vm.stack[env.vm.sp] = newEvalText(raw, col) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_text(offset int, col collations.TypedCollation) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_text(env, env.Row[offset].Raw(), col) + }, "PUSH VARCHAR(:%d) COLLATE %d", offset, col.Collation) +} + +func (asm *assembler) PushBVar_text(key string, col collations.TypedCollation) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_text(env, bvar.Value, col) + }, "PUSH VARCHAR(:%q)", key) +} + +func push_u(env *ExpressionEnv, raw []byte) int { + var uval uint64 + uval, env.vm.err = fastparse.ParseUint64(hack.String(raw)) + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalUint64(uval) + env.vm.sp++ + return 1 +} + +func (asm *assembler) PushColumn_u(offset int) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + return push_u(env, env.Row[offset].Raw()) + }, "PUSH UINT64(:%d)", offset) +} + +func (asm *assembler) PushBVar_u(key string) { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + var bvar *querypb.BindVariable + bvar, env.vm.err = env.lookupBindVar(key) + if env.vm.err != nil { + return 0 + } + return push_u(env, bvar.Value) + }, "PUSH UINT64(:%q)", key) +} + +func (asm *assembler) PushLiteral(lit eval) error { + asm.adjustStack(1) + + switch lit := lit.(type) { + case *evalInt64: + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalInt64(lit.i) + env.vm.sp++ + return 1 + }, "PUSH INT64(%s)", lit.ToRawBytes()) + case *evalUint64: + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalUint64(lit.u) + env.vm.sp++ + return 1 + }, "PUSH UINT64(%s)", lit.ToRawBytes()) + case *evalFloat: + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalFloat(lit.f) + env.vm.sp++ + return 1 + }, "PUSH FLOAT64(%s)", lit.ToRawBytes()) + case *evalDecimal: + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = env.vm.arena.newEvalDecimalWithPrec(lit.dec, lit.length) + env.vm.sp++ + return 1 + }, "PUSH DECIMAL(%s)", lit.ToRawBytes()) + case *evalBytes: + asm.emit(func(env *ExpressionEnv) int { + b := env.vm.arena.newEvalBytesEmpty() + *b = *lit + env.vm.stack[env.vm.sp] = b + env.vm.sp++ + return 1 + }, "PUSH VARCHAR(%q)", lit.ToRawBytes()) + default: + return vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "unsupported literal kind '%T'", lit) + } + + return nil +} + +func (asm *assembler) PushNull() { + asm.adjustStack(1) + + asm.emit(func(env *ExpressionEnv) int { + env.vm.stack[env.vm.sp] = nil + env.vm.sp++ + return 1 + }, "PUSH NULL") +} diff --git a/go/vt/vtgate/evalengine/compiler_bit.go b/go/vt/vtgate/evalengine/compiler_bit.go new file mode 100644 index 00000000000..9c5ea821c1a --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_bit.go @@ -0,0 +1,146 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import "vitess.io/vitess/go/sqltypes" + +func (c *compiler) compileBitwise(expr *BitwiseExpr) (ctype, error) { + switch expr.Op.(type) { + case *opBitAnd: + return c.compileBitwiseOp(expr.Left, expr.Right, c.asm.BitOp_and_bb, c.asm.BitOp_and_uu) + case *opBitOr: + return c.compileBitwiseOp(expr.Left, expr.Right, c.asm.BitOp_or_bb, c.asm.BitOp_or_uu) + case *opBitXor: + return c.compileBitwiseOp(expr.Left, expr.Right, c.asm.BitOp_xor_bb, c.asm.BitOp_xor_uu) + case *opBitShl: + return c.compileBitwiseShift(expr.Left, expr.Right, -1) + case *opBitShr: + return c.compileBitwiseShift(expr.Left, expr.Right, 1) + default: + panic("unexpected arithmetic operator") + } +} + +func (c *compiler) compileBitwiseOp(left Expr, right Expr, asm_ins_bb, asm_ins_uu func()) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + skip2 := c.compileNullCheck1r(rt) + + if lt.Type == sqltypes.VarBinary && rt.Type == sqltypes.VarBinary { + if !lt.isHexOrBitLiteral() || !rt.isHexOrBitLiteral() { + asm_ins_bb() + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: sqltypes.VarBinary, Col: collationBinary}, nil + } + } + + lt = c.compileToBitwiseUint64(lt, 2) + rt = c.compileToBitwiseUint64(rt, 1) + + asm_ins_uu() + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: sqltypes.Uint64, Col: collationNumeric}, nil +} + +func (c *compiler) compileBitwiseShift(left Expr, right Expr, i int) (ctype, error) { + lt, err := c.compileExpr(left) + if err != nil { + return ctype{}, err + } + + skip1 := c.compileNullCheck1(lt) + + rt, err := c.compileExpr(right) + if err != nil { + return ctype{}, err + } + + skip2 := c.compileNullCheck1r(rt) + + if lt.Type == sqltypes.VarBinary && !lt.isHexOrBitLiteral() { + _ = c.compileToUint64(rt, 1) + if i < 0 { + c.asm.BitShiftLeft_bu() + } else { + c.asm.BitShiftRight_bu() + } + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: sqltypes.VarBinary, Col: collationBinary}, nil + } + + _ = c.compileToBitwiseUint64(lt, 2) + _ = c.compileToUint64(rt, 1) + + if i < 0 { + c.asm.BitShiftLeft_uu() + } else { + c.asm.BitShiftRight_uu() + } + + c.asm.jumpDestination(skip1, skip2) + return ctype{Type: sqltypes.Uint64, Col: collationNumeric}, nil +} + +func (c *compiler) compileFn_BIT_COUNT(expr *builtinBitCount) (ctype, error) { + ct, err := c.compileExpr(expr.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(ct) + + if ct.Type == sqltypes.VarBinary && !ct.isHexOrBitLiteral() { + c.asm.BitCount_b() + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Int64, Col: collationBinary}, nil + } + + _ = c.compileToBitwiseUint64(ct, 1) + c.asm.BitCount_u() + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Int64, Col: collationBinary}, nil +} + +func (c *compiler) compileBitwiseNot(expr *BitwiseNotExpr) (ctype, error) { + ct, err := c.compileExpr(expr.Inner) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(ct) + + if ct.Type == sqltypes.VarBinary && !ct.isHexOrBitLiteral() { + c.asm.BitwiseNot_b() + c.asm.jumpDestination(skip) + return ct, nil + } + + ct = c.compileToBitwiseUint64(ct, 1) + c.asm.BitwiseNot_u() + c.asm.jumpDestination(skip) + return ct, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_compare.go b/go/vt/vtgate/evalengine/compiler_compare.go new file mode 100644 index 00000000000..e9811e3bbac --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_compare.go @@ -0,0 +1,504 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vthash" +) + +func (c *compiler) compileComparisonTuple(expr *ComparisonExpr) (ctype, error) { + switch expr.Op.(type) { + case compareNullSafeEQ: + c.asm.CmpTupleNullsafe() + return ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean}, nil + case compareEQ: + c.asm.CmpTuple(true) + c.asm.Cmp_eq_n() + case compareNE: + c.asm.CmpTuple(true) + c.asm.Cmp_ne_n() + case compareLT: + c.asm.CmpTuple(false) + c.asm.Cmp_lt_n() + case compareLE: + c.asm.CmpTuple(false) + c.asm.Cmp_le_n() + case compareGT: + c.asm.CmpTuple(false) + c.asm.Cmp_gt_n() + case compareGE: + c.asm.CmpTuple(false) + c.asm.Cmp_ge_n() + default: + panic("invalid comparison operator") + } + return ctype{Type: sqltypes.Int64, Flag: flagNullable | flagIsBoolean, Col: collationNumeric}, nil +} + +func (c *compiler) compileComparison(expr *ComparisonExpr) (ctype, error) { + lt, err := c.compileExpr(expr.Left) + if err != nil { + return ctype{}, err + } + + var skip1 *jump + switch expr.Op.(type) { + case compareNullSafeEQ: + default: + skip1 = c.compileNullCheck1(lt) + } + + rt, err := c.compileExpr(expr.Right) + if err != nil { + return ctype{}, err + } + + if lt.Type == sqltypes.Tuple || rt.Type == sqltypes.Tuple { + if lt.Type != rt.Type { + return ctype{}, vterrors.Errorf(vtrpc.Code_INTERNAL, "did not typecheck tuples during comparison") + } + return c.compileComparisonTuple(expr) + } + + swapped := false + var skip2 *jump + + switch expr.Op.(type) { + case compareNullSafeEQ: + skip2 = c.asm.jumpFrom() + c.asm.Cmp_nullsafe(skip2) + default: + skip2 = c.compileNullCheck1r(rt) + } + + switch { + case compareAsStrings(lt.Type, rt.Type): + if err := c.compareAsStrings(lt, rt); err != nil { + return ctype{}, err + } + + case compareAsSameNumericType(lt.Type, rt.Type) || compareAsDecimal(lt.Type, rt.Type): + swapped = c.compareNumericTypes(lt, rt) + + case compareAsDates(lt.Type, rt.Type) || compareAsDateAndString(lt.Type, rt.Type) || compareAsDateAndNumeric(lt.Type, rt.Type): + return ctype{}, c.unsupported(expr) + + case compareAsJSON(lt.Type, rt.Type): + if err := c.compareAsJSON(lt, rt); err != nil { + return ctype{}, err + } + + default: + lt = c.compileToFloat(lt, 2) + rt = c.compileToFloat(rt, 1) + c.asm.CmpNum_ff() + } + + cmptype := ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean} + + switch expr.Op.(type) { + case compareEQ: + c.asm.Cmp_eq() + case compareNE: + c.asm.Cmp_ne() + case compareLT: + if swapped { + c.asm.Cmp_gt() + } else { + c.asm.Cmp_lt() + } + case compareLE: + if swapped { + c.asm.Cmp_ge() + } else { + c.asm.Cmp_le() + } + case compareGT: + if swapped { + c.asm.Cmp_lt() + } else { + c.asm.Cmp_gt() + } + case compareGE: + if swapped { + c.asm.Cmp_le() + } else { + c.asm.Cmp_ge() + } + case compareNullSafeEQ: + c.asm.jumpDestination(skip2) + c.asm.Cmp_eq() + return cmptype, nil + + default: + panic("unexpected comparison operator") + } + + c.asm.jumpDestination(skip1, skip2) + return cmptype, nil +} + +func (c *compiler) compareNumericTypes(lt ctype, rt ctype) (swapped bool) { + switch lt.Type { + case sqltypes.Int64: + switch rt.Type { + case sqltypes.Int64: + c.asm.CmpNum_ii() + case sqltypes.Uint64: + c.asm.CmpNum_iu(2, 1) + case sqltypes.Float64: + c.asm.CmpNum_if(2, 1) + case sqltypes.Decimal: + c.asm.CmpNum_id(2, 1) + } + case sqltypes.Uint64: + switch rt.Type { + case sqltypes.Int64: + c.asm.CmpNum_iu(1, 2) + swapped = true + case sqltypes.Uint64: + c.asm.CmpNum_uu() + case sqltypes.Float64: + c.asm.CmpNum_uf(2, 1) + case sqltypes.Decimal: + c.asm.CmpNum_ud(2, 1) + } + case sqltypes.Float64: + switch rt.Type { + case sqltypes.Int64: + c.asm.CmpNum_if(1, 2) + swapped = true + case sqltypes.Uint64: + c.asm.CmpNum_uf(1, 2) + swapped = true + case sqltypes.Float64: + c.asm.CmpNum_ff() + case sqltypes.Decimal: + c.asm.CmpNum_fd(2, 1) + } + + case sqltypes.Decimal: + switch rt.Type { + case sqltypes.Int64: + c.asm.CmpNum_id(1, 2) + swapped = true + case sqltypes.Uint64: + c.asm.CmpNum_ud(1, 2) + swapped = true + case sqltypes.Float64: + c.asm.CmpNum_fd(1, 2) + swapped = true + case sqltypes.Decimal: + c.asm.CmpNum_dd() + } + } + return +} + +func (c *compiler) compareAsStrings(lt ctype, rt ctype) error { + var merged collations.TypedCollation + var coerceLeft collations.Coercion + var coerceRight collations.Coercion + var env = collations.Local() + var err error + + if lt.Col.Collation != rt.Col.Collation { + merged, coerceLeft, coerceRight, err = env.MergeCollations(lt.Col, rt.Col, collations.CoercionOptions{ + ConvertToSuperset: true, + ConvertWithCoercion: true, + }) + } else { + merged = lt.Col + } + if err != nil { + return err + } + + if coerceLeft == nil && coerceRight == nil { + c.asm.CmpString_collate(merged.Collation.Get()) + } else { + if coerceLeft == nil { + coerceLeft = func(dst, in []byte) ([]byte, error) { return in, nil } + } + if coerceRight == nil { + coerceRight = func(dst, in []byte) ([]byte, error) { return in, nil } + } + c.asm.CmpString_coerce(&compiledCoercion{ + col: merged.Collation.Get(), + left: coerceLeft, + right: coerceRight, + }) + } + return nil +} + +func (c *compiler) compareAsJSON(lt ctype, rt ctype) error { + _, err := c.compileArgToJSON(lt, 2) + if err != nil { + return err + } + + _, err = c.compileArgToJSON(rt, 1) + if err != nil { + return err + } + c.asm.CmpJSON() + + return nil +} + +func (c *compiler) compileCheckTrue(when ctype, offset int) error { + switch when.Type { + case sqltypes.Int64: + c.asm.Convert_iB(offset) + case sqltypes.Uint64: + c.asm.Convert_uB(offset) + case sqltypes.Float64: + c.asm.Convert_fB(offset) + case sqltypes.Decimal: + c.asm.Convert_dB(offset) + case sqltypes.VarChar, sqltypes.VarBinary: + c.asm.Convert_bB(offset) + case sqltypes.Null: + c.asm.SetBool(offset, false) + default: + return vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "unsupported Truth check: %s", when.Type) + } + return nil +} + +func (c *compiler) compileLike(expr *LikeExpr) (ctype, error) { + lt, err := c.compileExpr(expr.Left) + if err != nil { + return ctype{}, err + } + + rt, err := c.compileExpr(expr.Right) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck2(lt, rt) + + if !lt.isTextual() { + c.asm.Convert_xc(2, sqltypes.VarChar, c.cfg.Collation, 0, false) + lt.Col = collations.TypedCollation{ + Collation: c.cfg.Collation, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + } + + if !rt.isTextual() { + c.asm.Convert_xc(1, sqltypes.VarChar, c.cfg.Collation, 0, false) + rt.Col = collations.TypedCollation{ + Collation: c.cfg.Collation, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + } + + var merged collations.TypedCollation + var coerceLeft collations.Coercion + var coerceRight collations.Coercion + var env = collations.Local() + + if lt.Col.Collation != rt.Col.Collation { + merged, coerceLeft, coerceRight, err = env.MergeCollations(lt.Col, rt.Col, collations.CoercionOptions{ + ConvertToSuperset: true, + ConvertWithCoercion: true, + }) + } else { + merged = lt.Col + } + if err != nil { + return ctype{}, err + } + + if coerceLeft == nil && coerceRight == nil { + c.asm.Like_collate(expr, merged.Collation.Get()) + } else { + if coerceLeft == nil { + coerceLeft = func(dst, in []byte) ([]byte, error) { return in, nil } + } + if coerceRight == nil { + coerceRight = func(dst, in []byte) ([]byte, error) { return in, nil } + } + c.asm.Like_coerce(expr, &compiledCoercion{ + col: merged.Collation.Get(), + left: coerceLeft, + right: coerceRight, + }) + } + + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean}, nil +} + +func (c *compiler) compileInTable(lhs ctype, rhs TupleExpr) map[vthash.Hash]struct{} { + var ( + table = make(map[vthash.Hash]struct{}) + hasher = vthash.New() + ) + + for _, expr := range rhs { + lit, ok := expr.(*Literal) + if !ok { + return nil + } + inner, ok := lit.inner.(hashable) + if !ok { + return nil + } + + thisColl := evalCollation(lit.inner).Collation + thisTyp := lit.inner.SQLType() + + if thisTyp != lhs.Type || thisColl != lhs.Col.Collation { + return nil + } + + inner.Hash(&hasher) + table[hasher.Sum128()] = struct{}{} + hasher.Reset() + } + + return table +} + +func (c *compiler) compileIn(expr *InExpr) (ctype, error) { + lhs, err := c.compileExpr(expr.Left) + if err != nil { + return ctype{}, nil + } + + rhs := expr.Right.(TupleExpr) + + if table := c.compileInTable(lhs, rhs); table != nil { + c.asm.In_table(expr.Negate, table) + } else { + _, err := c.compileTuple(rhs) + if err != nil { + return ctype{}, err + } + c.asm.In_slow(expr.Negate) + } + return ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean}, nil +} + +func (c *compiler) compileNot(expr *NotExpr) (ctype, error) { + arg, err := c.compileExpr(expr.Inner) + if err != nil { + return ctype{}, nil + } + + skip := c.compileNullCheck1(arg) + + switch arg.Type { + case sqltypes.Null: + // No-op. + case sqltypes.Int64: + c.asm.Not_i() + case sqltypes.Uint64: + c.asm.Not_u() + case sqltypes.Float64: + c.asm.Not_f() + case sqltypes.Decimal: + c.asm.Not_d() + case sqltypes.VarChar, sqltypes.VarBinary: + if arg.isHexOrBitLiteral() { + c.asm.Convert_xu(1) + c.asm.Not_u() + } else { + c.asm.Convert_bB(1) + c.asm.Not_i() + } + case sqltypes.TypeJSON: + c.asm.Convert_jB(1) + c.asm.Not_i() + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "unsupported Not check: %s", arg.Type) + } + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Int64, Flag: flagNullable | flagIsBoolean, Col: collationNumeric}, nil +} + +func (c *compiler) compileLogical(expr *LogicalExpr) (ctype, error) { + lt, err := c.compileExpr(expr.Left) + if err != nil { + return ctype{}, err + } + + switch lt.Type { + case sqltypes.Null, sqltypes.Int64: + // No-op. + case sqltypes.Uint64: + c.asm.Convert_uB(1) + case sqltypes.Float64: + c.asm.Convert_fB(1) + case sqltypes.Decimal: + c.asm.Convert_dB(1) + case sqltypes.VarChar, sqltypes.VarBinary: + if lt.isHexOrBitLiteral() { + c.asm.Convert_xu(1) + c.asm.Convert_uB(1) + } else { + c.asm.Convert_bB(1) + } + case sqltypes.TypeJSON: + c.asm.Convert_jB(1) + default: + c.asm.Convert_bB(1) + } + + jump := c.asm.LogicalLeft(expr.opname) + + rt, err := c.compileExpr(expr.Right) + if err != nil { + return ctype{}, err + } + + switch rt.Type { + case sqltypes.Null, sqltypes.Int64: + // No-op. + case sqltypes.Uint64: + c.asm.Convert_uB(1) + case sqltypes.Float64: + c.asm.Convert_fB(1) + case sqltypes.Decimal: + c.asm.Convert_dB(1) + case sqltypes.VarChar, sqltypes.VarBinary: + if rt.isHexOrBitLiteral() { + c.asm.Convert_xu(1) + c.asm.Convert_uB(1) + } else { + c.asm.Convert_bB(1) + } + case sqltypes.TypeJSON: + c.asm.Convert_jB(1) + default: + c.asm.Convert_bB(1) + } + + c.asm.LogicalRight(expr.opname) + c.asm.jumpDestination(jump) + return ctype{Type: sqltypes.Int64, Flag: flagNullable | flagIsBoolean, Col: collationNumeric}, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_convert.go b/go/vt/vtgate/evalengine/compiler_convert.go new file mode 100644 index 00000000000..7f071b85f8f --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_convert.go @@ -0,0 +1,121 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" +) + +func (c *compiler) compileCollate(expr *CollateExpr) (ctype, error) { + ct, err := c.compileExpr(expr.Inner) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(ct) + + switch ct.Type { + case sqltypes.VarChar: + if err := collations.Local().EnsureCollate(ct.Col.Collation, expr.TypedCollation.Collation); err != nil { + return ctype{}, vterrors.New(vtrpc.Code_INVALID_ARGUMENT, err.Error()) + } + fallthrough + case sqltypes.VarBinary: + c.asm.Collate(expr.TypedCollation.Collation) + default: + return ctype{}, c.unsupported(expr) + } + + c.asm.jumpDestination(skip) + + ct.Col = expr.TypedCollation + ct.Flag |= flagExplicitCollation | flagNullable + return ct, nil +} + +func (c *compiler) compileConvert(conv *ConvertExpr) (ctype, error) { + arg, err := c.compileExpr(conv.Inner) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(arg) + var convt ctype + + switch conv.Type { + case "BINARY": + convt = ctype{Type: conv.convertToBinaryType(arg.Type), Col: collationBinary} + c.asm.Convert_xb(1, convt.Type, conv.Length, conv.HasLength) + + case "CHAR", "NCHAR": + convt = ctype{ + Type: conv.convertToCharType(arg.Type), + Col: collations.TypedCollation{Collation: conv.Collation}, + } + c.asm.Convert_xc(1, convt.Type, convt.Col.Collation, conv.Length, conv.HasLength) + + case "DECIMAL": + convt = ctype{Type: sqltypes.Decimal, Col: collationNumeric} + m, d := conv.decimalPrecision() + c.asm.Convert_xd(1, m, d) + + case "DOUBLE", "REAL": + convt = c.compileToFloat(arg, 1) + + case "SIGNED", "SIGNED INTEGER": + convt = c.compileToInt64(arg, 1) + + case "UNSIGNED", "UNSIGNED INTEGER": + convt = c.compileToUint64(arg, 1) + + case "JSON": + // TODO: what does NULL map to? + convt, err = c.compileToJSON(arg, 1) + if err != nil { + return ctype{}, err + } + + default: + return ctype{}, c.unsupported(conv) + } + + c.asm.jumpDestination(skip) + convt.Flag = arg.Flag | flagNullable + return convt, nil + +} + +func (c *compiler) compileConvertUsing(conv *ConvertUsingExpr) (ctype, error) { + ct, err := c.compileExpr(conv.Inner) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(ct) + c.asm.Convert_xc(1, sqltypes.VarChar, conv.Collation, 0, false) + c.asm.jumpDestination(skip) + + col := collations.TypedCollation{ + Collation: conv.Collation, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + return ctype{Type: sqltypes.VarChar, Flag: flagNullable, Col: col}, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_fn.go b/go/vt/vtgate/evalengine/compiler_fn.go new file mode 100644 index 00000000000..2e227483cdf --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_fn.go @@ -0,0 +1,522 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" +) + +func (c *compiler) compileFn(call callable) (ctype, error) { + switch call := call.(type) { + case *builtinMultiComparison: + return c.compileFn_MULTICMP(call) + case *builtinJSONExtract: + return c.compileFn_JSON_EXTRACT(call) + case *builtinJSONUnquote: + return c.compileFn_JSON_UNQUOTE(call) + case *builtinJSONContainsPath: + return c.compileFn_JSON_CONTAINS_PATH(call) + case *builtinJSONArray: + return c.compileFn_JSON_ARRAY(call) + case *builtinJSONObject: + return c.compileFn_JSON_OBJECT(call) + case *builtinJSONKeys: + return c.compileFn_JSON_KEYS(call) + case *builtinRepeat: + return c.compileFn_REPEAT(call) + case *builtinToBase64: + return c.compileFn_TO_BASE64(call) + case *builtinFromBase64: + return c.compileFn_FROM_BASE64(call) + case *builtinChangeCase: + return c.compileFn_CCASE(call) + case *builtinCharLength: + return c.compileFn_length(call, c.asm.Fn_CHAR_LENGTH) + case *builtinLength: + return c.compileFn_length(call, c.asm.Fn_LENGTH) + case *builtinBitLength: + return c.compileFn_length(call, c.asm.Fn_BIT_LENGTH) + case *builtinASCII: + return c.compileFn_ASCII(call) + case *builtinHex: + return c.compileFn_HEX(call) + case *builtinBitCount: + return c.compileFn_BIT_COUNT(call) + case *builtinCollation: + return c.compileFn_COLLATION(call) + case *builtinCeil: + return c.compileFn_rounding(call, c.asm.Fn_CEIL_f, c.asm.Fn_CEIL_d) + case *builtinFloor: + return c.compileFn_rounding(call, c.asm.Fn_FLOOR_f, c.asm.Fn_FLOOR_d) + case *builtinAbs: + return c.compileFn_ABS(call) + case *builtinPi: + return c.compileFn_PI(call) + case *builtinAcos: + return c.compileFn_math1(call, c.asm.Fn_ACOS, flagNullable) + case *builtinAsin: + return c.compileFn_math1(call, c.asm.Fn_ASIN, flagNullable) + case *builtinAtan: + return c.compileFn_math1(call, c.asm.Fn_ATAN, 0) + case *builtinAtan2: + return c.compileFn_ATAN2(call) + case *builtinCos: + return c.compileFn_math1(call, c.asm.Fn_COS, 0) + case *builtinCot: + return c.compileFn_math1(call, c.asm.Fn_COT, 0) + case *builtinSin: + return c.compileFn_math1(call, c.asm.Fn_SIN, 0) + case *builtinTan: + return c.compileFn_math1(call, c.asm.Fn_TAN, 0) + case *builtinDegrees: + return c.compileFn_math1(call, c.asm.Fn_DEGREES, 0) + case *builtinRadians: + return c.compileFn_math1(call, c.asm.Fn_RADIANS, 0) + case *builtinWeightString: + return c.compileFn_WEIGHT_STRING(call) + default: + return ctype{}, c.unsupported(call) + } +} + +func (c *compiler) compileFn_MULTICMP(call *builtinMultiComparison) (ctype, error) { + var ( + signed int + unsigned int + floats int + decimals int + text int + binary int + args []ctype + ) + + /* + If any argument is NULL, the result is NULL. No comparison is needed. + If all arguments are integer-valued, they are compared as integers. + If at least one argument is double precision, they are compared as double-precision values. Otherwise, if at least one argument is a DECIMAL value, they are compared as DECIMAL values. + If the arguments comprise a mix of numbers and strings, they are compared as strings. + If any argument is a nonbinary (character) string, the arguments are compared as nonbinary strings. + In all other cases, the arguments are compared as binary strings. + */ + + for _, expr := range call.Arguments { + tt, err := c.compileExpr(expr) + if err != nil { + return ctype{}, err + } + + args = append(args, tt) + + switch tt.Type { + case sqltypes.Int64: + signed++ + case sqltypes.Uint64: + unsigned++ + case sqltypes.Float64: + floats++ + case sqltypes.Decimal: + decimals++ + case sqltypes.Text, sqltypes.VarChar: + text++ + case sqltypes.Blob, sqltypes.Binary, sqltypes.VarBinary: + binary++ + default: + return ctype{}, c.unsupported(call) + } + } + + if signed+unsigned == len(args) { + if signed == len(args) { + c.asm.Fn_MULTICMP_i(len(args), call.cmp < 0) + return ctype{Type: sqltypes.Int64, Col: collationNumeric}, nil + } + if unsigned == len(args) { + c.asm.Fn_MULTICMP_u(len(args), call.cmp < 0) + return ctype{Type: sqltypes.Uint64, Col: collationNumeric}, nil + } + return c.compileFN_MULTICMP_d(args, call.cmp < 0) + } + if binary > 0 || text > 0 { + if text > 0 { + return c.compileFn_MULTICMP_c(args, call.cmp < 0) + } + c.asm.Fn_MULTICMP_b(len(args), call.cmp < 0) + return ctype{Type: sqltypes.VarBinary, Col: collationBinary}, nil + } else { + if floats > 0 { + for i, tt := range args { + c.compileToFloat(tt, len(args)-i) + } + c.asm.Fn_MULTICMP_f(len(args), call.cmp < 0) + return ctype{Type: sqltypes.Float64, Col: collationNumeric}, nil + } + if decimals > 0 { + return c.compileFN_MULTICMP_d(args, call.cmp < 0) + } + } + return ctype{}, vterrors.Errorf(vtrpc.Code_INTERNAL, "unexpected argument for GREATEST/LEAST") +} + +func (c *compiler) compileFn_MULTICMP_c(args []ctype, lessThan bool) (ctype, error) { + env := collations.Local() + + var ca collationAggregation + for _, arg := range args { + if err := ca.add(env, arg.Col); err != nil { + return ctype{}, err + } + } + + tc := ca.result() + c.asm.Fn_MULTICMP_c(len(args), lessThan, tc) + return ctype{Type: sqltypes.VarChar, Col: tc}, nil +} + +func (c *compiler) compileFN_MULTICMP_d(args []ctype, lessThan bool) (ctype, error) { + for i, tt := range args { + c.compileToDecimal(tt, len(args)-i) + } + c.asm.Fn_MULTICMP_d(len(args), lessThan) + return ctype{Type: sqltypes.Decimal, Col: collationNumeric}, nil +} + +func (c *compiler) compileFn_REPEAT(expr *builtinRepeat) (ctype, error) { + str, err := c.compileExpr(expr.Arguments[0]) + if err != nil { + return ctype{}, err + } + + repeat, err := c.compileExpr(expr.Arguments[1]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck2(str, repeat) + + switch { + case str.isTextual(): + default: + c.asm.Convert_xc(2, sqltypes.VarChar, c.cfg.Collation, 0, false) + } + _ = c.compileToInt64(repeat, 1) + + c.asm.Fn_REPEAT(1) + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.VarChar, Col: str.Col}, nil +} + +func (c *compiler) compileFn_TO_BASE64(call *builtinToBase64) (ctype, error) { + str, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + t := sqltypes.VarChar + if str.Type == sqltypes.Blob || str.Type == sqltypes.TypeJSON { + t = sqltypes.Text + } + + switch { + case str.isTextual(): + default: + c.asm.Convert_xb(1, t, 0, false) + } + + col := collations.TypedCollation{ + Collation: c.cfg.Collation, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + + c.asm.Fn_TO_BASE64(t, col) + c.asm.jumpDestination(skip) + + return ctype{Type: t, Col: col}, nil +} + +func (c *compiler) compileFn_FROM_BASE64(call *builtinFromBase64) (ctype, error) { + str, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + t := sqltypes.VarBinary + if str.Type == sqltypes.Blob || str.Type == sqltypes.TypeJSON { + t = sqltypes.Blob + } + + switch { + case str.isTextual(): + default: + c.asm.Convert_xb(1, t, 0, false) + } + + c.asm.Fn_FROM_BASE64(t) + c.asm.jumpDestination(skip) + + return ctype{Type: t, Col: collationBinary}, nil +} + +func (c *compiler) compileFn_CCASE(call *builtinChangeCase) (ctype, error) { + str, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + switch { + case str.isTextual(): + default: + c.asm.Convert_xc(1, sqltypes.VarChar, c.cfg.Collation, 0, false) + } + + c.asm.Fn_LUCASE(call.upcase) + c.asm.jumpDestination(skip) + + return ctype{Type: sqltypes.VarChar, Col: str.Col}, nil +} + +func (c *compiler) compileFn_length(call callable, asm_ins func()) (ctype, error) { + str, err := c.compileExpr(call.callable()[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + switch { + case str.isTextual(): + default: + c.asm.Convert_xc(1, sqltypes.VarChar, c.cfg.Collation, 0, false) + } + + asm_ins() + c.asm.jumpDestination(skip) + + return ctype{Type: sqltypes.Int64, Col: collationNumeric}, nil +} + +func (c *compiler) compileFn_ASCII(call *builtinASCII) (ctype, error) { + str, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + switch { + case str.isTextual(): + default: + c.asm.Convert_xc(1, sqltypes.VarChar, c.cfg.Collation, 0, false) + } + + c.asm.Fn_ASCII() + c.asm.jumpDestination(skip) + + return ctype{Type: sqltypes.Int64, Col: collationNumeric}, nil +} + +func (c *compiler) compileFn_HEX(call *builtinHex) (ctype, error) { + str, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(str) + + col := collations.TypedCollation{ + Collation: c.cfg.Collation, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + + t := sqltypes.VarChar + if str.Type == sqltypes.Blob || str.Type == sqltypes.TypeJSON { + t = sqltypes.Text + } + + switch { + case sqltypes.IsNumber(str.Type), sqltypes.IsDecimal(str.Type): + c.asm.Fn_HEX_d(col) + case str.isTextual(): + c.asm.Fn_HEX_c(t, col) + default: + c.asm.Convert_xc(1, t, c.cfg.Collation, 0, false) + c.asm.Fn_HEX_c(t, col) + } + + c.asm.jumpDestination(skip) + + return ctype{Type: t, Col: col}, nil +} + +func (c *compiler) compileFn_COLLATION(expr *builtinCollation) (ctype, error) { + _, err := c.compileExpr(expr.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.asm.jumpFrom() + + col := collations.TypedCollation{ + Collation: collations.CollationUtf8ID, + Coercibility: collations.CoerceCoercible, + Repertoire: collations.RepertoireASCII, + } + + c.asm.Fn_COLLATION(col) + c.asm.jumpDestination(skip) + + return ctype{Type: sqltypes.VarChar, Col: col}, nil +} + +func (c *compiler) compileFn_rounding(expr callable, asm_ins_f, asm_ins_d func()) (ctype, error) { + arg, err := c.compileExpr(expr.callable()[0]) + if err != nil { + return ctype{}, err + } + + if arg.Type == sqltypes.Int64 || arg.Type == sqltypes.Uint64 { + // No-op for integers. + return arg, nil + } + + skip := c.compileNullCheck1(arg) + + convt := ctype{Type: arg.Type, Col: collationNumeric, Flag: arg.Flag} + switch arg.Type { + case sqltypes.Float64: + asm_ins_f() + case sqltypes.Decimal: + // We assume here the most common case here is that + // the decimal fits into an integer. + convt.Type = sqltypes.Int64 + asm_ins_d() + default: + convt.Type = sqltypes.Float64 + c.asm.Convert_xf(1) + asm_ins_f() + } + + c.asm.jumpDestination(skip) + return convt, nil +} + +func (c *compiler) compileFn_ABS(expr *builtinAbs) (ctype, error) { + arg, err := c.compileExpr(expr.Arguments[0]) + if err != nil { + return ctype{}, err + } + + if arg.Type == sqltypes.Uint64 { + // No-op if it's unsigned since that's already positive. + return arg, nil + } + + skip := c.compileNullCheck1(arg) + + convt := ctype{Type: arg.Type, Col: collationNumeric, Flag: arg.Flag} + switch arg.Type { + case sqltypes.Int64: + c.asm.Fn_ABS_i() + case sqltypes.Float64: + c.asm.Fn_ABS_f() + case sqltypes.Decimal: + // We assume here the most common case here is that + // the decimal fits into an integer. + c.asm.Fn_ABS_d() + default: + convt.Type = sqltypes.Float64 + c.asm.Convert_xf(1) + c.asm.Fn_ABS_f() + } + + c.asm.jumpDestination(skip) + return convt, nil +} + +func (c *compiler) compileFn_PI(_ *builtinPi) (ctype, error) { + c.asm.Fn_PI() + return ctype{Type: sqltypes.Float64, Col: collationNumeric}, nil +} + +func (c *compiler) compileFn_math1(expr callable, asm_ins func(), nullable typeFlag) (ctype, error) { + arg, err := c.compileExpr(expr.callable()[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(arg) + c.compileToFloat(arg, 1) + asm_ins() + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Float64, Col: collationNumeric, Flag: arg.Flag | nullable}, nil +} + +func (c *compiler) compileFn_ATAN2(expr *builtinAtan2) (ctype, error) { + arg1, err := c.compileExpr(expr.Arguments[0]) + if err != nil { + return ctype{}, err + } + + arg2, err := c.compileExpr(expr.Arguments[1]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck2(arg1, arg2) + c.compileToFloat(arg1, 2) + c.compileToFloat(arg2, 1) + c.asm.Fn_ATAN2() + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Float64, Col: collationNumeric, Flag: arg1.Flag | arg2.Flag}, nil +} + +func (c *compiler) compileFn_WEIGHT_STRING(call *builtinWeightString) (ctype, error) { + str, err := c.compileExpr(call.String) + if err != nil { + return ctype{}, err + } + + switch str.Type { + case sqltypes.Int64, sqltypes.Uint64: + return ctype{}, c.unsupported(call) + + case sqltypes.VarChar, sqltypes.VarBinary: + skip := c.compileNullCheck1(str) + + if call.Cast == "binary" { + c.asm.Fn_WEIGHT_STRING_b(call.Len) + } else { + c.asm.Fn_WEIGHT_STRING_c(str.Col.Collation.Get(), call.Len) + } + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.VarBinary, Col: collationBinary}, nil + + default: + c.asm.SetNull(1) + return ctype{Type: sqltypes.VarBinary, Flag: flagNullable | flagNull, Col: collationBinary}, nil + } +} diff --git a/go/vt/vtgate/evalengine/compiler_json.go b/go/vt/vtgate/evalengine/compiler_json.go new file mode 100644 index 00000000000..ee3d8cb1d14 --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_json.go @@ -0,0 +1,288 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/mysql/collations/charset" + "vitess.io/vitess/go/slices2" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json" +) + +func isEncodingJSONSafe(col collations.ID) bool { + switch col.Get().Charset().(type) { + case charset.Charset_utf8mb4, charset.Charset_utf8mb3, charset.Charset_binary: + return true + default: + return false + } +} + +func (c *compiler) compileParseJSON(fn string, doct ctype, offset int) (ctype, error) { + switch doct.Type { + case sqltypes.TypeJSON: + case sqltypes.VarChar, sqltypes.VarBinary: + c.asm.Parse_j(offset) + default: + return ctype{}, errJSONType(fn) + } + return ctype{Type: sqltypes.TypeJSON, Flag: doct.Flag, Col: collationJSON}, nil +} + +func (c *compiler) compileToJSON(doct ctype, offset int) (ctype, error) { + switch doct.Type { + case sqltypes.TypeJSON: + return doct, nil + case sqltypes.Float64: + c.asm.Convert_fj(offset) + case sqltypes.Int64, sqltypes.Uint64, sqltypes.Decimal: + c.asm.Convert_nj(offset, doct.Flag&flagIsBoolean != 0) + case sqltypes.VarChar: + c.asm.Convert_cj(offset) + case sqltypes.VarBinary: + c.asm.Convert_bj(offset) + case sqltypes.Null: + c.asm.Convert_Nj(offset) + case sqltypes.Date: + c.asm.Convert_dj(offset) + case sqltypes.Datetime, sqltypes.Timestamp: + c.asm.Convert_dtj(offset) + case sqltypes.Time: + c.asm.Convert_tj(offset) + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "Unsupported type conversion: %s AS JSON", doct.Type) + } + return ctype{Type: sqltypes.TypeJSON, Col: collationJSON}, nil +} + +func (c *compiler) compileArgToJSON(doct ctype, offset int) (ctype, error) { + switch doct.Type { + case sqltypes.TypeJSON: + return doct, nil + case sqltypes.Float64: + c.asm.Convert_fj(offset) + case sqltypes.Int64, sqltypes.Uint64, sqltypes.Decimal: + c.asm.Convert_nj(offset, doct.Flag&flagIsBoolean != 0) + case sqltypes.VarChar: + c.asm.ConvertArg_cj(offset) + case sqltypes.VarBinary: + c.asm.Convert_bj(offset) + case sqltypes.Null: + c.asm.Convert_Nj(offset) + case sqltypes.Date: + c.asm.Convert_dj(offset) + case sqltypes.Datetime: + c.asm.Convert_dtj(offset) + case sqltypes.Timestamp: + c.asm.Convert_dtj(offset) + case sqltypes.Time: + c.asm.Convert_tj(offset) + default: + return ctype{}, vterrors.Errorf(vtrpc.Code_UNIMPLEMENTED, "Unsupported type conversion: %s AS JSON", doct.Type) + } + return ctype{Type: sqltypes.TypeJSON, Col: collationJSON}, nil +} + +func (c *compiler) compileFn_JSON_ARRAY(call *builtinJSONArray) (ctype, error) { + for _, arg := range call.Arguments { + tt, err := c.compileExpr(arg) + if err != nil { + return ctype{}, err + } + + _, err = c.compileArgToJSON(tt, 1) + if err != nil { + return ctype{}, err + } + } + c.asm.Fn_JSON_ARRAY(len(call.Arguments)) + return ctype{Type: sqltypes.TypeJSON, Col: collationJSON}, nil +} + +func (c *compiler) compileFn_JSON_OBJECT(call *builtinJSONObject) (ctype, error) { + for i := 0; i < len(call.Arguments); i += 2 { + key, err := c.compileExpr(call.Arguments[i]) + if err != nil { + return ctype{}, err + } + if err := c.compileToJSONKey(key); err != nil { + return ctype{}, err + } + val, err := c.compileExpr(call.Arguments[i+1]) + if err != nil { + return ctype{}, err + } + _, err = c.compileArgToJSON(val, 1) + if err != nil { + return ctype{}, err + } + } + c.asm.Fn_JSON_OBJECT(len(call.Arguments)) + return ctype{Type: sqltypes.TypeJSON, Col: collationJSON}, nil +} + +func (c *compiler) compileToJSONKey(key ctype) error { + if key.Type == sqltypes.Null { + return errJSONKeyIsNil + } + if key.Type == sqltypes.VarChar && isEncodingJSONSafe(key.Col.Collation) { + return nil + } + if key.Type == sqltypes.VarBinary { + return nil + } + c.asm.Convert_xc(1, sqltypes.VarChar, c.cfg.Collation, 0, false) + return nil +} + +func (c *compiler) jsonExtractPath(expr Expr) (*json.Path, error) { + path, ok := expr.(*Literal) + if !ok { + return nil, errJSONPath + } + pathBytes, ok := path.inner.(*evalBytes) + if !ok { + return nil, errJSONPath + } + var parser json.PathParser + return parser.ParseBytes(pathBytes.bytes) +} + +func (c *compiler) jsonExtractOneOrAll(fname string, expr Expr) (jsonMatch, error) { + lit, ok := expr.(*Literal) + if !ok { + return jsonMatchInvalid, errOneOrAll(fname) + } + b, ok := lit.inner.(*evalBytes) + if !ok { + return jsonMatchInvalid, errOneOrAll(fname) + } + return intoOneOrAll(fname, b.string()) +} + +func (c *compiler) compileFn_JSON_EXTRACT(call *builtinJSONExtract) (ctype, error) { + doct, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + if slices2.All(call.Arguments[1:], func(expr Expr) bool { return expr.constant() }) { + paths := make([]*json.Path, 0, len(call.Arguments[1:])) + + for _, arg := range call.Arguments[1:] { + jp, err := c.jsonExtractPath(arg) + if err != nil { + return ctype{}, err + } + paths = append(paths, jp) + } + + jt, err := c.compileParseJSON("JSON_EXTRACT", doct, 1) + if err != nil { + return ctype{}, err + } + + c.asm.Fn_JSON_EXTRACT0(paths) + return jt, nil + } + + return ctype{}, c.unsupported(call) +} + +func (c *compiler) compileFn_JSON_UNQUOTE(call *builtinJSONUnquote) (ctype, error) { + arg, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + skip := c.compileNullCheck1(arg) + _, err = c.compileParseJSON("JSON_UNQUOTE", arg, 1) + if err != nil { + return ctype{}, err + } + + c.asm.Fn_JSON_UNQUOTE() + c.asm.jumpDestination(skip) + return ctype{Type: sqltypes.Blob, Flag: flagNullable, Col: collationJSON}, nil +} + +func (c *compiler) compileFn_JSON_CONTAINS_PATH(call *builtinJSONContainsPath) (ctype, error) { + doct, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + if !call.Arguments[1].constant() { + return ctype{}, c.unsupported(call) + } + + if !slices2.All(call.Arguments[2:], func(expr Expr) bool { return expr.constant() }) { + return ctype{}, c.unsupported(call) + } + + match, err := c.jsonExtractOneOrAll("JSON_CONTAINS_PATH", call.Arguments[1]) + if err != nil { + return ctype{}, err + } + + paths := make([]*json.Path, 0, len(call.Arguments[2:])) + + for _, arg := range call.Arguments[2:] { + jp, err := c.jsonExtractPath(arg) + if err != nil { + return ctype{}, err + } + paths = append(paths, jp) + } + + _, err = c.compileParseJSON("JSON_CONTAINS_PATH", doct, 1) + if err != nil { + return ctype{}, err + } + + c.asm.Fn_JSON_CONTAINS_PATH(match, paths) + return ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean}, nil +} + +func (c *compiler) compileFn_JSON_KEYS(call *builtinJSONKeys) (ctype, error) { + doc, err := c.compileExpr(call.Arguments[0]) + if err != nil { + return ctype{}, err + } + + _, err = c.compileParseJSON("JSON_KEYS", doc, 1) + if err != nil { + return ctype{}, err + } + + var jp *json.Path + if len(call.Arguments) == 2 { + jp, err = c.jsonExtractPath(call.Arguments[1]) + if err != nil { + return ctype{}, err + } + if jp.ContainsWildcards() { + return ctype{}, errInvalidPathForTransform + } + } + + c.asm.Fn_JSON_KEYS(jp) + return ctype{Type: sqltypes.TypeJSON, Flag: flagNullable, Col: collationJSON}, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_logical.go b/go/vt/vtgate/evalengine/compiler_logical.go new file mode 100644 index 00000000000..e3ec25754fe --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_logical.go @@ -0,0 +1,74 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" +) + +func (c *compiler) compileIs(is *IsExpr) (ctype, error) { + _, err := c.compileExpr(is.Inner) + if err != nil { + return ctype{}, err + } + c.asm.Is(is.Check) + return ctype{Type: sqltypes.Int64, Col: collationNumeric, Flag: flagIsBoolean}, nil +} + +func (c *compiler) compileCase(cs *CaseExpr) (ctype, error) { + var ca collationAggregation + var ta typeAggregation + var local = collations.Local() + + for _, wt := range cs.cases { + when, err := c.compileExpr(wt.when) + if err != nil { + return ctype{}, err + } + + if err := c.compileCheckTrue(when, 1); err != nil { + return ctype{}, err + } + + then, err := c.compileExpr(wt.then) + if err != nil { + return ctype{}, err + } + + ta.add(then.Type, then.Flag) + if err := ca.add(local, then.Col); err != nil { + return ctype{}, err + } + } + + if cs.Else != nil { + els, err := c.compileExpr(cs.Else) + if err != nil { + return ctype{}, err + } + + ta.add(els.Type, els.Flag) + if err := ca.add(local, els.Col); err != nil { + return ctype{}, err + } + } + + ct := ctype{Type: ta.result(), Col: ca.result()} + c.asm.CmpCase(len(cs.cases), cs.Else != nil, ct.Type, ct.Col) + return ct, nil +} diff --git a/go/vt/vtgate/evalengine/compiler_test.go b/go/vt/vtgate/evalengine/compiler_test.go new file mode 100644 index 00000000000..60d800df6e9 --- /dev/null +++ b/go/vt/vtgate/evalengine/compiler_test.go @@ -0,0 +1,330 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine_test + +import ( + "fmt" + "strconv" + "strings" + "testing" + + "github.com/olekukonko/tablewriter" + + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine" + "vitess.io/vitess/go/vt/vtgate/evalengine/testcases" +) + +func makeFields(values []sqltypes.Value) (fields []*querypb.Field) { + for i, v := range values { + field := &querypb.Field{ + Name: fmt.Sprintf("column%d", i), + Type: v.Type(), + } + if sqltypes.IsText(field.Type) { + field.Charset = uint32(collations.CollationUtf8mb4ID) + } else { + field.Charset = uint32(collations.CollationBinaryID) + } + fields = append(fields, field) + } + return +} + +type Tracker struct { + buf strings.Builder + tbl *tablewriter.Table + supported, total int +} + +func NewTracker() *Tracker { + track := &Tracker{} + track.tbl = tablewriter.NewWriter(&track.buf) + return track +} + +func (s *Tracker) Add(name string, supported, total int) { + s.tbl.Append([]string{ + name, + strconv.Itoa(supported), + strconv.Itoa(total), + fmt.Sprintf("%.02f%%", 100*float64(supported)/float64(total)), + }) + s.supported += supported + s.total += total +} + +func (s *Tracker) String() string { + s.tbl.SetBorder(false) + s.tbl.SetColumnAlignment([]int{ + tablewriter.ALIGN_LEFT, + tablewriter.ALIGN_RIGHT, + tablewriter.ALIGN_RIGHT, + tablewriter.ALIGN_RIGHT, + }) + s.tbl.SetFooterAlignment(tablewriter.ALIGN_RIGHT) + s.tbl.SetFooter([]string{ + "", + strconv.Itoa(s.supported), + strconv.Itoa(s.total), + fmt.Sprintf("%.02f%%", 100*float64(s.supported)/float64(s.total)), + }) + s.tbl.Render() + return s.buf.String() +} + +func TestCompilerReference(t *testing.T) { + track := NewTracker() + + for _, tc := range testcases.Cases { + t.Run(tc.Name(), func(t *testing.T) { + var supported, total int + env := evalengine.EmptyExpressionEnv() + + tc.Run(func(query string, row []sqltypes.Value) { + env.Row = row + + stmt, err := sqlparser.ParseExpr(query) + if err != nil { + // no need to test un-parseable queries + return + } + + fields := evalengine.FieldResolver(tc.Schema) + cfg := &evalengine.Config{ + ResolveColumn: fields.Column, + ResolveType: fields.Type, + Collation: collations.CollationUtf8mb4ID, + Optimization: evalengine.OptimizationLevelCompilerDebug, + } + + converted, err := evalengine.Translate(stmt, cfg) + if err != nil { + return + } + + expected, evalErr := env.Evaluate(evalengine.Deoptimize(converted)) + total++ + + if cfg.CompilerErr != nil { + switch { + case vterrors.Code(cfg.CompilerErr) == vtrpcpb.Code_UNIMPLEMENTED: + t.Logf("unsupported: %s", query) + case evalErr == nil: + t.Errorf("failed compilation:\nSQL: %s\nError: %s", query, cfg.CompilerErr) + case evalErr.Error() != cfg.CompilerErr.Error(): + t.Errorf("error mismatch:\nSQL: %s\nError eval: %s\nError comp: %s", query, evalErr, cfg.CompilerErr) + default: + supported++ + } + return + } + + res, vmErr := func() (res evalengine.EvalResult, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("PANIC: %v", r) + } + }() + res, err = env.EvaluateVM(converted.(*evalengine.CompiledExpr)) + return + }() + + if vmErr != nil { + switch { + case evalErr == nil: + t.Errorf("failed evaluation from compiler:\nSQL: %s\nError: %s", query, vmErr) + case evalErr.Error() != vmErr.Error(): + t.Errorf("error mismatch:\nSQL: %s\nError eval: %s\nError comp: %s", query, evalErr, vmErr) + default: + supported++ + } + return + } + + eval := expected.String() + comp := res.String() + + if eval != comp { + t.Errorf("bad evaluation from compiler:\nSQL: %s\nEval: %s\nComp: %s", query, eval, comp) + return + } + + supported++ + }) + + track.Add(tc.Name(), supported, total) + }) + } + + t.Logf("\n%s", track.String()) +} + +type debugCompiler struct { + t testing.TB +} + +func (d *debugCompiler) Instruction(ins string, args ...any) { + ins = fmt.Sprintf(ins, args...) + d.t.Logf("> %s", ins) +} + +func (d *debugCompiler) Stack(old, new int) { + d.t.Logf("\tsp = %d -> %d", old, new) +} + +func TestCompilerSingle(t *testing.T) { + var testCases = []struct { + expression string + values []sqltypes.Value + result string + }{ + { + expression: "1 + column0", + values: []sqltypes.Value{sqltypes.NewInt64(1)}, + result: "INT64(2)", + }, + { + expression: "1 + column0", + values: []sqltypes.Value{sqltypes.NewFloat64(1)}, + result: "FLOAT64(2)", + }, + { + expression: "1.0e0 - column0", + values: []sqltypes.Value{sqltypes.NewFloat64(1)}, + result: "FLOAT64(0)", + }, + { + expression: "128 - column0", + values: []sqltypes.Value{sqltypes.NewFloat64(1)}, + result: "FLOAT64(127)", + }, + { + expression: "(128 - column0) * 3", + values: []sqltypes.Value{sqltypes.NewFloat64(1)}, + result: "FLOAT64(381)", + }, + { + expression: "1.0e0 < column0", + values: []sqltypes.Value{sqltypes.NewFloat64(2)}, + result: "INT64(1)", + }, + { + expression: "1.0e0 < column0", + values: []sqltypes.Value{sqltypes.NewFloat64(-1)}, + result: "INT64(0)", + }, + { + expression: `'foo' = 'FOO' collate utf8mb4_0900_as_cs`, + result: "INT64(0)", + }, + { + expression: `'foo' < 'bar'`, + result: "INT64(0)", + }, + { + expression: `case when false then 0 else 18446744073709551615 end`, + result: `DECIMAL(18446744073709551615)`, + }, + { + expression: `case when true then _binary "foobar" else 'foo' collate utf8mb4_0900_as_cs end`, + result: `VARCHAR("foobar")`, + }, + { + expression: `- 18446744073709551615`, + result: `DECIMAL(-18446744073709551615)`, + }, + { + expression: `CAST(CAST(true AS JSON) AS BINARY)`, + result: `BLOB("true")`, + }, + { + expression: `JSON_ARRAY(true, 1.0)`, + result: `JSON("[true, 1.0]")`, + }, + { + expression: `cast(true as json) + 0`, + result: `FLOAT64(1)`, + }, + { + expression: `CAST(CAST(0 AS JSON) AS CHAR(16))`, + result: `VARCHAR("0")`, + }, + { + expression: `1 OR cast('invalid' as json)`, + result: `INT64(1)`, + }, + { + expression: `NULL AND 1`, + result: `NULL`, + }, + } + + for _, tc := range testCases { + t.Run(tc.expression, func(t *testing.T) { + expr, err := sqlparser.ParseExpr(tc.expression) + if err != nil { + t.Fatal(err) + } + + fields := evalengine.FieldResolver(makeFields(tc.values)) + cfg := &evalengine.Config{ + ResolveColumn: fields.Column, + ResolveType: fields.Type, + Collation: collations.CollationUtf8mb4ID, + Optimization: evalengine.OptimizationLevelCompilerDebug, + } + + converted, err := evalengine.Translate(expr, cfg) + if err != nil { + t.Fatal(err) + } + + if cfg.CompilerErr != nil { + t.Fatalf("bad compilation: %v", cfg.CompilerErr) + } + + env := evalengine.EmptyExpressionEnv() + env.Row = tc.values + + expected, err := env.Evaluate(evalengine.Deoptimize(converted)) + if err != nil { + t.Fatal(err) + } + if expected.String() != tc.result { + t.Fatalf("bad evaluation from eval engine: got %s, want %s", expected.String(), tc.result) + } + + // re-run the same evaluation multiple times to ensure results are always consistent + for i := 0; i < 8; i++ { + res, err := env.EvaluateVM(converted.(*evalengine.CompiledExpr)) + if err != nil { + t.Fatal(err) + } + + if res.String() != tc.result { + t.Fatalf("bad evaluation from compiler: got %s, want %s (iteration %d)", res, tc.result, i) + } + } + }) + } +} diff --git a/go/vt/vtgate/evalengine/eval.go b/go/vt/vtgate/evalengine/eval.go index f5f42c30625..c49442c26e8 100644 --- a/go/vt/vtgate/evalengine/eval.go +++ b/go/vt/vtgate/evalengine/eval.go @@ -36,6 +36,8 @@ const ( flagNull typeFlag = 1 << 0 // flagNullable marks that this value CAN be null flagNullable typeFlag = 1 << 1 + // flagIsBoolean marks that this value should be interpreted as boolean + flagIsBoolean typeFlag = 1 << 2 // flagIntegerUdf marks that this value is math.MinInt64, and will underflow if negated flagIntegerUdf typeFlag = 1 << 5 @@ -52,6 +54,10 @@ const ( // flagExplicitCollation marks that this value has an explicit collation flagExplicitCollation typeFlag = 1 << 10 + // flagAmbiguousType marks that the type of this value depends on the value at runtime + // and cannot be computed accurately + flagAmbiguousType typeFlag = 1 << 11 + // flagIntegerRange are the flags that mark overflow/underflow in integers flagIntegerRange = flagIntegerOvf | flagIntegerCap | flagIntegerUdf ) @@ -124,7 +130,35 @@ func evalIsTruthy(e eval) boolean { case *evalDecimal: return makeboolean(!e.dec.IsZero()) case *evalBytes: + if e.isHexLiteral { + hex, ok := e.toNumericHex() + if !ok { + // overflow + return makeboolean(true) + } + return makeboolean(hex.u != 0) + } return makeboolean(parseStringToFloat(e.string()) != 0.0) + case *evalJSON: + switch e.Type() { + case json.TypeNumber: + switch e.NumberType() { + case json.NumberTypeInteger: + if i, ok := e.Int64(); ok { + return makeboolean(i != 0) + } + + d, _ := e.Decimal() + return makeboolean(!d.IsZero()) + case json.NumberTypeDouble: + d, _ := e.Float64() + return makeboolean(d != 0.0) + default: + return makeboolean(parseStringToFloat(e.Raw()) != 0.0) + } + default: + return makeboolean(true) + } default: panic("unhandled case: evalIsTruthy") } diff --git a/go/vt/vtgate/evalengine/eval_bytes.go b/go/vt/vtgate/evalengine/eval_bytes.go index 8b000c6beae..eca4552ba74 100644 --- a/go/vt/vtgate/evalengine/eval_bytes.go +++ b/go/vt/vtgate/evalengine/eval_bytes.go @@ -49,6 +49,13 @@ func newEvalBytesHex(raw []byte) eval { return &evalBytes{tt: int16(sqltypes.VarBinary), isHexLiteral: true, col: collationBinary, bytes: raw} } +// newEvalBytesBit creates a new evalBytes for a bit literal. +// Turns out that a bit literal is not actually typed with +// sqltypes.Bit, but with sqltypes.VarBinary. +func newEvalBytesBit(raw []byte) eval { + return &evalBytes{tt: int16(sqltypes.VarBinary), isBitLiteral: true, col: collationBinary, bytes: raw} +} + func newEvalBinary(raw []byte) *evalBytes { return newEvalRaw(sqltypes.VarBinary, raw, collationBinary) } diff --git a/go/vt/vtgate/evalengine/eval_json.go b/go/vt/vtgate/evalengine/eval_json.go index 8275f241c70..4c51d7fd07b 100644 --- a/go/vt/vtgate/evalengine/eval_json.go +++ b/go/vt/vtgate/evalengine/eval_json.go @@ -18,7 +18,6 @@ package evalengine import ( "bytes" - "encoding/base64" "errors" "fmt" @@ -65,12 +64,10 @@ func intoJSONPath(e eval) (*json.Path, error) { } func evalConvert_bj(e *evalBytes) *evalJSON { - const prefix = "base64:type15:" - - dst := make([]byte, len(prefix)+mysqlBase64.EncodedLen(len(e.bytes))) - copy(dst, prefix) - base64.StdEncoding.Encode(dst[len(prefix):], e.bytes) - return json.NewString(dst) + if e.tt == int16(sqltypes.Bit) { + return json.NewBit(e.bytes) + } + return json.NewBlob(e.bytes) } func evalConvert_fj(e *evalFloat) *evalJSON { @@ -92,6 +89,15 @@ func evalConvert_nj(e evalNumeric) *evalJSON { } func evalConvert_cj(e *evalBytes) (*evalJSON, error) { + jsonText, err := charset.Convert(nil, charset.Charset_utf8mb4{}, e.bytes, e.col.Collation.Get().Charset()) + if err != nil { + return nil, err + } + var p json.Parser + return p.ParseBytes(jsonText) +} + +func evalConvertArg_cj(e *evalBytes) (*evalJSON, error) { jsonText, err := charset.Convert(nil, charset.Charset_utf8mb4{}, e.bytes, e.col.Collation.Get().Charset()) if err != nil { return nil, err @@ -99,6 +105,18 @@ func evalConvert_cj(e *evalBytes) (*evalJSON, error) { return json.NewString(jsonText), nil } +func evalConvert_dj(e *evalBytes) *evalJSON { + return json.NewDate(e.bytes) +} + +func evalConvert_dtj(e *evalBytes) *evalJSON { + return json.NewDateTime(e.bytes) +} + +func evalConvert_tj(e *evalBytes) *evalJSON { + return json.NewTime(e.bytes) +} + func evalToJSON(e eval) (*evalJSON, error) { switch e := e.(type) { case nil: @@ -110,7 +128,14 @@ func evalToJSON(e eval) (*evalJSON, error) { case evalNumeric: return evalConvert_nj(e), nil case *evalBytes: - if sqltypes.IsBinary(e.SQLType()) { + switch { + case e.SQLType() == sqltypes.Date: + return evalConvert_dj(e), nil + case e.SQLType() == sqltypes.Datetime, e.SQLType() == sqltypes.Timestamp: + return evalConvert_dtj(e), nil + case e.SQLType() == sqltypes.Time: + return evalConvert_tj(e), nil + case sqltypes.IsBinary(e.SQLType()): return evalConvert_bj(e), nil } return evalConvert_cj(e) @@ -118,3 +143,30 @@ func evalToJSON(e eval) (*evalJSON, error) { return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "Unsupported type conversion: %s AS JSON", e.SQLType()) } } + +func argToJSON(e eval) (*evalJSON, error) { + switch e := e.(type) { + case nil: + return json.ValueNull, nil + case *evalJSON: + return e, nil + case *evalFloat: + return evalConvert_fj(e), nil + case evalNumeric: + return evalConvert_nj(e), nil + case *evalBytes: + switch { + case e.SQLType() == sqltypes.Date: + return evalConvert_dj(e), nil + case e.SQLType() == sqltypes.Datetime, e.SQLType() == sqltypes.Timestamp: + return evalConvert_dtj(e), nil + case e.SQLType() == sqltypes.Time: + return evalConvert_tj(e), nil + case sqltypes.IsBinary(e.SQLType()): + return evalConvert_bj(e), nil + } + return evalConvertArg_cj(e) + default: + return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "Unsupported type conversion: %s AS JSON", e.SQLType()) + } +} diff --git a/go/vt/vtgate/evalengine/eval_numeric.go b/go/vt/vtgate/evalengine/eval_numeric.go index 4d4dc3ef133..9a5be2bcd4d 100644 --- a/go/vt/vtgate/evalengine/eval_numeric.go +++ b/go/vt/vtgate/evalengine/eval_numeric.go @@ -110,11 +110,27 @@ func evalToNumeric(e eval) evalNumeric { return &evalFloat{f: parseStringToFloat(e.string())} case *evalJSON: switch e.Type() { - case json.TypeTrue: - return newEvalBool(true) - case json.TypeFalse: - return newEvalBool(false) - case json.TypeNumber, json.TypeString: + case json.TypeBoolean: + if e == json.ValueTrue { + return &evalFloat{f: 1.0} + } + return &evalFloat{f: 0.0} + case json.TypeNumber: + switch e.NumberType() { + case json.NumberTypeInteger: + i, ok := e.Int64() + if ok { + return &evalInt64{i: i} + } + d, _ := e.Decimal() + return newEvalDecimalWithPrec(d, 0) + case json.NumberTypeDouble: + f, _ := e.Float64() + return &evalFloat{f: f} + default: + panic("unsupported") + } + case json.TypeString: return &evalFloat{f: parseStringToFloat(e.Raw())} default: return &evalFloat{f: 0} diff --git a/go/vt/vtgate/evalengine/expr.go b/go/vt/vtgate/evalengine/expr.go index 348234e5cf5..2c16d9a8948 100644 --- a/go/vt/vtgate/evalengine/expr.go +++ b/go/vt/vtgate/evalengine/expr.go @@ -18,13 +18,14 @@ package evalengine import ( "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( // Expr is the interface that all evaluating expressions must implement Expr interface { eval(env *ExpressionEnv) (eval, error) - typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) + typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) format(buf *formatter, depth int) constant() bool simplify(env *ExpressionEnv) error diff --git a/go/vt/vtgate/evalengine/expr_arithmetic.go b/go/vt/vtgate/evalengine/expr_arithmetic.go index a7c8e12ed4d..016392e2391 100644 --- a/go/vt/vtgate/evalengine/expr_arithmetic.go +++ b/go/vt/vtgate/evalengine/expr_arithmetic.go @@ -18,6 +18,7 @@ package evalengine import ( "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( @@ -35,10 +36,12 @@ type ( String() string } - opArithAdd struct{} - opArithSub struct{} - opArithMul struct{} - opArithDiv struct{} + opArithAdd struct{} + opArithSub struct{} + opArithMul struct{} + opArithDiv struct{} + opArithIntDiv struct{} + opArithMod struct{} ) var _ Expr = (*ArithmeticExpr)(nil) @@ -47,10 +50,17 @@ var _ opArith = (*opArithAdd)(nil) var _ opArith = (*opArithSub)(nil) var _ opArith = (*opArithMul)(nil) var _ opArith = (*opArithDiv)(nil) +var _ opArith = (*opArithIntDiv)(nil) +var _ opArith = (*opArithMod)(nil) func (b *ArithmeticExpr) eval(env *ExpressionEnv) (eval, error) { - left, right, err := b.arguments(env) - if left == nil || right == nil || err != nil { + left, err := b.Left.eval(env) + if left == nil || err != nil { + return nil, err + } + + right, err := b.Right.eval(env) + if right == nil || err != nil { return nil, err } return b.Op.eval(left, right) @@ -67,9 +77,9 @@ func makeNumericalType(t sqltypes.Type, f typeFlag) sqltypes.Type { } // typeof implements the Expr interface -func (b *ArithmeticExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - t1, f1 := b.Left.typeof(env) - t2, f2 := b.Right.typeof(env) +func (b *ArithmeticExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t1, f1 := b.Left.typeof(env, fields) + t2, f2 := b.Right.typeof(env, fields) flags := f1 | f2 t1 = makeNumericalType(t1, f1) @@ -78,9 +88,22 @@ func (b *ArithmeticExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { switch b.Op.(type) { case *opArithDiv: if t1 == sqltypes.Float64 || t2 == sqltypes.Float64 { - return sqltypes.Float64, flags + return sqltypes.Float64, flags | flagNullable + } + return sqltypes.Decimal, flags | flagNullable + case *opArithIntDiv: + if t1 == sqltypes.Uint64 || t2 == sqltypes.Uint64 { + return sqltypes.Uint64, flags | flagNullable + } + return sqltypes.Int64, flags | flagNullable + case *opArithMod: + if t1 == sqltypes.Float64 || t2 == sqltypes.Float64 { + return sqltypes.Float64, flags | flagNullable } - return sqltypes.Decimal, flags + if t1 == sqltypes.Decimal || t2 == sqltypes.Decimal { + return sqltypes.Decimal, flags | flagNullable + } + return t1, flags | flagNullable } switch t1 { @@ -122,6 +145,16 @@ func (op *opArithDiv) eval(left, right eval) (eval, error) { } func (op *opArithDiv) String() string { return "/" } +func (op *opArithIntDiv) eval(left, right eval) (eval, error) { + return integerDivideNumericWithError(left, right, true) +} +func (op *opArithIntDiv) String() string { return "DIV" } + +func (op *opArithMod) eval(left, right eval) (eval, error) { + return modNumericWithError(left, right, true) +} +func (op *opArithMod) String() string { return "DIV" } + func (n *NegateExpr) eval(env *ExpressionEnv) (eval, error) { e, err := n.Inner.eval(env) if err != nil { @@ -133,8 +166,8 @@ func (n *NegateExpr) eval(env *ExpressionEnv) (eval, error) { return evalToNumeric(e).negate(), nil } -func (n *NegateExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - tt, f := n.Inner.typeof(env) +func (n *NegateExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := n.Inner.typeof(env, fields) switch tt { case sqltypes.Uint8, sqltypes.Uint16, sqltypes.Uint32, sqltypes.Uint64: if f&flagIntegerOvf != 0 { diff --git a/go/vt/vtgate/evalengine/expr_bit.go b/go/vt/vtgate/evalengine/expr_bit.go index 1e68438b45f..d254578b4f4 100644 --- a/go/vt/vtgate/evalengine/expr_bit.go +++ b/go/vt/vtgate/evalengine/expr_bit.go @@ -18,6 +18,7 @@ package evalengine import ( "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" ) @@ -79,8 +80,8 @@ func (b *BitwiseNotExpr) eval(env *ExpressionEnv) (eval, error) { return newEvalUint64(^uint64(eu.i)), nil } -func (b *BitwiseNotExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - tt, f := b.Inner.typeof(env) +func (b *BitwiseNotExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := b.Inner.typeof(env, fields) if tt == sqltypes.VarBinary && f&(flagHex|flagBit) == 0 { return sqltypes.VarBinary, f } @@ -173,8 +174,13 @@ func (o opBitAnd) BitwiseOp() string { return "&" } var errBitwiseOperandsLength = vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "Binary operands of bitwise operators must be of equal length") func (bit *BitwiseExpr) eval(env *ExpressionEnv) (eval, error) { - l, r, err := bit.arguments(env) - if l == nil || r == nil || err != nil { + l, err := bit.Left.eval(env) + if l == nil || err != nil { + return nil, err + } + + r, err := bit.Right.eval(env) + if r == nil || err != nil { return nil, err } @@ -225,9 +231,9 @@ func (bit *BitwiseExpr) eval(env *ExpressionEnv) (eval, error) { } } -func (bit *BitwiseExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - t1, f1 := bit.Left.typeof(env) - t2, f2 := bit.Right.typeof(env) +func (bit *BitwiseExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t1, f1 := bit.Left.typeof(env, fields) + t2, f2 := bit.Right.typeof(env, fields) switch bit.Op.(type) { case opBitBinary: diff --git a/go/vt/vtgate/evalengine/expr_bvar.go b/go/vt/vtgate/evalengine/expr_bvar.go index 01c60dfc53f..648c89ebdfc 100644 --- a/go/vt/vtgate/evalengine/expr_bvar.go +++ b/go/vt/vtgate/evalengine/expr_bvar.go @@ -26,33 +26,33 @@ import ( type ( BindVariable struct { - Key string - col collations.TypedCollation - coerce sqltypes.Type - tuple bool + Key string + Type sqltypes.Type + Collation collations.TypedCollation + typed bool } ) var _ Expr = (*BindVariable)(nil) -func (bv *BindVariable) bvar(env *ExpressionEnv) (*querypb.BindVariable, error) { - val, ok := env.BindVars[bv.Key] +func (env *ExpressionEnv) lookupBindVar(key string) (*querypb.BindVariable, error) { + val, ok := env.BindVars[key] if !ok { - return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "query arguments missing for %s", bv.Key) + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "query arguments missing for %s", key) } return val, nil } // eval implements the Expr interface func (bv *BindVariable) eval(env *ExpressionEnv) (eval, error) { - bvar, err := bv.bvar(env) + bvar, err := env.lookupBindVar(bv.Key) if err != nil { return nil, err } switch bvar.Type { case sqltypes.Tuple: - if !bv.tuple { + if bv.Type != sqltypes.Tuple { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "query argument '%s' cannot be a tuple", bv.Key) } @@ -67,32 +67,33 @@ func (bv *BindVariable) eval(env *ExpressionEnv) (eval, error) { return &evalTuple{t: tuple}, nil default: - typ := bvar.Type - if bv.coerce >= 0 { - typ = bv.coerce + if bv.Type == sqltypes.Tuple { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "query argument '%s' must be a tuple (is %s)", bv.Key, bvar.Type) } - if bv.tuple { - return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "query argument '%s' must be a tuple (is %s)", bv.Key, typ) + typ := bvar.Type + if bv.typed { + typ = bv.Type } - return valueToEval(sqltypes.MakeTrusted(typ, bvar.Value), bv.col) + return valueToEval(sqltypes.MakeTrusted(typ, bvar.Value), bv.Collation) } } // typeof implements the Expr interface -func (bv *BindVariable) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - bvar, err := bv.bvar(env) - if err != nil { - return sqltypes.Null, flagNull | flagNullable +func (bv *BindVariable) typeof(env *ExpressionEnv, _ []*querypb.Field) (sqltypes.Type, typeFlag) { + var tt sqltypes.Type + if bv.typed { + tt = bv.Type + } else { + if bvar, err := env.lookupBindVar(bv.Key); err == nil { + tt = bvar.Type + } } - switch bvar.Type { + switch tt { case sqltypes.Null: return sqltypes.Null, flagNull | flagNullable case sqltypes.HexNum, sqltypes.HexVal: return sqltypes.VarBinary, flagHex default: - if bv.coerce >= 0 { - return bv.coerce, 0 - } - return bvar.Type, 0 + return tt, 0 } } diff --git a/go/vt/vtgate/evalengine/expr_collate.go b/go/vt/vtgate/evalengine/expr_collate.go index 55095844afe..146ff1e27f2 100644 --- a/go/vt/vtgate/evalengine/expr_collate.go +++ b/go/vt/vtgate/evalengine/expr_collate.go @@ -17,13 +17,10 @@ limitations under the License. package evalengine import ( - "strconv" - "strings" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" - "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" ) @@ -78,45 +75,11 @@ func (c *CollateExpr) eval(env *ExpressionEnv) (eval, error) { } } -func (c *CollateExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - t, f := c.Inner.typeof(env) +func (c *CollateExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t, f := c.Inner.typeof(env, fields) return t, f | flagExplicitCollation } -type LookupDefaultCollation collations.ID - -func (d LookupDefaultCollation) ColumnLookup(_ *sqlparser.ColName) (int, error) { - return 0, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "column access not supported here") -} - -func (d LookupDefaultCollation) CollationForExpr(_ sqlparser.Expr) collations.ID { - return collations.Unknown -} - -func (d LookupDefaultCollation) DefaultCollation() collations.ID { - return collations.ID(d) -} - -type LookupIntegrationTest struct { - Collation collations.ID -} - -func (*LookupIntegrationTest) ColumnLookup(name *sqlparser.ColName) (int, error) { - n := name.CompliantName() - if strings.HasPrefix(n, "column") { - return strconv.Atoi(n[len("column"):]) - } - return 0, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unknown column: %q", n) -} - -func (tl *LookupIntegrationTest) CollationForExpr(_ sqlparser.Expr) collations.ID { - return tl.Collation -} - -func (tl *LookupIntegrationTest) DefaultCollation() collations.ID { - return tl.Collation -} - func evalCollation(e eval) collations.TypedCollation { switch e := e.(type) { case nil: diff --git a/go/vt/vtgate/evalengine/expr_column.go b/go/vt/vtgate/evalengine/expr_column.go index d8d220d33aa..e086c6f4943 100644 --- a/go/vt/vtgate/evalengine/expr_column.go +++ b/go/vt/vtgate/evalengine/expr_column.go @@ -19,12 +19,15 @@ package evalengine import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( Column struct { - Offset int - coll collations.TypedCollation + Offset int + Type sqltypes.Type + Collation collations.TypedCollation + typed bool } ) @@ -32,11 +35,11 @@ var _ Expr = (*Column)(nil) // eval implements the Expr interface func (c *Column) eval(env *ExpressionEnv) (eval, error) { - return valueToEval(env.Row[c.Offset], c.coll) + return valueToEval(env.Row[c.Offset], c.Collation) } -func (c *Column) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - // we'll try to do the best possible with the information we have +func (c *Column) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + // if we have an active row in the expression Env, use that as an authoritative source if c.Offset < len(env.Row) { value := env.Row[c.Offset] if value.IsNull() { @@ -44,10 +47,15 @@ func (c *Column) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { } return value.Type(), typeFlag(0) } - - if c.Offset < len(env.Fields) { - return env.Fields[c.Offset].Type, flagNullable + if c.Offset < len(fields) { + var f typeFlag + if fields[c.Offset].Flags&uint32(querypb.MySqlFlag_NOT_NULL_FLAG) == 0 { + f |= flagNullable + } + return fields[c.Offset].Type, f } - - panic("Column missing both data and field") + if c.typed { + return c.Type, flagNullable + } + return sqltypes.Null, flagAmbiguousType } diff --git a/go/vt/vtgate/evalengine/expr_compare.go b/go/vt/vtgate/evalengine/expr_compare.go index a401ddd940d..5ec24fba874 100644 --- a/go/vt/vtgate/evalengine/expr_compare.go +++ b/go/vt/vtgate/evalengine/expr_compare.go @@ -19,9 +19,9 @@ package evalengine import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vthash" ) type ( @@ -45,7 +45,6 @@ type ( InExpr struct { BinaryExpr Negate bool - Hashed map[vthash.Hash]int } ComparisonOp interface { @@ -158,6 +157,10 @@ func compareAsTuples(left, right eval) (*evalTuple, *evalTuple, bool) { return nil, nil, false } +func compareAsJSON(l, r sqltypes.Type) bool { + return l == sqltypes.TypeJSON || r == sqltypes.TypeJSON +} + func evalCompareNullSafe(lVal, rVal eval) (bool, error) { if lVal == nil || rVal == nil { return lVal == rVal, nil @@ -224,6 +227,8 @@ func evalCompare(left, right eval) (comp int, err error) { // - select 1 where 2021210101 = cast("2021-01-01" as date) // - select 1 where 104200 = cast("10:42:00" as time) return 0, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot compare a date with a numeric value") + case compareAsJSON(lt, rt): + return compareJSON(left, right) case lt == sqltypes.Tuple || rt == sqltypes.Tuple: return 0, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "BUG: evalCompare: tuple comparison should be handled early") default: @@ -258,10 +263,21 @@ func evalCompareTuplesNullSafe(left, right []eval) (bool, error) { // eval implements the Expr interface func (c *ComparisonExpr) eval(env *ExpressionEnv) (eval, error) { - left, right, err := c.arguments(env) + left, err := c.Left.eval(env) if err != nil { return nil, err } + if _, ok := c.Op.(compareNullSafeEQ); !ok && left == nil { + return nil, nil + } + right, err := c.Right.eval(env) + if err != nil { + return nil, err + } + + if _, ok := c.Op.(compareNullSafeEQ); !ok && right == nil { + return nil, nil + } cmp, err := c.Op.compare(left, right) if err != nil { return nil, err @@ -270,74 +286,66 @@ func (c *ComparisonExpr) eval(env *ExpressionEnv) (eval, error) { } // typeof implements the Expr interface -func (c *ComparisonExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f1 := c.Left.typeof(env) - _, f2 := c.Right.typeof(env) +func (c *ComparisonExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f1 := c.Left.typeof(env, fields) + _, f2 := c.Right.typeof(env, fields) return sqltypes.Int64, f1 | f2 } -// eval implements the ComparisonOp interface -func (i *InExpr) eval(env *ExpressionEnv) (eval, error) { - left, right, err := i.arguments(env) - if err != nil { - return nil, err - } - rtuple, ok := right.(*evalTuple) - if !ok { - return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "rhs of an In operation should be a tuple") - } - if left == nil { - return nil, nil +func evalInExpr(lhs eval, rhs *evalTuple) (boolean, error) { + if lhs == nil { + return boolNULL, nil } var foundNull, found bool - var hasher = vthash.New() - if i.Hashed != nil { - if left, ok := left.(hashable); ok { - left.Hash(&hasher) - - hash := hasher.Sum128() - hasher.Reset() - - if idx, ok := i.Hashed[hash]; ok { - var numeric int - numeric, foundNull, err = evalCompareAll(left, rtuple.t[idx], true) - if err != nil { - return nil, err - } - found = numeric == 0 - } + for _, rtuple := range rhs.t { + numeric, isNull, err := evalCompareAll(lhs, rtuple, true) + if err != nil { + return boolNULL, err } - } else { - for _, rtuple := range rtuple.t { - numeric, isNull, err := evalCompareAll(left, rtuple, true) - if err != nil { - return nil, err - } - if isNull { - foundNull = true - continue - } - if numeric == 0 { - found = true - break - } + if isNull { + foundNull = true + continue + } + if numeric == 0 { + found = true + break } } switch { case found: - return newEvalBool(!i.Negate), nil + return boolTrue, nil case foundNull: - return nil, nil + return boolNULL, nil default: - return newEvalBool(i.Negate), nil + return boolFalse, nil + } +} + +// eval implements the ComparisonOp interface +func (i *InExpr) eval(env *ExpressionEnv) (eval, error) { + left, right, err := i.arguments(env) + if err != nil { + return nil, err + } + rtuple, ok := right.(*evalTuple) + if !ok { + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "rhs of an In operation should be a tuple") + } + in, err := evalInExpr(left, rtuple) + if err != nil { + return nil, err + } + if i.Negate { + in = in.not() } + return in.eval(), nil } -func (i *InExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f1 := i.Left.typeof(env) - _, f2 := i.Right.typeof(env) +func (i *InExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f1 := i.Left.typeof(env, fields) + _, f2 := i.Right.typeof(env, fields) return sqltypes.Int64, f1 | f2 } @@ -377,8 +385,8 @@ func (l *LikeExpr) eval(env *ExpressionEnv) (eval, error) { } // typeof implements the ComparisonOp interface -func (l *LikeExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f1 := l.Left.typeof(env) - _, f2 := l.Right.typeof(env) +func (l *LikeExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f1 := l.Left.typeof(env, fields) + _, f2 := l.Right.typeof(env, fields) return sqltypes.Int64, f1 | f2 } diff --git a/go/vt/vtgate/evalengine/expr_convert.go b/go/vt/vtgate/evalengine/expr_convert.go index 8c06a68a595..7acabd952ae 100644 --- a/go/vt/vtgate/evalengine/expr_convert.go +++ b/go/vt/vtgate/evalengine/expr_convert.go @@ -19,6 +19,7 @@ package evalengine import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" ) @@ -125,8 +126,8 @@ func (c *ConvertExpr) eval(env *ExpressionEnv) (eval, error) { } } -func (c *ConvertExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - tt, f := c.Inner.typeof(env) +func (c *ConvertExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := c.Inner.typeof(env, fields) switch c.Type { case "BINARY": @@ -192,7 +193,7 @@ func (c *ConvertUsingExpr) eval(env *ExpressionEnv) (eval, error) { return e, nil } -func (c *ConvertUsingExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := c.Inner.typeof(env) +func (c *ConvertUsingExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := c.Inner.typeof(env, fields) return sqltypes.VarChar, f | flagNullable } diff --git a/go/vt/vtgate/evalengine/expr_env.go b/go/vt/vtgate/evalengine/expr_env.go index bcefe10f81b..26761cff941 100644 --- a/go/vt/vtgate/evalengine/expr_env.go +++ b/go/vt/vtgate/evalengine/expr_env.go @@ -17,7 +17,8 @@ limitations under the License. package evalengine import ( - "vitess.io/vitess/go/mysql/collations" + "errors" + "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" ) @@ -26,45 +27,37 @@ type ( // ExpressionEnv contains the environment that the expression // evaluates in, such as the current row and bindvars ExpressionEnv struct { - BindVars map[string]*querypb.BindVariable - DefaultCollation collations.ID + vm vmstate - // Row and Fields should line up - Row []sqltypes.Value - Fields []*querypb.Field + BindVars map[string]*querypb.BindVariable + Row []sqltypes.Value } ) func (env *ExpressionEnv) Evaluate(expr Expr) (EvalResult, error) { - if env == nil { - panic("ExpressionEnv == nil") + if p, ok := expr.(*CompiledExpr); ok { + return env.EvaluateVM(p) } e, err := expr.eval(env) return EvalResult{e}, err } -func (env *ExpressionEnv) TypeOf(expr Expr) (ty sqltypes.Type, err error) { - ty, _ = expr.typeof(env) - return -} +var ErrAmbiguousType = errors.New("the type of this expression cannot be statically computed") -func (env *ExpressionEnv) collation() collations.TypedCollation { - return collations.TypedCollation{ - Collation: env.DefaultCollation, - Coercibility: collations.CoerceCoercible, - Repertoire: collations.RepertoireASCII, +func (env *ExpressionEnv) TypeOf(expr Expr, fields []*querypb.Field) (sqltypes.Type, error) { + ty, f := expr.typeof(env, fields) + if f&flagAmbiguousType != 0 { + return ty, ErrAmbiguousType } + return ty, nil } // EmptyExpressionEnv returns a new ExpressionEnv with no bind vars or row func EmptyExpressionEnv() *ExpressionEnv { - return EnvWithBindVars(map[string]*querypb.BindVariable{}, collations.Unknown) + return EnvWithBindVars(map[string]*querypb.BindVariable{}) } // EnvWithBindVars returns an expression environment with no current row, but with bindvars -func EnvWithBindVars(bindVars map[string]*querypb.BindVariable, coll collations.ID) *ExpressionEnv { - if coll == collations.Unknown { - coll = collations.Default() - } - return &ExpressionEnv{BindVars: bindVars, DefaultCollation: coll} +func EnvWithBindVars(bindVars map[string]*querypb.BindVariable) *ExpressionEnv { + return &ExpressionEnv{BindVars: bindVars} } diff --git a/go/vt/vtgate/evalengine/expr_literal.go b/go/vt/vtgate/evalengine/expr_literal.go index 7a6867704c6..826281c3378 100644 --- a/go/vt/vtgate/evalengine/expr_literal.go +++ b/go/vt/vtgate/evalengine/expr_literal.go @@ -20,6 +20,7 @@ import ( "math" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( @@ -36,7 +37,7 @@ func (l *Literal) eval(_ *ExpressionEnv) (eval, error) { } // typeof implements the Expr interface -func (l *Literal) typeof(*ExpressionEnv) (sqltypes.Type, typeFlag) { +func (l *Literal) typeof(*ExpressionEnv, []*querypb.Field) (sqltypes.Type, typeFlag) { var f typeFlag switch e := l.inner.(type) { case nil: @@ -52,6 +53,9 @@ func (l *Literal) typeof(*ExpressionEnv) (sqltypes.Type, typeFlag) { if e.i == math.MinInt64 { f |= flagIntegerUdf } + if e == evalBoolTrue || e == evalBoolFalse { + f |= flagIsBoolean + } case *evalUint64: if e.hexLiteral { f |= flagHex diff --git a/go/vt/vtgate/evalengine/expr_logical.go b/go/vt/vtgate/evalengine/expr_logical.go index 79ed6b97d90..4746db58433 100644 --- a/go/vt/vtgate/evalengine/expr_logical.go +++ b/go/vt/vtgate/evalengine/expr_logical.go @@ -19,13 +19,14 @@ package evalengine import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" ) type ( LogicalExpr struct { BinaryExpr - op func(left, right boolean) boolean + op func(left, right Expr, env *ExpressionEnv) (boolean, error) opname string } @@ -100,55 +101,100 @@ func (left boolean) not() boolean { } } -func (left boolean) and(right boolean) boolean { +func opAnd(le, re Expr, env *ExpressionEnv) (boolean, error) { // Logical AND. // Evaluates to 1 if all operands are nonzero and not NULL, to 0 if one or more operands are 0, otherwise NULL is returned. + l, err := le.eval(env) + if err != nil { + return boolNULL, err + } + + left := evalIsTruthy(l) + if left == boolFalse { + return boolFalse, nil + } + + r, err := re.eval(env) + if err != nil { + return boolNULL, err + } + right := evalIsTruthy(r) + switch { case left == boolTrue && right == boolTrue: - return boolTrue - case left == boolFalse || right == boolFalse: - return boolFalse + return boolTrue, nil + case right == boolFalse: + return boolFalse, nil default: - return boolNULL + return boolNULL, nil } } -func (left boolean) or(right boolean) boolean { +func opOr(le, re Expr, env *ExpressionEnv) (boolean, error) { // Logical OR. When both operands are non-NULL, the result is 1 if any operand is nonzero, and 0 otherwise. // With a NULL operand, the result is 1 if the other operand is nonzero, and NULL otherwise. // If both operands are NULL, the result is NULL. + l, err := le.eval(env) + if err != nil { + return boolNULL, err + } + + left := evalIsTruthy(l) + if left == boolTrue { + return boolTrue, nil + } + + r, err := re.eval(env) + if err != nil { + return boolNULL, err + } + right := evalIsTruthy(r) + switch { case left == boolNULL: if right == boolTrue { - return boolTrue + return boolTrue, nil } - return boolNULL + return boolNULL, nil case right == boolNULL: - if left == boolTrue { - return boolTrue - } - return boolNULL + return boolNULL, nil default: - if left == boolTrue || right == boolTrue { - return boolTrue + if right == boolTrue { + return boolTrue, nil } - return boolFalse + return boolFalse, nil } } -func (left boolean) xor(right boolean) boolean { +func opXor(le, re Expr, env *ExpressionEnv) (boolean, error) { // Logical XOR. Returns NULL if either operand is NULL. // For non-NULL operands, evaluates to 1 if an odd number of operands is nonzero, otherwise 0 is returned. + l, err := le.eval(env) + if err != nil { + return boolNULL, err + } + + left := evalIsTruthy(l) + if left == boolNULL { + return boolNULL, nil + } + + r, err := re.eval(env) + if err != nil { + return boolNULL, err + } + right := evalIsTruthy(r) + switch { case left == boolNULL || right == boolNULL: - return boolNULL + return boolNULL, nil default: if left != right { - return boolTrue + return boolTrue, nil } - return boolFalse + return boolFalse, nil } } @@ -160,23 +206,20 @@ func (n *NotExpr) eval(env *ExpressionEnv) (eval, error) { return evalIsTruthy(e).not().eval(), nil } -func (n *NotExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, flags := n.Inner.typeof(env) - return sqltypes.Uint64, flags +func (n *NotExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, flags := n.Inner.typeof(env, fields) + return sqltypes.Int64, flags | flagIsBoolean } func (l *LogicalExpr) eval(env *ExpressionEnv) (eval, error) { - left, right, err := l.arguments(env) - if err != nil { - return nil, err - } - return l.op(evalIsTruthy(left), evalIsTruthy(right)).eval(), nil + res, err := l.op(l.Left, l.Right, env) + return res.eval(), err } -func (l *LogicalExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f1 := l.Left.typeof(env) - _, f2 := l.Right.typeof(env) - return sqltypes.Uint64, f1 | f2 +func (l *LogicalExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f1 := l.Left.typeof(env, fields) + _, f2 := l.Right.typeof(env, fields) + return sqltypes.Int64, f1 | f2 | flagIsBoolean } func (i *IsExpr) eval(env *ExpressionEnv) (eval, error) { @@ -187,7 +230,7 @@ func (i *IsExpr) eval(env *ExpressionEnv) (eval, error) { return newEvalBool(i.Check(e)), nil } -func (i *IsExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (i *IsExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { return sqltypes.Int64, 0 } @@ -238,21 +281,21 @@ func (c *CaseExpr) eval(env *ExpressionEnv) (eval, error) { if !matched { return nil, nil } - t, _ := c.typeof(env) + t, _ := c.typeof(env, nil) return evalCoerce(result, t, ca.result().Collation) } -func (c *CaseExpr) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (c *CaseExpr) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { var ta typeAggregation var resultFlag typeFlag for _, whenthen := range c.cases { - t, f := whenthen.then.typeof(env) + t, f := whenthen.then.typeof(env, fields) ta.add(t, f) resultFlag = resultFlag | f } if c.Else != nil { - t, f := c.Else.typeof(env) + t, f := c.Else.typeof(env, fields) ta.add(t, f) resultFlag = f } diff --git a/go/vt/vtgate/evalengine/expr_tuple.go b/go/vt/vtgate/evalengine/expr_tuple.go index 5cfbe845c26..1d45642619a 100644 --- a/go/vt/vtgate/evalengine/expr_tuple.go +++ b/go/vt/vtgate/evalengine/expr_tuple.go @@ -16,7 +16,10 @@ limitations under the License. package evalengine -import "vitess.io/vitess/go/sqltypes" +import ( + "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" +) type ( TupleExpr []Expr @@ -37,6 +40,6 @@ func (t TupleExpr) eval(env *ExpressionEnv) (eval, error) { } // typeof implements the Expr interface -func (t TupleExpr) typeof(*ExpressionEnv) (sqltypes.Type, typeFlag) { +func (t TupleExpr) typeof(*ExpressionEnv, []*querypb.Field) (sqltypes.Type, typeFlag) { return sqltypes.Tuple, flagNullable } diff --git a/go/vt/vtgate/evalengine/fn_base64.go b/go/vt/vtgate/evalengine/fn_base64.go index 7cdc2bafe98..04cf1e022ef 100644 --- a/go/vt/vtgate/evalengine/fn_base64.go +++ b/go/vt/vtgate/evalengine/fn_base64.go @@ -19,12 +19,15 @@ package evalengine import ( "encoding/base64" + "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( builtinToBase64 struct { CallExpr + collate collations.ID } builtinFromBase64 struct { @@ -35,7 +38,35 @@ type ( var _ Expr = (*builtinToBase64)(nil) var _ Expr = (*builtinFromBase64)(nil) -var mysqlBase64 = base64.StdEncoding +// MySQL wraps every 76 characters with a newline. That maps +// to a 57 byte input. So we encode here in blocks of 57 bytes +// with then each a newline. +var mysqlBase64OutLineLength = 76 +var mysqlBase64InLineLength = (mysqlBase64OutLineLength / 4) * 3 + +func mysqlBase64Encode(in []byte) []byte { + newlines := len(in) / mysqlBase64InLineLength + encoded := make([]byte, base64.StdEncoding.EncodedLen(len(in))+newlines) + out := encoded + for len(in) > mysqlBase64InLineLength { + base64.StdEncoding.Encode(out, in[:mysqlBase64InLineLength]) + in = in[mysqlBase64InLineLength:] + out[mysqlBase64OutLineLength] = '\n' + out = out[mysqlBase64OutLineLength+1:] + } + base64.StdEncoding.Encode(out, in) + return encoded +} + +func mysqlBase64Decode(in []byte) ([]byte, error) { + decoded := make([]byte, base64.StdEncoding.DecodedLen(len(in))) + + n, err := base64.StdEncoding.Decode(decoded, in) + if err != nil { + return nil, err + } + return decoded[:n], nil +} func (call *builtinToBase64) eval(env *ExpressionEnv) (eval, error) { arg, err := call.arg1(env) @@ -47,17 +78,16 @@ func (call *builtinToBase64) eval(env *ExpressionEnv) (eval, error) { } b := evalToBinary(arg) - encoded := make([]byte, mysqlBase64.EncodedLen(len(b.bytes))) - mysqlBase64.Encode(encoded, b.bytes) + encoded := mysqlBase64Encode(b.bytes) if arg.SQLType() == sqltypes.Blob || arg.SQLType() == sqltypes.TypeJSON { - return newEvalRaw(sqltypes.Text, encoded, env.collation()), nil + return newEvalRaw(sqltypes.Text, encoded, defaultCoercionCollation(call.collate)), nil } - return newEvalText(encoded, env.collation()), nil + return newEvalText(encoded, defaultCoercionCollation(call.collate)), nil } -func (call *builtinToBase64) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - tt, f := call.Arguments[0].typeof(env) +func (call *builtinToBase64) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := call.Arguments[0].typeof(env, fields) if tt == sqltypes.Blob || tt == sqltypes.TypeJSON { return sqltypes.Text, f } @@ -74,14 +104,20 @@ func (call *builtinFromBase64) eval(env *ExpressionEnv) (eval, error) { } b := evalToBinary(arg) - decoded := make([]byte, mysqlBase64.DecodedLen(len(b.bytes))) - if n, err := mysqlBase64.Decode(decoded, b.bytes); err == nil { - return newEvalBinary(decoded[:n]), nil + decoded, err := mysqlBase64Decode(b.bytes) + if err != nil { + return nil, nil + } + if arg.SQLType() == sqltypes.Text || arg.SQLType() == sqltypes.TypeJSON { + return newEvalRaw(sqltypes.Blob, decoded, collationBinary), nil } - return nil, nil + return newEvalBinary(decoded), nil } -func (call *builtinFromBase64) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinFromBase64) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := call.Arguments[0].typeof(env, fields) + if tt == sqltypes.Text || tt == sqltypes.TypeJSON { + return sqltypes.Blob, f | flagNullable + } return sqltypes.VarBinary, f | flagNullable } diff --git a/go/vt/vtgate/evalengine/fn_bit.go b/go/vt/vtgate/evalengine/fn_bit.go index c6d7e9a5995..9deacfbd3a0 100644 --- a/go/vt/vtgate/evalengine/fn_bit.go +++ b/go/vt/vtgate/evalengine/fn_bit.go @@ -20,6 +20,7 @@ import ( "math/bits" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type builtinBitCount struct { @@ -50,8 +51,8 @@ func (call *builtinBitCount) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(count)), nil } -func (call *builtinBitCount) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinBitCount) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) // The MySQL docs are actually wrong and this returns an int64, not a uint64. return sqltypes.Int64, f } diff --git a/go/vt/vtgate/evalengine/fn_compare.go b/go/vt/vtgate/evalengine/fn_compare.go index 450f7a654e5..7358d402cca 100644 --- a/go/vt/vtgate/evalengine/fn_compare.go +++ b/go/vt/vtgate/evalengine/fn_compare.go @@ -22,6 +22,7 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/mysql/collations/charset" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type ( @@ -53,10 +54,10 @@ func (b *builtinCoalesce) eval(env *ExpressionEnv) (eval, error) { return nil, nil } -func (b *builtinCoalesce) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (b *builtinCoalesce) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { var ta typeAggregation for _, arg := range b.Arguments { - tt, f := arg.typeof(env) + tt, f := arg.typeof(env, fields) ta.add(tt, f) } return ta.result(), flagNullable @@ -254,7 +255,7 @@ func (call *builtinMultiComparison) eval(env *ExpressionEnv) (eval, error) { return getMultiComparisonFunc(args)(args, call.cmp) } -func (call *builtinMultiComparison) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (call *builtinMultiComparison) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { var ( integersI int integersU int @@ -266,7 +267,7 @@ func (call *builtinMultiComparison) typeof(env *ExpressionEnv) (sqltypes.Type, t ) for _, expr := range call.Arguments { - tt, f := expr.typeof(env) + tt, f := expr.typeof(env, fields) flags |= f switch tt { diff --git a/go/vt/vtgate/evalengine/fn_hex.go b/go/vt/vtgate/evalengine/fn_hex.go index ce91f0234e1..80bf012d749 100644 --- a/go/vt/vtgate/evalengine/fn_hex.go +++ b/go/vt/vtgate/evalengine/fn_hex.go @@ -19,11 +19,14 @@ package evalengine import ( "math/bits" + "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" ) type builtinHex struct { CallExpr + collate collations.ID } var _ Expr = (*builtinHex)(nil) @@ -47,13 +50,13 @@ func (call *builtinHex) eval(env *ExpressionEnv) (eval, error) { encoded = hexEncodeBytes(arg.ToRawBytes()) } if arg.SQLType() == sqltypes.Blob || arg.SQLType() == sqltypes.TypeJSON { - return newEvalRaw(sqltypes.Text, encoded, env.collation()), nil + return newEvalRaw(sqltypes.Text, encoded, defaultCoercionCollation(call.collate)), nil } - return newEvalText(encoded, env.collation()), nil + return newEvalText(encoded, defaultCoercionCollation(call.collate)), nil } -func (call *builtinHex) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - tt, f := call.Arguments[0].typeof(env) +func (call *builtinHex) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + tt, f := call.Arguments[0].typeof(env, fields) if tt == sqltypes.Blob || tt == sqltypes.TypeJSON { return sqltypes.Text, f } diff --git a/go/vt/vtgate/evalengine/fn_json.go b/go/vt/vtgate/evalengine/fn_json.go index 2107e4adaeb..b3ec93dc0bd 100644 --- a/go/vt/vtgate/evalengine/fn_json.go +++ b/go/vt/vtgate/evalengine/fn_json.go @@ -19,6 +19,7 @@ package evalengine import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine/internal/json" @@ -118,8 +119,8 @@ func builtin_JSON_EXTRACT(doc *json.Value, paths []eval) (eval, error) { return json.NewArray(matches), nil } -func (call *builtinJSONExtract) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONExtract) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.TypeJSON, f } @@ -141,11 +142,13 @@ func (call *builtinJSONUnquote) eval(env *ExpressionEnv) (eval, error) { return newEvalRaw(sqltypes.Blob, j.MarshalTo(nil), collationJSON), nil } -func (call *builtinJSONUnquote) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONUnquote) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Blob, f } +var errJSONKeyIsNil = vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "JSON documents may not contain NULL member names.") + func (call *builtinJSONObject) eval(env *ExpressionEnv) (eval, error) { j := json.NewObject() obj, _ := j.Object() @@ -156,7 +159,7 @@ func (call *builtinJSONObject) eval(env *ExpressionEnv) (eval, error) { return nil, err } if key == nil { - return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "JSON documents may not contain NULL member names.") + return nil, errJSONKeyIsNil } key1, err := evalToVarchar(key, collations.CollationUtf8mb4ID, true) if err != nil { @@ -167,7 +170,7 @@ func (call *builtinJSONObject) eval(env *ExpressionEnv) (eval, error) { if err != nil { return nil, err } - val1, err := evalToJSON(val) + val1, err := argToJSON(val) if err != nil { return nil, err } @@ -177,7 +180,7 @@ func (call *builtinJSONObject) eval(env *ExpressionEnv) (eval, error) { return j, nil } -func (call *builtinJSONObject) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (call *builtinJSONObject) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { return sqltypes.TypeJSON, 0 } @@ -188,7 +191,7 @@ func (call *builtinJSONArray) eval(env *ExpressionEnv) (eval, error) { if err != nil { return nil, err } - arg1, err := evalToJSON(arg) + arg1, err := argToJSON(arg) if err != nil { return nil, err } @@ -197,7 +200,7 @@ func (call *builtinJSONArray) eval(env *ExpressionEnv) (eval, error) { return json.NewArray(ary), nil } -func (call *builtinJSONArray) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (call *builtinJSONArray) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { return sqltypes.TypeJSON, 0 } @@ -216,8 +219,8 @@ func (call *builtinJSONDepth) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(j.Depth())), nil } -func (call *builtinJSONDepth) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONDepth) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -259,8 +262,8 @@ func (call *builtinJSONLength) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(length)), nil } -func (call *builtinJSONLength) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONLength) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -336,8 +339,8 @@ func errOneOrAll(fname string) error { return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "The oneOrAll argument to %s may take these values: 'one' or 'all'.", fname) } -func (call *builtinJSONContainsPath) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONContainsPath) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -388,7 +391,7 @@ func (call *builtinJSONKeys) eval(env *ExpressionEnv) (eval, error) { return json.NewArray(keys), nil } -func (call *builtinJSONKeys) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinJSONKeys) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.TypeJSON, f | flagNullable } diff --git a/go/vt/vtgate/evalengine/fn_numeric.go b/go/vt/vtgate/evalengine/fn_numeric.go index 3c157f9bc89..efa95263b7d 100644 --- a/go/vt/vtgate/evalengine/fn_numeric.go +++ b/go/vt/vtgate/evalengine/fn_numeric.go @@ -20,6 +20,9 @@ import ( "math" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" ) type builtinCeil struct { @@ -54,13 +57,364 @@ func (call *builtinCeil) eval(env *ExpressionEnv) (eval, error) { } } -func (call *builtinCeil) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - t, f := call.Arguments[0].typeof(env) - if sqltypes.IsIntegral(t) { +func (call *builtinCeil) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t, f := call.Arguments[0].typeof(env, fields) + if sqltypes.IsSigned(t) { return sqltypes.Int64, f + } else if sqltypes.IsUnsigned(t) { + return sqltypes.Uint64, f } else if sqltypes.Decimal == t { - return sqltypes.Decimal, f + return sqltypes.Int64, f | flagAmbiguousType } else { return sqltypes.Float64, f } } + +type builtinFloor struct { + CallExpr +} + +var _ Expr = (*builtinFloor)(nil) + +func (call *builtinFloor) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + switch num := arg.(type) { + case *evalInt64, *evalUint64: + return num, nil + case *evalDecimal: + dec := num.dec + dec = dec.Floor() + intnum, isfit := dec.Int64() + if isfit { + return newEvalInt64(intnum), nil + } + return newEvalDecimalWithPrec(dec, 0), nil + default: + f, _ := evalToNumeric(num).toFloat() + return newEvalFloat(math.Floor(f.f)), nil + } +} + +func (call *builtinFloor) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t, f := call.Arguments[0].typeof(env, fields) + if sqltypes.IsSigned(t) { + return sqltypes.Int64, f + } else if sqltypes.IsUnsigned(t) { + return sqltypes.Uint64, f + } else if sqltypes.Decimal == t { + return sqltypes.Int64, f | flagAmbiguousType + } else { + return sqltypes.Float64, f + } +} + +type builtinAbs struct { + CallExpr +} + +var _ Expr = (*builtinAbs)(nil) + +func (call *builtinAbs) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + switch num := arg.(type) { + case *evalUint64: + return num, nil + case *evalInt64: + if num.i < 0 { + if num.i == math.MinInt64 { + return nil, vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.DataOutOfRange, "BIGINT value is out of range") + } + return newEvalInt64(-num.i), nil + } + return num, nil + case *evalDecimal: + return newEvalDecimalWithPrec(num.dec.Abs(), num.length), nil + default: + f, _ := evalToNumeric(num).toFloat() + return newEvalFloat(math.Abs(f.f)), nil + } +} + +func (call *builtinAbs) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + t, f := call.Arguments[0].typeof(env, fields) + if sqltypes.IsNumber(t) { + return t, f + } else { + return sqltypes.Float64, f + } +} + +type builtinPi struct { + CallExpr +} + +var _ Expr = (*builtinPi)(nil) + +func (call *builtinPi) eval(env *ExpressionEnv) (eval, error) { + return newEvalFloat(math.Pi), nil +} + +func (call *builtinPi) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + return sqltypes.Float64, 0 +} + +type builtinAcos struct { + CallExpr +} + +var _ Expr = (*builtinAcos)(nil) + +func (call *builtinAcos) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + if f.f < -1 || f.f > 1 { + return nil, nil + } + return newEvalFloat(math.Acos(f.f)), nil +} + +func (call *builtinAcos) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f | flagNullable +} + +type builtinAsin struct { + CallExpr +} + +var _ Expr = (*builtinAsin)(nil) + +func (call *builtinAsin) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + if f.f < -1 || f.f > 1 { + return nil, nil + } + return newEvalFloat(math.Asin(f.f)), nil +} + +func (call *builtinAsin) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f | flagNullable +} + +type builtinAtan struct { + CallExpr +} + +var _ Expr = (*builtinAtan)(nil) + +func (call *builtinAtan) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(math.Atan(f.f)), nil +} + +func (call *builtinAtan) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinAtan2 struct { + CallExpr +} + +var _ Expr = (*builtinAtan2)(nil) + +func (call *builtinAtan2) eval(env *ExpressionEnv) (eval, error) { + arg1, arg2, err := call.arg2(env) + if err != nil { + return nil, err + } + if arg1 == nil || arg2 == nil { + return nil, nil + } + + f1, _ := evalToNumeric(arg1).toFloat() + f2, _ := evalToNumeric(arg2).toFloat() + return newEvalFloat(math.Atan2(f1.f, f2.f)), nil +} + +func (call *builtinAtan2) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinCos struct { + CallExpr +} + +var _ Expr = (*builtinCos)(nil) + +func (call *builtinCos) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(math.Cos(f.f)), nil +} + +func (call *builtinCos) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinCot struct { + CallExpr +} + +var _ Expr = (*builtinCot)(nil) + +func (call *builtinCot) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(1.0 / math.Tan(f.f)), nil +} + +func (call *builtinCot) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinSin struct { + CallExpr +} + +var _ Expr = (*builtinSin)(nil) + +func (call *builtinSin) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(math.Sin(f.f)), nil +} + +func (call *builtinSin) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinTan struct { + CallExpr +} + +var _ Expr = (*builtinTan)(nil) + +func (call *builtinTan) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(math.Tan(f.f)), nil +} + +func (call *builtinTan) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinDegrees struct { + CallExpr +} + +var _ Expr = (*builtinDegrees)(nil) + +func (call *builtinDegrees) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(f.f * (180 / math.Pi)), nil +} + +func (call *builtinDegrees) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} + +type builtinRadians struct { + CallExpr +} + +var _ Expr = (*builtinRadians)(nil) + +func (call *builtinRadians) eval(env *ExpressionEnv) (eval, error) { + arg, err := call.arg1(env) + if err != nil { + return nil, err + } + if arg == nil { + return nil, nil + } + + f, _ := evalToNumeric(arg).toFloat() + return newEvalFloat(f.f * (math.Pi / 180)), nil +} + +func (call *builtinRadians) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) + return sqltypes.Float64, f +} diff --git a/go/vt/vtgate/evalengine/fn_string.go b/go/vt/vtgate/evalengine/fn_string.go index ba9e1c8c640..f1c358fdcba 100644 --- a/go/vt/vtgate/evalengine/fn_string.go +++ b/go/vt/vtgate/evalengine/fn_string.go @@ -22,6 +22,7 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/mysql/collations/charset" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" ) @@ -29,7 +30,8 @@ import ( type ( builtinChangeCase struct { CallExpr - upcase bool + upcase bool + collate collations.ID } builtinCharLength struct { @@ -79,7 +81,7 @@ func (call *builtinChangeCase) eval(env *ExpressionEnv) (eval, error) { return nil, nil case evalNumeric: - return evalToVarchar(e, env.DefaultCollation, false) + return evalToVarchar(e, call.collate, false) case *evalBytes: coll := e.col.Collation.Get() @@ -100,8 +102,8 @@ func (call *builtinChangeCase) eval(env *ExpressionEnv) (eval, error) { } } -func (call *builtinChangeCase) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinChangeCase) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.VarChar, f } @@ -125,8 +127,8 @@ func (call *builtinCharLength) eval(env *ExpressionEnv) (eval, error) { } } -func (call *builtinCharLength) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinCharLength) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -141,8 +143,8 @@ func (call *builtinLength) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(len(arg.ToRawBytes()))), nil } -func (call *builtinLength) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinLength) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -157,8 +159,8 @@ func (call *builtinBitLength) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(len(arg.ToRawBytes())) * 8), nil } -func (call *builtinBitLength) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinBitLength) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -181,8 +183,8 @@ func (call *builtinASCII) eval(env *ExpressionEnv) (eval, error) { return newEvalInt64(int64(b.bytes[0])), nil } -func (call *builtinASCII) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := call.Arguments[0].typeof(env) +func (call *builtinASCII) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := call.Arguments[0].typeof(env, fields) return sqltypes.Int64, f } @@ -202,6 +204,7 @@ const maxRepeatLength = 1073741824 type builtinRepeat struct { CallExpr + collate collations.ID } func (call *builtinRepeat) eval(env *ExpressionEnv) (eval, error) { @@ -215,7 +218,7 @@ func (call *builtinRepeat) eval(env *ExpressionEnv) (eval, error) { text, ok := arg1.(*evalBytes) if !ok { - text, err = evalToVarchar(arg1, env.DefaultCollation, true) + text, err = evalToVarchar(arg1, call.collate, true) if err != nil { return nil, err } @@ -243,10 +246,10 @@ func checkMaxLength(len, repeat int64) bool { return len*repeat <= maxRepeatLength } -func (call *builtinRepeat) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f1 := call.Arguments[0].typeof(env) +func (call *builtinRepeat) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f1 := call.Arguments[0].typeof(env, fields) // typecheck the right-hand argument but ignore its flags - call.Arguments[1].typeof(env) + call.Arguments[1].typeof(env, fields) return sqltypes.VarChar, f1 } @@ -267,7 +270,7 @@ func (c *builtinCollation) eval(env *ExpressionEnv) (eval, error) { }), nil } -func (*builtinCollation) typeof(_ *ExpressionEnv) (sqltypes.Type, typeFlag) { +func (*builtinCollation) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { return sqltypes.VarChar, 0 } @@ -275,8 +278,8 @@ func (c *builtinWeightString) callable() []Expr { return []Expr{c.String} } -func (c *builtinWeightString) typeof(env *ExpressionEnv) (sqltypes.Type, typeFlag) { - _, f := c.String.typeof(env) +func (c *builtinWeightString) typeof(env *ExpressionEnv, fields []*querypb.Field) (sqltypes.Type, typeFlag) { + _, f := c.String.typeof(env, fields) return sqltypes.VarBinary, f } diff --git a/go/vt/vtgate/evalengine/format.go b/go/vt/vtgate/evalengine/format.go index c2e4619faac..6d726c63260 100644 --- a/go/vt/vtgate/evalengine/format.go +++ b/go/vt/vtgate/evalengine/format.go @@ -21,6 +21,7 @@ import ( "strings" "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sqlparser" ) @@ -69,7 +70,7 @@ func (l *Literal) format(w *formatter, depth int) { func (bv *BindVariable) format(w *formatter, depth int) { w.WriteByte(':') - if bv.tuple { + if bv.Type == sqltypes.Tuple { w.WriteByte(':') } w.WriteString(bv.Key) diff --git a/go/vt/vtgate/evalengine/integration/comparison_test.go b/go/vt/vtgate/evalengine/integration/comparison_test.go index 03bf5598ad2..80838be6fac 100644 --- a/go/vt/vtgate/evalengine/integration/comparison_test.go +++ b/go/vt/vtgate/evalengine/integration/comparison_test.go @@ -18,6 +18,7 @@ package integration import ( "fmt" + "strconv" "strings" "testing" "time" @@ -27,6 +28,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/evalengine/testcases" @@ -58,7 +60,30 @@ func init() { servenv.OnParse(registerFlags) } -func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mysql.Conn, expr string) { +// normalizeValue returns a normalized form of this value that matches the output +// of the evaluation engine. This is used to mask quirks in the way MySQL sends SQL +// values over the wire, to allow comparing our implementation against MySQL's in +// integration tests. +func normalizeValue(v sqltypes.Value, coll collations.ID) sqltypes.Value { + typ := v.Type() + if typ == sqltypes.VarChar && coll == collations.CollationBinaryID { + return sqltypes.NewVarBinary(string(v.Raw())) + } + if typ == sqltypes.Float32 || typ == sqltypes.Float64 { + var bitsize = 64 + if typ == sqltypes.Float32 { + bitsize = 32 + } + f, err := strconv.ParseFloat(v.RawStr(), bitsize) + if err != nil { + panic(err) + } + return sqltypes.MakeTrusted(typ, evalengine.FormatFloat(typ, f)) + } + return v +} + +func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mysql.Conn, expr string, fields []*querypb.Field) { t.Helper() localQuery := "SELECT " + expr @@ -66,14 +91,14 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys if debugCheckCollations { remoteQuery = fmt.Sprintf("SELECT %s, COLLATION(%s)", expr, expr) } - if len(env.Fields) > 0 { + if len(fields) > 0 { if _, err := conn.ExecuteFetch(`DROP TEMPORARY TABLE IF EXISTS vteval_test`, -1, false); err != nil { t.Fatalf("failed to drop temporary table: %v", err) } var schema strings.Builder schema.WriteString(`CREATE TEMPORARY TABLE vteval_test(autopk int primary key auto_increment, `) - for i, field := range env.Fields { + for i, field := range fields { if i > 0 { schema.WriteString(", ") } @@ -88,7 +113,7 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys if len(env.Row) > 0 { var rowsql strings.Builder rowsql.WriteString(`INSERT INTO vteval_test(`) - for i, field := range env.Fields { + for i, field := range fields { if i > 0 { rowsql.WriteString(", ") } @@ -112,11 +137,12 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys remoteQuery = remoteQuery + " FROM vteval_test" } - local, localType, localErr := evaluateLocalEvalengine(env, localQuery) + local, localType, localErr := evaluateLocalEvalengine(env, localQuery, fields) remote, remoteErr := conn.ExecuteFetch(remoteQuery, 1, true) - var localVal, remoteVal string + var localVal, remoteVal sqltypes.Value var localCollation, remoteCollation collations.ID + var decimals uint32 if localErr == nil { v := local.Value() if debugCheckCollations { @@ -127,11 +153,11 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys } } if debugNormalize { - localVal = evalengine.NormalizeValue(v, local.Collation()) + localVal = normalizeValue(v, local.Collation()) } else { - localVal = v.String() + localVal = v } - if debugCheckTypes { + if debugCheckTypes && localType != -1 { tt := v.Type() if tt != sqltypes.Null && tt != localType { t.Errorf("evaluation type mismatch: eval=%v vs typeof=%v\nlocal: %s\nquery: %s (SIMPLIFY=%v)", @@ -141,9 +167,10 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys } if remoteErr == nil { if debugNormalize { - remoteVal = evalengine.NormalizeValue(remote.Rows[0][0], collations.ID(remote.Fields[0].Charset)) + remoteVal = normalizeValue(remote.Rows[0][0], collations.ID(remote.Fields[0].Charset)) + decimals = remote.Fields[0].Decimals } else { - remoteVal = remote.Rows[0][0].String() + remoteVal = remote.Rows[0][0] } if debugCheckCollations { if remote.Rows[0][0].IsNull() { @@ -155,10 +182,10 @@ func compareRemoteExprEnv(t *testing.T, env *evalengine.ExpressionEnv, conn *mys } } - if diff := compareResult(localErr, remoteErr, localVal, remoteVal, localCollation, remoteCollation); diff != "" { + if diff := compareResult(localErr, remoteErr, localVal, remoteVal, localCollation, remoteCollation, decimals); diff != "" { t.Errorf("%s\nquery: %s (SIMPLIFY=%v)\nrow: %v", diff, localQuery, debugSimplify, env.Row) } else if debugPrintAll { - t.Logf("local=%s mysql=%s\nquery: %s\nrow: %v", localVal, remoteVal, localQuery, env.Row) + t.Logf("local=%s mysql=%s\nquery: %s\nrow: %v", localVal.String(), remoteVal.String(), localQuery, env.Row) } } @@ -167,11 +194,11 @@ func TestMySQL(t *testing.T) { defer conn.Close() for _, tc := range testcases.Cases { - t.Run(fmt.Sprintf("%T", tc), func(t *testing.T) { - env := tc.Environment() - tc.Test(func(query string, row []sqltypes.Value) { + t.Run(tc.Name(), func(t *testing.T) { + env := evalengine.EmptyExpressionEnv() + tc.Run(func(query string, row []sqltypes.Value) { env.Row = row - compareRemoteExprEnv(t, env, conn, query) + compareRemoteExprEnv(t, env, conn, query, tc.Schema) }) }) } diff --git a/go/vt/vtgate/evalengine/integration/fuzz_test.go b/go/vt/vtgate/evalengine/integration/fuzz_test.go index 55b5cc3c4c0..7b44d83835e 100644 --- a/go/vt/vtgate/evalengine/integration/fuzz_test.go +++ b/go/vt/vtgate/evalengine/integration/fuzz_test.go @@ -18,7 +18,9 @@ package integration import ( "encoding/json" + "errors" "fmt" + "math" "math/rand" "os" "regexp" @@ -30,6 +32,7 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/simplifier" @@ -120,7 +123,7 @@ func errorsMatch(remote, local error) bool { return false } -func evaluateLocalEvalengine(env *evalengine.ExpressionEnv, query string) (evalengine.EvalResult, sqltypes.Type, error) { +func evaluateLocalEvalengine(env *evalengine.ExpressionEnv, query string, fields []*querypb.Field) (evalengine.EvalResult, sqltypes.Type, error) { stmt, err := sqlparser.Parse(query) if err != nil { return evalengine.EvalResult{}, 0, err @@ -133,8 +136,15 @@ func evaluateLocalEvalengine(env *evalengine.ExpressionEnv, query string) (evale err = fmt.Errorf("PANIC during translate: %v", r) } }() - lookup := &evalengine.LookupIntegrationTest{Collation: collations.CollationUtf8mb4ID} - expr, err = evalengine.TranslateEx(astExpr, lookup, debugSimplify) + cfg := &evalengine.Config{ + ResolveColumn: evalengine.FieldResolver(fields).Column, + Collation: collations.CollationUtf8mb4ID, + Optimization: evalengine.OptimizationLevelNone, + } + if debugSimplify { + cfg.Optimization = evalengine.OptimizationLevelSimplify + } + expr, err = evalengine.Translate(astExpr, cfg) return }() @@ -150,7 +160,11 @@ func evaluateLocalEvalengine(env *evalengine.ExpressionEnv, query string) (evale }() eval, err = env.Evaluate(local) if err == nil && debugCheckTypes { - tt, err = env.TypeOf(local) + tt, err = env.TypeOf(local, fields) + if errors.Is(err, evalengine.ErrAmbiguousType) { + tt = -1 + err = nil + } } return }() @@ -182,8 +196,8 @@ func TestGenerateFuzzCases(t *testing.T) { compareWithMySQL := func(expr sqlparser.Expr) *mismatch { query := "SELECT " + sqlparser.String(expr) - env := evalengine.EnvWithBindVars(nil, 255) - eval, _, localErr := evaluateLocalEvalengine(env, query) + env := evalengine.EnvWithBindVars(nil) + eval, _, localErr := evaluateLocalEvalengine(env, query, nil) remote, remoteErr := conn.ExecuteFetch(query, 1, false) if localErr != nil && strings.Contains(localErr.Error(), "syntax error at position") { @@ -200,10 +214,10 @@ func TestGenerateFuzzCases(t *testing.T) { remoteErr: remoteErr, } if localErr == nil { - res.localVal = eval.Value().String() + res.localVal = eval.Value() } if remoteErr == nil { - res.remoteVal = remote.Rows[0][0].String() + res.remoteVal = remote.Rows[0][0] } if res.Error() != "" { return &res @@ -265,7 +279,7 @@ func TestGenerateFuzzCases(t *testing.T) { } else { golden = append(golden, evaltest{ Query: query, - Value: fail.remoteVal, + Value: fail.remoteVal.String(), }) } } @@ -285,10 +299,28 @@ func TestGenerateFuzzCases(t *testing.T) { type mismatch struct { expr sqlparser.Expr localErr, remoteErr error - localVal, remoteVal string + localVal, remoteVal sqltypes.Value +} + +const tolerance = 1e-14 + +func close(a, b float64, decimals uint32) bool { + if decimals > 0 { + ratio := math.Pow(10, float64(decimals)) + a = math.Round(a*ratio) / ratio + b = math.Round(b*ratio) / ratio + } + + if a == b { + return true + } + if b == 0 { + return math.Abs(a) < tolerance + } + return math.Abs((a-b)/b) < tolerance } -func compareResult(localErr, remoteErr error, localVal, remoteVal string, localCollation, remoteCollation collations.ID) string { +func compareResult(localErr, remoteErr error, localVal, remoteVal sqltypes.Value, localCollation, remoteCollation collations.ID, decimals uint32) string { if localErr != nil { if remoteErr == nil { return fmt.Sprintf("%v; mysql response: %s", localErr, remoteVal) @@ -317,13 +349,26 @@ func compareResult(localErr, remoteErr error, localVal, remoteVal string, localC remoteCollationName = coll.Name() } - if localVal != remoteVal { + if localVal.IsFloat() && remoteVal.IsFloat() { + localFloat, err := localVal.ToFloat64() + if err != nil { + return fmt.Sprintf("error converting local value to float: %v", err) + } + remoteFloat, err := remoteVal.ToFloat64() + if err != nil { + return fmt.Sprintf("error converting remote value to float: %v", err) + } + if !close(localFloat, remoteFloat, decimals) { + return fmt.Sprintf("different results: %s; mysql response: %s (local collation: %s; mysql collation: %s)", + localVal.String(), remoteVal.String(), localCollationName, remoteCollationName) + } + } else if localVal.String() != remoteVal.String() { return fmt.Sprintf("different results: %s; mysql response: %s (local collation: %s; mysql collation: %s)", - localVal, remoteVal, localCollationName, remoteCollationName) + localVal.String(), remoteVal.String(), localCollationName, remoteCollationName) } if localCollation != remoteCollation { return fmt.Sprintf("different collations: %s; mysql response: %s (local result: %s; mysql result: %s)", - localCollationName, remoteCollationName, localVal, remoteVal, + localCollationName, remoteCollationName, localVal.String(), remoteVal.String(), ) } @@ -331,5 +376,5 @@ func compareResult(localErr, remoteErr error, localVal, remoteVal string, localC } func (cr *mismatch) Error() string { - return compareResult(cr.localErr, cr.remoteErr, cr.localVal, cr.remoteVal, collations.Unknown, collations.Unknown) + return compareResult(cr.localErr, cr.remoteErr, cr.localVal, cr.remoteVal, collations.Unknown, collations.Unknown, 0) } diff --git a/go/vt/vtgate/evalengine/internal/decimal/decimal.go b/go/vt/vtgate/evalengine/internal/decimal/decimal.go index 5eb9aef5f9f..14b708601b0 100644 --- a/go/vt/vtgate/evalengine/internal/decimal/decimal.go +++ b/go/vt/vtgate/evalengine/internal/decimal/decimal.go @@ -263,7 +263,7 @@ func (d Decimal) rescale(exp int32) Decimal { } // abs returns the absolute value of the decimal. -func (d Decimal) abs() Decimal { +func (d Decimal) Abs() Decimal { if d.Sign() >= 0 { return d } @@ -362,7 +362,7 @@ func (d Decimal) Div(d2 Decimal, scaleIncr int32) Decimal { scaleIncr = 0 } scale := myBigDigits(fracLeft+fracRight+scaleIncr) * 9 - q, _ := d.quoRem(d2, scale) + q, _ := d.QuoRem(d2, scale) return q } @@ -372,15 +372,15 @@ func (d Decimal) div(d2 Decimal) Decimal { return d.divRound(d2, int32(divisionPrecision)) } -// quoRem does division with remainder -// d.quoRem(d2,precision) returns quotient q and remainder r such that +// QuoRem does division with remainder +// d.QuoRem(d2,precision) returns quotient q and remainder r such that // // d = d2 * q + r, q an integer multiple of 10^(-precision) // 0 <= r < abs(d2) * 10 ^(-precision) if d>=0 // 0 >= r > -abs(d2) * 10 ^(-precision) if d<0 // // Note that precision<0 is allowed as input. -func (d Decimal) quoRem(d2 Decimal, precision int32) (Decimal, Decimal) { +func (d Decimal) QuoRem(d2 Decimal, precision int32) (Decimal, Decimal) { d.ensureInitialized() d2.ensureInitialized() if d2.value.Sign() == 0 { @@ -389,7 +389,7 @@ func (d Decimal) quoRem(d2 Decimal, precision int32) (Decimal, Decimal) { scale := -precision e := int64(d.exp - d2.exp - scale) if e > math.MaxInt32 || e < math.MinInt32 { - panic("overflow in decimal quoRem") + panic("overflow in decimal QuoRem") } var aa, bb, expo big.Int var scalerest int32 @@ -428,7 +428,7 @@ func (d Decimal) quoRem(d2 Decimal, precision int32) (Decimal, Decimal) { // Note that precision<0 is allowed as input. func (d Decimal) divRound(d2 Decimal, precision int32) Decimal { // quoRem already checks initialization - q, r := d.quoRem(d2, precision) + q, r := d.QuoRem(d2, precision) // the actual rounding decision is based on comparing r*10^precision and d2/2 // instead compare 2 r 10 ^precision and d2 @@ -438,7 +438,7 @@ func (d Decimal) divRound(d2 Decimal, precision int32) Decimal { // now rv2 = abs(r.value) * 2 r2 := Decimal{value: &rv2, exp: r.exp + precision} // r2 is now 2 * r * 10 ^ precision - var c = r2.Cmp(d2.abs()) + var c = r2.Cmp(d2.Abs()) if c < 0 { return q @@ -474,6 +474,20 @@ func (d Decimal) Ceil() Decimal { return Decimal{value: z, exp: 0} } +func (d Decimal) Floor() Decimal { + if d.isInteger() { + return d + } + + exp := big.NewInt(10) + + // NOTE(vadim): must negate after casting to prevent int32 overflow + exp.Exp(exp, big.NewInt(-int64(d.exp)), nil) + + z, _ := new(big.Int).DivMod(d.value, exp, new(big.Int)) + return Decimal{value: z, exp: 0} +} + func (d Decimal) truncate(precision int32) Decimal { d.ensureInitialized() if precision >= 0 && -precision > d.exp { diff --git a/go/vt/vtgate/evalengine/internal/decimal/decimal_test.go b/go/vt/vtgate/evalengine/internal/decimal/decimal_test.go index 88edef68ff7..0f0c16763a7 100644 --- a/go/vt/vtgate/evalengine/internal/decimal/decimal_test.go +++ b/go/vt/vtgate/evalengine/internal/decimal/decimal_test.go @@ -746,11 +746,11 @@ func TestDecimal_QuoRem(t *testing.T) { d, _ := NewFromString(inp4.d) d2, _ := NewFromString(inp4.d2) prec := inp4.exp - q, r := d.quoRem(d2, prec) + q, r := d.QuoRem(d2, prec) expectedQ, _ := NewFromString(inp4.q) expectedR, _ := NewFromString(inp4.r) if !q.Equal(expectedQ) || !r.Equal(expectedR) { - t.Errorf("bad quoRem division %s , %s , %d got %v, %v expected %s , %s", + t.Errorf("bad QuoRem division %s , %s , %d got %v, %v expected %s , %s", inp4.d, inp4.d2, prec, q, r, inp4.q, inp4.r) } if !d.Equal(d2.mul(q).Add(r)) { @@ -761,7 +761,7 @@ func TestDecimal_QuoRem(t *testing.T) { t.Errorf("quotient wrong precision: d=%v, d2= %v, prec=%d, q=%v, r=%v", d, d2, prec, q, r) } - if r.abs().Cmp(d2.abs().mul(New(1, -prec))) >= 0 { + if r.Abs().Cmp(d2.Abs().mul(New(1, -prec))) >= 0 { t.Errorf("remainder too large: d=%v, d2= %v, prec=%d, q=%v, r=%v", d, d2, prec, q, r) } @@ -813,7 +813,7 @@ func TestDecimal_QuoRem2(t *testing.T) { } d2 := tc.d2 prec := tc.prec - q, r := d.quoRem(d2, prec) + q, r := d.QuoRem(d2, prec) // rule 1: d = d2*q +r if !d.Equal(d2.mul(q).Add(r)) { t.Errorf("not fitting, d=%v, d2=%v, prec=%d, q=%v, r=%v", @@ -825,7 +825,7 @@ func TestDecimal_QuoRem2(t *testing.T) { d, d2, prec, q, r) } // rule 3: abs(r)= 0 { + if r.Abs().Cmp(d2.Abs().mul(New(1, -prec))) >= 0 { t.Errorf("remainder too large, d=%v, d2=%v, prec=%d, q=%v, r=%v", d, d2, prec, q, r) } @@ -879,11 +879,11 @@ func TestDecimal_DivRound(t *testing.T) { if sign(q)*sign(d)*sign(d2) < 0 { t.Errorf("sign of quotient wrong, got: %v/%v is about %v", d, d2, q) } - x := q.mul(d2).abs().sub(d.abs()).mul(New(2, 0)) - if x.Cmp(d2.abs().mul(New(1, -prec))) > 0 { + x := q.mul(d2).Abs().sub(d.Abs()).mul(New(2, 0)) + if x.Cmp(d2.Abs().mul(New(1, -prec))) > 0 { t.Errorf("wrong rounding, got: %v/%v prec=%d is about %v", d, d2, prec, q) } - if x.Cmp(d2.abs().mul(New(-1, -prec))) <= 0 { + if x.Cmp(d2.Abs().mul(New(-1, -prec))) <= 0 { t.Errorf("wrong rounding, got: %v/%v prec=%d is about %v", d, d2, prec, q) } if !q.Equal(result) { @@ -904,11 +904,11 @@ func TestDecimal_DivRound2(t *testing.T) { if sign(q)*sign(d)*sign(d2) < 0 { t.Errorf("sign of quotient wrong, got: %v/%v is about %v", d, d2, q) } - x := q.mul(d2).abs().sub(d.abs()).mul(New(2, 0)) - if x.Cmp(d2.abs().mul(New(1, -prec))) > 0 { + x := q.mul(d2).Abs().sub(d.Abs()).mul(New(2, 0)) + if x.Cmp(d2.Abs().mul(New(1, -prec))) > 0 { t.Errorf("wrong rounding, got: %v/%v prec=%d is about %v", d, d2, prec, q) } - if x.Cmp(d2.abs().mul(New(-1, -prec))) <= 0 { + if x.Cmp(d2.Abs().mul(New(-1, -prec))) <= 0 { t.Errorf("wrong rounding, got: %v/%v prec=%d is about %v", d, d2, prec, q) } } @@ -973,7 +973,7 @@ func TestDecimal_Abs1(t *testing.T) { a := New(-1234, -4) b := New(1234, -4) - c := a.abs() + c := a.Abs() if c.Cmp(b) != 0 { t.Errorf("error") } @@ -983,7 +983,7 @@ func TestDecimal_Abs2(t *testing.T) { a := New(-1234, -4) b := New(1234, -4) - c := b.abs() + c := b.Abs() if c.Cmp(a) == 0 { t.Errorf("error") } diff --git a/go/vt/vtgate/evalengine/internal/decimal/helpers.go b/go/vt/vtgate/evalengine/internal/decimal/helpers.go index 4a4dfec0cce..a1c1869bb1c 100644 --- a/go/vt/vtgate/evalengine/internal/decimal/helpers.go +++ b/go/vt/vtgate/evalengine/internal/decimal/helpers.go @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by Sizegen. DO NOT EDIT. package decimal diff --git a/go/vt/vtgate/evalengine/internal/json/fastparse/fastparse.go b/go/vt/vtgate/evalengine/internal/json/fastparse/fastparse.go new file mode 100644 index 00000000000..31dbb682049 --- /dev/null +++ b/go/vt/vtgate/evalengine/internal/json/fastparse/fastparse.go @@ -0,0 +1,264 @@ +/* +Copyright 2018 Aliaksandr Valialkin +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fastparse + +import ( + "fmt" + "math" + "strconv" + "strings" +) + +// ParseUint64 parses uint64 from s. +// +// It is equivalent to strconv.ParseUint(s, 10, 64), but is faster. +// +// See also ParseUint64BestEffort. +func ParseUint64(s string) (uint64, error) { + if len(s) == 0 { + return 0, fmt.Errorf("cannot parse uint64 from empty string") + } + i := uint(0) + d := uint64(0) + j := i + for i < uint(len(s)) { + if s[i] >= '0' && s[i] <= '9' { + d = d*10 + uint64(s[i]-'0') + i++ + if i > 18 { + // The integer part may be out of range for uint64. + // Fall back to slow parsing. + return strconv.ParseUint(s, 10, 64) + } + continue + } + break + } + if i <= j { + return 0, fmt.Errorf("cannot parse uint64 from %q", s) + } + if i < uint(len(s)) { + // Unparsed tail left. + return 0, fmt.Errorf("unparsed tail left after parsing uint64 from %q: %q", s, s[i:]) + } + return d, nil +} + +// ParseInt64 parses int64 number s. +// +// It is equivalent to strconv.ParseInt(s, 10, 64), but is faster. +// +// See also ParseInt64BestEffort. +func ParseInt64(s string) (int64, error) { + if len(s) == 0 { + return 0, fmt.Errorf("cannot parse int64 from empty string") + } + i := uint(0) + minus := s[0] == '-' + if minus { + i++ + if i >= uint(len(s)) { + return 0, fmt.Errorf("cannot parse int64 from %q", s) + } + } + + d := int64(0) + j := i + for i < uint(len(s)) { + if s[i] >= '0' && s[i] <= '9' { + d = d*10 + int64(s[i]-'0') + i++ + if i > 18 { + // The integer part may be out of range for int64. + // Fall back to slow parsing. + return strconv.ParseInt(s, 10, 64) + } + continue + } + break + } + if i <= j { + return 0, fmt.Errorf("cannot parse int64 from %q", s) + } + if i < uint(len(s)) { + // Unparsed tail left. + return 0, fmt.Errorf("unparsed tail left after parsing int64 form %q: %q", s, s[i:]) + } + if minus { + d = -d + } + return d, nil +} + +// Exact powers of 10. +// +// This works faster than math.Pow10, since it avoids additional multiplication. +var float64pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, +} + +// ParseFloat64 parses floating-point number s. +// +// It is equivalent to strconv.ParseFloat(s, 64), but is faster. +// +// See also ParseBestEffort. +func ParseFloat64(s string) (float64, error) { + if len(s) == 0 { + return 0, fmt.Errorf("cannot parse float64 from empty string") + } + i := uint(0) + minus := s[0] == '-' + if minus { + i++ + if i >= uint(len(s)) { + return 0, fmt.Errorf("cannot parse float64 from %q", s) + } + } + + // the integer part might be elided to remain compliant + // with https://go.dev/ref/spec#Floating-point_literals + if s[i] == '.' && (i+1 >= uint(len(s)) || s[i+1] < '0' || s[i+1] > '9') { + return 0, fmt.Errorf("missing integer and fractional part in %q", s) + } + + d := uint64(0) + j := i + for i < uint(len(s)) { + if s[i] >= '0' && s[i] <= '9' { + d = d*10 + uint64(s[i]-'0') + i++ + if i > 18 { + // The integer part may be out of range for uint64. + // Fall back to slow parsing. + return strconv.ParseFloat(s, 64) + } + continue + } + break + } + if i <= j && s[i] != '.' { + ss := s[i:] + ss = strings.TrimPrefix(ss, "+") + // "infinity" is needed for OpenMetrics support. + // See https://github.com/OpenObservability/OpenMetrics/blob/master/OpenMetrics.md + if strings.EqualFold(ss, "inf") || strings.EqualFold(ss, "infinity") { + if minus { + return -inf, nil + } + return inf, nil + } + if strings.EqualFold(ss, "nan") { + return nan, nil + } + return 0, fmt.Errorf("unparsed tail left after parsing float64 from %q: %q", s, ss) + } + f := float64(d) + if i >= uint(len(s)) { + // Fast path - just integer. + if minus { + f = -f + } + return f, nil + } + + if s[i] == '.' { + // Parse fractional part. + i++ + if i >= uint(len(s)) { + // the fractional part might be elided to remain compliant + // with https://go.dev/ref/spec#Floating-point_literals + return f, nil + } + k := i + for i < uint(len(s)) { + if s[i] >= '0' && s[i] <= '9' { + d = d*10 + uint64(s[i]-'0') + i++ + if i-j >= uint(len(float64pow10)) { + // The mantissa is out of range. Fall back to standard parsing. + return strconv.ParseFloat(s, 64) + } + continue + } + break + } + if i < k { + return 0, fmt.Errorf("cannot find mantissa in %q", s) + } + // Convert the entire mantissa to a float at once to avoid rounding errors. + f = float64(d) / float64pow10[i-k] + if i >= uint(len(s)) { + // Fast path - parsed fractional number. + if minus { + f = -f + } + return f, nil + } + } + if s[i] == 'e' || s[i] == 'E' { + // Parse exponent part. + i++ + if i >= uint(len(s)) { + return 0, fmt.Errorf("cannot parse exponent in %q", s) + } + expMinus := false + if s[i] == '+' || s[i] == '-' { + expMinus = s[i] == '-' + i++ + if i >= uint(len(s)) { + return 0, fmt.Errorf("cannot parse exponent in %q", s) + } + } + exp := int16(0) + j := i + for i < uint(len(s)) { + if s[i] >= '0' && s[i] <= '9' { + exp = exp*10 + int16(s[i]-'0') + i++ + if exp > 300 { + // The exponent may be too big for float64. + // Fall back to standard parsing. + f, err := strconv.ParseFloat(s, 64) + if err != nil && !math.IsInf(f, 0) { + return 0, fmt.Errorf("cannot parse exponent in %q: %s", s, err) + } + return f, nil + } + continue + } + break + } + if i <= j { + return 0, fmt.Errorf("cannot parse exponent in %q", s) + } + if expMinus { + exp = -exp + } + f *= math.Pow10(int(exp)) + if i >= uint(len(s)) { + if minus { + f = -f + } + return f, nil + } + } + return 0, fmt.Errorf("cannot parse float64 from %q", s) +} + +var inf = math.Inf(1) +var nan = math.NaN() diff --git a/go/vt/vtgate/evalengine/internal/json/helpers.go b/go/vt/vtgate/evalengine/internal/json/helpers.go index baeb282832d..ca95697df4f 100644 --- a/go/vt/vtgate/evalengine/internal/json/helpers.go +++ b/go/vt/vtgate/evalengine/internal/json/helpers.go @@ -32,6 +32,10 @@ func (v *Value) ToRawBytes() []byte { return v.MarshalTo(nil) } +func (v *Value) ToUnencodedBytes() []byte { + return []byte(v.s) +} + func (v *Value) SQLType() sqltypes.Type { return sqltypes.TypeJSON } @@ -64,6 +68,41 @@ func NewString(raw []byte) *Value { } } +func NewBlob(raw []byte) *Value { + return &Value{ + s: string(raw), + t: TypeBlob, + } +} + +func NewBit(raw []byte) *Value { + return &Value{ + s: string(raw), + t: TypeBit, + } +} + +func NewDate(raw []byte) *Value { + return &Value{ + s: string(raw), + t: TypeDate, + } +} + +func NewDateTime(raw []byte) *Value { + return &Value{ + s: string(raw), + t: TypeDateTime, + } +} + +func NewTime(raw []byte) *Value { + return &Value{ + s: string(raw), + t: TypeTime, + } +} + func (v *Value) Depth() int { max := func(a, b int) int { if a > b { diff --git a/go/vt/vtgate/evalengine/internal/json/parser.go b/go/vt/vtgate/evalengine/internal/json/parser.go index 909bfa241fd..b27f38ccad5 100644 --- a/go/vt/vtgate/evalengine/internal/json/parser.go +++ b/go/vt/vtgate/evalengine/internal/json/parser.go @@ -18,13 +18,18 @@ limitations under the License. package json import ( + "encoding/base64" "fmt" "strconv" "strings" + "time" "unicode/utf16" "golang.org/x/exp/slices" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vtgate/evalengine/internal/decimal" + "vitess.io/vitess/go/hack" ) @@ -493,6 +498,14 @@ func (o *Object) reset() { o.kvs = o.kvs[:0] } +func (o *Object) Keys() []string { + keys := make([]string, 0, len(o.kvs)) + for _, kv := range o.kvs { + keys = append(keys, kv.k) + } + return keys +} + // MarshalTo appends marshaled o to dst and returns the result. func (o *Object) MarshalTo(dst []byte) []byte { dst = append(dst, '{') @@ -605,6 +618,11 @@ type Value struct { a []*Value s string t Type + // Flag to indicate if we have an arbitrary sized integer type + // or a floating point value if we have a number type. MySQL + // makes this distinction as well and keeps track of this type + // through JSON operations. + i bool } // MarshalTo appends marshaled v to dst and returns the result. @@ -629,11 +647,58 @@ func (v *Value) MarshalTo(dst []byte) []byte { return dst case TypeString: return escapeString(dst, v.s) + case TypeDate: + t, _ := v.Date() + return escapeString(dst, t.Format("2006-01-02")) + case TypeDateTime: + t, _ := v.DateTime() + return escapeString(dst, t.Format("2006-01-02 15:04:05.000000")) + case TypeTime: + now := time.Now() + year, month, day := now.Date() + + t, _ := v.Time() + diff := t.Sub(time.Date(year, month, day, 0, 0, 0, 0, time.UTC)) + var neg bool + if diff < 0 { + diff = -diff + neg = true + } + + b := strings.Builder{} + if neg { + b.WriteByte('-') + } + + hours := (diff / time.Hour) + diff -= hours * time.Hour + // For some reason MySQL wraps this around and loses data + // if it's more than 32 hours. + fmt.Fprintf(&b, "%02d", hours%32) + minutes := (diff / time.Minute) + fmt.Fprintf(&b, ":%02d", minutes) + diff -= minutes * time.Minute + seconds := (diff / time.Second) + fmt.Fprintf(&b, ":%02d", seconds) + diff -= seconds * time.Second + fmt.Fprintf(&b, ".%06d", diff) + return escapeString(dst, b.String()) + case TypeBlob, TypeBit: + const prefix = "base64:type15:" + + size := 2 + len(prefix) + base64.StdEncoding.EncodedLen(len(v.s)) + dst := make([]byte, size) + dst[0] = '"' + copy(dst[1:], prefix) + base64.StdEncoding.Encode(dst[len(prefix)+1:], []byte(v.s)) + dst[size-1] = '"' + return dst case TypeNumber: return append(dst, v.s...) - case TypeTrue: - return append(dst, "true"...) - case TypeFalse: + case TypeBoolean: + if v == ValueTrue { + return append(dst, "true"...) + } return append(dst, "false"...) case TypeNull: return append(dst, "null"...) @@ -657,31 +722,55 @@ func (v *Value) String() string { } // Type represents JSON type. -type Type int +type Type int32 +// See https://dev.mysql.com/doc/refman/8.0/en/json.html#json-comparison for the ordering here const ( // TypeNull is JSON null. - TypeNull Type = 0 + TypeNull Type = iota + + // TypeNumber is JSON number type. + TypeNumber + + // TypeString is JSON string type. + TypeString // TypeObject is JSON object type. - TypeObject Type = 1 + TypeObject // TypeArray is JSON array type. - TypeArray Type = 2 + TypeArray - // TypeString is JSON string type. - TypeString Type = 3 + // TypeTrue is JSON boolean. + TypeBoolean - // TypeNumber is JSON number type. - TypeNumber Type = 4 + // TypeDate is JSON date. + TypeDate - // TypeTrue is JSON true. - TypeTrue Type = 5 + // TypeTime is JSON time. + TypeTime - // TypeFalse is JSON false. - TypeFalse Type = 6 + // TypeDateTime is JSON time. + TypeDateTime - typeRawString Type = 7 + // TypeOpaque is JSON opaque type. + TypeOpaque + + // TypeBit is JSON bit string. + TypeBit + + // TypeBlob is JSON blob. + TypeBlob + + typeRawString +) + +type NumberType int32 + +const ( + NumberTypeUnknown NumberType = iota + NumberTypeInteger + NumberTypeDouble ) // String returns string representation of t. @@ -695,10 +784,20 @@ func (t Type) String() string { return "string" case TypeNumber: return "number" - case TypeTrue: - return "true" - case TypeFalse: - return "false" + case TypeBoolean: + return "boolean" + case TypeBlob: + return "blob" + case TypeBit: + return "bit" + case TypeDate: + return "date" + case TypeTime: + return "time" + case TypeDateTime: + return "datetime" + case TypeOpaque: + return "opaque" case TypeNull: return "null" @@ -721,6 +820,39 @@ func (v *Value) Type() Type { return v.t } +func (v *Value) Date() (time.Time, bool) { + if v.t != TypeDate { + return time.Time{}, false + } + t, err := sqlparser.ParseDate(v.s) + if err != nil { + return time.Time{}, false + } + return t, true +} + +func (v *Value) DateTime() (time.Time, bool) { + if v.t != TypeDateTime { + return time.Time{}, false + } + t, err := sqlparser.ParseDateTime(v.s) + if err != nil { + return time.Time{}, false + } + return t, true +} + +func (v *Value) Time() (time.Time, bool) { + if v.t != TypeTime { + return time.Time{}, false + } + t, err := sqlparser.ParseTime(v.s) + if err != nil { + return time.Time{}, false + } + return t, true +} + // Object returns the underlying JSON object for the v. func (v *Value) Object() (*Object, bool) { if v.t != TypeObject { @@ -749,21 +881,61 @@ func (v *Value) Raw() string { return v.s } +func (v *Value) NumberType() NumberType { + if v.t != TypeNumber { + return NumberTypeUnknown + } + if v.i { + return NumberTypeInteger + } + return NumberTypeDouble +} + +func (v *Value) Int64() (int64, bool) { + str := strings.TrimSpace(v.s) + i, err := strconv.ParseInt(str, 10, 64) + if err != nil { + return 0, false + } + return i, true +} + +func (v *Value) Float64() (float64, bool) { + str := strings.TrimSpace(v.s) + // We only care to parse as many of the initial float characters of the + // string as possible. This functionality is implemented in the `strconv` package + // of the standard library, but not exposed, so we hook into it. + val, _, err := hack.ParseFloatPrefix(str, 64) + if err != nil { + return 0.0, false + } + return val, true +} + +func (v *Value) Decimal() (decimal.Decimal, bool) { + str := strings.TrimSpace(v.s) + dec, err := decimal.NewFromString(str) + if err != nil { + return decimal.Zero, false + } + return dec, true +} + // Bool returns the underlying JSON bool for the v. // // Use GetBool if you don't need error handling. func (v *Value) Bool() (bool, bool) { - if v.t == TypeTrue { + if v == ValueTrue { return true, true } - if v.t == TypeFalse { + if v == ValueFalse { return false, true } return false, false } var ( - ValueTrue = &Value{t: TypeTrue} - ValueFalse = &Value{t: TypeFalse} + ValueTrue = &Value{t: TypeBoolean} + ValueFalse = &Value{t: TypeBoolean} ValueNull = &Value{t: TypeNull} ) diff --git a/go/vt/vtgate/evalengine/internal/json/parser_test.go b/go/vt/vtgate/evalengine/internal/json/parser_test.go index 94b4a3a62a6..5e3c1b9cda0 100644 --- a/go/vt/vtgate/evalengine/internal/json/parser_test.go +++ b/go/vt/vtgate/evalengine/internal/json/parser_test.go @@ -470,8 +470,7 @@ func TestParserParse(t *testing.T) { if err != nil { t.Fatalf("cannot parse true: %s", err) } - tp := v.Type() - if tp != TypeTrue || tp.String() != "true" { + if v != ValueTrue { t.Fatalf("unexpected value obtained for true: %#v", v) } b, ok := v.Bool() @@ -492,8 +491,7 @@ func TestParserParse(t *testing.T) { if err != nil { t.Fatalf("cannot parse false: %s", err) } - tp := v.Type() - if tp != TypeFalse || tp.String() != "false" { + if v != ValueFalse { t.Fatalf("unexpected value obtained for false: %#v", v) } b, ok := v.Bool() diff --git a/go/vt/vtgate/evalengine/mysql_test.go b/go/vt/vtgate/evalengine/mysql_test.go index 9fece5a9db5..e888634530b 100644 --- a/go/vt/vtgate/evalengine/mysql_test.go +++ b/go/vt/vtgate/evalengine/mysql_test.go @@ -49,11 +49,19 @@ var errKnownBadQuery = errors.New("this query is known to give bad results in My func convert(t *testing.T, query string, simplify bool) (Expr, error) { stmt, err := sqlparser.Parse(query) if err != nil { - t.Fatal(err) + t.Fatalf("failed to parse '%s': %v", query, err) + } + + cfg := &Config{ + Collation: collations.CollationUtf8mb4ID, + Optimization: OptimizationLevelNone, + } + if simplify { + cfg.Optimization = OptimizationLevelSimplify } astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - converted, err := TranslateEx(astExpr, &LookupIntegrationTest{collations.CollationUtf8mb4ID}, simplify) + converted, err := Translate(astExpr, cfg) if err == nil { if knownBadQuery(converted) { return nil, errKnownBadQuery @@ -68,7 +76,7 @@ func testSingle(t *testing.T, query string) (EvalResult, error) { if err != nil { return EvalResult{}, err } - return EnvWithBindVars(nil, collations.CollationUtf8mb4ID).Evaluate(converted) + return EnvWithBindVars(nil).Evaluate(converted) } func TestMySQLGolden(t *testing.T) { @@ -127,6 +135,6 @@ func TestMySQLGolden(t *testing.T) { func TestDebug1(t *testing.T) { // Debug - eval, err := testSingle(t, `SELECT 12.0 * 0`) + eval, err := testSingle(t, `SELECT 0x1 IN (0xFF, 64)`) t.Logf("eval=%s err=%v coll=%s", eval.String(), err, eval.Collation().Get().Name()) } diff --git a/go/vt/vtgate/evalengine/perf_test.go b/go/vt/vtgate/evalengine/perf_test.go new file mode 100644 index 00000000000..c2e6e43aec5 --- /dev/null +++ b/go/vt/vtgate/evalengine/perf_test.go @@ -0,0 +1,70 @@ +package evalengine_test + +import ( + "testing" + + "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vtgate/evalengine" +) + +func BenchmarkCompilerExpressions(b *testing.B) { + var testCases = []struct { + name string + expression string + values []sqltypes.Value + }{ + {"complex_arith", "((23 + column0) * 4.0e0) = ((column1 / 3.33e0) * 100)", []sqltypes.Value{sqltypes.NewInt64(666), sqltypes.NewUint64(420)}}, + {"comparison_i64", "column0 = 12", []sqltypes.Value{sqltypes.NewInt64(666)}}, + {"comparison_u64", "column0 = 12", []sqltypes.Value{sqltypes.NewUint64(666)}}, + {"comparison_dec", "column0 = 12", []sqltypes.Value{sqltypes.NewDecimal("420")}}, + {"comparison_f", "column0 = 12", []sqltypes.Value{sqltypes.NewFloat64(420.0)}}, + } + + for _, tc := range testCases { + expr, err := sqlparser.ParseExpr(tc.expression) + if err != nil { + b.Fatal(err) + } + + fields := evalengine.FieldResolver(makeFields(tc.values)) + cfg := &evalengine.Config{ + ResolveColumn: fields.Column, + ResolveType: fields.Type, + Collation: collations.CollationUtf8mb4ID, + Optimization: evalengine.OptimizationLevelCompile, + } + + translated, err := evalengine.Translate(expr, cfg) + if err != nil { + b.Fatal(err) + } + + b.Run(tc.name+"/eval=ast", func(b *testing.B) { + decompiled := evalengine.Deoptimize(translated) + + b.ResetTimer() + b.ReportAllocs() + + var env evalengine.ExpressionEnv + env.Row = tc.values + for n := 0; n < b.N; n++ { + _, _ = env.Evaluate(decompiled) + } + }) + + b.Run(tc.name+"/eval=vm", func(b *testing.B) { + compiled := translated.(*evalengine.CompiledExpr) + + b.ResetTimer() + b.ReportAllocs() + + var env evalengine.ExpressionEnv + env.Row = tc.values + for n := 0; n < b.N; n++ { + _, _ = env.EvaluateVM(compiled) + } + }) + } +} diff --git a/go/vt/vtgate/evalengine/testcases/cases.go b/go/vt/vtgate/evalengine/testcases/cases.go index 7b112b991a2..fecba3b2259 100644 --- a/go/vt/vtgate/evalengine/testcases/cases.go +++ b/go/vt/vtgate/evalengine/testcases/cases.go @@ -23,102 +23,67 @@ import ( "strconv" "strings" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" - "vitess.io/vitess/go/vt/vtgate/evalengine" ) -type TestCase interface { - Test(yield Iterator) - Environment() *evalengine.ExpressionEnv -} - -type Iterator func(query string, row []sqltypes.Value) - -type defaultEnv struct{} - -func (defaultEnv) Environment() *evalengine.ExpressionEnv { - return evalengine.EnvWithBindVars(nil, collations.CollationUtf8mb4ID) -} - -type JSONPathOperations struct{ defaultEnv } -type JSONArray struct{ defaultEnv } -type JSONObject struct{ defaultEnv } -type CharsetConversionOperators struct{ defaultEnv } -type CaseExprWithPredicate struct{ defaultEnv } -type Ceil struct{ defaultEnv } -type CaseExprWithValue struct{ defaultEnv } -type Base64 struct{ defaultEnv } -type Conversion struct{ defaultEnv } -type LargeDecimals struct{ defaultEnv } -type LargeIntegers struct{ defaultEnv } -type DecimalClamping struct{ defaultEnv } -type BitwiseOperatorsUnary struct{ defaultEnv } -type BitwiseOperators struct{ defaultEnv } -type WeightString struct{ defaultEnv } -type FloatFormatting struct{ defaultEnv } -type UnderscoreAndPercentage struct{ defaultEnv } -type Types struct{ defaultEnv } -type HexArithmetic struct{ defaultEnv } -type NumericTypes struct{ defaultEnv } -type NegateArithmetic struct{ defaultEnv } -type CollationOperations struct{ defaultEnv } -type LikeComparison struct{ defaultEnv } -type MultiComparisons struct{ defaultEnv } -type IsStatement struct{ defaultEnv } -type TupleComparisons struct{ defaultEnv } -type Comparisons struct{ defaultEnv } -type JSONExtract struct{} -type FnLower struct{ defaultEnv } -type FnUpper struct{ defaultEnv } -type FnCharLength struct{ defaultEnv } -type FnLength struct{ defaultEnv } -type FnBitLength struct{ defaultEnv } -type FnAscii struct{ defaultEnv } -type FnRepeat struct{ defaultEnv } -type FnHex struct{ defaultEnv } - var Cases = []TestCase{ - JSONExtract{}, - JSONPathOperations{}, - JSONArray{}, - JSONObject{}, - CharsetConversionOperators{}, - CaseExprWithPredicate{}, - Ceil{}, - CaseExprWithValue{}, - Base64{}, - Conversion{}, - LargeDecimals{}, - LargeIntegers{}, - DecimalClamping{}, - BitwiseOperatorsUnary{}, - BitwiseOperators{}, - WeightString{}, - FloatFormatting{}, - UnderscoreAndPercentage{}, - Types{}, - HexArithmetic{}, - NumericTypes{}, - NegateArithmetic{}, - CollationOperations{}, - LikeComparison{}, - MultiComparisons{}, - IsStatement{}, - TupleComparisons{}, - Comparisons{}, - FnLower{}, - FnUpper{}, - FnCharLength{}, - FnLength{}, - FnBitLength{}, - FnAscii{}, - FnRepeat{}, - FnHex{}, -} - -func (JSONPathOperations) Test(yield Iterator) { + {Run: JSONExtract, Schema: JSONExtract_Schema}, + {Run: JSONPathOperations}, + {Run: JSONArray}, + {Run: JSONObject}, + {Run: CharsetConversionOperators}, + {Run: CaseExprWithPredicate}, + {Run: CaseExprWithValue}, + {Run: Base64}, + {Run: Conversion}, + {Run: LargeDecimals}, + {Run: LargeIntegers}, + {Run: DecimalClamping}, + {Run: BitwiseOperatorsUnary}, + {Run: BitwiseOperators}, + {Run: WeightString}, + {Run: FloatFormatting}, + {Run: UnderscoreAndPercentage}, + {Run: Types}, + {Run: Arithmetic}, + {Run: HexArithmetic}, + {Run: NumericTypes}, + {Run: NegateArithmetic}, + {Run: CollationOperations}, + {Run: LikeComparison}, + {Run: MultiComparisons}, + {Run: IsStatement}, + {Run: NotStatement}, + {Run: LogicalStatement}, + {Run: TupleComparisons}, + {Run: Comparisons}, + {Run: InStatement}, + {Run: FnLower}, + {Run: FnUpper}, + {Run: FnCharLength}, + {Run: FnLength}, + {Run: FnBitLength}, + {Run: FnAscii}, + {Run: FnRepeat}, + {Run: FnHex}, + {Run: FnCeil}, + {Run: FnFloor}, + {Run: FnAbs}, + {Run: FnPi}, + {Run: FnAcos}, + {Run: FnAsin}, + {Run: FnAtan}, + {Run: FnAtan2}, + {Run: FnCos}, + {Run: FnCot}, + {Run: FnSin}, + {Run: FnTan}, + {Run: FnDegrees}, + {Run: FnRadians}, +} + +func JSONPathOperations(yield Query) { for _, obj := range inputJSONObjects { yield(fmt.Sprintf("JSON_KEYS('%s')", obj), nil) @@ -137,7 +102,7 @@ func (JSONPathOperations) Test(yield Iterator) { } } -func (JSONArray) Test(yield Iterator) { +func JSONArray(yield Query) { for _, a := range inputJSONPrimitives { yield(fmt.Sprintf("JSON_ARRAY(%s)", a), nil) for _, b := range inputJSONPrimitives { @@ -147,7 +112,7 @@ func (JSONArray) Test(yield Iterator) { yield("JSON_ARRAY()", nil) } -func (JSONObject) Test(yield Iterator) { +func JSONObject(yield Query) { for _, a := range inputJSONPrimitives { for _, b := range inputJSONPrimitives { yield(fmt.Sprintf("JSON_OBJECT(%s, %s)", a, b), nil) @@ -156,7 +121,7 @@ func (JSONObject) Test(yield Iterator) { yield("JSON_OBJECT()", nil) } -func (CharsetConversionOperators) Test(yield Iterator) { +func CharsetConversionOperators(yield Query) { var introducers = []string{ "", "_latin1", "_utf8mb4", "_utf8", "_binary", } @@ -176,7 +141,7 @@ func (CharsetConversionOperators) Test(yield Iterator) { } } -func (CaseExprWithPredicate) Test(yield Iterator) { +func CaseExprWithPredicate(yield Query) { var predicates = []string{ "true", "false", @@ -206,7 +171,7 @@ func (CaseExprWithPredicate) Test(yield Iterator) { }) } -func (Ceil) Test(yield Iterator) { +func FnCeil(yield Query) { var ceilInputs = []string{ "0", "1", @@ -224,49 +189,177 @@ func (Ceil) Test(yield Iterator) { yield(fmt.Sprintf("CEIL(%s)", num), nil) yield(fmt.Sprintf("CEILING(%s)", num), nil) } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("CEIL(%s)", num), nil) + yield(fmt.Sprintf("CEILING(%s)", num), nil) + } +} + +func FnFloor(yield Query) { + var floorInputs = []string{ + "0", + "1", + "-1", + "'1.5'", + "NULL", + "'ABC'", + "1.5e0", + "-1.5e0", + "9223372036854775810.4", + "-9223372036854775810.4", + } + + for _, num := range floorInputs { + yield(fmt.Sprintf("FLOOR(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("FLOOR(%s)", num), nil) + } +} + +func FnAbs(yield Query) { + var absInputs = []string{ + "0", + "1", + "-1", + "'1.5'", + "NULL", + "'ABC'", + "1.5e0", + "-1.5e0", + "9223372036854775810.4", + "-9223372036854775810.4", + } + + for _, num := range absInputs { + yield(fmt.Sprintf("ABS(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("ABS(%s)", num), nil) + } +} + +func FnPi(yield Query) { + yield("PI()+0.000000000000000000", nil) +} + +func FnAcos(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("ACOS(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("ACOS(%s)", num), nil) + } +} + +func FnAsin(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("ASIN(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("ASIN(%s)", num), nil) + } +} + +func FnAtan(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("ATAN(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("ATAN(%s)", num), nil) + } +} + +func FnAtan2(yield Query) { + for _, num1 := range radianInputs { + for _, num2 := range radianInputs { + yield(fmt.Sprintf("ATAN(%s, %s)", num1, num2), nil) + yield(fmt.Sprintf("ATAN2(%s, %s)", num1, num2), nil) + } + } + + for _, num1 := range inputBitwise { + for _, num2 := range inputBitwise { + yield(fmt.Sprintf("ATAN(%s, %s)", num1, num2), nil) + yield(fmt.Sprintf("ATAN2(%s, %s)", num1, num2), nil) + } + } } -// HACK: for CASE comparisons, the expression is supposed to decompose like this: -// -// CASE a WHEN b THEN bb WHEN c THEN cc ELSE d -// => CASE WHEN a = b THEN bb WHEN a == c THEN cc ELSE d -// -// See: https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#operator_case -// However, MySQL does not seem to be using the real `=` operator for some of these comparisons -// namely, numerical comparisons are coerced into an unsigned form when they shouldn't. -// Example: -// -// SELECT -1 = 18446744073709551615 -// => 0 -// SELECT -1 WHEN 18446744073709551615 THEN 1 ELSE 0 END -// => 1 -// -// This does not happen for other types, which all follow the behavior of the `=` operator, -// so we're going to assume this is a bug for now. -func comparisonSkip(a, b string) bool { - if a == "-1" && b == "18446744073709551615" { - return true +func FnCos(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("COS(%s)", num), nil) } - if b == "-1" && a == "18446744073709551615" { - return true + + for _, num := range inputBitwise { + yield(fmt.Sprintf("COS(%s)", num), nil) + } +} + +func FnCot(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("COT(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("COT(%s)", num), nil) + } +} + +func FnSin(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("SIN(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("SIN(%s)", num), nil) + } +} + +func FnTan(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("TAN(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("TAN(%s)", num), nil) } - if a == "9223372036854775808" && b == "-9223372036854775808" { - return true +} + +func FnDegrees(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("DEGREES(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("DEGREES(%s)", num), nil) } - if a == "-9223372036854775808" && b == "9223372036854775808" { - return true +} + +func FnRadians(yield Query) { + for _, num := range radianInputs { + yield(fmt.Sprintf("RADIANS(%s)", num), nil) + } + + for _, num := range inputBitwise { + yield(fmt.Sprintf("RADIANS(%s)", num), nil) } - return false } -func (CaseExprWithValue) Test(yield Iterator) { +func CaseExprWithValue(yield Query) { var elements []string elements = append(elements, inputBitwise...) elements = append(elements, inputComparisonElement...) for _, cmpbase := range elements { for _, val1 := range elements { - if comparisonSkip(cmpbase, val1) { + if !(bugs{}).CanCompare(cmpbase, val1) { continue } yield(fmt.Sprintf("case %s when %s then 1 else 0 end", cmpbase, val1), nil) @@ -274,7 +367,7 @@ func (CaseExprWithValue) Test(yield Iterator) { } } -func (Base64) Test(yield Iterator) { +func Base64(yield Query) { var inputs = []string{ `'bGlnaHQgdw=='`, `'bGlnaHQgd28='`, @@ -292,17 +385,9 @@ func (Base64) Test(yield Iterator) { } } -func (Conversion) Test(yield Iterator) { - var right = []string{ - "BINARY", "BINARY(1)", "BINARY(0)", "BINARY(16)", "BINARY(-1)", - "CHAR", "CHAR(1)", "CHAR(0)", "CHAR(16)", "CHAR(-1)", - "NCHAR", "NCHAR(1)", "NCHAR(0)", "NCHAR(16)", "NCHAR(-1)", - "DECIMAL", "DECIMAL(0, 4)", "DECIMAL(12, 0)", "DECIMAL(12, 4)", - "DOUBLE", "REAL", - "SIGNED", "UNSIGNED", "SIGNED INTEGER", "UNSIGNED INTEGER", "JSON", - } +func Conversion(yield Query) { for _, lhs := range inputConversions { - for _, rhs := range right { + for _, rhs := range inputConversionTypes { yield(fmt.Sprintf("CAST(%s AS %s)", lhs, rhs), nil) yield(fmt.Sprintf("CONVERT(%s, %s)", lhs, rhs), nil) yield(fmt.Sprintf("CAST(CAST(%s AS JSON) AS %s)", lhs, rhs), nil) @@ -310,7 +395,7 @@ func (Conversion) Test(yield Iterator) { } } -func (LargeDecimals) Test(yield Iterator) { +func LargeDecimals(yield Query) { var largepi = inputPi + inputPi for pos := 0; pos < len(largepi); pos++ { @@ -319,7 +404,7 @@ func (LargeDecimals) Test(yield Iterator) { } } -func (LargeIntegers) Test(yield Iterator) { +func LargeIntegers(yield Query) { var largepi = inputPi + inputPi for pos := 1; pos < len(largepi); pos++ { @@ -328,7 +413,7 @@ func (LargeIntegers) Test(yield Iterator) { } } -func (DecimalClamping) Test(yield Iterator) { +func DecimalClamping(yield Query) { for pos := 0; pos < len(inputPi); pos++ { for m := 0; m < min(len(inputPi), 67); m += 2 { for d := 0; d <= min(m, 33); d += 2 { @@ -338,7 +423,7 @@ func (DecimalClamping) Test(yield Iterator) { } } -func (BitwiseOperatorsUnary) Test(yield Iterator) { +func BitwiseOperatorsUnary(yield Query) { for _, op := range []string{"~", "BIT_COUNT"} { for _, rhs := range inputBitwise { yield(fmt.Sprintf("%s(%s)", op, rhs), nil) @@ -346,17 +431,23 @@ func (BitwiseOperatorsUnary) Test(yield Iterator) { } } -func (BitwiseOperators) Test(yield Iterator) { +func BitwiseOperators(yield Query) { for _, op := range []string{"&", "|", "^", "<<", ">>"} { for _, lhs := range inputBitwise { for _, rhs := range inputBitwise { yield(fmt.Sprintf("%s %s %s", lhs, op, rhs), nil) } } + + for _, lhs := range inputConversions { + for _, rhs := range inputConversions { + yield(fmt.Sprintf("%s %s %s", lhs, op, rhs), nil) + } + } } } -func (WeightString) Test(yield Iterator) { +func WeightString(yield Query) { var inputs = []string{ `'foobar'`, `_latin1 'foobar'`, `'foobar' as char(12)`, `'foobar' as binary(12)`, @@ -370,7 +461,7 @@ func (WeightString) Test(yield Iterator) { } } -func (FloatFormatting) Test(yield Iterator) { +func FloatFormatting(yield Query) { var floats = []string{ `18446744073709551615`, `9223372036854775807`, @@ -398,7 +489,7 @@ func (FloatFormatting) Test(yield Iterator) { } } -func (UnderscoreAndPercentage) Test(yield Iterator) { +func UnderscoreAndPercentage(yield Query) { var queries = []string{ `'pokemon' LIKE 'poke%'`, `'pokemon' LIKE 'poke\%'`, @@ -422,7 +513,7 @@ func (UnderscoreAndPercentage) Test(yield Iterator) { } } -func (Types) Test(yield Iterator) { +func Types(yield Query) { var queries = []string{ "1 > 3", "3 > 1", @@ -453,7 +544,25 @@ func (Types) Test(yield Iterator) { } } -func (HexArithmetic) Test(yield Iterator) { +func Arithmetic(yield Query) { + operators := []string{"+", "-", "*", "/", "DIV", "%", "MOD"} + + for _, op := range operators { + for _, lhs := range inputConversions { + for _, rhs := range inputConversions { + yield(fmt.Sprintf("%s %s %s", lhs, op, rhs), nil) + } + } + + for _, lhs := range inputBitwise { + for _, rhs := range inputBitwise { + yield(fmt.Sprintf("%s %s %s", lhs, op, rhs), nil) + } + } + } +} + +func HexArithmetic(yield Query) { var cases = []string{ `0`, `1`, `1.0`, `0.0`, `1.0e0`, `0.0e0`, `X'00'`, `X'1234'`, `X'ff'`, @@ -470,7 +579,7 @@ func (HexArithmetic) Test(yield Iterator) { } } -func (NumericTypes) Test(yield Iterator) { +func NumericTypes(yield Query) { var numbers = []string{ `1234`, `-1234`, `18446744073709551614`, @@ -497,7 +606,7 @@ func (NumericTypes) Test(yield Iterator) { } } -func (NegateArithmetic) Test(yield Iterator) { +func NegateArithmetic(yield Query) { var cases = []string{ `0`, `1`, `1.0`, `0.0`, `1.0e0`, `0.0e0`, `X'00'`, `X'1234'`, `X'ff'`, @@ -515,7 +624,7 @@ func (NegateArithmetic) Test(yield Iterator) { } } -func (CollationOperations) Test(yield Iterator) { +func CollationOperations(yield Query) { var cases = []string{ "COLLATION('foobar')", "COLLATION(_latin1 'foobar')", @@ -529,7 +638,7 @@ func (CollationOperations) Test(yield Iterator) { } } -func (LikeComparison) Test(yield Iterator) { +func LikeComparison(yield Query) { var left = []string{ `'foobar'`, `'FOOBAR'`, `'1234'`, `1234`, @@ -552,7 +661,7 @@ func (LikeComparison) Test(yield Iterator) { } } -func (MultiComparisons) Test(yield Iterator) { +func MultiComparisons(yield Query) { var numbers = []string{ `0`, `-1`, `1`, `0.0`, `1.0`, `-1.0`, `1.0E0`, `-1.0E0`, `0.0E0`, strconv.FormatUint(math.MaxUint64, 10), @@ -596,7 +705,7 @@ func (MultiComparisons) Test(yield Iterator) { } } -func (IsStatement) Test(yield Iterator) { +func IsStatement(yield Query) { var left = []string{ "NULL", "TRUE", "FALSE", `1`, `0`, `1.0`, `0.0`, `-1`, `666`, @@ -619,7 +728,27 @@ func (IsStatement) Test(yield Iterator) { } } -func (TupleComparisons) Test(yield Iterator) { +func NotStatement(yield Query) { + var ops = []string{"NOT", "!"} + for _, op := range ops { + for _, i := range inputConversions { + yield(fmt.Sprintf("%s %s", op, i), nil) + } + } +} + +func LogicalStatement(yield Query) { + var ops = []string{"AND", "&&", "OR", "||", "XOR"} + for _, op := range ops { + for _, l := range inputConversions { + for _, r := range inputConversions { + yield(fmt.Sprintf("%s %s %s", l, op, r), nil) + } + } + } +} + +func TupleComparisons(yield Query) { var elems = []string{"NULL", "-1", "0", "1"} var operators = []string{"=", "!=", "<=>", "<", "<=", ">", ">="} @@ -637,18 +766,24 @@ func (TupleComparisons) Test(yield Iterator) { } } -func (Comparisons) Test(yield Iterator) { +func Comparisons(yield Query) { var operators = []string{"=", "!=", "<=>", "<", "<=", ">", ">="} for _, op := range operators { - for i := 0; i < len(inputComparisonElement); i++ { - for j := 0; j < len(inputComparisonElement); j++ { - yield(fmt.Sprintf("%s %s %s", inputComparisonElement[i], op, inputComparisonElement[j]), nil) + for _, l := range inputComparisonElement { + for _, r := range inputComparisonElement { + yield(fmt.Sprintf("%s %s %s", l, op, r), nil) + } + } + + for _, l := range inputConversions { + for _, r := range inputConversions { + yield(fmt.Sprintf("%s %s %s", l, op, r), nil) } } } } -func (JSONExtract) Test(yield Iterator) { +func JSONExtract(yield Query) { var cases = []struct { Operator string Path string @@ -688,60 +823,55 @@ func (JSONExtract) Test(yield Iterator) { } } -func (JSONExtract) Environment() *evalengine.ExpressionEnv { - env := new(evalengine.ExpressionEnv) - env.DefaultCollation = collations.CollationUtf8mb4ID - env.Fields = []*querypb.Field{ - { - Name: "column0", - Type: sqltypes.TypeJSON, - ColumnType: "JSON", - }, - } - return env +var JSONExtract_Schema = []*querypb.Field{ + { + Name: "column0", + Type: sqltypes.TypeJSON, + ColumnType: "JSON", + }, } -func (FnLower) Test(yield Iterator) { +func FnLower(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("LOWER(%s)", str), nil) yield(fmt.Sprintf("LCASE(%s)", str), nil) } } -func (FnUpper) Test(yield Iterator) { +func FnUpper(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("UPPER(%s)", str), nil) yield(fmt.Sprintf("UCASE(%s)", str), nil) } } -func (FnCharLength) Test(yield Iterator) { +func FnCharLength(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("CHAR_LENGTH(%s)", str), nil) yield(fmt.Sprintf("CHARACTER_LENGTH(%s)", str), nil) } } -func (FnLength) Test(yield Iterator) { +func FnLength(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("LENGTH(%s)", str), nil) yield(fmt.Sprintf("OCTET_LENGTH(%s)", str), nil) } } -func (FnBitLength) Test(yield Iterator) { +func FnBitLength(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("BIT_LENGTH(%s)", str), nil) } } -func (FnAscii) Test(yield Iterator) { +func FnAscii(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("ASCII(%s)", str), nil) } } -func (FnRepeat) Test(yield Iterator) { +func FnRepeat(yield Query) { counts := []string{"-1", "1.2", "3", "1073741825"} for _, str := range inputStrings { for _, cnt := range counts { @@ -750,7 +880,7 @@ func (FnRepeat) Test(yield Iterator) { } } -func (FnHex) Test(yield Iterator) { +func FnHex(yield Query) { for _, str := range inputStrings { yield(fmt.Sprintf("hex(%s)", str), nil) } @@ -763,3 +893,23 @@ func (FnHex) Test(yield Iterator) { yield(fmt.Sprintf("hex(%s)", str), nil) } } + +func InStatement(yield Query) { + roots := append([]string(nil), inputBitwise...) + roots = append(roots, inputComparisonElement...) + + genSubsets(roots, 3, func(inputs []string) { + if !(bugs{}).CanCompare(inputs...) { + return + } + yield(fmt.Sprintf("%s IN (%s, %s)", inputs[0], inputs[1], inputs[2]), nil) + yield(fmt.Sprintf("%s IN (%s, %s)", inputs[2], inputs[1], inputs[0]), nil) + yield(fmt.Sprintf("%s IN (%s, %s)", inputs[1], inputs[0], inputs[2]), nil) + yield(fmt.Sprintf("%s IN (%s, %s, %s)", inputs[0], inputs[1], inputs[2], inputs[0]), nil) + + yield(fmt.Sprintf("%s NOT IN (%s, %s)", inputs[0], inputs[1], inputs[2]), nil) + yield(fmt.Sprintf("%s NOT IN (%s, %s)", inputs[2], inputs[1], inputs[0]), nil) + yield(fmt.Sprintf("%s NOT IN (%s, %s)", inputs[1], inputs[0], inputs[2]), nil) + yield(fmt.Sprintf("%s NOT IN (%s, %s, %s)", inputs[0], inputs[1], inputs[2], inputs[0]), nil) + }) +} diff --git a/go/vt/vtgate/evalengine/testcases/helpers.go b/go/vt/vtgate/evalengine/testcases/helpers.go index 6402549576f..242f803ccc8 100644 --- a/go/vt/vtgate/evalengine/testcases/helpers.go +++ b/go/vt/vtgate/evalengine/testcases/helpers.go @@ -16,7 +16,27 @@ limitations under the License. package testcases -import "vitess.io/vitess/go/sqltypes" +import ( + "reflect" + "runtime" + "strings" + + "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" +) + +type Query func(query string, row []sqltypes.Value) +type Runner func(yield Query) +type TestCase struct { + Run Runner + Schema []*querypb.Field +} + +func (tc TestCase) Name() string { + ptr := reflect.ValueOf(tc.Run).Pointer() + name := runtime.FuncForPC(ptr).Name() + return name[strings.LastIndexByte(name, '.')+1:] +} func perm(a []string, f func([]string)) { perm1(a, f, 0) @@ -67,3 +87,51 @@ func mustJSON(j string) sqltypes.Value { } return v } + +type bugs struct{} + +// CanCompare skips comparisons in CASE and IN expressions that behave in unexpected +// ways. The following is an example of expressions giving un-intuitive results (i.e. +// results that do not match the behavior of the `=` operator, which is supposed to apply, +// pair-wise, to the comparisons in a CASE or IN statement): +// +// SELECT -1 IN (0xFF, 18446744073709551615) => 1 +// SELECT -1 IN (0, 18446744073709551615) => 0 +// SELECT -1 IN (0.0, 18446744073709551615) => 1 +// +// SELECT 'FOO' IN ('foo', 0x00) => 0 +// SELECT 'FOO' IN ('foo', 0) => 1 +// SELECT 'FOO' IN ('foo', 0x00, CAST('bar' as char)) => 1 +// SELECT 'FOO' IN ('foo', 0x00, 'bar') => 0 +// +// SELECT 9223372036854775808 IN (0.0e0, -9223372036854775808) => 1 +// SELECT 9223372036854775808 IN (0, -9223372036854775808) => 0 +// SELECT 9223372036854775808 IN (0.0, -9223372036854775808) => 1 +// +// Generally speaking, it's counter-intuitive that adding more (unrelated) types to the +// right-hand of the IN operator would change the result of the operation itself. It seems +// like there's logic that changes the way the elements are compared with a type aggregation +// but this is not documented anywhere. +func (bugs) CanCompare(elems ...string) bool { + var invalid = map[string]string{ + "18446744073709551615": "-1", + `9223372036854775808`: `-9223372036854775808`, + } + + for i, e := range elems { + if strings.HasPrefix(e, "_binary ") || + strings.HasPrefix(e, "0x") || + strings.HasPrefix(e, "X'") || + strings.HasSuffix(e, "collate utf8mb4_0900_as_cs") { + return false + } + if other, ok := invalid[e]; ok { + for j := 0; j < len(elems); j++ { + if i != j && elems[j] == other { + return false + } + } + } + } + return true +} diff --git a/go/vt/vtgate/evalengine/testcases/inputs.go b/go/vt/vtgate/evalengine/testcases/inputs.go index 067106df468..31fb9d5b8a5 100644 --- a/go/vt/vtgate/evalengine/testcases/inputs.go +++ b/go/vt/vtgate/evalengine/testcases/inputs.go @@ -19,6 +19,9 @@ package testcases import ( "math" "strconv" + + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/vtgate/evalengine" ) var inputJSONObjects = []string{ @@ -57,7 +60,25 @@ var inputBitwise = []string{ "64", "'64'", "_binary '64'", "X'40'", "_binary X'40'", } -var inputComparisonElement = []string{"NULL", "-1", "0", "1", +var radianInputs = []string{ + "0", + "1", + "-1", + "'1.5'", + "NULL", + "'ABC'", + "1.5e0", + "-1.5e0", + "9223372036854775810.4", + "-9223372036854775810.4", + string(evalengine.FormatFloat(sqltypes.Float64, math.Pi)), + string(evalengine.FormatFloat(sqltypes.Float64, math.MaxFloat64)), + string(evalengine.FormatFloat(sqltypes.Float64, math.SmallestNonzeroFloat32)), + string(evalengine.FormatFloat(sqltypes.Float64, math.SmallestNonzeroFloat64)), +} + +var inputComparisonElement = []string{ + "NULL", "-1", "0", "1", `'foo'`, `'bar'`, `'FOO'`, `'BAR'`, `'foo' collate utf8mb4_0900_as_cs`, `'FOO' collate utf8mb4_0900_as_cs`, @@ -76,6 +97,29 @@ var inputConversions = []string{ "18446744073709540000e0", "-18446744073709540000e0", "JSON_OBJECT()", "JSON_ARRAY()", + "cast(0 as json)", "cast(1 as json)", + "cast(true as json)", "cast(false as json)", + "cast('{}' as json)", "cast('[]' as json)", + "cast('null' as json)", "cast('true' as json)", "cast('false' as json)", + // JSON numbers + "cast('1' as json)", "cast('2' as json)", "cast('1.1' as json)", "cast('-1.1' as json)", + // JSON strings + "cast('\"foo\"' as json)", "cast('\"bar\"' as json)", "cast('invalid' as json)", + // JSON binary values + "cast(_binary' \"foo\"' as json)", "cast(_binary '\"bar\"' as json)", + "cast(0xFF666F6F626172FF as json)", "cast(0x666F6F626172FF as json)", + "cast(0b01 as json)", "cast(0b001 as json)", + // JSON arrays + "cast('[\"a\"]' as json)", "cast('[\"ab\"]' as json)", + "cast('[\"ab\", \"cd\", \"ef\"]' as json)", "cast('[\"ab\", \"ef\"]' as json)", + // JSON objects + "cast('{\"a\": 1, \"b\": 2}' as json)", "cast('{\"b\": 2, \"a\": 1}' as json)", + "cast('{\"c\": 1, \"b\": 2}' as json)", "cast('{\"b\": 2, \"c\": 1}' as json)", + "cast(' \"b\": 2}' as json)", "cast('\"a\": 1' as json)", + // JSON date, datetime & time + "cast(date '2000-01-01' as json)", "cast(date '2000-01-02' as json)", + "cast(timestamp '2000-01-01 12:34:58' as json)", + "cast(time '12:34:56' as json)", "cast(time '12:34:58' as json)", "cast(time '5 12:34:58' as json)", } const inputPi = "314159265358979323846264338327950288419716939937510582097494459" @@ -110,3 +154,12 @@ var inputStrings = []string{ // "_utf32 'AabcÅå'", // "_ucs2 'AabcÅå'", } + +var inputConversionTypes = []string{ + "BINARY", "BINARY(1)", "BINARY(0)", "BINARY(16)", "BINARY(-1)", + "CHAR", "CHAR(1)", "CHAR(0)", "CHAR(16)", "CHAR(-1)", + "NCHAR", "NCHAR(1)", "NCHAR(0)", "NCHAR(16)", "NCHAR(-1)", + "DECIMAL", "DECIMAL(0, 4)", "DECIMAL(12, 0)", "DECIMAL(12, 4)", + "DOUBLE", "REAL", + "SIGNED", "UNSIGNED", "SIGNED INTEGER", "UNSIGNED INTEGER", "JSON", +} diff --git a/go/vt/vtgate/evalengine/translate.go b/go/vt/vtgate/evalengine/translate.go index 562dc920c21..d8a4eb054fb 100644 --- a/go/vt/vtgate/evalengine/translate.go +++ b/go/vt/vtgate/evalengine/translate.go @@ -22,19 +22,12 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" ) -type ( - TranslationLookup interface { - ColumnLookup(col *sqlparser.ColName) (int, error) - CollationForExpr(expr sqlparser.Expr) collations.ID - DefaultCollation() collations.ID - } -) - var ErrTranslateExprNotSupported = "expr cannot be translated, not supported" var ErrEvaluatedExprNotSupported = "expr cannot be evaluated, not supported" @@ -60,7 +53,6 @@ func (ast *astCompiler) translateComparisonExpr2(op sqlparser.ComparisonExprOper return &InExpr{ BinaryExpr: binaryExpr, Negate: op == sqlparser.NotInOp, - Hashed: nil, }, nil } @@ -107,14 +99,14 @@ func (ast *astCompiler) translateLogicalExpr(opname string, left, right sqlparse return nil, err } - var logic func(l, r boolean) boolean + var logic func(l, r Expr, env *ExpressionEnv) (boolean, error) switch opname { case "AND": - logic = func(l, r boolean) boolean { return l.and(r) } + logic = func(l, r Expr, env *ExpressionEnv) (boolean, error) { return opAnd(l, r, env) } case "OR": - logic = func(l, r boolean) boolean { return l.or(r) } + logic = func(l, r Expr, env *ExpressionEnv) (boolean, error) { return opOr(l, r, env) } case "XOR": - logic = func(l, r boolean) boolean { return l.xor(r) } + logic = func(l, r Expr, env *ExpressionEnv) (boolean, error) { return opXor(l, r, env) } default: panic("unexpected logical operator") } @@ -158,35 +150,63 @@ func (ast *astCompiler) translateIsExpr(left sqlparser.Expr, op sqlparser.IsExpr }, nil } -func (ast *astCompiler) getCollation(expr sqlparser.Expr) collations.TypedCollation { - collation := collations.TypedCollation{ +func defaultCoercionCollation(id collations.ID) collations.TypedCollation { + return collations.TypedCollation{ + Collation: id, Coercibility: collations.CoerceCoercible, Repertoire: collations.RepertoireUnicode, } - if ast.lookup != nil { - collation.Collation = ast.lookup.CollationForExpr(expr) - if collation.Collation == collations.Unknown { - collation.Collation = ast.lookup.DefaultCollation() - } +} + +func (ast *astCompiler) translateBindVar(arg *sqlparser.Argument) (Expr, error) { + bvar := NewBindVar(arg.Name) + bvar.Collation.Collation = ast.cfg.Collation + + if arg.Type >= 0 { + bvar.Type = arg.Type + bvar.typed = true } else { - collation.Collation = collations.Default() + ast.untyped++ } - return collation + return bvar, nil +} + +func (ast *astCompiler) translateColOffset(col *sqlparser.Offset) (Expr, error) { + column := NewColumn(col.V) + if ast.cfg.ResolveType != nil { + column.Type, column.Collation.Collation, column.typed = ast.cfg.ResolveType(col.Original) + } + if column.Collation.Collation == collations.Unknown { + column.Collation.Collation = ast.cfg.Collation + } + if !column.typed { + ast.untyped++ + } + return column, nil } func (ast *astCompiler) translateColName(colname *sqlparser.ColName) (Expr, error) { - if ast.lookup == nil { - return nil, vterrors.Wrap(translateExprNotSupported(colname), "cannot lookup column") + if ast.cfg.ResolveColumn == nil { + return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "cannot lookup column (column access not supported here)") } - idx, err := ast.lookup.ColumnLookup(colname) + idx, err := ast.cfg.ResolveColumn(colname) if err != nil { return nil, err } - collation := ast.getCollation(colname) - return NewColumn(idx, collation), nil + column := NewColumn(idx) + if ast.cfg.ResolveType != nil { + column.Type, column.Collation.Collation, column.typed = ast.cfg.ResolveType(colname) + } + if column.Collation.Collation == collations.Unknown { + column.Collation.Collation = ast.cfg.Collation + } + if !column.typed { + ast.untyped++ + } + return column, nil } -func (ast *astCompiler) translateLiteral(lit *sqlparser.Literal) (*Literal, error) { +func translateLiteral(lit *sqlparser.Literal, collation collations.ID) (*Literal, error) { switch lit.Type { case sqlparser.IntVal: return NewLiteralIntegralFromBytes(lit.Bytes()) @@ -195,12 +215,13 @@ func (ast *astCompiler) translateLiteral(lit *sqlparser.Literal) (*Literal, erro case sqlparser.DecimalVal: return NewLiteralDecimalFromBytes(lit.Bytes()) case sqlparser.StrVal: - collation := ast.getCollation(lit) - return NewLiteralString(lit.Bytes(), collation), nil + return NewLiteralString(lit.Bytes(), defaultCoercionCollation(collation)), nil case sqlparser.HexNum: return NewLiteralBinaryFromHexNum(lit.Bytes()) case sqlparser.HexVal: return NewLiteralBinaryFromHex(lit.Bytes()) + case sqlparser.BitVal: + return NewLiteralBinaryFromBit(lit.Bytes()) case sqlparser.DateVal: return NewLiteralDateFromBytes(lit.Bytes()) case sqlparser.TimeVal: @@ -235,6 +256,10 @@ func (ast *astCompiler) translateBinaryExpr(binary *sqlparser.BinaryExpr) (Expr, return &ArithmeticExpr{BinaryExpr: binaryExpr, Op: &opArithMul{}}, nil case sqlparser.DivOp: return &ArithmeticExpr{BinaryExpr: binaryExpr, Op: &opArithDiv{}}, nil + case sqlparser.IntDivOp: + return &ArithmeticExpr{BinaryExpr: binaryExpr, Op: &opArithIntDiv{}}, nil + case sqlparser.ModOp: + return &ArithmeticExpr{BinaryExpr: binaryExpr, Op: &opArithMod{}}, nil case sqlparser.BitAndOp: return &BitwiseExpr{BinaryExpr: binaryExpr, Op: &opBitAnd{}}, nil case sqlparser.BitOrOp: @@ -314,17 +339,19 @@ func (ast *astCompiler) translateIntroducerExpr(introduced *sqlparser.Introducer } } case *BindVariable: - if lit.tuple { + if lit.Type == sqltypes.Tuple { panic("parser allowed introducer before tuple") } switch collation { case collations.CollationBinaryID: - lit.coerce = sqltypes.VarBinary - lit.col = collationBinary + lit.Type = sqltypes.VarBinary + lit.Collation = collationBinary + lit.typed = true default: - lit.coerce = sqltypes.VarChar - lit.col.Collation = collation + lit.Type = sqltypes.VarChar + lit.Collation.Collation = collation + lit.typed = true } default: panic("character set introducers are only supported for literals and arguments") @@ -336,7 +363,7 @@ func (ast *astCompiler) translateIntegral(lit *sqlparser.Literal) (int, bool, er if lit == nil { return 0, false, nil } - literal, err := ast.translateLiteral(lit) + literal, err := translateLiteral(lit, ast.cfg.Collation) if err != nil { return 0, false, err } @@ -443,22 +470,17 @@ func (ast *astCompiler) translateExpr(e sqlparser.Expr) (Expr, error) { case sqlparser.BoolVal: return NewLiteralBool(bool(node)), nil case *sqlparser.ColName: - ast.entities.columns++ return ast.translateColName(node) case *sqlparser.Offset: - ast.entities.columns++ - return NewColumn(node.V, ast.getCollation(node)), nil + return ast.translateColOffset(node) case *sqlparser.ComparisonExpr: return ast.translateComparisonExpr(node.Operator, node.Left, node.Right) - case sqlparser.Argument: - ast.entities.bvars++ - collation := ast.getCollation(e) - return NewBindVar(string(node), collation), nil + case *sqlparser.Argument: + return ast.translateBindVar(node) case sqlparser.ListArg: - ast.entities.bvars++ return NewBindVarTuple(string(node)), nil case *sqlparser.Literal: - return ast.translateLiteral(node) + return translateLiteral(node, ast.cfg.Collation) case *sqlparser.AndExpr: return ast.translateLogicalExpr("AND", node.Left, node.Right) case *sqlparser.OrExpr: @@ -495,15 +517,45 @@ func (ast *astCompiler) translateExpr(e sqlparser.Expr) (Expr, error) { } type astCompiler struct { - lookup TranslationLookup - entities struct { - columns int - bvars int - } + cfg *Config + untyped int +} + +type ColumnResolver func(name *sqlparser.ColName) (int, error) +type TypeResolver func(expr sqlparser.Expr) (sqltypes.Type, collations.ID, bool) + +type OptimizationLevel int8 + +const ( + OptimizationLevelDefault OptimizationLevel = iota + OptimizationLevelSimplify + OptimizationLevelCompile + OptimizationLevelCompilerDebug + OptimizationLevelMax + OptimizationLevelNone OptimizationLevel = -1 +) + +type Config struct { + ResolveColumn ColumnResolver + ResolveType TypeResolver + + Collation collations.ID + Optimization OptimizationLevel + CompilerErr error } -func TranslateEx(e sqlparser.Expr, lookup TranslationLookup, simplify bool) (Expr, error) { - ast := astCompiler{lookup: lookup} +func Translate(e sqlparser.Expr, cfg *Config) (Expr, error) { + if cfg == nil { + cfg = &Config{} + } + if cfg.Collation == collations.Unknown { + cfg.Collation = collations.Default() + } + if cfg.Optimization == OptimizationLevelDefault { + cfg.Optimization = OptimizationLevelSimplify + } + + ast := astCompiler{cfg: cfg} expr, err := ast.translateExpr(e) if err != nil { @@ -514,19 +566,46 @@ func TranslateEx(e sqlparser.Expr, lookup TranslationLookup, simplify bool) (Exp return nil, err } - if simplify { + if cfg.Optimization >= OptimizationLevelSimplify && cfg.Optimization != OptimizationLevelCompilerDebug { var staticEnv ExpressionEnv - if lookup != nil { - staticEnv.DefaultCollation = lookup.DefaultCollation() - } else { - staticEnv.DefaultCollation = collations.Default() - } expr, err = simplifyExpr(&staticEnv, expr) } + + if cfg.Optimization >= OptimizationLevelCompile && ast.untyped == 0 { + comp := compiler{cfg: cfg} + var ct ctype + if ct, cfg.CompilerErr = comp.compileExpr(expr); cfg.CompilerErr == nil { + if comp.asm.stack.cur != 1 { + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "bad compilation: stack pointer at %d after compilation", comp.asm.stack.cur) + } + expr = &CompiledExpr{code: comp.asm.ins, original: expr, stack: comp.asm.stack.max, typed: ct.Type} + } + } + return expr, err } -// Translate translates between AST expressions and executable expressions -func Translate(e sqlparser.Expr, lookup TranslationLookup) (Expr, error) { - return TranslateEx(e, lookup, true) +type FieldResolver []*querypb.Field + +func (fields FieldResolver) Column(col *sqlparser.ColName) (int, error) { + name := col.CompliantName() + for i, f := range fields { + if f.Name == name { + return i, nil + } + } + return 0, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unknown column: %q", sqlparser.String(col)) +} + +func (fields FieldResolver) Type(expr sqlparser.Expr) (sqltypes.Type, collations.ID, bool) { + switch expr := expr.(type) { + case *sqlparser.ColName: + name := expr.CompliantName() + for _, f := range fields { + if f.Name == name { + return f.Type, collations.ID(f.Charset), true + } + } + } + return 0, 0, false } diff --git a/go/vt/vtgate/evalengine/translate_builtin.go b/go/vt/vtgate/evalengine/translate_builtin.go index 4228970ecbd..ab4e340e431 100644 --- a/go/vt/vtgate/evalengine/translate_builtin.go +++ b/go/vt/vtgate/evalengine/translate_builtin.go @@ -96,22 +96,91 @@ func (ast *astCompiler) translateFuncExpr(fn *sqlparser.FuncExpr) (Expr, error) if len(args) != 1 { return nil, argError(method) } - return &builtinHex{CallExpr: call}, nil + return &builtinHex{CallExpr: call, collate: ast.cfg.Collation}, nil case "ceil", "ceiling": if len(args) != 1 { return nil, argError(method) } return &builtinCeil{CallExpr: call}, nil + case "floor": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinFloor{CallExpr: call}, nil + case "abs": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinAbs{CallExpr: call}, nil + case "pi": + if len(args) != 0 { + return nil, argError(method) + } + return &builtinPi{CallExpr: call}, nil + case "acos": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinAcos{CallExpr: call}, nil + case "asin": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinAsin{CallExpr: call}, nil + case "atan": + switch len(args) { + case 1: + return &builtinAtan{CallExpr: call}, nil + case 2: + return &builtinAtan2{CallExpr: call}, nil + default: + return nil, argError(method) + } + case "atan2": + if len(args) != 2 { + return nil, argError(method) + } + return &builtinAtan2{CallExpr: call}, nil + case "cos": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinCos{CallExpr: call}, nil + case "cot": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinCot{CallExpr: call}, nil + case "sin": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinSin{CallExpr: call}, nil + case "tan": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinTan{CallExpr: call}, nil + case "degrees": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinDegrees{CallExpr: call}, nil + case "radians": + if len(args) != 1 { + return nil, argError(method) + } + return &builtinRadians{CallExpr: call}, nil case "lower", "lcase": if len(args) != 1 { return nil, argError(method) } - return &builtinChangeCase{CallExpr: call, upcase: false}, nil + return &builtinChangeCase{CallExpr: call, upcase: false, collate: ast.cfg.Collation}, nil case "upper", "ucase": if len(args) != 1 { return nil, argError(method) } - return &builtinChangeCase{CallExpr: call, upcase: true}, nil + return &builtinChangeCase{CallExpr: call, upcase: true, collate: ast.cfg.Collation}, nil case "char_length", "character_length": if len(args) != 1 { return nil, argError(method) @@ -136,7 +205,7 @@ func (ast *astCompiler) translateFuncExpr(fn *sqlparser.FuncExpr) (Expr, error) if len(args) != 2 { return nil, argError(method) } - return &builtinRepeat{CallExpr: call}, nil + return &builtinRepeat{CallExpr: call, collate: ast.cfg.Collation}, nil case "from_base64": if len(args) != 1 { return nil, argError(method) @@ -146,7 +215,7 @@ func (ast *astCompiler) translateFuncExpr(fn *sqlparser.FuncExpr) (Expr, error) if len(args) != 1 { return nil, argError(method) } - return &builtinToBase64{CallExpr: call}, nil + return &builtinToBase64{CallExpr: call, collate: ast.cfg.Collation}, nil case "json_depth": if len(args) != 1 { return nil, argError(method) diff --git a/go/vt/vtgate/evalengine/translate_card.go b/go/vt/vtgate/evalengine/translate_card.go index 650563daaea..6238aa2b8ef 100644 --- a/go/vt/vtgate/evalengine/translate_card.go +++ b/go/vt/vtgate/evalengine/translate_card.go @@ -19,6 +19,7 @@ package evalengine import ( "fmt" + "vitess.io/vitess/go/sqltypes" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" ) @@ -30,7 +31,7 @@ func errCardinality(expected int) error { func (ast *astCompiler) cardinality(expr Expr) int { switch expr := expr.(type) { case *BindVariable: - if expr.tuple { + if expr.Type == sqltypes.Tuple { return -1 } return 1 @@ -134,6 +135,8 @@ func (ast *astCompiler) cardExpr(expr Expr) error { return ast.cardUnary(expr.Inner) case *BitwiseNotExpr: return ast.cardUnary(expr.Inner) + case *NotExpr: + return ast.cardUnary(expr.Inner) case *ArithmeticExpr: return ast.cardBinary(expr.Left, expr.Right) case *LogicalExpr: @@ -162,7 +165,7 @@ func (ast *astCompiler) cardExpr(expr Expr) error { } } case *BindVariable: - if !r.tuple { + if r.Type != sqltypes.Tuple { return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "rhs of an In operation should be a tuple") } if left != 1 { diff --git a/go/vt/vtgate/evalengine/translate_convert.go b/go/vt/vtgate/evalengine/translate_convert.go index 847494780d2..58a1886b5f2 100644 --- a/go/vt/vtgate/evalengine/translate_convert.go +++ b/go/vt/vtgate/evalengine/translate_convert.go @@ -40,7 +40,7 @@ func (ast *astCompiler) binaryCollationForCollation(collation collations.ID) col func (ast *astCompiler) translateConvertCharset(charset string, binary bool) (collations.ID, error) { if charset == "" { - collation := ast.lookup.DefaultCollation() + collation := ast.cfg.Collation if binary { collation = ast.binaryCollationForCollation(collation) } diff --git a/go/vt/vtgate/evalengine/translate_simplify.go b/go/vt/vtgate/evalengine/translate_simplify.go index b76adfe96a0..3e957a943fc 100644 --- a/go/vt/vtgate/evalengine/translate_simplify.go +++ b/go/vt/vtgate/evalengine/translate_simplify.go @@ -16,12 +16,6 @@ limitations under the License. package evalengine -import ( - "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/vthash" -) - func (expr *Literal) constant() bool { return true } @@ -96,54 +90,10 @@ func (inexpr *InExpr) simplify(env *ExpressionEnv) error { return err } - tuple, ok := inexpr.Right.(TupleExpr) - if !ok { - return nil - } - - var ( - collation collations.ID - typ sqltypes.Type - optimize = true - ) - - for i, expr := range tuple { - if lit, ok := expr.(*Literal); ok { - thisColl := evalCollation(lit.inner).Collation - thisTyp := lit.inner.SQLType() - if i == 0 { - collation = thisColl - typ = thisTyp - continue - } - if collation == thisColl && typ == thisTyp { - continue - } - } - optimize = false - break + if err := inexpr.Right.simplify(env); err != nil { + return err } - if optimize { - inexpr.Hashed = make(map[vthash.Hash]int) - hasher := vthash.New() - for i, expr := range tuple { - lit := expr.(*Literal) - inner, ok := lit.inner.(hashable) - if !ok { - inexpr.Hashed = nil - break - } - - inner.Hash(&hasher) - hash := hasher.Sum128() - hasher.Reset() - - if _, found := inexpr.Hashed[hash]; !found { - inexpr.Hashed[hash] = i - } - } - } return nil } diff --git a/go/vt/vtgate/evalengine/translate_test.go b/go/vt/vtgate/evalengine/translate_test.go index ea8c1488882..a59a4c62166 100644 --- a/go/vt/vtgate/evalengine/translate_test.go +++ b/go/vt/vtgate/evalengine/translate_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sqlparser" @@ -106,8 +107,8 @@ func TestTranslateSimplification(t *testing.T) { {"12 between 5 and 20", ok("(INT64(12) >= INT64(5)) AND (INT64(12) <= INT64(20))"), ok(`INT64(1)`)}, {"12 not between 5 and 20", ok("(INT64(12) < INT64(5)) OR (INT64(12) > INT64(20))"), ok(`INT64(0)`)}, {"2 not between 5 and 20", ok("(INT64(2) < INT64(5)) OR (INT64(2) > INT64(20))"), ok(`INT64(1)`)}, - {"column0->\"$.c\"", ok("JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\"))"), ok("JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\"))")}, - {"column0->>\"$.c\"", ok("JSON_UNQUOTE(JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\")))"), ok("JSON_UNQUOTE(JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\")))")}, + {"json->\"$.c\"", ok("JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\"))"), ok("JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\"))")}, + {"json->>\"$.c\"", ok("JSON_UNQUOTE(JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\")))"), ok("JSON_UNQUOTE(JSON_EXTRACT([COLUMN 0], VARCHAR(\"$.c\")))")}, } for _, tc := range testCases { @@ -117,8 +118,18 @@ func TestTranslateSimplification(t *testing.T) { t.Fatal(err) } + fields := FieldResolver([]*querypb.Field{ + {Name: "json", Type: sqltypes.TypeJSON, Charset: collations.CollationUtf8mb4ID}, + }) + + cfg := &Config{ + ResolveColumn: fields.Column, + Collation: 45, + Optimization: OptimizationLevelNone, + } + astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - converted, err := TranslateEx(astExpr, &LookupIntegrationTest{45}, false) + converted, err := Translate(astExpr, cfg) if err != nil { if tc.converted.err == "" { t.Fatalf("failed to Convert (simplify=false): %v", err) @@ -130,7 +141,8 @@ func TestTranslateSimplification(t *testing.T) { } assert.Equal(t, tc.converted.literal, FormatExpr(converted)) - simplified, err := TranslateEx(astExpr, &LookupIntegrationTest{45}, true) + cfg.Optimization = OptimizationLevelSimplify + simplified, err := Translate(astExpr, cfg) if err != nil { if tc.simplified.err == "" { t.Fatalf("failed to Convert (simplify=true): %v", err) @@ -287,7 +299,7 @@ func TestEvaluate(t *testing.T) { stmt, err := sqlparser.Parse("select " + test.expression) require.NoError(t, err) astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - sqltypesExpr, err := Translate(astExpr, LookupDefaultCollation(45)) + sqltypesExpr, err := Translate(astExpr, &Config{Collation: 45}) require.Nil(t, err) require.NotNil(t, sqltypesExpr) env := EnvWithBindVars( @@ -298,7 +310,7 @@ func TestEvaluate(t *testing.T) { "uint32_bind_variable": sqltypes.Uint32BindVariable(21), "uint64_bind_variable": sqltypes.Uint64BindVariable(22), "float_bind_variable": sqltypes.Float64BindVariable(2.2), - }, 0) + }) // When r, err := env.Evaluate(sqltypesExpr) @@ -333,7 +345,7 @@ func TestEvaluateTuple(t *testing.T) { stmt, err := sqlparser.Parse("select " + test.expression) require.NoError(t, err) astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - sqltypesExpr, err := Translate(astExpr, LookupDefaultCollation(45)) + sqltypesExpr, err := Translate(astExpr, &Config{Collation: 45}) require.Nil(t, err) require.NotNil(t, sqltypesExpr) @@ -376,7 +388,7 @@ func TestTranslationFailures(t *testing.T) { stmt, err := sqlparser.Parse("select " + testcase.expression) require.NoError(t, err) astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - _, err = Translate(astExpr, LookupDefaultCollation(45)) + _, err = Translate(astExpr, &Config{Collation: 45}) require.EqualError(t, err, testcase.expectedErr) }) } @@ -412,7 +424,7 @@ func TestCardinalityWithBindVariables(t *testing.T) { } astExpr := stmt.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr - _, err = Translate(astExpr, LookupDefaultCollation(45)) + _, err = Translate(astExpr, &Config{Collation: 45}) return err }() diff --git a/go/vt/vtgate/evalengine/vm.go b/go/vt/vtgate/evalengine/vm.go new file mode 100644 index 00000000000..43ea035e704 --- /dev/null +++ b/go/vt/vtgate/evalengine/vm.go @@ -0,0 +1,107 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package evalengine + +import ( + "errors" + + "vitess.io/vitess/go/sqltypes" + querypb "vitess.io/vitess/go/vt/proto/query" + "vitess.io/vitess/go/vt/vthash" +) + +var errDeoptimize = errors.New("de-optimize") + +type vmstate struct { + stack []eval + sp int + + arena Arena + hash vthash.Hasher + err error + + flags struct { + cmp int + null bool + } +} + +func Deoptimize(expr Expr) Expr { + switch expr := expr.(type) { + case *CompiledExpr: + return expr.original + default: + return expr + } +} + +type CompiledExpr struct { + code []frame + typed sqltypes.Type + stack int + original Expr +} + +func (p *CompiledExpr) eval(env *ExpressionEnv) (eval, error) { + return p.original.eval(env) +} + +func (p *CompiledExpr) typeof(*ExpressionEnv, []*querypb.Field) (sqltypes.Type, typeFlag) { + return p.typed, 0 +} + +func (p *CompiledExpr) format(buf *formatter, depth int) { + p.original.format(buf, depth) +} + +func (p *CompiledExpr) constant() bool { + return p.original.constant() +} + +func (p *CompiledExpr) simplify(env *ExpressionEnv) error { + // No-op + return nil +} + +var _ Expr = (*CompiledExpr)(nil) + +func (env *ExpressionEnv) EvaluateVM(p *CompiledExpr) (EvalResult, error) { + env.vm.arena.reset() + env.vm.sp = 0 + env.vm.err = nil + if len(env.vm.stack) < p.stack { + env.vm.stack = make([]eval, p.stack) + } + + code := p.code + ip := 0 + + for ip < len(code) { + ip += code[ip](env) + if env.vm.err != nil { + goto err + } + } + return EvalResult{env.vm.stack[env.vm.sp-1]}, nil + +err: + if env.vm.err == errDeoptimize { + e, err := p.original.eval(env) + return EvalResult{e}, err + } + return EvalResult{}, env.vm.err +} diff --git a/go/vt/vtgate/executor.go b/go/vt/vtgate/executor.go index b7537bf3824..78ef8e49ce1 100644 --- a/go/vt/vtgate/executor.go +++ b/go/vt/vtgate/executor.go @@ -17,6 +17,7 @@ limitations under the License. package vtgate import ( + "bufio" "bytes" "context" "crypto/sha256" @@ -35,7 +36,6 @@ import ( "vitess.io/vitess/go/acl" "vitess.io/vitess/go/cache" - "vitess.io/vitess/go/hack" "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/stats" @@ -1043,6 +1043,7 @@ func (e *Executor) getPlan(ctx context.Context, vcursor *vcursorImpl, sql string vcursor.SetIgnoreMaxMemoryRows(ignoreMaxMemoryRows) consolidator := sqlparser.Consolidator(stmt) vcursor.SetConsolidator(consolidator) + vcursor.SetWorkloadName(sqlparser.GetWorkloadNameFromStatement(stmt)) setVarComment, err := prepareSetVarComment(vcursor, stmt) if err != nil { @@ -1097,13 +1098,21 @@ func (e *Executor) getPlan(ctx context.Context, vcursor *vcursorImpl, sql string return e.cacheAndBuildStatement(ctx, vcursor, query, statement, qo, logStats, stmt, reservedVars, bindVarNeeds) } -func (e *Executor) cacheAndBuildStatement(ctx context.Context, vcursor *vcursorImpl, query string, statement sqlparser.Statement, qo iQueryOption, logStats *logstats.LogStats, stmt sqlparser.Statement, reservedVars *sqlparser.ReservedVars, bindVarNeeds *sqlparser.BindVarNeeds) (*engine.Plan, sqlparser.Statement, error) { +func (e *Executor) hashPlan(ctx context.Context, vcursor *vcursorImpl, query string) string { planHash := sha256.New() - _, _ = planHash.Write([]byte(vcursor.planPrefixKey(ctx))) - _, _ = planHash.Write([]byte{':'}) - _, _ = planHash.Write(hack.StringBytes(query)) - planKey := hex.EncodeToString(planHash.Sum(nil)) + { + // use a bufio.Writer to accumulate writes instead of writing directly to the hasher + buf := bufio.NewWriter(planHash) + vcursor.keyForPlan(ctx, query, buf) + buf.Flush() + } + + return hex.EncodeToString(planHash.Sum(nil)) +} + +func (e *Executor) cacheAndBuildStatement(ctx context.Context, vcursor *vcursorImpl, query string, statement sqlparser.Statement, qo iQueryOption, logStats *logstats.LogStats, stmt sqlparser.Statement, reservedVars *sqlparser.ReservedVars, bindVarNeeds *sqlparser.BindVarNeeds) (*engine.Plan, sqlparser.Statement, error) { + planKey := e.hashPlan(ctx, vcursor, query) if sqlparser.CachePlan(statement) && qo.cachePlan() { if plan, ok := e.plans.Get(planKey); ok { logStats.CachedPlan = true @@ -1160,15 +1169,6 @@ func prepareSetVarComment(vcursor *vcursorImpl, stmt sqlparser.Statement) (strin return strings.TrimSpace(res.String()), nil } -func (e *Executor) debugGetPlan(planKey string) (*engine.Plan, bool) { - planHash := sha256.Sum256([]byte(planKey)) - planHex := hex.EncodeToString(planHash[:]) - if plan, ok := e.plans.Get(planHex); ok { - return plan.(*engine.Plan), true - } - return nil, false -} - type cacheItem struct { Key string Value *engine.Plan diff --git a/go/vt/vtgate/executor_dml_test.go b/go/vt/vtgate/executor_dml_test.go index 8a61c0e80d3..bfcbdc882f4 100644 --- a/go/vt/vtgate/executor_dml_test.go +++ b/go/vt/vtgate/executor_dml_test.go @@ -597,7 +597,7 @@ func TestUpdateNormalize(t *testing.T) { _, err := executorExec(executor, "/* leading */ update user set a=2 where id = 1 /* trailing */", nil) require.NoError(t, err) wantQueries := []*querypb.BoundQuery{{ - Sql: "/* leading */ update `user` set a = :a where id = :id /* trailing */", + Sql: "/* leading */ update `user` set a = :a /* INT64 */ where id = :id /* INT64 */ /* trailing */", BindVariables: map[string]*querypb.BindVariable{ "a": sqltypes.TestBindVariable(int64(2)), "id": sqltypes.TestBindVariable(int64(1)), @@ -612,7 +612,7 @@ func TestUpdateNormalize(t *testing.T) { _, err = executorExec(executor, "/* leading */ update user set a=2 where id = 1 /* trailing */", nil) require.NoError(t, err) wantQueries = []*querypb.BoundQuery{{ - Sql: "/* leading */ update `user` set a = :a where id = :id /* trailing */", + Sql: "/* leading */ update `user` set a = :a /* INT64 */ where id = :id /* INT64 */ /* trailing */", BindVariables: map[string]*querypb.BindVariable{ "a": sqltypes.TestBindVariable(int64(2)), "id": sqltypes.TestBindVariable(int64(1)), @@ -1288,7 +1288,7 @@ func TestInsertSharded(t *testing.T) { _, err = executorExec(executor, "insert into user(id, v, name) values (1, 2, _binary 'myname')", nil) require.NoError(t, err) wantQueries = []*querypb.BoundQuery{{ - Sql: "insert into `user`(id, v, `name`) values (:_Id_0, :vtg2, :_name_0)", + Sql: "insert into `user`(id, v, `name`) values (:_Id_0, :vtg2 /* INT64 */, :_name_0)", BindVariables: map[string]*querypb.BindVariable{ "_Id_0": sqltypes.Int64BindVariable(1), "_name_0": sqltypes.BytesBindVariable([]byte("myname")), @@ -1311,7 +1311,7 @@ func TestInsertSharded(t *testing.T) { testQueryLog(t, logChan, "MarkSavepoint", "SAVEPOINT", "savepoint x", 3) testQueryLog(t, logChan, "VindexCreate", "INSERT", "insert into name_user_map(`name`, user_id) values (:name_0, :user_id_0)", 1) - testQueryLog(t, logChan, "TestExecute", "INSERT", "insert into `user`(id, v, `name`) values (:vtg1, :vtg2, _binary :vtg3)", 1) + testQueryLog(t, logChan, "TestExecute", "INSERT", "insert into `user`(id, v, `name`) values (:vtg1 /* INT64 */, :vtg2 /* INT64 */, _binary :vtg3 /* VARCHAR */)", 1) } func TestInsertShardedKeyrange(t *testing.T) { @@ -2335,7 +2335,7 @@ func TestUpdateLastInsertID(t *testing.T) { _, err := executorExec(executor, sql, map[string]*querypb.BindVariable{}) require.NoError(t, err) wantQueries := []*querypb.BoundQuery{{ - Sql: "update `user` set a = :__lastInsertId where id = :id", + Sql: "update `user` set a = :__lastInsertId where id = :id /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "__lastInsertId": sqltypes.Uint64BindVariable(43), "id": sqltypes.Int64BindVariable(1)}, diff --git a/go/vt/vtgate/executor_framework_test.go b/go/vt/vtgate/executor_framework_test.go index d4cf3775ec7..21d58aee5c9 100644 --- a/go/vt/vtgate/executor_framework_test.go +++ b/go/vt/vtgate/executor_framework_test.go @@ -347,12 +347,10 @@ func testNonZeroDuration(t *testing.T, what, d string) { } } -func getQueryLog(logChan chan any) *logstats.LogStats { - var log any - +func getQueryLog(logChan chan *logstats.LogStats) *logstats.LogStats { select { - case log = <-logChan: - return log.(*logstats.LogStats) + case log := <-logChan: + return log default: return nil } @@ -365,7 +363,7 @@ func getQueryLog(logChan chan any) *logstats.LogStats { // is a repeat query. var testPlannedQueries = map[string]bool{} -func testQueryLog(t *testing.T, logChan chan any, method, stmtType, sql string, shardQueries int) *logstats.LogStats { +func testQueryLog(t *testing.T, logChan chan *logstats.LogStats, method, stmtType, sql string, shardQueries int) *logstats.LogStats { t.Helper() logStats := getQueryLog(logChan) diff --git a/go/vt/vtgate/executor_select_test.go b/go/vt/vtgate/executor_select_test.go index 28aacbd019f..d1220944c29 100644 --- a/go/vt/vtgate/executor_select_test.go +++ b/go/vt/vtgate/executor_select_test.go @@ -122,7 +122,7 @@ func TestSelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select count(*) from INFORMATION_SCHEMA.`TABLES` as ist where ist.table_schema = :__vtschemaname and ist.table_name = :ist_table_name", + wantQueries = []*querypb.BoundQuery{{Sql: "select count(*) from INFORMATION_SCHEMA.`TABLES` as ist where ist.table_schema = :__vtschemaname /* VARCHAR */ and ist.table_name = :ist_table_name /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "__vtschemaname": sqltypes.StringBindVariable("performance_schema"), "ist_table_name": sqltypes.StringBindVariable("foo"), @@ -136,7 +136,7 @@ func TestSelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select 1 from information_schema.table_constraints where constraint_schema = :__vtschemaname and table_name = :table_name", + wantQueries = []*querypb.BoundQuery{{Sql: "select 1 from information_schema.table_constraints where constraint_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "__vtschemaname": sqltypes.StringBindVariable("vt_ks"), "table_name": sqltypes.StringBindVariable("user"), @@ -150,7 +150,7 @@ func TestSelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select 1 from information_schema.table_constraints where constraint_schema = :__vtschemaname", + wantQueries = []*querypb.BoundQuery{{Sql: "select 1 from information_schema.table_constraints where constraint_schema = :__vtschemaname /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "__vtschemaname": sqltypes.StringBindVariable("vt_ks"), }}} @@ -187,7 +187,7 @@ func TestSystemVariablesMySQLBelow80(t *testing.T) { wantQueries := []*querypb.BoundQuery{ {Sql: "select @@sql_mode orig, 'only_full_group_by' new"}, {Sql: "set sql_mode = 'only_full_group_by'", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, - {Sql: "select :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, sbc1.Queries) @@ -225,7 +225,7 @@ func TestSystemVariablesWithSetVarDisabled(t *testing.T) { wantQueries := []*querypb.BoundQuery{ {Sql: "select @@sql_mode orig, 'only_full_group_by' new"}, {Sql: "set sql_mode = 'only_full_group_by'", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, - {Sql: "select :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, sbc1.Queries) @@ -271,9 +271,9 @@ func TestSetSystemVariablesTx(t *testing.T) { require.Zero(t, session.ShardSessions) wantQueries := []*querypb.BoundQuery{ - {Sql: "select :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, {Sql: "select @@sql_mode orig, 'only_full_group_by' new"}, - {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, sbc1.Queries) @@ -307,7 +307,7 @@ func TestSetSystemVariables(t *testing.T) { require.False(t, session.InReservedConn()) wantQueries := []*querypb.BoundQuery{ {Sql: "select @@sql_mode orig, 'only_full_group_by' new"}, - {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, lookup.Queries) lookup.Queries = nil @@ -318,7 +318,7 @@ func TestSetSystemVariables(t *testing.T) { require.NoError(t, err) require.False(t, session.InReservedConn()) wantQueries = []*querypb.BoundQuery{ - {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ /* comment */ :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select /*+ SET_VAR(sql_mode = 'only_full_group_by') */ /* comment */ :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, lookup.Queries) lookup.Queries = nil @@ -387,7 +387,7 @@ func TestSetSystemVariables(t *testing.T) { wantQueries = []*querypb.BoundQuery{ {Sql: "select 1 from dual where @@max_tmp_tables != 1"}, {Sql: "set max_tmp_tables = '1', sql_mode = 'only_full_group_by', sql_safe_updates = '0'", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, - {Sql: "select :vtg1 from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select :vtg1 /* INT64 */ from information_schema.`table`", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, lookup.Queries) } @@ -428,7 +428,7 @@ func TestSetSystemVariablesWithReservedConnection(t *testing.T) { {Sql: "select @@sql_mode orig, '' new"}, {Sql: "set sql_mode = ''"}, {Sql: "select age, city, weight_string(age) from `user` group by age, weight_string(age) order by age asc"}, - {Sql: "select age, city + :vtg1, weight_string(age) from `user` group by age, weight_string(age) order by age asc", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, + {Sql: "select age, city + :vtg1 /* INT64 */, weight_string(age) from `user` group by age, weight_string(age) order by age asc", BindVariables: map[string]*querypb.BindVariable{"vtg1": {Type: sqltypes.Int64, Value: []byte("1")}}}, } utils.MustMatch(t, wantQueries, sbc1.Queries) require.Equal(t, "''", session.SystemVariables["sql_mode"]) @@ -476,7 +476,7 @@ func TestGen4SelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select count(*) from INFORMATION_SCHEMA.`TABLES` as ist where ist.table_schema = :__vtschemaname and ist.table_name = :ist_table_name1", + wantQueries = []*querypb.BoundQuery{{Sql: "select count(*) from INFORMATION_SCHEMA.`TABLES` as ist where ist.table_schema = :__vtschemaname /* VARCHAR */ and ist.table_name = :ist_table_name1 /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "ist_table_schema": sqltypes.StringBindVariable("performance_schema"), "__vtschemaname": sqltypes.StringBindVariable("performance_schema"), @@ -492,7 +492,7 @@ func TestGen4SelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select :vtg1 from information_schema.table_constraints where constraint_schema = :__vtschemaname and table_name = :table_name1", + wantQueries = []*querypb.BoundQuery{{Sql: "select :vtg1 /* INT64 */ from information_schema.table_constraints where constraint_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name1 /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "vtg1": sqltypes.Int64BindVariable(1), "constraint_schema": sqltypes.StringBindVariable("vt_ks"), @@ -509,7 +509,7 @@ func TestGen4SelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select :vtg1 from information_schema.table_constraints where constraint_schema = :__vtschemaname", + wantQueries = []*querypb.BoundQuery{{Sql: "select :vtg1 /* INT64 */ from information_schema.table_constraints where constraint_schema = :__vtschemaname /* VARCHAR */", BindVariables: map[string]*querypb.BindVariable{ "vtg1": sqltypes.Int64BindVariable(1), "constraint_schema": sqltypes.StringBindVariable("vt_ks"), @@ -524,7 +524,7 @@ func TestGen4SelectDBA(t *testing.T) { query, map[string]*querypb.BindVariable{}, ) require.NoError(t, err) - wantQueries = []*querypb.BoundQuery{{Sql: "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t, information_schema.`columns` as c where t.table_schema = :__vtschemaname and c.table_schema = :__vtschemaname and c.table_schema = t.table_schema and c.table_name = t.table_name order by t.table_schema asc, t.table_name asc, c.column_name asc", + wantQueries = []*querypb.BoundQuery{{Sql: "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t, information_schema.`columns` as c where t.table_schema = :__vtschemaname /* VARCHAR */ and c.table_schema = :__vtschemaname /* VARCHAR */ and c.table_schema = t.table_schema and c.table_name = t.table_name order by t.table_schema asc, t.table_name asc, c.column_name asc", BindVariables: map[string]*querypb.BindVariable{ "t_table_schema": sqltypes.StringBindVariable("TestExecutor"), "__replacevtschemaname": sqltypes.Int64BindVariable(1), @@ -1326,7 +1326,7 @@ func TestSelectNormalize(t *testing.T) { _, err := executorExec(executor, "/* leading */ select id from user where id = 1 /* trailing */", nil) require.NoError(t, err) wantQueries := []*querypb.BoundQuery{{ - Sql: "/* leading */ select id from `user` where id = :id /* trailing */", + Sql: "/* leading */ select id from `user` where id = :id /* INT64 */ /* trailing */", BindVariables: map[string]*querypb.BindVariable{ "id": sqltypes.TestBindVariable(int64(1)), }, @@ -1342,7 +1342,7 @@ func TestSelectNormalize(t *testing.T) { _, err = executorExec(executor, "/* leading */ select id from user where id = 1 /* trailing */", nil) require.NoError(t, err) wantQueries = []*querypb.BoundQuery{{ - Sql: "/* leading */ select id from `user` where id = :id /* trailing */", + Sql: "/* leading */ select id from `user` where id = :id /* INT64 */ /* trailing */", BindVariables: map[string]*querypb.BindVariable{ "id": sqltypes.TestBindVariable(int64(1)), }, @@ -3049,7 +3049,7 @@ func TestSelectFromInformationSchema(t *testing.T) { session.TargetString = "TestXBadSharding" _, err = exec(executor, session, "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'TestExecutor'") require.NoError(t, err) - assert.Equal(t, sbc1.StringQueries(), []string{"select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname"}) + assert.Equal(t, sbc1.StringQueries(), []string{"select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */"}) } func TestStreamOrderByLimitWithMultipleResults(t *testing.T) { @@ -3184,7 +3184,7 @@ func TestGen4MultiColumnVindexEqual(t *testing.T) { require.NoError(t, err) wantQueries := []*querypb.BoundQuery{ { - Sql: "select * from user_region where cola = :cola and colb = :colb", + Sql: "select * from user_region where cola = :cola /* INT64 */ and colb = :colb /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "cola": sqltypes.Int64BindVariable(1), "colb": sqltypes.Int64BindVariable(2), @@ -3205,7 +3205,7 @@ func TestGen4MultiColumnVindexEqual(t *testing.T) { require.NoError(t, err) wantQueries = []*querypb.BoundQuery{ { - Sql: "select * from user_region where cola = :cola and colb = :colb", + Sql: "select * from user_region where cola = :cola /* INT64 */ and colb = :colb /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "cola": sqltypes.Int64BindVariable(17984), "colb": sqltypes.Int64BindVariable(1), @@ -3278,7 +3278,7 @@ func TestGen4MultiColMixedColComparision(t *testing.T) { vals0sbc2, _ := sqltypes.BuildBindVariable([]int64{17984}) wantQueries := []*querypb.BoundQuery{ { - Sql: "select * from user_region where colb = :colb and cola in ::__vals0", + Sql: "select * from user_region where colb = :colb /* INT64 */ and cola in ::__vals0", BindVariables: map[string]*querypb.BindVariable{ "__vals0": vals0sbc1, "colb": bvtg1, @@ -3289,7 +3289,7 @@ func TestGen4MultiColMixedColComparision(t *testing.T) { utils.MustMatch(t, wantQueries, sbc1.Queries) wantQueries = []*querypb.BoundQuery{ { - Sql: "select * from user_region where colb = :colb and cola in ::__vals0", + Sql: "select * from user_region where colb = :colb /* INT64 */ and cola in ::__vals0", BindVariables: map[string]*querypb.BindVariable{ "__vals0": vals0sbc2, "colb": bvtg1, @@ -3316,7 +3316,7 @@ func TestGen4MultiColBestVindexSel(t *testing.T) { bvtg2, _ := sqltypes.BuildBindVariable([]int64{1, 17984}) wantQueries := []*querypb.BoundQuery{ { - Sql: "select * from user_region where colb = :colb and cola in ::vtg1 and cola = :cola", + Sql: "select * from user_region where colb = :colb /* INT64 */ and cola in ::vtg1 and cola = :cola /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "colb": sqltypes.Int64BindVariable(2), "vtg1": bvtg2, @@ -3341,7 +3341,7 @@ func TestGen4MultiColBestVindexSel(t *testing.T) { bvtg1, _ := sqltypes.BuildBindVariable([]int64{10, 20}) wantQueries = []*querypb.BoundQuery{ { - Sql: "select * from user_region where colb in ::vtg1 and cola in ::vtg2 and cola = :cola and colb = :colb", + Sql: "select * from user_region where colb in ::vtg1 and cola in ::vtg2 and cola = :cola /* INT64 */ and colb = :colb /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "vtg1": bvtg1, "vtg2": bvtg2, @@ -3369,7 +3369,7 @@ func TestGen4MultiColMultiEqual(t *testing.T) { require.NoError(t, err) wantQueries := []*querypb.BoundQuery{ { - Sql: "select * from user_region where (cola, colb) in ((:vtg1, :vtg2), (:vtg1, :vtg3))", + Sql: "select * from user_region where (cola, colb) in ((:vtg1 /* INT64 */, :vtg2 /* INT64 */), (:vtg1 /* INT64 */, :vtg3 /* INT64 */))", BindVariables: map[string]*querypb.BindVariable{ "vtg1": sqltypes.Int64BindVariable(17984), "vtg2": sqltypes.Int64BindVariable(2), @@ -3905,6 +3905,40 @@ func TestSelectAggregationData(t *testing.T) { } } +func TestSelectAggregationRandom(t *testing.T) { + cell := "aa" + hc := discovery.NewFakeHealthCheck(nil) + createSandbox(KsTestSharded).VSchema = executorVSchema + getSandbox(KsTestUnsharded).VSchema = unshardedVSchema + serv := newSandboxForCells([]string{cell}) + resolver := newTestResolver(hc, serv, cell) + shards := []string{"-20", "20-40", "40-60", "60-80", "80-a0", "a0-c0", "c0-e0", "e0-"} + var conns []*sandboxconn.SandboxConn + for _, shard := range shards { + sbc := hc.AddTestTablet(cell, shard, 1, KsTestSharded, shard, topodatapb.TabletType_PRIMARY, true, 1, nil) + conns = append(conns, sbc) + + sbc.SetResults([]*sqltypes.Result{sqltypes.MakeTestResult( + sqltypes.MakeTestFields("a|b", "int64|int64"), + "null|null", + )}) + } + + conns[0].SetResults([]*sqltypes.Result{sqltypes.MakeTestResult( + sqltypes.MakeTestFields("a|b", "int64|int64"), + "10|1", + )}) + + executor := createExecutor(serv, cell, resolver) + executor.pv = querypb.ExecuteOptions_Gen4 + session := NewAutocommitSession(&vtgatepb.Session{}) + + rs, err := executor.Execute(context.Background(), "TestSelectCFC", session, + "select /*vt+ PLANNER=gen4 */ A.a, A.b, (A.a / A.b) as c from (select sum(a) as a, sum(b) as b from user) A", nil) + require.NoError(t, err) + assert.Equal(t, `[[INT64(10) INT64(1) DECIMAL(10.0000)]]`, fmt.Sprintf("%v", rs.Rows)) +} + func TestSelectHexAndBit(t *testing.T) { executor, _, _, _ := createExecutorEnv() executor.normalize = true @@ -3960,7 +3994,7 @@ func TestSelectView(t *testing.T) { "select * from user_details_view where id = 2", nil) require.NoError(t, err) wantQueries = []*querypb.BoundQuery{{ - Sql: "select * from (select `user`.id, user_extra.col from `user` join user_extra on `user`.id = user_extra.user_id) as user_details_view where id = :id", + Sql: "select * from (select `user`.id, user_extra.col from `user` join user_extra on `user`.id = user_extra.user_id) as user_details_view where id = :id /* INT64 */", BindVariables: map[string]*querypb.BindVariable{ "id": sqltypes.Int64BindVariable(2), }, diff --git a/go/vt/vtgate/executor_set_test.go b/go/vt/vtgate/executor_set_test.go index cc5913862ed..52f12354bc9 100644 --- a/go/vt/vtgate/executor_set_test.go +++ b/go/vt/vtgate/executor_set_test.go @@ -228,14 +228,14 @@ func TestExecutorSet(t *testing.T) { in: "set transaction isolation level serializable", out: &vtgatepb.Session{ Autocommit: true, - Warnings: []*querypb.QueryWarning{{Code: mysql.ERNotSupportedYet, Message: "converted 'next transaction' scope to 'session' scope"}}, + Warnings: []*querypb.QueryWarning{{Code: uint32(mysql.ERNotSupportedYet), Message: "converted 'next transaction' scope to 'session' scope"}}, }, }, { in: "set transaction read only", - out: &vtgatepb.Session{Autocommit: true, Warnings: []*querypb.QueryWarning{{Code: mysql.ERNotSupportedYet, Message: "converted 'next transaction' scope to 'session' scope"}}}, + out: &vtgatepb.Session{Autocommit: true, Warnings: []*querypb.QueryWarning{{Code: uint32(mysql.ERNotSupportedYet), Message: "converted 'next transaction' scope to 'session' scope"}}}, }, { in: "set transaction read write", - out: &vtgatepb.Session{Autocommit: true, Warnings: []*querypb.QueryWarning{{Code: mysql.ERNotSupportedYet, Message: "converted 'next transaction' scope to 'session' scope"}}}, + out: &vtgatepb.Session{Autocommit: true, Warnings: []*querypb.QueryWarning{{Code: uint32(mysql.ERNotSupportedYet), Message: "converted 'next transaction' scope to 'session' scope"}}}, }, { in: "set session transaction read write", out: &vtgatepb.Session{Autocommit: true}, diff --git a/go/vt/vtgate/executor_test.go b/go/vt/vtgate/executor_test.go index 2199a51b2f4..0e71d246d88 100644 --- a/go/vt/vtgate/executor_test.go +++ b/go/vt/vtgate/executor_test.go @@ -973,8 +973,8 @@ func TestExecutorShow(t *testing.T) { query = "show warnings" session.Warnings = []*querypb.QueryWarning{ - {Code: mysql.ERBadTable, Message: "bad table"}, - {Code: mysql.EROutOfResources, Message: "ks/-40: query timed out"}, + {Code: uint32(mysql.ERBadTable), Message: "bad table"}, + {Code: uint32(mysql.EROutOfResources), Message: "ks/-40: query timed out"}, } qr, err = executor.Execute(ctx, "TestExecute", session, query, nil) require.NoError(t, err) @@ -986,8 +986,8 @@ func TestExecutorShow(t *testing.T) { }, Rows: [][]sqltypes.Value{ - {sqltypes.NewVarChar("Warning"), sqltypes.NewUint32(mysql.ERBadTable), sqltypes.NewVarChar("bad table")}, - {sqltypes.NewVarChar("Warning"), sqltypes.NewUint32(mysql.EROutOfResources), sqltypes.NewVarChar("ks/-40: query timed out")}, + {sqltypes.NewVarChar("Warning"), sqltypes.NewUint32(uint32(mysql.ERBadTable)), sqltypes.NewVarChar("bad table")}, + {sqltypes.NewVarChar("Warning"), sqltypes.NewUint32(uint32(mysql.EROutOfResources)), sqltypes.NewVarChar("ks/-40: query timed out")}, }, } utils.MustMatch(t, wantqr, qr, query) @@ -1624,10 +1624,7 @@ func TestGetPlanUnnormalized(t *testing.T) { if plan1 != plan2 { t.Errorf("getPlan(query1): plans must be equal: %p %p", plan1, plan2) } - want := []string{ - "@unknown:" + query1, - } - assertCacheContains(t, r, want) + assertCacheContains(t, r, emptyvc, query1) if logStats2.SQL != wantSQL { t.Errorf("logstats sql want \"%s\" got \"%s\"", wantSQL, logStats2.SQL) } @@ -1642,11 +1639,8 @@ func TestGetPlanUnnormalized(t *testing.T) { if plan3 != plan4 { t.Errorf("getPlan(query1, ks): plans must be equal: %p %p", plan3, plan4) } - want = []string{ - KsTestUnsharded + "@unknown:" + query1, - "@unknown:" + query1, - } - assertCacheContains(t, r, want) + assertCacheContains(t, r, emptyvc, query1) + assertCacheContains(t, r, unshardedvc, query1) if logStats4.SQL != wantSQL { t.Errorf("logstats sql want \"%s\" got \"%s\"", wantSQL, logStats4.SQL) } @@ -1664,13 +1658,26 @@ func assertCacheSize(t *testing.T, c cache.Cache, expected int) { } } -func assertCacheContains(t *testing.T, e *Executor, want []string) { +func assertCacheContains(t *testing.T, e *Executor, vc *vcursorImpl, sql string) *engine.Plan { t.Helper() - for _, wantKey := range want { - if _, ok := e.debugGetPlan(wantKey); !ok { - t.Errorf("missing key in plan cache: %v", wantKey) + + var plan *engine.Plan + if vc == nil { + e.plans.ForEach(func(x any) bool { + p := x.(*engine.Plan) + if p.Original == sql { + plan = p + } + return true + }) + } else { + h := e.hashPlan(context.Background(), vc, sql) + if p, ok := e.plans.Get(h); ok { + plan = p.(*engine.Plan) } } + require.Truef(t, plan != nil, "plan not found for query: %s", sql) + return plan } func getPlanCached(t *testing.T, e *Executor, vcursor *vcursorImpl, sql string, comments sqlparser.MarginComments, bindVars map[string]*querypb.BindVariable, skipQueryPlanCache bool) (*engine.Plan, *logstats.LogStats) { @@ -1737,7 +1744,7 @@ func TestGetPlanCacheNormalized(t *testing.T) { query1 := "select * from music_user_map where id = 1" _, logStats1 := getPlanCached(t, r, emptyvc, query1, makeComments(" /* comment */"), map[string]*querypb.BindVariable{}, true /* skipQueryPlanCache */) assertCacheSize(t, r.plans, 0) - wantSQL := "select * from music_user_map where id = :id /* comment */" + wantSQL := "select * from music_user_map where id = :id /* INT64 */ /* comment */" assert.Equal(t, wantSQL, logStats1.SQL) _, logStats2 := getPlanCached(t, r, emptyvc, query1, makeComments(" /* comment */"), map[string]*querypb.BindVariable{}, false /* skipQueryPlanCache */) @@ -1776,16 +1783,13 @@ func TestGetPlanNormalized(t *testing.T) { query1 := "select * from music_user_map where id = 1" query2 := "select * from music_user_map where id = 2" - normalized := "select * from music_user_map where id = :id" + normalized := "select * from music_user_map where id = :id /* INT64 */" plan1, logStats1 := getPlanCached(t, r, emptyvc, query1, makeComments(" /* comment 1 */"), map[string]*querypb.BindVariable{}, false) plan2, logStats2 := getPlanCached(t, r, emptyvc, query1, makeComments(" /* comment 2 */"), map[string]*querypb.BindVariable{}, false) assert.Equal(t, plan1, plan2) - want := []string{ - "@unknown:" + normalized, - } - assertCacheContains(t, r, want) + assertCacheContains(t, r, emptyvc, normalized) wantSQL := normalized + " /* comment 1 */" assert.Equal(t, wantSQL, logStats1.SQL) @@ -1797,28 +1801,21 @@ func TestGetPlanNormalized(t *testing.T) { wantSQL = normalized + " /* comment 3 */" assert.Equal(t, wantSQL, logStats3.SQL) - plan4, logStats4 := getPlanCached(t, r, emptyvc, normalized, makeComments(" /* comment 4 */"), map[string]*querypb.BindVariable{}, false) - assert.Equal(t, plan1, plan4) - wantSQL = normalized + " /* comment 4 */" - assert.Equal(t, wantSQL, logStats4.SQL) - var logStats5 *logstats.LogStats plan3, logStats5 = getPlanCached(t, r, unshardedvc, query1, makeComments(" /* comment 5 */"), map[string]*querypb.BindVariable{}, false) assert.Equal(t, plan1, plan3) wantSQL = normalized + " /* comment 5 */" assert.Equal(t, wantSQL, logStats5.SQL) - plan4, _ = getPlanCached(t, r, unshardedvc, query1, makeComments(" /* comment 6 */"), map[string]*querypb.BindVariable{}, false) + plan4, _ := getPlanCached(t, r, unshardedvc, query1, makeComments(" /* comment 6 */"), map[string]*querypb.BindVariable{}, false) assert.Equal(t, plan1, plan4) - want = []string{ - KsTestUnsharded + "@unknown:" + normalized, - "@unknown:" + normalized, - } - assertCacheContains(t, r, want) + assertCacheContains(t, r, emptyvc, normalized) + assertCacheContains(t, r, unshardedvc, normalized) _, _, err := r.getPlan(context.Background(), emptyvc, "syntax", makeComments(""), map[string]*querypb.BindVariable{}, nil, nil) assert.EqualError(t, err, "syntax error at position 7 near 'syntax'") - assertCacheContains(t, r, want) + assertCacheContains(t, r, emptyvc, normalized) + assertCacheContains(t, r, unshardedvc, normalized) } func TestPassthroughDDL(t *testing.T) { diff --git a/go/vt/vtgate/executor_vschema_ddl_test.go b/go/vt/vtgate/executor_vschema_ddl_test.go index d5da6858c5a..1383792051d 100644 --- a/go/vt/vtgate/executor_vschema_ddl_test.go +++ b/go/vt/vtgate/executor_vschema_ddl_test.go @@ -373,13 +373,13 @@ func TestExecutorAddSequenceDDL(t *testing.T) { } time.Sleep(10 * time.Millisecond) - stmt = "alter vschema on test_table add auto_increment id using test_seq" + stmt = "alter vschema on test_table add auto_increment id using `db-name`.`test_seq`" if _, err = executor.Execute(context.Background(), "TestExecute", session, stmt, nil); err != nil { t.Error(err) } time.Sleep(10 * time.Millisecond) - wantAutoInc := &vschemapb.AutoIncrement{Column: "id", Sequence: "test_seq"} + wantAutoInc := &vschemapb.AutoIncrement{Column: "id", Sequence: "`db-name`.test_seq"} gotAutoInc := executor.vm.GetCurrentSrvVschema().Keyspaces[ksSharded].Tables["test_table"].AutoIncrement if !reflect.DeepEqual(wantAutoInc, gotAutoInc) { @@ -579,6 +579,18 @@ func TestExecutorAddDropVindexDDL(t *testing.T) { } utils.MustMatch(t, wantqr, qr) + // now make sure we can create another vindex that references a table with dashes (i.e. escaping is necessary) + stmt = "alter vschema on test2 add vindex test_lookup_fqn(c1,c2) using consistent_lookup_unique with owner=`test`, from=`c1,c2`, table=`test-keyspace`.`lookup-fqn`, to=`keyspace_id`" + _, err = executor.Execute(context.Background(), "TestExecute", session, stmt, nil) + require.NoError(t, err) + + _, vindex = waitForVindex(t, ks, "test_lookup_fqn", vschemaUpdates, executor) + require.Equal(t, "consistent_lookup_unique", vindex.Type) + require.Equal(t, "test", vindex.Owner) + require.Equal(t, "c1,c2", vindex.Params["from"]) + require.Equal(t, "`test-keyspace`.`lookup-fqn`", vindex.Params["table"]) + require.Equal(t, "keyspace_id", vindex.Params["to"]) + stmt = "alter vschema on test2 add vindex nonexistent (c1,c2)" _, err = executor.Execute(context.Background(), "TestExecute", session, stmt, nil) require.EqualError(t, err, "vindex nonexistent does not exist in keyspace TestExecutor") diff --git a/go/vt/vtgate/grpcvtgateconn/conn.go b/go/vt/vtgate/grpcvtgateconn/conn.go index 0fb76dfefe4..4988f44b392 100644 --- a/go/vt/vtgate/grpcvtgateconn/conn.go +++ b/go/vt/vtgate/grpcvtgateconn/conn.go @@ -73,11 +73,11 @@ type vtgateConn struct { } func dial(ctx context.Context, addr string) (vtgateconn.Impl, error) { - return DialWithOpts(ctx)(ctx, addr) + return Dial()(ctx, addr) } -// DialWithOpts allows for custom dial options to be set on a vtgateConn. -func DialWithOpts(ctx context.Context, opts ...grpc.DialOption) vtgateconn.DialerFunc { +// Dial produces a vtgateconn.DialerFunc with custom options. +func Dial(opts ...grpc.DialOption) vtgateconn.DialerFunc { return func(ctx context.Context, address string) (vtgateconn.Impl, error) { opt, err := grpcclient.SecureDialOption(cert, key, ca, crl, name) if err != nil { @@ -86,7 +86,7 @@ func DialWithOpts(ctx context.Context, opts ...grpc.DialOption) vtgateconn.Diale opts = append(opts, opt) - cc, err := grpcclient.Dial(address, grpcclient.FailFast(false), opts...) + cc, err := grpcclient.DialContext(ctx, address, grpcclient.FailFast(false), opts...) if err != nil { return nil, err } @@ -99,6 +99,14 @@ func DialWithOpts(ctx context.Context, opts ...grpc.DialOption) vtgateconn.Diale } } +// DialWithOpts allows for custom dial options to be set on a vtgateConn. +// +// Deprecated: the context parameter cannot be used by the returned +// vtgateconn.DialerFunc and thus has no effect. Use Dial instead. +func DialWithOpts(_ context.Context, opts ...grpc.DialOption) vtgateconn.DialerFunc { + return Dial(opts...) +} + func (conn *vtgateConn) Execute(ctx context.Context, session *vtgatepb.Session, query string, bindVars map[string]*querypb.BindVariable) (*vtgatepb.Session, *sqltypes.Result, error) { request := &vtgatepb.ExecuteRequest{ CallerId: callerid.EffectiveCallerIDFromContext(ctx), diff --git a/go/vt/vtgate/insights.go b/go/vt/vtgate/insights.go index 68782c58a89..563fa873875 100644 --- a/go/vt/vtgate/insights.go +++ b/go/vt/vtgate/insights.go @@ -173,7 +173,7 @@ type Insights struct { PeriodStart time.Time InFlightCounter uint64 Timer *time.Ticker - LogChan chan interface{} + LogChan chan *logstats.LogStats Workers sync.WaitGroup QueriesThisInterval uint ReorderInsertColumns bool @@ -249,7 +249,7 @@ var ( insightsTotalDurationSketchUnits = flag.Int("insights_total_duration_sketch_units", -6, "Base 10 exponent for the units of the total query duration sketches, relative to seconds (0 = seconds, -3 = milliseconds, -6 = microseconds)") ) -func initInsights(logger *streamlog.StreamLogger) (*Insights, error) { +func initInsights(logger *streamlog.StreamLogger[*logstats.LogStats]) (*Insights, error) { return initInsightsInner(logger, argOrEnv(*insightsKafkaBrokers, BrokersVar), *databaseBranchPublicID, @@ -273,7 +273,7 @@ func initInsights(logger *streamlog.StreamLogger) (*Insights, error) { ) } -func initInsightsInner(logger *streamlog.StreamLogger, +func initInsightsInner(logger *streamlog.StreamLogger[*logstats.LogStats], brokers, publicID, username, password string, bufsize, patternLimit, rowsReadThreshold, responseTimeThreshold uint, maxQueriesPerInterval uint, @@ -384,7 +384,7 @@ func (ii *Insights) shouldSendToInsights(ls *logstats.LogStats) bool { return ls.TotalTime().Milliseconds() > int64(ii.ResponseTimeThreshold) || ls.RowsRead >= uint64(ii.RowsReadThreshold) || ls.Error != nil } -func (ii *Insights) logToKafka(logger *streamlog.StreamLogger) error { +func (ii *Insights) logToKafka(logger *streamlog.StreamLogger[*logstats.LogStats]) error { var transport kafka.RoundTripper if ii.Username != "" && ii.Password != "" { @@ -1027,6 +1027,9 @@ func (ii *Insights) makeEnvelope(contents []byte, topic string) ([]byte, error) return envelope.MarshalVT() } +var genericBindPrefix = "vtg" +var genericBindPattern = regexp.MustCompile(`\Avtg(\d+)\z`) + func (ii *Insights) normalizeSQL(sql string, maybeReorderColumns bool) (string, *uint32, error) { stmt, err := sqlparser.Parse(sql) if err != nil { @@ -1048,6 +1051,9 @@ func (ii *Insights) normalizeSQL(sql string, maybeReorderColumns bool) (string, } var skipSpans []span + nextBindIndex := 1 + bindRenames := make(map[int]int) // Needed to ensure we always rename the same underlying bind identically + buf := sqlparser.NewTrackedBuffer(func(buf *sqlparser.TrackedBuffer, node sqlparser.SQLNode) { switch node := node.(type) { case sqlparser.Columns: @@ -1072,6 +1078,13 @@ func (ii *Insights) normalizeSQL(sql string, maybeReorderColumns bool) (string, default: buf.Myprintf("%l in ()", node.Left) } + } else if node.Operator == sqlparser.NotInOp { + switch node.Right.(type) { + case *sqlparser.Subquery: // "IN " is unmodified + node.Format(buf) + default: + buf.Myprintf("%l not in ()", node.Left) + } } else { node.Format(buf) } @@ -1081,6 +1094,35 @@ func (ii *Insights) normalizeSQL(sql string, maybeReorderColumns bool) (string, buf.WriteString("savepoint ") case *sqlparser.Release: buf.WriteString("release savepoint ") + case *sqlparser.Argument: + // Renumber generic bind variables starting with 1. This is necessary if + // 1. There are bind variables in the values part of an insert and + // 2. There are bind variables after the values (such as in `on duplicate key update set col = :vtg5` + // When this happens, the index of the post-values binds will be different based on the number of binds + // consumed in values fragment. This is bad because we end up with different query patterns when there + // should only be one. + // Only generic (i.e. vtg-prefixed) binds are renamed because we don't want to mess with semantically named + // binds (i.e. my_column = :my_column). + matches := genericBindPattern.FindStringSubmatch(node.Name) + if len(matches) >= 2 { + oldBindNum, err := strconv.Atoi(matches[1]) + if err != nil { + panic("Couldn't parse bind index, this should never happen due to regex") + } + + // If we've already seen this bind, use the same replacement + repBindNum, ok := bindRenames[oldBindNum] + if !ok { + repBindNum = nextBindIndex + bindRenames[oldBindNum] = repBindNum + nextBindIndex++ + } + + buf.Myprintf(":%s%d", genericBindPrefix, repBindNum) + + } else { + node.Format(buf) + } default: node.Format(buf) } diff --git a/go/vt/vtgate/insights_test.go b/go/vt/vtgate/insights_test.go index 524ebf6eab7..355b2716315 100644 --- a/go/vt/vtgate/insights_test.go +++ b/go/vt/vtgate/insights_test.go @@ -42,7 +42,7 @@ import ( ) var ( - logger *streamlog.StreamLogger + logger *streamlog.StreamLogger[*logstats.LogStats] ) type setupOptions struct { @@ -55,7 +55,7 @@ type setupOptions struct { } func setup(t *testing.T, brokers, publicID, username, password string, options setupOptions) (*Insights, error) { - logger = streamlog.New("tests", 32) + logger = streamlog.New[*logstats.LogStats]("tests", 32) defaultUint := func(val *uint, dfault uint) uint { if val != nil { return *val @@ -770,35 +770,44 @@ func TestNormalization(t *testing.T) { //-- VALUES compaction // one tuple - {"insert into xyz values (:v1, :v2)", "insert into xyz values "}, + {"insert into xyz values (:vtg1, :vtg2)", "insert into xyz values "}, // case insensitive - {"INSERT INTO xyz VALUES (:v1, :v2)", "insert into xyz values "}, + {"INSERT INTO xyz VALUES (:vtg1, :vtg2)", "insert into xyz values "}, // multiple tuples - {"insert into xyz values (:v1, :v2), (:v3, null), (null, :v4)", "insert into xyz values "}, + {"insert into xyz values (:vtg1, :vtg2), (:vtg3, null), (null, :vtg4)", "insert into xyz values "}, // multiple singles - {"insert into xyz values (:v1), (null), (:v2)", "insert into xyz values "}, + {"insert into xyz values (:vtg1), (null), (:vtg2)", "insert into xyz values "}, + + // bind variables are renumbered starting from 1 + {"select * from xyz where col1 = :vtg2 and col2 = :vtg4", "select * from xyz where col1 = :vtg1 and col2 = :vtg2"}, + + // bind variables are renumbered starting from 1 after removing the values + {"insert into xyz(col1, col2) values (:vtg1, :vtg2), (:vtg3, :vtg4) on duplicate key update col1 = :vtg5, col2 = coalesce(col2, :vtg6)", "insert into xyz(col1, col2) values on duplicate key update col1 = :vtg1, col2 = coalesce(col2, :vtg2)"}, + + // bind variables renumbering keeps re-used binds (does not assign different bind nums to binds that were previously the same) + {"insert into xyz(col1, col2) values (:vtg1, :vtg2), (:vtg3, :vtg4) on duplicate key update col1 = :vtg5, col2 = coalesce(col2, :vtg5), col1 = :vtg6, col2 = coalesce(col2, :vtg7) ", "insert into xyz(col1, col2) values on duplicate key update col1 = :vtg1, col2 = coalesce(col2, :vtg1), col1 = :vtg2, col2 = coalesce(col2, :vtg3)"}, // question marks instead {"insert into xyz values (?, ?)", "insert into xyz values "}, - //-- SET compaction + //-- SET compaction: IN // case insensitive - {"SELECT 1 FROM x WHERE xyz IN (:vtg1, :vtg2) AND abc in (:v3, :v4)", "select 1 from x where xyz in () and abc in ()"}, + {"SELECT 1 FROM x WHERE xyz IN (:vtg1, :vtg2) AND abc in (:vtg3, :vtg4)", "select 1 from x where xyz in () and abc in ()"}, // question marks instead {"SELECT 1 FROM x WHERE xyz IN (?, ?) AND abc in (?, ?)", "select 1 from x where xyz in () and abc in ()"}, // single element in list - {"select 1 FROM x where xyz in (:bv1)", "select 1 from x where xyz in ()"}, + {"select 1 FROM x where xyz in (:vtg1)", "select 1 from x where xyz in ()"}, // very large :v sequence numbers - {"select 1 from x where xyz in (:v8675309, :v8765000)", "select 1 from x where xyz in ()"}, + {"select 1 from x where xyz in (:vtg8675309, :vtg8765000)", "select 1 from x where xyz in ()"}, // nested, single - {"select 1 from x where (abc, xyz) in ((:v1, :v2))", "select 1 from x where (abc, xyz) in ()"}, + {"select 1 from x where (abc, xyz) in ((:vtg1, :vtg2))", "select 1 from x where (abc, xyz) in ()"}, // nested, multiple {"select 1 from x where (abc, xyz) in ((:vtg1, :vtg2), (:vtg3, :vtg4), (:vtg5, :vtg6))", "select 1 from x where (abc, xyz) in ()"}, @@ -807,13 +816,44 @@ func TestNormalization(t *testing.T) { {"select 1 from x where (abc, xyz) in ((?, ?), (?, ?), (?, ?))", "select 1 from x where (abc, xyz) in ()"}, // mixed nested and simple - {"select 1 from x where xyz in ((:v1, :v2), :v3)", "select 1 from x where xyz in ()"}, + {"select 1 from x where xyz in ((:vtg1, :vtg2), :vtg3)", "select 1 from x where xyz in ()"}, // subqueries should not be normalized {"select 1 from x where xyz in (select distinct foo from bar)", "select 1 from x where xyz in (select distinct foo from bar)"}, // stuff within a subquery should be normalized {"select 1 from x where xyz in (select distinct foo from bar where baz in (1,2,3))", "select 1 from x where xyz in (select distinct foo from bar where baz in ())"}, + + //-- SET compaction: NOT IN + // case insensitive + {"SELECT 1 FROM x WHERE xyz NOT IN (:vtg1, :vtg2) AND abc not in (:v3, :v4)", "select 1 from x where xyz not in () and abc not in ()"}, + + // question marks instead + {"SELECT 1 FROM x WHERE xyz NOT IN (?, ?) AND abc not in (?, ?)", "select 1 from x where xyz not in () and abc not in ()"}, + + // single element in list + {"select 1 FROM x where xyz not in (:bv1)", "select 1 from x where xyz not in ()"}, + + // very large :v sequence numbers + {"select 1 from x where xyz not in (:v8675309, :v8765000)", "select 1 from x where xyz not in ()"}, + + // nested, single + {"select 1 from x where (abc, xyz) not in ((:v1, :v2))", "select 1 from x where (abc, xyz) not in ()"}, + + // nested, multiple + {"select 1 from x where (abc, xyz) not in ((:vtg1, :vtg2), (:vtg3, :vtg4), (:vtg5, :vtg6))", "select 1 from x where (abc, xyz) not in ()"}, + + // nested, multiple, question marks + {"select 1 from x where (abc, xyz) not in ((?, ?), (?, ?), (?, ?))", "select 1 from x where (abc, xyz) not in ()"}, + + // mixed nested and simple + {"select 1 from x where xyz not in ((:v1, :v2), :v3)", "select 1 from x where xyz not in ()"}, + + // subqueries should not be normalized + {"select 1 from x where xyz not in (select distinct foo from bar)", "select 1 from x where xyz not in (select distinct foo from bar)"}, + + // stuff within a subquery should be normalized + {"select 1 from x where xyz not in (select distinct foo from bar where baz not in (1,2,3))", "select 1 from x where xyz not in (select distinct foo from bar where baz not in ())"}, } ii := Insights{} for _, tc := range testCases { diff --git a/go/vt/vtgate/planbuilder/aggregation_pushing.go b/go/vt/vtgate/planbuilder/aggregation_pushing.go index 15367f9e3e8..cc05c9e8377 100644 --- a/go/vt/vtgate/planbuilder/aggregation_pushing.go +++ b/go/vt/vtgate/planbuilder/aggregation_pushing.go @@ -22,7 +22,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" ) @@ -231,7 +231,7 @@ func countStarAggr() *operators.Aggr { return &operators.Aggr{ Original: &sqlparser.AliasedExpr{Expr: f}, - OpCode: engine.AggregateCountStar, + OpCode: popcode.AggregateCountStar, Alias: "count(*)", } } @@ -420,17 +420,17 @@ func (hp *horizonPlanning) filteredPushAggregation( return newplan, groupingOffsets, outputAggrs, pushed, nil } -func isMinOrMax(in engine.AggregateOpcode) bool { +func isMinOrMax(in popcode.AggregateOpcode) bool { switch in { - case engine.AggregateMin, engine.AggregateMax: + case popcode.AggregateMin, popcode.AggregateMax: return true default: return false } } -func isRandom(in engine.AggregateOpcode) bool { - return in == engine.AggregateRandom +func isRandom(in popcode.AggregateOpcode) bool { + return in == popcode.AggregateRandom } func splitAggregationsToLeftAndRight( diff --git a/go/vt/vtgate/planbuilder/builder.go b/go/vt/vtgate/planbuilder/builder.go index 66b50be0e61..1181c9b2c8b 100644 --- a/go/vt/vtgate/planbuilder/builder.go +++ b/go/vt/vtgate/planbuilder/builder.go @@ -321,6 +321,7 @@ func buildDBDDLPlan(stmt sqlparser.Statement, _ *sqlparser.ReservedVars, vschema } return nil, vterrors.VT13001(fmt.Sprintf("database DDL not recognized: %s", sqlparser.String(dbDDLstmt))) } + func buildLoadPlan(query string, vschema plancontext.VSchema) (*planResult, error) { keyspace, err := vschema.DefaultKeyspace() if err != nil { diff --git a/go/vt/vtgate/planbuilder/dml_planner.go b/go/vt/vtgate/planbuilder/dml_planner.go index 9a4608b295c..68f2a2b359a 100644 --- a/go/vt/vtgate/planbuilder/dml_planner.go +++ b/go/vt/vtgate/planbuilder/dml_planner.go @@ -26,7 +26,6 @@ import ( "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - "vitess.io/vitess/go/vt/vtgate/semantics" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -131,7 +130,7 @@ func getBestVindexOption(exprs []sqlparser.Expr, index *vindexes.ColumnVindex) * default: continue } - expr, err := evalengine.Translate(comparison.Right, semantics.EmptySemTable()) + expr, err := evalengine.Translate(comparison.Right, nil) if err != nil { continue } diff --git a/go/vt/vtgate/planbuilder/expr.go b/go/vt/vtgate/planbuilder/expr.go index dfbe23b1640..fb92707b0ca 100644 --- a/go/vt/vtgate/planbuilder/expr.go +++ b/go/vt/vtgate/planbuilder/expr.go @@ -20,10 +20,9 @@ import ( "bytes" "fmt" - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/sqlparser" - "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vterrors" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -144,7 +143,7 @@ func (pb *primitiveBuilder) findOrigin(expr sqlparser.Expr, reservedVars *sqlpar if !ok { // (subquery) -> :_sq expr = sqlparser.ReplaceExpr(expr, sqi.ast, sqlparser.NewArgument(sqName)) - pullouts = append(pullouts, newPulloutSubquery(engine.PulloutValue, sqName, hasValues, sqi.plan)) + pullouts = append(pullouts, newPulloutSubquery(popcode.PulloutValue, sqName, hasValues, sqi.plan)) continue } switch construct := construct.(type) { @@ -166,7 +165,7 @@ func (pb *primitiveBuilder) findOrigin(expr sqlparser.Expr, reservedVars *sqlpar Right: right, } expr = sqlparser.ReplaceExpr(expr, construct, newExpr) - pullouts = append(pullouts, newPulloutSubquery(engine.PulloutIn, sqName, hasValues, sqi.plan)) + pullouts = append(pullouts, newPulloutSubquery(popcode.PulloutIn, sqName, hasValues, sqi.plan)) } else { // a not in (subquery) -> (:__sq_has_values = 0 or (a not in ::__sq)) left := &sqlparser.ComparisonExpr{ @@ -184,12 +183,12 @@ func (pb *primitiveBuilder) findOrigin(expr sqlparser.Expr, reservedVars *sqlpar Right: right, } expr = sqlparser.ReplaceExpr(expr, construct, newExpr) - pullouts = append(pullouts, newPulloutSubquery(engine.PulloutNotIn, sqName, hasValues, sqi.plan)) + pullouts = append(pullouts, newPulloutSubquery(popcode.PulloutNotIn, sqName, hasValues, sqi.plan)) } case *sqlparser.ExistsExpr: // exists (subquery) -> :__sq_has_values expr = sqlparser.ReplaceExpr(expr, construct, sqlparser.NewArgument(hasValues)) - pullouts = append(pullouts, newPulloutSubquery(engine.PulloutExists, sqName, hasValues, sqi.plan)) + pullouts = append(pullouts, newPulloutSubquery(popcode.PulloutExists, sqName, hasValues, sqi.plan)) } } return pullouts, highestOrigin, expr, nil @@ -289,12 +288,12 @@ func valEqual(a, b sqlparser.Expr) bool { if b, ok := b.(*sqlparser.ColName); ok { return a.Metadata == b.Metadata } - case sqlparser.Argument: - b, ok := b.(sqlparser.Argument) + case *sqlparser.Argument: + b, ok := b.(*sqlparser.Argument) if !ok { return false } - return a == b + return a.Name == b.Name case *sqlparser.Literal: b, ok := b.(*sqlparser.Literal) if !ok { diff --git a/go/vt/vtgate/planbuilder/expression_converter.go b/go/vt/vtgate/planbuilder/expression_converter.go index ac538f356ce..5cdd44feda3 100644 --- a/go/vt/vtgate/planbuilder/expression_converter.go +++ b/go/vt/vtgate/planbuilder/expression_converter.go @@ -87,7 +87,7 @@ func (ec *expressionConverter) convert(astExpr sqlparser.Expr, boolean, identifi if !strings.Contains(err.Error(), evalengine.ErrTranslateExprNotSupported) { return nil, err } - evalExpr = &evalengine.Column{Offset: len(ec.tabletExpressions)} + evalExpr = evalengine.NewColumn(len(ec.tabletExpressions)) ec.tabletExpressions = append(ec.tabletExpressions, astExpr) } return evalExpr, nil diff --git a/go/vt/vtgate/planbuilder/expression_converter_test.go b/go/vt/vtgate/planbuilder/expression_converter_test.go index b1d4e9b851a..2ff05d188fa 100644 --- a/go/vt/vtgate/planbuilder/expression_converter_test.go +++ b/go/vt/vtgate/planbuilder/expression_converter_test.go @@ -21,7 +21,6 @@ import ( "github.com/stretchr/testify/require" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" ) @@ -41,7 +40,7 @@ func TestConversion(t *testing.T) { expressionsOut: e(evalengine.NewLiteralInt(1)), }, { expressionsIn: "@@foo", - expressionsOut: e(evalengine.NewColumn(0, collations.TypedCollation{})), + expressionsOut: e(evalengine.NewColumn(0)), }} for _, tc := range queries { diff --git a/go/vt/vtgate/planbuilder/filter.go b/go/vt/vtgate/planbuilder/filter.go index efc8d6089e4..589287495a7 100644 --- a/go/vt/vtgate/planbuilder/filter.go +++ b/go/vt/vtgate/planbuilder/filter.go @@ -17,7 +17,6 @@ limitations under the License. package planbuilder import ( - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" @@ -31,43 +30,30 @@ type ( logicalPlanCommon efilter *engine.Filter } - - simpleConverterLookup struct { - ctx *plancontext.PlanningContext - plan logicalPlan - canPushProjection bool - } ) var _ logicalPlan = (*filter)(nil) -var _ evalengine.TranslationLookup = (*simpleConverterLookup)(nil) -func (s *simpleConverterLookup) ColumnLookup(col *sqlparser.ColName) (int, error) { - offset, added, err := pushProjection(s.ctx, &sqlparser.AliasedExpr{Expr: col}, s.plan, true, true, false) - if err != nil { - return 0, err +func resolveFromPlan(ctx *plancontext.PlanningContext, plan logicalPlan, canPushProjection bool) evalengine.ColumnResolver { + return func(expr *sqlparser.ColName) (int, error) { + offset, added, err := pushProjection(ctx, &sqlparser.AliasedExpr{Expr: expr}, plan, true, true, false) + if err != nil { + return 0, err + } + if added && !canPushProjection { + return 0, vterrors.VT13001("column should not be pushed to projection while doing a column lookup") + } + return offset, nil } - if added && !s.canPushProjection { - return 0, vterrors.VT13001("column should not be pushed to projection while doing a column lookup") - } - return offset, nil -} - -func (s *simpleConverterLookup) CollationForExpr(expr sqlparser.Expr) collations.ID { - return s.ctx.SemTable.CollationForExpr(expr) -} - -func (s *simpleConverterLookup) DefaultCollation() collations.ID { - return s.ctx.SemTable.Collation } // newFilter builds a new filter. func newFilter(ctx *plancontext.PlanningContext, plan logicalPlan, expr sqlparser.Expr) (*filter, error) { - scl := &simpleConverterLookup{ - ctx: ctx, - plan: plan, - } - predicate, err := evalengine.Translate(expr, scl) + predicate, err := evalengine.Translate(expr, &evalengine.Config{ + ResolveColumn: resolveFromPlan(ctx, plan, false), + ResolveType: ctx.SemTable.TypeForExpr, + Collation: ctx.SemTable.Collation, + }) if err != nil { return nil, err } diff --git a/go/vt/vtgate/planbuilder/filtering.go b/go/vt/vtgate/planbuilder/filtering.go index 0dd4c889e80..429bdf93cc2 100644 --- a/go/vt/vtgate/planbuilder/filtering.go +++ b/go/vt/vtgate/planbuilder/filtering.go @@ -19,13 +19,11 @@ package planbuilder import ( "fmt" - "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" - "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/evalengine" + "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" ) // planFilter solves this particular expression, either by pushing it down to a child or changing this logicalPlan @@ -110,7 +108,7 @@ func filterVindexFunc(node *vindexFunc, filter sqlparser.Expr) (logicalPlan, err return nil, vterrors.VT12001(operators.VindexUnsupported + " (rhs is not a value)") } var err error - node.eVindexFunc.Value, err = evalengine.Translate(comparison.Right, semantics.EmptySemTable()) + node.eVindexFunc.Value, err = evalengine.Translate(comparison.Right, nil) if err != nil { return nil, vterrors.VT12001(fmt.Sprintf("%s: %v", operators.VindexUnsupported, err)) } diff --git a/go/vt/vtgate/planbuilder/gen4_planner.go b/go/vt/vtgate/planbuilder/gen4_planner.go index dc49ae0a700..4303e6fa9e3 100644 --- a/go/vt/vtgate/planbuilder/gen4_planner.go +++ b/go/vt/vtgate/planbuilder/gen4_planner.go @@ -216,7 +216,7 @@ func newBuildSelectPlan( return nil, nil, nil, err } - plan = optimizePlan(plan) + optimizePlan(plan) sel, isSel := selStmt.(*sqlparser.Select) if isSel { @@ -238,25 +238,25 @@ func newBuildSelectPlan( } // optimizePlan removes unnecessary simpleProjections that have been created while planning -func optimizePlan(plan logicalPlan) logicalPlan { - newPlan, _ := visit(plan, func(plan logicalPlan) (bool, logicalPlan, error) { - this, ok := plan.(*simpleProjection) - if !ok { - return true, plan, nil - } +func optimizePlan(plan logicalPlan) { + for _, lp := range plan.Inputs() { + optimizePlan(lp) + } - input, ok := this.input.(*simpleProjection) - if !ok { - return true, plan, nil - } + this, ok := plan.(*simpleProjection) + if !ok { + return + } - for i, col := range this.eSimpleProj.Cols { - this.eSimpleProj.Cols[i] = input.eSimpleProj.Cols[col] - } - this.input = input.input - return true, this, nil - }) - return newPlan + input, ok := this.input.(*simpleProjection) + if !ok { + return + } + + for i, col := range this.eSimpleProj.Cols { + this.eSimpleProj.Cols[i] = input.eSimpleProj.Cols[col] + } + this.input = input.input } func gen4UpdateStmtPlanner( @@ -497,7 +497,7 @@ func planHorizon(ctx *plancontext.PlanningContext, plan logicalPlan, in sqlparse return nil, ctx.SemTable.NotSingleRouteErr } if isRoute && rb.isSingleShard() { - err = planSingleShardRoutePlan(node, rb) + err = planSingleRoutePlan(node, rb) } else { plan, err = planOrderByOnUnion(ctx, plan, node) } diff --git a/go/vt/vtgate/planbuilder/horizon_planning.go b/go/vt/vtgate/planbuilder/horizon_planning.go index eea1400b916..d2d0a6b7266 100644 --- a/go/vt/vtgate/planbuilder/horizon_planning.go +++ b/go/vt/vtgate/planbuilder/horizon_planning.go @@ -20,6 +20,7 @@ import ( "fmt" "vitess.io/vitess/go/sqltypes" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" @@ -44,7 +45,7 @@ func (hp *horizonPlanning) planHorizon(ctx *plancontext.PlanningContext, plan lo } if isRoute && rb.isSingleShard() { - err := planSingleShardRoutePlan(hp.sel, rb) + err := planSingleRoutePlan(hp.sel, rb) if err != nil { return nil, err } @@ -60,7 +61,8 @@ func (hp *horizonPlanning) planHorizon(ctx *plancontext.PlanningContext, plan lo // a simpleProjection. We create a new Route that contains the derived table in the // FROM clause. Meaning that, when we push expressions to the select list of this // new Route, we do not want them to rewrite them. - if _, isSimpleProj := plan.(*simpleProjection); isSimpleProj { + sp, derivedTable := plan.(*simpleProjection) + if derivedTable { oldRewriteDerivedExpr := ctx.RewriteDerivedExpr defer func() { ctx.RewriteDerivedExpr = oldRewriteDerivedExpr @@ -75,10 +77,11 @@ func (hp *horizonPlanning) planHorizon(ctx *plancontext.PlanningContext, plan lo } needsOrdering := len(hp.qp.OrderExprs) > 0 - canShortcut := isRoute && hp.sel.Having == nil && !needsOrdering // If we still have a HAVING clause, it's because it could not be pushed to the WHERE, // so it probably has aggregations + canShortcut := isRoute && hp.sel.Having == nil && !needsOrdering + switch { case hp.qp.NeedsAggregation() || hp.sel.Having != nil: plan, err = hp.planAggregations(ctx, plan) @@ -88,10 +91,30 @@ func (hp *horizonPlanning) planHorizon(ctx *plancontext.PlanningContext, plan lo // if we already did sorting, we don't need to do it again needsOrdering = needsOrdering && !hp.qp.CanPushDownSorting case canShortcut: - err = planSingleShardRoutePlan(hp.sel, rb) + err = planSingleRoutePlan(hp.sel, rb) if err != nil { return nil, err } + case derivedTable: + pusher := func(ae *sqlparser.AliasedExpr) (int, error) { + offset, _, err := pushProjection(ctx, ae, sp.input, true, true, false) + return offset, err + } + needsVtGate, projections, colNames, err := hp.qp.NeedsProjecting(ctx, pusher) + if err != nil { + return nil, err + } + if !needsVtGate { + break + } + + // there were some expressions we could not push down entirely, + // so replace the simpleProjection with a real projection + plan = &projection{ + source: sp.input, + columns: projections, + columnNames: colNames, + } default: err = pushProjections(ctx, plan, hp.qp.SelectExprs) if err != nil { @@ -374,7 +397,7 @@ func generateAggregateParams(aggrs []operators.Aggr, aggrParamOffsets [][]offset if proj != nil { var aggrExpr sqlparser.Expr for _, ofs := range paramOffset { - curr := &sqlparser.Offset{V: ofs.col} + curr := sqlparser.NewOffset(ofs.col, aggr.Func) if aggrExpr == nil { aggrExpr = curr } else { @@ -401,11 +424,11 @@ func generateAggregateParams(aggrs []operators.Aggr, aggrParamOffsets [][]offset offset = incomingOffset } - opcode := engine.AggregateSum + opcode := popcode.AggregateSum switch aggr.OpCode { - case engine.AggregateMin, engine.AggregateMax, engine.AggregateRandom: + case popcode.AggregateMin, popcode.AggregateMax, popcode.AggregateRandom: opcode = aggr.OpCode - case engine.AggregateCount, engine.AggregateCountStar, engine.AggregateCountDistinct, engine.AggregateSumDistinct: + case popcode.AggregateCount, popcode.AggregateCountStar, popcode.AggregateCountDistinct, popcode.AggregateSumDistinct: if !pushed { opcode = aggr.OpCode } @@ -729,9 +752,9 @@ func wrapAndPushExpr(ctx *plancontext.PlanningContext, expr sqlparser.Expr, weig return 0, 0, vterrors.VT13001(fmt.Sprintf("in scatter query: complex ORDER BY expression: %s", sqlparser.String(expr))) } } - qt := ctx.SemTable.TypeFor(expr) + qt, _, found := ctx.SemTable.TypeForExpr(expr) wsNeeded := true - if qt != nil && sqltypes.IsNumber(*qt) { + if found && sqltypes.IsNumber(qt) { wsNeeded = false } @@ -1097,7 +1120,7 @@ func exprHasVindex(semTable *semantics.SemTable, expr sqlparser.Expr, hasToBeUni return false } -func planSingleShardRoutePlan(sel sqlparser.SelectStatement, rb *routeGen4) error { +func planSingleRoutePlan(sel sqlparser.SelectStatement, rb *routeGen4) error { err := stripDownQuery(sel, rb.Select) if err != nil { return err diff --git a/go/vt/vtgate/planbuilder/insert.go b/go/vt/vtgate/planbuilder/insert.go index d74d8fcebcc..15257ee1184 100644 --- a/go/vt/vtgate/planbuilder/insert.go +++ b/go/vt/vtgate/planbuilder/insert.go @@ -23,12 +23,10 @@ import ( "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -173,7 +171,7 @@ func buildInsertShardedPlan(ins *sqlparser.Insert, table *vindexes.Table, reserv routeValues[vIdx][colIdx] = make([]evalengine.Expr, len(rows)) colNum := findOrAddColumn(ins, col) for rowNum, row := range rows { - innerpv, err := evalengine.Translate(row[colNum], semantics.EmptySemTable()) + innerpv, err := evalengine.Translate(row[colNum], nil) if err != nil { return nil, err } @@ -405,7 +403,7 @@ func modifyForAutoinc(ins *sqlparser.Insert, eins *engine.Insert) error { row[colNum] = &sqlparser.NullVal{} } - pv, err := evalengine.Translate(row[colNum], semantics.EmptySemTable()) + pv, err := evalengine.Translate(row[colNum], nil) if err != nil { return err } diff --git a/go/vt/vtgate/planbuilder/operator_transformers.go b/go/vt/vtgate/planbuilder/operator_transformers.go index 2ec3efbac46..7ce349b21b5 100644 --- a/go/vt/vtgate/planbuilder/operator_transformers.go +++ b/go/vt/vtgate/planbuilder/operator_transformers.go @@ -64,13 +64,11 @@ func transformToLogicalPlan(ctx *plancontext.PlanningContext, op ops.Operator, i if err != nil { return nil, err } - scl := &simpleConverterLookup{ - canPushProjection: true, - ctx: ctx, - plan: plan, - } ast := ctx.SemTable.AndExpressions(op.Predicates...) - predicate, err := evalengine.Translate(ast, scl) + predicate, err := evalengine.Translate(ast, &evalengine.Config{ + ResolveColumn: resolveFromPlan(ctx, plan, true), + Collation: ctx.SemTable.Collation, + }) if err != nil { return nil, err } @@ -114,7 +112,7 @@ func transformHorizon(ctx *plancontext.PlanningContext, op *operators.Horizon, i } var plan logicalPlan if isRoute && rb.isSingleShard() { - err = planSingleShardRoutePlan(node, rb) + err = planSingleRoutePlan(node, rb) plan = rb } else { plan, err = planOrderByOnUnion(ctx, source, node) @@ -756,12 +754,12 @@ func gen4ValEqual(ctx *plancontext.PlanningContext, a, b sqlparser.Expr) bool { return ctx.SemTable.DirectDeps(a) == ctx.SemTable.DirectDeps(b) } - case sqlparser.Argument: - b, ok := b.(sqlparser.Argument) + case *sqlparser.Argument: + b, ok := b.(*sqlparser.Argument) if !ok { return false } - return a == b + return a.Name == b.Name case *sqlparser.Literal: b, ok := b.(*sqlparser.Literal) if !ok { diff --git a/go/vt/vtgate/planbuilder/operators/SQL_builder.go b/go/vt/vtgate/planbuilder/operators/SQL_builder.go index 93618a95675..74e5f20fea4 100644 --- a/go/vt/vtgate/planbuilder/operators/SQL_builder.go +++ b/go/vt/vtgate/planbuilder/operators/SQL_builder.go @@ -87,12 +87,16 @@ func (qb *queryBuilder) addPredicate(expr sqlparser.Expr) { } sel := qb.sel.(*sqlparser.Select) - if sel.Where == nil { - sel.AddWhere(expr) - return + _, isSubQuery := expr.(*sqlparser.ExtractedSubquery) + var addPred func(sqlparser.Expr) + + if sqlparser.ContainsAggregation(expr) && !isSubQuery { + addPred = sel.AddHaving + } else { + addPred = sel.AddWhere } for _, exp := range sqlparser.SplitAndExpression(nil, expr) { - sel.AddWhere(exp) + addPred(exp) } } @@ -349,7 +353,7 @@ func buildQuery(op ops.Operator, qb *queryBuilder) error { sel.Limit = opQuery.Limit sel.OrderBy = opQuery.OrderBy sel.GroupBy = opQuery.GroupBy - sel.Having = opQuery.Having + sel.Having = mergeHaving(sel.Having, opQuery.Having) sel.SelectExprs = opQuery.SelectExprs qb.addTableExpr(op.Alias, op.Alias, TableID(op), &sqlparser.DerivedTable{ Select: sel, @@ -380,3 +384,17 @@ func buildQuery(op ops.Operator, qb *queryBuilder) error { } return nil } + +func mergeHaving(h1, h2 *sqlparser.Where) *sqlparser.Where { + switch { + case h1 == nil && h2 == nil: + return nil + case h1 == nil: + return h2 + case h2 == nil: + return h1 + default: + h1.Expr = sqlparser.AndExpressions(h1.Expr, h2.Expr) + return h1 + } +} diff --git a/go/vt/vtgate/planbuilder/operators/derived.go b/go/vt/vtgate/planbuilder/operators/derived.go index 1488162bf46..06fa8a3f7af 100644 --- a/go/vt/vtgate/planbuilder/operators/derived.go +++ b/go/vt/vtgate/planbuilder/operators/derived.go @@ -145,9 +145,9 @@ func (d *Derived) AddColumn(ctx *plancontext.PlanningContext, expr sqlparser.Exp var pos int d.ColumnsOffset, pos = addToIntSlice(d.ColumnsOffset, i) + d.Columns = append(d.Columns, col) // add it to the source if we were not already passing it through if i <= -1 { - d.Columns = append(d.Columns, col) _, err := d.Source.AddColumn(ctx, sqlparser.NewColName(col.Name.String())) if err != nil { return 0, err diff --git a/go/vt/vtgate/planbuilder/operators/dml_planning.go b/go/vt/vtgate/planbuilder/operators/dml_planning.go index d1d331abe4b..eec13340f4c 100644 --- a/go/vt/vtgate/planbuilder/operators/dml_planning.go +++ b/go/vt/vtgate/planbuilder/operators/dml_planning.go @@ -156,7 +156,7 @@ func extractValueFromUpdate(upd *sqlparser.UpdateExpr) (evalengine.Expr, error) expr = sqlparser.NewArgument(sq.GetArgName()) } - pv, err := evalengine.Translate(expr, semantics.EmptySemTable()) + pv, err := evalengine.Translate(expr, nil) if err != nil || sqlparser.IsSimpleTuple(expr) { return nil, invalidUpdateExpr(upd, expr) } diff --git a/go/vt/vtgate/planbuilder/operators/horizon_planning.go b/go/vt/vtgate/planbuilder/operators/horizon_planning.go index e8d881a3dda..61d6b56f4f7 100644 --- a/go/vt/vtgate/planbuilder/operators/horizon_planning.go +++ b/go/vt/vtgate/planbuilder/operators/horizon_planning.go @@ -17,23 +17,25 @@ limitations under the License. package operators import ( + "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators/rewrite" + "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators/ops" ) var errNotHorizonPlanned = vterrors.VT12001("query cannot be fully operator planned") -func planHorizons(in ops.Operator) (ops.Operator, error) { +func planHorizons(ctx *plancontext.PlanningContext, in ops.Operator) (ops.Operator, error) { return rewrite.TopDown(in, func(in ops.Operator) (ops.Operator, rewrite.TreeIdentity, rewrite.VisitRule, error) { switch in := in.(type) { case *Horizon: - op, err := planHorizon(in) + op, visit, err := planHorizon(ctx, in) if err != nil { return nil, rewrite.SameTree, rewrite.SkipChildren, err } - return op, rewrite.NewTree, rewrite.VisitChildren, nil + return op, rewrite.NewTree, visit, nil case *Route: return in, rewrite.SameTree, rewrite.SkipChildren, nil default: @@ -42,18 +44,35 @@ func planHorizons(in ops.Operator) (ops.Operator, error) { }) } -func planHorizon(in *Horizon) (ops.Operator, error) { +func planHorizon(ctx *plancontext.PlanningContext, in *Horizon) (ops.Operator, rewrite.VisitRule, error) { rb, isRoute := in.Source.(*Route) if !isRoute { - return in, nil + return in, rewrite.VisitChildren, nil } if isRoute && rb.IsSingleShard() && in.Select.GetLimit() == nil { - return planSingleShardRoute(rb, in) + return planSingleRoute(rb, in) } - return nil, errNotHorizonPlanned + sel, isSel := in.Select.(*sqlparser.Select) + if !isSel { + return nil, rewrite.VisitChildren, errNotHorizonPlanned + } + + qp, err := CreateQPFromSelect(ctx, sel) + if err != nil { + return nil, rewrite.VisitChildren, err + } + + needsOrdering := len(qp.OrderExprs) > 0 + canShortcut := isRoute && sel.Having == nil && !needsOrdering + + if !qp.NeedsAggregation() && sel.Having == nil && canShortcut && !needsOrdering && !qp.NeedsDistinct() && in.Select.GetLimit() == nil { + return planSingleRoute(rb, in) + } + return nil, rewrite.VisitChildren, errNotHorizonPlanned } -func planSingleShardRoute(rb *Route, horizon *Horizon) (ops.Operator, error) { + +func planSingleRoute(rb *Route, horizon *Horizon) (ops.Operator, rewrite.VisitRule, error) { rb.Source, horizon.Source = horizon, rb.Source - return rb, nil + return rb, rewrite.SkipChildren, nil } diff --git a/go/vt/vtgate/planbuilder/operators/info_schema_planning.go b/go/vt/vtgate/planbuilder/operators/info_schema_planning.go index 2b665fea91d..92df6548abb 100644 --- a/go/vt/vtgate/planbuilder/operators/info_schema_planning.go +++ b/go/vt/vtgate/planbuilder/operators/info_schema_planning.go @@ -25,7 +25,6 @@ import ( "golang.org/x/exp/maps" "golang.org/x/exp/slices" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/sqlparser" @@ -47,7 +46,7 @@ type InfoSchemaRouting struct { func (isr *InfoSchemaRouting) UpdateRoutingParams(_ *plancontext.PlanningContext, rp *engine.RoutingParameters) error { rp.SysTableTableSchema = nil for _, expr := range isr.SysTableTableSchema { - eexpr, err := evalengine.Translate(expr, ¬ImplementedSchemaInfoConverter{}) + eexpr, err := evalengine.Translate(expr, &evalengine.Config{ResolveColumn: NotImplementedSchemaInfoResolver}) if err != nil { return err } @@ -56,7 +55,7 @@ func (isr *InfoSchemaRouting) UpdateRoutingParams(_ *plancontext.PlanningContext rp.SysTableTableName = make(map[string]evalengine.Expr, len(isr.SysTableTableName)) for k, expr := range isr.SysTableTableName { - eexpr, err := evalengine.Translate(expr, ¬ImplementedSchemaInfoConverter{}) + eexpr, err := evalengine.Translate(expr, &evalengine.Config{ResolveColumn: NotImplementedSchemaInfoResolver}) if err != nil { return err } @@ -127,7 +126,7 @@ func extractInfoSchemaRoutingPredicate(in sqlparser.Expr, reservedVars *sqlparse // here we are just checking if this query can be translated to an evalengine expression // we'll need to do this translation again later when building the engine.Route - _, err := evalengine.Translate(rhs, ¬ImplementedSchemaInfoConverter{}) + _, err := evalengine.Translate(rhs, &evalengine.Config{ResolveColumn: NotImplementedSchemaInfoResolver}) if err != nil { // if we can't translate this to an evalengine expression, // we are not going to be able to route based on this expression, @@ -140,7 +139,7 @@ func extractInfoSchemaRoutingPredicate(in sqlparser.Expr, reservedVars *sqlparse } else { name = reservedVars.ReserveColName(col) } - cmp.Right = sqlparser.NewArgument(name) + cmp.Right = sqlparser.NewTypedArgument(name, sqltypes.VarChar) return isSchemaName, name, rhs } @@ -306,16 +305,6 @@ func isTableNameCol(col *sqlparser.ColName) bool { return col.Name.EqualString("table_name") || col.Name.EqualString("referenced_table_name") } -type notImplementedSchemaInfoConverter struct{} - -func (f *notImplementedSchemaInfoConverter) ColumnLookup(*sqlparser.ColName) (int, error) { +func NotImplementedSchemaInfoResolver(*sqlparser.ColName) (int, error) { return 0, vterrors.VT12001("comparing table schema name with a column name") } - -func (f *notImplementedSchemaInfoConverter) CollationForExpr(sqlparser.Expr) collations.ID { - return collations.Unknown -} - -func (f *notImplementedSchemaInfoConverter) DefaultCollation() collations.ID { - return collations.Default() -} diff --git a/go/vt/vtgate/planbuilder/operators/operator.go b/go/vt/vtgate/planbuilder/operators/operator.go index 2621fa9875b..35a3d2af91d 100644 --- a/go/vt/vtgate/planbuilder/operators/operator.go +++ b/go/vt/vtgate/planbuilder/operators/operator.go @@ -68,7 +68,7 @@ func PlanQuery(ctx *plancontext.PlanningContext, selStmt sqlparser.Statement) (o backup := Clone(op) - op, err = planHorizons(op) + op, err = planHorizons(ctx, op) if err == errNotHorizonPlanned { op = backup } else if err != nil { diff --git a/go/vt/vtgate/planbuilder/operators/operator_test.go b/go/vt/vtgate/planbuilder/operators/operator_test.go index 4ba5588f22e..21475236e94 100644 --- a/go/vt/vtgate/planbuilder/operators/operator_test.go +++ b/go/vt/vtgate/planbuilder/operators/operator_test.go @@ -25,17 +25,14 @@ import ( "strings" "testing" - "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - - "vitess.io/vitess/go/vt/vtgate/engine" - - "vitess.io/vitess/go/vt/vtgate/vindexes" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/sqlparser" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" + "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" + "vitess.io/vitess/go/vt/vtgate/vindexes" ) type lineCountingReader struct { @@ -134,7 +131,7 @@ func testString(op interface{}) string { // TODO case *SubQuery: var inners []string for _, sqOp := range op.Inner { - subquery := fmt.Sprintf("{\n\tType: %s", engine.PulloutOpcode(sqOp.ExtractedSubquery.OpCode).String()) + subquery := fmt.Sprintf("{\n\tType: %s", popcode.PulloutOpcode(sqOp.ExtractedSubquery.OpCode).String()) if sqOp.ExtractedSubquery.GetArgName() != "" { subquery += fmt.Sprintf("\n\tArgName: %s", sqOp.ExtractedSubquery.GetArgName()) } diff --git a/go/vt/vtgate/planbuilder/operators/queryprojection.go b/go/vt/vtgate/planbuilder/operators/queryprojection.go index 29e356c6650..cf455bb6870 100644 --- a/go/vt/vtgate/planbuilder/operators/queryprojection.go +++ b/go/vt/vtgate/planbuilder/operators/queryprojection.go @@ -25,10 +25,9 @@ import ( "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/vt/vtgate/engine" - "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) type ( @@ -75,7 +74,7 @@ type ( Aggr struct { Original *sqlparser.AliasedExpr Func sqlparser.AggrFunc - OpCode engine.AggregateOpcode + OpCode popcode.AggregateOpcode Alias string // The index at which the user expects to see this aggregated function. Set to nil, if the user does not ask for it Index *int @@ -224,7 +223,6 @@ func (ar *AggrRewriter) RewriteUp() func(*sqlparser.Cursor) bool { Col: &sqlparser.AliasedExpr{Expr: fExp}, } ar.qp.HasAggr = true - cursor.Replace(sqlparser.NewOffset(len(ar.qp.SelectExprs), fExp)) ar.qp.SelectExprs = append(ar.qp.SelectExprs, col) ar.qp.AddedColumn++ @@ -418,7 +416,84 @@ func (qp *QueryProjection) NeedsAggregation() bool { return qp.HasAggr || len(qp.groupByExprs) > 0 } -func (qp QueryProjection) onlyAggr() bool { +// NeedsProjecting returns true if we have projections that need to be evaluated at the vtgate level +// and can't be pushed down to MySQL +func (qp *QueryProjection) NeedsProjecting( + ctx *plancontext.PlanningContext, + pusher func(expr *sqlparser.AliasedExpr) (int, error), +) (needsVtGateEval bool, expressions []sqlparser.Expr, colNames []string, err error) { + for _, se := range qp.SelectExprs { + var ae *sqlparser.AliasedExpr + ae, err = se.GetAliasedExpr() + if err != nil { + return false, nil, nil, err + } + + expr := ae.Expr + colNames = append(colNames, ae.ColumnName()) + + if _, isCol := expr.(*sqlparser.ColName); isCol { + offset, err := pusher(ae) + if err != nil { + return false, nil, nil, err + } + expressions = append(expressions, sqlparser.NewOffset(offset, expr)) + continue + } + + stopOnError := func(sqlparser.SQLNode, sqlparser.SQLNode) bool { + return err == nil + } + rewriter := func(cursor *sqlparser.CopyOnWriteCursor) { + col, isCol := cursor.Node().(*sqlparser.ColName) + if !isCol { + return + } + var tableInfo semantics.TableInfo + tableInfo, err = ctx.SemTable.TableInfoForExpr(col) + if err != nil { + return + } + dt, isDT := tableInfo.(*semantics.DerivedTable) + if !isDT { + return + } + + rewritten := semantics.RewriteDerivedTableExpression(col, dt) + if sqlparser.ContainsAggregation(rewritten) { + offset, tErr := pusher(&sqlparser.AliasedExpr{Expr: col}) + if tErr != nil { + err = tErr + return + } + cursor.Replace(sqlparser.NewOffset(offset, col)) + } + } + newExpr := sqlparser.CopyOnRewrite(expr, stopOnError, rewriter, nil) + + if err != nil { + return + } + + if newExpr != expr { + // if we changed the expression, it means that we have to evaluate the rest at the vtgate level + expressions = append(expressions, newExpr.(sqlparser.Expr)) + needsVtGateEval = true + continue + } + + // we did not need to push any parts of this expression down. Let's check if we can push all of it + offset, err := pusher(ae) + if err != nil { + return false, nil, nil, err + } + expressions = append(expressions, sqlparser.NewOffset(offset, expr)) + } + + return +} + +func (qp *QueryProjection) onlyAggr() bool { if !qp.HasAggr { return false } @@ -473,7 +548,7 @@ orderBy: if !qp.isExprInGroupByExprs(ctx, expr) { out = append(out, Aggr{ Original: aliasedExpr, - OpCode: engine.AggregateRandom, + OpCode: popcode.AggregateRandom, Alias: aliasedExpr.ColumnName(), Index: &idxCopy, }) @@ -485,14 +560,14 @@ orderBy: return nil, vterrors.VT12001("in scatter query: complex aggregate expression") } - opcode, found := engine.SupportedAggregates[strings.ToLower(fnc.AggrName())] + opcode, found := popcode.SupportedAggregates[strings.ToLower(fnc.AggrName())] if !found { return nil, vterrors.VT12001(fmt.Sprintf("in scatter query: aggregation function '%s'", fnc.AggrName())) } - if opcode == engine.AggregateCount { + if opcode == popcode.AggregateCount { if _, isStar := fnc.(*sqlparser.CountStar); isStar { - opcode = engine.AggregateCountStar + opcode = popcode.AggregateCountStar } } @@ -500,10 +575,10 @@ orderBy: if aggr.IsDistinct() { switch opcode { - case engine.AggregateCount: - opcode = engine.AggregateCountDistinct - case engine.AggregateSum: - opcode = engine.AggregateSumDistinct + case popcode.AggregateCount: + opcode = popcode.AggregateCountDistinct + case popcode.AggregateSum: + opcode = popcode.AggregateSumDistinct } } @@ -601,8 +676,8 @@ func checkForInvalidGroupingExpressions(expr sqlparser.Expr) error { return false, vterrors.VT03005(sqlparser.String(expr)) } _, isSubQ := node.(*sqlparser.Subquery) - arg, isArg := node.(sqlparser.Argument) - if isSubQ || (isArg && strings.HasPrefix(string(arg), "__sq")) { + arg, isArg := node.(*sqlparser.Argument) + if isSubQ || (isArg && strings.HasPrefix(arg.Name, "__sq")) { return false, vterrors.VT12001("subqueries in GROUP BY") } return true, nil diff --git a/go/vt/vtgate/planbuilder/operators/route_planning.go b/go/vt/vtgate/planbuilder/operators/route_planning.go index 7ba3c402f8b..8386b2e0f5b 100644 --- a/go/vt/vtgate/planbuilder/operators/route_planning.go +++ b/go/vt/vtgate/planbuilder/operators/route_planning.go @@ -621,12 +621,12 @@ func gen4ValEqual(ctx *plancontext.PlanningContext, a, b sqlparser.Expr) bool { return ctx.SemTable.DirectDeps(a) == ctx.SemTable.DirectDeps(b) } - case sqlparser.Argument: - b, ok := b.(sqlparser.Argument) + case *sqlparser.Argument: + b, ok := b.(*sqlparser.Argument) if !ok { return false } - return a == b + return a.Name == b.Name case *sqlparser.Literal: b, ok := b.(*sqlparser.Literal) if !ok { diff --git a/go/vt/vtgate/planbuilder/operators/sharded_routing.go b/go/vt/vtgate/planbuilder/operators/sharded_routing.go index be23698975e..332cb69ba76 100644 --- a/go/vt/vtgate/planbuilder/operators/sharded_routing.go +++ b/go/vt/vtgate/planbuilder/operators/sharded_routing.go @@ -25,6 +25,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" @@ -600,14 +601,14 @@ func makeEvalEngineExpr(ctx *plancontext.PlanningContext, n sqlparser.Expr) eval if extractedSubquery == nil { continue } - switch engine.PulloutOpcode(extractedSubquery.OpCode) { - case engine.PulloutIn, engine.PulloutNotIn: + switch popcode.PulloutOpcode(extractedSubquery.OpCode) { + case popcode.PulloutIn, popcode.PulloutNotIn: expr = sqlparser.NewListArg(extractedSubquery.GetArgName()) - case engine.PulloutValue, engine.PulloutExists: + case popcode.PulloutValue, popcode.PulloutExists: expr = sqlparser.NewArgument(extractedSubquery.GetArgName()) } } - ee, _ := evalengine.Translate(expr, ctx.SemTable) + ee, _ := evalengine.Translate(expr, &evalengine.Config{Collation: ctx.SemTable.Collation}) if ee != nil { return ee } diff --git a/go/vt/vtgate/planbuilder/operators/subquery_planning.go b/go/vt/vtgate/planbuilder/operators/subquery_planning.go index 6dd5220e389..890dae5005f 100644 --- a/go/vt/vtgate/planbuilder/operators/subquery_planning.go +++ b/go/vt/vtgate/planbuilder/operators/subquery_planning.go @@ -20,6 +20,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators/ops" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators/rewrite" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" @@ -61,7 +62,7 @@ func optimizeSubQuery(ctx *plancontext.PlanningContext, op *SubQuery, ts semanti continue } - if inner.ExtractedSubquery.OpCode == int(engine.PulloutExists) { + if inner.ExtractedSubquery.OpCode == int(popcode.PulloutExists) { correlatedTree, err := createCorrelatedSubqueryOp(ctx, innerOp, outer, preds, inner.ExtractedSubquery) if err != nil { return nil, rewrite.SameTree, err @@ -351,8 +352,9 @@ func rewriteColumnsInSubqueryOpForJoin( } // get the bindVariable for that column name and replace it in the subquery + typ, _, _ := ctx.SemTable.TypeForExpr(node) bindVar := ctx.ReservedVars.ReserveColName(node) - cursor.Replace(sqlparser.NewArgument(bindVar)) + cursor.Replace(sqlparser.NewTypedArgument(bindVar, typ)) // check whether the bindVariable already exists in the joinVars of the other tree _, alreadyExists := outerTree.Vars[bindVar] if alreadyExists { @@ -417,8 +419,9 @@ func createCorrelatedSubqueryOp( } // get the bindVariable for that column name and replace it in the predicate + typ, _, _ := ctx.SemTable.TypeForExpr(node) bindVar := ctx.ReservedVars.ReserveColName(node) - cursor.Replace(sqlparser.NewArgument(bindVar)) + cursor.Replace(sqlparser.NewTypedArgument(bindVar, typ)) // store it in the map for future comparisons bindVars[node] = bindVar @@ -456,7 +459,7 @@ func createCorrelatedSubqueryOp( func canMergeSubqueryOnColumnSelection(ctx *plancontext.PlanningContext, a, b *Route, predicate *sqlparser.ExtractedSubquery) bool { left := predicate.OtherSide opCode := predicate.OpCode - if opCode != int(engine.PulloutValue) && opCode != int(engine.PulloutIn) { + if opCode != int(popcode.PulloutValue) && opCode != int(popcode.PulloutIn) { return false } diff --git a/go/vt/vtgate/planbuilder/ordered_aggregate.go b/go/vt/vtgate/planbuilder/ordered_aggregate.go index 9458e85de66..4d7ca9f1d77 100644 --- a/go/vt/vtgate/planbuilder/ordered_aggregate.go +++ b/go/vt/vtgate/planbuilder/ordered_aggregate.go @@ -21,16 +21,14 @@ import ( "strconv" "strings" - "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" + "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" ) var _ logicalPlan = (*orderedAggregate)(nil) @@ -265,7 +263,7 @@ func (oa *orderedAggregate) Primitive() engine.Primitive { func (oa *orderedAggregate) pushAggr(pb *primitiveBuilder, expr *sqlparser.AliasedExpr, origin logicalPlan) (rc *resultColumn, colNumber int, err error) { aggrFunc, _ := expr.Expr.(sqlparser.AggrFunc) - origOpcode := engine.SupportedAggregates[strings.ToLower(aggrFunc.AggrName())] + origOpcode := popcode.SupportedAggregates[strings.ToLower(aggrFunc.AggrName())] opcode := origOpcode if aggrFunc.GetArgs() != nil && len(aggrFunc.GetArgs()) != 1 { @@ -294,10 +292,10 @@ func (oa *orderedAggregate) pushAggr(pb *primitiveBuilder, expr *sqlparser.Alias oa.extraDistinct = col oa.preProcess = true switch opcode { - case engine.AggregateCount: - opcode = engine.AggregateCountDistinct - case engine.AggregateSum: - opcode = engine.AggregateSumDistinct + case popcode.AggregateCount: + opcode = popcode.AggregateCountDistinct + case popcode.AggregateSum: + opcode = popcode.AggregateSumDistinct } oa.aggregates = append(oa.aggregates, &engine.AggregateParams{ Opcode: opcode, @@ -328,7 +326,7 @@ func (oa *orderedAggregate) pushAggr(pb *primitiveBuilder, expr *sqlparser.Alias // needDistinctHandling returns true if oa needs to handle the distinct clause. // If true, it will also return the aliased expression that needs to be pushed // down into the underlying route. -func (oa *orderedAggregate) needDistinctHandling(pb *primitiveBuilder, expr *sqlparser.AliasedExpr, opcode engine.AggregateOpcode) (bool, *sqlparser.AliasedExpr, error) { +func (oa *orderedAggregate) needDistinctHandling(pb *primitiveBuilder, expr *sqlparser.AliasedExpr, opcode popcode.AggregateOpcode) (bool, *sqlparser.AliasedExpr, error) { var innerAliased *sqlparser.AliasedExpr aggr, ok := expr.Expr.(sqlparser.AggrFunc) @@ -339,7 +337,7 @@ func (oa *orderedAggregate) needDistinctHandling(pb *primitiveBuilder, expr *sql if !aggr.IsDistinct() { return false, nil, nil } - if opcode != engine.AggregateCount && opcode != engine.AggregateSum && opcode != engine.AggregateCountStar { + if opcode != popcode.AggregateCount && opcode != popcode.AggregateSum && opcode != popcode.AggregateCountStar { return false, nil, nil } @@ -382,11 +380,11 @@ func (oa *orderedAggregate) Wireup(plan logicalPlan, jt *jointab) error { } for _, key := range oa.aggregates { switch key.Opcode { - case engine.AggregateCount: + case popcode.AggregateCount: if key.Alias == "" { key.Alias = key.Opcode.String() } - key.Opcode = engine.AggregateSum + key.Opcode = popcode.AggregateSum } } diff --git a/go/vt/vtgate/planbuilder/postprocess.go b/go/vt/vtgate/planbuilder/postprocess.go index 3c71fdb97fe..c64ce9f493d 100644 --- a/go/vt/vtgate/planbuilder/postprocess.go +++ b/go/vt/vtgate/planbuilder/postprocess.go @@ -17,11 +17,9 @@ limitations under the License. package planbuilder import ( - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/vt/vtgate/semantics" ) // This file has functions to analyze postprocessing @@ -106,7 +104,7 @@ func setUpperLimit(plan logicalPlan) (bool, logicalPlan, error) { case *join, *joinGen4, *hashJoin: return false, node, nil case *memorySort: - pv := evalengine.NewBindVar("__upper_limit", collations.TypedCollation{}) + pv := evalengine.NewBindVar("__upper_limit") node.eMemorySort.UpperLimit = pv // we don't want to go down to the rest of the tree return false, node, nil @@ -138,15 +136,14 @@ func setUpperLimit(plan logicalPlan) (bool, logicalPlan, error) { func createLimit(input logicalPlan, limit *sqlparser.Limit) (logicalPlan, error) { plan := newLimit(input) - emptySemTable := semantics.EmptySemTable() - pv, err := evalengine.Translate(limit.Rowcount, emptySemTable) + pv, err := evalengine.Translate(limit.Rowcount, nil) if err != nil { return nil, vterrors.Wrap(err, "unexpected expression in LIMIT") } plan.elimit.Count = pv if limit.Offset != nil { - pv, err = evalengine.Translate(limit.Offset, emptySemTable) + pv, err = evalengine.Translate(limit.Offset, nil) if err != nil { return nil, vterrors.Wrap(err, "unexpected expression in OFFSET") } diff --git a/go/vt/vtgate/planbuilder/predicate_rewrite_test.go b/go/vt/vtgate/planbuilder/predicate_rewrite_test.go new file mode 100644 index 00000000000..71c8a6f8621 --- /dev/null +++ b/go/vt/vtgate/planbuilder/predicate_rewrite_test.go @@ -0,0 +1,148 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package planbuilder + +import ( + "fmt" + "math/rand" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vtgate/evalengine" +) + +type testCase struct { + nodes int + depth int +} + +type nodeType int + +const ( + NODE nodeType = iota + NOT + AND + OR + XOR + SIZE +) + +func (tc testCase) createPredicate(lvl int) sqlparser.Expr { + if lvl >= tc.depth { + // we're at max depth, so we just return one of the nodes + n := rand.Intn(tc.nodes) + return sqlparser.NewColName(fmt.Sprintf("n%d", n)) + } + switch nodeType(rand.Intn(int(SIZE))) { + case NODE: + n := rand.Intn(tc.nodes) + return sqlparser.NewColName(fmt.Sprintf("n%d", n)) + case NOT: + return &sqlparser.NotExpr{ + Expr: tc.createPredicate(lvl + 1), + } + case AND: + return &sqlparser.AndExpr{ + Left: tc.createPredicate(lvl + 1), + Right: tc.createPredicate(lvl + 1), + } + case OR: + return &sqlparser.OrExpr{ + Left: tc.createPredicate(lvl + 1), + Right: tc.createPredicate(lvl + 1), + } + case XOR: + return &sqlparser.XorExpr{ + Left: tc.createPredicate(lvl + 1), + Right: tc.createPredicate(lvl + 1), + } + } + panic("unexpected nodeType") +} + +func TestFuzzRewriting(t *testing.T) { + // This test, that runs for one second only, will produce lots of random boolean expressions, + // mixing AND, NOT, OR, XOR and column expressions. + // It then takes the predicate and simplifies it + // Finally, it runs both the original and simplified predicate with all combinations of column + // values - trying TRUE, FALSE and NULL. If the two expressions do not return the same value, + // this is considered a test failure. + + start := time.Now() + for time.Since(start) < 1*time.Second { + tc := testCase{ + nodes: rand.Intn(4) + 1, + depth: rand.Intn(4) + 1, + } + + predicate := tc.createPredicate(0) + name := sqlparser.String(predicate) + t.Run(name, func(t *testing.T) { + simplified := sqlparser.RewritePredicate(predicate) + + original, err := evalengine.Translate(predicate, &evalengine.Config{ + ResolveColumn: resolveForFuzz, + }) + require.NoError(t, err) + simpler, err := evalengine.Translate(simplified.(sqlparser.Expr), &evalengine.Config{ + ResolveColumn: resolveForFuzz, + }) + require.NoError(t, err) + + env := evalengine.EmptyExpressionEnv() + env.Row = make([]sqltypes.Value, tc.nodes) + for i := range env.Row { + env.Row[i] = sqltypes.NewInt32(1) + } + + testValues(t, env, 0, original, simpler) + }) + } +} + +func testValues(t *testing.T, env *evalengine.ExpressionEnv, i int, original, simpler evalengine.Expr) { + for n := 0; n < 3; n++ { + switch n { + case 0: + env.Row[i] = sqltypes.NewInt32(0) + case 1: + env.Row[i] = sqltypes.NewInt32(1) + case 2: + env.Row[i] = sqltypes.NULL + } + + v1, err := env.Evaluate(original) + require.NoError(t, err) + v2, err := env.Evaluate(simpler) + require.NoError(t, err) + assert.Equal(t, v1.Value(), v2.Value()) + if len(env.Row) > i+1 { + testValues(t, env, i+1, original, simpler) + } + } +} + +func resolveForFuzz(colname *sqlparser.ColName) (int, error) { + offsetStr := colname.Name.String()[1:] + return strconv.Atoi(offsetStr) +} diff --git a/go/vt/vtgate/planbuilder/project.go b/go/vt/vtgate/planbuilder/project.go index 6dfea3fcec2..3a8d9e260c8 100644 --- a/go/vt/vtgate/planbuilder/project.go +++ b/go/vt/vtgate/planbuilder/project.go @@ -24,6 +24,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" ) @@ -74,7 +75,7 @@ func planProjection(pb *primitiveBuilder, in logicalPlan, expr *sqlparser.Aliase // the rows be correctly ordered. case *orderedAggregate: if aggrFunc, isAggregate := expr.Expr.(sqlparser.AggrFunc); isAggregate { - if _, ok := engine.SupportedAggregates[strings.ToLower(aggrFunc.AggrName())]; ok { + if _, ok := popcode.SupportedAggregates[strings.ToLower(aggrFunc.AggrName())]; ok { rc, colNumber, err := node.pushAggr(pb, expr, origin) if err != nil { return nil, nil, 0, err diff --git a/go/vt/vtgate/planbuilder/projection.go b/go/vt/vtgate/planbuilder/projection.go index 6c942037490..a3274d3d0e4 100644 --- a/go/vt/vtgate/planbuilder/projection.go +++ b/go/vt/vtgate/planbuilder/projection.go @@ -44,7 +44,10 @@ var _ logicalPlan = (*projection)(nil) func (p *projection) WireupGen4(ctx *plancontext.PlanningContext) error { columns := make([]evalengine.Expr, 0, len(p.columns)) for _, expr := range p.columns { - convert, err := evalengine.Translate(expr, ctx.SemTable) + convert, err := evalengine.Translate(expr, &evalengine.Config{ + ResolveColumn: resolveFromPlan(ctx, p.source, false), + Collation: ctx.SemTable.Collation, + }) if err != nil { return err } diff --git a/go/vt/vtgate/planbuilder/projection_pushing.go b/go/vt/vtgate/planbuilder/projection_pushing.go index e770ef1c9bd..f0a8d2e2145 100644 --- a/go/vt/vtgate/planbuilder/projection_pushing.go +++ b/go/vt/vtgate/planbuilder/projection_pushing.go @@ -22,6 +22,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" @@ -138,7 +139,7 @@ func pushProjectionIntoOA(ctx *plancontext.PlanningContext, expr *sqlparser.Alia return 0, false, err } node.aggregates = append(node.aggregates, &engine.AggregateParams{ - Opcode: engine.AggregateRandom, + Opcode: popcode.AggregateRandom, Col: offset, Alias: expr.ColumnName(), Expr: expr.Expr, diff --git a/go/vt/vtgate/planbuilder/pullout_subquery.go b/go/vt/vtgate/planbuilder/pullout_subquery.go index a70fb5efdc4..4e1008ff7ae 100644 --- a/go/vt/vtgate/planbuilder/pullout_subquery.go +++ b/go/vt/vtgate/planbuilder/pullout_subquery.go @@ -20,6 +20,7 @@ import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" "vitess.io/vitess/go/vt/vtgate/semantics" ) @@ -37,7 +38,7 @@ type pulloutSubquery struct { } // newPulloutSubquery builds a new pulloutSubquery. -func newPulloutSubquery(opcode engine.PulloutOpcode, sqName, hasValues string, subquery logicalPlan) *pulloutSubquery { +func newPulloutSubquery(opcode popcode.PulloutOpcode, sqName, hasValues string, subquery logicalPlan) *pulloutSubquery { return &pulloutSubquery{ subquery: subquery, eSubquery: &engine.PulloutSubquery{ diff --git a/go/vt/vtgate/planbuilder/rewrite.go b/go/vt/vtgate/planbuilder/rewrite.go index 93884ecf863..4a95696c0f0 100644 --- a/go/vt/vtgate/planbuilder/rewrite.go +++ b/go/vt/vtgate/planbuilder/rewrite.go @@ -19,7 +19,7 @@ package planbuilder import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/semantics" ) @@ -131,7 +131,7 @@ func rewriteSubquery(cursor *sqlparser.Cursor, r *rewriter, node *sqlparser.Subq if err != nil { return err } - if semTableSQ.GetArgName() != "" || engine.PulloutOpcode(semTableSQ.OpCode) != engine.PulloutValue { + if semTableSQ.GetArgName() != "" || popcode.PulloutOpcode(semTableSQ.OpCode) != popcode.PulloutValue { return nil } r.inSubquery++ diff --git a/go/vt/vtgate/planbuilder/route.go b/go/vt/vtgate/planbuilder/route.go index a7429417cc6..64f4f7cbc63 100644 --- a/go/vt/vtgate/planbuilder/route.go +++ b/go/vt/vtgate/planbuilder/route.go @@ -20,13 +20,10 @@ import ( "fmt" "strconv" - "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -252,9 +249,9 @@ func (rb *route) procureValues(plan logicalPlan, jt *jointab, val sqlparser.Expr return evalengine.NewTupleExpr(exprs...), nil case *sqlparser.ColName: joinVar := jt.Procure(plan, typedVal, rb.Order()) - return evalengine.NewBindVar(joinVar, collations.TypedCollation{}), nil + return evalengine.NewBindVar(joinVar), nil default: - return evalengine.Translate(typedVal, semantics.EmptySemTable()) + return evalengine.Translate(typedVal, nil) } } diff --git a/go/vt/vtgate/planbuilder/select.go b/go/vt/vtgate/planbuilder/select.go index 7ba5e27dc07..e325e5a4c14 100644 --- a/go/vt/vtgate/planbuilder/select.go +++ b/go/vt/vtgate/planbuilder/select.go @@ -364,7 +364,7 @@ func handleDualSelects(sel *sqlparser.Select, vschema plancontext.VSchema) (engi if len(lockFunctions) > 0 { return nil, vterrors.VT12001(fmt.Sprintf("LOCK function and other expression: [%s] in same select query", sqlparser.String(expr))) } - exprs[i], err = evalengine.Translate(expr.Expr, evalengine.LookupDefaultCollation(vschema.ConnCollation())) + exprs[i], err = evalengine.Translate(expr.Expr, &evalengine.Config{Collation: vschema.ConnCollation()}) if err != nil { return nil, nil } diff --git a/go/vt/vtgate/planbuilder/show.go b/go/vt/vtgate/planbuilder/show.go index a76c4dac333..28e7e707848 100644 --- a/go/vt/vtgate/planbuilder/show.go +++ b/go/vt/vtgate/planbuilder/show.go @@ -22,22 +22,20 @@ import ( "sort" "strings" - "vitess.io/vitess/go/vt/log" - vschemapb "vitess.io/vitess/go/vt/proto/vschema" - "vitess.io/vitess/go/vt/sidecardb" - "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - - topodatapb "vitess.io/vitess/go/vt/proto/topodata" - "vitess.io/vitess/go/vt/vtgate/vindexes" - "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/key" + "vitess.io/vitess/go/vt/log" querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vschemapb "vitess.io/vitess/go/vt/proto/vschema" + "vitess.io/vitess/go/vt/sidecardb" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/engine" + popcode "vitess.io/vitess/go/vt/vtgate/engine/opcode" + "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" + "vitess.io/vitess/go/vt/vtgate/vindexes" ) const ( @@ -568,7 +566,7 @@ func buildShowVGtidPlan(show *sqlparser.ShowBasic, vschema plancontext.VSchema) PreProcess: true, Aggregates: []*engine.AggregateParams{ { - Opcode: engine.AggregateGtid, + Opcode: popcode.AggregateGtid, Col: 1, Alias: "global vgtid_executed", }, diff --git a/go/vt/vtgate/planbuilder/subquery_op.go b/go/vt/vtgate/planbuilder/subquery_op.go index 93596a5c55e..ed945cbc6ad 100644 --- a/go/vt/vtgate/planbuilder/subquery_op.go +++ b/go/vt/vtgate/planbuilder/subquery_op.go @@ -19,6 +19,7 @@ package planbuilder import ( "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" ) @@ -41,7 +42,7 @@ func transformSubQueryPlan(ctx *plancontext.PlanningContext, op *operators.SubQu if merged != nil { return merged, nil } - plan := newPulloutSubquery(engine.PulloutOpcode(op.Extracted.OpCode), argName, hasValuesArg, innerPlan) + plan := newPulloutSubquery(opcode.PulloutOpcode(op.Extracted.OpCode), argName, hasValuesArg, innerPlan) if err != nil { return nil, err } diff --git a/go/vt/vtgate/planbuilder/system_tables.go b/go/vt/vtgate/planbuilder/system_tables.go index ba061af909f..d8c429af6e9 100644 --- a/go/vt/vtgate/planbuilder/system_tables.go +++ b/go/vt/vtgate/planbuilder/system_tables.go @@ -19,29 +19,12 @@ package planbuilder import ( "strings" - "vitess.io/vitess/go/mysql/collations" - - "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/evalengine" + "vitess.io/vitess/go/vt/vtgate/planbuilder/operators" ) -type notImplementedSchemaInfoConverter struct{} - -func (f *notImplementedSchemaInfoConverter) ColumnLookup(*sqlparser.ColName) (int, error) { - return 0, vterrors.VT12001("comparing table schema name with a column name") -} - -func (f *notImplementedSchemaInfoConverter) CollationForExpr(sqlparser.Expr) collations.ID { - return collations.Unknown -} - -func (f *notImplementedSchemaInfoConverter) DefaultCollation() collations.ID { - return collations.Default() -} - func (pb *primitiveBuilder) findSysInfoRoutingPredicates(expr sqlparser.Expr, rut *route, reservedVars *sqlparser.ReservedVars) error { isTableSchema, bvName, out, err := extractInfoSchemaRoutingPredicate(expr, reservedVars) if err != nil { @@ -64,14 +47,14 @@ func (pb *primitiveBuilder) findSysInfoRoutingPredicates(expr sqlparser.Expr, ru return nil } -func findOtherComparator(cmp *sqlparser.ComparisonExpr) (bool, sqlparser.Expr, sqlparser.Expr, func(arg sqlparser.Argument)) { +func findOtherComparator(cmp *sqlparser.ComparisonExpr) (bool, sqlparser.Expr, sqlparser.Expr, func(arg *sqlparser.Argument)) { if schema, table := isTableSchemaOrName(cmp.Left); schema || table { - return schema, cmp.Left, cmp.Right, func(arg sqlparser.Argument) { + return schema, cmp.Left, cmp.Right, func(arg *sqlparser.Argument) { cmp.Right = arg } } if schema, table := isTableSchemaOrName(cmp.Right); schema || table { - return schema, cmp.Right, cmp.Left, func(arg sqlparser.Argument) { + return schema, cmp.Right, cmp.Left, func(arg *sqlparser.Argument) { cmp.Left = arg } } @@ -123,7 +106,7 @@ func extractInfoSchemaRoutingPredicate( return } - evalExpr, err = evalengine.Translate(other, ¬ImplementedSchemaInfoConverter{}) + evalExpr, err = evalengine.Translate(other, &evalengine.Config{ResolveColumn: operators.NotImplementedSchemaInfoResolver}) if err != nil { if strings.Contains(err.Error(), evalengine.ErrTranslateExprNotSupported) { // This just means we can't rewrite this particular expression, @@ -139,7 +122,7 @@ func extractInfoSchemaRoutingPredicate( } else { name = reservedVars.ReserveColName(col.(*sqlparser.ColName)) } - replaceOther(sqlparser.NewArgument(name)) + replaceOther(sqlparser.NewTypedArgument(name, sqltypes.VarChar)) return isSchemaName, name, evalExpr, nil } diff --git a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json index f8e6c7fcde1..b95f99012fc 100644 --- a/go/vt/vtgate/planbuilder/testdata/aggr_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/aggr_cases.json @@ -4255,7 +4255,7 @@ { "comment": "select (select 1 from user u having count(ue.col) > 10) from user_extra ue", "query": "select (select 1 from user u having count(ue.col) > 10) from user_extra ue", - "v3-plan": "VT03020: symbol ue.col not found in subquery", + "v3-plan": "VT03020: column ue.col not found in subquery", "gen4-plan": { "QueryType": "SELECT", "Original": "select (select 1 from user u having count(ue.col) > 10) from user_extra ue", @@ -4386,7 +4386,7 @@ { "comment": "scatter aggregate symtab lookup error", "query": "select id, b as id, count(*) from user order by id", - "v3-plan": "VT03021: ambiguous symbol reference: id", + "v3-plan": "VT03021: ambiguous column reference: id", "gen4-plan": { "QueryType": "SELECT", "Original": "select id, b as id, count(*) from user order by id", @@ -4964,5 +4964,159 @@ "user.user_extra" ] } + }, + { + "comment": "Aggregations from derived table used in arithmetic outside derived table", + "query": "select A.a, A.b, (A.a / A.b) as d from (select sum(a) as a, sum(b) as b from user) A", + "v3-plan": "VT12001: unsupported: expression on results of a cross-shard subquery", + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select A.a, A.b, (A.a / A.b) as d from (select sum(a) as a, sum(b) as b from user) A", + "Instructions": { + "OperatorType": "Projection", + "Expressions": [ + "[COLUMN 0] as a", + "[COLUMN 1] as b", + "[COLUMN 0] / [COLUMN 1] as d" + ], + "Inputs": [ + { + "OperatorType": "Aggregate", + "Variant": "Scalar", + "Aggregates": "sum(0) AS a, sum(1) AS b", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select sum(a) as a, sum(b) as b from `user` where 1 != 1", + "Query": "select sum(a) as a, sum(b) as b from `user`", + "Table": "`user`" + } + ] + } + ] + }, + "TablesUsed": [ + "user.user" + ] + } + }, + { + "comment": "when pushing predicates into derived tables, make sure to put them in HAVING when they contain aggregations", + "query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "v3-plan": { + "QueryType": "SELECT", + "Original": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where 1 != 1 group by user_id, flowId) as t1 where 1 != 1", + "Query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where `count` >= :v2", + "Table": "user_extra" + } + }, + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where 1 != 1 group by user_id, flowId) as t1 where 1 != 1", + "Query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where localDate > :v1 group by user_id, flowId having count(*) >= :v2 order by null) as t1", + "Table": "user_extra" + }, + "TablesUsed": [ + "user.user_extra" + ] + } + }, + { + "comment": "Aggregations from derived table used in arithmetic outside derived table", + "query": "select A.a, A.b, (A.a / A.b) as d from (select sum(a) as a, sum(b) as b from user) A", + "v3-plan": "VT12001: unsupported: expression on results of a cross-shard subquery", + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select A.a, A.b, (A.a / A.b) as d from (select sum(a) as a, sum(b) as b from user) A", + "Instructions": { + "OperatorType": "Projection", + "Expressions": [ + "[COLUMN 0] as a", + "[COLUMN 1] as b", + "[COLUMN 0] / [COLUMN 1] as d" + ], + "Inputs": [ + { + "OperatorType": "Aggregate", + "Variant": "Scalar", + "Aggregates": "sum(0) AS a, sum(1) AS b", + "Inputs": [ + { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select sum(a) as a, sum(b) as b from `user` where 1 != 1", + "Query": "select sum(a) as a, sum(b) as b from `user`", + "Table": "`user`" + } + ] + } + ] + }, + "TablesUsed": [ + "user.user" + ] + } + }, + { + "comment": "when pushing predicates into derived tables, make sure to put them in HAVING when they contain aggregations", + "query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "v3-plan": { + "QueryType": "SELECT", + "Original": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where 1 != 1 group by user_id, flowId) as t1 where 1 != 1", + "Query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where `count` >= :v2", + "Table": "user_extra" + } + }, + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as count from user_extra where localDate > :v1 group by user_id, flowId order by null) as t1 where count >= :v2", + "Instructions": { + "OperatorType": "Route", + "Variant": "Scatter", + "Keyspace": { + "Name": "user", + "Sharded": true + }, + "FieldQuery": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where 1 != 1 group by user_id, flowId) as t1 where 1 != 1", + "Query": "select t1.portalId, t1.flowId from (select portalId, flowId, count(*) as `count` from user_extra where localDate > :v1 group by user_id, flowId having count(*) >= :v2 order by null) as t1", + "Table": "user_extra" + }, + "TablesUsed": [ + "user.user_extra" + ] + } } ] diff --git a/go/vt/vtgate/planbuilder/testdata/dml_cases.json b/go/vt/vtgate/planbuilder/testdata/dml_cases.json index d41e586019b..b25ec342b46 100644 --- a/go/vt/vtgate/planbuilder/testdata/dml_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/dml_cases.json @@ -2158,7 +2158,7 @@ { "comment": "insert invalid index value", "query": "insert into music_extra(music_id, user_id) values(1, id)", - "plan": "column access not supported here" + "plan": "cannot lookup column (column access not supported here)" }, { "comment": "insert invalid table", diff --git a/go/vt/vtgate/planbuilder/testdata/filter_cases.json b/go/vt/vtgate/planbuilder/testdata/filter_cases.json index 96ebc8dda10..9c99f870d75 100644 --- a/go/vt/vtgate/planbuilder/testdata/filter_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/filter_cases.json @@ -2458,7 +2458,7 @@ "Sharded": true }, "FieldQuery": "select u.m from `user` as u where 1 != 1", - "Query": "select u.m from `user` as u where u.id in (select m2 from `user` where `user`.id = u.id and `user`.col = :user_extra_col) and u.id in ::__vals", + "Query": "select u.m from `user` as u where u.id in (select m2 from `user` where `user`.id = u.id and `user`.col = :user_extra_col /* INT16 */) and u.id in ::__vals", "Table": "`user`", "Values": [ "(:user_extra_col, INT64(1))" @@ -2722,7 +2722,7 @@ "Sharded": true }, "FieldQuery": "select u.m from `user` as u where 1 != 1", - "Query": "select u.m from `user` as u where u.id in (select m2 from `user` where `user`.id = u.id and `user`.col = :user_extra_col and `user`.id in (select m3 from user_extra where user_extra.user_id = `user`.id)) and u.id in ::__vals", + "Query": "select u.m from `user` as u where u.id in (select m2 from `user` where `user`.id = u.id and `user`.col = :user_extra_col /* INT16 */ and `user`.id in (select m3 from user_extra where user_extra.user_id = `user`.id)) and u.id in ::__vals", "Table": "`user`", "Values": [ "(:user_extra_col, INT64(1))" @@ -2916,8 +2916,8 @@ { "comment": "unresolved symbol in inner subquery.", "query": "select id from user where id = :a and user.col in (select user_extra.col from user_extra where user_extra.user_id = :a and foo.id = 1)", - "v3-plan": "VT03019: symbol foo.id not found", - "gen4-plan": "symbol foo.id not found" + "v3-plan": "VT03019: column foo.id not found", + "gen4-plan": "column 'foo.id' not found" }, { "comment": "outer and inner subquery route by same outermost column value", diff --git a/go/vt/vtgate/planbuilder/testdata/from_cases.json b/go/vt/vtgate/planbuilder/testdata/from_cases.json index 340d98cf3b4..3e0aab39179 100644 --- a/go/vt/vtgate/planbuilder/testdata/from_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/from_cases.json @@ -114,7 +114,7 @@ "comment": "select next from non-sequence table", "query": "select next value from user", "v3-plan": "VT03018: NEXT used on a non-sequence table", - "gen4-plan": "NEXT used on a non-sequence table" + "gen4-plan": "NEXT used on a non-sequence table `user`" }, { "comment": "select next in derived table", @@ -2701,7 +2701,7 @@ "Table": "`user`, user_extra" } }, - "gen4-plan": "symbol t.col not found" + "gen4-plan": "column 't.col' not found" }, { "comment": "routing rules for derived table where the constraint is in the outer query", @@ -2766,7 +2766,7 @@ "Table": "`user`" } }, - "gen4-plan": "symbol id not found" + "gen4-plan": "column 'id' not found in table 't'" }, { "comment": "push predicate on joined derived tables", @@ -4587,8 +4587,25 @@ { "comment": "verify ',' vs JOIN precedence", "query": "select u1.a from unsharded u1, unsharded u2 join unsharded u3 on u1.a = u2.a", - "v3-plan": "VT03019: symbol u1.a not found", - "gen4-plan": "symbol u1.a not found" + "v3-plan": "VT03019: column u1.a not found", + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select u1.a from unsharded u1, unsharded u2 join unsharded u3 on u1.a = u2.a", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select u1.a from unsharded as u1, unsharded as u2 join unsharded as u3 on u1.a = u2.a where 1 != 1", + "Query": "select u1.a from unsharded as u1, unsharded as u2 join unsharded as u3 on u1.a = u2.a", + "Table": "unsharded" + }, + "TablesUsed": [ + "main.unsharded" + ] + } }, { "comment": "first expression fails for ',' join (code coverage: ensure error is returned)", @@ -4598,8 +4615,25 @@ { "comment": "table names should be case-sensitive", "query": "select unsharded.id from unsharded where Unsharded.val = 1", - "v3-plan": "VT03019: symbol Unsharded.val not found", - "gen4-plan": "symbol Unsharded.val not found" + "v3-plan": "VT03019: column Unsharded.val not found", + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select unsharded.id from unsharded where Unsharded.val = 1", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select unsharded.id from unsharded where 1 != 1", + "Query": "select unsharded.id from unsharded where Unsharded.val = 1", + "Table": "unsharded" + }, + "TablesUsed": [ + "main.unsharded" + ] + } }, { "comment": "implicit table reference for sharded keyspace", @@ -6343,5 +6377,49 @@ "user.user_extra" ] } + }, + { + "comment": "missing and ambiguous column info is OK as long as we can send the query to a single unsharded keyspace", + "query": "select missing_column from unsharded, unsharded_a", + "v3-plan": { + "QueryType": "SELECT", + "Original": "select missing_column from unsharded, unsharded_a", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select missing_column from unsharded, unsharded_a where 1 != 1", + "Query": "select missing_column from unsharded, unsharded_a", + "Table": "unsharded, unsharded_a" + } + }, + "gen4-plan": { + "QueryType": "SELECT", + "Original": "select missing_column from unsharded, unsharded_a", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select missing_column from unsharded, unsharded_a where 1 != 1", + "Query": "select missing_column from unsharded, unsharded_a", + "Table": "unsharded, unsharded_a" + }, + "TablesUsed": [ + "main.unsharded", + "main.unsharded_a" + ] + } + }, + { + "comment": "missing and ambiguous column info is not valid when we have two different unsharded keyspaces in the query", + "query": "select missing_column from unsharded, unsharded_tab", + "v3-plan": "VT03019: column missing_column not found", + "gen4-plan": "Column 'missing_column' in field list is ambiguous" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/info_schema57_cases.json b/go/vt/vtgate/planbuilder/testdata/info_schema57_cases.json index bc589fe29be..84aa7601882 100644 --- a/go/vt/vtgate/planbuilder/testdata/info_schema57_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/info_schema57_cases.json @@ -74,7 +74,7 @@ { "comment": "information schema join", "query": "select tables.TABLE_SCHEMA, files.`STATUS` from information_schema.tables join information_schema.files", - "v3-plan": "VT03019: symbol `tables`.TABLE_SCHEMA not found", + "v3-plan": "VT03019: column `tables`.TABLE_SCHEMA not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select tables.TABLE_SCHEMA, files.`STATUS` from information_schema.tables join information_schema.files", @@ -164,7 +164,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.`tables` where 1 != 1", - "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.`tables`" }, @@ -176,7 +176,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.`tables` where 1 != 1", - "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"main\")]", "Table": "information_schema.`tables`" } @@ -226,7 +226,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where 1 != 1", - "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.`tables`" }, @@ -238,7 +238,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where 1 != 1", - "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"main\")]", "Table": "information_schema.`tables`" } @@ -262,7 +262,7 @@ "Sharded": false }, "FieldQuery": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where 1 != 1", - "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\"), VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -279,7 +279,7 @@ "Sharded": false }, "FieldQuery": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where 1 != 1", - "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -306,7 +306,7 @@ "Sharded": false }, "FieldQuery": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where 1 != 1", - "Query": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.TABLE_NAME = :KCU_TABLE_NAME1 order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME1 /* VARCHAR */ order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME1:VARCHAR(\"data_type_table\"), KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -319,7 +319,7 @@ "Sharded": false }, "FieldQuery": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where 1 != 1", - "Query": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname and S.TABLE_NAME = :S_TABLE_NAME", + "Query": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and S.TABLE_NAME = :S_TABLE_NAME /* VARCHAR */", "SysTableTableName": "[S_TABLE_NAME:VARCHAR(\"sc\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -338,7 +338,7 @@ "Sharded": false }, "FieldQuery": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where 1 != 1", - "Query": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname and S.TABLE_NAME = :S_TABLE_NAME and KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and S.TABLE_NAME = :S_TABLE_NAME /* VARCHAR */ and KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\"), S_TABLE_NAME:VARCHAR(\"sc\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS, INFORMATION_SCHEMA.`TABLES`" @@ -359,7 +359,7 @@ "Sharded": false }, "FieldQuery": "select routine_name as `name`, routine_definition as definition from information_schema.routines where 1 != 1", - "Query": "select routine_name as `name`, routine_definition as definition from information_schema.routines where ROUTINE_SCHEMA = :__vtschemaname and ROUTINE_TYPE = 'PROCEDURE'", + "Query": "select routine_name as `name`, routine_definition as definition from information_schema.routines where ROUTINE_SCHEMA = :__vtschemaname /* VARCHAR */ and ROUTINE_TYPE = 'PROCEDURE'", "SysTableTableSchema": "[:v1]", "Table": "information_schema.routines" } @@ -379,7 +379,7 @@ "Sharded": false }, "FieldQuery": "select sum(data_length + index_length) as size from information_schema.`TABLES` where 1 != 1", - "Query": "select sum(data_length + index_length) as size from information_schema.`TABLES` where table_schema = :__vtschemaname", + "Query": "select sum(data_length + index_length) as size from information_schema.`TABLES` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[:v1]", "Table": "information_schema.`TABLES`" } @@ -399,7 +399,7 @@ "Sharded": false }, "FieldQuery": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where 1 != 1", - "Query": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where kcu.table_schema = :__vtschemaname and rc.constraint_schema = :__vtschemaname and kcu.referenced_column_name is not null order by ordinal_position asc", + "Query": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where kcu.table_schema = :__vtschemaname /* VARCHAR */ and rc.constraint_schema = :__vtschemaname /* VARCHAR */ and kcu.referenced_column_name is not null order by ordinal_position asc", "SysTableTableSchema": "[:v1, :v2]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -425,7 +425,7 @@ }, "FieldQuery": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where 1 != 1", "OrderBy": "5 ASC", - "Query": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.referenced_column_name is not null order by ordinal_position asc", + "Query": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.referenced_column_name is not null order by ordinal_position asc", "SysTableTableSchema": "[:v1]", "Table": "information_schema.key_column_usage" }, @@ -437,7 +437,7 @@ "Sharded": false }, "FieldQuery": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where 1 != 1", - "Query": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where rc.constraint_schema = :__vtschemaname and rc.constraint_name = :kcu_constraint_name", + "Query": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.constraint_name = :kcu_constraint_name", "SysTableTableSchema": "[:v2]", "Table": "information_schema.referential_constraints" } @@ -459,7 +459,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name and rc.constraint_schema = database() and rc.table_name = :rc_table_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = database() and rc.table_name = :rc_table_name /* VARCHAR */", "SysTableTableName": "[fk_table_name:VARCHAR(\":vtg1\"), rc_table_name:VARCHAR(\":vtg1\")]", "Table": "information_schema.referential_constraints, information_schema.key_column_usage" } @@ -475,7 +475,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = database() and rc.table_name = :rc_table_name and fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = database() and rc.table_name = :rc_table_name /* VARCHAR */ and fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", "SysTableTableName": "[fk_table_name:VARCHAR(\":vtg1\"), rc_table_name:VARCHAR(\":vtg1\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -495,7 +495,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.schemata where 1 != 1", - "Query": "select * from information_schema.schemata where schema_name = :__vtschemaname", + "Query": "select * from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.schemata" } @@ -511,7 +511,7 @@ "Sharded": false }, "FieldQuery": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH from information_schema.schemata where 1 != 1", - "Query": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH from information_schema.schemata where schema_name = :__vtschemaname", + "Query": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.schemata" } @@ -531,7 +531,7 @@ "Sharded": false }, "FieldQuery": "select table_comment from information_schema.`tables` where 1 != 1", - "Query": "select table_comment from information_schema.`tables` where table_schema = :__vtschemaname and table_name = :table_name", + "Query": "select table_comment from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"schema_name\")]", "Table": "information_schema.`tables`" @@ -552,7 +552,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname and fk.table_name = :fk_table_name and rc.constraint_schema = :__vtschemaname and rc.table_name = :rc_table_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname /* VARCHAR */ and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.table_name = :rc_table_name /* VARCHAR */", "SysTableTableName": "[fk_table_name:VARCHAR(\"table_name\"), rc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\"), VARCHAR(\"table_schema\")]", "Table": "information_schema.referential_constraints, information_schema.key_column_usage" @@ -569,7 +569,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = :__vtschemaname and rc.table_name = :rc_table_name and fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname and fk.table_name = :fk_table_name and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.table_name = :rc_table_name /* VARCHAR */ and fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname /* VARCHAR */ and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", "SysTableTableName": "[fk_table_name:VARCHAR(\"table_name\"), rc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" @@ -590,7 +590,7 @@ "Sharded": false }, "FieldQuery": "select column_name from information_schema.statistics where 1 != 1", - "Query": "select column_name from information_schema.statistics where index_name = 'PRIMARY' and table_schema = :__vtschemaname and table_name = :table_name order by seq_in_index asc", + "Query": "select column_name from information_schema.statistics where index_name = 'PRIMARY' and table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */ order by seq_in_index asc", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.statistics" @@ -611,7 +611,7 @@ "Sharded": false }, "FieldQuery": "select generation_expression from information_schema.`columns` where 1 != 1", - "Query": "select generation_expression from information_schema.`columns` where table_schema = :__vtschemaname and table_name = :table_name and column_name = 'column_name'", + "Query": "select generation_expression from information_schema.`columns` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */ and column_name = 'column_name'", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`columns`" @@ -651,7 +651,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select * from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery", + "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -667,7 +667,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery", + "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -687,7 +687,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select * from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery where _subquery.table_type = 'table_type' and _subquery.table_name = :_subquery_table_name", + "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery where _subquery.table_type = 'table_type' and _subquery.table_name = :_subquery_table_name /* VARCHAR */", "SysTableTableName": "[_subquery_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" @@ -704,7 +704,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname and table_type = 'table_type' and table_name = 'table_name') as _subquery", + "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ and table_type = 'table_type' and table_name = 'table_name') as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -724,7 +724,7 @@ "Sharded": false }, "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -734,7 +734,7 @@ { "comment": "subquery of information_schema with itself", "query": "select TABLES.CHECKSUM from information_schema.`TABLES` where `TABLE_NAME` in (select `TABLE_NAME` from information_schema.`COLUMNS`)", - "v3-plan": "VT03019: symbol `TABLES`.`CHECKSUM` not found", + "v3-plan": "VT03019: column `TABLES`.`CHECKSUM` not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select TABLES.CHECKSUM from information_schema.`TABLES` where `TABLE_NAME` in (select `TABLE_NAME` from information_schema.`COLUMNS`)", @@ -765,7 +765,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"main\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -781,7 +781,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"main\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -835,7 +835,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -851,7 +851,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -871,7 +871,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and TABLE_NAME = :TABLE_NAME /* VARCHAR */", "SysTableTableName": "[TABLE_NAME:VARCHAR(\"route1\")]", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -888,7 +888,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and TABLE_NAME = :TABLE_NAME /* VARCHAR */", "SysTableTableName": "[TABLE_NAME:VARCHAR(\"route1\")]", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -909,7 +909,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and DATA_FREE = 42", + "Query": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and DATA_FREE = 42", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -929,7 +929,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and (DATA_FREE = 42 or `CHECKSUM` = 'value')", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and (DATA_FREE = 42 or `CHECKSUM` = 'value')", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -945,7 +945,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and (DATA_FREE = 42 or `CHECKSUM` = 'value')", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and (DATA_FREE = 42 or `CHECKSUM` = 'value')", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -1035,7 +1035,7 @@ "Instructions": { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0", + "JoinColumnIndexes": "L:1", "JoinVars": { "x_COLUMN_NAME": 0 }, @@ -1048,8 +1048,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as x where 1 != 1", - "Query": "select x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a) as x", + "FieldQuery": "select x.COLUMN_NAME, x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as x where 1 != 1", + "Query": "select x.COLUMN_NAME, x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a) as x", "Table": "information_schema.key_column_usage" }, { @@ -1122,7 +1122,7 @@ "Sharded": false }, "FieldQuery": "select a.table_name from (select * from information_schema.key_column_usage as a where 1 != 1) as a join (select * from information_schema.referential_constraints where 1 != 1) as b where 1 != 1", - "Query": "select a.table_name from (select * from information_schema.key_column_usage as a where a.table_name = :a_table_name) as a join (select * from information_schema.referential_constraints where table_name = :table_name) as b", + "Query": "select a.table_name from (select * from information_schema.key_column_usage as a where a.table_name = :a_table_name /* VARCHAR */) as a join (select * from information_schema.referential_constraints where table_name = :table_name /* VARCHAR */) as b", "SysTableTableName": "[a_table_name:VARCHAR(\"users\"), table_name:VARCHAR(\"users\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -1138,7 +1138,7 @@ "Sharded": false }, "FieldQuery": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where 1 != 1) as b where 1 != 1", - "Query": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where a.table_name = :a_table_name) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where table_name = :table_name) as b", + "Query": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where a.table_name = :a_table_name /* VARCHAR */) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where table_name = :table_name /* VARCHAR */) as b", "SysTableTableName": "[a_table_name:VARCHAR(\"users\"), table_name:VARCHAR(\"users\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -1159,7 +1159,7 @@ "Sharded": false }, "FieldQuery": "select sum(found) from (select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)) as t where 1 != 1", - "Query": "select sum(found) from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)) as t", + "Query": "select sum(found) from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)) as t", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1188,7 +1188,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\")]", "Table": "information_schema.`tables`" }, @@ -1200,7 +1200,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\")]", "Table": "information_schema.views" } @@ -1220,7 +1220,7 @@ "Sharded": false }, "FieldQuery": "select found from (select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)) as t where 1 != 1", - "Query": "select found from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)) as t", + "Query": "select found from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)) as t", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1243,7 +1243,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1255,7 +1255,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1273,7 +1273,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\"), VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.`tables`" } @@ -1296,7 +1296,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1308,7 +1308,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1326,7 +1326,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\"), VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.`tables`" } @@ -1357,7 +1357,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name2 and table_name = :table_name3", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name2 /* VARCHAR */ and table_name = :table_name3 /* VARCHAR */", "SysTableTableName": "[table_name2:VARCHAR(\"music\"), table_name3:VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1369,7 +1369,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_name = :table_name4 and table_name = :table_name5 limit 1", + "Query": "select 1 as found from information_schema.views where table_name = :table_name4 /* VARCHAR */ and table_name = :table_name5 /* VARCHAR */ limit 1", "SysTableTableName": "[table_name4:VARCHAR(\"music\"), table_name5:VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1383,7 +1383,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name and table_name = :table_name1 and :__sq_has_values1", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name /* VARCHAR */ and table_name = :table_name1 /* VARCHAR */ and :__sq_has_values1", "SysTableTableName": "[table_name1:VARCHAR(\"Music\"), table_name:VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1401,7 +1401,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name and table_name = :table_name1 and exists (select 1 as found from information_schema.`tables` where table_name = :table_name2 and table_name = :table_name3 union all (select 1 as found from information_schema.views where table_name = :table_name4 and table_name = :table_name5 limit 1))", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name /* VARCHAR */ and table_name = :table_name1 /* VARCHAR */ and exists (select 1 as found from information_schema.`tables` where table_name = :table_name2 /* VARCHAR */ and table_name = :table_name3 /* VARCHAR */ union all (select 1 as found from information_schema.views where table_name = :table_name4 /* VARCHAR */ and table_name = :table_name5 /* VARCHAR */ limit 1))", "SysTableTableName": "[table_name1:VARCHAR(\"Music\"), table_name2:VARCHAR(\"music\"), table_name3:VARCHAR(\"Music\"), table_name4:VARCHAR(\"music\"), table_name5:VARCHAR(\"user\"), table_name:VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1433,7 +1433,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_NAME from information_schema.`tables` as t where 1 != 1", - "Query": "select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" }, @@ -1466,7 +1466,7 @@ "Sharded": false }, "FieldQuery": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where 1 != 1 union select TABLE_NAME from information_schema.`columns` where 1 != 1) as dt where 1 != 1", - "Query": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname union select TABLE_NAME from information_schema.`columns`) as dt", + "Query": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ union select TABLE_NAME from information_schema.`columns`) as dt", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" } @@ -1500,7 +1500,7 @@ "Sharded": false }, "FieldQuery": "select COLUMN_NAME from information_schema.`tables` as t where 1 != 1", - "Query": "select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname", + "Query": "select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" }, @@ -1544,7 +1544,7 @@ "Sharded": false }, "FieldQuery": "select COLLATION_NAME from information_schema.`COLUMNS` as t where 1 != 1", - "Query": "select COLLATION_NAME from information_schema.`COLUMNS` as t where COLUMN_NAME in (select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname union select COLUMN_NAME from information_schema.`columns`)", + "Query": "select COLLATION_NAME from information_schema.`COLUMNS` as t where COLUMN_NAME in (select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ union select COLUMN_NAME from information_schema.`columns`)", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`COLUMNS`" } diff --git a/go/vt/vtgate/planbuilder/testdata/info_schema80_cases.json b/go/vt/vtgate/planbuilder/testdata/info_schema80_cases.json index 1021cee9094..cf69ee6ff5b 100644 --- a/go/vt/vtgate/planbuilder/testdata/info_schema80_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/info_schema80_cases.json @@ -74,7 +74,7 @@ { "comment": "information schema join", "query": "select tables.TABLE_SCHEMA, files.`STATUS` from information_schema.tables join information_schema.files", - "v3-plan": "VT03019: symbol `tables`.TABLE_SCHEMA not found", + "v3-plan": "VT03019: column `tables`.TABLE_SCHEMA not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select tables.TABLE_SCHEMA, files.`STATUS` from information_schema.tables join information_schema.files", @@ -164,7 +164,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.`tables` where 1 != 1", - "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.`tables`" }, @@ -176,7 +176,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.`tables` where 1 != 1", - "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"main\")]", "Table": "information_schema.`tables`" } @@ -226,7 +226,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where 1 != 1", - "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.`tables`" }, @@ -238,7 +238,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where 1 != 1", - "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select distinct TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT, weight_string(TABLE_CATALOG), weight_string(TABLE_SCHEMA), weight_string(TABLE_NAME), weight_string(TABLE_TYPE), weight_string(`ENGINE`), weight_string(`ROW_FORMAT`), weight_string(CREATE_TIME), weight_string(UPDATE_TIME), weight_string(CHECK_TIME), weight_string(TABLE_COLLATION), weight_string(CREATE_OPTIONS), weight_string(TABLE_COMMENT) from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"main\")]", "Table": "information_schema.`tables`" } @@ -262,7 +262,7 @@ "Sharded": false }, "FieldQuery": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where 1 != 1", - "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\"), VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -279,7 +279,7 @@ "Sharded": false }, "FieldQuery": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where 1 != 1", - "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select RC.CONSTRAINT_NAME, ORDINAL_POSITION from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.COLUMN_NAME = 'id' and KCU.REFERENCED_TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.CONSTRAINT_NAME = 'data_type_table_id_fkey' and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -306,7 +306,7 @@ "Sharded": false }, "FieldQuery": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where 1 != 1", - "Query": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.TABLE_NAME = :KCU_TABLE_NAME1 order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select KCU.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC on KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME where KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME1 /* VARCHAR */ order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME1:VARCHAR(\"data_type_table\"), KCU_TABLE_NAME:VARCHAR(\"data_type_table\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS" @@ -319,7 +319,7 @@ "Sharded": false }, "FieldQuery": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where 1 != 1", - "Query": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname and S.TABLE_NAME = :S_TABLE_NAME", + "Query": "select S.TABLE_NAME from INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and S.TABLE_NAME = :S_TABLE_NAME /* VARCHAR */", "SysTableTableName": "[S_TABLE_NAME:VARCHAR(\"sc\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -338,7 +338,7 @@ "Sharded": false }, "FieldQuery": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where 1 != 1", - "Query": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname and S.TABLE_NAME = :S_TABLE_NAME and KCU.TABLE_SCHEMA = :__vtschemaname and KCU.TABLE_NAME = :KCU_TABLE_NAME and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", + "Query": "select KCU.TABLE_NAME, S.TABLE_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE as KCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as RC, INFORMATION_SCHEMA.`TABLES` as S where S.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and S.TABLE_NAME = :S_TABLE_NAME /* VARCHAR */ and KCU.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and KCU.TABLE_NAME = :KCU_TABLE_NAME /* VARCHAR */ and KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME order by KCU.CONSTRAINT_NAME asc, KCU.COLUMN_NAME asc", "SysTableTableName": "[KCU_TABLE_NAME:VARCHAR(\"data_type_table\"), S_TABLE_NAME:VARCHAR(\"sc\")]", "SysTableTableSchema": "[VARCHAR(\"test\")]", "Table": "INFORMATION_SCHEMA.KEY_COLUMN_USAGE, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS, INFORMATION_SCHEMA.`TABLES`" @@ -359,7 +359,7 @@ "Sharded": false }, "FieldQuery": "select routine_name as `name`, routine_definition as definition from information_schema.routines where 1 != 1", - "Query": "select routine_name as `name`, routine_definition as definition from information_schema.routines where ROUTINE_SCHEMA = :__vtschemaname and ROUTINE_TYPE = 'PROCEDURE'", + "Query": "select routine_name as `name`, routine_definition as definition from information_schema.routines where ROUTINE_SCHEMA = :__vtschemaname /* VARCHAR */ and ROUTINE_TYPE = 'PROCEDURE'", "SysTableTableSchema": "[:v1]", "Table": "information_schema.routines" } @@ -379,7 +379,7 @@ "Sharded": false }, "FieldQuery": "select sum(data_length + index_length) as size from information_schema.`TABLES` where 1 != 1", - "Query": "select sum(data_length + index_length) as size from information_schema.`TABLES` where table_schema = :__vtschemaname", + "Query": "select sum(data_length + index_length) as size from information_schema.`TABLES` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[:v1]", "Table": "information_schema.`TABLES`" } @@ -399,7 +399,7 @@ "Sharded": false }, "FieldQuery": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where 1 != 1", - "Query": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where kcu.table_schema = :__vtschemaname and rc.constraint_schema = :__vtschemaname and kcu.referenced_column_name is not null order by ordinal_position asc", + "Query": "select kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name, rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.key_column_usage as kcu join information_schema.referential_constraints as rc on kcu.constraint_name = rc.constraint_name where kcu.table_schema = :__vtschemaname /* VARCHAR */ and rc.constraint_schema = :__vtschemaname /* VARCHAR */ and kcu.referenced_column_name is not null order by ordinal_position asc", "SysTableTableSchema": "[:v1, :v2]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -425,7 +425,7 @@ }, "FieldQuery": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where 1 != 1", "OrderBy": "5 ASC", - "Query": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.referenced_column_name is not null order by ordinal_position asc", + "Query": "select kcu.constraint_name, kcu.constraint_name as constraint_name, kcu.column_name as column_name, kcu.referenced_table_name as referenced_table_name, kcu.referenced_column_name as referenced_column_name, kcu.ordinal_position as ordinal_position, kcu.table_name as table_name from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.referenced_column_name is not null order by ordinal_position asc", "SysTableTableSchema": "[:v1]", "Table": "information_schema.key_column_usage" }, @@ -437,7 +437,7 @@ "Sharded": false }, "FieldQuery": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where 1 != 1", - "Query": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where rc.constraint_schema = :__vtschemaname and rc.constraint_name = :kcu_constraint_name", + "Query": "select rc.delete_rule as delete_rule, rc.update_rule as update_rule from information_schema.referential_constraints as rc where rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.constraint_name = :kcu_constraint_name", "SysTableTableSchema": "[:v2]", "Table": "information_schema.referential_constraints" } @@ -459,7 +459,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name and rc.constraint_schema = database() and rc.table_name = :rc_table_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = database() and rc.table_name = :rc_table_name /* VARCHAR */", "SysTableTableName": "[fk_table_name:VARCHAR(\":vtg1\"), rc_table_name:VARCHAR(\":vtg1\")]", "Table": "information_schema.referential_constraints, information_schema.key_column_usage" } @@ -475,7 +475,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = database() and rc.table_name = :rc_table_name and fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = database() and rc.table_name = :rc_table_name /* VARCHAR */ and fk.referenced_column_name is not null and fk.table_schema = database() and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", "SysTableTableName": "[fk_table_name:VARCHAR(\":vtg1\"), rc_table_name:VARCHAR(\":vtg1\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -495,7 +495,7 @@ "Sharded": false }, "FieldQuery": "select * from information_schema.schemata where 1 != 1", - "Query": "select * from information_schema.schemata where schema_name = :__vtschemaname", + "Query": "select * from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.schemata" } @@ -511,7 +511,7 @@ "Sharded": false }, "FieldQuery": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH, DEFAULT_ENCRYPTION from information_schema.schemata where 1 != 1", - "Query": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH, DEFAULT_ENCRYPTION from information_schema.schemata where schema_name = :__vtschemaname", + "Query": "select CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH, DEFAULT_ENCRYPTION from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.schemata" } @@ -531,7 +531,7 @@ "Sharded": false }, "FieldQuery": "select table_comment from information_schema.`tables` where 1 != 1", - "Query": "select table_comment from information_schema.`tables` where table_schema = :__vtschemaname and table_name = :table_name", + "Query": "select table_comment from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"schema_name\")]", "Table": "information_schema.`tables`" @@ -552,7 +552,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname and fk.table_name = :fk_table_name and rc.constraint_schema = :__vtschemaname and rc.table_name = :rc_table_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc join information_schema.key_column_usage as fk using (constraint_schema, constraint_name) where fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname /* VARCHAR */ and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.table_name = :rc_table_name /* VARCHAR */", "SysTableTableName": "[fk_table_name:VARCHAR(\"table_name\"), rc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\"), VARCHAR(\"table_schema\")]", "Table": "information_schema.referential_constraints, information_schema.key_column_usage" @@ -569,7 +569,7 @@ "Sharded": false }, "FieldQuery": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where 1 != 1", - "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = :__vtschemaname and rc.table_name = :rc_table_name and fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname and fk.table_name = :fk_table_name and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", + "Query": "select fk.referenced_table_name as to_table, fk.referenced_column_name as primary_key, fk.column_name as `column`, fk.constraint_name as `name`, rc.update_rule as on_update, rc.delete_rule as on_delete from information_schema.referential_constraints as rc, information_schema.key_column_usage as fk where rc.constraint_schema = :__vtschemaname /* VARCHAR */ and rc.table_name = :rc_table_name /* VARCHAR */ and fk.referenced_column_name is not null and fk.table_schema = :__vtschemaname /* VARCHAR */ and fk.table_name = :fk_table_name /* VARCHAR */ and rc.constraint_schema = fk.constraint_schema and rc.constraint_name = fk.constraint_name", "SysTableTableName": "[fk_table_name:VARCHAR(\"table_name\"), rc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" @@ -590,7 +590,7 @@ "Sharded": false }, "FieldQuery": "select cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc join information_schema.table_constraints as tc using (constraint_schema, constraint_name) where 1 != 1", - "Query": "select cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc join information_schema.table_constraints as tc using (constraint_schema, constraint_name) where tc.table_schema = :__vtschemaname and tc.table_name = :tc_table_name and cc.constraint_schema = :__vtschemaname", + "Query": "select cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc join information_schema.table_constraints as tc using (constraint_schema, constraint_name) where tc.table_schema = :__vtschemaname /* VARCHAR */ and tc.table_name = :tc_table_name /* VARCHAR */ and cc.constraint_schema = :__vtschemaname /* VARCHAR */", "SysTableTableName": "[tc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\"), VARCHAR(\"constraint_schema\")]", "Table": "information_schema.check_constraints, information_schema.table_constraints" @@ -617,7 +617,7 @@ "Sharded": false }, "FieldQuery": "select cc.constraint_schema, cc.constraint_name, cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc where 1 != 1", - "Query": "select cc.constraint_schema, cc.constraint_name, cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc where cc.constraint_schema = :__vtschemaname", + "Query": "select cc.constraint_schema, cc.constraint_name, cc.constraint_name as `name`, cc.check_clause as expression from information_schema.check_constraints as cc where cc.constraint_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"constraint_schema\")]", "Table": "information_schema.check_constraints" }, @@ -629,7 +629,7 @@ "Sharded": false }, "FieldQuery": "select 1 from information_schema.table_constraints as tc where 1 != 1", - "Query": "select 1 from information_schema.table_constraints as tc where tc.table_schema = :__vtschemaname and tc.table_name = :tc_table_name and tc.constraint_schema = :__vtschemaname and tc.constraint_name = :cc_constraint_name", + "Query": "select 1 from information_schema.table_constraints as tc where tc.table_schema = :__vtschemaname /* VARCHAR */ and tc.table_name = :tc_table_name /* VARCHAR */ and tc.constraint_schema = :__vtschemaname /* VARCHAR */ and tc.constraint_name = :cc_constraint_name", "SysTableTableName": "[tc_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\"), :cc_constraint_schema]", "Table": "information_schema.table_constraints" @@ -652,7 +652,7 @@ "Sharded": false }, "FieldQuery": "select column_name from information_schema.statistics where 1 != 1", - "Query": "select column_name from information_schema.statistics where index_name = 'PRIMARY' and table_schema = :__vtschemaname and table_name = :table_name order by seq_in_index asc", + "Query": "select column_name from information_schema.statistics where index_name = 'PRIMARY' and table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */ order by seq_in_index asc", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.statistics" @@ -673,7 +673,7 @@ "Sharded": false }, "FieldQuery": "select generation_expression from information_schema.`columns` where 1 != 1", - "Query": "select generation_expression from information_schema.`columns` where table_schema = :__vtschemaname and table_name = :table_name and column_name = 'column_name'", + "Query": "select generation_expression from information_schema.`columns` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */ and column_name = 'column_name'", "SysTableTableName": "[table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`columns`" @@ -713,7 +713,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select * from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery", + "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -729,7 +729,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery", + "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -749,7 +749,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select * from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname) as _subquery where _subquery.table_type = 'table_type' and _subquery.table_name = :_subquery_table_name", + "Query": "select table_name from (select * from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */) as _subquery where _subquery.table_type = 'table_type' and _subquery.table_name = :_subquery_table_name /* VARCHAR */", "SysTableTableName": "[_subquery_table_name:VARCHAR(\"table_name\")]", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" @@ -766,7 +766,7 @@ "Sharded": false }, "FieldQuery": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where 1 != 1) as _subquery where 1 != 1", - "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname and table_type = 'table_type' and table_name = 'table_name') as _subquery", + "Query": "select table_name from (select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ and table_type = 'table_type' and table_name = 'table_name') as _subquery", "SysTableTableSchema": "[VARCHAR(\"table_schema\")]", "Table": "information_schema.`tables`" } @@ -786,7 +786,7 @@ "Sharded": false }, "FieldQuery": "select cc.constraint_name as `name` from information_schema.check_constraints as cc where 1 != 1", - "Query": "select cc.constraint_name as `name` from information_schema.check_constraints as cc where cc.constraint_schema = :__vtschemaname and cc.CONSTRAINT_CATALOG = 'a'", + "Query": "select cc.constraint_name as `name` from information_schema.check_constraints as cc where cc.constraint_schema = :__vtschemaname /* VARCHAR */ and cc.CONSTRAINT_CATALOG = 'a'", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.check_constraints" } @@ -806,7 +806,7 @@ "Sharded": false }, "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname /* VARCHAR */ and table_name = :table_name /* VARCHAR */", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -816,7 +816,7 @@ { "comment": "subquery of information_schema with itself", "query": "select TABLES.CHECKSUM from information_schema.`TABLES` where `TABLE_NAME` in (select `TABLE_NAME` from information_schema.`COLUMNS`)", - "v3-plan": "VT03019: symbol `TABLES`.`CHECKSUM` not found", + "v3-plan": "VT03019: column `TABLES`.`CHECKSUM` not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select TABLES.CHECKSUM from information_schema.`TABLES` where `TABLE_NAME` in (select `TABLE_NAME` from information_schema.`COLUMNS`)", @@ -847,7 +847,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"main\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -863,7 +863,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"main\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -917,7 +917,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -933,7 +933,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -953,7 +953,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and TABLE_NAME = :TABLE_NAME /* VARCHAR */", "SysTableTableName": "[TABLE_NAME:VARCHAR(\"route1\")]", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -970,7 +970,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and TABLE_NAME = :TABLE_NAME /* VARCHAR */", "SysTableTableName": "[TABLE_NAME:VARCHAR(\"route1\")]", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -991,7 +991,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and DATA_FREE = 42", + "Query": "select TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and DATA_FREE = 42", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -1011,7 +1011,7 @@ "Sharded": false }, "FieldQuery": "select * from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and (DATA_FREE = 42 or `CHECKSUM` = 'value')", + "Query": "select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and (DATA_FREE = 42 or `CHECKSUM` = 'value')", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -1027,7 +1027,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and (DATA_FREE = 42 or `CHECKSUM` = 'value')", + "Query": "select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, `ENGINE`, VERSION, `ROW_FORMAT`, TABLE_ROWS, `AVG_ROW_LENGTH`, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, `AUTO_INCREMENT`, CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, `CHECKSUM`, CREATE_OPTIONS, TABLE_COMMENT from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ and (DATA_FREE = 42 or `CHECKSUM` = 'value')", "SysTableTableSchema": "[VARCHAR(\"ks\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" } @@ -1117,7 +1117,7 @@ "Instructions": { "OperatorType": "Join", "Variant": "Join", - "JoinColumnIndexes": "L:0", + "JoinColumnIndexes": "L:1", "JoinVars": { "x_COLUMN_NAME": 0 }, @@ -1130,8 +1130,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as x where 1 != 1", - "Query": "select x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a) as x", + "FieldQuery": "select x.COLUMN_NAME, x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as x where 1 != 1", + "Query": "select x.COLUMN_NAME, x.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a) as x", "Table": "information_schema.key_column_usage" }, { @@ -1204,7 +1204,7 @@ "Sharded": false }, "FieldQuery": "select a.table_name from (select * from information_schema.key_column_usage as a where 1 != 1) as a join (select * from information_schema.referential_constraints where 1 != 1) as b where 1 != 1", - "Query": "select a.table_name from (select * from information_schema.key_column_usage as a where a.table_name = :a_table_name) as a join (select * from information_schema.referential_constraints where table_name = :table_name) as b", + "Query": "select a.table_name from (select * from information_schema.key_column_usage as a where a.table_name = :a_table_name /* VARCHAR */) as a join (select * from information_schema.referential_constraints where table_name = :table_name /* VARCHAR */) as b", "SysTableTableName": "[a_table_name:VARCHAR(\"users\"), table_name:VARCHAR(\"users\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -1220,7 +1220,7 @@ "Sharded": false }, "FieldQuery": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where 1 != 1) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where 1 != 1) as b where 1 != 1", - "Query": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where a.table_name = :a_table_name) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where table_name = :table_name) as b", + "Query": "select a.table_name from (select a.CONSTRAINT_CATALOG, a.CONSTRAINT_SCHEMA, a.CONSTRAINT_NAME, a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME, a.COLUMN_NAME, a.ORDINAL_POSITION, a.POSITION_IN_UNIQUE_CONSTRAINT, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME, a.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as a where a.table_name = :a_table_name /* VARCHAR */) as a, (select CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, UNIQUE_CONSTRAINT_CATALOG, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, TABLE_NAME, REFERENCED_TABLE_NAME from information_schema.referential_constraints where table_name = :table_name /* VARCHAR */) as b", "SysTableTableName": "[a_table_name:VARCHAR(\"users\"), table_name:VARCHAR(\"users\")]", "Table": "information_schema.key_column_usage, information_schema.referential_constraints" } @@ -1241,7 +1241,7 @@ "Sharded": false }, "FieldQuery": "select sum(found) from (select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)) as t where 1 != 1", - "Query": "select sum(found) from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)) as t", + "Query": "select sum(found) from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)) as t", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1270,7 +1270,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\")]", "Table": "information_schema.`tables`" }, @@ -1282,7 +1282,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\")]", "Table": "information_schema.views" } @@ -1302,7 +1302,7 @@ "Sharded": false }, "FieldQuery": "select found from (select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)) as t where 1 != 1", - "Query": "select found from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)) as t", + "Query": "select found from (select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)) as t", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1325,7 +1325,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1337,7 +1337,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1355,7 +1355,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\"), VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.`tables`" } @@ -1378,7 +1378,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1390,7 +1390,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1", + "Query": "select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1408,7 +1408,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1 union all (select 1 as found from information_schema.views where 1 != 1)", - "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname limit 1)", + "Query": "select 1 as found from information_schema.`tables` where table_schema = :__vtschemaname /* VARCHAR */ union all (select 1 as found from information_schema.views where table_schema = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableSchema": "[VARCHAR(\"music\"), VARCHAR(\"Music\"), VARCHAR(\"music\"), VARCHAR(\"user\")]", "Table": "information_schema.`tables`" } @@ -1439,7 +1439,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name2 and table_name = :table_name3", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name2 /* VARCHAR */ and table_name = :table_name3 /* VARCHAR */", "SysTableTableName": "[table_name2:VARCHAR(\"music\"), table_name3:VARCHAR(\"Music\")]", "Table": "information_schema.`tables`" }, @@ -1451,7 +1451,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.views where 1 != 1", - "Query": "select 1 as found from information_schema.views where table_name = :table_name4 and table_name = :table_name5 limit 1", + "Query": "select 1 as found from information_schema.views where table_name = :table_name4 /* VARCHAR */ and table_name = :table_name5 /* VARCHAR */ limit 1", "SysTableTableName": "[table_name4:VARCHAR(\"music\"), table_name5:VARCHAR(\"user\")]", "Table": "information_schema.views" } @@ -1465,7 +1465,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name and table_name = :table_name1 and :__sq_has_values1", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name /* VARCHAR */ and table_name = :table_name1 /* VARCHAR */ and :__sq_has_values1", "SysTableTableName": "[table_name1:VARCHAR(\"Music\"), table_name:VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1483,7 +1483,7 @@ "Sharded": false }, "FieldQuery": "select 1 as found from information_schema.`tables` where 1 != 1", - "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name and table_name = :table_name1 and exists (select 1 as found from information_schema.`tables` where table_name = :table_name2 and table_name = :table_name3 union all (select 1 as found from information_schema.views where table_name = :table_name4 and table_name = :table_name5 limit 1))", + "Query": "select 1 as found from information_schema.`tables` where table_name = :table_name /* VARCHAR */ and table_name = :table_name1 /* VARCHAR */ and exists (select 1 as found from information_schema.`tables` where table_name = :table_name2 /* VARCHAR */ and table_name = :table_name3 /* VARCHAR */ union all (select 1 as found from information_schema.views where table_name = :table_name4 /* VARCHAR */ and table_name = :table_name5 /* VARCHAR */ limit 1))", "SysTableTableName": "[table_name1:VARCHAR(\"Music\"), table_name2:VARCHAR(\"music\"), table_name3:VARCHAR(\"Music\"), table_name4:VARCHAR(\"music\"), table_name5:VARCHAR(\"user\"), table_name:VARCHAR(\"music\")]", "Table": "information_schema.`tables`" } @@ -1515,7 +1515,7 @@ "Sharded": false }, "FieldQuery": "select TABLE_NAME from information_schema.`tables` as t where 1 != 1", - "Query": "select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname", + "Query": "select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" }, @@ -1548,7 +1548,7 @@ "Sharded": false }, "FieldQuery": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where 1 != 1 union select TABLE_NAME from information_schema.`columns` where 1 != 1) as dt where 1 != 1", - "Query": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname union select TABLE_NAME from information_schema.`columns`) as dt", + "Query": "select dt.TABLE_NAME from (select TABLE_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ union select TABLE_NAME from information_schema.`columns`) as dt", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" } @@ -1582,7 +1582,7 @@ "Sharded": false }, "FieldQuery": "select COLUMN_NAME from information_schema.`tables` as t where 1 != 1", - "Query": "select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname", + "Query": "select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`tables`" }, @@ -1626,7 +1626,7 @@ "Sharded": false }, "FieldQuery": "select COLLATION_NAME from information_schema.`COLUMNS` as t where 1 != 1", - "Query": "select COLLATION_NAME from information_schema.`COLUMNS` as t where COLUMN_NAME in (select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname union select COLUMN_NAME from information_schema.`columns`)", + "Query": "select COLLATION_NAME from information_schema.`COLUMNS` as t where COLUMN_NAME in (select COLUMN_NAME from information_schema.`tables` as t where t.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ union select COLUMN_NAME from information_schema.`columns`)", "SysTableTableSchema": "[VARCHAR(\"a\")]", "Table": "information_schema.`COLUMNS`" } diff --git a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json index d2018535e51..e945018c292 100644 --- a/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/postprocess_cases.json @@ -39,7 +39,7 @@ { "comment": "ambiguous symbol reference", "query": "select user.col1, user_extra.col1 from user join user_extra having col1 = 2", - "v3-plan": "VT03021: ambiguous symbol reference: col1", + "v3-plan": "VT03021: ambiguous column reference: col1", "gen4-plan": "Column 'col1' in field list is ambiguous" }, { @@ -1612,7 +1612,7 @@ { "comment": "Order by, verify outer symtab is searched according to its own context.", "query": "select u.id from user u having u.id in (select col2 from user where user.id = u.id order by u.col)", - "v3-plan": "VT03020: symbol u.col not found in subquery", + "v3-plan": "VT03020: column u.col not found in subquery", "gen4-plan": { "QueryType": "SELECT", "Original": "select u.id from user u having u.id in (select col2 from user where user.id = u.id order by u.col)", @@ -1635,8 +1635,8 @@ { "comment": "Order by, qualified '*' expression, name mismatched.", "query": "select user.* from user where id = 5 order by e.col", - "v3-plan": "VT03019: symbol e.col not found", - "gen4-plan": "symbol e.col not found" + "v3-plan": "VT03019: column e.col not found", + "gen4-plan": "column 'e.col' not found" }, { "comment": "Order by, invalid column number", @@ -2783,7 +2783,7 @@ { "comment": "join order by with ambiguous column reference ; valid in MySQL", "query": "select name, name from user, music order by name", - "v3-plan": "VT03021: ambiguous symbol reference: `name`", + "v3-plan": "VT03021: ambiguous column reference: `name`", "gen4-plan": { "QueryType": "SELECT", "Original": "select name, name from user, music order by name", @@ -2827,7 +2827,7 @@ { "comment": "order by with ambiguous column reference ; valid in MySQL", "query": "select id, id from user order by id", - "v3-plan": "VT03021: ambiguous symbol reference: id", + "v3-plan": "VT03021: ambiguous column reference: id", "gen4-plan": { "QueryType": "SELECT", "Original": "select id, id from user order by id", @@ -3030,7 +3030,7 @@ { "comment": "Distinct with same column", "query": "select distinct a, a from user", - "v3-plan": "generating ORDER BY clause: VT03021: ambiguous symbol reference: a", + "v3-plan": "generating ORDER BY clause: VT03021: ambiguous column reference: a", "gen4-plan": { "QueryType": "SELECT", "Original": "select distinct a, a from user", diff --git a/go/vt/vtgate/planbuilder/testdata/select_cases.json b/go/vt/vtgate/planbuilder/testdata/select_cases.json index 0366686cb74..5ec9aed0b0d 100644 --- a/go/vt/vtgate/planbuilder/testdata/select_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/select_cases.json @@ -796,7 +796,7 @@ { "comment": "Cannot auto-resolve for cross-shard joins", "query": "select col from user join user_extra", - "v3-plan": "VT03019: symbol col not found", + "v3-plan": "VT03019: column col not found", "gen4-plan": "Column 'col' in field list is ambiguous" }, { @@ -2372,8 +2372,8 @@ { "comment": "non-existent symbol in cross-shard derived table", "query": "select t.col from (select user.id from user join user_extra) as t", - "v3-plan": "VT03019: symbol t.col not found", - "gen4-plan": "symbol t.col not found" + "v3-plan": "VT03019: column t.col not found", + "gen4-plan": "column 't.col' not found" }, { "comment": "union with the same target shard", @@ -4074,7 +4074,7 @@ "Sharded": true }, "FieldQuery": "select 1 from user_extra as ue where 1 != 1", - "Query": "select 1 from user_extra as ue where ue.col = :u1_col and ue.col = :u2_col", + "Query": "select 1 from user_extra as ue where ue.col = :u1_col /* INT16 */ and ue.col = :u2_col /* INT16 */", "Table": "user_extra" } ] @@ -4119,7 +4119,7 @@ "Sharded": true }, "FieldQuery": "select 1 from user_extra as ue where 1 != 1", - "Query": "select 1 from user_extra as ue where ue.col = :u_col and ue.col2 = :u_col", + "Query": "select 1 from user_extra as ue where ue.col = :u_col /* INT16 */ and ue.col2 = :u_col", "Table": "user_extra" } ] @@ -4488,7 +4488,7 @@ "Sharded": false }, "FieldQuery": "select 1 from dual where 1 != 1", - "Query": "select 1 from dual where exists (select 1 from information_schema.`TABLES` where information_schema.`TABLES`.TABLE_NAME = :TABLES_TABLE_NAME and information_schema.`TABLES`.TABLE_SCHEMA = :__vtschemaname limit 1)", + "Query": "select 1 from dual where exists (select 1 from information_schema.`TABLES` where information_schema.`TABLES`.TABLE_NAME = :TABLES_TABLE_NAME /* VARCHAR */ and information_schema.`TABLES`.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableName": "[TABLES_TABLE_NAME:VARCHAR(\"proc\")]", "SysTableTableSchema": "[VARCHAR(\"mysql\")]", "Table": "dual" @@ -4505,7 +4505,7 @@ "Sharded": false }, "FieldQuery": "select 1 from dual where 1 != 1", - "Query": "select 1 from dual where exists (select 1 from information_schema.`TABLES` where `TABLES`.TABLE_NAME = :TABLES_TABLE_NAME and `TABLES`.TABLE_SCHEMA = :__vtschemaname limit 1)", + "Query": "select 1 from dual where exists (select 1 from information_schema.`TABLES` where `TABLES`.TABLE_NAME = :TABLES_TABLE_NAME /* VARCHAR */ and `TABLES`.TABLE_SCHEMA = :__vtschemaname /* VARCHAR */ limit 1)", "SysTableTableName": "[TABLES_TABLE_NAME:VARCHAR(\"proc\")]", "SysTableTableSchema": "[VARCHAR(\"mysql\")]", "Table": "dual" @@ -7900,34 +7900,34 @@ "comment": "query with a derived table and dual table in unsharded keyspace", "query": "SELECT * FROM unsharded_a AS t1 JOIN (SELECT trim((SELECT MAX(name) FROM unsharded_a)) AS name) AS t2 WHERE t1.name >= t2.name ORDER BY t1.name ASC LIMIT 1;", "v3-plan": { + "QueryType": "SELECT", + "Original": "SELECT * FROM unsharded_a AS t1 JOIN (SELECT trim((SELECT MAX(name) FROM unsharded_a)) AS name) AS t2 WHERE t1.name >= t2.name ORDER BY t1.name ASC LIMIT 1;", "Instructions": { - "FieldQuery": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a where 1 != 1)) as `name` from dual where 1 != 1) as t2 where 1 != 1", + "OperatorType": "Route", + "Variant": "Unsharded", "Keyspace": { "Name": "main", "Sharded": false }, - "OperatorType": "Route", + "FieldQuery": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a where 1 != 1)) as `name` from dual where 1 != 1) as t2 where 1 != 1", "Query": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a)) as `name` from dual) as t2 where t1.`name` >= t2.`name` order by t1.`name` asc limit 1", - "Table": "unsharded_a, dual", - "Variant": "Unsharded" - }, - "Original": "SELECT * FROM unsharded_a AS t1 JOIN (SELECT trim((SELECT MAX(name) FROM unsharded_a)) AS name) AS t2 WHERE t1.name >= t2.name ORDER BY t1.name ASC LIMIT 1;", - "QueryType": "SELECT" + "Table": "unsharded_a, dual" + } }, "gen4-plan": { + "QueryType": "SELECT", + "Original": "SELECT * FROM unsharded_a AS t1 JOIN (SELECT trim((SELECT MAX(name) FROM unsharded_a)) AS name) AS t2 WHERE t1.name >= t2.name ORDER BY t1.name ASC LIMIT 1;", "Instructions": { - "FieldQuery": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a where 1 != 1)) as `name` from dual where 1 != 1) as t2 where 1 != 1", + "OperatorType": "Route", + "Variant": "Unsharded", "Keyspace": { "Name": "main", "Sharded": false }, - "OperatorType": "Route", + "FieldQuery": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a where 1 != 1)) as `name` from dual where 1 != 1) as t2 where 1 != 1", "Query": "select * from unsharded_a as t1 join (select trim((select max(`name`) from unsharded_a)) as `name` from dual) as t2 where t1.`name` >= t2.`name` order by t1.`name` asc limit 1", - "Table": "dual, unsharded_a", - "Variant": "Unsharded" + "Table": "dual, unsharded_a" }, - "Original": "SELECT * FROM unsharded_a AS t1 JOIN (SELECT trim((SELECT MAX(name) FROM unsharded_a)) AS name) AS t2 WHERE t1.name >= t2.name ORDER BY t1.name ASC LIMIT 1;", - "QueryType": "SELECT", "TablesUsed": [ "main.dual", "main.unsharded_a" diff --git a/go/vt/vtgate/planbuilder/testdata/symtab_cases.json b/go/vt/vtgate/planbuilder/testdata/symtab_cases.json index 40558770196..9dc83122ce0 100644 --- a/go/vt/vtgate/planbuilder/testdata/symtab_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/symtab_cases.json @@ -84,7 +84,7 @@ { "comment": "predef1 is in both user and unsharded. So, it's ambiguous.", "query": "select predef1, predef3 from user join unsharded on predef1 = predef3", - "v3-plan": "VT03019: symbol predef1 not found", + "v3-plan": "VT03019: column predef1 not found", "gen4-plan": "Column 'predef1' in field list is ambiguous" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/sysschema_default.json b/go/vt/vtgate/planbuilder/testdata/sysschema_default.json index 3dcf08b102b..eec3c4709b9 100644 --- a/go/vt/vtgate/planbuilder/testdata/sysschema_default.json +++ b/go/vt/vtgate/planbuilder/testdata/sysschema_default.json @@ -50,7 +50,7 @@ "Sharded": false }, "FieldQuery": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t join information_schema.`columns` as c on c.table_schema = t.table_schema and c.table_name = t.table_name where 1 != 1", - "Query": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t join information_schema.`columns` as c on c.table_schema = t.table_schema and c.table_name = t.table_name where t.table_schema = :__vtschemaname and c.table_schema = :__vtschemaname order by t.table_schema asc, t.table_name asc, c.column_name asc", + "Query": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t join information_schema.`columns` as c on c.table_schema = t.table_schema and c.table_name = t.table_name where t.table_schema = :__vtschemaname /* VARCHAR */ and c.table_schema = :__vtschemaname /* VARCHAR */ order by t.table_schema asc, t.table_name asc, c.column_name asc", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"user\")]", "Table": "information_schema.`tables`, information_schema.`columns`" } @@ -66,7 +66,7 @@ "Sharded": false }, "FieldQuery": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t, information_schema.`columns` as c where 1 != 1", - "Query": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t, information_schema.`columns` as c where t.table_schema = :__vtschemaname and c.table_schema = :__vtschemaname and c.table_schema = t.table_schema and c.table_name = t.table_name order by t.table_schema asc, t.table_name asc, c.column_name asc", + "Query": "select t.table_schema, t.table_name, c.column_name, c.column_type from information_schema.`tables` as t, information_schema.`columns` as c where t.table_schema = :__vtschemaname /* VARCHAR */ and c.table_schema = :__vtschemaname /* VARCHAR */ and c.table_schema = t.table_schema and c.table_name = t.table_name order by t.table_schema asc, t.table_name asc, c.column_name asc", "SysTableTableSchema": "[VARCHAR(\"user\")]", "Table": "information_schema.`columns`, information_schema.`tables`" } @@ -86,7 +86,7 @@ "Sharded": false }, "FieldQuery": "select (select 1 from information_schema.schemata where 1 != 1) from dual where 1 != 1", - "Query": "select (select 1 from information_schema.schemata where schema_name = :__vtschemaname limit 1) from dual", + "Query": "select (select 1 from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */ limit 1) from dual", "SysTableTableSchema": "[VARCHAR(\"MyDatabase\")]", "Table": "dual" } @@ -102,7 +102,7 @@ "Sharded": false }, "FieldQuery": "select (select 1 from information_schema.schemata where 1 != 1) from dual where 1 != 1", - "Query": "select (select 1 from information_schema.schemata where schema_name = :__vtschemaname limit 1) from dual", + "Query": "select (select 1 from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */ limit 1) from dual", "SysTableTableSchema": "[VARCHAR(\"MyDatabase\")]", "Table": "dual" }, @@ -125,7 +125,7 @@ "Sharded": false }, "FieldQuery": "select * from (select 1 from information_schema.schemata where 1 != 1) as x where 1 != 1", - "Query": "select * from (select 1 from information_schema.schemata where schema_name = :__vtschemaname limit 1) as x", + "Query": "select * from (select 1 from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */ limit 1) as x", "SysTableTableSchema": "[VARCHAR(\"MyDatabase\")]", "Table": "information_schema.schemata" } @@ -141,7 +141,7 @@ "Sharded": false }, "FieldQuery": "select x.`1` from (select 1 from information_schema.schemata where 1 != 1) as x where 1 != 1", - "Query": "select x.`1` from (select 1 from information_schema.schemata where schema_name = :__vtschemaname limit 1) as x", + "Query": "select x.`1` from (select 1 from information_schema.schemata where schema_name = :__vtschemaname /* VARCHAR */ limit 1) as x", "SysTableTableSchema": "[VARCHAR(\"MyDatabase\")]", "Table": "information_schema.schemata" } diff --git a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json index c41dd7468d2..cca6e5f2cd4 100644 --- a/go/vt/vtgate/planbuilder/testdata/tpch_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/tpch_cases.json @@ -8,7 +8,7 @@ { "comment": "TPC-H query 2", "query": "select s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment from part, supplier, partsupp, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and p_size = 15 and p_type like '%BRASS' and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' and ps_supplycost = ( select min(ps_supplycost) from partsupp, supplier, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'EUROPE' ) order by s_acctbal desc, n_name, s_name, p_partkey limit 10", - "v3-plan": "VT03019: symbol p_partkey not found", + "v3-plan": "VT03019: column p_partkey not found", "gen4-plan": "VT12001: unsupported: cross-shard correlated subquery" }, { @@ -134,7 +134,7 @@ { "comment": "TPC-H query 4", "query": "select o_orderpriority, count(*) as order_count from orders where o_orderdate >= date('1993-07-01') and o_orderdate < date('1993-07-01') + interval '3' month and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by o_orderpriority", - "v3-plan": "VT03019: symbol o_orderkey not found", + "v3-plan": "VT03019: column o_orderkey not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select o_orderpriority, count(*) as order_count from orders where o_orderdate >= date('1993-07-01') and o_orderdate < date('1993-07-01') + interval '3' month and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by o_orderpriority", @@ -1124,7 +1124,7 @@ { "comment": "TPC-H query 17", "query": "select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#23' and p_container = 'MED BOX' and l_quantity < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey )", - "v3-plan": "VT03019: symbol p_partkey not found", + "v3-plan": "VT03019: column p_partkey not found", "gen4-plan": "VT12001: unsupported: cross-shard correlated subquery" }, { @@ -1340,7 +1340,7 @@ { "comment": "TPC-H query 20", "query": "select s_name, s_address from supplier, nation where s_suppkey in ( select ps_suppkey from partsupp where ps_partkey in ( select p_partkey from part where p_name like 'forest%' ) and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date('1994-01-01') and l_shipdate < date('1994-01-01') + interval '1' year ) ) and s_nationkey = n_nationkey and n_name = 'CANADA' order by s_name", - "v3-plan": "VT03019: symbol ps_partkey not found", + "v3-plan": "VT03019: column ps_partkey not found", "gen4-plan": "VT12001: unsupported: cross-shard correlated subquery" }, { @@ -1489,7 +1489,7 @@ { "comment": "TPC-H query 22", "query": "select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal from ( select substring(c_phone from 1 for 2) as cntrycode, c_acctbal from customer where substring(c_phone from 1 for 2) in ('13', '31', '23', '29', '30', '18', '17') and c_acctbal > ( select avg(c_acctbal) from customer where c_acctbal > 0.00 and substring(c_phone from 1 for 2) in ('13', '31', '23', '29', '30', '18', '17') ) and not exists ( select * from orders where o_custkey = c_custkey ) ) as custsale group by cntrycode order by cntrycode", - "v3-plan": "VT03019: symbol c_custkey not found", + "v3-plan": "VT03019: column c_custkey not found", "gen4-plan": "VT12001: unsupported: EXISTS sub-queries are only supported with AND clause" } ] diff --git a/go/vt/vtgate/planbuilder/testdata/union_cases.json b/go/vt/vtgate/planbuilder/testdata/union_cases.json index 5aba78fcb40..45617c5feb0 100644 --- a/go/vt/vtgate/planbuilder/testdata/union_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/union_cases.json @@ -2276,7 +2276,7 @@ "comment": "different number of columns", "query": "select id, 42 from user where id = 1 union all select id from user where id = 5", "v3-plan": "The used SELECT statements have a different number of columns (errno 1222) (sqlstate 21000) during query: select id, 42 from `user` where id = 1 union all select id from `user` where id = 5", - "gen4-plan": "The used SELECT statements have a different number of columns" + "gen4-plan": "The used SELECT statements have a different number of columns: 2, 1" }, { "comment": "union with invalid order by clause with table qualifier", @@ -2360,7 +2360,7 @@ "Sharded": false }, "FieldQuery": "select kcu.COLUMN_NAME from (select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where 1 != 1 union select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where 1 != 1) as kcu where 1 != 1", - "Query": "select kcu.COLUMN_NAME from (select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.table_name = :kcu_table_name and kcu.COLUMN_NAME = 'primary' union select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.table_name = :kcu_table_name1 and kcu.COLUMN_NAME = 'primary') as kcu", + "Query": "select kcu.COLUMN_NAME from (select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.table_name = :kcu_table_name /* VARCHAR */ and kcu.COLUMN_NAME = 'primary' union select kcu.COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.table_name = :kcu_table_name1 /* VARCHAR */ and kcu.COLUMN_NAME = 'primary') as kcu", "SysTableTableName": "[kcu_table_name1:VARCHAR(\"music\"), kcu_table_name:VARCHAR(\"user_extra\")]", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"user\")]", "Table": "information_schema.key_column_usage" @@ -2398,7 +2398,7 @@ { "comment": "systable union query in derived table with constraint on outside (star projection)", "query": "select * from (select * from `information_schema`.`key_column_usage` `kcu` where `kcu`.`table_schema` = 'user' and `kcu`.`table_name` = 'user_extra' union select * from `information_schema`.`key_column_usage` `kcu` where `kcu`.`table_schema` = 'user' and `kcu`.`table_name` = 'music') `kcu` where `constraint_name` = 'primary'", - "v3-plan": "VT03019: symbol constraint_name not found", + "v3-plan": "VT03019: column constraint_name not found", "gen4-plan": { "QueryType": "SELECT", "Original": "select * from (select * from `information_schema`.`key_column_usage` `kcu` where `kcu`.`table_schema` = 'user' and `kcu`.`table_name` = 'user_extra' union select * from `information_schema`.`key_column_usage` `kcu` where `kcu`.`table_schema` = 'user' and `kcu`.`table_name` = 'music') `kcu` where `constraint_name` = 'primary'", @@ -2410,11 +2410,48 @@ "Sharded": false }, "FieldQuery": "select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from (select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where 1 != 1 union select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where 1 != 1) as kcu where 1 != 1", - "Query": "select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from (select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.table_name = :kcu_table_name and kcu.CONSTRAINT_NAME = 'primary' union select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname and kcu.table_name = :kcu_table_name1 and kcu.CONSTRAINT_NAME = 'primary') as kcu", + "Query": "select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from (select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.table_name = :kcu_table_name /* VARCHAR */ and kcu.CONSTRAINT_NAME = 'primary' union select kcu.CONSTRAINT_CATALOG, kcu.CONSTRAINT_SCHEMA, kcu.CONSTRAINT_NAME, kcu.TABLE_CATALOG, kcu.TABLE_SCHEMA, kcu.TABLE_NAME, kcu.COLUMN_NAME, kcu.ORDINAL_POSITION, kcu.POSITION_IN_UNIQUE_CONSTRAINT, kcu.REFERENCED_TABLE_SCHEMA, kcu.REFERENCED_TABLE_NAME, kcu.REFERENCED_COLUMN_NAME from information_schema.key_column_usage as kcu where kcu.table_schema = :__vtschemaname /* VARCHAR */ and kcu.table_name = :kcu_table_name1 /* VARCHAR */ and kcu.CONSTRAINT_NAME = 'primary') as kcu", "SysTableTableName": "[kcu_table_name1:VARCHAR(\"music\"), kcu_table_name:VARCHAR(\"user_extra\")]", "SysTableTableSchema": "[VARCHAR(\"user\"), VARCHAR(\"user\")]", "Table": "information_schema.key_column_usage" } } + }, + { + "comment": "unknown columns are OK as long as the whole query is unsharded", + "query": "(SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'FAILED' ORDER BY buildNumber DESC LIMIT 1) AS last_failed) UNION ALL (SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'SUCCEEDED' ORDER BY buildNumber DESC LIMIT 1) AS last_succeeded) ORDER BY buildNumber DESC LIMIT 1", + "v3-plan": { + "QueryType": "SELECT", + "Original": "(SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'FAILED' ORDER BY buildNumber DESC LIMIT 1) AS last_failed) UNION ALL (SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'SUCCEEDED' ORDER BY buildNumber DESC LIMIT 1) AS last_succeeded) ORDER BY buildNumber DESC LIMIT 1", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select * from (select * from unsharded where 1 != 1) as last_failed where 1 != 1 union all select * from (select * from unsharded where 1 != 1) as last_succeeded where 1 != 1", + "Query": "select * from (select * from unsharded where branchId = 203622 and buildNumber <= 113893 and state = 'FAILED' order by buildNumber desc limit 1) as last_failed union all select * from (select * from unsharded where branchId = 203622 and buildNumber <= 113893 and state = 'SUCCEEDED' order by buildNumber desc limit 1) as last_succeeded order by buildNumber desc limit 1", + "Table": "unsharded" + } + }, + "gen4-plan": { + "QueryType": "SELECT", + "Original": "(SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'FAILED' ORDER BY buildNumber DESC LIMIT 1) AS last_failed) UNION ALL (SELECT * FROM (SELECT * FROM unsharded WHERE branchId = 203622 AND buildNumber <= 113893 AND state = 'SUCCEEDED' ORDER BY buildNumber DESC LIMIT 1) AS last_succeeded) ORDER BY buildNumber DESC LIMIT 1", + "Instructions": { + "OperatorType": "Route", + "Variant": "Unsharded", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "FieldQuery": "select * from (select * from unsharded where 1 != 1) as last_failed where 1 != 1 union all select * from (select * from unsharded where 1 != 1) as last_succeeded where 1 != 1", + "Query": "select * from (select * from unsharded where branchId = 203622 and buildNumber <= 113893 and state = 'FAILED' order by buildNumber desc limit 1) as last_failed union all select * from (select * from unsharded where branchId = 203622 and buildNumber <= 113893 and state = 'SUCCEEDED' order by buildNumber desc limit 1) as last_succeeded order by buildNumber desc limit 1", + "Table": "unsharded" + }, + "TablesUsed": [ + "main.unsharded" + ] + } } ] diff --git a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json index 5a2c92451d4..67fe875c56e 100644 --- a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.json @@ -208,13 +208,13 @@ "comment": "join in update tables", "query": "update user join user_extra on user.id = user_extra.id set user.name = 'foo'", "v3-plan": "VT12001: unsupported: multi-shard or vindex write statement", - "gen4-plan": "VT12001: unsupported: multiple tables in update" + "gen4-plan": "VT12001: unsupported: unaliased multiple tables in update" }, { "comment": "multiple tables in update", "query": "update user as u, user_extra as ue set u.name = 'foo' where u.id = ue.id", "v3-plan": "VT12001: unsupported: multi-shard or vindex write statement", - "gen4-plan": "VT12001: unsupported: multiple tables in update" + "gen4-plan": "VT12001: unsupported: multiple (2) tables in update" }, { "comment": "unsharded insert, unqualified names and auto-inc combined", @@ -372,7 +372,7 @@ { "comment": "create view with Cannot auto-resolve for cross-shard joins", "query": "create view user.view_a as select col from user join user_extra", - "v3-plan": "VT03019: symbol col not found", + "v3-plan": "VT03019: column col not found", "gen4-plan": "Column 'col' in field list is ambiguous" }, { @@ -414,7 +414,7 @@ { "comment": "scatter aggregate with ambiguous aliases", "query": "select distinct a, b as a from user", - "v3-plan": "generating ORDER BY clause: VT03021: ambiguous symbol reference: a", + "v3-plan": "generating ORDER BY clause: VT03021: ambiguous column reference: a", "gen4-plan": "VT13001: [BUG] generating ORDER BY clause: ambiguous symbol reference: a" }, { diff --git a/go/vt/vtgate/planbuilder/testdata/vindex_func_cases.json b/go/vt/vtgate/planbuilder/testdata/vindex_func_cases.json index 59e83eb5e10..d7dbb29ad21 100644 --- a/go/vt/vtgate/planbuilder/testdata/vindex_func_cases.json +++ b/go/vt/vtgate/planbuilder/testdata/vindex_func_cases.json @@ -723,7 +723,7 @@ { "comment": "select none from user_index where id = :id", "query": "select none from user_index where id = :id", - "v3-plan": "VT03019: symbol `none` not found", - "gen4-plan": "symbol `none` not found" + "v3-plan": "VT03019: column `none` not found", + "gen4-plan": "column '`none`' not found in table 'user_index'" } ] diff --git a/go/vt/vtgate/planbuilder/update_planner.go b/go/vt/vtgate/planbuilder/update_planner.go index 26884525d8c..a0b0c0b4ccc 100644 --- a/go/vt/vtgate/planbuilder/update_planner.go +++ b/go/vt/vtgate/planbuilder/update_planner.go @@ -25,7 +25,6 @@ import ( "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext" - "vitess.io/vitess/go/vt/vtgate/semantics" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -153,7 +152,7 @@ func initialQuery(ksidCols []sqlparser.IdentifierCI, table *vindexes.Table) (*sq // it's holding. At the moment it only supports: StrVal, HexVal, IntVal, ValArg. // If a complex expression is provided (e.g set name = name + 1), the update will be rejected. func extractValueFromUpdate(upd *sqlparser.UpdateExpr) (evalengine.Expr, error) { - pv, err := evalengine.Translate(upd.Expr, semantics.EmptySemTable()) + pv, err := evalengine.Translate(upd.Expr, nil) if err != nil || sqlparser.IsSimpleTuple(upd.Expr) { err := vterrors.VT12001(fmt.Sprintf("only values are supported: invalid update on column: `%s` with expr: [%s]", upd.Name.Name.String(), sqlparser.String(upd.Expr))) return nil, err diff --git a/go/vt/vtgate/planbuilder/vindex_op.go b/go/vt/vtgate/planbuilder/vindex_op.go index 665ed70c4ca..bfd064d6921 100644 --- a/go/vt/vtgate/planbuilder/vindex_op.go +++ b/go/vt/vtgate/planbuilder/vindex_op.go @@ -32,7 +32,9 @@ func transformVindexPlan(ctx *plancontext.PlanningContext, op *operators.Vindex) return nil, vterrors.VT12001("multi-column vindexes not supported") } - expr, err := evalengine.Translate(op.Value, ctx.SemTable) + expr, err := evalengine.Translate(op.Value, &evalengine.Config{ + Collation: ctx.SemTable.Collation, + }) if err != nil { return nil, err } diff --git a/go/vt/vtgate/querylog.go b/go/vt/vtgate/querylog.go index 33361e79421..f7d1af01613 100644 --- a/go/vt/vtgate/querylog.go +++ b/go/vt/vtgate/querylog.go @@ -21,6 +21,7 @@ import ( "sync" "vitess.io/vitess/go/streamlog" + "vitess.io/vitess/go/vt/vtgate/logstats" ) var ( @@ -34,18 +35,18 @@ var ( QueryzHandler = "/debug/queryz" // QueryLogger enables streaming logging of queries - QueryLogger *streamlog.StreamLogger + QueryLogger *streamlog.StreamLogger[*logstats.LogStats] queryLoggerMu sync.Mutex ) -func SetQueryLogger(logger *streamlog.StreamLogger) { +func SetQueryLogger(logger *streamlog.StreamLogger[*logstats.LogStats]) { queryLoggerMu.Lock() defer queryLoggerMu.Unlock() QueryLogger = logger } func initQueryLogger(vtg *VTGate) error { - SetQueryLogger(streamlog.New("VTGate", queryLogBufferSize)) + SetQueryLogger(streamlog.New[*logstats.LogStats]("VTGate", queryLogBufferSize)) QueryLogger.ServeLogs(QueryLogHandler, streamlog.GetFormatter(QueryLogger)) http.HandleFunc(QueryLogzHandler, func(w http.ResponseWriter, r *http.Request) { diff --git a/go/vt/vtgate/querylogz.go b/go/vt/vtgate/querylogz.go index a3a13be4793..acfb970df5a 100644 --- a/go/vt/vtgate/querylogz.go +++ b/go/vt/vtgate/querylogz.go @@ -17,8 +17,6 @@ limitations under the License. package vtgate import ( - "fmt" - "io" "net/http" "strconv" "strings" @@ -86,7 +84,7 @@ var ( // querylogzHandler serves a human readable snapshot of the // current query log. -func querylogzHandler(ch chan any, w http.ResponseWriter, r *http.Request) { +func querylogzHandler(ch chan *logstats.LogStats, w http.ResponseWriter, r *http.Request) { if err := acl.CheckAccessHTTP(r, acl.DEBUGGING); err != nil { acl.SendError(w, err) return @@ -100,21 +98,12 @@ func querylogzHandler(ch chan any, w http.ResponseWriter, r *http.Request) { defer tmr.Stop() for i := 0; i < limit; i++ { select { - case out := <-ch: + case stats := <-ch: select { case <-tmr.C: return default: } - stats, ok := out.(*logstats.LogStats) - if !ok { - err := fmt.Errorf("unexpected value in %s: %#v (expecting value of type %T)", QueryLogger.Name(), out, &logstats.LogStats{}) - _, _ = io.WriteString(w, ``) - _, _ = io.WriteString(w, err.Error()) - _, _ = io.WriteString(w, "") - log.Error(err) - continue - } var level string if stats.TotalTime().Seconds() < 0.01 { level = "low" diff --git a/go/vt/vtgate/querylogz_test.go b/go/vt/vtgate/querylogz_test.go index 6c35ca3a84d..ce0f4d4311b 100644 --- a/go/vt/vtgate/querylogz_test.go +++ b/go/vt/vtgate/querylogz_test.go @@ -17,6 +17,7 @@ limitations under the License. package vtgate import ( + "context" "io" "net/http" "net/http/httptest" @@ -27,24 +28,10 @@ import ( "vitess.io/vitess/go/vt/vtgate/logstats" - "context" - "vitess.io/vitess/go/streamlog" "vitess.io/vitess/go/vt/callerid" ) -func TestQuerylogzHandlerInvalidLogStats(t *testing.T) { - req, _ := http.NewRequest("GET", "/querylogz?timeout=10&limit=1", nil) - response := httptest.NewRecorder() - ch := make(chan any, 1) - ch <- "test msg" - querylogzHandler(ch, response, req) - close(ch) - if !strings.Contains(response.Body.String(), "error") { - t.Fatalf("should show an error page for an non LogStats") - } -} - func TestQuerylogzHandlerFormatting(t *testing.T) { req, _ := http.NewRequest("GET", "/querylogz?timeout=10&limit=1", nil) logStats := logstats.NewLogStats(context.Background(), "Execute", "select name from test_table limit 1000", "suuid", nil) @@ -84,7 +71,7 @@ func TestQuerylogzHandlerFormatting(t *testing.T) { } logStats.EndTime = logStats.StartTime.Add(1 * time.Millisecond) response := httptest.NewRecorder() - ch := make(chan any, 1) + ch := make(chan *logstats.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -114,7 +101,7 @@ func TestQuerylogzHandlerFormatting(t *testing.T) { } logStats.EndTime = logStats.StartTime.Add(20 * time.Millisecond) response = httptest.NewRecorder() - ch = make(chan any, 1) + ch = make(chan *logstats.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -143,7 +130,7 @@ func TestQuerylogzHandlerFormatting(t *testing.T) { ``, } logStats.EndTime = logStats.StartTime.Add(500 * time.Millisecond) - ch = make(chan any, 1) + ch = make(chan *logstats.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -153,7 +140,7 @@ func TestQuerylogzHandlerFormatting(t *testing.T) { // ensure querylogz is not affected by the filter tag streamlog.SetQueryLogFilterTag("XXX_SKIP_ME") defer func() { streamlog.SetQueryLogFilterTag("") }() - ch = make(chan any, 1) + ch = make(chan *logstats.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) diff --git a/go/vt/vtgate/queryz_test.go b/go/vt/vtgate/queryz_test.go index f45d1fa7eb8..803fdfb5b7a 100644 --- a/go/vt/vtgate/queryz_test.go +++ b/go/vt/vtgate/queryz_test.go @@ -44,10 +44,7 @@ func TestQueryzHandler(t *testing.T) { _, err := executorExec(executor, sql, nil) require.NoError(t, err) executor.plans.Wait() - plan1, ok := executor.debugGetPlan("@primary:" + sql) - if !ok { - t.Fatalf("couldn't get plan from cache") - } + plan1 := assertCacheContains(t, executor, nil, sql) plan1.ExecTime = uint64(1 * time.Millisecond) // scatter @@ -55,10 +52,7 @@ func TestQueryzHandler(t *testing.T) { _, err = executorExec(executor, sql, nil) require.NoError(t, err) executor.plans.Wait() - plan2, ok := executor.debugGetPlan("@primary:" + sql) - if !ok { - t.Fatalf("couldn't get plan from cache") - } + plan2 := assertCacheContains(t, executor, nil, sql) plan2.ExecTime = uint64(1 * time.Second) sql = "insert into user (id, name) values (:id, :name)" @@ -68,14 +62,10 @@ func TestQueryzHandler(t *testing.T) { }) require.NoError(t, err) executor.plans.Wait() - plan3, ok := executor.debugGetPlan("@primary:" + sql) - if !ok { - t.Fatalf("couldn't get plan from cache") - } + plan3 := assertCacheContains(t, executor, nil, sql) // vindex insert from above execution - plan4, ok := executor.debugGetPlan("@primary:" + "insert into name_user_map(name, user_id) values(:name_0, :user_id_0)") - require.True(t, ok, "couldn't get plan from cache") + plan4 := assertCacheContains(t, executor, nil, "insert into name_user_map(name, user_id) values(:name_0, :user_id_0)") // same query again should add query counts to existing plans sql = "insert into user (id, name) values (:id, :name)" diff --git a/go/vt/vtgate/semantics/analyzer.go b/go/vt/vtgate/semantics/analyzer.go index 1375e3914ab..9d4ff52087e 100644 --- a/go/vt/vtgate/semantics/analyzer.go +++ b/go/vt/vtgate/semantics/analyzer.go @@ -80,6 +80,23 @@ func Analyze(statement sqlparser.Statement, currentDb string, si SchemaInformati return semTable, nil } +// AnalyzeStrict analyzes the parsed query, and fails the analysis for any possible errors +func AnalyzeStrict(statement sqlparser.Statement, currentDb string, si SchemaInformation) (*SemTable, error) { + st, err := Analyze(statement, currentDb, si) + if err != nil { + return nil, err + } + + if st.NotUnshardedErr != nil { + return nil, st.NotUnshardedErr + } + if st.NotSingleRouteErr != nil { + return nil, st.NotSingleRouteErr + } + + return st, nil +} + func (a *analyzer) newSemTable(statement sqlparser.Statement, coll collations.ID) *SemTable { var comments *sqlparser.ParsedComments commentedStmt, isCommented := statement.(sqlparser.Commented) @@ -109,7 +126,7 @@ func (a *analyzer) setError(err error) { switch err := err.(type) { case ProjError: a.projErr = err.Inner - case UnshardedError: + case ShardedError: a.unshardedErr = err.Inner default: if a.inProjection > 0 && vterrors.ErrState(err) == vterrors.NonUniqError { @@ -193,15 +210,14 @@ func checkUnionColumns(union *sqlparser.Union) error { // we'll fail it at run time instead return nil } - count := len(firstProj) secondProj := sqlparser.GetFirstSelect(union.Right).SelectExprs if containsStar(secondProj) { return nil } - if len(secondProj) != count { - return NewError(UnionColumnsDoNotMatch) + if len(secondProj) != len(firstProj) { + return &UnionColumnsDoNotMatchError{FirstProj: len(firstProj), SecondProj: len(secondProj)} } return nil @@ -260,23 +276,23 @@ func (a *analyzer) checkForInvalidConstructs(cursor *sqlparser.Cursor) error { switch node := cursor.Node().(type) { case *sqlparser.Update: if len(node.TableExprs) != 1 { - return UnshardedError{Inner: NewError(UnsupportedMultiTablesInUpdate)} + return ShardedError{Inner: &UnsupportedMultiTablesInUpdateError{ExprCount: len(node.TableExprs)}} } alias, isAlias := node.TableExprs[0].(*sqlparser.AliasedTableExpr) if !isAlias { - return UnshardedError{Inner: NewError(UnsupportedMultiTablesInUpdate)} + return ShardedError{Inner: &UnsupportedMultiTablesInUpdateError{NotAlias: true}} } _, isDerived := alias.Expr.(*sqlparser.DerivedTable) if isDerived { - return NewError(TableNotUpdatable, alias.As.String()) + return &TableNotUpdatableError{Table: alias.As.String()} } case *sqlparser.Select: parent := cursor.Parent() if _, isUnion := parent.(*sqlparser.Union); isUnion && node.SQLCalcFoundRows { - return NewError(UnionWithSQLCalcFoundRows) + return &UnionWithSQLCalcFoundRowsError{} } if _, isRoot := parent.(*sqlparser.RootNode); !isRoot && node.SQLCalcFoundRows { - return NewError(SQLCalcFoundRowsUsage) + return &SQLCalcFoundRowsUsageError{} } errMsg := "INTO" nextVal := false @@ -290,35 +306,41 @@ func (a *analyzer) checkForInvalidConstructs(cursor *sqlparser.Cursor) error { return nil } if a.scoper.currentScope().parent != nil { - return NewError(CantUseOptionHere, errMsg) + return &CantUseOptionHereError{Msg: errMsg} } case *sqlparser.Nextval: currScope := a.scoper.currentScope() if currScope.parent != nil { - return NewError(CantUseOptionHere, "Incorrect usage/placement of 'INTO'") + // This is defensively checking that we are not inside a subquery or derived table + // Will probably already have been checked on the SELECT level + return &CantUseOptionHereError{Msg: "INTO"} } if len(currScope.tables) != 1 { - return NewError(NextWithMultipleTables) + // This is defensively checking that we don't have too many tables. + // Hard to check this with unit tests, since the parser does not accept these queries + return &NextWithMultipleTablesError{CountTables: len(currScope.tables)} } vindexTbl := currScope.tables[0].GetVindexTable() if vindexTbl == nil { - return NewError(MissingInVSchema) + return &MissingInVSchemaError{ + Table: currScope.tables[0], + } } if vindexTbl.Type != vindexes.TypeSequence { - return NewError(NotSequenceTable) + return &NotSequenceTableError{Table: vindexTbl.Name.String()} } case *sqlparser.JoinTableExpr: if node.Join == sqlparser.NaturalJoinType || node.Join == sqlparser.NaturalRightJoinType || node.Join == sqlparser.NaturalLeftJoinType { - return NewError(UnsupportedNaturalJoin, node.Join.ToString()) + return &UnsupportedNaturalJoinError{JoinExpr: node} } case *sqlparser.LockingFunc: - return NewError(LockOnlyWithDual, node) + return &LockOnlyWithDualError{Node: node} case *sqlparser.Union: err := sqlparser.Walk(func(node sqlparser.SQLNode) (kontinue bool, err error) { switch node := node.(type) { case *sqlparser.ColName: if !node.Qualifier.IsEmpty() { - return false, NewError(QualifiedOrderInUnion, node.Qualifier.Name) + return false, &QualifiedOrderInUnionError{Table: node.Qualifier.Name.String()} } case *sqlparser.Subquery: return false, nil @@ -333,7 +355,7 @@ func (a *analyzer) checkForInvalidConstructs(cursor *sqlparser.Cursor) error { return err } case *sqlparser.JSONTableExpr: - return NewError(JSONTables) + return &JSONTablesError{} } return nil @@ -357,12 +379,12 @@ func (p ProjError) Error() string { return p.Inner.Error() } -// UnshardedError is used to mark an error as something that should only be returned +// ShardedError is used to mark an error as something that should only be returned // if the query is not unsharded -type UnshardedError struct { +type ShardedError struct { Inner error } -func (p UnshardedError) Error() string { +func (p ShardedError) Error() string { return p.Inner.Error() } diff --git a/go/vt/vtgate/semantics/analyzer_test.go b/go/vt/vtgate/semantics/analyzer_test.go index c88c295ac68..721e69bbf3e 100644 --- a/go/vt/vtgate/semantics/analyzer_test.go +++ b/go/vt/vtgate/semantics/analyzer_test.go @@ -20,13 +20,13 @@ import ( "fmt" "testing" - "vitess.io/vitess/go/vt/vtgate/engine" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/vtgate/vindexes" ) @@ -124,10 +124,10 @@ func TestBindingSingleTableNegative(t *testing.T) { t.Run(query, func(t *testing.T) { parse, err := sqlparser.Parse(query) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "d", &FakeSI{}) - require.Error(t, err) - require.Contains(t, err.Error(), "symbol") - require.Contains(t, err.Error(), "not found") + st, err := Analyze(parse, "d", &FakeSI{}) + require.NoError(t, err) + require.ErrorContains(t, st.NotUnshardedErr, "column") + require.ErrorContains(t, st.NotUnshardedErr, "not found") }) } } @@ -144,12 +144,13 @@ func TestBindingSingleAliasedTableNegative(t *testing.T) { t.Run(query, func(t *testing.T) { parse, err := sqlparser.Parse(query) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "", &FakeSI{ + st, err := Analyze(parse, "", &FakeSI{ Tables: map[string]*vindexes.Table{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) - require.Error(t, err) + require.NoError(t, err) + require.Error(t, st.NotUnshardedErr) }) } } @@ -249,7 +250,7 @@ func TestBindingMultiTableNegative(t *testing.T) { t.Run(query, func(t *testing.T) { parse, err := sqlparser.Parse(query) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "d", &FakeSI{ + _, err = Analyze(parse, "d", &FakeSI{ Tables: map[string]*vindexes.Table{ "tabl": {Name: sqlparser.NewIdentifierCS("tabl")}, "foo": {Name: sqlparser.NewIdentifierCS("foo")}, @@ -273,7 +274,7 @@ func TestBindingMultiAliasedTableNegative(t *testing.T) { t.Run(query, func(t *testing.T) { parse, err := sqlparser.Parse(query) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "d", &FakeSI{ + _, err = Analyze(parse, "d", &FakeSI{ Tables: map[string]*vindexes.Table{ "tabl": {Name: sqlparser.NewIdentifierCS("tabl")}, "foo": {Name: sqlparser.NewIdentifierCS("foo")}, @@ -295,7 +296,7 @@ func TestNotUniqueTableName(t *testing.T) { for _, query := range queries { t.Run(query, func(t *testing.T) { parse, _ := sqlparser.Parse(query) - _, err := Analyze(parse.(sqlparser.SelectStatement), "test", &FakeSI{}) + _, err := Analyze(parse, "test", &FakeSI{}) require.Error(t, err) require.Contains(t, err.Error(), "VT03013: not unique table/alias") }) @@ -310,22 +311,19 @@ func TestMissingTable(t *testing.T) { for _, query := range queries { t.Run(query, func(t *testing.T) { parse, _ := sqlparser.Parse(query) - _, err := Analyze(parse.(sqlparser.SelectStatement), "", &FakeSI{}) - require.Error(t, err) - require.Contains(t, err.Error(), "symbol t.col not found") + st, err := Analyze(parse, "", &FakeSI{}) + require.NoError(t, err) + require.ErrorContains(t, st.NotUnshardedErr, "column 't.col' not found") }) } } func TestUnknownColumnMap2(t *testing.T) { - varchar := querypb.Type_VARCHAR - int := querypb.Type_INT32 - authoritativeTblA := vindexes.Table{ Name: sqlparser.NewIdentifierCS("a"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col2"), - Type: varchar, + Type: sqltypes.VarChar, }}, ColumnListAuthoritative: true, } @@ -333,7 +331,7 @@ func TestUnknownColumnMap2(t *testing.T) { Name: sqlparser.NewIdentifierCS("b"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), - Type: varchar, + Type: sqltypes.VarChar, }}, ColumnListAuthoritative: true, } @@ -345,7 +343,7 @@ func TestUnknownColumnMap2(t *testing.T) { Name: sqlparser.NewIdentifierCS("a"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), - Type: int, + Type: sqltypes.Int64, }}, ColumnListAuthoritative: true, } @@ -353,7 +351,7 @@ func TestUnknownColumnMap2(t *testing.T) { Name: sqlparser.NewIdentifierCS("b"), Columns: []vindexes.Column{{ Name: sqlparser.NewIdentifierCI("col"), - Type: int, + Type: sqltypes.Int64, }}, ColumnListAuthoritative: true, } @@ -362,7 +360,7 @@ func TestUnknownColumnMap2(t *testing.T) { name string schema map[string]*vindexes.Table err bool - typ *querypb.Type + typ querypb.Type }{{ name: "no info about tables", schema: map[string]*vindexes.Table{"a": {}, "b": {}}, @@ -375,22 +373,22 @@ func TestUnknownColumnMap2(t *testing.T) { name: "non authoritative columns - one authoritative and one not", schema: map[string]*vindexes.Table{"a": &nonAuthoritativeTblA, "b": &authoritativeTblB}, err: false, - typ: &varchar, + typ: sqltypes.VarChar, }, { name: "non authoritative columns - one authoritative and one not", schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &nonAuthoritativeTblB}, err: false, - typ: &varchar, + typ: sqltypes.VarChar, }, { name: "authoritative columns", schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &authoritativeTblB}, err: false, - typ: &varchar, + typ: sqltypes.VarChar, }, { name: "authoritative columns", schema: map[string]*vindexes.Table{"a": &authoritativeTblA, "b": &authoritativeTblBWithInt}, err: false, - typ: &int, + typ: sqltypes.Int64, }, { name: "authoritative columns with overlap", schema: map[string]*vindexes.Table{"a": &authoritativeTblAWithConflict, "b": &authoritativeTblB}, @@ -406,13 +404,14 @@ func TestUnknownColumnMap2(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { si := &FakeSI{Tables: test.schema} - tbl, err := Analyze(parse.(sqlparser.SelectStatement), "", si) + tbl, err := Analyze(parse, "", si) if test.err { require.True(t, err != nil || tbl.NotSingleRouteErr != nil) } else { require.NoError(t, err) require.NoError(t, tbl.NotSingleRouteErr) - typ := tbl.TypeFor(expr) + typ, _, found := tbl.TypeForExpr(expr) + assert.True(t, found) assert.Equal(t, test.typ, typ) } }) @@ -446,7 +445,7 @@ func TestUnknownPredicate(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { si := &FakeSI{Tables: test.schema} - _, err := Analyze(parse.(sqlparser.SelectStatement), "", si) + _, err := Analyze(parse, "", si) if test.err { require.Error(t, err) } else { @@ -463,23 +462,20 @@ func TestScoping(t *testing.T) { }{ { query: "select 1 from u1, u2 left join u3 on u1.a = u2.a", - errorMessage: "symbol u1.a not found", + errorMessage: "column 'u1.a' not found", }, } for _, query := range queries { t.Run(query.query, func(t *testing.T) { parse, err := sqlparser.Parse(query.query) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "user", &FakeSI{ + st, err := Analyze(parse, "user", &FakeSI{ Tables: map[string]*vindexes.Table{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) - if query.errorMessage == "" { - require.NoError(t, err) - } else { - require.EqualError(t, err, query.errorMessage) - } + require.NoError(t, err) + require.EqualError(t, st.NotUnshardedErr, query.errorMessage) }) } } @@ -528,32 +524,32 @@ func TestScopeForSubqueries(t *testing.T) { func TestSubqueriesMappingWhereClause(t *testing.T) { tcs := []struct { sql string - opCode engine.PulloutOpcode + opCode opcode.PulloutOpcode otherSideName string }{ { sql: "select id from t1 where id in (select uid from t2)", - opCode: engine.PulloutIn, + opCode: opcode.PulloutIn, otherSideName: "id", }, { sql: "select id from t1 where id not in (select uid from t2)", - opCode: engine.PulloutNotIn, + opCode: opcode.PulloutNotIn, otherSideName: "id", }, { sql: "select id from t where col1 = (select uid from t2 order by uid desc limit 1)", - opCode: engine.PulloutValue, + opCode: opcode.PulloutValue, otherSideName: "col1", }, { sql: "select id from t where exists (select uid from t2 where uid = 42)", - opCode: engine.PulloutExists, + opCode: opcode.PulloutExists, otherSideName: "", }, { sql: "select id from t where col1 >= (select uid from t2 where uid = 42)", - opCode: engine.PulloutValue, + opCode: opcode.PulloutValue, otherSideName: "col1", }, } @@ -608,7 +604,7 @@ func TestSubqueriesMappingSelectExprs(t *testing.T) { extractedSubq := semTable.SubqueryRef[subq] assert.True(t, sqlparser.Equals.Expr(extractedSubq.Subquery, subq)) assert.True(t, sqlparser.Equals.Expr(extractedSubq.Original, subq)) - assert.EqualValues(t, engine.PulloutValue, extractedSubq.OpCode) + assert.EqualValues(t, opcode.PulloutValue, extractedSubq.OpCode) }) } } @@ -871,44 +867,75 @@ func TestUnionOrderByRewrite(t *testing.T) { func TestInvalidQueries(t *testing.T) { tcases := []struct { - sql string - err string + sql string + serr string + err error + notUnshardedErr string }{{ sql: "select t1.id, t1.col1 from t1 union select t2.uid from t2", - err: "The used SELECT statements have a different number of columns", + err: &UnionColumnsDoNotMatchError{FirstProj: 2, SecondProj: 1}, }, { sql: "select t1.id from t1 union select t2.uid, t2.price from t2", - err: "The used SELECT statements have a different number of columns", + err: &UnionColumnsDoNotMatchError{FirstProj: 1, SecondProj: 2}, }, { sql: "select t1.id from t1 union select t2.uid, t2.price from t2", - err: "The used SELECT statements have a different number of columns", + err: &UnionColumnsDoNotMatchError{FirstProj: 1, SecondProj: 2}, }, { sql: "(select 1,2 union select 3,4) union (select 5,6 union select 7)", - err: "The used SELECT statements have a different number of columns", + err: &UnionColumnsDoNotMatchError{FirstProj: 2, SecondProj: 1}, + }, { + sql: "select id from a union select 3 order by a.id", + err: &QualifiedOrderInUnionError{Table: "a"}, + serr: "Table `a` from one of the SELECTs cannot be used in global ORDER clause", + }, { + sql: "select a.id, b.id from a, b union select 1, 2 order by id", + serr: "Column 'id' in field list is ambiguous", }, { - sql: "select id from a union select 3 order by a.id", - err: "Table a from one of the SELECTs cannot be used in global ORDER clause", + sql: "select sql_calc_found_rows id from a union select 1 limit 109", + err: &UnionWithSQLCalcFoundRowsError{}, + serr: "VT12001: unsupported: SQL_CALC_FOUND_ROWS not supported with union", }, { - sql: "select a.id, b.id from a, b union select 1, 2 order by id", - err: "Column 'id' in field list is ambiguous", + sql: "select * from (select sql_calc_found_rows id from a) as t", + serr: "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'", }, { - sql: "select sql_calc_found_rows id from a union select 1 limit 109", - err: "VT12001: unsupported: SQL_CALC_FOUND_ROWS not supported with union", + sql: "select (select sql_calc_found_rows id from a) as t", + serr: "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'", }, { - sql: "select * from (select sql_calc_found_rows id from a) as t", - err: "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'", + sql: "select id from t1 natural join t2", + serr: "VT12001: unsupported: natural join", }, { - sql: "select (select sql_calc_found_rows id from a) as t", - err: "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'", + sql: "select * from music where user_id IN (select sql_calc_found_rows * from music limit 10)", + err: &SQLCalcFoundRowsUsageError{}, + }, { + sql: "select is_free_lock('xyz') from user", + serr: "is_free_lock('xyz') allowed only with dual", + }, { + sql: "SELECT * FROM JSON_TABLE('[ {\"c1\": null} ]','$[*]' COLUMNS( c1 INT PATH '$.c1' ERROR ON ERROR )) as jt", + err: &JSONTablesError{}, + }, { + sql: "select does_not_exist from t1", + notUnshardedErr: "column 'does_not_exist' not found in table 't1'", + }, { + sql: "select t1.does_not_exist from t1, t2", + notUnshardedErr: "column 't1.does_not_exist' not found", }} + for _, tc := range tcases { t.Run(tc.sql, func(t *testing.T) { parse, err := sqlparser.Parse(tc.sql) require.NoError(t, err) - _, err = Analyze(parse.(sqlparser.SelectStatement), "dbName", fakeSchemaInfo()) - require.Error(t, err) - require.Equal(t, tc.err, err.Error()) + st, err := Analyze(parse, "dbName", fakeSchemaInfo()) + + switch { + case tc.err != nil: + require.Error(t, err) + require.Equal(t, tc.err, err) + case tc.serr != "": + require.EqualError(t, err, tc.serr) + case tc.notUnshardedErr != "": + require.EqualError(t, st.NotUnshardedErr, tc.notUnshardedErr) + } }) } } @@ -959,7 +986,7 @@ func TestScopingWDerivedTables(t *testing.T) { expectation: T2, }, { query: "select t.id2 from (select foo as id from user) as t", - errorMessage: "symbol t.id2 not found", + errorMessage: "column 't.id2' not found", }, { query: "select id from (select 42 as id) as t", recursiveExpectation: T0, @@ -970,7 +997,7 @@ func TestScopingWDerivedTables(t *testing.T) { expectation: T2, }, { query: "select ks.t.id from (select 42 as id) as t", - errorMessage: "symbol ks.t.id not found", + errorMessage: "column 'ks.t.id' not found", }, { query: "select * from (select id, id from user) as t", errorMessage: "Duplicate column name 'id'", @@ -996,13 +1023,13 @@ func TestScopingWDerivedTables(t *testing.T) { recursiveExpectation: T2, }, { query: "select uu.test from (select id from t1) uu", - errorMessage: "symbol uu.test not found", + errorMessage: "column 'uu.test' not found", }, { query: "select uu.id from (select id as col from t1) uu", - errorMessage: "symbol uu.id not found", + errorMessage: "column 'uu.id' not found", }, { query: "select uu.id from (select id as col from t1) uu", - errorMessage: "symbol uu.id not found", + errorMessage: "column 'uu.id' not found", }, { query: "select uu.id from (select id from t1) as uu where exists (select * from t2 as uu where uu.id = uu.uid)", expectation: T2, @@ -1016,14 +1043,18 @@ func TestScopingWDerivedTables(t *testing.T) { t.Run(query.query, func(t *testing.T) { parse, err := sqlparser.Parse(query.query) require.NoError(t, err) - st, err := Analyze(parse.(sqlparser.SelectStatement), "user", &FakeSI{ + st, err := Analyze(parse, "user", &FakeSI{ Tables: map[string]*vindexes.Table{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, }) - if query.errorMessage != "" { + + switch { + case query.errorMessage != "" && err != nil: require.EqualError(t, err, query.errorMessage) - } else { + case query.errorMessage != "": + require.EqualError(t, st.NotUnshardedErr, query.errorMessage) + default: require.NoError(t, err) sel := parse.(*sqlparser.Select) assert.Equal(t, query.recursiveExpectation, st.RecursiveDeps(extract(sel, 0)), "RecursiveDeps") @@ -1081,7 +1112,7 @@ func TestDerivedTablesOrderClause(t *testing.T) { parse, err := sqlparser.Parse(query.query) require.NoError(t, err) - st, err := Analyze(parse.(sqlparser.SelectStatement), "user", si) + st, err := Analyze(parse, "user", si) require.NoError(t, err) sel := parse.(*sqlparser.Select) @@ -1114,7 +1145,7 @@ func TestScopingWComplexDerivedTables(t *testing.T) { t.Run(query.query, func(t *testing.T) { parse, err := sqlparser.Parse(query.query) require.NoError(t, err) - st, err := Analyze(parse.(sqlparser.SelectStatement), "user", &FakeSI{ + st, err := Analyze(parse, "user", &FakeSI{ Tables: map[string]*vindexes.Table{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, @@ -1156,7 +1187,7 @@ func TestScopingWVindexTables(t *testing.T) { parse, err := sqlparser.Parse(query.query) require.NoError(t, err) hash, _ := vindexes.NewHash("user_index", nil) - st, err := Analyze(parse.(sqlparser.SelectStatement), "user", &FakeSI{ + st, err := Analyze(parse, "user", &FakeSI{ Tables: map[string]*vindexes.Table{ "t": {Name: sqlparser.NewIdentifierCS("t")}, }, @@ -1198,7 +1229,7 @@ func BenchmarkAnalyzeMultipleDifferentQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1222,7 +1253,7 @@ func BenchmarkAnalyzeUnionQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1248,7 +1279,7 @@ func BenchmarkAnalyzeSubQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1278,7 +1309,7 @@ func BenchmarkAnalyzeDerivedTableQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1304,7 +1335,7 @@ func BenchmarkAnalyzeHavingQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1333,7 +1364,7 @@ func BenchmarkAnalyzeGroupByQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1356,7 +1387,7 @@ func BenchmarkAnalyzeOrderByQueries(b *testing.B) { parse, err := sqlparser.Parse(query) require.NoError(b, err) - _, _ = Analyze(parse.(sqlparser.SelectStatement), "d", fakeSchemaInfo()) + _, _ = Analyze(parse, "d", fakeSchemaInfo()) } } } @@ -1409,6 +1440,60 @@ func TestSingleUnshardedKeyspace(t *testing.T) { } } +func TestNextErrors(t *testing.T) { + tests := []struct { + query, expectedError string + }{ + { + query: "select next 2 values from dual", + expectedError: "Table information is not provided in vschema for table `dual`", + }, { + query: "select next 2 values from t1", + expectedError: "NEXT used on a non-sequence table `t1`", + }, { + query: "select * from (select next 2 values from t1) dt", + expectedError: "Incorrect usage/placement of 'NEXT'", + }, + } + + for _, test := range tests { + t.Run(test.query, func(t *testing.T) { + parse, err := sqlparser.Parse(test.query) + require.NoError(t, err) + + _, err = Analyze(parse, "d", fakeSchemaInfo()) + assert.EqualError(t, err, test.expectedError) + }) + } +} + +func TestUpdateErrors(t *testing.T) { + tests := []struct { + query, expectedError string + }{ + { + query: "update t1, t2 set id = 12", + expectedError: "VT12001: unsupported: multiple (2) tables in update", + }, { + query: "update (select 1 from dual) dt set id = 1", + expectedError: "The target table dt of the UPDATE is not updatable", + }, + } + + for _, test := range tests { + t.Run(test.query, func(t *testing.T) { + parse, err := sqlparser.Parse(test.query) + require.NoError(t, err) + + st, err := Analyze(parse, "d", fakeSchemaInfo()) + if err == nil { + err = st.NotUnshardedErr + } + assert.EqualError(t, err, test.expectedError) + }) + } +} + var ks1 = &vindexes.Keyspace{ Name: "ks1", Sharded: false, diff --git a/go/vt/vtgate/semantics/binder.go b/go/vt/vtgate/semantics/binder.go index 446489928fc..c957317ffec 100644 --- a/go/vt/vtgate/semantics/binder.go +++ b/go/vt/vtgate/semantics/binder.go @@ -19,7 +19,7 @@ package semantics import ( "strings" - "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" "vitess.io/vitess/go/vt/sqlparser" ) @@ -143,7 +143,7 @@ func (b *binder) bindCountStar(node *sqlparser.CountStar) { func (b *binder) rewriteJoinUsingColName(deps dependency, node *sqlparser.ColName, currentScope *scope) (dependency, error) { constituents := deps.recursive.Constituents() if len(constituents) < 1 { - return dependency{}, NewError(Buggy, "we should not have a *ColName that depends on nothing") + return dependency{}, &BuggyError{Msg: "we should not have a *ColName that depends on nothing"} } newTbl := constituents[0] infoFor, err := b.tc.tableInfoFor(newTbl) @@ -205,22 +205,22 @@ func (b *binder) setSubQueryDependencies(subq *sqlparser.Subquery, currScope *sc func (b *binder) createExtractedSubquery(cursor *sqlparser.Cursor, currScope *scope, subq *sqlparser.Subquery) (*sqlparser.ExtractedSubquery, error) { if currScope.stmt == nil { - return nil, NewError(Buggy, "unable to bind subquery to select statement") + return nil, &BuggyError{Msg: "unable to bind subquery to select statement"} } sq := &sqlparser.ExtractedSubquery{ Subquery: subq, Original: subq, - OpCode: int(engine.PulloutValue), + OpCode: int(opcode.PulloutValue), } switch par := cursor.Parent().(type) { case *sqlparser.ComparisonExpr: switch par.Operator { case sqlparser.InOp: - sq.OpCode = int(engine.PulloutIn) + sq.OpCode = int(opcode.PulloutIn) case sqlparser.NotInOp: - sq.OpCode = int(engine.PulloutNotIn) + sq.OpCode = int(opcode.PulloutNotIn) } subq, exp := GetSubqueryAndOtherSide(par) sq.Original = &sqlparser.ComparisonExpr{ @@ -230,7 +230,7 @@ func (b *binder) createExtractedSubquery(cursor *sqlparser.Cursor, currScope *sc } sq.OtherSide = exp case *sqlparser.ExistsExpr: - sq.OpCode = int(engine.PulloutExists) + sq.OpCode = int(opcode.PulloutExists) sq.Original = par } return sq, nil @@ -238,6 +238,8 @@ func (b *binder) createExtractedSubquery(cursor *sqlparser.Cursor, currScope *sc func (b *binder) resolveColumn(colName *sqlparser.ColName, current *scope, allowMulti bool) (dependency, error) { var thisDeps dependencies + first := true + var tableName *sqlparser.TableName for current != nil { var err error thisDeps, err = b.resolveColumnInScope(current, colName, allowMulti) @@ -256,9 +258,22 @@ func (b *binder) resolveColumn(colName *sqlparser.ColName, current *scope, allow } else if err != nil { return dependency{}, err } + if current.parent == nil && len(current.tables) == 1 && first && colName.Qualifier.IsEmpty() { + // if this is the top scope, and we still haven't been able to find a match, we know we are about to fail + // we can check this last scope and see if there is a single table. if there is just one table in the scope + // we assume that the column is meant to come from this table. + // we also check that this is the first scope we are looking in. + // If there are more scopes the column could come from, we can't assume anything + // This is just used for a clearer error message + name, err := current.tables[0].Name() + if err == nil { + tableName = &name + } + } + first = false current = current.parent } - return dependency{}, NewError(ColumnNotFound, colName) + return dependency{}, ShardedError{&ColumnNotFoundError{Column: colName, Table: tableName}} } func (b *binder) resolveColumnInScope(current *scope, expr *sqlparser.ColName, allowMulti bool) (dependencies, error) { @@ -275,14 +290,14 @@ func (b *binder) resolveColumnInScope(current *scope, expr *sqlparser.ColName, a } if deps, isUncertain := deps.(*uncertain); isUncertain && deps.fail { // if we have a failure from uncertain, we matched the column to multiple non-authoritative tables - return nil, ProjError{Inner: NewError(AmbiguousColumn, expr)} + return nil, ProjError{Inner: &AmbiguousColumnError{Column: sqlparser.String(expr)}} } return deps, nil } func makeAmbiguousError(colName *sqlparser.ColName, err error) error { if err == ambigousErr { - err = NewError(AmbiguousColumn, colName) + err = &AmbiguousColumnError{Column: sqlparser.String(colName)} } return err } diff --git a/go/vt/vtgate/semantics/boost_extensions.go b/go/vt/vtgate/semantics/boost_extensions.go index 95e8bd117e1..0e287dc2048 100644 --- a/go/vt/vtgate/semantics/boost_extensions.go +++ b/go/vt/vtgate/semantics/boost_extensions.go @@ -19,7 +19,7 @@ func (n *noTable) GetVindexTable() *vindexes.Table { return nil } -func (n *noTable) GetExprFor(s string) (sqlparser.Expr, error) { +func (n *noTable) getExprFor(s string) (sqlparser.Expr, error) { return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "should not be called") } diff --git a/go/vt/vtgate/semantics/derived_table.go b/go/vt/vtgate/semantics/derived_table.go index 7916650ffa6..a6f44ab7ad3 100644 --- a/go/vt/vtgate/semantics/derived_table.go +++ b/go/vt/vtgate/semantics/derived_table.go @@ -134,7 +134,7 @@ func (dt *DerivedTable) getTableSet(_ originable) TableSet { } // GetExprFor implements the TableInfo interface -func (dt *DerivedTable) GetExprFor(s string) (sqlparser.Expr, error) { +func (dt *DerivedTable) getExprFor(s string) (sqlparser.Expr, error) { for i, colName := range dt.ColumnNames { if colName == s { return dt.cols[i], nil diff --git a/go/vt/vtgate/semantics/errors.go b/go/vt/vtgate/semantics/errors.go index 3088fe19430..bf0c7dc3dbd 100644 --- a/go/vt/vtgate/semantics/errors.go +++ b/go/vt/vtgate/semantics/errors.go @@ -25,179 +25,247 @@ import ( ) type ( - ErrorCode int - - Error struct { - Code ErrorCode - args []any + unsupportedError interface { + error + unsupported() } - ErrType int - - info struct { - format string - state vterrors.State - code vtrpcpb.Code - id string - typ ErrType + + bugError interface { + error + bug() } ) -const ( - Other ErrType = iota - Unsupported - Bug -) +func eprintf(e error, format string, args ...any) string { + switch e.(type) { + case unsupportedError: + format = "VT12001: unsupported: " + format + case bugError: + format = "VT13001: [BUG] " + format + } + return fmt.Sprintf(format, args...) +} -const ( - UnionColumnsDoNotMatch ErrorCode = iota - UnsupportedMultiTablesInUpdate - UnsupportedNaturalJoin - TableNotUpdatable - UnionWithSQLCalcFoundRows - SQLCalcFoundRowsUsage - CantUseOptionHere - MissingInVSchema - NotSequenceTable - NextWithMultipleTables - LockOnlyWithDual - QualifiedOrderInUnion - JSONTables - Buggy - ColumnNotFound - AmbiguousColumn -) +// Specific error implementations follow -func NewError(code ErrorCode, args ...any) *Error { - return &Error{ - Code: code, - args: args, - } +// UnionColumnsDoNotMatchError +type UnionColumnsDoNotMatchError struct { + FirstProj int + SecondProj int } -var errors = map[ErrorCode]info{ - UnionColumnsDoNotMatch: { - format: "The used SELECT statements have a different number of columns", - state: vterrors.WrongNumberOfColumnsInSelect, - code: vtrpcpb.Code_FAILED_PRECONDITION, - }, - UnsupportedMultiTablesInUpdate: { - format: "multiple tables in update", - typ: Unsupported, - }, - TableNotUpdatable: { - format: "The target table %s of the UPDATE is not updatable", - state: vterrors.NonUpdateableTable, - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - UnsupportedNaturalJoin: { - format: "%s", - typ: Unsupported, - }, - UnionWithSQLCalcFoundRows: { - format: "SQL_CALC_FOUND_ROWS not supported with union", - typ: Unsupported, - }, - SQLCalcFoundRowsUsage: { - format: "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'", - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - CantUseOptionHere: { - format: "Incorrect usage/placement of '%s'", - state: vterrors.CantUseOptionHere, - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - MissingInVSchema: { - format: "Table information is not provided in vschema", - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - NotSequenceTable: { - format: "NEXT used on a non-sequence table", - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - NextWithMultipleTables: { - format: "Next statement should not contain multiple tables", - typ: Bug, - }, - LockOnlyWithDual: { - format: "%v allowed only with dual", - code: vtrpcpb.Code_UNIMPLEMENTED, - }, - QualifiedOrderInUnion: { - format: "Table %s from one of the SELECTs cannot be used in global ORDER clause", - }, - JSONTables: { - format: "json_table expressions", - typ: Unsupported, - }, - Buggy: { - format: "%s", - typ: Bug, - }, - ColumnNotFound: { - format: "symbol %s not found", - state: vterrors.BadFieldError, - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, - AmbiguousColumn: { - format: "Column '%s' in field list is ambiguous", - state: vterrors.BadFieldError, - code: vtrpcpb.Code_INVALID_ARGUMENT, - }, -} - -func (n *Error) Error() string { - f, ok := errors[n.Code] - if !ok { - return "unknown error" - } +func (e *UnionColumnsDoNotMatchError) ErrorState() vterrors.State { + return vterrors.WrongNumberOfColumnsInSelect +} + +func (e *UnionColumnsDoNotMatchError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_FAILED_PRECONDITION +} - format := f.format +func (e *UnionColumnsDoNotMatchError) Error() string { + return eprintf(e, "The used SELECT statements have a different number of columns: %v, %v", e.FirstProj, e.SecondProj) +} - if f.id != "" { - format = fmt.Sprintf("%s: %s", f.id, format) - } +// UnsupportedMultiTablesInUpdateError +type UnsupportedMultiTablesInUpdateError struct { + ExprCount int + NotAlias bool +} - switch f.typ { - case Unsupported: - format = "VT12001: unsupported: " + format - case Bug: - format = "VT13001: [BUG] " + format +func (e *UnsupportedMultiTablesInUpdateError) Error() string { + switch { + case e.NotAlias: + return eprintf(e, "unaliased multiple tables in update") + default: + return eprintf(e, "multiple (%d) tables in update", e.ExprCount) } +} - var args []any - for _, arg := range n.args { - ast, isAST := arg.(sqlparser.SQLNode) - if isAST { - args = append(args, sqlparser.String(ast)) - } else { - args = append(args, arg) - } - } +func (e *UnsupportedMultiTablesInUpdateError) unsupported() {} - return fmt.Sprintf(format, args...) +// UnsupportedNaturalJoinError +type UnsupportedNaturalJoinError struct { + JoinExpr *sqlparser.JoinTableExpr } -func (n *Error) ErrorState() vterrors.State { - f, ok := errors[n.Code] - if !ok { - return vterrors.Undefined - } +func (e *UnsupportedNaturalJoinError) Error() string { + return eprintf(e, "%s", e.JoinExpr.Join.ToString()) +} + +func (e *UnsupportedNaturalJoinError) unsupported() {} - return f.state +// UnionWithSQLCalcFoundRowsError +type UnionWithSQLCalcFoundRowsError struct { } -func (n *Error) ErrorCode() vtrpcpb.Code { - f, ok := errors[n.Code] - if !ok { - return vtrpcpb.Code_UNKNOWN - } +func (e *UnionWithSQLCalcFoundRowsError) Error() string { + return eprintf(e, "SQL_CALC_FOUND_ROWS not supported with union") +} - switch f.typ { - case Unsupported: - return vtrpcpb.Code_UNIMPLEMENTED - case Bug: - return vtrpcpb.Code_INTERNAL - default: - return f.code +func (e *UnionWithSQLCalcFoundRowsError) unsupported() {} + +// TableNotUpdatableError +type TableNotUpdatableError struct { + Table string +} + +func (e *TableNotUpdatableError) Error() string { + return eprintf(e, "The target table %s of the UPDATE is not updatable", e.Table) +} + +func (e *TableNotUpdatableError) ErrorState() vterrors.State { + return vterrors.NonUpdateableTable +} + +func (e *TableNotUpdatableError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +// SQLCalcFoundRowsUsageError +type SQLCalcFoundRowsUsageError struct { +} + +func (e *SQLCalcFoundRowsUsageError) Error() string { + return eprintf(e, "Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'") +} + +func (e *SQLCalcFoundRowsUsageError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +// CantUseOptionHereError +type CantUseOptionHereError struct { + Msg string +} + +func (e *CantUseOptionHereError) Error() string { + return eprintf(e, "Incorrect usage/placement of '%s'", e.Msg) +} + +func (e *CantUseOptionHereError) ErrorState() vterrors.State { + return vterrors.CantUseOptionHere +} + +func (e *CantUseOptionHereError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +// MissingInVSchemaError +type MissingInVSchemaError struct { + Table TableInfo +} + +func (e *MissingInVSchemaError) Error() string { + tableName, _ := e.Table.Name() + return eprintf(e, "Table information is not provided in vschema for table `%s`", sqlparser.String(tableName)) +} + +func (e *MissingInVSchemaError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +// NotSequenceTableError +type NotSequenceTableError struct { + Table string +} + +func (e *NotSequenceTableError) Error() string { + return eprintf(e, "NEXT used on a non-sequence table `%s`", e.Table) +} + +func (e *NotSequenceTableError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +// NextWithMultipleTablesError +type NextWithMultipleTablesError struct { + CountTables int +} + +func (e *NextWithMultipleTablesError) Error() string { + return eprintf(e, "Next statement should not contain multiple tables: found %d tables", e.CountTables) +} + +func (e *NextWithMultipleTablesError) bug() {} + +// LockOnlyWithDualError +type LockOnlyWithDualError struct { + Node *sqlparser.LockingFunc +} + +func (e *LockOnlyWithDualError) Error() string { + return eprintf(e, "%v allowed only with dual", sqlparser.String(e.Node)) +} + +func (e *LockOnlyWithDualError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_UNIMPLEMENTED +} + +// QualifiedOrderInUnionError +type QualifiedOrderInUnionError struct { + Table string +} + +func (e *QualifiedOrderInUnionError) Error() string { + return eprintf(e, "Table `%s` from one of the SELECTs cannot be used in global ORDER clause", e.Table) +} + +// JSONTablesError +type JSONTablesError struct { + Table string +} + +func (e *JSONTablesError) Error() string { + return eprintf(e, "json_table expressions") +} + +func (e *JSONTablesError) unsupported() {} + +// BuggyError is used for checking conditions that should never occur +type BuggyError struct { + Msg string +} + +func (e *BuggyError) Error() string { + return eprintf(e, e.Msg) +} + +func (e *BuggyError) bug() {} + +// ColumnNotFoundError +type ColumnNotFoundError struct { + Column *sqlparser.ColName + Table *sqlparser.TableName +} + +func (e *ColumnNotFoundError) Error() string { + if e.Table == nil { + return eprintf(e, "column '%s' not found", sqlparser.String(e.Column)) } + return eprintf(e, "column '%s' not found in table '%s'", sqlparser.String(e.Column), sqlparser.String(e.Table)) +} + +func (e *ColumnNotFoundError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT +} + +func (e *ColumnNotFoundError) ErrorState() vterrors.State { + return vterrors.BadFieldError +} + +// AmbiguousColumnError +type AmbiguousColumnError struct { + Column string +} + +func (e *AmbiguousColumnError) Error() string { + return eprintf(e, "Column '%s' in field list is ambiguous", e.Column) +} + +func (e *AmbiguousColumnError) ErrorState() vterrors.State { + return vterrors.BadFieldError +} + +func (e *AmbiguousColumnError) ErrorCode() vtrpcpb.Code { + return vtrpcpb.Code_INVALID_ARGUMENT } diff --git a/go/vt/vtgate/semantics/real_table.go b/go/vt/vtgate/semantics/real_table.go index bde1595131f..5914b9324d9 100644 --- a/go/vt/vtgate/semantics/real_table.go +++ b/go/vt/vtgate/semantics/real_table.go @@ -58,7 +58,7 @@ func (r *RealTable) getTableSet(org originable) TableSet { } // GetExprFor implements the TableInfo interface -func (r *RealTable) GetExprFor(s string) (sqlparser.Expr, error) { +func (r *RealTable) getExprFor(s string) (sqlparser.Expr, error) { return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "Unknown column '%s' in 'field list'", s) } diff --git a/go/vt/vtgate/semantics/scoper.go b/go/vt/vtgate/semantics/scoper.go index adae1319e37..7bc0f28d322 100644 --- a/go/vt/vtgate/semantics/scoper.go +++ b/go/vt/vtgate/semantics/scoper.go @@ -21,7 +21,6 @@ import ( vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/engine" "vitess.io/vitess/go/vt/sqlparser" ) @@ -212,7 +211,7 @@ func (s *scoper) createSpecialScopePostProjection(parent sqlparser.SQLNode) erro } thisTableInfo := createVTableInfoForExpressions(sel.SelectExprs, nil /*needed for star expressions*/, s.org) if len(tableInfo.cols) != len(thisTableInfo.cols) { - return engine.ErrWrongNumberOfColumnsInSelect + return vterrors.NewErrorf(vtrpcpb.Code_FAILED_PRECONDITION, vterrors.WrongNumberOfColumnsInSelect, "The used SELECT statements have a different number of columns") } for i, col := range tableInfo.cols { // at this stage, we don't store the actual dependencies, we only store the expressions. diff --git a/go/vt/vtgate/semantics/semantic_state.go b/go/vt/vtgate/semantics/semantic_state.go index 7783e8ad546..377f60b6455 100644 --- a/go/vt/vtgate/semantics/semantic_state.go +++ b/go/vt/vtgate/semantics/semantic_state.go @@ -20,11 +20,9 @@ import ( "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/key" - querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vtgate/vindexes" "vitess.io/vitess/go/vt/sqlparser" @@ -55,7 +53,7 @@ type ( getColumns() []ColumnInfo dependencies(colName string, org originable) (dependencies, error) - GetExprFor(s string) (sqlparser.Expr, error) + getExprFor(s string) (sqlparser.Expr, error) getTableSet(org originable) TableSet } @@ -232,13 +230,12 @@ func (st *SemTable) AddExprs(tbl *sqlparser.AliasedTableExpr, cols sqlparser.Sel } } -// TypeFor returns the type of expressions in the query -func (st *SemTable) TypeFor(e sqlparser.Expr) *querypb.Type { - typ, found := st.ExprTypes[e] - if found { - return &typ.Type +// TypeForExpr returns the type of expressions in the query +func (st *SemTable) TypeForExpr(e sqlparser.Expr) (sqltypes.Type, collations.ID, bool) { + if typ, found := st.ExprTypes[e]; found { + return typ.Type, typ.Collation, true } - return nil + return -1, collations.Unknown, false } // CollationForExpr returns the collation name of expressions in the query @@ -315,7 +312,7 @@ func RewriteDerivedTableExpression(expr sqlparser.Expr, vt TableInfo) sqlparser. if !ok { return } - exp, err := vt.GetExprFor(node.Name.String()) + exp, err := vt.getExprFor(node.Name.String()) if err == nil { cursor.Replace(exp) return @@ -359,8 +356,6 @@ func (st *SemTable) CopyExprInfo(src, dest sqlparser.Expr) { } } -var _ evalengine.TranslationLookup = (*SemTable)(nil) - var columnNotSupportedErr = vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "column access not supported here") // ColumnLookup implements the TranslationLookup interface diff --git a/go/vt/vtgate/semantics/typer.go b/go/vt/vtgate/semantics/typer.go index 49f6da5bfe0..60ca4eaaf81 100644 --- a/go/vt/vtgate/semantics/typer.go +++ b/go/vt/vtgate/semantics/typer.go @@ -20,10 +20,9 @@ import ( "strings" "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" - "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) // typer is responsible for setting the type for expressions @@ -44,27 +43,18 @@ func newTyper() *typer { } } -var typeInt32 = Type{Type: sqltypes.Int32} -var decimal = Type{Type: sqltypes.Decimal} -var floatval = Type{Type: sqltypes.Float64} - func (t *typer) up(cursor *sqlparser.Cursor) error { switch node := cursor.Node().(type) { case *sqlparser.Literal: - switch node.Type { - case sqlparser.IntVal: - t.exprTypes[node] = typeInt32 - case sqlparser.StrVal: - t.exprTypes[node] = Type{Type: sqltypes.VarChar} // TODO - add system default collation name - case sqlparser.DecimalVal: - t.exprTypes[node] = decimal - case sqlparser.FloatVal: - t.exprTypes[node] = floatval + t.exprTypes[node] = Type{Type: node.SQLType()} + case *sqlparser.Argument: + if node.Type >= 0 { + t.exprTypes[node] = Type{Type: node.Type} } case sqlparser.AggrFunc: - code, ok := engine.SupportedAggregates[strings.ToLower(node.AggrName())] + code, ok := opcode.SupportedAggregates[strings.ToLower(node.AggrName())] if ok { - typ, ok := engine.OpcodeType[code] + typ, ok := opcode.OpcodeType[code] if ok { t.exprTypes[node] = Type{Type: typ} } diff --git a/go/vt/vtgate/semantics/typer_test.go b/go/vt/vtgate/semantics/typer_test.go new file mode 100644 index 00000000000..4c77e6f5657 --- /dev/null +++ b/go/vt/vtgate/semantics/typer_test.go @@ -0,0 +1,58 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package semantics + +import ( + "testing" + + "github.com/stretchr/testify/require" + + querypb "vitess.io/vitess/go/vt/proto/query" + "vitess.io/vitess/go/vt/sqlparser" +) + +func TestNormalizerAndSemanticAnalysisIntegration(t *testing.T) { + // This test runs the normalizer which extracts literals and replaces them with arguments + // It then tests that the semantic state contains the correct type + tests := []struct { + query, typ string + }{ + {query: "select 1", typ: "INT64"}, + {query: "select 1.2", typ: "DECIMAL"}, + {query: "select 'text'", typ: "VARCHAR"}, + {query: "select 0x1234", typ: "HEXNUM"}, + {query: "select x'7b7d'", typ: "HEXVAL"}, + } + + for _, test := range tests { + t.Run(test.query, func(t *testing.T) { + parse, err := sqlparser.Parse(test.query) + require.NoError(t, err) + + err = sqlparser.Normalize(parse, sqlparser.NewReservedVars("bv", sqlparser.BindVars{}), map[string]*querypb.BindVariable{}) + require.NoError(t, err) + + st, err := Analyze(parse, "d", fakeSchemaInfo()) + require.NoError(t, err) + bv := parse.(*sqlparser.Select).SelectExprs[0].(*sqlparser.AliasedExpr).Expr.(*sqlparser.Argument) + typ, found := st.ExprTypes[bv] + require.True(t, found, "bindvar was not typed") + require.Equal(t, test.typ, typ.Type.String()) + }) + } + +} diff --git a/go/vt/vtgate/semantics/vindex_table.go b/go/vt/vtgate/semantics/vindex_table.go index b47bef048ff..93e17fb37d0 100644 --- a/go/vt/vtgate/semantics/vindex_table.go +++ b/go/vt/vtgate/semantics/vindex_table.go @@ -42,7 +42,7 @@ func (v *VindexTable) getTableSet(org originable) TableSet { } // GetExprFor implements the TableInfo interface -func (v *VindexTable) GetExprFor(_ string) (sqlparser.Expr, error) { +func (v *VindexTable) getExprFor(_ string) (sqlparser.Expr, error) { panic("implement me") } diff --git a/go/vt/vtgate/semantics/vtable.go b/go/vt/vtgate/semantics/vtable.go index 5db26c2a97b..48589ff7ffd 100644 --- a/go/vt/vtgate/semantics/vtable.go +++ b/go/vt/vtgate/semantics/vtable.go @@ -99,7 +99,7 @@ func (v *vTableInfo) getTableSet(_ originable) TableSet { } // GetExprFor implements the TableInfo interface -func (v *vTableInfo) GetExprFor(s string) (sqlparser.Expr, error) { +func (v *vTableInfo) getExprFor(s string) (sqlparser.Expr, error) { for i, colName := range v.columnNames { if colName == s { return v.cols[i], nil diff --git a/go/vt/vtgate/simplifier/simplifier_test.go b/go/vt/vtgate/simplifier/simplifier_test.go index bf8201dee46..5757f4cf194 100644 --- a/go/vt/vtgate/simplifier/simplifier_test.go +++ b/go/vt/vtgate/simplifier/simplifier_test.go @@ -111,7 +111,7 @@ func TestSimplifyEvalEngineExpr(t *testing.T) { p0 := plus(p11, p12) expr := SimplifyExpr(p0, func(expr sqlparser.Expr) bool { - local, err := evalengine.TranslateEx(expr, nil, true) + local, err := evalengine.Translate(expr, nil) if err != nil { return false } diff --git a/go/vt/vtgate/status.go b/go/vt/vtgate/status.go index 40c545b0107..326e3da1a49 100644 --- a/go/vt/vtgate/status.go +++ b/go/vt/vtgate/status.go @@ -48,7 +48,7 @@ const ( background-color: #fff; } -
SrvKeyspace Cache
+
diff --git a/go/vt/vtgate/vcursor_impl.go b/go/vt/vtgate/vcursor_impl.go index 389d2526556..9d104222771 100644 --- a/go/vt/vtgate/vcursor_impl.go +++ b/go/vt/vtgate/vcursor_impl.go @@ -19,6 +19,7 @@ package vtgate import ( "context" "fmt" + "io" "sort" "strings" "sync/atomic" @@ -851,6 +852,12 @@ func (vc *vcursorImpl) SetConsolidator(consolidator querypb.ExecuteOptions_Conso vc.safeSession.GetOrCreateOptions().Consolidator = consolidator } +func (vc *vcursorImpl) SetWorkloadName(workloadName string) { + if workloadName != "" { + vc.safeSession.GetOrCreateOptions().WorkloadName = workloadName + } +} + // SetFoundRows implements the SessionActions interface func (vc *vcursorImpl) SetFoundRows(foundRows uint64) { vc.safeSession.FoundRows = foundRows @@ -956,7 +963,7 @@ func (vc *vcursorImpl) ErrorIfShardedF(ks *vindexes.Keyspace, warn, errFormat st func (vc *vcursorImpl) WarnUnshardedOnly(format string, params ...any) { if vc.warnShardedOnly { vc.warnings = append(vc.warnings, &querypb.QueryWarning{ - Code: mysql.ERNotSupportedYet, + Code: uint32(mysql.ERNotSupportedYet), Message: fmt.Sprintf(format, params...), }) } @@ -968,7 +975,7 @@ func (vc *vcursorImpl) PlannerWarning(message string) { return } vc.warnings = append(vc.warnings, &querypb.QueryWarning{ - Code: mysql.ERNotSupportedYet, + Code: uint32(mysql.ERNotSupportedYet), Message: message, }) } @@ -990,7 +997,12 @@ func parseDestinationTarget(targetString string, vschema *vindexes.VSchema) (str return destKeyspace, destTabletType, dest, err } -func (vc *vcursorImpl) planPrefixKey(ctx context.Context) string { +func (vc *vcursorImpl) keyForPlan(ctx context.Context, query string, buf io.StringWriter) { + _, _ = buf.WriteString(vc.keyspace) + _, _ = buf.WriteString(vindexes.TabletTypeSuffix[vc.tabletType]) + _, _ = buf.WriteString("+Collate:") + _, _ = buf.WriteString(vc.collation.Get().Name()) + if vc.destination != nil { switch vc.destination.(type) { case key.DestinationKeyspaceID, key.DestinationKeyspaceIDs: @@ -1001,14 +1013,22 @@ func (vc *vcursorImpl) planPrefixKey(ctx context.Context) string { shards[i] = resolved[i].Target.GetShard() } sort.Strings(shards) - return fmt.Sprintf("%s%sKsIDsResolved(%s)", vc.keyspace, vindexes.TabletTypeSuffix[vc.tabletType], strings.Join(shards, ",")) + + _, _ = buf.WriteString("+KsIDsResolved:") + for i, s := range shards { + if i > 0 { + _, _ = buf.WriteString(",") + } + _, _ = buf.WriteString(s) + } } default: - // use destination string (out of the switch) + _, _ = buf.WriteString("+") + _, _ = buf.WriteString(vc.destination.String()) } - return fmt.Sprintf("%s%s%s", vc.keyspace, vindexes.TabletTypeSuffix[vc.tabletType], vc.destination.String()) } - return fmt.Sprintf("%s%s", vc.keyspace, vindexes.TabletTypeSuffix[vc.tabletType]) + _, _ = buf.WriteString("+Query:") + _, _ = buf.WriteString(query) } func (vc *vcursorImpl) GetKeyspace() string { diff --git a/go/vt/vtgate/vcursor_impl_test.go b/go/vt/vtgate/vcursor_impl_test.go index 5a22de0faef..011a509c286 100644 --- a/go/vt/vtgate/vcursor_impl_test.go +++ b/go/vt/vtgate/vcursor_impl_test.go @@ -5,6 +5,7 @@ import ( "encoding/hex" "fmt" "strconv" + "strings" "testing" querypb "vitess.io/vitess/go/vt/proto/query" @@ -259,7 +260,7 @@ func TestSetTarget(t *testing.T) { } } -func TestPlanPrefixKey(t *testing.T) { +func TestKeyForPlan(t *testing.T) { type testCase struct { vschema *vindexes.VSchema targetString string @@ -269,19 +270,19 @@ func TestPlanPrefixKey(t *testing.T) { tests := []testCase{{ vschema: vschemaWith1KS, targetString: "", - expectedPlanPrefixKey: "ks1@primary", + expectedPlanPrefixKey: "ks1@primary+Collate:utf8mb4_0900_ai_ci+Query:SELECT 1", }, { vschema: vschemaWith1KS, targetString: "ks1@replica", - expectedPlanPrefixKey: "ks1@replica", + expectedPlanPrefixKey: "ks1@replica+Collate:utf8mb4_0900_ai_ci+Query:SELECT 1", }, { vschema: vschemaWith1KS, targetString: "ks1:-80", - expectedPlanPrefixKey: "ks1@primaryDestinationShard(-80)", + expectedPlanPrefixKey: "ks1@primary+Collate:utf8mb4_0900_ai_ci+DestinationShard(-80)+Query:SELECT 1", }, { vschema: vschemaWith1KS, targetString: "ks1[deadbeef]", - expectedPlanPrefixKey: "ks1@primaryKsIDsResolved(80-)", + expectedPlanPrefixKey: "ks1@primary+Collate:utf8mb4_0900_ai_ci+KsIDsResolved:80-+Query:SELECT 1", }} for i, tc := range tests { @@ -291,7 +292,10 @@ func TestPlanPrefixKey(t *testing.T) { vc, err := newVCursorImpl(ss, sqlparser.MarginComments{}, nil, nil, &fakeVSchemaOperator{vschema: tc.vschema}, tc.vschema, srvtopo.NewResolver(&fakeTopoServer{}, nil, ""), nil, false, querypb.ExecuteOptions_Gen4) require.NoError(t, err) vc.vschema = tc.vschema - require.Equal(t, tc.expectedPlanPrefixKey, vc.planPrefixKey(context.Background())) + + var buf strings.Builder + vc.keyForPlan(context.Background(), "SELECT 1", &buf) + require.Equal(t, tc.expectedPlanPrefixKey, buf.String()) }) } } diff --git a/go/vt/vtgate/vindexes/cached_size.go b/go/vt/vtgate/vindexes/cached_size.go index 76fe7f4abf5..55bbd44ea2d 100644 --- a/go/vt/vtgate/vindexes/cached_size.go +++ b/go/vt/vtgate/vindexes/cached_size.go @@ -325,10 +325,14 @@ func (cached *NumericStaticMap) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(24) + size += int64(48) } // field name string size += hack.RuntimeAllocSize(int64(len(cached.name))) + // field hashVdx vitess.io/vitess/go/vt/vtgate/vindexes.Hashing + if cc, ok := cached.hashVdx.(cachedObject); ok { + size += cc.CachedSize(true) + } // field lookup vitess.io/vitess/go/vt/vtgate/vindexes.NumericLookupTable if cached.lookup != nil { size += int64(48) diff --git a/go/vt/vtgate/vindexes/numeric_static_map.go b/go/vt/vtgate/vindexes/numeric_static_map.go index 790832aa848..11a64e98ce0 100644 --- a/go/vt/vtgate/vindexes/numeric_static_map.go +++ b/go/vt/vtgate/vindexes/numeric_static_map.go @@ -42,8 +42,9 @@ type NumericLookupTable map[uint64]uint64 // NumericStaticMap is similar to vindex Numeric but first attempts a lookup via // a JSON file. type NumericStaticMap struct { - name string - lookup NumericLookupTable + name string + hashVdx Hashing + lookup NumericLookupTable } func init() { @@ -52,19 +53,49 @@ func init() { // NewNumericStaticMap creates a NumericStaticMap vindex. func NewNumericStaticMap(name string, params map[string]string) (Vindex, error) { - jsonPath, ok := params["json_path"] - if !ok { - return nil, errors.New("NumericStaticMap: Could not find `json_path` param in vschema") + jsonStr, jsok := params["json"] + jsonPath, jpok := params["json_path"] + + if !jsok && !jpok { + return nil, errors.New("NumericStaticMap: Could not find either `json_path` params in vschema") } - lt, err := loadNumericLookupTable(jsonPath) - if err != nil { - return nil, err + if jsok && jpok { + return nil, errors.New("NumericStaticMap: Found both `json` and `json_path` params in vschema") + } + + var err error + var lt NumericLookupTable + + if jpok { + lt, err = loadNumericLookupTable(jsonPath) + if err != nil { + return nil, err + } + } + + if jsok { + lt, err = parseNumericLookupTable([]byte(jsonStr)) + if err != nil { + return nil, err + } + } + + var hashVdx Hashing + + if s, ok := params["fallback_type"]; ok { + vindex, err := CreateVindex(s, name+"_hash", map[string]string{}) + if err != nil { + return nil, err + } + hashVdx, _ = vindex.(Hashing) // We know this will not fail + } return &NumericStaticMap{ - name: name, - lookup: lt, + hashVdx: hashVdx, + lookup: lt, + name: name, }, nil } @@ -121,22 +152,32 @@ func (vind *NumericStaticMap) Hash(id sqltypes.Value) ([]byte, error) { return nil, err } lookupNum, ok := vind.lookup[num] - if ok { + if !ok { + // Not in lookup, use fallback hash + if vind.hashVdx != nil { + return vind.hashVdx.Hash(id) + } + } else { num = lookupNum } + var keybytes [8]byte binary.BigEndian.PutUint64(keybytes[:], num) return keybytes[:], nil } func loadNumericLookupTable(path string) (NumericLookupTable, error) { - var m map[string]uint64 - lt := make(map[uint64]uint64) data, err := os.ReadFile(path) if err != nil { - return lt, err + return nil, err } - err = json.Unmarshal(data, &m) + return parseNumericLookupTable(data) +} + +func parseNumericLookupTable(data []byte) (NumericLookupTable, error) { + var m map[string]uint64 + lt := make(map[uint64]uint64) + err := json.Unmarshal(data, &m) if err != nil { return lt, err } diff --git a/go/vt/vtgate/vindexes/numeric_static_map_test.go b/go/vt/vtgate/vindexes/numeric_static_map_test.go index 45a66e6fb52..05815bd73b1 100644 --- a/go/vt/vtgate/vindexes/numeric_static_map_test.go +++ b/go/vt/vtgate/vindexes/numeric_static_map_test.go @@ -40,6 +40,16 @@ func createVindex() (SingleColumn, error) { return vindex.(SingleColumn), nil } +// createVindexWithParams creates the "numeric_static_map" vindex object with the +// provided params. +func createVindexWithParams(params map[string]string) (SingleColumn, error) { + vindex, err := CreateVindex("numeric_static_map", "numericStaticMapWithParams", params) + if err != nil { + return nil, err + } + return vindex.(SingleColumn), nil +} + func TestNumericStaticMapInfo(t *testing.T) { numericStaticMap, err := createVindex() require.NoError(t, err) @@ -103,3 +113,91 @@ func TestNumericStaticMapVerify(t *testing.T) { _, err = numericStaticMap.Verify(context.Background(), nil, []sqltypes.Value{sqltypes.NewVarBinary("aa")}, [][]byte{nil}) require.EqualError(t, err, "could not parse value: 'aa'") } + +func TestNumericStaticMapWithJsonVdx(t *testing.T) { + withFallbackVdx, err := createVindexWithParams(map[string]string{ + "json": "{\"1\":2,\"3\":4,\"5\":6}", + }) + + require.NoError(t, err) + assert.Equal(t, 1, withFallbackVdx.Cost()) + assert.Equal(t, "numericStaticMapWithParams", withFallbackVdx.String()) + assert.True(t, withFallbackVdx.IsUnique()) + assert.False(t, withFallbackVdx.NeedsVCursor()) + + // Bad format tests + _, err = createVindexWithParams(map[string]string{ + "json": "{\"1\":2,\"3\":4,\"5\":6:8,\"10\":11}", + }) + require.EqualError(t, err, "invalid character ':' after object key:value pair") + + // Letters in key or value not allowed + _, err = createVindexWithParams(map[string]string{"json": "{\"1\":a}"}) + require.EqualError(t, err, "invalid character 'a' looking for beginning of value") + _, err = createVindexWithParams(map[string]string{"json": "{\"a\":1}"}) + require.EqualError(t, err, "strconv.ParseUint: parsing \"a\": invalid syntax") +} + +// Test mapping of vindex, both for specified map keys and underlying xxhash +func TestNumericStaticMapWithFallback(t *testing.T) { + mapWithFallbackVdx, err := createVindexWithParams(map[string]string{ + "json": "{\"1\":2,\"3\":4,\"4\":5,\"5\":6,\"6\":7,\"7\":8,\"8\":9,\"10\":18446744073709551615}", + "fallback_type": "xxhash", + }) + if err != nil { + t.Fatalf("failed to create vindex: %v", err) + } + got, err := mapWithFallbackVdx.Map(context.Background(), nil, []sqltypes.Value{ + sqltypes.NewInt64(1), + sqltypes.NewInt64(2), + sqltypes.NewInt64(3), + sqltypes.NewFloat64(1.1), + sqltypes.NewVarChar("test1"), + sqltypes.NewInt64(4), + sqltypes.NewInt64(5), + sqltypes.NewInt64(6), + sqltypes.NewInt64(7), + sqltypes.NewInt64(8), + sqltypes.NewInt64(10), + sqltypes.NULL, + }) + require.NoError(t, err) + + want := []key.Destination{ + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x02")), + key.DestinationKeyspaceID([]byte("\x8b\x59\x80\x16\x62\xb5\x21\x60")), + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x04")), + key.DestinationNone{}, + key.DestinationNone{}, // strings do not map + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x05")), + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x06")), + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x07")), + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x08")), + key.DestinationKeyspaceID([]byte("\x00\x00\x00\x00\x00\x00\x00\x09")), + key.DestinationKeyspaceID([]byte("\xff\xff\xff\xff\xff\xff\xff\xff")), + key.DestinationNone{}, + } + if !reflect.DeepEqual(got, want) { + t.Errorf("Map()\ngot: %+v\nwant: %+v", got, want) + } +} + +func TestNumericStaticMapWithFallbackVerify(t *testing.T) { + mapWithFallbackVdx, err := createVindexWithParams(map[string]string{ + "json": "{\"1\":2,\"3\":4,\"4\":5,\"5\":6,\"6\":7,\"7\":8,\"8\":9,\"10\":18446744073709551615}", + "fallback_type": "xxhash", + }) + if err != nil { + t.Fatalf("failed to create vindex: %v", err) + } + got, err := mapWithFallbackVdx.Verify(context.Background(), nil, []sqltypes.Value{sqltypes.NewInt64(1), sqltypes.NewInt64(2), sqltypes.NewInt64(11), sqltypes.NewInt64(10)}, [][]byte{[]byte("\x00\x00\x00\x00\x00\x00\x00\x02"), []byte("\x8b\x59\x80\x16\x62\xb5\x21\x60"), []byte("\xff\xff\xff\xff\xff\xff\xff\xff"), []byte("\xff\xff\xff\xff\xff\xff\xff\xff")}) + require.NoError(t, err) + want := []bool{true, true, false, true} + if !reflect.DeepEqual(got, want) { + t.Errorf("Verify(match): %v, want %v", got, want) + } + + // Failure test + _, err = mapWithFallbackVdx.Verify(context.Background(), nil, []sqltypes.Value{sqltypes.NewVarBinary("aa")}, [][]byte{nil}) + require.EqualError(t, err, "could not parse value: 'aa'") +} diff --git a/go/vt/vtgate/vindexes/vschema.go b/go/vt/vtgate/vindexes/vschema.go index 5ceba5222b6..be1223d0c23 100644 --- a/go/vt/vtgate/vindexes/vschema.go +++ b/go/vt/vtgate/vindexes/vschema.go @@ -852,9 +852,7 @@ func (vschema *VSchema) findTable(keyspace, tablename string) (*Table, error) { } ks, ok := vschema.Keyspaces[keyspace] if !ok { - return nil, vterrors.VT05003( - keyspace, - ) + return nil, vterrors.VT05003(keyspace) } table := ks.Tables[tablename] if table == nil { @@ -1021,9 +1019,7 @@ func (vschema *VSchema) FindVindex(keyspace, name string) (Vindex, error) { } ks, ok := vschema.Keyspaces[keyspace] if !ok { - return nil, vterrors.VT05003( - keyspace, - ) + return nil, vterrors.VT05003(keyspace) } return ks.Vindexes[name], nil } diff --git a/go/vt/vtgate/vschema_stats.go b/go/vt/vtgate/vschema_stats.go index 111976bc33d..ce234fdba9a 100644 --- a/go/vt/vtgate/vschema_stats.go +++ b/go/vt/vtgate/vschema_stats.go @@ -77,7 +77,7 @@ const ( padding: 0.2rem; } -
Keyspace Shard
+
diff --git a/go/vt/vtgate/vstream_manager.go b/go/vt/vtgate/vstream_manager.go index 6efe0fb5e7a..6c72d8a1126 100644 --- a/go/vt/vtgate/vstream_manager.go +++ b/go/vt/vtgate/vstream_manager.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "io" + "regexp" "strings" "sync" "time" @@ -179,31 +180,51 @@ func (vsm *vstreamManager) resolveParams(ctx context.Context, tabletType topodat return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vgtid must have at least one value with a starting position") } // To fetch from all keyspaces, the input must contain a single ShardGtid - // that has an empty keyspace, and the Gtid must be "current". In the - // future, we'll allow the Gtid to be empty which will also support - // copying of existing data. - if len(vgtid.ShardGtids) == 1 && vgtid.ShardGtids[0].Keyspace == "" { - if vgtid.ShardGtids[0].Gtid != "current" { - return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "for an empty keyspace, the Gtid value must be 'current': %v", vgtid) - } - keyspaces, err := vsm.toposerv.GetSrvKeyspaceNames(ctx, vsm.cell, false) - if err != nil { - return nil, nil, nil, err - } - newvgtid := &binlogdatapb.VGtid{} - for _, keyspace := range keyspaces { - newvgtid.ShardGtids = append(newvgtid.ShardGtids, &binlogdatapb.ShardGtid{ - Keyspace: keyspace, - Gtid: "current", - }) + // that has an empty keyspace, and the Gtid must be "current". + // Or the input must contain a single ShardGtid that has keyspace wildcards. + if len(vgtid.ShardGtids) == 1 { + inputKeyspace := vgtid.ShardGtids[0].Keyspace + isEmpty := inputKeyspace == "" + isRegexp := strings.HasPrefix(inputKeyspace, "/") + if isEmpty || isRegexp { + newvgtid := &binlogdatapb.VGtid{} + keyspaces, err := vsm.toposerv.GetSrvKeyspaceNames(ctx, vsm.cell, false) + if err != nil { + return nil, nil, nil, err + } + + if isEmpty { + if vgtid.ShardGtids[0].Gtid != "current" { + return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "for an empty keyspace, the Gtid value must be 'current': %v", vgtid) + } + for _, keyspace := range keyspaces { + newvgtid.ShardGtids = append(newvgtid.ShardGtids, &binlogdatapb.ShardGtid{ + Keyspace: keyspace, + Gtid: "current", + }) + } + } else { + re, err := regexp.Compile(strings.Trim(inputKeyspace, "/")) + if err != nil { + return nil, nil, nil, err + } + for _, keyspace := range keyspaces { + if re.MatchString(keyspace) { + newvgtid.ShardGtids = append(newvgtid.ShardGtids, &binlogdatapb.ShardGtid{ + Keyspace: keyspace, + Gtid: vgtid.ShardGtids[0].Gtid, + }) + } + } + } + vgtid = newvgtid } - vgtid = newvgtid } newvgtid := &binlogdatapb.VGtid{} for _, sgtid := range vgtid.ShardGtids { if sgtid.Shard == "" { - if sgtid.Gtid != "current" { - return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "if shards are unspecified, the Gtid value must be 'current': %v", vgtid) + if sgtid.Gtid != "current" && sgtid.Gtid != "" { + return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "if shards are unspecified, the Gtid value must be 'current' or empty; got: %v", vgtid) } // TODO(sougou): this should work with the new Migrate workflow _, _, allShards, err := vsm.resolver.GetKeyspaceShards(ctx, sgtid.Keyspace, tabletType) diff --git a/go/vt/vtgate/vstream_manager_test.go b/go/vt/vtgate/vstream_manager_test.go index 7136539510b..be94432a652 100644 --- a/go/vt/vtgate/vstream_manager_test.go +++ b/go/vt/vtgate/vstream_manager_test.go @@ -889,9 +889,44 @@ func TestResolveVStreamParams(t *testing.T) { input: &binlogdatapb.VGtid{ ShardGtids: []*binlogdatapb.ShardGtid{{ Keyspace: "TestVStream", + Gtid: "other", + }}, + }, + err: "if shards are unspecified, the Gtid value must be 'current' or empty", + }, { + // Verify that the function maps the input missing the shard to a list of all shards in the topology. + input: &binlogdatapb.VGtid{ + ShardGtids: []*binlogdatapb.ShardGtid{{ + Keyspace: "TestVStream", + }}, + }, + output: &binlogdatapb.VGtid{ + ShardGtids: []*binlogdatapb.ShardGtid{{ + Keyspace: "TestVStream", + Shard: "-20", + }, { + Keyspace: "TestVStream", + Shard: "20-40", + }, { + Keyspace: "TestVStream", + Shard: "40-60", + }, { + Keyspace: "TestVStream", + Shard: "60-80", + }, { + Keyspace: "TestVStream", + Shard: "80-a0", + }, { + Keyspace: "TestVStream", + Shard: "a0-c0", + }, { + Keyspace: "TestVStream", + Shard: "c0-e0", + }, { + Keyspace: "TestVStream", + Shard: "e0-", }}, }, - err: "if shards are unspecified, the Gtid value must be 'current'", }, { input: &binlogdatapb.VGtid{ ShardGtids: []*binlogdatapb.ShardGtid{{ @@ -983,17 +1018,49 @@ func TestResolveVStreamParams(t *testing.T) { assert.Equal(t, wantFilter, filter, tcase.input) require.False(t, flags.MinimizeSkew) } - // Special-case: empty keyspace because output is too big. - input := &binlogdatapb.VGtid{ - ShardGtids: []*binlogdatapb.ShardGtid{{ - Gtid: "current", - }}, + + // Special-case: empty keyspace or keyspace containing wildcards because output is too big. + // Verify that the function resolves input for multiple keyspaces into a list of all corresponding shards. + // Ensure that the number of shards returned is greater than the number of shards in a single keyspace named 'TestVStream.' + specialCases := []struct { + input *binlogdatapb.ShardGtid + }{ + { + input: &binlogdatapb.ShardGtid{ + Gtid: "current", + }, + }, + { + input: &binlogdatapb.ShardGtid{ + Keyspace: "/.*", + }, + }, + { + input: &binlogdatapb.ShardGtid{ + Keyspace: "/.*", + Gtid: "current", + }, + }, + { + input: &binlogdatapb.ShardGtid{ + Keyspace: "/Test.*", + }, + }, } - vgtid, _, _, err := vsm.resolveParams(context.Background(), topodatapb.TabletType_REPLICA, input, nil, nil) - require.NoError(t, err, input) - if got, want := len(vgtid.ShardGtids), 8; want >= got { - t.Errorf("len(vgtid.ShardGtids): %v, must be >%d", got, want) + for _, tcase := range specialCases { + input := &binlogdatapb.VGtid{ + ShardGtids: []*binlogdatapb.ShardGtid{tcase.input}, + } + vgtid, _, _, err := vsm.resolveParams(context.Background(), topodatapb.TabletType_REPLICA, input, nil, nil) + require.NoError(t, err, tcase.input) + if got, expectTestVStreamShardNumber := len(vgtid.ShardGtids), 8; expectTestVStreamShardNumber >= got { + t.Errorf("len(vgtid.ShardGtids): %v, must be >%d", got, expectTestVStreamShardNumber) + } + for _, s := range vgtid.ShardGtids { + require.Equal(t, tcase.input.Gtid, s.Gtid) + } } + for _, minimizeSkew := range []bool{true, false} { t.Run(fmt.Sprintf("resolveParams MinimizeSkew %t", minimizeSkew), func(t *testing.T) { flags := &vtgatepb.VStreamFlags{MinimizeSkew: minimizeSkew} diff --git a/go/vt/vtgate/vtgate_test.go b/go/vt/vtgate/vtgate_test.go index 39a5ee9a77e..9417edafb17 100644 --- a/go/vt/vtgate/vtgate_test.go +++ b/go/vt/vtgate/vtgate_test.go @@ -730,8 +730,8 @@ func TestMultiInternalSavepointVtGate(t *testing.T) { testQueryLog(t, logChan, "Execute", "BEGIN", "begin", 0) testQueryLog(t, logChan, "MarkSavepoint", "SAVEPOINT", "savepoint x", 0) - testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1), (:vtg2)", 2) + testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1 /* INT64 */), (:vtg2 /* INT64 */)", 2) testQueryLog(t, logChan, "MarkSavepoint", "SAVEPOINT", "savepoint y", 2) - testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1), (:vtg2)", 2) - testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1)", 1) + testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1 /* INT64 */), (:vtg2 /* INT64 */)", 2) + testQueryLog(t, logChan, "Execute", "INSERT", "insert into sp_tbl(user_id) values (:vtg1 /* INT64 */)", 1) } diff --git a/go/vt/vtgr/config/vtgr_config.go b/go/vt/vtgr/config/vtgr_config.go index 4b4063f6460..3c86a0b0f3f 100644 --- a/go/vt/vtgr/config/vtgr_config.go +++ b/go/vt/vtgr/config/vtgr_config.go @@ -26,6 +26,8 @@ import ( "gopkg.in/gcfg.v1" + "vitess.io/vitess/go/vt/vttls" + "vitess.io/vitess/go/vt/log" ) @@ -103,6 +105,7 @@ type Configuration struct { MySQLTopologySSLSkipVerify bool // If true, do not strictly validate mutual TLS certs for Topology mysql instances MySQLTopologyUseMutualTLS bool // Turn on TLS authentication with the Topology MySQL instances MySQLTopologyUseMixedTLS bool // Mixed TLS and non-TLS authentication with the Topology MySQL instances + MySQLTopologyTLSMinVersion string // Configures the minimal required TLS version for a topology MySQL instance with TLS. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. TLSCacheTTLFactor uint // Factor of InstancePollSeconds that we set as TLS info cache expiry BackendDB string // EXPERIMENTAL: type of backend db; either "mysql" or "sqlite" SQLite3DataFile string // when BackendDB == "sqlite", full path to sqlite3 datafile @@ -127,6 +130,7 @@ type Configuration struct { MySQLOrchestratorSSLCAFile string // Certificate Authority PEM file used to authenticate with the Orchestrator mysql instance with TLS MySQLOrchestratorSSLSkipVerify bool // If true, do not strictly validate mutual TLS certs for the Orchestrator mysql instances MySQLOrchestratorUseMutualTLS bool // Turn on TLS authentication with the Orchestrator MySQL instance + MySQLOrchestratorTLSMinVersion string // Configures the minimal required TLS version for the Orchestrator MySQL instance with TLS. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. MySQLOrchestratorReadTimeoutSeconds int // Number of seconds before backend mysql read operation is aborted (driver-side) MySQLOrchestratorRejectReadOnly bool // Reject read only connections https://github.com/go-sql-driver/mysql#rejectreadonly MySQLConnectTimeoutSeconds int // Number of seconds before connection is aborted (driver-side) @@ -405,6 +409,20 @@ func newConfiguration() *Configuration { } } +func (config *Configuration) MySQLOrchestratorTLSMinVersionNumber() uint16 { + // We can ignore the error here, we already checked for valid options if it's set. + // If it's not set, we get a safe default back here. + minVersion, _ := vttls.TLSVersionToNumber(config.MySQLOrchestratorTLSMinVersion) + return minVersion +} + +func (config *Configuration) MySQLTopologyTLSMinVersionNumber() uint16 { + // We can ignore the error here, we already checked for valid options if it's set. + // If it's not set, we get a safe default back here. + minVersion, _ := vttls.TLSVersionToNumber(config.MySQLTopologyTLSMinVersion) + return minVersion +} + func (config *Configuration) postReadAdjustments() error { if config.MySQLOrchestratorCredentialsConfigFile != "" { mySQLConfig := struct { @@ -509,6 +527,21 @@ func (config *Configuration) postReadAdjustments() error { config.BufferInstanceWrites = false } } + + if config.MySQLOrchestratorTLSMinVersion != "" { + _, err := vttls.TLSVersionToNumber(config.MySQLOrchestratorTLSMinVersion) + if err != nil { + return fmt.Errorf("If specified, MySQLOrchestratorTLSMinVersion must be one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3") + } + } + + if config.MySQLTopologyTLSMinVersion != "" { + _, err := vttls.TLSVersionToNumber(config.MySQLTopologyTLSMinVersion) + if err != nil { + return fmt.Errorf("If specified, MySQLTopologyTLSMinVersion must be one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3") + } + } + return nil } diff --git a/go/vt/vtgr/db/tls.go b/go/vt/vtgr/db/tls.go index 62dcf028c0d..514e3d49df3 100644 --- a/go/vt/vtgr/db/tls.go +++ b/go/vt/vtgr/db/tls.go @@ -21,7 +21,6 @@ package db import ( - "crypto/tls" "fmt" "strings" "time" @@ -95,14 +94,12 @@ func requiresTLS(host string, port int, uri string) bool { return required } -// Create a TLS configuration from the config supplied CA, Certificate, and Private key. +// SetupMySQLTopologyTLS creates a TLS configuration from the config supplied CA, Certificate, and Private key. // Register the TLS config with the mysql drivers as the "topology" config // Modify the supplied URI to call the TLS config func SetupMySQLTopologyTLS(uri string) (string, error) { if !topologyTLSConfigured { - tlsConfig, err := ssl.NewTLSConfig(config.Config.MySQLTopologySSLCAFile, !config.Config.MySQLTopologySSLSkipVerify) - // Drop to TLS 1.0 for talking to MySQL - tlsConfig.MinVersion = tls.VersionTLS10 + tlsConfig, err := ssl.NewTLSConfig(config.Config.MySQLTopologySSLCAFile, !config.Config.MySQLTopologySSLSkipVerify, config.Config.MySQLTopologyTLSMinVersionNumber()) if err != nil { log.Errorf("Can't create TLS configuration for Topology connection %s: %s", uri, err) return "", err @@ -126,14 +123,12 @@ func SetupMySQLTopologyTLS(uri string) (string, error) { return fmt.Sprintf("%s&tls=topology", uri), nil } -// Create a TLS configuration from the config supplied CA, Certificate, and Private key. +// SetupMySQLOrchestratorTLS creates a TLS configuration from the config supplied CA, Certificate, and Private key. // Register the TLS config with the mysql drivers as the "orchestrator" config // Modify the supplied URI to call the TLS config func SetupMySQLOrchestratorTLS(uri string) (string, error) { if !orchestratorTLSConfigured { - tlsConfig, err := ssl.NewTLSConfig(config.Config.MySQLOrchestratorSSLCAFile, !config.Config.MySQLOrchestratorSSLSkipVerify) - // Drop to TLS 1.0 for talking to MySQL - tlsConfig.MinVersion = tls.VersionTLS10 + tlsConfig, err := ssl.NewTLSConfig(config.Config.MySQLOrchestratorSSLCAFile, !config.Config.MySQLOrchestratorSSLSkipVerify, config.Config.MySQLOrchestratorTLSMinVersionNumber()) if err != nil { log.Fatalf("Can't create TLS configuration for Orchestrator connection %s: %s", uri, err) return "", err diff --git a/go/vt/vtgr/ssl/ssl.go b/go/vt/vtgr/ssl/ssl.go index a655e1554b8..9b940d9f743 100644 --- a/go/vt/vtgr/ssl/ssl.go +++ b/go/vt/vtgr/ssl/ssl.go @@ -34,11 +34,11 @@ func HasString(elem string, arr []string) bool { // NewTLSConfig returns an initialized TLS configuration suitable for client // authentication. If caFile is non-empty, it will be loaded. -func NewTLSConfig(caFile string, verifyCert bool) (*tls.Config, error) { +func NewTLSConfig(caFile string, verifyCert bool, minVersion uint16) (*tls.Config, error) { var c tls.Config // Set to TLS 1.2 as a minimum. This is overridden for mysql communication - c.MinVersion = tls.VersionTLS12 + c.MinVersion = minVersion if verifyCert { log.Info("verifyCert requested, client certificates will be verified") diff --git a/go/vt/vtgr/ssl/ssl_test.go b/go/vt/vtgr/ssl/ssl_test.go index 3769969eb5f..94502ea556e 100644 --- a/go/vt/vtgr/ssl/ssl_test.go +++ b/go/vt/vtgr/ssl/ssl_test.go @@ -39,7 +39,7 @@ func TestNewTLSConfig(t *testing.T) { fakeCA := writeFakeFile(pemCertificate) defer syscall.Unlink(fakeCA) - conf, err := ssl.NewTLSConfig(fakeCA, true) + conf, err := ssl.NewTLSConfig(fakeCA, true, tls.VersionTLS13) if err != nil { t.Errorf("Could not create new TLS config: %s", err) } @@ -49,8 +49,11 @@ func TestNewTLSConfig(t *testing.T) { if conf.ClientCAs == nil { t.Errorf("ClientCA empty even though cert provided") } + if conf.MinVersion != tls.VersionTLS13 { + t.Errorf("incorrect tls min version set") + } - conf, err = ssl.NewTLSConfig("", false) + conf, err = ssl.NewTLSConfig("", false, tls.VersionTLS12) if err != nil { t.Errorf("Could not create new TLS config: %s", err) } @@ -60,6 +63,9 @@ func TestNewTLSConfig(t *testing.T) { if conf.ClientCAs != nil { t.Errorf("Filling in ClientCA somehow without a cert") } + if conf.MinVersion != tls.VersionTLS12 { + t.Errorf("incorrect tls min version set") + } } func TestStatus(t *testing.T) { @@ -145,7 +151,7 @@ func TestReadPEMData(t *testing.T) { } func TestAppendKeyPair(t *testing.T) { - c, err := ssl.NewTLSConfig("", false) + c, err := ssl.NewTLSConfig("", false, tls.VersionTLS12) if err != nil { t.Fatal(err) } @@ -160,7 +166,7 @@ func TestAppendKeyPair(t *testing.T) { } func TestAppendKeyPairWithPassword(t *testing.T) { - c, err := ssl.NewTLSConfig("", false) + c, err := ssl.NewTLSConfig("", false, tls.VersionTLS12) if err != nil { t.Fatal(err) } diff --git a/go/vt/vtorc/inst/analysis_dao.go b/go/vt/vtorc/inst/analysis_dao.go index 21ffdbe4fe8..9e365b71cce 100644 --- a/go/vt/vtorc/inst/analysis_dao.go +++ b/go/vt/vtorc/inst/analysis_dao.go @@ -364,7 +364,7 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna a.AnalyzedShard = m.GetString("shard") a.PrimaryTimeStamp = m.GetTime("primary_timestamp") - if keyspaceType := topodatapb.KeyspaceType(m.GetInt("keyspace_type")); keyspaceType == topodatapb.KeyspaceType_SNAPSHOT { + if keyspaceType := topodatapb.KeyspaceType(m.GetInt32("keyspace_type")); keyspaceType == topodatapb.KeyspaceType_SNAPSHOT { log.Errorf("keyspace %v is a snapshot keyspace. Skipping.", a.AnalyzedKeyspace) return nil } @@ -379,7 +379,7 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna a.AnalyzedInstancePhysicalEnvironment = m.GetString("physical_environment") a.AnalyzedInstanceBinlogCoordinates = BinlogCoordinates{ LogFile: m.GetString("binary_log_file"), - LogPos: m.GetInt64("binary_log_pos"), + LogPos: m.GetUint32("binary_log_pos"), Type: BinaryLog, } isStaleBinlogCoordinates := m.GetBool("is_stale_binlog_coordinates") diff --git a/go/vt/vtorc/inst/binlog.go b/go/vt/vtorc/inst/binlog.go index a2822997ae5..066c2f5c598 100644 --- a/go/vt/vtorc/inst/binlog.go +++ b/go/vt/vtorc/inst/binlog.go @@ -30,7 +30,7 @@ func init() { detachPattern, _ = regexp.Compile(`//([^/:]+):([\d]+)`) // e.g. `//binlog.01234:567890` } -type BinlogType int +type BinlogType int32 const ( BinaryLog BinlogType = iota @@ -40,7 +40,7 @@ const ( // BinlogCoordinates described binary log coordinates in the form of log file & log position. type BinlogCoordinates struct { LogFile string - LogPos int64 + LogPos uint32 Type BinlogType } @@ -51,11 +51,11 @@ func ParseBinlogCoordinates(logFileLogPos string) (*BinlogCoordinates, error) { return nil, fmt.Errorf("ParseBinlogCoordinates: Cannot parse BinlogCoordinates from %s. Expected format is file:pos", logFileLogPos) } - logPos, err := strconv.ParseInt(tokens[1], 10, 0) + logPos, err := strconv.ParseUint(tokens[1], 10, 32) if err != nil { return nil, fmt.Errorf("ParseBinlogCoordinates: invalid pos: %s", tokens[1]) } - return &BinlogCoordinates{LogFile: tokens[0], LogPos: logPos}, nil + return &BinlogCoordinates{LogFile: tokens[0], LogPos: uint32(logPos)}, nil } // DisplayString returns a user-friendly string representation of these coordinates @@ -176,6 +176,7 @@ func (binlogCoordinates *BinlogCoordinates) ExtractDetachedCoordinates() (isDeta return false, *binlogCoordinates } detachedCoordinates.LogFile = detachedCoordinatesSubmatch[1] - detachedCoordinates.LogPos, _ = strconv.ParseInt(detachedCoordinatesSubmatch[2], 10, 0) + logPos, _ := strconv.ParseUint(detachedCoordinatesSubmatch[2], 10, 32) + detachedCoordinates.LogPos = uint32(logPos) return true, detachedCoordinates } diff --git a/go/vt/vtorc/inst/binlog_test.go b/go/vt/vtorc/inst/binlog_test.go index e650fd81fca..bc0110e981c 100644 --- a/go/vt/vtorc/inst/binlog_test.go +++ b/go/vt/vtorc/inst/binlog_test.go @@ -41,7 +41,7 @@ func TestPreviousFileCoordinates(t *testing.T) { require.NoError(t, err) require.Equal(t, previous.LogFile, "mysql-bin.000009") - require.Equal(t, previous.LogPos, int64(0)) + require.Equal(t, previous.LogPos, uint32(0)) } func TestNextFileCoordinates(t *testing.T) { @@ -49,7 +49,7 @@ func TestNextFileCoordinates(t *testing.T) { require.NoError(t, err) require.Equal(t, next.LogFile, "mysql-bin.000011") - require.Equal(t, next.LogPos, int64(0)) + require.Equal(t, next.LogPos, uint32(0)) } func TestBinlogCoordinates(t *testing.T) { diff --git a/go/vt/vtorc/inst/instance_binlog.go b/go/vt/vtorc/inst/instance_binlog.go index 9ccf13a207f..201c1d29c5c 100644 --- a/go/vt/vtorc/inst/instance_binlog.go +++ b/go/vt/vtorc/inst/instance_binlog.go @@ -38,7 +38,7 @@ var eventInfoTransformations = map[*regexp.Regexp]string{ type BinlogEvent struct { Coordinates BinlogCoordinates - NextEventPos int64 + NextEventPos uint32 EventType string Info string } diff --git a/go/vt/vtorc/inst/instance_dao.go b/go/vt/vtorc/inst/instance_dao.go index a799e4e3cb4..ec175e8b455 100644 --- a/go/vt/vtorc/inst/instance_dao.go +++ b/go/vt/vtorc/inst/instance_dao.go @@ -590,14 +590,14 @@ func readInstanceRow(m sqlutils.RowMap) *Instance { instance.GtidErrant = m.GetString("gtid_errant") instance.UsingMariaDBGTID = m.GetBool("mariadb_gtid") instance.SelfBinlogCoordinates.LogFile = m.GetString("binary_log_file") - instance.SelfBinlogCoordinates.LogPos = m.GetInt64("binary_log_pos") + instance.SelfBinlogCoordinates.LogPos = m.GetUint32("binary_log_pos") instance.ReadBinlogCoordinates.LogFile = m.GetString("source_log_file") - instance.ReadBinlogCoordinates.LogPos = m.GetInt64("read_source_log_pos") + instance.ReadBinlogCoordinates.LogPos = m.GetUint32("read_source_log_pos") instance.ExecBinlogCoordinates.LogFile = m.GetString("relay_source_log_file") - instance.ExecBinlogCoordinates.LogPos = m.GetInt64("exec_source_log_pos") + instance.ExecBinlogCoordinates.LogPos = m.GetUint32("exec_source_log_pos") instance.IsDetached, _ = instance.ExecBinlogCoordinates.ExtractDetachedCoordinates() instance.RelaylogCoordinates.LogFile = m.GetString("relay_log_file") - instance.RelaylogCoordinates.LogPos = m.GetInt64("relay_log_pos") + instance.RelaylogCoordinates.LogPos = m.GetUint32("relay_log_pos") instance.RelaylogCoordinates.Type = RelayLog instance.LastSQLError = m.GetString("last_sql_error") instance.LastIOError = m.GetString("last_io_error") diff --git a/go/vt/vtorc/inst/keyspace_dao.go b/go/vt/vtorc/inst/keyspace_dao.go index 7e55471854d..f3624449001 100644 --- a/go/vt/vtorc/inst/keyspace_dao.go +++ b/go/vt/vtorc/inst/keyspace_dao.go @@ -43,7 +43,7 @@ func ReadKeyspace(keyspaceName string) (*topo.KeyspaceInfo, error) { Keyspace: &topodatapb.Keyspace{}, } err := db.QueryVTOrc(query, args, func(row sqlutils.RowMap) error { - keyspace.KeyspaceType = topodatapb.KeyspaceType(row.GetInt("keyspace_type")) + keyspace.KeyspaceType = topodatapb.KeyspaceType(row.GetInt32("keyspace_type")) keyspace.DurabilityPolicy = row.GetString("durability_policy") keyspace.SetKeyspaceName(keyspaceName) return nil diff --git a/go/vt/vtorc/logic/tablet_discovery_test.go b/go/vt/vtorc/logic/tablet_discovery_test.go index 71d8e31948c..d43cebefc0f 100644 --- a/go/vt/vtorc/logic/tablet_discovery_test.go +++ b/go/vt/vtorc/logic/tablet_discovery_test.go @@ -270,11 +270,11 @@ func TestShardPrimary(t *testing.T) { // verifyRefreshTabletsInKeyspaceShard calls refreshTabletsInKeyspaceShard with the forceRefresh parameter provided and verifies that // the number of instances refreshed matches the parameter and all the tablets match the ones provided func verifyRefreshTabletsInKeyspaceShard(t *testing.T, forceRefresh bool, instanceRefreshRequired int, tablets []*topodatapb.Tablet) { - var instancesRefreshed int32 - atomic.StoreInt32(&instancesRefreshed, 0) + var instancesRefreshed atomic.Int32 + instancesRefreshed.Store(0) // call refreshTabletsInKeyspaceShard while counting all the instances that are refreshed refreshTabletsInKeyspaceShard(context.Background(), keyspace, shard, func(instanceKey *inst.InstanceKey) { - atomic.AddInt32(&instancesRefreshed, 1) + instancesRefreshed.Add(1) }, forceRefresh) // Verify that all the tablets are present in the database for _, tablet := range tablets { @@ -282,7 +282,7 @@ func verifyRefreshTabletsInKeyspaceShard(t *testing.T, forceRefresh bool, instan } verifyTabletCount(t, len(tablets)) // Verify that refresh as many tablets as expected - assert.EqualValues(t, instanceRefreshRequired, atomic.LoadInt32(&instancesRefreshed)) + assert.EqualValues(t, instanceRefreshRequired, instancesRefreshed.Load()) } // verifyTabletInfo verifies that the tablet information read from the vtorc database diff --git a/go/vt/vtorc/logic/topology_recovery_dao_test.go b/go/vt/vtorc/logic/topology_recovery_dao_test.go index dc1d2ae167d..f01e16560a8 100644 --- a/go/vt/vtorc/logic/topology_recovery_dao_test.go +++ b/go/vt/vtorc/logic/topology_recovery_dao_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/external/golib/sqlutils" + "vitess.io/vitess/go/vt/vtorc/db" "vitess.io/vitess/go/vt/vtorc/inst" ) diff --git a/go/vt/vtorc/ssl/ssl.go b/go/vt/vtorc/ssl/ssl.go deleted file mode 100644 index 944d9457139..00000000000 --- a/go/vt/vtorc/ssl/ssl.go +++ /dev/null @@ -1,166 +0,0 @@ -package ssl - -import ( - "crypto/tls" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - nethttp "net/http" - "os" - - "vitess.io/vitess/go/vt/log" - - "github.com/howeyc/gopass" -) - -// Determine if a string element is in a string array -func HasString(elem string, arr []string) bool { - for _, s := range arr { - if s == elem { - return true - } - } - return false -} - -// NewTLSConfig returns an initialized TLS configuration suitable for client -// authentication. If caFile is non-empty, it will be loaded. -func NewTLSConfig(caFile string, verifyCert bool) (*tls.Config, error) { - var c tls.Config - - // Set to TLS 1.2 as a minimum. This is overridden for mysql communication - c.MinVersion = tls.VersionTLS12 - - if verifyCert { - log.Info("verifyCert requested, client certificates will be verified") - c.ClientAuth = tls.VerifyClientCertIfGiven - } - caPool, err := ReadCAFile(caFile) - if err != nil { - return &c, err - } - c.ClientCAs = caPool - return &c, nil -} - -// Returns CA certificate. If caFile is non-empty, it will be loaded. -func ReadCAFile(caFile string) (*x509.CertPool, error) { - var caCertPool *x509.CertPool - if caFile != "" { - data, err := os.ReadFile(caFile) - if err != nil { - return nil, err - } - caCertPool = x509.NewCertPool() - if !caCertPool.AppendCertsFromPEM(data) { - return nil, errors.New("No certificates parsed") - } - log.Infof("Read in CA file: %v", caFile) - } - return caCertPool, nil -} - -// AppendKeyPair loads the given TLS key pair and appends it to -// tlsConfig.Certificates. -func AppendKeyPair(tlsConfig *tls.Config, certFile string, keyFile string) error { - cert, err := tls.LoadX509KeyPair(certFile, keyFile) - if err != nil { - return err - } - tlsConfig.Certificates = append(tlsConfig.Certificates, cert) - return nil -} - -// Read in a keypair where the key is password protected -func AppendKeyPairWithPassword(tlsConfig *tls.Config, certFile string, keyFile string, pemPass []byte) error { - - // Certificates aren't usually password protected, but we're kicking the password - // along just in case. It won't be used if the file isn't encrypted - certData, err := ReadPEMData(certFile, pemPass) - if err != nil { - return err - } - keyData, err := ReadPEMData(keyFile, pemPass) - if err != nil { - return err - } - cert, err := tls.X509KeyPair(certData, keyData) - if err != nil { - return err - } - tlsConfig.Certificates = append(tlsConfig.Certificates, cert) - return nil -} - -// Read a PEM file and ask for a password to decrypt it if needed -func ReadPEMData(pemFile string, pemPass []byte) ([]byte, error) { - pemData, err := os.ReadFile(pemFile) - if err != nil { - return pemData, err - } - - // We should really just get the pem.Block back here, if there's other - // junk on the end, warn about it. - pemBlock, rest := pem.Decode(pemData) - if len(rest) > 0 { - log.Warning("Didn't parse all of", pemFile) - } - - if x509.IsEncryptedPEMBlock(pemBlock) { //nolint SA1019 - // Decrypt and get the ASN.1 DER bytes here - pemData, err = x509.DecryptPEMBlock(pemBlock, pemPass) //nolint SA1019 - if err != nil { - return pemData, err - } - log.Infof("Decrypted %v successfully", pemFile) - // Shove the decrypted DER bytes into a new pem Block with blank headers - var newBlock pem.Block - newBlock.Type = pemBlock.Type - newBlock.Bytes = pemData - // This is now like reading in an uncrypted key from a file and stuffing it - // into a byte stream - pemData = pem.EncodeToMemory(&newBlock) - } - return pemData, nil -} - -// Print a password prompt on the terminal and collect a password -func GetPEMPassword(pemFile string) []byte { - fmt.Printf("Password for %s: ", pemFile) - pass, err := gopass.GetPasswd() - if err != nil { - // We'll error with an incorrect password at DecryptPEMBlock - return []byte("") - } - return pass -} - -// Determine if PEM file is encrypted -func IsEncryptedPEM(pemFile string) bool { - pemData, err := os.ReadFile(pemFile) - if err != nil { - return false - } - pemBlock, _ := pem.Decode(pemData) - if len(pemBlock.Bytes) == 0 { - return false - } - return x509.IsEncryptedPEMBlock(pemBlock) //nolint SA1019 -} - -// ListenAndServeTLS acts identically to http.ListenAndServeTLS, except that it -// expects TLS configuration. -// TODO: refactor so this is testable? -func ListenAndServeTLS(addr string, handler nethttp.Handler, tlsConfig *tls.Config) error { - if addr == "" { - // On unix Listen calls getaddrinfo to parse the port, so named ports are fine as long - // as they exist in /etc/services - addr = ":https" - } - l, err := tls.Listen("tcp", addr, tlsConfig) - if err != nil { - return err - } - return nethttp.Serve(l, handler) -} diff --git a/go/vt/vtorc/ssl/ssl_test.go b/go/vt/vtorc/ssl/ssl_test.go deleted file mode 100644 index e7f8153d915..00000000000 --- a/go/vt/vtorc/ssl/ssl_test.go +++ /dev/null @@ -1,232 +0,0 @@ -package ssl_test - -import ( - "crypto/tls" - "os" - "reflect" - "strings" - "syscall" - "testing" - - "vitess.io/vitess/go/vt/vtorc/ssl" -) - -func TestHasString(t *testing.T) { - elem := "foo" - a1 := []string{"bar", "foo", "baz"} - a2 := []string{"bar", "fuu", "baz"} - good := ssl.HasString(elem, a1) - if !good { - t.Errorf("Didn't find %s in array %s", elem, strings.Join(a1, ", ")) - } - bad := ssl.HasString(elem, a2) - if bad { - t.Errorf("Unexpectedly found %s in array %s", elem, strings.Join(a2, ", ")) - } -} - -// TODO: Build a fake CA and make sure it loads up -func TestNewTLSConfig(t *testing.T) { - fakeCA := writeFakeFile(pemCertificate) - defer func() { - _ = syscall.Unlink(fakeCA) - }() - - conf, err := ssl.NewTLSConfig(fakeCA, true) - if err != nil { - t.Errorf("Could not create new TLS config: %s", err) - } - if conf.ClientAuth != tls.VerifyClientCertIfGiven { - t.Errorf("Client certificate verification was not enabled") - } - if conf.ClientCAs == nil { - t.Errorf("ClientCA empty even though cert provided") - } - - conf, err = ssl.NewTLSConfig("", false) - if err != nil { - t.Errorf("Could not create new TLS config: %s", err) - } - if conf.ClientAuth == tls.VerifyClientCertIfGiven { - t.Errorf("Client certificate verification was enabled unexpectedly") - } - if conf.ClientCAs != nil { - t.Errorf("Filling in ClientCA somehow without a cert") - } -} - -func TestReadPEMData(t *testing.T) { - pemCertFile := writeFakeFile(pemCertificate) - defer func() { - _ = syscall.Unlink(pemCertFile) - }() - pemPKFile := writeFakeFile(pemPrivateKey) - defer func() { - _ = syscall.Unlink(pemPKFile) - }() - pemPKWPFile := writeFakeFile(pemPrivateKeyWithPass) - defer func() { - _ = syscall.Unlink(pemPKWPFile) - }() - _, err := ssl.ReadPEMData(pemCertFile, []byte{}) - if err != nil { - t.Errorf("Failed to decode certificate: %s", err) - } - pemNoPassBytes, err := ssl.ReadPEMData(pemPKFile, []byte{}) - if err != nil { - t.Errorf("Failed to decode private key: %s", err) - } - pemPassBytes, err := ssl.ReadPEMData(pemPKWPFile, []byte("testing")) - if err != nil { - t.Errorf("Failed to decode private key with password: %s", err) - } - if reflect.DeepEqual(pemPassBytes, pemNoPassBytes) { - t.Errorf("PEM encoding failed after password removal") - } -} - -func TestAppendKeyPair(t *testing.T) { - c, err := ssl.NewTLSConfig("", false) - if err != nil { - t.Fatal(err) - } - pemCertFile := writeFakeFile(pemCertificate) - defer func() { - _ = syscall.Unlink(pemCertFile) - }() - pemPKFile := writeFakeFile(pemPrivateKey) - defer func() { - _ = syscall.Unlink(pemPKFile) - }() - - if err := ssl.AppendKeyPair(c, pemCertFile, pemPKFile); err != nil { - t.Errorf("Failed to append certificate and key to tls config: %s", err) - } -} - -func TestAppendKeyPairWithPassword(t *testing.T) { - c, err := ssl.NewTLSConfig("", false) - if err != nil { - t.Fatal(err) - } - pemCertFile := writeFakeFile(pemCertificate) - defer func() { - _ = syscall.Unlink(pemCertFile) - }() - pemPKFile := writeFakeFile(pemPrivateKeyWithPass) - defer func() { - _ = syscall.Unlink(pemPKFile) - }() - - if err := ssl.AppendKeyPairWithPassword(c, pemCertFile, pemPKFile, []byte("testing")); err != nil { - t.Errorf("Failed to append certificate and key to tls config: %s", err) - } -} - -func TestIsEncryptedPEM(t *testing.T) { - pemPKFile := writeFakeFile(pemPrivateKey) - defer func() { - _ = syscall.Unlink(pemPKFile) - }() - pemPKWPFile := writeFakeFile(pemPrivateKeyWithPass) - defer func() { - _ = syscall.Unlink(pemPKWPFile) - }() - if ssl.IsEncryptedPEM(pemPKFile) { - t.Errorf("Incorrectly identified unencrypted PEM as encrypted") - } - if !ssl.IsEncryptedPEM(pemPKWPFile) { - t.Errorf("Incorrectly identified encrypted PEM as unencrypted") - } -} - -func writeFakeFile(content string) string { - f, err := os.CreateTemp("", "ssl_test") - if err != nil { - return "" - } - _ = os.WriteFile(f.Name(), []byte(content), 0644) - return f.Name() -} - -const pemCertificate = `-----BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIJAOxKC7FsJelrMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTcwODEwMTQ0MjM3WhcNMTgwODEwMTQ0MjM3WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEA12vHV3gYy5zd1lujA7prEhCSkAszE6E37mViWhLQ63CuedZfyYaTAHQK -HYDZi4K1MNAySUfZRMcICSSsxlRIz6mzXrFsowaJgwx4cbMDIvXE03KstuXoTYJh -+xmXB+5yEVEtIyP2DvPqfCmwCZb3k94Y/VY1nAQDxIxciXrAxT9zT1oYd0YWr2yp -J2mgsfnY4c3zg7W5WgvOTmYz7Ey7GJjpUjGdayx+P1CilKzSWH1xZuVQFNLSHvcH -WXkEoCMVc0tW5mO5eEO1aNHo9MSjPF386l1rq+pz5OwjqCEZq2b1YxesyLnbF+8+ -iYGfYmFaDLFwG7zVDwialuI4TzIIOQIDAQABo4GnMIGkMB0GA1UdDgQWBBQ1ubGx -Yvn3wN5VXyoR0lOD7ARzVTB1BgNVHSMEbjBsgBQ1ubGxYvn3wN5VXyoR0lOD7ARz -VaFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV -BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOxKC7FsJelrMAwGA1UdEwQF -MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBALmm4Zw/4jLKDJciUGUYOcr5Xe9TP/Cs -afH7IWvaFUDfV3W6yAm9jgNfIy9aDLpuu2CdEb+0qL2hdmGLV7IM3y62Ve0UTdGV -BGsm1zMmIguew2wGbAwGr5LmIcUseatVUKAAAfDrBNwotEAdM8kmGekUZfOM+J9D -FoNQ62C0buRHGugtu6zWAcZNOe6CI7HdhaAdxZlgn8y7dfJQMacoK0NcWeUVQwii -6D4mgaqUGM2O+WcquD1vEMuBPYVcKhi43019E0+6LI5QB6w80bARY8K7tkTdRD7U -y1/C7iIqyuBVL45OdSabb37TfGlHZIPIwLaGw3i4Mr0+F0jQT8rZtTQ= ------END CERTIFICATE-----` - -const pemPrivateKey = `-----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA12vHV3gYy5zd1lujA7prEhCSkAszE6E37mViWhLQ63CuedZf -yYaTAHQKHYDZi4K1MNAySUfZRMcICSSsxlRIz6mzXrFsowaJgwx4cbMDIvXE03Ks -tuXoTYJh+xmXB+5yEVEtIyP2DvPqfCmwCZb3k94Y/VY1nAQDxIxciXrAxT9zT1oY -d0YWr2ypJ2mgsfnY4c3zg7W5WgvOTmYz7Ey7GJjpUjGdayx+P1CilKzSWH1xZuVQ -FNLSHvcHWXkEoCMVc0tW5mO5eEO1aNHo9MSjPF386l1rq+pz5OwjqCEZq2b1Yxes -yLnbF+8+iYGfYmFaDLFwG7zVDwialuI4TzIIOQIDAQABAoIBAHLf4pleTbqmmBWr -IC7oxhgIBmAR2Nbq7eyO2/e0ePxURnZqPwI0ZUekmZBKGbgvp3e0TlyNl+r5R+u4 -RvosD/fNQv2IF6qH3eSoTcIz98Q40xD+4eNWjp5mnOFOMB/mo6VgaHWIw7oNkElN -4bX7b2LG2QSfaE8eRPQW9XHKp+mGhYFbxgPYxUmlIXuYZF61hVwxysDA6DP3LOi8 -yUL6E64x6NqN9xtg/VoN+f6N0MOvsr4yb5+uvni1LVRFI7tNqIN4Y6P6trgKfnRR -EpZeAUu8scqyxE4NeqnnjK/wBuXxaeh3e9mN1V2SzT629c1InmmQasZ5slcCJQB+ -38cswgECgYEA+esaLKwHXT4+sOqMYemi7TrhxtNC2f5OAGUiSRVmTnum2gl4wOB+ -h5oLZAuG5nBEIoqbMEbI35vfuHqIe390IJtPdQlz4TGDsPufYj/gnnBBFy/c8f+n -f/CdRDRYrpnpKGwvUntLRB2pFbe2hlqqq+4YUqiHauJMOCJnPbOo1lECgYEA3KnF -VOXyY0fKD45G7ttfAcpw8ZI2gY99sCRwtBQGsbO61bvw5sl/3j7AmYosz+n6f7hb -uHmitIuPv4z3r1yfVysh80tTGIM3wDkpr3fLYRxpVOZU4hgxMQV9yyaSA/Hfqn48 -vIK/NC4bERqpofNNdrIqNaGWkd87ZycvpRfa0WkCgYBztbVVr4RtWG9gLAg5IRot -KhD0pEWUdpiYuDpqifznI3r6Al6lNot+rwTNGkUoFhyFvZTigjNozFuFpz3fqAAV -RLNCJdFAF1O4spd1vst5r9GDMcbjSJG9u6KkvHO+y0XXUFeMoccUT4NEqd1ZUUsp -9T/PrXWdOA9AAjW4rKDkMQKBgQC9R4NVR8mbD8Frhoeh69qbFqO7E8hdalBN/3QN -hAAZ/imNnSEPVliwsvNSwQufbPzLAcDrhKrkY7JyhOERM0oa44zDvSESLbxszpvL -P97c9hoEEW9OYaIQgr1cvUES0S8ieBZxPVX11HazPUO0/5a68ijyyCD4D5xM53gf -DU9NwQKBgQCmVthQi65xcc4mgCIwXtBZWXeaPv5x0dLEXIC5EoN6eXLK9iW//7cE -hhawtJtl+J6laB+TkEGQsyhc4v85WcywdisyR7LR7CUqFYJMKeE/VtTVKnYbfq54 -rHoQS9YotByBwPtRx0V93gkc+KWBOGmSBBxKj7lrBkYkcWAiRfpJjg== ------END RSA PRIVATE KEY-----` - -const pemPrivateKeyWithPass = `-----BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,3EABF60A784F9065 - -IDGYvdRJXvBt5vEDI9caEYJ2vvVmoqmxTKvheNX0aLSXUl/p8hIZ25kd/4mpmI3m -irQdEe2JuNh4/fPDe6Agg6mX6mYCVbiupfXdFKkqJzndW/O5nEQ4yuRgi0fO4wcH -OM/kTS8/7UaKfCuWFa71ywh1WeStFDBwsMQqLdFFeuQ/JC6g2tZW6xzCBE0BVIkq -6OWXmWumXMufhOdpb9sNoc3lbdOi037V886o0cIRQp4qPepElhhhplrhaJZBSxiP -TUldExbtYCN1APhrgUp1RpxIWHNLezjhUYLGooxb6SqinpLd9ia2uFotwNDeX7/T -dMPQPtgdFwvoCtWn9oVWp+regdZPacABLsvtTD4NS8h13BKzBmAqtYfHJk44u/Tv -6PcCb9xHI7+YpNJznrHiCtALWkfG56mDjp0SP+OKjsYMjo317D+x892i2XT79k2T -0IM0OUPizVkN5c7uDQBHqxmE9JVQT7QFMy1P57nWPsmG5o7e9Y/klaPQzi04FWEh -YAEZrU5/FQlFziu3/Jw6WwQnm3IqJP6iMlnR9Y5iZCZQnLhcJNIxxOJ/+cVH4dVD -jIHztasHgbfld045Ua7nk91VyFP5pWRPFacJ74D+xm/1IjF/+9Uj3NQX88Swig0Q -Fi7+eJ1XtCI0YdUqiUdp8QaS1GnFzibSIcXCbLLEn0Cgh/3CFXUyh92M4GIgvmcI -/hi4nUDa3nLYDHyOZubFLERb+Zr3EFzNXX4Ga3fcNH0deluxW4tda+QCk0ud6k9N -y2bCcAVnvbB+yX2s7CSVq+eaT/4JLIJY5AlrISRwYtG57SR/DN9HuU99dD30k581 -PmarIt4VAakjXo/Zqd1AMh+ofbC/Qm7jBwbPGPZAM/FjpnVsvaXsdChI19Az72v3 -wiLOKEw8M23vV4/E7QwW3Pp/RPyUZk6HAlBuLXbcyZHOOV4WPsKrI46BBXL8Qf4X -5kpRITFFUaFu3aaO7mloVAoneEKusKJgKOAwWifRI3jf6fH9B8qDA0jQpWRNpLs4 -3A2qrOyHQ9SMoBr7ya8Vs2BMdfqAmOyiUdVzLr2EjnRxa7f3/7/sdzD1aaIJa2TM -kjpKgFMq5B/FRVmuAvKyEF52A/b6L9EpinyB53DzWnIw9W5zdjjRkuxmGmv1R94A -gJvbONh955cinHft0rm0hdKo77wDvXZdX5ZeITjOwJ0d/VBHYDGUonDVgnAVLcz+ -n1BS+oOS1xLG/EJOGqtNYihVuCkbIwwdAVhc7pKo3nIbLyrKFKFyh/Br11PPBris -nlWo8BWSoFv7gKOftkulHJFAVekisaXe4OIcYMATeLvDfAnBDJrNHZn0HcyHI51L -3EhCCPJrrmfNv+QMdPk6LTts5YIdhNRSV5PR2X8ZshChod7atyrw+Wm+LCcy3h1G -xIVNracpnna+Ic5M8EIJZgLOH7IjDFS1EcPjz5em0rVqGGsLDvxmRo2ZJTPSHlpM -8q6VJEIso5sfoauf+fX+y7xk1CpFG8NkXSplbiYmZXdB1zepV1a/ZiW2uU7hEAV7 -oMEzoBEIw3wTuRasixjH7Z6i8PvF3eUKXCIt0UiwTmWdCCW37c5eqjguyp9aLDtc ------END RSA PRIVATE KEY-----` diff --git a/go/vt/vtorc/test/recovery_analysis.go b/go/vt/vtorc/test/recovery_analysis.go index cf030d62ce7..7585fa17441 100644 --- a/go/vt/vtorc/test/recovery_analysis.go +++ b/go/vt/vtorc/test/recovery_analysis.go @@ -46,7 +46,7 @@ type InfoForRecoveryAnalysis struct { Region string PhysicalEnvironment string LogFile string - LogPos int64 + LogPos uint32 IsStaleBinlogCoordinates int GTIDMode string LastCheckValid int diff --git a/go/vt/vttablet/endtoend/framework/eventcatcher.go b/go/vt/vttablet/endtoend/framework/eventcatcher.go index 253869df12a..6191a026193 100644 --- a/go/vt/vttablet/endtoend/framework/eventcatcher.go +++ b/go/vt/vttablet/endtoend/framework/eventcatcher.go @@ -21,82 +21,33 @@ import ( "time" "vitess.io/vitess/go/streamlog" - "vitess.io/vitess/go/vt/vttablet/tabletserver" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) -// TxCatcher allows you to capture and fetch transactions that are being -// executed by TabletServer. -type TxCatcher struct { - catcher *eventCatcher +func NewQueryCatcher() *EventCatcher[*tabletenv.LogStats] { + return NewEventCatcher(tabletenv.StatsLogger) } -// NewTxCatcher sets up the capture and returns a new TxCatcher. -// You must call Close when done. -func NewTxCatcher() TxCatcher { - return TxCatcher{catcher: newEventCatcher(tabletenv.TxLogger)} -} - -// Close closes the TxCatcher. -func (tc *TxCatcher) Close() { - tc.catcher.Close() -} - -// Next fetches the next captured transaction. -// If the wait is longer than one second, it returns an error. -func (tc *TxCatcher) Next() (*tabletserver.StatefulConnection, error) { - event, err := tc.catcher.next() - if err != nil { - return nil, err - } - return event.(*tabletserver.StatefulConnection), nil -} - -// QueryCatcher allows you to capture and fetch queries that are being -// executed by TabletServer. -type QueryCatcher struct { - catcher *eventCatcher -} - -// NewQueryCatcher sets up the capture and returns a QueryCatcher. -// You must call Close when done. -func NewQueryCatcher() QueryCatcher { - return QueryCatcher{catcher: newEventCatcher(tabletenv.StatsLogger)} -} - -// Close closes the QueryCatcher. -func (qc *QueryCatcher) Close() { - qc.catcher.Close() -} - -// Next fetches the next captured query. -// If the wait is longer than one second, it returns an error. -func (qc *QueryCatcher) Next() (*tabletenv.LogStats, error) { - event, err := qc.catcher.next() - if err != nil { - return nil, err - } - return event.(*tabletenv.LogStats), nil +type EventCatcher[T Event] struct { + start time.Time + logger *streamlog.StreamLogger[T] + in, out chan T } -type eventCatcher struct { - start time.Time - logger *streamlog.StreamLogger - in, out chan any +type Event interface { + EventTime() time.Time } -func newEventCatcher(logger *streamlog.StreamLogger) *eventCatcher { - catcher := &eventCatcher{ +func NewEventCatcher[T Event](logger *streamlog.StreamLogger[T]) *EventCatcher[T] { + catcher := &EventCatcher[T]{ start: time.Now(), logger: logger, in: logger.Subscribe("endtoend"), - out: make(chan any, 20), + out: make(chan T, 20), } go func() { for event := range catcher.in { - endTime := event.(interface { - EventTime() time.Time - }).EventTime() + endTime := event.EventTime() if endTime.Before(catcher.start) { continue } @@ -107,13 +58,13 @@ func newEventCatcher(logger *streamlog.StreamLogger) *eventCatcher { return catcher } -// Close closes the eventCatcher. -func (catcher *eventCatcher) Close() { +// Close closes the EventCatcher. +func (catcher *EventCatcher[T]) Close() { catcher.logger.Unsubscribe(catcher.in) close(catcher.in) } -func (catcher *eventCatcher) next() (any, error) { +func (catcher *EventCatcher[T]) Next() (T, error) { tmr := time.NewTimer(5 * time.Second) defer tmr.Stop() for { @@ -121,7 +72,8 @@ func (catcher *eventCatcher) next() (any, error) { case event := <-catcher.out: return event, nil case <-tmr.C: - return nil, errors.New("error waiting for query event") + var zero T + return zero, errors.New("error waiting for query event") } } } diff --git a/go/vt/vttablet/endtoend/framework/livequeryz.go b/go/vt/vttablet/endtoend/framework/livequeryz.go index a13574c5f53..36ca0f64920 100644 --- a/go/vt/vttablet/endtoend/framework/livequeryz.go +++ b/go/vt/vttablet/endtoend/framework/livequeryz.go @@ -30,7 +30,7 @@ type LiveQuery struct { ContextHTML string Start time.Time Duration int64 - ConnID int + ConnID int64 State string ShowTerminateLink bool } @@ -49,7 +49,7 @@ func LiveQueryz() []LiveQuery { } // StreamTerminate terminates the specified streaming query. -func StreamTerminate(connID int) error { +func StreamTerminate(connID int64) error { response, err := http.Get(fmt.Sprintf("%s/livequeryz/terminate?format=json&connID=%d", ServerAddress, connID)) if err != nil { return err diff --git a/go/vt/vttablet/endtoend/misc_test.go b/go/vt/vttablet/endtoend/misc_test.go index 913af99fc4f..de8c98c98f6 100644 --- a/go/vt/vttablet/endtoend/misc_test.go +++ b/go/vt/vttablet/endtoend/misc_test.go @@ -471,6 +471,7 @@ func TestQueryStats(t *testing.T) { compareIntDiff(t, vend, "QueryCounts/vitess_a.Select", vstart, 2) compareIntDiff(t, vend, "QueryRowsReturned/vitess_a.Select", vstart, 2) compareIntDiff(t, vend, "QueryErrorCounts/vitess_a.Select", vstart, 1) + compareIntDiff(t, vend, "QueryErrorCountsWithCode/vitess_a.Select.UNKNOWN", vstart, 1) query = "update /* query_stats */ vitess_a set name = 'a'" _, _ = client.Execute(query, bv) diff --git a/go/vt/vttablet/faketmclient/fake_client.go b/go/vt/vttablet/faketmclient/fake_client.go index 98a65ecc91e..6df153c855a 100644 --- a/go/vt/vttablet/faketmclient/fake_client.go +++ b/go/vt/vttablet/faketmclient/fake_client.go @@ -62,6 +62,10 @@ type FakeTabletManagerClient struct { tmc tmclient.TabletManagerClient } +func (client *FakeTabletManagerClient) UpdateVRWorkflow(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) { + return nil, nil +} + func (client *FakeTabletManagerClient) VDiff(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error) { return nil, nil } @@ -244,16 +248,6 @@ func (client *FakeTabletManagerClient) WaitForPosition(ctx context.Context, tabl return nil } -// VExec is part of the tmclient.TabletManagerClient interface. -func (client *FakeTabletManagerClient) VExec(ctx context.Context, tablet *topodatapb.Tablet, query, workflow, keyspace string) (*querypb.QueryResult, error) { - // This result satisfies a generic VExec command - result := sqltypes.MakeTestResult( - sqltypes.MakeTestFields("id", "int"), - "complete", - ) - return sqltypes.ResultToProto3(result), nil -} - // VReplicationExec is part of the tmclient.TabletManagerClient interface. func (client *FakeTabletManagerClient) VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error) { // This result satisfies 'select pos from _vt.vreplication...' called from split clone unit tests in go/vt/worker. @@ -265,7 +259,7 @@ func (client *FakeTabletManagerClient) VReplicationExec(ctx context.Context, tab } // VReplicationWaitForPos is part of the tmclient.TabletManagerClient interface. -func (client *FakeTabletManagerClient) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error { +func (client *FakeTabletManagerClient) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int32, pos string) error { return nil } diff --git a/go/vt/vttablet/filelogger/filelogger.go b/go/vt/vttablet/filelogger/filelogger.go index 5054be481c0..f2fcd84e476 100644 --- a/go/vt/vttablet/filelogger/filelogger.go +++ b/go/vt/vttablet/filelogger/filelogger.go @@ -51,7 +51,7 @@ type FileLogger interface { } type fileLogger struct { - logChan chan any + logChan chan *tabletenv.LogStats } func (l *fileLogger) Stop() { diff --git a/go/vt/vttablet/grpctmclient/client.go b/go/vt/vttablet/grpctmclient/client.go index 2670215bb85..1899c82179c 100644 --- a/go/vt/vttablet/grpctmclient/client.go +++ b/go/vt/vttablet/grpctmclient/client.go @@ -679,20 +679,6 @@ func (client *Client) GetReplicas(ctx context.Context, tablet *topodatapb.Tablet return response.Addrs, nil } -// VExec is part of the tmclient.TabletManagerClient interface. -func (client *Client) VExec(ctx context.Context, tablet *topodatapb.Tablet, query, workflow, keyspace string) (*querypb.QueryResult, error) { - c, closer, err := client.dialer.dial(ctx, tablet) - if err != nil { - return nil, err - } - defer closer.Close() - response, err := c.VExec(ctx, &tabletmanagerdatapb.VExecRequest{Query: query, Workflow: workflow, Keyspace: keyspace}) - if err != nil { - return nil, err - } - return response.Result, nil -} - // VReplicationExec is part of the tmclient.TabletManagerClient interface. func (client *Client) VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error) { c, closer, err := client.dialer.dial(ctx, tablet) @@ -708,18 +694,31 @@ func (client *Client) VReplicationExec(ctx context.Context, tablet *topodatapb.T } // VReplicationWaitForPos is part of the tmclient.TabletManagerClient interface. -func (client *Client) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error { +func (client *Client) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int32, pos string) error { c, closer, err := client.dialer.dial(ctx, tablet) if err != nil { return err } defer closer.Close() - if _, err = c.VReplicationWaitForPos(ctx, &tabletmanagerdatapb.VReplicationWaitForPosRequest{Id: int64(id), Position: pos}); err != nil { + if _, err = c.VReplicationWaitForPos(ctx, &tabletmanagerdatapb.VReplicationWaitForPosRequest{Id: id, Position: pos}); err != nil { return err } return nil } +func (client *Client) UpdateVRWorkflow(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) { + c, closer, err := client.dialer.dial(ctx, tablet) + if err != nil { + return nil, err + } + defer closer.Close() + response, err := c.UpdateVRWorkflow(ctx, request) + if err != nil { + return nil, err + } + return response, nil +} + // VDiff is part of the tmclient.TabletManagerClient interface. func (client *Client) VDiff(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error) { log.Infof("VDiff for tablet %s, request %+v", tablet.Alias.String(), req) diff --git a/go/vt/vttablet/grpctmserver/server.go b/go/vt/vttablet/grpctmserver/server.go index a60f3e4a76c..5f12a5caf24 100644 --- a/go/vt/vttablet/grpctmserver/server.go +++ b/go/vt/vttablet/grpctmserver/server.go @@ -17,13 +17,12 @@ limitations under the License. package grpctmserver import ( + "context" "time" "vitess.io/vitess/go/vt/callerid" querypb "vitess.io/vitess/go/vt/proto/query" - "context" - "google.golang.org/grpc" "vitess.io/vitess/go/vt/callinfo" @@ -344,14 +343,6 @@ func (s *server) GetReplicas(ctx context.Context, request *tabletmanagerdatapb.G return response, err } -func (s *server) VExec(ctx context.Context, request *tabletmanagerdatapb.VExecRequest) (response *tabletmanagerdatapb.VExecResponse, err error) { - defer s.tm.HandleRPCPanic(ctx, "VExec", request, response, true /*verbose*/, &err) - ctx = callinfo.GRPCCallInfo(ctx) - response = &tabletmanagerdatapb.VExecResponse{} - response.Result, err = s.tm.VExec(ctx, request.Query, request.Workflow, request.Keyspace) - return response, err -} - func (s *server) VReplicationExec(ctx context.Context, request *tabletmanagerdatapb.VReplicationExecRequest) (response *tabletmanagerdatapb.VReplicationExecResponse, err error) { defer s.tm.HandleRPCPanic(ctx, "VReplicationExec", request, response, true /*verbose*/, &err) ctx = callinfo.GRPCCallInfo(ctx) @@ -363,10 +354,17 @@ func (s *server) VReplicationExec(ctx context.Context, request *tabletmanagerdat func (s *server) VReplicationWaitForPos(ctx context.Context, request *tabletmanagerdatapb.VReplicationWaitForPosRequest) (response *tabletmanagerdatapb.VReplicationWaitForPosResponse, err error) { defer s.tm.HandleRPCPanic(ctx, "VReplicationWaitForPos", request, response, true /*verbose*/, &err) ctx = callinfo.GRPCCallInfo(ctx) - err = s.tm.VReplicationWaitForPos(ctx, int(request.Id), request.Position) + err = s.tm.VReplicationWaitForPos(ctx, request.Id, request.Position) return &tabletmanagerdatapb.VReplicationWaitForPosResponse{}, err } +func (s *server) UpdateVRWorkflow(ctx context.Context, request *tabletmanagerdatapb.UpdateVRWorkflowRequest) (response *tabletmanagerdatapb.UpdateVRWorkflowResponse, err error) { + defer s.tm.HandleRPCPanic(ctx, "UpdateVRWorkflow", request, response, true /*verbose*/, &err) + ctx = callinfo.GRPCCallInfo(ctx) + response = &tabletmanagerdatapb.UpdateVRWorkflowResponse{} + return s.tm.UpdateVRWorkflow(ctx, request) +} + func (s *server) VDiff(ctx context.Context, request *tabletmanagerdatapb.VDiffRequest) (response *tabletmanagerdatapb.VDiffResponse, err error) { defer s.tm.HandleRPCPanic(ctx, "VDiff", request, response, true /*verbose*/, &err) ctx = callinfo.GRPCCallInfo(ctx) diff --git a/go/vt/vttablet/onlineddl/executor.go b/go/vt/vttablet/onlineddl/executor.go index 2ff89f713c4..048b4e7ce62 100644 --- a/go/vt/vttablet/onlineddl/executor.go +++ b/go/vt/vttablet/onlineddl/executor.go @@ -64,7 +64,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" "vitess.io/vitess/go/vt/vttablet/tmclient" - "vitess.io/vitess/go/vt/vttablet/vexec" ) var ( @@ -76,33 +75,8 @@ var ( ErrMigrationNotFound = errors.New("migration not found") ) -var vexecUpdateTemplates = []string{ - `update _vt.schema_migrations set migration_status='val1' where mysql_schema='val2'`, - `update _vt.schema_migrations set migration_status='val1' where migration_uuid='val2' and mysql_schema='val3'`, - `update _vt.schema_migrations set migration_status='val1' where migration_uuid='val2' and mysql_schema='val3' and shard='val4'`, -} - -var vexecInsertTemplates = []string{ - `INSERT IGNORE INTO _vt.schema_migrations ( - migration_uuid, - keyspace, - shard, - mysql_schema, - mysql_table, - migration_statement, - strategy, - options, - ddl_action, - requested_timestamp, - migration_context, - migration_status - ) VALUES ( - 'val1', 'val2', 'val3', 'val4', 'val5', 'val6', 'val7', 'val8', 'val9', FROM_UNIXTIME(0), 'vala', 'valb' - )`, -} - var emptyResult = &sqltypes.Result{} -var acceptableDropTableIfExistsErrorCodes = []int{mysql.ERCantFindFile, mysql.ERNoSuchTable} +var acceptableDropTableIfExistsErrorCodes = []mysql.ErrorCode{mysql.ERCantFindFile, mysql.ERNoSuchTable} var copyAlgorithm = sqlparser.AlgorithmValue(sqlparser.CopyStr) var ( @@ -353,10 +327,6 @@ func (e *Executor) Open() error { e.ticks.Start(e.onMigrationCheckTick) e.triggerNextCheckInterval() - if _, err := sqlparser.QueryMatchesTemplates("select 1 from dual", vexecUpdateTemplates); err != nil { - // this validates vexecUpdateTemplates - return err - } atomic.StoreInt64(&e.isOpen, 1) return nil @@ -543,10 +513,10 @@ func (e *Executor) readMySQLVariables(ctx context.Context) (variables *mysqlVari if e.env.Config().DB.Port != 0 { variables.port = e.env.Config().DB.Port - } else if port, err := row.ToInt64("port"); err != nil { + } else if port, err := row.ToInt("port"); err != nil { return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "could not parse @@global.port %v: %v", tm, err) } else { - variables.port = int(port) + variables.port = port } if variables.readOnly, err = row.ToBool("read_only"); err != nil { return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "could not parse @@global.read_only %v: %v", tm, err) @@ -640,7 +610,7 @@ func (e *Executor) parseAlterOptions(ctx context.Context, onlineDDL *schema.Onli } // executeDirectly runs a DDL query directly on the backend MySQL server -func (e *Executor) executeDirectly(ctx context.Context, onlineDDL *schema.OnlineDDL, acceptableMySQLErrorCodes ...int) (acceptableErrorCodeFound bool, err error) { +func (e *Executor) executeDirectly(ctx context.Context, onlineDDL *schema.OnlineDDL, acceptableMySQLErrorCodes ...mysql.ErrorCode) (acceptableErrorCodeFound bool, err error) { conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaWithDB()) if err != nil { return false, err @@ -809,7 +779,7 @@ func (e *Executor) cutOverVReplMigration(ctx context.Context, s *VReplStream) er ctx, cancel := context.WithTimeout(ctx, vreplicationCutOverThreshold) defer cancel() // Wait for target to reach the up-to-date pos - if err := tmClient.VReplicationWaitForPos(ctx, tablet.Tablet, int(s.id), mysql.EncodePosition(pos)); err != nil { + if err := tmClient.VReplicationWaitForPos(ctx, tablet.Tablet, s.id, mysql.EncodePosition(pos)); err != nil { return err } // Target is now in sync with source! @@ -817,7 +787,7 @@ func (e *Executor) cutOverVReplMigration(ctx context.Context, s *VReplStream) er } if !isVreplicationTestSuite { - // A bit early on, we generate names for stowaway and temporary tables + // A bit early on, we generate a name for the sentry table // We do this here because right now we're in a safe place where nothing happened yet. If there's an error now, bail out // and no harm done. // Later on, when traffic is blocked and tables renamed, that's a more dangerous place to be in; we want as little logic @@ -1013,7 +983,7 @@ func (e *Executor) cutOverVReplMigration(ctx context.Context, s *VReplStream) er go log.Infof("cutOverVReplMigration %v: done waiting for position %v", s.workflow, mysql.EncodePosition(postWritesPos)) // Stop vreplication e.updateMigrationStage(ctx, onlineDDL.UUID, "stopping vreplication") - if _, err := e.vreplicationExec(ctx, tablet.Tablet, binlogplayer.StopVReplication(uint32(s.id), "stopped for online DDL cutover")); err != nil { + if _, err := e.vreplicationExec(ctx, tablet.Tablet, binlogplayer.StopVReplication(s.id, "stopped for online DDL cutover")); err != nil { return err } go log.Infof("cutOverVReplMigration %v: stopped vreplication", s.workflow) @@ -2469,33 +2439,8 @@ func (e *Executor) executeRevert(ctx context.Context, onlineDDL *schema.OnlineDD if err := e.validateMigrationRevertible(ctx, revertMigration, onlineDDL.UUID); err != nil { return err } - revertedActionStr := row["ddl_action"].ToString() - if onlineDDL.Table == "" { - // table name should be populated by reviewQueuedMigrations - // but this was a newly added functionality. To be backwards compatible, - // we double check here, and populate table name and ddl_action. - - // TODO: remove in v14 - mimickedActionStr := "" - - switch revertedActionStr { - case sqlparser.CreateStr: - mimickedActionStr = sqlparser.DropStr - case sqlparser.DropStr: - mimickedActionStr = sqlparser.CreateStr - case sqlparser.AlterStr: - mimickedActionStr = sqlparser.AlterStr - default: - return fmt.Errorf("cannot run migration %s reverting %s: unexpected action %s", onlineDDL.UUID, revertMigration.UUID, revertedActionStr) - } - if err := e.updateDDLAction(ctx, onlineDDL.UUID, mimickedActionStr); err != nil { - return err - } - if err := e.updateMySQLTable(ctx, onlineDDL.UUID, revertMigration.Table); err != nil { - return err - } - } + revertedActionStr := row["ddl_action"].ToString() switch revertedActionStr { case sqlparser.CreateStr: { @@ -2734,7 +2679,7 @@ func (e *Executor) executeDropDDLActionMigration(ctx context.Context, onlineDDL return err } - acceptableErrorCodes := []int{} + acceptableErrorCodes := []mysql.ErrorCode{} if ddlStmt.GetIfExists() { acceptableErrorCodes = acceptableDropTableIfExistsErrorCodes } @@ -3392,7 +3337,7 @@ func (e *Executor) readVReplStream(ctx context.Context, uuid string, okIfMissing return nil, vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "Cannot find unique workflow for UUID: %+v", uuid) } s := &VReplStream{ - id: row.AsInt64("id", 0), + id: row.AsInt32("id", 0), workflow: row.AsString("workflow", ""), source: row.AsString("source", ""), pos: row.AsString("pos", ""), @@ -3445,7 +3390,7 @@ func (e *Executor) isVReplMigrationReadyToCutOver(ctx context.Context, s *VReplS // copy_state must have no entries for this vreplication id: if entries are // present that means copy is still in progress query, err := sqlparser.ParseAndBind(sqlReadCountCopyState, - sqltypes.Int64BindVariable(s.id), + sqltypes.Int32BindVariable(s.id), ) if err != nil { return false, err @@ -3529,30 +3474,6 @@ func (e *Executor) reviewRunningMigrations(ctx context.Context) (countRunnning i postponeCompletion := row.AsBool("postpone_completion", false) elapsedSeconds := row.AsInt64("elapsed_seconds", 0) - if stowawayTable := row.AsString("stowaway_table", ""); stowawayTable != "" { - // whoa - // stowawayTable is an original table stowed away while cutting over a vrepl migration, see call to cutOverVReplMigration() down below in this function. - // In a normal operation, the table should not exist outside the scope of cutOverVReplMigration - // If it exists, that means a tablet crashed while running a cut-over, and left the database in a bad state, where the migrated table does not exist. - // thankfully, we have tracked this situation and just realized what happened. Now, first thing to do is to restore the original table. - log.Infof("found stowaway table %s journal in migration %s for table %s", stowawayTable, uuid, onlineDDL.Table) - attemptMade, err := e.renameTableIfApplicable(ctx, stowawayTable, onlineDDL.Table) - if err != nil { - // unable to restore table; we bail out, and we will try again next round. - return countRunnning, cancellable, err - } - // success - if attemptMade { - log.Infof("stowaway table %s restored back into %s", stowawayTable, onlineDDL.Table) - } else { - log.Infof("stowaway table %s did not exist and there was no need to restore it", stowawayTable) - } - // OK good, table restored. We can remove the record. - if err := e.updateMigrationStowawayTable(ctx, uuid, ""); err != nil { - return countRunnning, cancellable, err - } - } - uuidsFoundRunning[uuid] = true _ = e.updateMigrationUserThrottleRatio(ctx, uuid, currentUserThrottleRatio) @@ -3862,13 +3783,6 @@ func (e *Executor) gcArtifacts(ctx context.Context) error { e.migrationMutex.Lock() defer e.migrationMutex.Unlock() - if _, err := e.execQuery(ctx, sqlFixCompletedTimestamp); err != nil { - // This query fixes a bug where stale migrations were marked as 'failed' without updating 'completed_timestamp' - // see https://github.com/vitessio/vitess/issues/8499 - // Running this query retroactively sets completed_timestamp - // This 'if' clause can be removed in version v13 - return err - } query, err := sqlparser.ParseAndBind(sqlSelectUncollectedArtifacts, sqltypes.Int64BindVariable(int64((retainOnlineDDLTables).Seconds())), ) @@ -4390,18 +4304,6 @@ func (e *Executor) updateMigrationReadyToComplete(ctx context.Context, uuid stri return nil } -func (e *Executor) updateMigrationStowawayTable(ctx context.Context, uuid string, tableName string) error { - query, err := sqlparser.ParseAndBind(sqlUpdateMigrationStowawayTable, - sqltypes.StringBindVariable(tableName), - sqltypes.StringBindVariable(uuid), - ) - if err != nil { - return err - } - _, err = e.execQuery(ctx, query) - return err -} - func (e *Executor) updateMigrationUserThrottleRatio(ctx context.Context, uuid string, ratio float64) error { query, err := sqlparser.ParseAndBind(sqlUpdateMigrationUserThrottleRatio, sqltypes.Float64BindVariable(ratio), @@ -4782,6 +4684,7 @@ func (e *Executor) SubmitMigration( ) if err != nil { return nil, vterrors.Wrapf(err, "submitting migration %v", onlineDDL.UUID) + } log.Infof("SubmitMigration: migration %s submitted", onlineDDL.UUID) @@ -4902,88 +4805,3 @@ func (e *Executor) OnSchemaMigrationStatus(ctx context.Context, return e.onSchemaMigrationStatus(ctx, uuidParam, status, dryRun, progressPct, etaSeconds, rowsCopied, hint) } - -// VExec is called by a VExec invocation -// Implements vitess.io/vitess/go/vt/vttablet/vexec.Executor interface -func (e *Executor) VExec(ctx context.Context, vx *vexec.TabletVExec) (qr *querypb.QueryResult, err error) { - response := func(result *sqltypes.Result, err error) (*querypb.QueryResult, error) { - if err != nil { - return nil, err - } - return sqltypes.ResultToProto3(result), nil - } - - switch stmt := vx.Stmt.(type) { - case *sqlparser.Delete: - return nil, fmt.Errorf("DELETE statements not supported for this table. query=%s", vx.Query) - case *sqlparser.Select: - return response(e.execQuery(ctx, vx.Query)) - case *sqlparser.Insert: - match, err := sqlparser.QueryMatchesTemplates(vx.Query, vexecInsertTemplates) - if err != nil { - return nil, err - } - if !match { - return nil, fmt.Errorf("Query must match one of these templates: %s", strings.Join(vexecInsertTemplates, "; ")) - } - // Vexec naturally runs outside shard/schema context. It does not supply values for those columns. - // We can fill them in. - vx.ReplaceInsertColumnVal("shard", vx.ToStringVal(e.shard)) - vx.ReplaceInsertColumnVal("mysql_schema", vx.ToStringVal(e.dbName)) - vx.AddOrReplaceInsertColumnVal("tablet", vx.ToStringVal(e.TabletAliasString())) - e.triggerNextCheckInterval() - return response(e.execQuery(ctx, vx.Query)) - case *sqlparser.Update: - match, err := sqlparser.QueryMatchesTemplates(vx.Query, vexecUpdateTemplates) - if err != nil { - return nil, err - } - if !match { - return nil, fmt.Errorf("Query must match one of these templates: %s; query=%s", strings.Join(vexecUpdateTemplates, "; "), vx.Query) - } - if shard, _ := vx.ColumnStringVal(vx.WhereCols, "shard"); shard != "" { - // shard is specified. - if shard != e.shard { - // specified shard is not _this_ shard. So we're skipping this UPDATE - return sqltypes.ResultToProto3(emptyResult), nil - } - } - statusVal, err := vx.ColumnStringVal(vx.UpdateCols, "migration_status") - if err != nil { - return nil, err - } - switch statusVal { - case retryMigrationHint: - return response(e.retryMigrationWhere(ctx, sqlparser.String(stmt.Where.Expr))) - case completeMigrationHint: - uuid, err := vx.ColumnStringVal(vx.WhereCols, "migration_uuid") - if err != nil { - return nil, err - } - if !schema.IsOnlineDDLUUID(uuid) { - return nil, fmt.Errorf("Not an Online DDL UUID: %s", uuid) - } - return response(e.CompleteMigration(ctx, uuid)) - case cancelMigrationHint: - uuid, err := vx.ColumnStringVal(vx.WhereCols, "migration_uuid") - if err != nil { - return nil, err - } - if !schema.IsOnlineDDLUUID(uuid) { - return nil, fmt.Errorf("Not an Online DDL UUID: %s", uuid) - } - return response(e.CancelMigration(ctx, uuid, "cancel by user", true)) - case cancelAllMigrationHint: - uuid, _ := vx.ColumnStringVal(vx.WhereCols, "migration_uuid") - if uuid != "" { - return nil, fmt.Errorf("Unexpetced UUID: %s", uuid) - } - return response(e.CancelPendingMigrations(ctx, "cancel-all by user", true)) - default: - return nil, fmt.Errorf("Unexpected value for migration_status: %v. Supported values are: %s, %s", - statusVal, retryMigrationHint, cancelMigrationHint) - } - default: - return nil, fmt.Errorf("No handler for this query: %s", vx.Query) - } -} diff --git a/go/vt/vttablet/onlineddl/executor_test.go b/go/vt/vttablet/onlineddl/executor_test.go index 2cf94be2d20..fc375d5ce09 100644 --- a/go/vt/vttablet/onlineddl/executor_test.go +++ b/go/vt/vttablet/onlineddl/executor_test.go @@ -31,26 +31,6 @@ import ( "vitess.io/vitess/go/vt/sqlparser" ) -func TestVexecUpdateTemplates(t *testing.T) { - { - match, err := sqlparser.QueryMatchesTemplates("select 1 from dual", vexecUpdateTemplates) - assert.NoError(t, err) - assert.False(t, match) - } - queries := []string{ - `update _vt.schema_migrations set migration_status='cancel-all' where mysql_schema='vt_commerce'`, - `update _vt.schema_migrations set migration_status = 'cancel-all' where migration_uuid='a5a563da_dc1a_11ec_a416_0a43f95f28a3' and mysql_schema = 'vt_commerce'`, - `update _vt.schema_migrations set migration_status = 'cancel-all' where migration_uuid='a5a563da_dc1a_11ec_a416_0a43f95f28a3' and mysql_schema = 'vt_commerce' and shard='0'`, - } - for _, query := range queries { - t.Run(query, func(t *testing.T) { - match, err := sqlparser.QueryMatchesTemplates(query, vexecUpdateTemplates) - assert.NoError(t, err) - assert.True(t, match) - }) - } -} - func TestGetConstraintType(t *testing.T) { { typ := GetConstraintType(&sqlparser.CheckConstraintDefinition{}) @@ -82,8 +62,22 @@ func TestValidateAndEditCreateTableStatement(t *testing.T) { constraint test_fk foreign key (parent_id) references onlineddl_test_parent (id) on delete no action ) `, + strategyOptions: "--unsafe-allow-foreign-keys", + countConstraints: 1, + }, + { + name: "table with anonymous FK, allowed", + query: ` + create table onlineddl_test ( + id int auto_increment, + i int not null, + parent_id int not null, + primary key(id), + foreign key (parent_id) references onlineddl_test_parent (id) on delete no action + ) + `, + strategyOptions: "--unsafe-allow-foreign-keys", countConstraints: 1, - expectError: schema.ErrForeignKeyFound.Error(), }, { name: "table with FK, allowed", diff --git a/go/vt/vttablet/onlineddl/schema.go b/go/vt/vttablet/onlineddl/schema.go index 350c1ed9796..05a9d3fb502 100644 --- a/go/vt/vttablet/onlineddl/schema.go +++ b/go/vt/vttablet/onlineddl/schema.go @@ -106,11 +106,6 @@ const ( WHERE migration_uuid=%a ` - sqlUpdateMigrationStowawayTable = `UPDATE _vt.schema_migrations - SET stowaway_table=%a - WHERE - migration_uuid=%a - ` sqlUpdateMigrationUserThrottleRatio = `UPDATE _vt.schema_migrations SET user_throttle_ratio=%a WHERE @@ -289,7 +284,6 @@ const ( sqlSelectRunningMigrations = `SELECT migration_uuid, postpone_completion, - stowaway_table, timestampdiff(second, started_timestamp, now()) as elapsed_seconds FROM _vt.schema_migrations WHERE @@ -401,7 +395,6 @@ const ( ready_to_complete, ready_to_complete_timestamp is not null as was_ready_to_complete, reverted_uuid, - stowaway_table, rows_copied, vitess_liveness_indicator, user_throttle_ratio, diff --git a/go/vt/vttablet/onlineddl/vrepl.go b/go/vt/vttablet/onlineddl/vrepl.go index 9b7f20411ed..9fe5a68f5d8 100644 --- a/go/vt/vttablet/onlineddl/vrepl.go +++ b/go/vt/vttablet/onlineddl/vrepl.go @@ -47,7 +47,7 @@ import ( // VReplStream represents a row in _vt.vreplication table type VReplStream struct { - id int64 + id int32 workflow string source string pos string @@ -567,7 +567,7 @@ func (v *VRepl) analyze(ctx context.Context, conn *dbconnpool.DBConnection) erro func (v *VRepl) generateInsertStatement(ctx context.Context) (string, error) { ig := vreplication.NewInsertGenerator(binlogplayer.BlpStopped, v.dbName) ig.AddRow(v.workflow, v.bls, v.pos, "", "in_order:REPLICA,PRIMARY", - int64(binlogdatapb.VReplicationWorkflowType_OnlineDDL), int64(binlogdatapb.VReplicationWorkflowSubType_None), false) + binlogdatapb.VReplicationWorkflowType_OnlineDDL, binlogdatapb.VReplicationWorkflowSubType_None, false) return ig.String(), nil } diff --git a/go/vt/vttablet/sysloglogger/sysloglogger.go b/go/vt/vttablet/sysloglogger/sysloglogger.go index b934ec6f498..e56d47bd902 100644 --- a/go/vt/vttablet/sysloglogger/sysloglogger.go +++ b/go/vt/vttablet/sysloglogger/sysloglogger.go @@ -38,7 +38,7 @@ type syslogWriter interface { var writer syslogWriter // ch holds the tabletserver.StatsLogger channel to which this plugin subscribes (or a mock when under test). -var ch chan any +var ch chan *tabletenv.LogStats var logQueries bool @@ -76,12 +76,7 @@ func run() { } formatParams := map[string][]string{"full": {}} - for out := range ch { - stats, ok := out.(*tabletenv.LogStats) - if !ok { - log.Errorf("Unexpected value in query logs: %#v (expecting value of type %T)", out, &tabletenv.LogStats{}) - continue - } + for stats := range ch { var b bytes.Buffer if err := stats.Logf(&b, formatParams); err != nil { log.Errorf("Error formatting logStats: %v", err) diff --git a/go/vt/vttablet/sysloglogger/sysloglogger_test.go b/go/vt/vttablet/sysloglogger/sysloglogger_test.go index 6fbee654915..c62a4396ac6 100644 --- a/go/vt/vttablet/sysloglogger/sysloglogger_test.go +++ b/go/vt/vttablet/sysloglogger/sysloglogger_test.go @@ -17,6 +17,7 @@ limitations under the License. package sysloglogger import ( + "context" "errors" "fmt" "log/syslog" @@ -25,8 +26,6 @@ import ( "testing" "time" - "context" - "vitess.io/vitess/go/streamlog" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) @@ -101,7 +100,7 @@ func TestSyslog(t *testing.T) { // Overwrite the usual syslog writer and StatsLogger subscription channel with mocks mock := newFakeWriter() writer = mock - ch = make(chan any, 10) + ch = make(chan *tabletenv.LogStats, 10) // Start running the plugin loop syncChannel := make(chan bool) @@ -147,7 +146,7 @@ func TestSyslogRedacted(t *testing.T) { }() mock := newFakeWriter() writer = mock - ch = make(chan any, 10) + ch = make(chan *tabletenv.LogStats, 10) // Start running the plugin loop syncChannel := make(chan bool) @@ -188,7 +187,7 @@ func TestSyslogRedacted(t *testing.T) { func TestSyslogWithBadData(t *testing.T) { mock := newFakeWriter() writer = mock - ch = make(chan any, 10) + ch = make(chan *tabletenv.LogStats, 10) syncChannel := make(chan bool) go func() { @@ -200,7 +199,6 @@ func TestSyslogWithBadData(t *testing.T) { ch <- mockLogStats("select 1") ch <- mockLogStats("select 2") ch <- mockLogStats("select 3") - ch <- "Wait... this is just a garbage 'string', not of type '*tabletserver.LogStats'!" ch <- mockLogStats("select 5") close(ch) <-syncChannel @@ -231,7 +229,7 @@ func TestSyslogWithInterruptedConnection(t *testing.T) { // This mock will simulate a broken syslog connection when processing every 4th record mock := newFailingFakeWriter() writer = mock - ch = make(chan any, 10) + ch = make(chan *tabletenv.LogStats, 10) syncChannel := make(chan bool) go func() { diff --git a/go/vt/vttablet/tabletmanager/restore.go b/go/vt/vttablet/tabletmanager/restore.go index 1d49a30c7fa..afd0f5c0365 100644 --- a/go/vt/vttablet/tabletmanager/restore.go +++ b/go/vt/vttablet/tabletmanager/restore.go @@ -187,9 +187,9 @@ func (tm *TabletManager) restoreDataLocked(ctx context.Context, logger logutil.L DbName: topoproto.TabletDbName(tablet), Keyspace: keyspace, Shard: tablet.Shard, - Stats: backupstats.RestoreStats(), StartTime: logutil.ProtoToTime(request.BackupTime), DryRun: request.DryRun, + Stats: backupstats.RestoreStats(), } if request.RestoreToPos != "" { pos, err := mysql.DecodePosition(request.RestoreToPos) diff --git a/go/vt/vttablet/tabletmanager/rpc_agent.go b/go/vt/vttablet/tabletmanager/rpc_agent.go index 8be7f47c6af..a3fb4ba6be7 100644 --- a/go/vt/vttablet/tabletmanager/rpc_agent.go +++ b/go/vt/vttablet/tabletmanager/rpc_agent.go @@ -96,12 +96,10 @@ type RPCTM interface { WaitForPosition(ctx context.Context, pos string) error - // VExec generic API - VExec(ctx context.Context, query, workflow, keyspace string) (*querypb.QueryResult, error) - // VReplication API VReplicationExec(ctx context.Context, query string) (*querypb.QueryResult, error) - VReplicationWaitForPos(ctx context.Context, id int, pos string) error + VReplicationWaitForPos(ctx context.Context, id int32, pos string) error + UpdateVRWorkflow(ctx context.Context, req *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) // VDiff API VDiff(ctx context.Context, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error) diff --git a/go/vt/vttablet/tabletmanager/rpc_replication.go b/go/vt/vttablet/tabletmanager/rpc_replication.go index 47d49309972..445e8d94c8b 100644 --- a/go/vt/vttablet/tabletmanager/rpc_replication.go +++ b/go/vt/vttablet/tabletmanager/rpc_replication.go @@ -19,7 +19,6 @@ package tabletmanager import ( "context" "fmt" - "strconv" "strings" "time" @@ -38,11 +37,11 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) -var setSuperReadOnly bool var disableReplicationManager bool func registerReplicationFlags(fs *pflag.FlagSet) { - fs.BoolVar(&setSuperReadOnly, "use_super_read_only", setSuperReadOnly, "Set super_read_only flag when performing planned failover.") + fs.Bool("use_super_read_only", true, "Set super_read_only flag when performing planned failover.") + fs.MarkDeprecated("use_super_read_only", "From v17 onwards MySQL server will always try to start with super_read_only=ON") fs.BoolVar(&disableReplicationManager, "disable-replication-manager", disableReplicationManager, "Disable replication manager to prevent replication repairs.") fs.MarkDeprecated("disable-replication-manager", "Replication manager is deleted") } @@ -113,6 +112,12 @@ func (tm *TabletManager) FullStatus(ctx context.Context) (*replicationdatapb.Ful return nil, err } + // superReadOnly - "SELECT @@global.super_read_only" + superReadOnly, err := tm.MysqlDaemon.IsSuperReadOnly() + if err != nil { + return nil, err + } + // Binlog Information - "select @@global.binlog_format, @@global.log_bin, @@global.log_slave_updates, @@global.binlog_row_image" binlogFormat, logBin, logReplicaUpdates, binlogRowImage, err := tm.MysqlDaemon.GetBinlogInformation(ctx) if err != nil { @@ -158,6 +163,7 @@ func (tm *TabletManager) FullStatus(ctx context.Context) (*replicationdatapb.Ful SemiSyncPrimaryClients: semiSyncClients, SemiSyncPrimaryTimeout: semiSyncTimeout, SemiSyncWaitForReplicaCount: semiSyncNumReplicas, + SuperReadOnly: superReadOnly, }, nil } @@ -298,14 +304,12 @@ func (tm *TabletManager) InitPrimary(ctx context.Context, semiSync bool) (string } defer tm.unlock() - if setSuperReadOnly { - // Setting super_read_only off so that we can run the DDL commands - if err := tm.MysqlDaemon.SetSuperReadOnly(false); err != nil { - if strings.Contains(err.Error(), strconv.Itoa(mysql.ERUnknownSystemVariable)) { - log.Warningf("server does not know about super_read_only, continuing anyway...") - } else { - return "", err - } + // Setting super_read_only `OFF` so that we can run the DDL commands + if _, err := tm.MysqlDaemon.SetSuperReadOnly(false); err != nil { + if sqlErr, ok := err.(*mysql.SQLError); ok && sqlErr.Number() == mysql.ERUnknownSystemVariable { + log.Warningf("server does not know about super_read_only, continuing anyway...") + } else { + return "", err } } @@ -392,7 +396,7 @@ func (tm *TabletManager) InitReplica(ctx context.Context, parent *topodatapb.Tab if err := tm.MysqlDaemon.SetReplicationPosition(ctx, pos); err != nil { return err } - if err := tm.MysqlDaemon.SetReplicationSource(ctx, ti.Tablet.MysqlHostname, int(ti.Tablet.MysqlPort), false /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { + if err := tm.MysqlDaemon.SetReplicationSource(ctx, ti.Tablet.MysqlHostname, ti.Tablet.MysqlPort, false /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { return err } @@ -464,23 +468,17 @@ func (tm *TabletManager) demotePrimary(ctx context.Context, revertPartialFailure } // Now that we know no writes are in-flight and no new writes can occur, - // set MySQL to read-only mode. If we are already read-only because of a + // set MySQL to super_read_only mode. If we are already super_read_only because of a // previous demotion, or because we are not primary anyway, this should be // idempotent. - if setSuperReadOnly { - // Setting super_read_only also sets read_only - if err := tm.MysqlDaemon.SetSuperReadOnly(true); err != nil { - if strings.Contains(err.Error(), strconv.Itoa(mysql.ERUnknownSystemVariable)) { - log.Warningf("server does not know about super_read_only, continuing anyway...") - } else { - return nil, err - } - } - } else { - if err := tm.MysqlDaemon.SetReadOnly(true); err != nil { + if _, err := tm.MysqlDaemon.SetSuperReadOnly(true); err != nil { + if sqlErr, ok := err.(*mysql.SQLError); ok && sqlErr.Number() == mysql.ERUnknownSystemVariable { + log.Warningf("server does not know about super_read_only, continuing anyway...") + } else { return nil, err } } + defer func() { if finalErr != nil && revertPartialFailure && !wasReadOnly { // setting read_only OFF will also set super_read_only OFF if it was set @@ -673,7 +671,7 @@ func (tm *TabletManager) setReplicationSourceLocked(ctx context.Context, parentA return err } host := parent.Tablet.MysqlHostname - port := int(parent.Tablet.MysqlPort) + port := parent.Tablet.MysqlPort // We want to reset the replication parameters and set replication source again when forceStartReplication is provided // because sometimes MySQL gets stuck due to improper initialization of master info structure or related failures and throws errors like // ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log diff --git a/go/vt/vttablet/tabletmanager/rpc_vexec.go b/go/vt/vttablet/tabletmanager/rpc_vexec.go deleted file mode 100644 index 8783230c696..00000000000 --- a/go/vt/vttablet/tabletmanager/rpc_vexec.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package tabletmanager - -import ( - "fmt" - - querypb "vitess.io/vitess/go/vt/proto/query" - "vitess.io/vitess/go/vt/schema" - "vitess.io/vitess/go/vt/vttablet/vexec" - - "context" -) - -// VExec executes a generic VExec command. -func (tm *TabletManager) VExec(ctx context.Context, query, workflow, keyspace string) (*querypb.QueryResult, error) { - vx := vexec.NewTabletVExec(workflow, keyspace) - if err := vx.AnalyzeQuery(ctx, query); err != nil { - return nil, err - } - switch vx.TableName { - case fmt.Sprintf("%s.%s", vexec.TableQualifier, schema.SchemaMigrationsTableName): - return tm.QueryServiceControl.OnlineDDLExecutor().VExec(ctx, vx) - default: - return nil, fmt.Errorf("table not supported by vexec: %v", vx.TableName) - } -} diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication.go b/go/vt/vttablet/tabletmanager/rpc_vreplication.go index 669540e636b..c6f2e8c5f3c 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication.go @@ -18,14 +18,27 @@ package tabletmanager import ( "context" + "strings" + + "google.golang.org/protobuf/encoding/prototext" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/textutil" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/sidecardb" "vitess.io/vitess/go/vt/sqlparser" ) +const ( + // Retrieve the current configuration values for a workflow's vreplication stream. + sqlSelectVRWorkflowConfig = "select id, source, cell, tablet_types from %s.vreplication where workflow = %a" + // Update the configuration values for a workflow's vreplication stream. + sqlUpdateVRWorkflowConfig = "update %s.vreplication set source = %a, cell = %a, tablet_types = %a where id = %a" +) + // VReplicationExec executes a vreplication command. func (tm *TabletManager) VReplicationExec(ctx context.Context, query string) (*querypb.QueryResult, error) { // Replace any provided sidecar databsae qualifiers with the correct one. @@ -41,6 +54,82 @@ func (tm *TabletManager) VReplicationExec(ctx context.Context, query string) (*q } // VReplicationWaitForPos waits for the specified position. -func (tm *TabletManager) VReplicationWaitForPos(ctx context.Context, id int, pos string) error { +func (tm *TabletManager) VReplicationWaitForPos(ctx context.Context, id int32, pos string) error { return tm.VREngine.WaitForPos(ctx, id, pos) } + +// UpdateVRWorkflow updates the sidecar databases's vreplication +// record for this tablet's vreplication workflow stream(s). If there +// is no stream for the given workflow on the tablet then a nil result +// is returned as this is expected e.g. on source tablets of a +// Reshard workflow (source and target are the same keyspace). The +// caller can consider this case an error if they choose to. +// Note: the VReplication engine creates a new controller for the +// workflow stream when the record is updated, so we also in effect +// restart the workflow stream via the update. +func (tm *TabletManager) UpdateVRWorkflow(ctx context.Context, req *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) { + bindVars := map[string]*querypb.BindVariable{ + "wf": sqltypes.StringBindVariable(req.Workflow), + } + parsed := sqlparser.BuildParsedQuery(sqlSelectVRWorkflowConfig, sidecardb.GetIdentifier(), ":wf") + stmt, err := parsed.GenerateQuery(bindVars, nil) + if err != nil { + return nil, err + } + res, err := tm.VREngine.Exec(stmt) + if err != nil { + return nil, err + } + if res == nil || len(res.Rows) == 0 { + // No streams on this tablet to update. This is + // expected e.g. on source tablets for Reshard + // workflows. If callers want to treat this + // scenario as an error they can. + return &tabletmanagerdatapb.UpdateVRWorkflowResponse{Result: nil}, nil + } + + row := res.Named().Row() + id := row.AsInt64("id", 0) + cells := strings.Split(row.AsString("cell", ""), ",") + tabletTypes := strings.Split(row.AsString("tablet_types", ""), ",") + bls := &binlogdatapb.BinlogSource{} + source := row.AsBytes("source", []byte{}) + // For the string based values, we use NULL to differentiate + // from an empty string. The NULL value indicates that we + // should keep the existing value. + if !textutil.ValueIsSimulatedNull(req.Cells) { + cells = req.Cells + } + if !textutil.ValueIsSimulatedNull(req.TabletTypes) { + tabletTypes = req.TabletTypes + } + if err = prototext.Unmarshal(source, bls); err != nil { + return nil, err + } + // If we don't want to update the existing value then pass + // the simulated NULL value of -1. + if !textutil.ValueIsSimulatedNull(req.OnDdl) { + bls.OnDdl = req.OnDdl + } + source, err = prototext.Marshal(bls) + if err != nil { + return nil, err + } + bindVars = map[string]*querypb.BindVariable{ + "sc": sqltypes.StringBindVariable(string(source)), + "cl": sqltypes.StringBindVariable(strings.Join(cells, ",")), + "tt": sqltypes.StringBindVariable(strings.Join(tabletTypes, ",")), + "id": sqltypes.Int64BindVariable(id), + } + parsed = sqlparser.BuildParsedQuery(sqlUpdateVRWorkflowConfig, sidecardb.GetIdentifier(), ":sc", ":cl", ":tt", ":id") + stmt, err = parsed.GenerateQuery(bindVars, nil) + if err != nil { + return nil, err + } + res, err = tm.VREngine.Exec(stmt) + + if err != nil { + return nil, err + } + return &tabletmanagerdatapb.UpdateVRWorkflowResponse{Result: sqltypes.ResultToProto3(res)}, nil +} diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go new file mode 100644 index 00000000000..f7f680f10ad --- /dev/null +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -0,0 +1,196 @@ +/* +Copyright 2023 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tabletmanager + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/mysql/fakesqldb" + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/textutil" + "vitess.io/vitess/go/vt/binlog/binlogplayer" + "vitess.io/vitess/go/vt/dbconfigs" + "vitess.io/vitess/go/vt/mysqlctl" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + querypb "vitess.io/vitess/go/vt/proto/query" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" + "vitess.io/vitess/go/vt/sidecardb" + "vitess.io/vitess/go/vt/sqlparser" + "vitess.io/vitess/go/vt/topo/memorytopo" + "vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication" + "vitess.io/vitess/go/vt/vttablet/tabletservermock" +) + +func TestUpdateVRWorkflow(t *testing.T) { + ctx := context.Background() + cells := []string{"zone1"} + tabletTypes := []string{"replica"} + workflow := "testwf" + dbName := "test" + vreplID := 1 + shortCircuitErr := fmt.Errorf("short circuiting test") + cp := mysql.ConnParams{} + db := fakesqldb.New(t) + ts := memorytopo.NewServer(cells[0]) + mysqld := mysqlctl.NewFakeMysqlDaemon(db) + dbClient := binlogplayer.NewMockDBClient(t) + dbClientFactory := func() binlogplayer.DBClient { return dbClient } + // Intentionally using Sprintf here as the query matching is exact + // and the engine uses `db_name=` w/o any spacing and the parser + // will add spacing. + dbClient.ExpectRequest(fmt.Sprintf("select * from _vt.vreplication where db_name='%s'", dbName), + &sqltypes.Result{}, nil) + vre := vreplication.NewSimpleTestEngine(ts, cells[0], mysqld, dbClientFactory, dbClientFactory, dbName, nil) + vre.Open(context.Background()) + tm := &TabletManager{ + MysqlDaemon: mysqld, + DBConfigs: dbconfigs.NewTestDBConfigs(cp, cp, dbName), + QueryServiceControl: tabletservermock.NewController(), + VREngine: vre, + } + defer func() { + vre.Close() + dbClient.Close() + mysqld.Close() + db.Close() + }() + parsed := sqlparser.BuildParsedQuery(sqlSelectVRWorkflowConfig, sidecardb.DefaultName, ":wf") + bindVars := map[string]*querypb.BindVariable{ + "wf": sqltypes.StringBindVariable(workflow), + } + selectQuery, err := parsed.GenerateQuery(bindVars, nil) + require.NoError(t, err) + blsStr := fmt.Sprintf(`keyspace:"%s" shard:"%s" filter:{rules:{match:"customer" filter:"select * from customer"} rules:{match:"corder" filter:"select * from corder"}}`, + keyspace, shard) + selectRes := sqltypes.MakeTestResult( + sqltypes.MakeTestFields( + "id|source|cell|tablet_types", + "int64|varchar|varchar|varchar", + ), + fmt.Sprintf("%d|%s|%s|%s", vreplID, blsStr, cells[0], tabletTypes[0]), + ) + idQuery, err := sqlparser.ParseAndBind("select id from _vt.vreplication where id = %a", + sqltypes.Int64BindVariable(int64(vreplID))) + require.NoError(t, err) + idRes := sqltypes.MakeTestResult( + sqltypes.MakeTestFields( + "id", + "int64", + ), + fmt.Sprintf("%d", vreplID), + ) + + tests := []struct { + name string + request *tabletmanagerdatapb.UpdateVRWorkflowRequest + query string + }{ + { + name: "update cells", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + Cells: []string{"zone2"}, + // TabletTypes is an empty value, so the current value should be cleared + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}}', cell = '%s', tablet_types = '' where id in (%d)`, + keyspace, shard, "zone2", vreplID), + }, + { + name: "update cells, NULL tablet_types", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + Cells: []string{"zone3"}, + TabletTypes: textutil.SimulatedNullStringSlice, // So keep the current value of replica + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}}', cell = '%s', tablet_types = '%s' where id in (%d)`, + keyspace, shard, "zone3", tabletTypes[0], vreplID), + }, + { + name: "update tablet_types", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + TabletTypes: []string{"in_order:rdonly", "replica"}, + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}}', cell = '', tablet_types = '%s' where id in (%d)`, + keyspace, shard, "in_order:rdonly,replica", vreplID), + }, + { + name: "update tablet_types, NULL cells", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + Cells: textutil.SimulatedNullStringSlice, // So keep the current value of zone1 + TabletTypes: []string{"rdonly"}, + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}}', cell = '%s', tablet_types = '%s' where id in (%d)`, + keyspace, shard, cells[0], "rdonly", vreplID), + }, + { + name: "update on_ddl", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + OnDdl: binlogdatapb.OnDDLAction_EXEC, + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}} on_ddl:%s', cell = '', tablet_types = '' where id in (%d)`, + keyspace, shard, binlogdatapb.OnDDLAction_name[int32(binlogdatapb.OnDDLAction_EXEC)], vreplID), + }, + { + name: "update cell,tablet_types,on_ddl", + request: &tabletmanagerdatapb.UpdateVRWorkflowRequest{ + Workflow: workflow, + Cells: []string{"zone1", "zone2", "zone3"}, + TabletTypes: []string{"rdonly", "replica", "primary"}, + OnDdl: binlogdatapb.OnDDLAction_EXEC_IGNORE, + }, + query: fmt.Sprintf(`update _vt.vreplication set source = 'keyspace:\"%s\" shard:\"%s\" filter:{rules:{match:\"customer\" filter:\"select * from customer\"} rules:{match:\"corder\" filter:\"select * from corder\"}} on_ddl:%s', cell = '%s', tablet_types = '%s' where id in (%d)`, + keyspace, shard, binlogdatapb.OnDDLAction_name[int32(binlogdatapb.OnDDLAction_EXEC_IGNORE)], "zone1,zone2,zone3", "rdonly,replica,primary", vreplID), + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // This is needed because MockDBClient uses t.Fatal() + // which doesn't play well with subtests. + defer func() { + if err := recover(); err != nil { + t.Errorf("Recovered from panic: %v", err) + } + }() + + require.NotNil(t, tt.request, "No request provided") + require.NotEqual(t, "", tt.query, "No expected query provided") + + // These are the same for each RPC call. + dbClient.ExpectRequest(fmt.Sprintf("use %s", sidecardb.DefaultName), &sqltypes.Result{}, nil) + dbClient.ExpectRequest(selectQuery, selectRes, nil) + dbClient.ExpectRequest(fmt.Sprintf("use %s", sidecardb.DefaultName), &sqltypes.Result{}, nil) + dbClient.ExpectRequest(idQuery, idRes, nil) + + // This is our expected query, which will also short circuit + // the test with an error as at this point we've tested what + // we wanted to test. + dbClient.ExpectRequest(tt.query, &sqltypes.Result{RowsAffected: 1}, shortCircuitErr) + _, err = tm.UpdateVRWorkflow(ctx, tt.request) + dbClient.Wait() + require.ErrorIs(t, err, shortCircuitErr) + }) + } +} diff --git a/go/vt/vttablet/tabletmanager/tm_init.go b/go/vt/vttablet/tabletmanager/tm_init.go index bab572c1eb3..429c4658af4 100644 --- a/go/vt/vttablet/tabletmanager/tm_init.go +++ b/go/vt/vttablet/tabletmanager/tm_init.go @@ -45,11 +45,11 @@ import ( "github.com/spf13/pflag" "golang.org/x/sync/semaphore" - "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/flagutil" "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/netutil" + "vitess.io/vitess/go/sets" "vitess.io/vitess/go/stats" "vitess.io/vitess/go/vt/binlog" "vitess.io/vitess/go/vt/dbconfigs" @@ -97,7 +97,6 @@ func registerInitFlags(fs *pflag.FlagSet) { fs.StringVar(&initDbNameOverride, "init_db_name_override", initDbNameOverride, "(init parameter) override the name of the db used by vttablet. Without this flag, the db name defaults to vt_") fs.StringVar(&skipBuildInfoTags, "vttablet_skip_buildinfo_tags", skipBuildInfoTags, "comma-separated list of buildinfo tags to skip from merging with --init_tags. each tag is either an exact match or a regular expression of the form '/regexp/'.") fs.Var(&initTags, "init_tags", "(init parameter) comma separated list of key:value pairs used to tag the tablet") - fs.BoolVar(&initPopulateMetadata, "init_populate_metadata", initPopulateMetadata, "(init parameter) populate metadata tables even if restore_from_backup is disabled. If restore_from_backup is enabled, metadata tables are always populated regardless of this flag.") fs.MarkDeprecated("init_populate_metadata", "this flag is no longer being used and will be removed in future versions") fs.DurationVar(&initTimeout, "init_timeout", initTimeout, "(init parameter) timeout to use for the init phase.") @@ -920,7 +919,7 @@ func (tm *TabletManager) initializeReplication(ctx context.Context, tabletType t log.Warningf("primary tablet in the shard record does not have mysql hostname specified, possibly because that tablet has been shut down.") return nil, nil } - if err := tm.MysqlDaemon.SetReplicationSource(ctx, currentPrimary.Tablet.MysqlHostname, int(currentPrimary.Tablet.MysqlPort), false /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { + if err := tm.MysqlDaemon.SetReplicationSource(ctx, currentPrimary.Tablet.MysqlHostname, currentPrimary.Tablet.MysqlPort, true /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { return nil, vterrors.Wrap(err, "MysqlDaemon.SetReplicationSource failed") } diff --git a/go/vt/vttablet/tabletmanager/tm_init_test.go b/go/vt/vttablet/tabletmanager/tm_init_test.go index ec772312417..9842ace18a6 100644 --- a/go/vt/vttablet/tabletmanager/tm_init_test.go +++ b/go/vt/vttablet/tabletmanager/tm_init_test.go @@ -382,6 +382,7 @@ func TestCheckPrimaryShip(t *testing.T) { fakeMysql := tm.MysqlDaemon.(*mysqlctl.FakeMysqlDaemon) fakeMysql.SetReplicationSourceInputs = append(fakeMysql.SetReplicationSourceInputs, fmt.Sprintf("%v:%v", otherTablet.MysqlHostname, otherTablet.MysqlPort)) fakeMysql.ExpectedExecuteSuperQueryList = []string{ + "STOP SLAVE", "RESET SLAVE ALL", "FAKE SET MASTER", "START SLAVE", diff --git a/go/vt/vttablet/tabletmanager/vdiff/controller.go b/go/vt/vttablet/tabletmanager/vdiff/controller.go index 86d5c8b1822..8edc4b333e4 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/controller.go +++ b/go/vt/vttablet/tabletmanager/vdiff/controller.go @@ -148,7 +148,7 @@ func (ct *controller) run(ctx context.Context) { type migrationSource struct { *shardStreamer - vrID int64 + vrID int32 position mysql.Position } @@ -203,7 +203,7 @@ func (ct *controller) start(ctx context.Context, dbClient binlogplayer.DBClient) return err } source.shard = bls.Shard - source.vrID, _ = row["id"].ToInt64() + source.vrID, _ = row["id"].ToInt32() ct.sourceTimeZone = bls.SourceTimeZone ct.targetTimeZone = bls.TargetTimeZone diff --git a/go/vt/vttablet/tabletmanager/vdiff/framework_test.go b/go/vt/vttablet/tabletmanager/vdiff/framework_test.go index 5889720648b..bb173c41abc 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/framework_test.go +++ b/go/vt/vttablet/tabletmanager/vdiff/framework_test.go @@ -457,7 +457,7 @@ func (tmc *fakeTMClient) WaitForPosition(ctx context.Context, tablet *topodatapb return nil } -func (tmc *fakeTMClient) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error { +func (tmc *fakeTMClient) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int32, pos string) error { select { case <-ctx.Done(): return ctx.Err() diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go index f3aa73aaee3..19985f1226e 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_differ.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_differ.go @@ -285,7 +285,7 @@ func (td *tableDiffer) syncTargetStreams(ctx context.Context) error { if _, err := ct.tmc.VReplicationExec(waitCtx, ct.vde.thisTablet, query); err != nil { return err } - if err := ct.vde.vre.WaitForPos(waitCtx, int(source.vrID), source.snapshotPosition); err != nil { + if err := ct.vde.vre.WaitForPos(waitCtx, source.vrID, source.snapshotPosition); err != nil { log.Errorf("WaitForPosition error: %d: %s", source.vrID, err) return vterrors.Wrapf(err, "WaitForPosition for stream id %d", source.vrID) } diff --git a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go index 64993c4eabd..a672de61e0d 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/table_plan.go +++ b/go/vt/vttablet/tabletmanager/vdiff/table_plan.go @@ -26,6 +26,7 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) type tablePlan struct { @@ -99,7 +100,7 @@ func (td *tableDiffer) buildTablePlan() (*tablePlan, error) { // but will need to be revisited when we add such support to vreplication aggregateFuncType := "sum" aggregates = append(aggregates, &engine.AggregateParams{ - Opcode: engine.SupportedAggregates[aggregateFuncType], + Opcode: opcode.SupportedAggregates[aggregateFuncType], Col: len(sourceSelect.SelectExprs) - 1, }) } diff --git a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ.go b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ.go index 35236b50d79..618a26fde3f 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ.go +++ b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ.go @@ -236,7 +236,7 @@ func (wd *workflowDiffer) buildPlan(dbClient binlogplayer.DBClient, filter *binl buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v", sqlparser.NewIdentifierCS(table.Name)) sourceQuery = buf.String() - case key.IsKeyRange(rule.Filter): + case key.IsValidKeyRange(rule.Filter): buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v where in_keyrange(%v)", sqlparser.NewIdentifierCS(table.Name), sqlparser.NewStrLiteral(rule.Filter)) sourceQuery = buf.String() diff --git a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go index 0f9ad9305ed..27581b6b134 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go +++ b/go/vt/vttablet/tabletmanager/vdiff/workflow_differ_test.go @@ -33,6 +33,7 @@ import ( tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtgate/engine" + "vitess.io/vitess/go/vt/vtgate/engine/opcode" ) func TestBuildPlanSuccess(t *testing.T) { @@ -418,10 +419,10 @@ func TestBuildPlanSuccess(t *testing.T) { Direction: sqlparser.AscOrder, }}, aggregates: []*engine.AggregateParams{{ - Opcode: engine.AggregateSum, + Opcode: opcode.AggregateSum, Col: 2, }, { - Opcode: engine.AggregateSum, + Opcode: opcode.AggregateSum, Col: 3, }}, }, diff --git a/go/vt/vttablet/tabletmanager/vreplication/controller.go b/go/vt/vttablet/tabletmanager/vreplication/controller.go index c0d6b199884..e3b29d3c643 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/controller.go +++ b/go/vt/vttablet/tabletmanager/vreplication/controller.go @@ -17,6 +17,7 @@ limitations under the License. package vreplication import ( + "context" "fmt" "strconv" "strings" @@ -28,8 +29,6 @@ import ( "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/vterrors" - "context" - "vitess.io/vitess/go/tb" "vitess.io/vitess/go/vt/binlog/binlogplayer" "vitess.io/vitess/go/vt/log" @@ -56,7 +55,7 @@ type controller struct { mysqld mysqlctl.MysqlDaemon blpStats *binlogplayer.Stats - id uint32 + id int32 workflow string source *binlogdatapb.BinlogSource stopPos string @@ -90,11 +89,11 @@ func newController(ctx context.Context, params map[string]string, dbClientFactor log.Infof("creating controller with cell: %v, tabletTypes: %v, and params: %v", cell, tabletTypesStr, params) // id - id, err := strconv.Atoi(params["id"]) + id, err := strconv.ParseInt(params["id"], 10, 32) if err != nil { return nil, err } - ct.id = uint32(id) + ct.id = int32(id) ct.workflow = params["workflow"] ct.lastWorkflowError = vterrors.NewLastError(fmt.Sprintf("VReplication controller %d for workflow %q", ct.id, ct.workflow), maxTimeToRetryError) diff --git a/go/vt/vttablet/tabletmanager/vreplication/controller_test.go b/go/vt/vttablet/tabletmanager/vreplication/controller_test.go index f039d7e8c71..8ced99f07d0 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/controller_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/controller_test.go @@ -170,7 +170,7 @@ func TestControllerBadID(t *testing.T) { "id": "bad", } _, err := newController(context.Background(), params, nil, nil, nil, "", "", nil, nil) - want := `strconv.Atoi: parsing "bad": invalid syntax` + want := `strconv.ParseInt: parsing "bad": invalid syntax` if err == nil || err.Error() != want { t.Errorf("newController err: %v, want %v", err, want) } diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine.go b/go/vt/vttablet/tabletmanager/vreplication/engine.go index 81e07f1abde..49c2f257956 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "math" "sort" "strconv" "sync" @@ -40,7 +41,6 @@ import ( "vitess.io/vitess/go/vt/sidecardb" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vterrors" - "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle" ) @@ -86,7 +86,7 @@ type Engine struct { // Invoking the function guarantees that there will be // no more retries. cancelRetry context.CancelFunc - controllers map[int]*controller + controllers map[int32]*controller // wg is used by in-flight functions that can run for long periods. wg sync.WaitGroup @@ -116,7 +116,7 @@ type Engine struct { type journalEvent struct { journal *binlogdatapb.Journal - participants map[string]int + participants map[string]int32 shardGTIDs map[string]*binlogdatapb.ShardGtid } @@ -130,7 +130,7 @@ type PostCopyAction struct { // A nil ts means that the Engine is disabled. func NewEngine(config *tabletenv.TabletConfig, ts *topo.Server, cell string, mysqld mysqlctl.MysqlDaemon, lagThrottler *throttle.Throttler) *Engine { vre := &Engine{ - controllers: make(map[int]*controller), + controllers: make(map[int32]*controller), ts: ts, cell: cell, mysqld: mysqld, @@ -160,7 +160,7 @@ func (vre *Engine) InitDBConfig(dbcfgs *dbconfigs.DBConfigs) { // NewTestEngine creates a new Engine for testing. func NewTestEngine(ts *topo.Server, cell string, mysqld mysqlctl.MysqlDaemon, dbClientFactoryFiltered func() binlogplayer.DBClient, dbClientFactoryDba func() binlogplayer.DBClient, dbname string, externalConfig map[string]*dbconfigs.DBConfigs) *Engine { vre := &Engine{ - controllers: make(map[int]*controller), + controllers: make(map[int32]*controller), ts: ts, cell: cell, mysqld: mysqld, @@ -177,7 +177,7 @@ func NewTestEngine(ts *topo.Server, cell string, mysqld mysqlctl.MysqlDaemon, db // also short curcuit functions as needed. func NewSimpleTestEngine(ts *topo.Server, cell string, mysqld mysqlctl.MysqlDaemon, dbClientFactoryFiltered func() binlogplayer.DBClient, dbClientFactoryDba func() binlogplayer.DBClient, dbname string, externalConfig map[string]*dbconfigs.DBConfigs) *Engine { vre := &Engine{ - controllers: make(map[int]*controller), + controllers: make(map[int32]*controller), ts: ts, cell: cell, mysqld: mysqld, @@ -280,7 +280,7 @@ func (vre *Engine) initControllers(rows []map[string]string) { log.Errorf("Controller could not be initialized for stream: %v", row) continue } - vre.controllers[int(ct.id)] = ct + vre.controllers[ct.id] = ct } } @@ -314,7 +314,7 @@ func (vre *Engine) Close() { for _, ct := range vre.controllers { ct.Stop() } - vre.controllers = make(map[int]*controller) + vre.controllers = make(map[int32]*controller) // Wait for long-running functions to exit. vre.wg.Wait() @@ -392,8 +392,27 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) if qr.InsertID == 0 { return nil, fmt.Errorf("insert failed to generate an id") } + maxInsert := qr.InsertID + uint64(plan.numInserts) + if maxInsert > math.MaxInt32 { + return nil, fmt.Errorf("insert id %v out of range", qr.InsertID) + } + vdbc := newVDBClient(dbClient, binlogplayer.NewStats()) - for id := int(qr.InsertID); id < int(qr.InsertID)+plan.numInserts; id++ { + + // If we are creating multiple streams, for example in a + // merge workflow going from 2 shards to 1 shard, we + // will be inserting multiple rows. To get the ids of + // subsequent streams we need to know what the + // auto_increment_increment step is. In a multi-primary + // environment, like a Galera cluster, for example, + // we will often encounter auto_increment steps > 1. + autoIncrementStep, err := vre.getAutoIncrementStep(dbClient) + if err != nil { + return nil, err + } + firstID := int32(qr.InsertID) + lastID := firstID + int32(autoIncrementStep)*(int32(plan.numInserts)-1) + for id := firstID; id <= lastID; id += int32(autoIncrementStep) { if ct := vre.controllers[id]; ct != nil { // Unreachable. Just a failsafe. ct.Stop() @@ -408,7 +427,7 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) return nil, err } vre.controllers[id] = ct - if err := insertLogWithParams(vdbc, LogStreamCreate, uint32(id), params); err != nil { + if err := insertLogWithParams(vdbc, LogStreamCreate, id, params); err != nil { return nil, err } } @@ -421,7 +440,7 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) if len(ids) == 0 { return &sqltypes.Result{}, nil } - blpStats := make(map[int]*binlogplayer.Stats) + blpStats := make(map[int32]*binlogplayer.Stats) for _, id := range ids { if ct := vre.controllers[id]; ct != nil { // Stop the current controller. @@ -450,7 +469,7 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) return nil, err } vre.controllers[id] = ct - if err := insertLog(vdbc, LogStateChange, uint32(id), params["state"], ""); err != nil { + if err := insertLog(vdbc, LogStateChange, id, params["state"], ""); err != nil { return nil, err } } @@ -470,7 +489,7 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) ct.Stop() delete(vre.controllers, id) } - if err := insertLogWithParams(vdbc, LogStreamDelete, uint32(id), nil); err != nil { + if err := insertLogWithParams(vdbc, LogStreamDelete, id, nil); err != nil { return nil, err } } @@ -512,17 +531,17 @@ func (vre *Engine) exec(query string, runAsAdmin bool) (*sqltypes.Result, error) panic("unreachable") } -func (vre *Engine) fetchIDs(dbClient binlogplayer.DBClient, selector string) (ids []int, bv map[string]*querypb.BindVariable, err error) { +func (vre *Engine) fetchIDs(dbClient binlogplayer.DBClient, selector string) (ids []int32, bv map[string]*querypb.BindVariable, err error) { qr, err := dbClient.ExecuteFetch(selector, 10000) if err != nil { return nil, nil, err } for _, row := range qr.Rows { - id, err := evalengine.ToInt64(row[0]) + id, err := row[0].ToInt32() if err != nil { return nil, nil, err } - ids = append(ids, int(id)) + ids = append(ids, id) } bvval, err := sqltypes.BuildBindVariable(ids) if err != nil { @@ -544,7 +563,7 @@ func (vre *Engine) fetchIDs(dbClient binlogplayer.DBClient, selector string) (id // all current participant streams and creates new ones to replace them. // A unified journal event is identified by the workflow name and journal id. // Multiple independent journal events can go through this cycle concurrently. -func (vre *Engine) registerJournal(journal *binlogdatapb.Journal, id int) error { +func (vre *Engine) registerJournal(journal *binlogdatapb.Journal, id int32) error { vre.mu.Lock() defer vre.mu.Unlock() if !vre.isOpen { @@ -561,7 +580,7 @@ func (vre *Engine) registerJournal(journal *binlogdatapb.Journal, id int) error log.Infof("First stream for workflow %s has joined, creating journaler entry", workflow) je = &journalEvent{ journal: journal, - participants: make(map[string]int), + participants: make(map[string]int32), shardGTIDs: make(map[string]*binlogdatapb.ShardGtid), } vre.journaler[key] = je @@ -634,7 +653,7 @@ func (vre *Engine) transitionJournal(je *journalEvent) { // Wait for participating controllers to stop. // Also collect one id reference. - refid := 0 + var refid int32 for id := range participants { ks := participants[id] refid = je.participants[ks] @@ -659,28 +678,33 @@ func (vre *Engine) transitionJournal(je *journalEvent) { log.Errorf("transitionJournal: %v", err) return } - var newids []int + var newids []int32 for _, shard := range shardGTIDs { sgtid := je.shardGTIDs[shard] bls := proto.Clone(vre.controllers[refid].source).(*binlogdatapb.BinlogSource) bls.Keyspace, bls.Shard = sgtid.Keyspace, sgtid.Shard - workflowType, _ := strconv.ParseInt(params["workflow_type"], 10, 64) - workflowSubType, _ := strconv.ParseInt(params["workflow_sub_type"], 10, 64) + workflowType, _ := strconv.ParseInt(params["workflow_type"], 10, 32) + workflowSubType, _ := strconv.ParseInt(params["workflow_sub_type"], 10, 32) deferSecondaryKeys, _ := strconv.ParseBool(params["defer_secondary_keys"]) ig := NewInsertGenerator(binlogplayer.BlpRunning, vre.dbName) - ig.AddRow(params["workflow"], bls, sgtid.Gtid, params["cell"], params["tablet_types"], workflowType, workflowSubType, deferSecondaryKeys) + ig.AddRow(params["workflow"], bls, sgtid.Gtid, params["cell"], params["tablet_types"], + binlogdatapb.VReplicationWorkflowType(workflowType), binlogdatapb.VReplicationWorkflowSubType(workflowSubType), deferSecondaryKeys) qr, err := dbClient.ExecuteFetch(ig.String(), maxRows) if err != nil { log.Errorf("transitionJournal: %v", err) return } log.Infof("Created stream: %v for %v", qr.InsertID, sgtid) - newids = append(newids, int(qr.InsertID)) + if qr.InsertID > math.MaxInt32 { + log.Errorf("transitionJournal: InsertID %v too large", qr.InsertID) + return + } + newids = append(newids, int32(qr.InsertID)) } for _, ks := range participants { id := je.participants[ks] - _, err := dbClient.ExecuteFetch(binlogplayer.DeleteVReplication(uint32(id)), maxRows) + _, err := dbClient.ExecuteFetch(binlogplayer.DeleteVReplication(id), maxRows) if err != nil { log.Errorf("transitionJournal: %v", err) return @@ -715,7 +739,7 @@ func (vre *Engine) transitionJournal(je *journalEvent) { } // WaitForPos waits for the replication to reach the specified position. -func (vre *Engine) WaitForPos(ctx context.Context, id int, pos string) error { +func (vre *Engine) WaitForPos(ctx context.Context, id int32, pos string) error { start := time.Now() mPos, err := binlogplayer.DecodePosition(pos) if err != nil { @@ -750,7 +774,7 @@ func (vre *Engine) WaitForPos(ctx context.Context, id int, pos string) error { tkr := time.NewTicker(waitRetryTime) defer tkr.Stop() for { - qr, err := dbClient.ExecuteFetch(binlogplayer.ReadVReplicationStatus(uint32(id)), 10) + qr, err := dbClient.ExecuteFetch(binlogplayer.ReadVReplicationStatus(id), 10) switch { case err != nil: // We have high contention on the _vt.vreplication row, so retry if our read gets @@ -812,7 +836,7 @@ func (vre *Engine) updateStats() { defer globalStats.mu.Unlock() globalStats.isOpen = vre.isOpen - globalStats.controllers = make(map[int]*controller, len(vre.controllers)) + globalStats.controllers = make(map[int32]*controller, len(vre.controllers)) for id, ct := range vre.controllers { globalStats.controllers[id] = ct } @@ -839,7 +863,23 @@ func (vre *Engine) readAllRows(ctx context.Context) ([]map[string]string, error) return maps, nil } -func readRow(dbClient binlogplayer.DBClient, id int) (map[string]string, error) { +func (vre *Engine) getAutoIncrementStep(dbClient binlogplayer.DBClient) (uint16, error) { + qr, err := dbClient.ExecuteFetch("select @@session.auto_increment_increment", 1) + if err != nil { + return 0, err + } + if len(qr.Rows) != 1 { + // Handles case where underlying mysql doesn't support auto_increment_increment for any reason. + return 1, nil + } + autoIncrement, err := qr.Rows[0][0].ToUint16() + if err != nil { + return 0, err + } + return autoIncrement, nil +} + +func readRow(dbClient binlogplayer.DBClient, id int32) (map[string]string, error) { qr, err := dbClient.ExecuteFetch(fmt.Sprintf("select * from _vt.vreplication where id = %d", id), 10) if err != nil { return nil, err diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go index 23b7204fb85..d05311269a1 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go @@ -156,6 +156,7 @@ func TestEngineExec(t *testing.T) { dbClient.ExpectRequest("use _vt", &sqltypes.Result{}, nil) dbClient.ExpectRequest("insert into _vt.vreplication values(null)", &sqltypes.Result{InsertID: 1}, nil) + dbClient.ExpectRequest("select @@session.auto_increment_increment", &sqltypes.Result{}, nil) dbClient.ExpectRequest("select * from _vt.vreplication where id = 1", sqltypes.MakeTestResult( sqltypes.MakeTestFields( "id|state|source|tablet_types", diff --git a/go/vt/vttablet/tabletmanager/vreplication/framework_test.go b/go/vt/vttablet/tabletmanager/vreplication/framework_test.go index cdb07485427..ed8e9124b29 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/framework_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/framework_test.go @@ -441,7 +441,7 @@ func expectDeleteQueries(t *testing.T) { )) } -func expectLogsAndUnsubscribe(t *testing.T, logs []LogExpectation, logCh chan any) { +func expectLogsAndUnsubscribe(t *testing.T, logs []LogExpectation, logCh chan *VrLogStats) { t.Helper() defer vrLogStatsLogger.Unsubscribe(logCh) failed := false @@ -451,11 +451,7 @@ func expectLogsAndUnsubscribe(t *testing.T, logs []LogExpectation, logCh chan an continue } select { - case data := <-logCh: - got, ok := data.(*VrLogStats) - if !ok { - t.Errorf("got not ok casting to VrLogStats: %v", data) - } + case got := <-logCh: var match bool match = (log.Type == got.Type) if match { diff --git a/go/vt/vttablet/tabletmanager/vreplication/insert_generator.go b/go/vt/vttablet/tabletmanager/vreplication/insert_generator.go index f66ebe34914..19e5933f428 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/insert_generator.go +++ b/go/vt/vttablet/tabletmanager/vreplication/insert_generator.go @@ -49,8 +49,8 @@ func NewInsertGenerator(state, dbname string) *InsertGenerator { // AddRow adds a row to the insert statement. func (ig *InsertGenerator) AddRow(workflow string, bls *binlogdatapb.BinlogSource, pos, cell, tabletTypes string, - workflowType int64, workflowSubType int64, deferSecondaryKeys bool) { - fmt.Fprintf(ig.buf, "%s(%v, %v, %v, %v, %v, %v, %v, %v, 0, '%v', %v, %v, %v, %v)", + workflowType binlogdatapb.VReplicationWorkflowType, workflowSubType binlogdatapb.VReplicationWorkflowSubType, deferSecondaryKeys bool) { + fmt.Fprintf(ig.buf, "%s(%v, %v, %v, %v, %v, %v, %v, %v, 0, '%v', %v, %d, %d, %v)", ig.prefix, encodeString(workflow), encodeString(bls.String()), diff --git a/go/vt/vttablet/tabletmanager/vreplication/insert_generator_test.go b/go/vt/vttablet/tabletmanager/vreplication/insert_generator_test.go index 70f82391c7f..3f79a28a765 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/insert_generator_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/insert_generator_test.go @@ -28,12 +28,12 @@ import ( func TestInsertGenerator(t *testing.T) { ig := NewInsertGenerator(binlogplayer.BlpStopped, "a") ig.now = 111 - ig.AddRow("b", &binlogdatapb.BinlogSource{Keyspace: "c"}, "d", "e", "f", int64(binlogdatapb.VReplicationWorkflowType_Materialize), int64(binlogdatapb.VReplicationWorkflowSubType_None), false) + ig.AddRow("b", &binlogdatapb.BinlogSource{Keyspace: "c"}, "d", "e", "f", binlogdatapb.VReplicationWorkflowType_Materialize, binlogdatapb.VReplicationWorkflowSubType_None, false) want := `insert into _vt.vreplication(workflow, source, pos, max_tps, max_replication_lag, cell, tablet_types, time_updated, transaction_timestamp, state, db_name, workflow_type, workflow_sub_type, defer_secondary_keys) values ` + `('b', 'keyspace:\"c\"', 'd', 9223372036854775807, 9223372036854775807, 'e', 'f', 111, 0, 'Stopped', 'a', 0, 0, false)` assert.Equal(t, ig.String(), want) - ig.AddRow("g", &binlogdatapb.BinlogSource{Keyspace: "h"}, "i", "j", "k", int64(binlogdatapb.VReplicationWorkflowType_Reshard), int64(binlogdatapb.VReplicationWorkflowSubType_Partial), true) + ig.AddRow("g", &binlogdatapb.BinlogSource{Keyspace: "h"}, "i", "j", "k", binlogdatapb.VReplicationWorkflowType_Reshard, binlogdatapb.VReplicationWorkflowSubType_Partial, true) want += `, ('g', 'keyspace:\"h\"', 'i', 9223372036854775807, 9223372036854775807, 'j', 'k', 111, 0, 'Stopped', 'a', 4, 1, true)` assert.Equal(t, ig.String(), want) } diff --git a/go/vt/vttablet/tabletmanager/vreplication/stats.go b/go/vt/vttablet/tabletmanager/vreplication/stats.go index 66d5877189f..5b3f55a60f5 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/stats.go +++ b/go/vt/vttablet/tabletmanager/vreplication/stats.go @@ -56,7 +56,7 @@ func AddStatusPart() { type vrStats struct { mu sync.Mutex isOpen bool - controllers map[int]*controller + controllers map[int32]*controller } func (st *vrStats) register() { @@ -458,7 +458,7 @@ type EngineStatus struct { // ControllerStatus contains a renderable status of a controller. type ControllerStatus struct { - Index uint32 + Index int32 Source string SourceShard string StopPosition string diff --git a/go/vt/vttablet/tabletmanager/vreplication/stats_test.go b/go/vt/vttablet/tabletmanager/vreplication/stats_test.go index 50fddb15a33..18ede348166 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/stats_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/stats_test.go @@ -85,7 +85,7 @@ func TestStatusHtml(t *testing.T) { testStats := &vrStats{} testStats.isOpen = true - testStats.controllers = map[int]*controller{ + testStats.controllers = map[int32]*controller{ 1: { id: 1, source: &binlogdata.BinlogSource{ @@ -113,7 +113,7 @@ func TestStatusHtml(t *testing.T) { tpl := template.Must(template.New("test").Parse(vreplicationTemplate)) buf := bytes.NewBuffer(nil) - tpl.Execute(buf, testStats.status()) + require.NoError(t, tpl.Execute(buf, testStats.status())) if strings.Contains(buf.String(), wantOut) { t.Errorf("output: %v, want %v", buf, wantOut) } @@ -124,7 +124,7 @@ func TestVReplicationStats(t *testing.T) { testStats := &vrStats{} testStats.isOpen = true - testStats.controllers = map[int]*controller{ + testStats.controllers = map[int32]*controller{ 1: { id: 1, source: &binlogdata.BinlogSource{ diff --git a/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go b/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go index d899be92fa7..0bc549f35cd 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go +++ b/go/vt/vttablet/tabletmanager/vreplication/table_plan_builder.go @@ -201,7 +201,7 @@ func buildTablePlan(tableName string, rule *binlogdatapb.Rule, colInfos []*Colum buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v", sqlparser.NewIdentifierCS(tableName)) query = buf.String() - case key.IsKeyRange(filter): + case key.IsValidKeyRange(filter): buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v where in_keyrange(%v)", sqlparser.NewIdentifierCS(tableName), sqlparser.NewStrLiteral(filter)) query = buf.String() diff --git a/go/vt/vttablet/tabletmanager/vreplication/utils.go b/go/vt/vttablet/tabletmanager/vreplication/utils.go index fd287e28630..84458677590 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/utils.go +++ b/go/vt/vttablet/tabletmanager/vreplication/utils.go @@ -63,7 +63,7 @@ const ( LogError = "Error" ) -func getLastLog(dbClient *vdbClient, vreplID uint32) (id int64, typ, state, message string, err error) { +func getLastLog(dbClient *vdbClient, vreplID int32) (id int64, typ, state, message string, err error) { var qr *sqltypes.Result query := fmt.Sprintf("select id, type, state, message from _vt.vreplication_log where vrepl_id = %d order by id desc limit 1", vreplID) if qr, err = dbClient.Execute(query); err != nil { @@ -80,7 +80,7 @@ func getLastLog(dbClient *vdbClient, vreplID uint32) (id int64, typ, state, mess return id, typ, state, message, nil } -func insertLog(dbClient *vdbClient, typ string, vreplID uint32, state, message string) error { +func insertLog(dbClient *vdbClient, typ string, vreplID int32, state, message string) error { // getLastLog returns the last log for a stream. During insertion, if the type/state/message match we do not insert // a new log but increment the count. This prevents spamming of the log table in case the same message is logged continuously. id, _, lastLogState, lastLogMessage, err := getLastLog(dbClient, vreplID) @@ -107,7 +107,7 @@ func insertLog(dbClient *vdbClient, typ string, vreplID uint32, state, message s } // insertLogWithParams is called when a stream is created. The attributes of the stream are stored as a json string -func insertLogWithParams(dbClient *vdbClient, action string, vreplID uint32, params map[string]string) error { +func insertLogWithParams(dbClient *vdbClient, action string, vreplID int32, params map[string]string) error { var message string if params != nil { obj, _ := json.Marshal(params) diff --git a/go/vt/vttablet/tabletmanager/vreplication/vplayer.go b/go/vt/vttablet/tabletmanager/vreplication/vplayer.go index f56db01e2fa..0e33eed5f6a 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vplayer.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vplayer.go @@ -17,6 +17,7 @@ limitations under the License. package vreplication import ( + "context" "errors" "fmt" "io" @@ -25,8 +26,6 @@ import ( "strings" "time" - "context" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" @@ -619,7 +618,7 @@ func (vp *vplayer) applyEvent(ctx context.Context, event *binlogdatapb.VEvent, m // All were found. We must register journal. } log.Infof("Binlog event registering journal event %+v", event.Journal) - if err := vp.vr.vre.registerJournal(event.Journal, int(vp.vr.id)); err != nil { + if err := vp.vr.vre.registerJournal(event.Journal, vp.vr.id); err != nil { if err := vp.vr.setState(binlogplayer.BlpStopped, err.Error()); err != nil { return err } diff --git a/go/vt/vttablet/tabletmanager/vreplication/vplayer_flaky_test.go b/go/vt/vttablet/tabletmanager/vreplication/vplayer_flaky_test.go index 60378c8924a..de881cdacfc 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vplayer_flaky_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vplayer_flaky_test.go @@ -1767,7 +1767,7 @@ func TestPlayerStopPos(t *testing.T) { if err != nil { t.Fatal(err) } - id := uint32(qr.InsertID) + id := int32(qr.InsertID) for q := range globalDBQueries { if strings.HasPrefix(q, "insert into _vt.vreplication") { break @@ -1871,7 +1871,7 @@ func TestPlayerStopAtOther(t *testing.T) { if err != nil { t.Fatal(err) } - id := uint32(qr.InsertID) + id := int32(qr.InsertID) for q := range globalDBQueries { if strings.HasPrefix(q, "insert into _vt.vreplication") { break diff --git a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go index ce824220888..4f5a27b2440 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go @@ -17,6 +17,7 @@ limitations under the License. package vreplication import ( + "context" "encoding/json" "fmt" "math" @@ -35,8 +36,6 @@ import ( "vitess.io/vitess/go/vt/vtgate/evalengine" - "context" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/binlog/binlogplayer" @@ -106,7 +105,7 @@ const ( // vreplicator provides the core logic to start vreplication streams type vreplicator struct { vre *Engine - id uint32 + id int32 dbClient *vdbClient // source source *binlogdatapb.BinlogSource @@ -148,7 +147,7 @@ type vreplicator struct { // alias like "a+b as targetcol" must be used. // More advanced constructs can be used. Please see the table plan builder // documentation for more info. -func newVReplicator(id uint32, source *binlogdatapb.BinlogSource, sourceVStreamer VStreamerClient, stats *binlogplayer.Stats, dbClient binlogplayer.DBClient, mysqld mysqlctl.MysqlDaemon, vre *Engine) *vreplicator { +func newVReplicator(id int32, source *binlogdatapb.BinlogSource, sourceVStreamer VStreamerClient, stats *binlogplayer.Stats, dbClient binlogplayer.DBClient, mysqld mysqlctl.MysqlDaemon, vre *Engine) *vreplicator { if vreplicationHeartbeatUpdateInterval > vreplicationMinimumHeartbeatUpdateInterval { log.Warningf("The supplied value for vreplication_heartbeat_update_interval:%d seconds is larger than the maximum allowed:%d seconds, vreplication will fallback to %d", vreplicationHeartbeatUpdateInterval, vreplicationMinimumHeartbeatUpdateInterval, vreplicationMinimumHeartbeatUpdateInterval) @@ -500,7 +499,7 @@ func (vr *vreplicator) setSQLMode(ctx context.Context, dbClient *vdbClient) (fun if err != nil { return resetFunc, err } - if settings.WorkflowType == int32(binlogdatapb.VReplicationWorkflowType_OnlineDDL) { + if settings.WorkflowType == binlogdatapb.VReplicationWorkflowType_OnlineDDL { vreplicationSQLMode = StrictSQLMode } @@ -638,7 +637,7 @@ func (vr *vreplicator) stashSecondaryKeys(ctx context.Context, tableName string) if err != nil { return err } - insert, err := sqlparser.ParseAndBind(sqlCreatePostCopyAction, sqltypes.Uint32BindVariable(vr.id), + insert, err := sqlparser.ParseAndBind(sqlCreatePostCopyAction, sqltypes.Int32BindVariable(vr.id), sqltypes.StringBindVariable(tableName), sqltypes.StringBindVariable(string(action))) if err != nil { return err @@ -722,7 +721,7 @@ func (vr *vreplicator) execPostCopyActions(ctx context.Context, tableName string } defer dbClient.Close() - query, err := sqlparser.ParseAndBind(sqlGetPostCopyActions, sqltypes.Uint32BindVariable(vr.id), + query, err := sqlparser.ParseAndBind(sqlGetPostCopyActions, sqltypes.Int32BindVariable(vr.id), sqltypes.StringBindVariable(tableName)) if err != nil { return err @@ -751,13 +750,13 @@ func (vr *vreplicator) execPostCopyActions(ctx context.Context, tableName string if idqr == nil || len(idqr.Rows) != 1 { return fmt.Errorf("unexpected number of rows returned (%d) from connection_id() query", len(idqr.Rows)) } - connID, err := idqr.Rows[0][0].ToUint64() + connID, err := idqr.Rows[0][0].ToInt64() if err != nil || connID == 0 { return fmt.Errorf("unexpected result (%d) from connection_id() query, error: %v", connID, err) } - deleteAction := func(dbc *vdbClient, id int64, vid uint32, tn string) error { - delq, err := sqlparser.ParseAndBind(sqlDeletePostCopyAction, sqltypes.Uint32BindVariable(vid), + deleteAction := func(dbc *vdbClient, id int64, vid int32, tn string) error { + delq, err := sqlparser.ParseAndBind(sqlDeletePostCopyAction, sqltypes.Int32BindVariable(vid), sqltypes.StringBindVariable(tn), sqltypes.Int64BindVariable(id)) if err != nil { return err @@ -865,14 +864,14 @@ func (vr *vreplicator) execPostCopyActions(ctx context.Context, tableName string if vrsres != nil && len(vrsres.Rows) > 1 { // We have more than one planned post copy action on the table. for _, row := range vrsres.Named().Rows { - vrid, err := row["vrepl_id"].ToUint64() + vrid, err := row["vrepl_id"].ToInt32() if err != nil { return err } ctlaction := row["action"].ToString() // Let's make sure that it's a different controller/vreplicator // and that the action is the same. - if uint32(vrid) != vr.id && strings.EqualFold(ctlaction, string(actionBytes)) { + if vrid != vr.id && strings.EqualFold(ctlaction, string(actionBytes)) { // We know that there's another controller/vreplicator yet // to finish its copy phase for the table and it will perform // the same action on the same table when it completes, so we diff --git a/go/vt/vttablet/tabletmanager/vreplication/vreplicator_test.go b/go/vt/vttablet/tabletmanager/vreplication/vreplicator_test.go index 1cf3d358f93..66591bbcb81 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vreplicator_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vreplicator_test.go @@ -204,7 +204,7 @@ func TestDeferSecondaryKeys(t *testing.T) { Shard: env.ShardName, Filter: filter, } - id := uint32(1) + id := int32(1) vsclient := newTabletConnector(tablet) stats := binlogplayer.NewStats() dbClient := playerEngine.dbClientFactoryFiltered() @@ -535,7 +535,7 @@ func TestCancelledDeferSecondaryKeys(t *testing.T) { // The test env uses the same factory for both dba and // filtered connections. dbconfigs.GlobalDBConfigs.Filtered.User = "vt_dba" - id := uint32(1) + id := int32(1) vsclient := newTabletConnector(tablet) stats := binlogplayer.NewStats() dbaconn := playerEngine.dbClientFactoryDba() diff --git a/go/vt/vttablet/tabletmanager/vreplication/vrlog.go b/go/vt/vttablet/tabletmanager/vreplication/vrlog.go index 7f28b395f15..b55e54bb79c 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vrlog.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vrlog.go @@ -31,7 +31,7 @@ import ( ) var ( - vrLogStatsLogger = streamlog.New("VReplication", 50) + vrLogStatsLogger = streamlog.New[*VrLogStats]("VReplication", 50) vrLogStatsTemplate = template.Must(template.New("vrlog"). Parse("{{.Type}} Event {{.Detail}} {{.LogTime}} {{.DurationNs}}\n")) ) @@ -70,23 +70,18 @@ func init() { }) } -func vrlogStatsHandler(ch chan any, w http.ResponseWriter, r *http.Request) { +func vrlogStatsHandler(ch chan *VrLogStats, w http.ResponseWriter, r *http.Request) { timeout, limit := parseTimeoutLimitParams(r) tmr := time.NewTimer(timeout) defer tmr.Stop() for i := 0; i < limit; i++ { select { - case out := <-ch: + case stats := <-ch: select { case <-tmr.C: return default: } - stats, ok := out.(*VrLogStats) - if !ok { - log.Error("Log received is not of type VrLogStats") - continue - } if err := vrLogStatsTemplate.Execute(w, stats); err != nil { log.Errorf("vrlog: couldn't execute template: %v", err) } diff --git a/go/vt/vttablet/tabletserver/bench_test.go b/go/vt/vttablet/tabletserver/bench_test.go index 06d7abe391b..270e98019ec 100644 --- a/go/vt/vttablet/tabletserver/bench_test.go +++ b/go/vt/vttablet/tabletserver/bench_test.go @@ -68,7 +68,7 @@ func BenchmarkExecuteVarBinary(b *testing.B) { } target := querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} - db.AllowAll = true + db.SetAllowAll(true) for i := 0; i < b.N; i++ { if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, 0, nil); err != nil { panic(err) @@ -93,7 +93,7 @@ func BenchmarkExecuteExpression(b *testing.B) { } target := querypb.Target{TabletType: topodatapb.TabletType_PRIMARY} - db.AllowAll = true + db.SetAllowAll(true) for i := 0; i < b.N; i++ { if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, 0, nil); err != nil { panic(err) diff --git a/go/vt/vttablet/tabletserver/controller.go b/go/vt/vttablet/tabletserver/controller.go index c0a38c0b878..d612ef1109d 100644 --- a/go/vt/vttablet/tabletserver/controller.go +++ b/go/vt/vttablet/tabletserver/controller.go @@ -26,7 +26,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/rules" "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" - "vitess.io/vitess/go/vt/vttablet/vexec" "time" @@ -82,9 +81,6 @@ type Controller interface { // QueryService returns the QueryService object used by this Controller QueryService() queryservice.QueryService - // OnlineDDLExecutor the online DDL executor used by this Controller - OnlineDDLExecutor() vexec.Executor - // SchemaEngine returns the SchemaEngine object used by this Controller SchemaEngine() *schema.Engine diff --git a/go/vt/vttablet/tabletserver/livequeryz.go b/go/vt/vttablet/tabletserver/livequeryz.go index f8d1e5d507c..c3f28767c19 100644 --- a/go/vt/vttablet/tabletserver/livequeryz.go +++ b/go/vt/vttablet/tabletserver/livequeryz.go @@ -98,13 +98,13 @@ func livequeryzTerminateHandler(queryLists []*QueryList, w http.ResponseWriter, return } connID := r.FormValue("connID") - c, err := strconv.Atoi(connID) + c, err := strconv.ParseInt(connID, 10, 64) if err != nil { http.Error(w, "invalid connID", http.StatusInternalServerError) return } for _, ql := range queryLists { - if ql.Terminate(int64(c)) { + if ql.Terminate(c) { break } } diff --git a/go/vt/vttablet/tabletserver/planbuilder/builder.go b/go/vt/vttablet/tabletserver/planbuilder/builder.go index 980adf3efb5..8104c5025d6 100644 --- a/go/vt/vttablet/tabletserver/planbuilder/builder.go +++ b/go/vt/vttablet/tabletserver/planbuilder/builder.go @@ -21,11 +21,9 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/vt/sidecardb" - "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" @@ -52,7 +50,7 @@ func analyzeSelect(sel *sqlparser.Select, tables map[string]*schema.Table) (plan return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "%s is not a sequence", sqlparser.ToString(sel.From)) } plan.PlanID = PlanNextval - v, err := evalengine.Translate(nextVal.Expr, semantics.EmptySemTable()) + v, err := evalengine.Translate(nextVal.Expr, nil) if err != nil { return nil, err } diff --git a/go/vt/vttablet/tabletserver/query_engine.go b/go/vt/vttablet/tabletserver/query_engine.go index 70335c6353b..476eb4c9f4f 100644 --- a/go/vt/vttablet/tabletserver/query_engine.go +++ b/go/vt/vttablet/tabletserver/query_engine.go @@ -145,7 +145,7 @@ type QueryEngine struct { streamConns *connpool.Pool // Services - consolidator *sync2.Consolidator + consolidator sync2.Consolidator streamConsolidator *StreamConsolidator // txSerializer protects vttablet from applications which try to concurrently // UPDATE (or DELETE) a "hot" row (or range of rows). @@ -171,7 +171,11 @@ type QueryEngine struct { consolidatorMode atomic.Value // stats - queryCounts, queryTimes, queryErrorCounts, queryRowsAffected, queryRowsReturned *stats.CountersWithMultiLabels + // Note: queryErrorCountsWithCode is similar to queryErrorCounts except it contains error code as an additional dimension + queryCounts, queryTimes, queryErrorCounts, queryErrorCountsWithCode, queryRowsAffected, queryRowsReturned *stats.CountersWithMultiLabels + + // stats flags + enablePerWorkloadTableMetrics bool // Loggers accessCheckerLogger *logutil.ThrottledLogger @@ -189,11 +193,12 @@ func NewQueryEngine(env tabletenv.Env, se *schema.Engine) *QueryEngine { } qe := &QueryEngine{ - env: env, - se: se, - tables: make(map[string]*schema.Table), - plans: cache.NewDefaultCacheImpl(cacheCfg), - queryRuleSources: rules.NewMap(), + env: env, + se: se, + tables: make(map[string]*schema.Table), + plans: cache.NewDefaultCacheImpl(cacheCfg), + queryRuleSources: rules.NewMap(), + enablePerWorkloadTableMetrics: config.EnablePerWorkloadTableMetrics, } qe.conns = connpool.NewPool(env, "ConnPool", config.OltpReadPool) @@ -246,11 +251,18 @@ func NewQueryEngine(env tabletenv.Env, se *schema.Engine) *QueryEngine { env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query cache size", qe.plans.UsedCapacity) env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query cache capacity", qe.plans.MaxCapacity) env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query cache evictions", qe.plans.Evictions) - qe.queryCounts = env.Exporter().NewCountersWithMultiLabels("QueryCounts", "query counts", []string{"Table", "Plan"}) - qe.queryTimes = env.Exporter().NewCountersWithMultiLabels("QueryTimesNs", "query times in ns", []string{"Table", "Plan"}) - qe.queryRowsAffected = env.Exporter().NewCountersWithMultiLabels("QueryRowsAffected", "query rows affected", []string{"Table", "Plan"}) - qe.queryRowsReturned = env.Exporter().NewCountersWithMultiLabels("QueryRowsReturned", "query rows returned", []string{"Table", "Plan"}) - qe.queryErrorCounts = env.Exporter().NewCountersWithMultiLabels("QueryErrorCounts", "query error counts", []string{"Table", "Plan"}) + + labels := []string{"Table", "Plan"} + if config.EnablePerWorkloadTableMetrics { + labels = []string{"Table", "Plan", "Workload"} + } + + qe.queryCounts = env.Exporter().NewCountersWithMultiLabels("QueryCounts", "query counts", labels) + qe.queryTimes = env.Exporter().NewCountersWithMultiLabels("QueryTimesNs", "query times in ns", labels) + qe.queryRowsAffected = env.Exporter().NewCountersWithMultiLabels("QueryRowsAffected", "query rows affected", labels) + qe.queryRowsReturned = env.Exporter().NewCountersWithMultiLabels("QueryRowsReturned", "query rows returned", labels) + qe.queryErrorCounts = env.Exporter().NewCountersWithMultiLabels("QueryErrorCounts", "query error counts", labels) + qe.queryErrorCountsWithCode = env.Exporter().NewCountersWithMultiLabels("QueryErrorCountsWithCode", "query error counts with error code", []string{"Table", "Plan", "Code"}) env.Exporter().HandleFunc("/debug/hotrows", qe.txSerializer.ServeHTTP) env.Exporter().HandleFunc("/debug/tablet_plans", qe.handleHTTPQueryPlans) @@ -478,12 +490,22 @@ func (qe *QueryEngine) QueryPlanCacheLen() int { } // AddStats adds the given stats for the planName.tableName -func (qe *QueryEngine) AddStats(planType planbuilder.PlanType, tableName string, queryCount int64, duration, mysqlTime time.Duration, rowsAffected, rowsReturned, errorCount int64) { +func (qe *QueryEngine) AddStats(planType planbuilder.PlanType, tableName, workload string, queryCount int64, duration, mysqlTime time.Duration, rowsAffected, rowsReturned, errorCount int64, errorCode string) { // table names can contain "." characters, replace them! keys := []string{tableName, planType.String()} + // Only use the workload as a label if that's enabled in the configuration. + if qe.enablePerWorkloadTableMetrics { + keys = append(keys, workload) + } qe.queryCounts.Add(keys, queryCount) qe.queryTimes.Add(keys, int64(duration)) qe.queryErrorCounts.Add(keys, errorCount) + // queryErrorCountsWithCode is similar to queryErrorCounts except we have an additional dimension + // of error code. + if errorCount > 0 { + errorKeys := []string{tableName, planType.String(), errorCode} + qe.queryErrorCountsWithCode.Add(errorKeys, errorCount) + } // For certain plan types like select, we only want to add their metrics to rows returned // But there are special cases like `SELECT ... INTO OUTFILE ''` which return positive rows affected diff --git a/go/vt/vttablet/tabletserver/query_engine_test.go b/go/vt/vttablet/tabletserver/query_engine_test.go index f425ff50d87..9ff99ce270e 100644 --- a/go/vt/vttablet/tabletserver/query_engine_test.go +++ b/go/vt/vttablet/tabletserver/query_engine_test.go @@ -574,77 +574,169 @@ func TestPlanCachePollution(t *testing.T) { func TestAddQueryStats(t *testing.T) { testcases := []struct { - name string - planType planbuilder.PlanType - tableName string - queryCount int64 - duration time.Duration - mysqlTime time.Duration - rowsAffected int64 - rowsReturned int64 - errorCount int64 - expectedQueryCounts string - expectedQueryTimes string - expectedQueryRowsAffected string - expectedQueryRowsReturned string - expectedQueryErrorCounts string + name string + planType planbuilder.PlanType + tableName string + queryCount int64 + duration time.Duration + mysqlTime time.Duration + rowsAffected int64 + rowsReturned int64 + errorCount int64 + errorCode string + enablePerWorkloadTableMetrics bool + workload string + expectedQueryCounts string + expectedQueryTimes string + expectedQueryRowsAffected string + expectedQueryRowsReturned string + expectedQueryErrorCounts string + expectedQueryErrorCountsWithCode string }{ { - name: "select query", - planType: planbuilder.PlanSelect, - tableName: "A", - queryCount: 1, - duration: 10, - rowsAffected: 0, - rowsReturned: 15, - errorCount: 0, - expectedQueryCounts: `{"A.Select": 1}`, - expectedQueryTimes: `{"A.Select": 10}`, - expectedQueryRowsAffected: `{}`, - expectedQueryRowsReturned: `{"A.Select": 15}`, - expectedQueryErrorCounts: `{"A.Select": 0}`, + name: "select query", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 0, + rowsReturned: 15, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: false, + workload: "some-workload", + expectedQueryCounts: `{"A.Select": 1}`, + expectedQueryTimes: `{"A.Select": 10}`, + expectedQueryRowsAffected: `{}`, + expectedQueryRowsReturned: `{"A.Select": 15}`, + expectedQueryErrorCounts: `{"A.Select": 0}`, + expectedQueryErrorCountsWithCode: `{}`, }, { - name: "select into query", - planType: planbuilder.PlanSelect, - tableName: "A", - queryCount: 1, - duration: 10, - rowsAffected: 15, - rowsReturned: 0, - errorCount: 0, - expectedQueryCounts: `{"A.Select": 1}`, - expectedQueryTimes: `{"A.Select": 10}`, - expectedQueryRowsAffected: `{"A.Select": 15}`, - expectedQueryRowsReturned: `{"A.Select": 0}`, - expectedQueryErrorCounts: `{"A.Select": 0}`, + name: "select into query", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 15, + rowsReturned: 0, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: false, + workload: "some-workload", + expectedQueryCounts: `{"A.Select": 1}`, + expectedQueryTimes: `{"A.Select": 10}`, + expectedQueryRowsAffected: `{"A.Select": 15}`, + expectedQueryRowsReturned: `{"A.Select": 0}`, + expectedQueryErrorCounts: `{"A.Select": 0}`, + expectedQueryErrorCountsWithCode: `{}`, }, { - name: "error", - planType: planbuilder.PlanSelect, - tableName: "A", - queryCount: 1, - duration: 10, - rowsAffected: 0, - rowsReturned: 0, - errorCount: 1, - expectedQueryCounts: `{"A.Select": 1}`, - expectedQueryTimes: `{"A.Select": 10}`, - expectedQueryRowsAffected: `{}`, - expectedQueryRowsReturned: `{"A.Select": 0}`, - expectedQueryErrorCounts: `{"A.Select": 1}`, + name: "error", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 0, + rowsReturned: 0, + errorCount: 1, + errorCode: "RESOURCE_EXHAUSTED", + enablePerWorkloadTableMetrics: false, + workload: "some-workload", + expectedQueryCounts: `{"A.Select": 1}`, + expectedQueryTimes: `{"A.Select": 10}`, + expectedQueryRowsAffected: `{}`, + expectedQueryRowsReturned: `{"A.Select": 0}`, + expectedQueryErrorCounts: `{"A.Select": 1}`, + expectedQueryErrorCountsWithCode: `{"A.Select.RESOURCE_EXHAUSTED": 1}`, }, { - name: "insert query", - planType: planbuilder.PlanInsert, - tableName: "A", - queryCount: 1, - duration: 10, - rowsAffected: 15, - rowsReturned: 0, - errorCount: 0, - expectedQueryCounts: `{"A.Insert": 1}`, - expectedQueryTimes: `{"A.Insert": 10}`, - expectedQueryRowsAffected: `{"A.Insert": 15}`, - expectedQueryRowsReturned: `{}`, - expectedQueryErrorCounts: `{"A.Insert": 0}`, + name: "insert query", + planType: planbuilder.PlanInsert, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 15, + rowsReturned: 0, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: false, + workload: "some-workload", + expectedQueryCounts: `{"A.Insert": 1}`, + expectedQueryTimes: `{"A.Insert": 10}`, + expectedQueryRowsAffected: `{"A.Insert": 15}`, + expectedQueryRowsReturned: `{}`, + expectedQueryErrorCounts: `{"A.Insert": 0}`, + expectedQueryErrorCountsWithCode: `{}`, + }, { + name: "select query with per workload metrics", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 0, + rowsReturned: 15, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: true, + workload: "some-workload", + expectedQueryCounts: `{"A.Select.some-workload": 1}`, + expectedQueryTimes: `{"A.Select.some-workload": 10}`, + expectedQueryRowsAffected: `{}`, + expectedQueryRowsReturned: `{"A.Select.some-workload": 15}`, + expectedQueryErrorCounts: `{"A.Select.some-workload": 0}`, + expectedQueryErrorCountsWithCode: `{}`, + }, { + name: "select into query with per workload metrics", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 15, + rowsReturned: 0, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: true, + workload: "some-workload", + expectedQueryCounts: `{"A.Select.some-workload": 1}`, + expectedQueryTimes: `{"A.Select.some-workload": 10}`, + expectedQueryRowsAffected: `{"A.Select.some-workload": 15}`, + expectedQueryRowsReturned: `{"A.Select.some-workload": 0}`, + expectedQueryErrorCounts: `{"A.Select.some-workload": 0}`, + expectedQueryErrorCountsWithCode: `{}`, + }, { + name: "error with per workload metrics", + planType: planbuilder.PlanSelect, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 0, + rowsReturned: 0, + errorCount: 1, + errorCode: "RESOURCE_EXHAUSTED", + enablePerWorkloadTableMetrics: true, + workload: "some-workload", + expectedQueryCounts: `{"A.Select.some-workload": 1}`, + expectedQueryTimes: `{"A.Select.some-workload": 10}`, + expectedQueryRowsAffected: `{}`, + expectedQueryRowsReturned: `{"A.Select.some-workload": 0}`, + expectedQueryErrorCounts: `{"A.Select.some-workload": 1}`, + expectedQueryErrorCountsWithCode: `{"A.Select.RESOURCE_EXHAUSTED": 1}`, + }, { + name: "insert query with per workload metrics", + planType: planbuilder.PlanInsert, + tableName: "A", + queryCount: 1, + duration: 10, + rowsAffected: 15, + rowsReturned: 0, + errorCount: 0, + errorCode: "OK", + enablePerWorkloadTableMetrics: true, + workload: "some-workload", + expectedQueryCounts: `{"A.Insert.some-workload": 1}`, + expectedQueryTimes: `{"A.Insert.some-workload": 10}`, + expectedQueryRowsAffected: `{"A.Insert.some-workload": 15}`, + expectedQueryRowsReturned: `{}`, + expectedQueryErrorCounts: `{"A.Insert.some-workload": 0}`, + expectedQueryErrorCountsWithCode: `{}`, }, } @@ -653,15 +745,17 @@ func TestAddQueryStats(t *testing.T) { t.Run(testcase.name, func(t *testing.T) { config := tabletenv.NewDefaultConfig() config.DB = newDBConfigs(fakesqldb.New(t)) + config.EnablePerWorkloadTableMetrics = testcase.enablePerWorkloadTableMetrics env := tabletenv.NewEnv(config, "TestAddQueryStats_"+testcase.name) se := schema.NewEngine(env) qe := NewQueryEngine(env, se) - qe.AddStats(testcase.planType, testcase.tableName, testcase.queryCount, testcase.duration, testcase.mysqlTime, testcase.rowsAffected, testcase.rowsReturned, testcase.errorCount) + qe.AddStats(testcase.planType, testcase.tableName, testcase.workload, testcase.queryCount, testcase.duration, testcase.mysqlTime, testcase.rowsAffected, testcase.rowsReturned, testcase.errorCount, testcase.errorCode) assert.Equal(t, testcase.expectedQueryCounts, qe.queryCounts.String()) assert.Equal(t, testcase.expectedQueryTimes, qe.queryTimes.String()) assert.Equal(t, testcase.expectedQueryRowsAffected, qe.queryRowsAffected.String()) assert.Equal(t, testcase.expectedQueryRowsReturned, qe.queryRowsReturned.String()) assert.Equal(t, testcase.expectedQueryErrorCounts, qe.queryErrorCounts.String()) + assert.Equal(t, testcase.expectedQueryErrorCountsWithCode, qe.queryErrorCountsWithCode.String()) }) } } diff --git a/go/vt/vttablet/tabletserver/query_executor.go b/go/vt/vttablet/tabletserver/query_executor.go index 3ec40764c05..03a8ae8bd5c 100644 --- a/go/vt/vttablet/tabletserver/query_executor.go +++ b/go/vt/vttablet/tabletserver/query_executor.go @@ -27,7 +27,6 @@ import ( "google.golang.org/protobuf/proto" "vitess.io/vitess/go/mysql" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/pools" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/trace" @@ -63,6 +62,7 @@ type QueryExecutor struct { tsv *TabletServer tabletType topodatapb.TabletType setting *pools.Setting + workload string } const ( @@ -129,12 +129,16 @@ func (qre *QueryExecutor) Execute() (reply *sqltypes.Result, err error) { tableName = "Join" } + var errCode string + vtErrorCode := vterrors.Code(err) + errCode = vtErrorCode.String() if reply == nil { - qre.tsv.qe.AddStats(qre.plan.PlanID, tableName, 1, duration, mysqlTime, 0, 0, 1) + qre.tsv.qe.AddStats(qre.plan.PlanID, tableName, qre.options.GetWorkloadName(), 1, duration, mysqlTime, 0, 0, 1, errCode) qre.plan.AddStats(1, duration, mysqlTime, 0, 0, 1) return } - qre.tsv.qe.AddStats(qre.plan.PlanID, tableName, 1, duration, mysqlTime, int64(reply.RowsAffected), int64(len(reply.Rows)), 0) + + qre.tsv.qe.AddStats(qre.plan.PlanID, tableName, qre.options.GetWorkloadName(), 1, duration, mysqlTime, int64(reply.RowsAffected), int64(len(reply.Rows)), 0, errCode) qre.plan.AddStats(1, duration, mysqlTime, reply.RowsAffected, uint64(len(reply.Rows)), 0) qre.logStats.RowsAffected = int(reply.RowsAffected) qre.logStats.Rows = reply.Rows @@ -706,7 +710,7 @@ func (*QueryExecutor) BeginAgain(ctx context.Context, dc *StatefulConnection) er } func (qre *QueryExecutor) execNextval() (*sqltypes.Result, error) { - env := evalengine.EnvWithBindVars(qre.bindVars, collations.Unknown) + env := evalengine.EnvWithBindVars(qre.bindVars) result, err := env.Evaluate(qre.plan.NextCount) if err != nil { return nil, err @@ -795,10 +799,12 @@ func (qre *QueryExecutor) execSelect() (*sqltypes.Result, error) { conn, err := qre.getConn() if err != nil { - q.Err = err + q.SetErr(err) } else { defer conn.Recycle() - q.Result, q.Err = qre.execDBConn(conn, sql, true) + res, err := qre.execDBConn(conn, sql, true) + q.SetResult(res) + q.SetErr(err) } } else { qre.logStats.QuerySources |= tabletenv.QuerySourceConsolidator @@ -806,10 +812,10 @@ func (qre *QueryExecutor) execSelect() (*sqltypes.Result, error) { q.Wait() qre.tsv.stats.WaitTimings.Record("Consolidations", startTime) } - if q.Err != nil { - return nil, q.Err + if q.Err() != nil { + return nil, q.Err() } - return q.Result.(*sqltypes.Result), nil + return q.Result(), nil } conn, err := qre.getConn() if err != nil { diff --git a/go/vt/vttablet/tabletserver/query_executor_test.go b/go/vt/vttablet/tabletserver/query_executor_test.go index ca8fc7ebf9d..abdafdc3ff8 100644 --- a/go/vt/vttablet/tabletserver/query_executor_test.go +++ b/go/vt/vttablet/tabletserver/query_executor_test.go @@ -34,6 +34,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/fakesqldb" "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/sync2" "vitess.io/vitess/go/vt/callerid" "vitess.io/vitess/go/vt/callinfo" "vitess.io/vitess/go/vt/callinfo/fakecallinfo" @@ -1262,156 +1263,136 @@ func TestReplaceSchemaName(t *testing.T) { } func TestQueryExecutorShouldConsolidate(t *testing.T) { - testcases := []struct { - consolidates []bool - executorFlags executorFlags - name string - // Whether or not query consolidator is requested. - options []querypb.ExecuteOptions_Consolidator - // Whether or not query is consolidated. - queries []string - }{{ - consolidates: []bool{ - false, - false, - false, - true, + testCases := []struct { + // whether or not the consolidator is enabled by default on the tablet + consolidatorEnabledByDefault bool + // query-specific consolidator override, unspecified by default + consolidatorExecuteOption querypb.ExecuteOptions_Consolidator + // whether or not the consolidator is waiting on the results of an + // identical running query + consolidatorHasIdenticalQuery bool + // whether or not the query should be consolidated + expectConsolidate bool + // whether or not the query should be exec'd (= sent to db) + expectExec bool + // query to run + input string + }{ + { + consolidatorEnabledByDefault: true, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, + consolidatorHasIdenticalQuery: false, + expectConsolidate: true, + expectExec: true, + input: "select * from t limit 10001", }, - executorFlags: noFlags, - name: "vttablet-consolidator-disabled", - options: []querypb.ExecuteOptions_Consolidator{ - querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, - querypb.ExecuteOptions_CONSOLIDATOR_ENABLED, - querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, - querypb.ExecuteOptions_CONSOLIDATOR_ENABLED, + { + consolidatorEnabledByDefault: true, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, + consolidatorHasIdenticalQuery: true, + expectConsolidate: true, + expectExec: false, + input: "select * from t limit 10001", }, - queries: []string{ - "select * from t limit 10001", - // The previous query isn't passed to the query consolidator, - // so the next query can't consolidate into it. - "select * from t limit 10001", - "select * from t limit 10001", - // This query should consolidate into the previous query - // that was passed to the consolidator. - "select * from t limit 10001", + { + consolidatorEnabledByDefault: true, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_DISABLED, + consolidatorHasIdenticalQuery: true, + expectConsolidate: false, + expectExec: true, + input: "select * from t limit 10001", }, - }, { - consolidates: []bool{ - false, - true, - false, - true, - false, + { + consolidatorEnabledByDefault: false, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_DISABLED, + consolidatorHasIdenticalQuery: true, + expectConsolidate: false, + expectExec: true, + input: "select * from t limit 10001", }, - executorFlags: enableConsolidator, - name: "consolidator=enabled", - options: []querypb.ExecuteOptions_Consolidator{ - querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, - querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, - querypb.ExecuteOptions_CONSOLIDATOR_DISABLED, - querypb.ExecuteOptions_CONSOLIDATOR_UNSPECIFIED, - querypb.ExecuteOptions_CONSOLIDATOR_DISABLED, + { + consolidatorEnabledByDefault: false, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_ENABLED, + consolidatorHasIdenticalQuery: false, + expectConsolidate: true, + expectExec: true, + input: "select * from t limit 10001", }, - queries: []string{ - "select * from t limit 10001", - "select * from t limit 10001", - // This query shouldn't be passed to the consolidator. - "select * from t limit 10001", - "select * from t limit 10001", - // This query shouldn't be passed to the consolidator. - "select * from t limit 10001", + { + consolidatorEnabledByDefault: false, + consolidatorExecuteOption: querypb.ExecuteOptions_CONSOLIDATOR_ENABLED, + consolidatorHasIdenticalQuery: true, + expectConsolidate: true, + expectExec: false, + input: "select * from t limit 10001", }, - }} - for _, tcase := range testcases { - t.Run(tcase.name, func(t *testing.T) { + } + for _, tcase := range testCases { + name := fmt.Sprintf("table-consolidator:%t;query-consolidator:%v;identical-query:%t", + tcase.consolidatorEnabledByDefault, tcase.consolidatorExecuteOption, tcase.consolidatorHasIdenticalQuery) + t.Run(name, func(t *testing.T) { + // Set up fake db, tablet server (with fake consolidator), and executor. + db := setUpQueryExecutorTest(t) + defer db.Close() ctx := context.Background() - tsv := newTestTabletServer(ctx, tcase.executorFlags, db) + flags := noFlags + if tcase.consolidatorEnabledByDefault { + flags = enableConsolidator + } - defer db.Close() + tsv := newTestTabletServer(ctx, flags, db) defer tsv.StopService() - doneCh := make(chan bool, len(tcase.queries)) - readyCh := make(chan bool, len(tcase.queries)) - var qres []*QueryExecutor - var waitChs []chan bool - - for i, input := range tcase.queries { - qre := newTestQueryExecutor(ctx, tsv, input, 0) - qre.options = &querypb.ExecuteOptions{ - Consolidator: tcase.options[i], - } - qres = append(qres, qre) + fakeConsolidator := sync2.NewFakeConsolidator() + tsv.qe.consolidator = fakeConsolidator - // If this query is consolidated, don't add a fakesqldb expectation. - if tcase.consolidates[i] { - continue - } + qre := newTestQueryExecutor(context.Background(), tsv, tcase.input, 0) + qre.options = &querypb.ExecuteOptions{Consolidator: tcase.consolidatorExecuteOption} - // Set up a query expectation. - waitCh := make(chan bool) - waitChs = append(waitChs, waitCh) - db.AddExpectedExecuteFetchAtIndex(i, fakesqldb.ExpectedExecuteFetch{ - AfterFunc: func() { - // Signal that we're ready to proceed. - readyCh <- true - // Wait until we're signaled to proceed. - <-waitCh - }, - Query: input, - QueryResult: &sqltypes.Result{ - Fields: getTestTableFields(), - }, - }) + result := &sqltypes.Result{ + Fields: getTestTableFields(), } - db.OrderMatters() - db.SetNeverFail(true) + // Set up consolidator pre-conditions. - for i, input := range tcase.queries { - qre := qres[i] - go func(i int, input string, qre *QueryExecutor) { - // Execute the query. - _, err := qre.Execute() - - require.NoError(t, err, fmt.Sprintf( - "input[%d]=%q,querySources=%v", i, input, qre.logStats.QuerySources, - )) - - // Signal that the query is done. - doneCh <- true - }(i, input, qre) + fakePendingResult := &sync2.FakePendingResult{} + fakePendingResult.SetResult(result) + fakeConsolidator.CreateReturn = &sync2.FakeConsolidatorCreateReturn{ + Created: !tcase.consolidatorHasIdenticalQuery, + PendingResult: fakePendingResult, + } - // If this query is consolidated, don't wait for fakesqldb to - // tell us query is ready is ready. - if tcase.consolidates[i] { - continue - } + // Set up database query/response. - // Wait until query is queued up before starting next one. - <-readyCh - } + db.AddQuery(tcase.input, result) - // Signal ready queries to return. - for i := 0; i < len(waitChs); i++ { - close(waitChs[i]) - } + // Execute query. - // Wait for queries to finish. - for i := 0; i < len(qres); i++ { - <-doneCh + _, err := qre.Execute() + require.Nil(t, err) + + // Verify expectations. + + if tcase.expectConsolidate { + require.Len(t, fakeConsolidator.CreateCalls, 1) + require.Len(t, fakeConsolidator.CreateReturns, 1) + if tcase.consolidatorHasIdenticalQuery { + require.Equal(t, 0, fakePendingResult.BroadcastCalls) + require.Equal(t, 1, fakePendingResult.WaitCalls) + } else { + require.Equal(t, 1, fakePendingResult.BroadcastCalls) + require.Equal(t, 0, fakePendingResult.WaitCalls) + } + } else { + require.Len(t, fakeConsolidator.CreateCalls, 0) } - for i := 0; i < len(tcase.consolidates); i++ { - input := tcase.queries[i] - qre := qres[i] - want := tcase.consolidates[i] - got := qre.logStats.QuerySources&tabletenv.QuerySourceConsolidator != 0 - - require.Equal(t, want, got, fmt.Sprintf( - "input[%d]=%q,querySources=%v", i, input, qre.logStats.QuerySources, - )) + if tcase.expectExec { + require.Equal(t, 1, db.GetQueryCalledNum(tcase.input)) + } else { + require.Equal(t, 0, db.GetQueryCalledNum(tcase.input)) } db.VerifyAllExecutedOrFail() diff --git a/go/vt/vttablet/tabletserver/querylogz.go b/go/vt/vttablet/tabletserver/querylogz.go index 8940f797e84..f13491846fb 100644 --- a/go/vt/vttablet/tabletserver/querylogz.go +++ b/go/vt/vttablet/tabletserver/querylogz.go @@ -17,8 +17,6 @@ limitations under the License. package tabletserver import ( - "fmt" - "io" "net/http" "strconv" "strings" @@ -97,7 +95,7 @@ func init() { // querylogzHandler serves a human readable snapshot of the // current query log. -func querylogzHandler(ch chan any, w http.ResponseWriter, r *http.Request) { +func querylogzHandler(ch chan *tabletenv.LogStats, w http.ResponseWriter, r *http.Request) { if err := acl.CheckAccessHTTP(r, acl.DEBUGGING); err != nil { acl.SendError(w, err) return @@ -111,21 +109,12 @@ func querylogzHandler(ch chan any, w http.ResponseWriter, r *http.Request) { defer tmr.Stop() for i := 0; i < limit; i++ { select { - case out := <-ch: + case stats := <-ch: select { case <-tmr.C: return default: } - stats, ok := out.(*tabletenv.LogStats) - if !ok { - err := fmt.Errorf("unexpected value in %s: %#v (expecting value of type %T)", tabletenv.TxLogger.Name(), out, &tabletenv.LogStats{}) - io.WriteString(w, ``) - io.WriteString(w, err.Error()) - io.WriteString(w, "") - log.Error(err) - continue - } var level string if stats.TotalTime().Seconds() < 0.01 { level = "low" diff --git a/go/vt/vttablet/tabletserver/querylogz_test.go b/go/vt/vttablet/tabletserver/querylogz_test.go index 82743472f7b..2e5caa3891b 100644 --- a/go/vt/vttablet/tabletserver/querylogz_test.go +++ b/go/vt/vttablet/tabletserver/querylogz_test.go @@ -17,6 +17,7 @@ limitations under the License. package tabletserver import ( + "context" "io" "net/http" "net/http/httptest" @@ -25,26 +26,12 @@ import ( "testing" "time" - "context" - "vitess.io/vitess/go/streamlog" "vitess.io/vitess/go/vt/callerid" "vitess.io/vitess/go/vt/vttablet/tabletserver/planbuilder" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) -func TestQuerylogzHandlerInvalidLogStats(t *testing.T) { - req, _ := http.NewRequest("GET", "/querylogz?timeout=10&limit=1", nil) - response := httptest.NewRecorder() - ch := make(chan any, 1) - ch <- "test msg" - querylogzHandler(ch, response, req) - close(ch) - if !strings.Contains(response.Body.String(), "error") { - t.Fatalf("should show an error page for an non LogStats") - } -} - func TestQuerylogzHandler(t *testing.T) { req, _ := http.NewRequest("GET", "/querylogz?timeout=10&limit=1", nil) logStats := tabletenv.NewLogStats(context.Background(), "Execute") @@ -87,7 +74,7 @@ func TestQuerylogzHandler(t *testing.T) { } logStats.EndTime = logStats.StartTime.Add(1 * time.Millisecond) response := httptest.NewRecorder() - ch := make(chan any, 1) + ch := make(chan *tabletenv.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -118,7 +105,7 @@ func TestQuerylogzHandler(t *testing.T) { } logStats.EndTime = logStats.StartTime.Add(20 * time.Millisecond) response = httptest.NewRecorder() - ch = make(chan any, 1) + ch = make(chan *tabletenv.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -148,7 +135,7 @@ func TestQuerylogzHandler(t *testing.T) { ``, } logStats.EndTime = logStats.StartTime.Add(500 * time.Millisecond) - ch = make(chan any, 1) + ch = make(chan *tabletenv.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) @@ -158,7 +145,7 @@ func TestQuerylogzHandler(t *testing.T) { // ensure querylogz is not affected by the filter tag streamlog.SetQueryLogFilterTag("XXX_SKIP_ME") defer func() { streamlog.SetQueryLogFilterTag("") }() - ch = make(chan any, 1) + ch = make(chan *tabletenv.LogStats, 1) ch <- logStats querylogzHandler(ch, response, req) close(ch) diff --git a/go/vt/vttablet/tabletserver/repltracker/reader.go b/go/vt/vttablet/tabletserver/repltracker/reader.go index 39f501e4540..5bbe62eb1bf 100644 --- a/go/vt/vttablet/tabletserver/repltracker/reader.go +++ b/go/vt/vttablet/tabletserver/repltracker/reader.go @@ -123,6 +123,9 @@ func (r *heartbeatReader) Close() { } r.ticks.Stop() r.pool.Close() + + currentLagNs.Set(0) + r.isOpen = false log.Info("Heartbeat Reader: closed") } diff --git a/go/vt/vttablet/tabletserver/repltracker/reader_test.go b/go/vt/vttablet/tabletserver/repltracker/reader_test.go index c4a8be6e692..87c5853f603 100644 --- a/go/vt/vttablet/tabletserver/repltracker/reader_test.go +++ b/go/vt/vttablet/tabletserver/repltracker/reader_test.go @@ -39,9 +39,13 @@ import ( func TestReaderReadHeartbeat(t *testing.T) { db := fakesqldb.New(t) defer db.Close() - tr := newReader(db, mockNowFunc) + + now := time.Now() + tr := newReader(db, &now) defer tr.Close() + tr.pool.Open(tr.env.Config().DB.AppWithDB(), tr.env.Config().DB.DbaWithDB(), tr.env.Config().DB.AppDebugWithDB()) + db.AddQuery(fmt.Sprintf("SELECT ts FROM %s.heartbeat WHERE keyspaceShard='%s'", "_vt", tr.keyspaceShard), &sqltypes.Result{ Fields: []*querypb.Field{ {Name: "ts", Type: sqltypes.Int64}, @@ -79,14 +83,46 @@ func TestReaderReadHeartbeat(t *testing.T) { utils.MustMatch(t, expectedHisto, heartbeatLagNsHistogram.Counts(), "wrong counts in histogram") } +// TestReaderCloseSetsCurrentLagToZero tests that when closing the heartbeat reader, the current lag is +// set to zero. +func TestReaderCloseSetsCurrentLagToZero(t *testing.T) { + db := fakesqldb.New(t) + defer db.Close() + tr := newReader(db, nil) + + db.AddQuery(fmt.Sprintf("SELECT ts FROM %s.heartbeat WHERE keyspaceShard='%s'", "_vt", tr.keyspaceShard), &sqltypes.Result{ + Fields: []*querypb.Field{ + {Name: "ts", Type: sqltypes.Int64}, + }, + Rows: [][]sqltypes.Value{{ + sqltypes.NewInt64(time.Now().Add(-10 * time.Second).UnixNano()), + }}, + }) + + currentLagNs.Reset() + + tr.Open() + time.Sleep(2 * time.Second) + + assert.Greater(t, currentLagNs.Get(), int64(0), "lag should be greater than zero") + + tr.Close() + + assert.Equal(t, int64(0), currentLagNs.Get(), "lag should be be zero after closing the reader.") +} + // TestReaderReadHeartbeatError tests that we properly account for errors // encountered in the reading of heartbeat. func TestReaderReadHeartbeatError(t *testing.T) { db := fakesqldb.New(t) defer db.Close() - tr := newReader(db, mockNowFunc) + + now := time.Now() + tr := newReader(db, &now) defer tr.Close() + tr.pool.Open(tr.env.Config().DB.AppWithDB(), tr.env.Config().DB.DbaWithDB(), tr.env.Config().DB.AppDebugWithDB()) + cumulativeLagNs.Reset() readErrors.Reset() @@ -100,18 +136,23 @@ func TestReaderReadHeartbeatError(t *testing.T) { assert.Equal(t, int64(1), readErrors.Get(), "wrong read error count") } -func newReader(db *fakesqldb.DB, nowFunc func() time.Time) *heartbeatReader { +func newReader(db *fakesqldb.DB, frozenTime *time.Time) *heartbeatReader { config := tabletenv.NewDefaultConfig() config.ReplicationTracker.Mode = tabletenv.Heartbeat config.ReplicationTracker.HeartbeatIntervalSeconds = 1 params, _ := db.ConnParams().MysqlParams() cp := *params dbc := dbconfigs.NewTestDBConfigs(cp, cp, "") + config.DB = dbc tr := newHeartbeatReader(tabletenv.NewEnv(config, "ReaderTest")) tr.keyspaceShard = "test:0" - tr.now = nowFunc - tr.pool.Open(dbc.AppWithDB(), dbc.DbaWithDB(), dbc.AppDebugWithDB()) + + if frozenTime != nil { + tr.now = func() time.Time { + return *frozenTime + } + } return tr } diff --git a/go/vt/vttablet/tabletserver/repltracker/writer_test.go b/go/vt/vttablet/tabletserver/repltracker/writer_test.go index 07ae3186877..733580f450d 100644 --- a/go/vt/vttablet/tabletserver/repltracker/writer_test.go +++ b/go/vt/vttablet/tabletserver/repltracker/writer_test.go @@ -30,18 +30,12 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) -var ( - now = time.Now() - mockNowFunc = func() time.Time { - return now - } -) - func TestWriteHeartbeat(t *testing.T) { db := fakesqldb.New(t) defer db.Close() - tw := newTestWriter(db, mockNowFunc) + now := time.Now() + tw := newTestWriter(db, &now) upsert := fmt.Sprintf("INSERT INTO %s.heartbeat (ts, tabletUid, keyspaceShard) VALUES (%d, %d, '%s') ON DUPLICATE KEY UPDATE ts=VALUES(ts), tabletUid=VALUES(tabletUid)", "_vt", now.UnixNano(), tw.tabletAlias.Uid, tw.keyspaceShard) db.AddQuery(upsert, &sqltypes.Result{}) @@ -58,7 +52,8 @@ func TestWriteHeartbeatError(t *testing.T) { db := fakesqldb.New(t) defer db.Close() - tw := newTestWriter(db, mockNowFunc) + now := time.Now() + tw := newTestWriter(db, &now) writes.Reset() writeErrors.Reset() @@ -68,7 +63,7 @@ func TestWriteHeartbeatError(t *testing.T) { assert.Equal(t, int64(1), writeErrors.Get()) } -func newTestWriter(db *fakesqldb.DB, nowFunc func() time.Time) *heartbeatWriter { +func newTestWriter(db *fakesqldb.DB, frozenTime *time.Time) *heartbeatWriter { config := tabletenv.NewDefaultConfig() config.ReplicationTracker.Mode = tabletenv.Heartbeat config.ReplicationTracker.HeartbeatIntervalSeconds = 1 @@ -79,7 +74,13 @@ func newTestWriter(db *fakesqldb.DB, nowFunc func() time.Time) *heartbeatWriter tw := newHeartbeatWriter(tabletenv.NewEnv(config, "WriterTest"), &topodatapb.TabletAlias{Cell: "test", Uid: 1111}) tw.keyspaceShard = "test:0" - tw.now = nowFunc + + if frozenTime != nil { + tw.now = func() time.Time { + return *frozenTime + } + } + tw.appPool.Open(dbc.AppWithDB()) tw.allPrivsPool.Open(dbc.AllPrivsWithDB()) diff --git a/go/vt/vttablet/tabletserver/schema/engine.go b/go/vt/vttablet/tabletserver/schema/engine.go index df8c0c06e3c..9fe1ef830e7 100644 --- a/go/vt/vttablet/tabletserver/schema/engine.go +++ b/go/vt/vttablet/tabletserver/schema/engine.go @@ -28,20 +28,19 @@ import ( "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sidecardb" - "vitess.io/vitess/go/stats" - "vitess.io/vitess/go/vt/dbconnpool" - "vitess.io/vitess/go/vt/schema" - "vitess.io/vitess/go/vt/servenv" - "vitess.io/vitess/go/vt/vtgate/evalengine" - "vitess.io/vitess/go/acl" "vitess.io/vitess/go/mysql" + "vitess.io/vitess/go/stats" "vitess.io/vitess/go/timer" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/dbconfigs" + "vitess.io/vitess/go/vt/dbconnpool" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/schema" + "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" + "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tabletserver/connpool" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" diff --git a/go/vt/vttablet/tabletserver/schema/historian.go b/go/vt/vttablet/tabletserver/schema/historian.go index 2714505d1df..ec03d70a235 100644 --- a/go/vt/vttablet/tabletserver/schema/historian.go +++ b/go/vt/vttablet/tabletserver/schema/historian.go @@ -21,8 +21,6 @@ import ( "sort" "sync" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/log" @@ -208,7 +206,7 @@ func (h *historian) readRow(row []sqltypes.Value) (*trackedSchema, int64, error) if err != nil { return nil, 0, err } - if err := proto.Unmarshal(rowBytes, sch); err != nil { + if err := sch.UnmarshalVT(rowBytes); err != nil { return nil, 0, err } log.V(vl).Infof("Read tracked schema from db: id %d, pos %v, ddl %s, schema len %d, time_updated %d \n", diff --git a/go/vt/vttablet/tabletserver/schema/historian_test.go b/go/vt/vttablet/tabletserver/schema/historian_test.go index c1a9a6416d4..8bdfa1c0d7f 100644 --- a/go/vt/vttablet/tabletserver/schema/historian_test.go +++ b/go/vt/vttablet/tabletserver/schema/historian_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" "vitess.io/vitess/go/sqltypes" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" @@ -65,7 +64,7 @@ func getDbSchemaBlob(t *testing.T, tables map[string]*binlogdatapb.MinimalTable) t.PKColumns = pks dbSchema.Tables = append(dbSchema.Tables, t) } - blob, err := proto.Marshal(dbSchema) + blob, err := dbSchema.MarshalVT() require.NoError(t, err) return string(blob) } diff --git a/go/vt/vttablet/tabletserver/schema/tracker.go b/go/vt/vttablet/tabletserver/schema/tracker.go index b0989c8958e..490ad59eadf 100644 --- a/go/vt/vttablet/tabletserver/schema/tracker.go +++ b/go/vt/vttablet/tabletserver/schema/tracker.go @@ -23,8 +23,6 @@ import ( "sync" "time" - "google.golang.org/protobuf/proto" - "vitess.io/vitess/go/vt/schema" "vitess.io/vitess/go/vt/sidecardb" @@ -229,7 +227,7 @@ func (tr *Tracker) saveCurrentSchemaToDb(ctx context.Context, gtid, ddl string, for _, table := range tables { dbSchema.Tables = append(dbSchema.Tables, newMinimalTable(table)) } - blob, _ := proto.Marshal(dbSchema) + blob, _ := dbSchema.MarshalVT() conn, err := tr.engine.GetConnection(ctx) if err != nil { diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go index 7b64016a38b..ebfdfedfefe 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config.go @@ -51,10 +51,10 @@ var ( // TxLogger can be used to enable logging of transactions. // Call TxLogger.ServeLogs in your main program to enable logging. // The log format can be inferred by looking at TxConnection.Format. - TxLogger = streamlog.New("TxLog", 10) + TxLogger = streamlog.New[any]("TxLog", 10) // StatsLogger is the main stream logger object - StatsLogger = streamlog.New("TabletServer", 50) + StatsLogger = streamlog.New[*LogStats]("TabletServer", 50) // The following vars are used for custom initialization of Tabletconfig. enableHotRowProtection bool @@ -183,6 +183,8 @@ func registerTabletEnvFlags(fs *pflag.FlagSet) { fs.Int64Var(¤tConfig.RowStreamer.MaxMySQLReplLagSecs, "vreplication_copy_phase_max_mysql_replication_lag", 43200, "The maximum MySQL replication lag (in seconds) that can exist on a vstreamer (source) before starting another round of copying rows. This helps to limit the impact on the source tablet.") fs.BoolVar(¤tConfig.EnableViews, "queryserver-enable-views", false, "Enable views support in vttablet.") + + fs.BoolVar(¤tConfig.EnablePerWorkloadTableMetrics, "enable-per-workload-table-metrics", defaultConfig.EnablePerWorkloadTableMetrics, "If true, query counts and query error metrics include a label that identifies the workload") } var ( @@ -326,6 +328,8 @@ type TabletConfig struct { RowStreamer RowStreamerConfig `json:"rowStreamer,omitempty"` EnableViews bool `json:"-"` + + EnablePerWorkloadTableMetrics bool `json:"-"` } // ConnPoolConfig contains the config for a conn pool. @@ -574,6 +578,8 @@ var defaultConfig = TabletConfig{ MaxInnoDBTrxHistLen: 1000000, MaxMySQLReplLagSecs: 43200, }, + + EnablePerWorkloadTableMetrics: false, } // defaultTxThrottlerConfig formats the default throttlerdata.Configuration diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index b0d8d5111d9..708237ed2d1 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -67,7 +67,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/txserializer" "vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler" "vitess.io/vitess/go/vt/vttablet/tabletserver/vstreamer" - "vitess.io/vitess/go/vt/vttablet/vexec" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" @@ -182,7 +181,7 @@ func NewTabletServer(name string, config *tabletenv.TabletConfig, topoServer *to tsv.tracker = schema.NewTracker(tsv, tsv.vstreamer, tsv.se) tsv.watcher = NewBinlogWatcher(tsv, tsv.vstreamer, tsv.config) tsv.qe = NewQueryEngine(tsv, tsv.se) - tsv.txThrottler = txthrottler.NewTxThrottler(tsv.config, topoServer) + tsv.txThrottler = txthrottler.NewTxThrottler(tsv, topoServer) tsv.te = NewTxEngine(tsv) tsv.messager = messager.NewEngine(tsv, tsv.se, tsv.vstreamer) @@ -458,11 +457,6 @@ func (tsv *TabletServer) QueryService() queryservice.QueryService { return tsv } -// OnlineDDLExecutor returns the onlineddl.Executor part of TabletServer. -func (tsv *TabletServer) OnlineDDLExecutor() vexec.Executor { - return tsv.onlineDDLExecutor -} - // LagThrottler returns the throttle.Throttler part of TabletServer. func (tsv *TabletServer) LagThrottler() *throttle.Throttler { return tsv.lagThrottler @@ -754,6 +748,7 @@ func (tsv *TabletServer) execute(ctx context.Context, target *querypb.Target, sq bindVariables = make(map[string]*querypb.BindVariable) } query, comments := sqlparser.SplitMarginComments(sql) + plan, err := tsv.qe.GetPlan(ctx, logStats, query, skipQueryPlanCache(options)) if err != nil { return err @@ -1438,6 +1433,7 @@ func (tsv *TabletServer) execRequest( span, ctx := trace.NewSpan(ctx, "TabletServer."+requestName) if options != nil { span.Annotate("isolation-level", options.TransactionIsolation) + span.Annotate("workload_name", options.WorkloadName) } trace.AnnotateSQL(span, sqlparser.Preview(sql)) if target != nil { @@ -1445,6 +1441,7 @@ func (tsv *TabletServer) execRequest( span.Annotate("shard", target.Shard) span.Annotate("keyspace", target.Keyspace) } + defer span.Finish() logStats := tabletenv.NewLogStats(ctx, requestName) diff --git a/go/vt/vttablet/tabletserver/tabletserver_test.go b/go/vt/vttablet/tabletserver/tabletserver_test.go index 7cb2a3d4ee2..9e61b70e044 100644 --- a/go/vt/vttablet/tabletserver/tabletserver_test.go +++ b/go/vt/vttablet/tabletserver/tabletserver_test.go @@ -749,12 +749,7 @@ func TestTabletServerStreamExecuteComments(t *testing.T) { wantSQL := executeSQL select { - case out := <-ch: - stats, ok := out.(*tabletenv.LogStats) - if !ok { - t.Errorf("Unexpected value in query logs: %#v (expecting value of type %T)", out, &tabletenv.LogStats{}) - } - + case stats := <-ch: if wantSQL != stats.OriginalSQL { t.Errorf("logstats: SQL want %s got %s", wantSQL, stats.OriginalSQL) } diff --git a/go/vt/vttablet/tabletserver/txlogz.go b/go/vt/vttablet/tabletserver/txlogz.go index 0dcfd51af0a..644d1b4b4e2 100644 --- a/go/vt/vttablet/tabletserver/txlogz.go +++ b/go/vt/vttablet/tabletserver/txlogz.go @@ -28,10 +28,9 @@ import ( "vitess.io/vitess/go/vt/callerid" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logz" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" - querypb "vitess.io/vitess/go/vt/proto/query" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) var ( diff --git a/go/vt/vttablet/tabletserver/txlogz_test.go b/go/vt/vttablet/tabletserver/txlogz_test.go index 1a2cd1a06af..319669a0023 100644 --- a/go/vt/vttablet/tabletserver/txlogz_test.go +++ b/go/vt/vttablet/tabletserver/txlogz_test.go @@ -23,12 +23,12 @@ import ( "testing" "time" + "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" "vitess.io/vitess/go/vt/callerid" "vitess.io/vitess/go/streamlog" - "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" ) func testNotRedacted(t *testing.T, r *httptest.ResponseRecorder) { diff --git a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go index 5b724ca97cf..d9c2294a808 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go +++ b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go @@ -28,6 +28,7 @@ import ( "context" + "vitess.io/vitess/go/stats" "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/throttler" @@ -77,19 +78,28 @@ type TxThrottler struct { state *txThrottlerState target *querypb.Target + + // stats + throttlerRunning *stats.Gauge + requestsTotal *stats.Counter + requestsThrottled *stats.Counter } +// TxThrottlerName is the name the wrapped go/vt/throttler object will be registered with +// go/vt/throttler.GlobalManager. +const TxThrottlerName = "TransactionThrottler" + // NewTxThrottler tries to construct a TxThrottler from the // relevant fields in the tabletenv.Config object. It returns a disabled TxThrottler if // any error occurs. // This function calls tryCreateTxThrottler that does the actual creation work // and returns an error if one occurred. -func NewTxThrottler(config *tabletenv.TabletConfig, topoServer *topo.Server) *TxThrottler { - txThrottler, err := tryCreateTxThrottler(config, topoServer) +func NewTxThrottler(env tabletenv.Env, topoServer *topo.Server) *TxThrottler { + txThrottler, err := tryCreateTxThrottler(env, topoServer) if err != nil { log.Errorf("Error creating transaction throttler. Transaction throttling will"+ " be disabled. Error: %v", err) - txThrottler, err = newTxThrottler(&txThrottlerConfig{enabled: false}) + txThrottler, err = newTxThrottler(env, &txThrottlerConfig{enabled: false}) if err != nil { panic("BUG: Can't create a disabled transaction throttler") } @@ -104,22 +114,22 @@ func (t *TxThrottler) InitDBConfig(target *querypb.Target) { t.target = proto.Clone(target).(*querypb.Target) } -func tryCreateTxThrottler(config *tabletenv.TabletConfig, topoServer *topo.Server) (*TxThrottler, error) { - if !config.EnableTxThrottler { - return newTxThrottler(&txThrottlerConfig{enabled: false}) +func tryCreateTxThrottler(env tabletenv.Env, topoServer *topo.Server) (*TxThrottler, error) { + if !env.Config().EnableTxThrottler { + return newTxThrottler(env, &txThrottlerConfig{enabled: false}) } var throttlerConfig throttlerdatapb.Configuration - if err := prototext.Unmarshal([]byte(config.TxThrottlerConfig), &throttlerConfig); err != nil { + if err := prototext.Unmarshal([]byte(env.Config().TxThrottlerConfig), &throttlerConfig); err != nil { return nil, err } // Clone tsv.TxThrottlerHealthCheckCells so that we don't assume tsv.TxThrottlerHealthCheckCells // is immutable. - healthCheckCells := make([]string, len(config.TxThrottlerHealthCheckCells)) - copy(healthCheckCells, config.TxThrottlerHealthCheckCells) + healthCheckCells := make([]string, len(env.Config().TxThrottlerHealthCheckCells)) + copy(healthCheckCells, env.Config().TxThrottlerHealthCheckCells) - return newTxThrottler(&txThrottlerConfig{ + return newTxThrottler(env, &txThrottlerConfig{ enabled: true, topoServer: topoServer, throttlerConfig: &throttlerConfig, @@ -205,11 +215,7 @@ func resetTxThrottlerFactories() { } } -// TxThrottlerName is the name the wrapped go/vt/throttler object will be registered with -// go/vt/throttler.GlobalManager. -const TxThrottlerName = "TransactionThrottler" - -func newTxThrottler(config *txThrottlerConfig) (*TxThrottler, error) { +func newTxThrottler(env tabletenv.Env, config *txThrottlerConfig) (*TxThrottler, error) { if config.enabled { // Verify config. err := throttler.MaxReplicationLagModuleConfig{Configuration: config.throttlerConfig}.Verify() @@ -221,7 +227,10 @@ func newTxThrottler(config *txThrottlerConfig) (*TxThrottler, error) { } } return &TxThrottler{ - config: config, + config: config, + throttlerRunning: env.Exporter().NewGauge("TransactionThrottlerRunning", "transaction throttler running state"), + requestsTotal: env.Exporter().NewCounter("TransactionThrottlerRequests", "transaction throttler requests"), + requestsThrottled: env.Exporter().NewCounter("TransactionThrottlerThrottled", "transaction throttler requests throttled"), }, nil } @@ -234,6 +243,7 @@ func (t *TxThrottler) Open() error { return nil } log.Info("TxThrottler: opening") + t.throttlerRunning.Set(1) var err error t.state, err = newTxThrottlerState(t.config, t.target.Keyspace, t.target.Shard, t.target.Cell) return err @@ -251,6 +261,7 @@ func (t *TxThrottler) Close() { } t.state.deallocateResources() t.state = nil + t.throttlerRunning.Set(0) log.Info("TxThrottler: closed") } @@ -265,7 +276,12 @@ func (t *TxThrottler) Throttle() (result bool) { if t.state == nil { panic("BUG: Throttle() called on a closed TxThrottler") } - return t.state.throttle() + result = t.state.throttle() + t.requestsTotal.Add(1) + if result { + t.requestsThrottled.Add(1) + } + return result } func newTxThrottlerState(config *txThrottlerConfig, keyspace, shard, cell string) (*txThrottlerState, error) { diff --git a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go index 1606fa2cf4c..8eafa64b458 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go +++ b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler_test.go @@ -26,6 +26,7 @@ import ( "time" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/topo" @@ -39,17 +40,15 @@ import ( func TestDisabledThrottler(t *testing.T) { config := tabletenv.NewDefaultConfig() config.EnableTxThrottler = false - throttler := NewTxThrottler(config, nil) + env := tabletenv.NewEnv(config, t.Name()) + throttler := NewTxThrottler(env, nil) throttler.InitDBConfig(&querypb.Target{ Keyspace: "keyspace", Shard: "shard", }) - if err := throttler.Open(); err != nil { - t.Fatalf("want: nil, got: %v", err) - } - if result := throttler.Throttle(); result != false { - t.Errorf("want: false, got: %v", result) - } + assert.Nil(t, throttler.Open()) + assert.False(t, throttler.Throttle()) + assert.Zero(t, throttler.throttlerRunning.Get()) throttler.Close() } @@ -70,18 +69,10 @@ func TestEnabledThrottler(t *testing.T) { } topologyWatcherFactory = func(topoServer *topo.Server, hc discovery.HealthCheck, cell, keyspace, shard string, refreshInterval time.Duration, topoReadConcurrency int) TopologyWatcherInterface { - if ts != topoServer { - t.Errorf("want: %v, got: %v", ts, topoServer) - } - if cell != "cell1" && cell != "cell2" { - t.Errorf("want: cell1 or cell2, got: %v", cell) - } - if keyspace != "keyspace" { - t.Errorf("want: keyspace, got: %v", keyspace) - } - if shard != "shard" { - t.Errorf("want: shard, got: %v", shard) - } + assert.Equal(t, ts, topoServer) + assert.Contains(t, []string{"cell1", "cell2"}, cell) + assert.Equal(t, "keyspace", keyspace) + assert.Equal(t, "shard", shard) result := NewMockTopologyWatcherInterface(mockCtrl) result.EXPECT().Stop() return result @@ -89,9 +80,7 @@ func TestEnabledThrottler(t *testing.T) { mockThrottler := NewMockThrottlerInterface(mockCtrl) throttlerFactory = func(name, unit string, threadCount int, maxRate, maxReplicationLag int64) (ThrottlerInterface, error) { - if threadCount != 1 { - t.Errorf("want: 1, got: %v", threadCount) - } + assert.Equal(t, 1, threadCount) return mockThrottler, nil } @@ -115,21 +104,21 @@ func TestEnabledThrottler(t *testing.T) { config := tabletenv.NewDefaultConfig() config.EnableTxThrottler = true config.TxThrottlerHealthCheckCells = []string{"cell1", "cell2"} + env := tabletenv.NewEnv(config, t.Name()) - throttler, err := tryCreateTxThrottler(config, ts) - if err != nil { - t.Fatalf("want: nil, got: %v", err) - } + throttler, err := tryCreateTxThrottler(env, ts) + assert.Nil(t, err) throttler.InitDBConfig(&querypb.Target{ Keyspace: "keyspace", Shard: "shard", }) - if err := throttler.Open(); err != nil { - t.Fatalf("want: nil, got: %v", err) - } - if result := throttler.Throttle(); result != false { - t.Errorf("want: false, got: %v", result) - } + assert.Nil(t, throttler.Open()) + assert.Equal(t, int64(1), throttler.throttlerRunning.Get()) + + assert.False(t, throttler.Throttle()) + assert.Equal(t, int64(1), throttler.requestsTotal.Get()) + assert.Zero(t, throttler.requestsThrottled.Get()) + throttler.state.StatsUpdate(tabletStats) rdonlyTabletStats := &discovery.TabletHealth{ Target: &querypb.Target{ @@ -139,8 +128,9 @@ func TestEnabledThrottler(t *testing.T) { // This call should not be forwarded to the go/vt/throttler.Throttler object. throttler.state.StatsUpdate(rdonlyTabletStats) // The second throttle call should reject. - if result := throttler.Throttle(); result != true { - t.Errorf("want: true, got: %v", result) - } + assert.True(t, throttler.Throttle()) + assert.Equal(t, int64(2), throttler.requestsTotal.Get()) + assert.Equal(t, int64(1), throttler.requestsThrottled.Get()) throttler.Close() + assert.Zero(t, throttler.throttlerRunning.Get()) } diff --git a/go/vt/vttablet/tabletserver/vstreamer/copy.go b/go/vt/vttablet/tabletserver/vstreamer/copy.go index 0065555047d..62b93cf5063 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/copy.go +++ b/go/vt/vttablet/tabletserver/vstreamer/copy.go @@ -262,7 +262,7 @@ func (uvs *uvstreamer) copyTable(ctx context.Context, tableName string) error { } newLastPK = sqltypes.CustomProto3ToResult(uvs.pkfields, &querypb.QueryResult{ - Fields: rows.Fields, + Fields: uvs.pkfields, Rows: []*querypb.Row{rows.Lastpk}, }) qrLastPK := sqltypes.ResultToProto3(newLastPK) diff --git a/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go b/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go index d45dceda1b5..aa218411301 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go +++ b/go/vt/vttablet/tabletserver/vstreamer/planbuilder.go @@ -23,8 +23,6 @@ import ( "strconv" "strings" - "vitess.io/vitess/go/vt/vtgate/semantics" - "vitess.io/vitess/go/mysql/collations" "vitess.io/vitess/go/vt/vtgate/evalengine" @@ -531,7 +529,7 @@ func (plan *Plan) analyzeWhere(vschema *localVSchema, where *sqlparser.Where) er if val.Type != sqlparser.IntVal && val.Type != sqlparser.StrVal { return fmt.Errorf("unexpected: %v", sqlparser.String(expr)) } - pv, err := evalengine.Translate(val, semantics.EmptySemTable()) + pv, err := evalengine.Translate(val, nil) if err != nil { return err } diff --git a/go/vt/vttablet/tabletserver/vstreamer/uvstreamer.go b/go/vt/vttablet/tabletserver/vstreamer/uvstreamer.go index 2584a166226..e26b6f2939f 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/uvstreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/uvstreamer.go @@ -216,7 +216,7 @@ func getQuery(tableName string, filter string) string { buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v", sqlparser.NewIdentifierCS(tableName)) query = buf.String() - case key.IsKeyRange(filter): + case key.IsValidKeyRange(filter): buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("select * from %v where in_keyrange(%v)", sqlparser.NewIdentifierCS(tableName), sqlparser.NewStrLiteral(filter)) diff --git a/go/vt/vttablet/tabletserver/vstreamer/uvstreamer_flaky_test.go b/go/vt/vttablet/tabletserver/vstreamer/uvstreamer_flaky_test.go index 610b9012f7f..8ca43f008b6 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/uvstreamer_flaky_test.go +++ b/go/vt/vttablet/tabletserver/vstreamer/uvstreamer_flaky_test.go @@ -477,7 +477,7 @@ var expectedEvents = []string{ "type:ROW row_event:{table_name:\"t1\" row_changes:{after:{lengths:1 lengths:2 values:\"880\"}}}", "type:ROW row_event:{table_name:\"t1\" row_changes:{after:{lengths:1 lengths:2 values:\"990\"}}}", "type:ROW row_event:{table_name:\"t1\" row_changes:{after:{lengths:2 lengths:3 values:\"10100\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\" lastpk:{rows:{lengths:2 values:\"10\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\" lastpk:{fields:{name:\"id11\" type:INT32} rows:{lengths:2 values:\"10\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\"} completed:true}", @@ -506,7 +506,7 @@ var expectedEvents = []string{ "type:ROW row_event:{table_name:\"t2\" row_changes:{after:{lengths:1 lengths:3 values:\"9180\"}}}", "type:ROW row_event:{table_name:\"t2\" row_changes:{after:{lengths:2 lengths:3 values:\"10200\"}}}", "type:ROW row_event:{table_name:\"t2\" row_changes:{after:{lengths:2 lengths:3 values:\"11220\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2\" lastpk:{rows:{lengths:2 values:\"11\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2\" lastpk:{fields:{name:\"id21\" type:INT32} rows:{lengths:2 values:\"11\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2\"} completed:true}", @@ -534,7 +534,7 @@ var expectedEvents = []string{ "type:ROW row_event:{table_name:\"t3\" row_changes:{after:{lengths:1 lengths:3 values:\"8240\"}}}", "type:ROW row_event:{table_name:\"t3\" row_changes:{after:{lengths:1 lengths:3 values:\"9270\"}}}", "type:ROW row_event:{table_name:\"t3\" row_changes:{after:{lengths:2 lengths:3 values:\"10300\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t3\" lastpk:{rows:{lengths:2 values:\"10\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t3\" lastpk:{fields:{name:\"id31\" type:INT32} rows:{lengths:2 values:\"10\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t3\"} completed:true}", diff --git a/go/vt/vttablet/tabletserver/vstreamer/vstreamer_flaky_test.go b/go/vt/vttablet/tabletserver/vstreamer/vstreamer_flaky_test.go index 72ad570ac66..2a1c60ed57f 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/vstreamer_flaky_test.go +++ b/go/vt/vttablet/tabletserver/vstreamer/vstreamer_flaky_test.go @@ -279,7 +279,7 @@ func TestVersion(t *testing.T) { Name: "t1", }}, } - blob, _ := proto.Marshal(dbSchema) + blob, _ := dbSchema.MarshalVT() engine.se.Reload(context.Background()) gtid := "MariaDB/0-41983-20" testcases := []testcase{{ @@ -507,7 +507,7 @@ func TestVStreamCopyWithDifferentFilters(t *testing.T) { "type:FIELD field_event:{table_name:\"t1\" fields:{name:\"id1\" type:INT32 table:\"t1\" org_table:\"t1\" database:\"vttest\" org_name:\"id1\" column_length:11 charset:63} fields:{name:\"id2\" type:INT32 table:\"t1\" org_table:\"t1\" database:\"vttest\" org_name:\"id2\" column_length:11 charset:63}}", "type:GTID", "type:ROW row_event:{table_name:\"t1\" row_changes:{after:{lengths:1 lengths:1 values:\"12\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\" lastpk:{rows:{lengths:1 values:\"1\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\" lastpk:{fields:{name:\"id1\" type:INT32} rows:{lengths:1 values:\"1\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t1\"} completed:true}", @@ -515,7 +515,7 @@ func TestVStreamCopyWithDifferentFilters(t *testing.T) { "type:BEGIN", "type:FIELD field_event:{table_name:\"t2a\" fields:{name:\"id1\" type:INT32 table:\"t2a\" org_table:\"t2a\" database:\"vttest\" org_name:\"id1\" column_length:11 charset:63} fields:{name:\"id2\" type:INT32 table:\"t2a\" org_table:\"t2a\" database:\"vttest\" org_name:\"id2\" column_length:11 charset:63}}", "type:ROW row_event:{table_name:\"t2a\" row_changes:{after:{lengths:1 lengths:1 values:\"14\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2a\" lastpk:{rows:{lengths:1 values:\"1\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2a\" lastpk:{fields:{name:\"id1\" type:INT32} rows:{lengths:1 values:\"1\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2a\"} completed:true}", @@ -524,7 +524,7 @@ func TestVStreamCopyWithDifferentFilters(t *testing.T) { "type:FIELD field_event:{table_name:\"t2b\" fields:{name:\"id1\" type:VARCHAR table:\"t2b\" org_table:\"t2b\" database:\"vttest\" org_name:\"id1\" column_length:80 charset:45} fields:{name:\"id2\" type:INT32 table:\"t2b\" org_table:\"t2b\" database:\"vttest\" org_name:\"id2\" column_length:11 charset:63}}", "type:ROW row_event:{table_name:\"t2b\" row_changes:{after:{lengths:1 lengths:1 values:\"a5\"}}}", "type:ROW row_event:{table_name:\"t2b\" row_changes:{after:{lengths:1 lengths:1 values:\"b6\"}}}", - "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2b\" lastpk:{rows:{lengths:1 values:\"b\"}}}}", + "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2b\" lastpk:{fields:{name:\"id1\" type:VARCHAR} rows:{lengths:1 values:\"b\"}}}}", "type:COMMIT", "type:BEGIN", "type:LASTPK last_p_k_event:{table_last_p_k:{table_name:\"t2b\"} completed:true}", diff --git a/go/vt/vttablet/tabletservermock/controller.go b/go/vt/vttablet/tabletservermock/controller.go index edeb0c885f2..0a26f71bfd3 100644 --- a/go/vt/vttablet/tabletservermock/controller.go +++ b/go/vt/vttablet/tabletservermock/controller.go @@ -34,7 +34,6 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/rules" "vitess.io/vitess/go/vt/vttablet/tabletserver/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv" - "vitess.io/vitess/go/vt/vttablet/vexec" querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -176,11 +175,6 @@ func (tqsc *Controller) ReloadSchema(ctx context.Context) error { return nil } -// OnlineDDLExecutor is part of the tabletserver.Controller interface -func (tqsc *Controller) OnlineDDLExecutor() vexec.Executor { - return nil -} - // ClearQueryPlanCache is part of the tabletserver.Controller interface func (tqsc *Controller) ClearQueryPlanCache() { } diff --git a/go/vt/vttablet/tmclient/rpc_client_api.go b/go/vt/vttablet/tmclient/rpc_client_api.go index 7a97422bdc2..710d8df64d7 100644 --- a/go/vt/vttablet/tmclient/rpc_client_api.go +++ b/go/vt/vttablet/tmclient/rpc_client_api.go @@ -169,12 +169,10 @@ type TabletManagerClient interface { // WaitForPosition waits for the position to be reached WaitForPosition(ctx context.Context, tablet *topodatapb.Tablet, pos string) error - // VExec executes a generic VExec command - VExec(ctx context.Context, tablet *topodatapb.Tablet, query, workflow, keyspace string) (*querypb.QueryResult, error) - // VReplicationExec executes a VReplication command VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error) - VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error + VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int32, pos string) error + UpdateVRWorkflow(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) VDiff(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error) diff --git a/go/vt/vttablet/tmrpctest/test_tm_rpc.go b/go/vt/vttablet/tmrpctest/test_tm_rpc.go index c66150a56bd..5342c3dfb2e 100644 --- a/go/vt/vttablet/tmrpctest/test_tm_rpc.go +++ b/go/vt/vttablet/tmrpctest/test_tm_rpc.go @@ -26,10 +26,9 @@ import ( "testing" "time" - "vitess.io/vitess/go/mysql" - "google.golang.org/protobuf/proto" + "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/protoutil" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/hook" @@ -55,6 +54,11 @@ type fakeRPCTM struct { mu sync.Mutex } +func (fra *fakeRPCTM) UpdateVRWorkflow(ctx context.Context, req *tabletmanagerdatapb.UpdateVRWorkflowRequest) (*tabletmanagerdatapb.UpdateVRWorkflowResponse, error) { + //TODO implement me + panic("implement me") +} + func (fra *fakeRPCTM) VDiff(ctx context.Context, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error) { //TODO implement me panic("implement me") @@ -902,14 +906,6 @@ func tmRPCTestGetReplicasPanic(ctx context.Context, t *testing.T, client tmclien expectHandleRPCPanic(t, "GetReplicas", false /*verbose*/, err) } -func (fra *fakeRPCTM) VExec(ctx context.Context, query, workflow, keyspace string) (*querypb.QueryResult, error) { - if fra.panics { - panic(fmt.Errorf("test-triggered panic")) - } - compare(fra.t, "VExec query", query, "query") - return testExecuteFetchResult, nil -} - var testVRQuery = "query" func (fra *fakeRPCTM) VReplicationExec(ctx context.Context, query string) (*querypb.QueryResult, error) { @@ -931,11 +927,11 @@ func tmRPCTestVReplicationExecPanic(ctx context.Context, t *testing.T, client tm } var ( - wfpid = 3 + wfpid = int32(3) wfppos = "" ) -func (fra *fakeRPCTM) VReplicationWaitForPos(ctx context.Context, id int, pos string) error { +func (fra *fakeRPCTM) VReplicationWaitForPos(ctx context.Context, id int32, pos string) error { if fra.panics { panic(fmt.Errorf("test-triggered panic")) } diff --git a/go/vt/vttablet/vexec/executor.go b/go/vt/vttablet/vexec/executor.go deleted file mode 100644 index 27c4590432a..00000000000 --- a/go/vt/vttablet/vexec/executor.go +++ /dev/null @@ -1,12 +0,0 @@ -package vexec - -import ( - "context" - - querypb "vitess.io/vitess/go/vt/proto/query" -) - -// Executor should be implemented by any tablet-side structs which accept VExec commands -type Executor interface { - VExec(ctx context.Context, vx *TabletVExec) (qr *querypb.QueryResult, err error) -} diff --git a/go/vt/vttablet/vexec/vexec.go b/go/vt/vttablet/vexec/vexec.go deleted file mode 100644 index 94696c0c8e8..00000000000 --- a/go/vt/vttablet/vexec/vexec.go +++ /dev/null @@ -1,226 +0,0 @@ -package vexec - -import ( - "context" - "errors" - "fmt" - - "vitess.io/vitess/go/vt/sqlparser" -) - -const ( - // TableQualifier is the standard schema used by VExec commands - TableQualifier = "_vt" -) - -var ( - // ErrColumNotFound is returned when we expect some column to exist and it does not - ErrColumNotFound = errors.New("Column not found") -) - -// ValColumns map column name to Literal, for col=Val expressions in a WHERE clause -type ValColumns map[string](*sqlparser.Literal) - -// TabletVExec is a utility structure, created when a VExec command is intercepted on the tablet. -// This structure will parse and analyze the query, and make available some useful data. -// VExec interceptors receive an instance of this struct so they can run more analysis/checks -// on the given query, and potentially modify it. -type TabletVExec struct { - Workflow string - Keyspace string - Query string - Stmt sqlparser.Statement - TableName string - WhereCols ValColumns - UpdateCols ValColumns - InsertCols ValColumns -} - -// NewTabletVExec creates a new instance of TabletVExec -func NewTabletVExec(workflow, keyspace string) *TabletVExec { - return &TabletVExec{ - Workflow: workflow, - Keyspace: keyspace, - } -} - -// ToStringVal converts a string to a string -typed Literal -func (e *TabletVExec) ToStringVal(val string) *sqlparser.Literal { - return &sqlparser.Literal{ - Type: sqlparser.StrVal, - Val: val, - } -} - -// ColumnStringVal returns a string value from a given column, or error if the column is not found -func (e *TabletVExec) ColumnStringVal(columns ValColumns, colName string) (string, error) { - val, ok := columns[colName] - if !ok { - return "", fmt.Errorf("Could not find value for column %s", colName) - } - return string(val.Val), nil -} - -// SetColumnStringVal modifies a column value into a given string -func (e *TabletVExec) SetColumnStringVal(columns ValColumns, colName string, val string) { - columns[colName] = e.ToStringVal(val) -} - -// analyzeWhereColumns identifies column names in a WHERE clause that have a comparison expression -// e.g. will return `keyspace` in a "WHERE keyspace='abc'" -// will not return `keyspace` in a "WHERE keyspace LIKE '%'" -func (e *TabletVExec) analyzeWhereEqualsColumns(where *sqlparser.Where) ValColumns { - cols := ValColumns{} - if where == nil { - return cols - } - exprs := sqlparser.SplitAndExpression(nil, where.Expr) - for _, expr := range exprs { - switch expr := expr.(type) { - case *sqlparser.ComparisonExpr: - if expr.Operator != sqlparser.EqualOp { - continue - } - qualifiedName, ok := expr.Left.(*sqlparser.ColName) - if !ok { - continue - } - if val, ok := expr.Right.(*sqlparser.Literal); ok { - cols[qualifiedName.Name.String()] = val - } - } - } - return cols -} - -// analyzeUpdateColumns analyses the columns modified by an UPDATE statement. -// it returns the columns that are updated with a literal -// e.g. in this statement: UPDATE tbl SET name='foo', val=3, status=other_column+2 -// the function returns name: 'foo' and val: 3, but does not return `status` column -func (e *TabletVExec) analyzeUpdateColumns(update *sqlparser.Update) ValColumns { - cols := ValColumns{} - for _, col := range update.Exprs { - if val, ok := col.Expr.(*sqlparser.Literal); ok { - cols[col.Name.Name.Lowered()] = val - } - } - return cols -} - -// analyzeInsertColumns analyses the columns and values given in an INSERT statement -func (e *TabletVExec) analyzeInsertColumns(insert *sqlparser.Insert) ValColumns { - cols := ValColumns{} - - rows, ok := insert.Rows.(sqlparser.Values) - if !ok { - return cols - } - - if len(rows) != 1 { - return cols - } - for i, col := range insert.Columns { - expr := rows[0][i] - if val, ok := expr.(*sqlparser.Literal); ok { - cols[col.Lowered()] = val - } - } - return cols -} - -// ReplaceInsertColumnVal manipulates the existing INSERT statement to replace a column value -// into a given value -func (e *TabletVExec) ReplaceInsertColumnVal(colName string, val *sqlparser.Literal) error { - insert, ok := e.Stmt.(*sqlparser.Insert) - if !ok { - return fmt.Errorf("Not an INSERT statement") - } - rows, ok := insert.Rows.(sqlparser.Values) - if !ok { - return fmt.Errorf("Not a Values type INSERT") - } - if len(rows) != 1 { - return fmt.Errorf("Not a single row INSERT") - } - for i, col := range insert.Columns { - if col.Lowered() == colName { - rows[0][i] = val - e.InsertCols[colName] = val - e.Query = sqlparser.String(e.Stmt) - return nil - } - } - return ErrColumNotFound -} - -// AddOrReplaceInsertColumnVal manipulates the existing INSERT statement to replace a column value -// into a given value -func (e *TabletVExec) AddOrReplaceInsertColumnVal(colName string, val *sqlparser.Literal) error { - if err := e.ReplaceInsertColumnVal(colName, val); err != ErrColumNotFound { - return err - } - // We know the query is a valid single row INSERT - // We know column is not found. We need to add it. - - insert, _ := e.Stmt.(*sqlparser.Insert) - rows, _ := insert.Rows.(sqlparser.Values) - rows[0] = append(rows[0], val) - insert.Columns = append(insert.Columns, sqlparser.NewIdentifierCI(colName)) - e.InsertCols[colName] = val - e.Query = sqlparser.String(e.Stmt) - - return nil -} - -// analyzeStatement analyzes a given statement and produces the following ingredients, useful for -// VExec interceptors: -// - table name -// - column names with values, for col=VAL in a WHERE expression -// e.g. in "UPDATE my_table SET ... WHERE keyspace='test' AND shard='-80' AND status > 2", the -// ValColumns are "keyspace" and "shard" with matching values. `status` is a range operator therefore -// not included.package vexec -// Equals operator is of special importance because it is known to filter results. An interceptor may -// require, for example, that a `DELETE` statement includes a WHERE with a UNIQUE KEY column with Equals operator -// to ensure we're not doing anything too risky. -func (e *TabletVExec) analyzeStatement() error { - switch stmt := e.Stmt.(type) { - case *sqlparser.Update: - e.TableName = sqlparser.String(stmt.TableExprs) - e.WhereCols = e.analyzeWhereEqualsColumns(stmt.Where) - e.UpdateCols = e.analyzeUpdateColumns(stmt) - case *sqlparser.Delete: - e.TableName = sqlparser.String(stmt.TableExprs) - e.WhereCols = e.analyzeWhereEqualsColumns(stmt.Where) - case *sqlparser.Insert: - e.TableName = sqlparser.String(stmt.Table) - e.InsertCols = e.analyzeInsertColumns(stmt) - case *sqlparser.Select: - e.TableName = sqlparser.ToString(stmt.From) - e.WhereCols = e.analyzeWhereEqualsColumns(stmt.Where) - default: - return fmt.Errorf("query not supported by vexec: %+v", sqlparser.String(stmt)) - } - return nil -} - -// AnalyzeQuery analyzes a given statement and produces the following ingredients, useful for -// VExec interceptors: -// - parsed statement -// - table name -// - column names with values, for col=VAL in a WHERE expression -// e.g. in "UPDATE my_table SET ... WHERE keyspace='test' AND shard='-80' AND status > 2", the -// ValColumns are "keyspace" and "shard" with matching values. `status` is a range operator therefore -// not included.package vexec -// Equals operator is of special importance because it is known to filter results. An interceptor may -// require, for example, that a `DELETE` statement includes a WHERE with a UNIQUE KEY column with Equals operator -// to ensure we're not doing anything too risky. -func (e *TabletVExec) AnalyzeQuery(ctx context.Context, query string) (err error) { - if e.Stmt, err = sqlparser.Parse(query); err != nil { - return err - } - e.Query = query - if err := e.analyzeStatement(); err != nil { - return err - } - return nil -} diff --git a/go/vt/vttablet/vexec/vexec_test.go b/go/vt/vttablet/vexec/vexec_test.go deleted file mode 100644 index 715ec0e6475..00000000000 --- a/go/vt/vttablet/vexec/vexec_test.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vexec - -import ( - "context" - "testing" - - "vitess.io/vitess/go/vt/sqlparser" - - "github.com/stretchr/testify/assert" -) - -const ( - tWorkflow = "myworkflow" - tKeyspace = "mykeyspace" -) - -func TestNewTabletVExec(t *testing.T) { - vx := NewTabletVExec(tWorkflow, tKeyspace) - assert.NotNil(t, vx) - assert.Equal(t, vx.Workflow, tWorkflow) - assert.Equal(t, vx.Keyspace, tKeyspace) -} - -func TestAnalyzeQuerySelect1(t *testing.T) { - query := `select migration_status, strategy from _vt.schema_migrations where migration_uuid='123'` - vx := NewTabletVExec(tWorkflow, tKeyspace) - err := vx.AnalyzeQuery(context.Background(), query) - assert.NoError(t, err) - - assert.Equal(t, vx.Query, query) - assert.Equal(t, vx.TableName, "_vt.schema_migrations") - - _, ok := vx.WhereCols["migration_uuid"] - assert.True(t, ok) - _, ok = vx.WhereCols["strategy"] - assert.False(t, ok) - - _, ok = vx.UpdateCols["strategy"] - assert.False(t, ok) -} -func TestAnalyzeQuerySelect2(t *testing.T) { - query := `select migration_status, strategy from _vt.schema_migrations where migration_uuid='123' or requested_timestamp 1000 { - serverId = serverId % 1000 + serverID, _ := strconv.ParseUint(zkID, 10, 32) + if serverID > 1000 { + serverID = serverID % 1000 zkConfig.Global = true } myID = myID % 1000 - zkServer := zkServerAddr{ServerId: uint32(serverId), ClientPort: 2181, + zkServer := zkServerAddr{ServerId: uint32(serverID), ClientPort: 2181, LeaderPort: 2888, ElectionPort: 3888} switch len(zkAddrParts) { case 4: diff --git a/go/vt/zkctl/zkctl.go b/go/vt/zkctl/zkctl.go index 293d5e749ec..acb8dba6356 100644 --- a/go/vt/zkctl/zkctl.go +++ b/go/vt/zkctl/zkctl.go @@ -234,7 +234,6 @@ func (zkd *Zkd) Teardown() error { } var removalErr error for _, dir := range zkd.config.DirectoryList() { - log.V(6).Infof("remove data dir %v", dir) if err := os.RemoveAll(dir); err != nil { log.Errorf("failed removing %v: %v", dir, err.Error()) removalErr = err diff --git a/java/client/pom.xml b/java/client/pom.xml index 932e48a15f1..b6b75a5466f 100644 --- a/java/client/pom.xml +++ b/java/client/pom.xml @@ -5,7 +5,7 @@ io.vitess vitess-parent - 16.0.1-SNAPSHOT + 17.0.0-SNAPSHOT vitess-client diff --git a/java/example/pom.xml b/java/example/pom.xml index d90df15d5a5..f044dfa8e6a 100644 --- a/java/example/pom.xml +++ b/java/example/pom.xml @@ -5,7 +5,7 @@ io.vitess vitess-parent - 16.0.1-SNAPSHOT + 17.0.0-SNAPSHOT vitess-example diff --git a/java/grpc-client/pom.xml b/java/grpc-client/pom.xml index ff12fbb6fd6..01987f06beb 100644 --- a/java/grpc-client/pom.xml +++ b/java/grpc-client/pom.xml @@ -5,7 +5,7 @@ io.vitess vitess-parent - 16.0.1-SNAPSHOT + 17.0.0-SNAPSHOT vitess-grpc-client diff --git a/java/jdbc/pom.xml b/java/jdbc/pom.xml index c85f2c7c246..eb7738ea67b 100644 --- a/java/jdbc/pom.xml +++ b/java/jdbc/pom.xml @@ -5,7 +5,7 @@ io.vitess vitess-parent - 16.0.1-SNAPSHOT + 17.0.0-SNAPSHOT vitess-jdbc diff --git a/java/pom.xml b/java/pom.xml index 76ea7fbca72..fb3f4d36ae2 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ io.vitess vitess-parent - 16.0.1-SNAPSHOT + 17.0.0-SNAPSHOT pom Vitess Java Client libraries [Parent] diff --git a/misc/errcheck_excludes.txt b/misc/errcheck_excludes.txt index f0f75b2b522..cd2218d7332 100644 --- a/misc/errcheck_excludes.txt +++ b/misc/errcheck_excludes.txt @@ -27,6 +27,7 @@ os.Rename (*github.com/spf13/cobra.Command).Help (*github.com/spf13/cobra.Command).MarkFlagRequired +(*github.com/spf13/cobra.Command).MarkPersistentFlagRequired (*github.com/spf13/cobra.Command).MarkPersistentFlagFilename (*github.com/spf13/pflag.FlagSet).MarkDeprecated diff --git a/proto/automation.proto b/proto/automation.proto deleted file mode 100644 index 17e2aac245e..00000000000 --- a/proto/automation.proto +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Protobuf data structures for the automation framework. - -// Messages (e.g. Task) are used both for checkpoint data and API access -// (e.g. retrieving the current status of a pending cluster operation). - -syntax = "proto3"; -option go_package = "vitess.io/vitess/go/vt/proto/automation"; - -package automation; - -enum ClusterOperationState { - UNKNOWN_CLUSTER_OPERATION_STATE = 0; - CLUSTER_OPERATION_NOT_STARTED = 1; - CLUSTER_OPERATION_RUNNING = 2; - CLUSTER_OPERATION_DONE = 3; -} - -message ClusterOperation { - string id = 1; - // TaskContainer are processed sequentially, one at a time. - repeated TaskContainer serial_tasks = 2; - // Cached value. This has to be re-evaluated e.g. after a checkpoint load because running tasks may have already finished. - ClusterOperationState state = 3; - // Error of the first task which failed. Set after state advanced to CLUSTER_OPERATION_DONE. If empty, all tasks succeeded. Cached value, see state above. - string error = 4; -} - -// TaskContainer holds one or more task which may be executed in parallel. -// "concurrency", if > 0, limits the amount of concurrently executed tasks. -message TaskContainer { - repeated Task parallel_tasks = 1; - int32 concurrency = 2; -} - -enum TaskState { - UNKNOWN_TASK_STATE = 0; - NOT_STARTED = 1; - RUNNING = 2; - DONE = 3; -} - -// Task represents a specific task which should be automatically executed. -message Task { - // Task specification. - string name = 1; - map parameters = 2; - - // Runtime data. - string id = 3; - TaskState state = 4; - // Set after state advanced to DONE. - string output = 5; - // Set after state advanced to DONE. If empty, the task did succeed. - string error = 6; -} - -message EnqueueClusterOperationRequest { - string name = 1; - map parameters = 2; -} - -message EnqueueClusterOperationResponse { - string id = 1; -} - -message GetClusterOperationStateRequest { - string id = 1; -} - -message GetClusterOperationStateResponse { - ClusterOperationState state = 1; -} - -message GetClusterOperationDetailsRequest { - string id = 1; -} - -message GetClusterOperationDetailsResponse { - // Full snapshot of the execution e.g. including output of each task. - ClusterOperation cluster_op = 2; -} diff --git a/proto/automationservice.proto b/proto/automationservice.proto deleted file mode 100644 index bdf7ab029cb..00000000000 --- a/proto/automationservice.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2019 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Protobuf service for the automation framework. - -syntax = "proto3"; -option go_package = "vitess.io/vitess/go/vt/proto/automationservice"; - -package automationservice; - -import "automation.proto"; - -service Automation { - // Start a cluster operation. - rpc EnqueueClusterOperation(automation.EnqueueClusterOperationRequest) returns (automation.EnqueueClusterOperationResponse) {}; - - // TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? - // Get all details of an active cluster operation. - rpc GetClusterOperationDetails(automation.GetClusterOperationDetailsRequest) returns (automation.GetClusterOperationDetailsResponse) {}; -} diff --git a/proto/query.proto b/proto/query.proto index 13d2372a8c7..1a9acab8558 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -344,6 +344,10 @@ message ExecuteOptions { // TransactionAccessMode specifies the access modes to be used while starting the transaction i.e. READ WRITE/READ ONLY/WITH CONSISTENT SNAPSHOT // If not specified, the transaction will be started with the default access mode on the connection. repeated TransactionAccessMode transaction_access_mode = 14; + + // WorkloadName specifies the name of the workload as indicated in query directives. This is used for instrumentation + // in metrics and tracing spans. + string WorkloadName = 15; } // Field describes a single column returned by a query diff --git a/proto/replicationdata.proto b/proto/replicationdata.proto index 536ea2c4d13..2f98e30576f 100644 --- a/proto/replicationdata.proto +++ b/proto/replicationdata.proto @@ -93,4 +93,5 @@ message FullStatus { uint32 semi_sync_primary_clients = 18; uint64 semi_sync_primary_timeout = 19; uint32 semi_sync_wait_for_replica_count = 20; + bool super_read_only = 21; } diff --git a/proto/tabletmanagerdata.proto b/proto/tabletmanagerdata.proto index a27ef2f803a..8dbadf75631 100644 --- a/proto/tabletmanagerdata.proto +++ b/proto/tabletmanagerdata.proto @@ -22,6 +22,7 @@ option go_package = "vitess.io/vitess/go/vt/proto/tabletmanagerdata"; package tabletmanagerdata; +import "binlogdata.proto"; import "query.proto"; import "topodata.proto"; import "replicationdata.proto"; @@ -354,7 +355,7 @@ message VReplicationExecResponse { } message VReplicationWaitForPosRequest { - int64 id = 1; + int32 id = 1; string position = 2; } @@ -497,16 +498,6 @@ message RestoreFromBackupResponse { logutil.Event event = 1; } -message VExecRequest { - string query = 1; - string workflow = 2; - string keyspace = 3; -} - -message VExecResponse { - query.QueryResult result = 1; -} - message VDiffRequest { string keyspace = 1; string workflow = 2; @@ -551,3 +542,14 @@ message VDiffOptions { VDiffCoreOptions core_options = 2; VDiffReportOptions report_options = 3; } + +message UpdateVRWorkflowRequest { + string workflow = 1; + repeated string cells = 2; + repeated string tablet_types = 3; + binlogdata.OnDDLAction on_ddl = 4; +} + +message UpdateVRWorkflowResponse { + query.QueryResult result = 1; +} diff --git a/proto/tabletmanagerservice.proto b/proto/tabletmanagerservice.proto index c23631acd59..5fcb889e48a 100644 --- a/proto/tabletmanagerservice.proto +++ b/proto/tabletmanagerservice.proto @@ -114,6 +114,7 @@ service TabletManager { // VReplication API rpc VReplicationExec(tabletmanagerdata.VReplicationExecRequest) returns(tabletmanagerdata.VReplicationExecResponse) {}; rpc VReplicationWaitForPos(tabletmanagerdata.VReplicationWaitForPosRequest) returns(tabletmanagerdata.VReplicationWaitForPosResponse) {}; + rpc UpdateVRWorkflow(tabletmanagerdata.UpdateVRWorkflowRequest) returns(tabletmanagerdata.UpdateVRWorkflowResponse) {}; // VDiff API rpc VDiff(tabletmanagerdata.VDiffRequest) returns(tabletmanagerdata.VDiffResponse) {}; @@ -172,6 +173,4 @@ service TabletManager { // RestoreFromBackup deletes all local data and restores it from the latest backup. rpc RestoreFromBackup(tabletmanagerdata.RestoreFromBackupRequest) returns (stream tabletmanagerdata.RestoreFromBackupResponse) {}; - // Generic VExec request. Can be used for various purposes - rpc VExec(tabletmanagerdata.VExecRequest) returns(tabletmanagerdata.VExecResponse) {}; } diff --git a/proto/topodata.proto b/proto/topodata.proto index a79ae5c0f18..d14975dc991 100644 --- a/proto/topodata.proto +++ b/proto/topodata.proto @@ -210,7 +210,7 @@ message Shard { // of that shard will run filtered replication. message SourceShard { // Uid is the unique ID for this SourceShard object. - uint32 uid = 1; + int32 uid = 1; // the source keyspace string keyspace = 2; diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 5b3f6942625..407a20256f9 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -792,6 +792,7 @@ message GetVSchemaResponse { message GetWorkflowsRequest { string keyspace = 1; bool active_only = 2; + bool name_only = 3; } message GetWorkflowsResponse { @@ -1156,7 +1157,7 @@ message SleepTabletResponse { message SourceShardAddRequest { string keyspace = 1; string shard = 2; - uint32 uid = 3; + int32 uid = 3; string source_keyspace = 4; string source_shard = 5; // KeyRange identifies the key range to use for the SourceShard. This field is @@ -1175,7 +1176,7 @@ message SourceShardAddResponse { message SourceShardDeleteRequest { string keyspace = 1; string shard = 2; - uint32 uid = 3; + int32 uid = 3; } message SourceShardDeleteResponse { @@ -1301,3 +1302,22 @@ message ValidateVSchemaResponse { repeated string results = 1; map results_by_shard = 2; } + +message WorkflowUpdateRequest { + string keyspace = 1; + // TabletRequest gets passed on to each primary tablet involved + // in the workflow via the UpdateVRWorkflow tabletmanager RPC. + tabletmanagerdata.UpdateVRWorkflowRequest tablet_request = 2; +} + +message WorkflowUpdateResponse { + message TabletInfo { + string tablet = 1; + // Changed is true if any of the provided values were different + // than what was already stored. The value is based on the query + // result's RowsAffected being 0 or not. + bool changed = 2; + } + string summary = 1; + repeated TabletInfo details = 2; +} diff --git a/proto/vtctlservice.proto b/proto/vtctlservice.proto index e75a5d99cf2..09ecfb5a52c 100644 --- a/proto/vtctlservice.proto +++ b/proto/vtctlservice.proto @@ -294,6 +294,9 @@ service Vtctld { rpc ValidateVersionShard(vtctldata.ValidateVersionShardRequest) returns (vtctldata.ValidateVersionShardResponse) {}; // ValidateVSchema compares the schema of each primary tablet in "keyspace/shards..." to the vschema and errs if there are differences. rpc ValidateVSchema(vtctldata.ValidateVSchemaRequest) returns (vtctldata.ValidateVSchemaResponse) {}; + // WorkflowUpdate updates the configuration of a vreplication workflow + // using the provided updated parameters. + rpc WorkflowUpdate(vtctldata.WorkflowUpdateRequest) returns (vtctldata.WorkflowUpdateResponse) {}; // PlanetScale Vitess private RPCs. diff --git a/test.go b/test.go index c2a14f1e897..0af29b98423 100755 --- a/test.go +++ b/test.go @@ -77,7 +77,7 @@ For example: // Flags var ( flavor = flag.String("flavor", "mysql57", "comma-separated bootstrap flavor(s) to run against (when using Docker mode). Available flavors: all,"+flavors) - bootstrapVersion = flag.String("bootstrap-version", "14.1", "the version identifier to use for the docker images") + bootstrapVersion = flag.String("bootstrap-version", "15", "the version identifier to use for the docker images") runCount = flag.Int("runs", 1, "run each test this many times") retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests") logPass = flag.Bool("log-pass", false, "log test output even if it passes") diff --git a/test/ci_workflow_gen.go b/test/ci_workflow_gen.go index 65a1e948696..9cd9fe76a3d 100644 --- a/test/ci_workflow_gen.go +++ b/test/ci_workflow_gen.go @@ -124,8 +124,6 @@ var ( "schemadiff_vrepl", "topo_connection_cache", "vtgate_partial_keyspace", - "12", - "18", "vttablet_prscomplex", } diff --git a/test/config.json b/test/config.json index 7e4e36a587e..c6debd0b0e7 100644 --- a/test/config.json +++ b/test/config.json @@ -460,6 +460,17 @@ "site_test" ] }, + "tabletmanager_throttler_topo": { + "File": "unused.go", + "Args": ["vitess.io/vitess/go/test/endtoend/tabletmanager/throttler_topo"], + "Command": [], + "Manual": false, + "Shard": "tabletmanager_throttler_topo", + "RetryMax": 1, + "Tags": [ + "site_test" + ] + }, "tabletmanager_throttler_custom_config": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/tabletmanager/throttler_custom_config"], @@ -522,15 +533,6 @@ "RetryMax": 1, "Tags": [] }, - "vtgate_queries_derived": { - "File": "unused.go", - "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/queries/derived"], - "Command": [], - "Manual": false, - "Shard": "vtgate_queries", - "RetryMax": 1, - "Tags": [] - }, "vtgate_queries_aggregation": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/queries/aggregation"], @@ -639,6 +641,15 @@ "RetryMax": 1, "Tags": [] }, + "vtgate_queries_reference": { + "File": "unused.go", + "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/queries/reference"], + "Command": [], + "Manual": false, + "Shard": "vtgate_queries", + "RetryMax": 1, + "Tags": [] + }, "vtgate_concurrentdml": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/concurrentdml"], @@ -720,15 +731,6 @@ "RetryMax": 1, "Tags": [] }, - "vtgate_queries_derived": { - "File": "unused.go", - "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/queries/derived"], - "Command": [], - "Manual": false, - "Shard": "mysql80", - "RetryMax": 1, - "Tags": [] - }, "vtgate_sequence": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/sequence"], @@ -819,6 +821,15 @@ "RetryMax": 1, "Tags": [] }, + "vtgate_transaction_restart": { + "File": "unused.go", + "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/transaction/restart"], + "Command": [], + "Manual": false, + "Shard": "vtgate_transaction", + "RetryMax": 1, + "Tags": [] + }, "vtgate_transaction_rollback": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/transaction/rollback"], @@ -918,6 +929,15 @@ "RetryMax": 1, "Tags": [] }, + "vtgate_grpc_server_auth_static": { + "File": "unused.go", + "Args": ["vitess.io/vitess/go/test/endtoend/vtgate/grpc_server_auth_static"], + "Command": [], + "Manual": false, + "Shard": "vtgate_general_heavy", + "RetryMax": 1, + "Tags": [] + }, "topo_zk2": { "File": "unused.go", "Args": ["vitess.io/vitess/go/test/endtoend/topotest/zk2", "--topo-flavor=zk2"], diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index e7253cc3147..e8f9c2c263f 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -4,6 +4,8 @@ concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true +permissions: read-all + env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" @@ -134,7 +136,7 @@ jobs: {{end}} - name: Setup launchable dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 1292f95cc80..65106462afe 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -1,6 +1,8 @@ name: {{.Name}} on: [push, pull_request] +permissions: read-all + jobs: build: name: Run endtoend tests on {{.Name}} diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 72d32a2da70..dd85a611bb7 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -4,6 +4,8 @@ concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true +permissions: read-all + env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" @@ -144,7 +146,7 @@ jobs: {{end}} - name: Setup launchable dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null diff --git a/test/templates/cluster_endtoend_test_self_hosted.tpl b/test/templates/cluster_endtoend_test_self_hosted.tpl index 8095d5ff0b7..9c6e04680c2 100644 --- a/test/templates/cluster_endtoend_test_self_hosted.tpl +++ b/test/templates/cluster_endtoend_test_self_hosted.tpl @@ -4,6 +4,8 @@ concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true +permissions: read-all + jobs: build: name: Run endtoend tests on {{.Name}} diff --git a/test/templates/dockerfile.tpl b/test/templates/dockerfile.tpl index 9e6c17909c0..49517940f8c 100644 --- a/test/templates/dockerfile.tpl +++ b/test/templates/dockerfile.tpl @@ -1,4 +1,4 @@ -ARG bootstrap_version=14.1 +ARG bootstrap_version=15 ARG image="vitess/bootstrap:${bootstrap_version}-{{.Platform}}" FROM "${image}" diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index fdd63f2fdb1..7c22bea8702 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -9,78 +9,78 @@ jobs: runs-on: ubuntu-20.04 steps: - - name: Configure git private repo access - env: - GITHUB_TOKEN: ${{"{{"}} secrets.PLANETSCALE_ACTIONS_BOT_TOKEN {{"}}"}} - run: | - git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" + - name: Configure git private repo access + env: + GITHUB_TOKEN: ${{"{{"}} secrets.PLANETSCALE_ACTIONS_BOT_TOKEN {{"}}"}} + run: | + git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.19.4 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.1 - - name: Tune the OS - run: | - sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" - # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio - echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf - sudo sysctl -p /etc/sysctl.conf + - name: Tune the OS + run: | + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" + # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio + echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf + sudo sysctl -p /etc/sysctl.conf - - name: Check out code - uses: actions/checkout@v3 + - name: Check out code + uses: actions/checkout@v3 - - name: Get dependencies - env: # Or as an environment variable - AWS_ACCESS_KEY_ID: ${{"{{"}} secrets.BUILDKITE_S3_ACCESS_KEY_ID {{"}}"}} - AWS_SECRET_ACCESS_KEY: ${{"{{"}} secrets.BUILDKITE_S3_SECRET_ACCESS_KEY {{"}}"}} - AWS_DEFAULT_REGION: us-east-1 - run: | - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get update - # stop any existing running instance of mysql - sudo service mysql stop - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: Get dependencies + env: # Or as an environment variable + AWS_ACCESS_KEY_ID: ${{"{{"}} secrets.BUILDKITE_S3_ACCESS_KEY_ID {{"}}"}} + AWS_SECRET_ACCESS_KEY: ${{"{{"}} secrets.BUILDKITE_S3_SECRET_ACCESS_KEY {{"}}"}} + AWS_DEFAULT_REGION: us-east-1 + run: | + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get update + # stop any existing running instance of mysql + sudo service mysql stop + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + + # Uninstall any previously installed MySQL first + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # install necessary tools + sudo apt-get install -y make unzip g++ curl git wget awscli ant openjdk-8-jdk + + # Get latest version of mysql from s3 bucket + LATEST_BUILD=$(aws s3api list-objects-v2 --bucket "planetscale-mysql-server-private-ci-artifacts" --prefix mysql/main/dist --query 'reverse(sort_by(Contents[?contains(Key, `focal`)], &LastModified))[:1].Key' --output=text) + echo "latest build is $LATEST_BUILD" + # Pin this to 8.0.30 + LAST_BUILD="mysql/main/dist/mysql-8.0.30.20221013-ps-87805bf371e-focal-linux-x86_64.tar.gz" + aws s3 cp "s3://planetscale-mysql-server-private-ci-artifacts/${LAST_BUILD}" . + sudo tar xf $(basename $LAST_BUILD) -v -C /usr --strip-components=1 + + # Install everything else we need, and configure + sudo apt-get install -y mysql-server mysql-client eatmydata xz-utils + sudo service mysql stop + sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" + + mkdir -p dist bin + curl -L https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz | tar -zxC dist + mv dist/etcd-v3.3.10-linux-amd64/{etcd,etcdctl} bin/ + + go mod download + go install golang.org/x/tools/cmd/goimports@latest - # Uninstall any previously installed MySQL first - sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common - sudo apt-get -y autoremove - sudo apt-get -y autoclean - sudo deluser mysql - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/mysql + - name: Run make tools + run: | + make tools - # install necessary tools - sudo apt-get install -y make unzip g++ curl git wget awscli ant openjdk-8-jdk - - # Get latest version of mysql from s3 bucket - LATEST_BUILD=$(aws s3api list-objects-v2 --bucket "planetscale-mysql-server-private-ci-artifacts" --prefix mysql/main/dist --query 'reverse(sort_by(Contents[?contains(Key, `focal`)], &LastModified))[:1].Key' --output=text) - echo "latest build is $LATEST_BUILD" - # Pin this to 8.0.30 - LAST_BUILD="mysql/main/dist/mysql-8.0.30.20221013-ps-87805bf371e-focal-linux-x86_64.tar.gz" - aws s3 cp "s3://planetscale-mysql-server-private-ci-artifacts/${LAST_BUILD}" . - sudo tar xf $(basename $LAST_BUILD) -v -C /usr --strip-components=1 - - # Install everything else we need, and configure - sudo apt-get install -y mysql-server mysql-client eatmydata xz-utils - sudo service mysql stop - sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" - - mkdir -p dist bin - curl -L https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz | tar -zxC dist - mv dist/etcd-v3.3.10-linux-amd64/{etcd,etcdctl} bin/ - - go mod download - go install golang.org/x/tools/cmd/goimports@latest - - - name: Run make tools - run: | - make tools - - - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + - name: Run test + timeout-minutes: 30 + run: | + eatmydata -- make unit_test diff --git a/test/templates/unit_test_self_hosted.tpl b/test/templates/unit_test_self_hosted.tpl index aa415458426..c7f720dc724 100644 --- a/test/templates/unit_test_self_hosted.tpl +++ b/test/templates/unit_test_self_hosted.tpl @@ -4,6 +4,8 @@ concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true +permissions: read-all + jobs: test: runs-on: self-hosted diff --git a/tools/make-release-packages.sh b/tools/make-release-packages.sh index 31ddd6cc96a..21ecdcda7ee 100755 --- a/tools/make-release-packages.sh +++ b/tools/make-release-packages.sh @@ -41,10 +41,7 @@ done; # Copy remaining files, preserving date/permissions # But resolving symlinks -cp -rpfL examples "${RELEASE_DIR}" -# copy vtadmin as well -mkdir -p "${RELEASE_DIR}"/web/vtadmin -cp -rpfL web/vtadmin "${RELEASE_DIR}"/web +cp -rpfL {web,examples} "${RELEASE_DIR}" echo "Follow the installation instructions at: https://vitess.io/docs/get-started/local/" > "${RELEASE_DIR}"/examples/README.md diff --git a/vitess-mixin/e2e/config/init_db.sql b/vitess-mixin/e2e/config/init_db.sql index e69a2239321..12e5601d8cc 100644 --- a/vitess-mixin/e2e/config/init_db.sql +++ b/vitess-mixin/e2e/config/init_db.sql @@ -3,6 +3,12 @@ ############################################################################### # Equivalent of mysql_secure_installation ############################################################################### +# We need to ensure that super_read_only is disabled so that we can execute +# these commands. Note that disabling it does NOT disable read_only. +# We save the current value so that we only re-enable it at the end if it was +# enabled before. +SET @original_super_read_only=IF(@@global.super_read_only=1, 'ON', 'OFF'); +SET GLOBAL super_read_only='OFF'; # Changes during the init db should not make it to the binlog. # They could potentially create errant transactions on replicas. SET sql_log_bin = 0; @@ -68,3 +74,8 @@ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, FLUSH PRIVILEGES; RESET SLAVE ALL; RESET MASTER; +# custom sql is used to add custom scripts like creating users/passwords. We use it in our tests +# {{custom_sql}} + +# We need to set super_read_only back to what it was before +SET GLOBAL super_read_only=IFNULL(@original_super_read_only, 'ON'); diff --git a/vitess-mixin/go.mod b/vitess-mixin/go.mod index 321057445c1..55841fd6766 100644 --- a/vitess-mixin/go.mod +++ b/vitess-mixin/go.mod @@ -10,6 +10,7 @@ require ( github.com/google/go-jsonnet v0.16.0 github.com/jsonnet-bundler/jsonnet-bundler v0.4.0 github.com/krishicks/yaml-patch v0.0.10 + github.com/prometheus/client_golang v1.14.0 // indirect // Believe it or not, this is actually version 2.13.1 // See https://github.com/prometheus/prometheus/issues/5590#issuecomment-546368944 github.com/prometheus/prometheus v1.8.2-0.20191017095924-6f92ce560538 diff --git a/vitess-mixin/go.sum b/vitess-mixin/go.sum index 2190300691e..af49468c130 100644 --- a/vitess-mixin/go.sum +++ b/vitess-mixin/go.sum @@ -138,8 +138,9 @@ github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1Vqq github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -229,10 +230,12 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -504,8 +507,9 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jsonnet-bundler/jsonnet-bundler v0.4.0 h1:4BKZ6LDqPc2wJDmaKnmYD/vDjUptJtnUpai802MibFc= github.com/jsonnet-bundler/jsonnet-bundler v0.4.0/go.mod h1:/by7P/OoohkI3q4CgSFqcoFsVY+IaNbzOVDknEsKDeU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -589,8 +593,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.6.3/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -655,27 +660,34 @@ github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4 github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/prometheus v1.8.2-0.20191017095924-6f92ce560538 h1:iyerK9/VU1F02ASqYyIXp60gKxo7ualRoEezXPqbQZE= github.com/prometheus/prometheus v1.8.2-0.20191017095924-6f92ce560538/go.mod h1:SgN99nHQ/tVJyAuyLKKz6i2j5cJx3eLy9MCRCPOXqUI= @@ -910,6 +922,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -928,8 +942,9 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -941,6 +956,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1018,6 +1034,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= @@ -1237,8 +1255,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/DataDog/dd-trace-go.v1 v1.17.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/web/vtadmin/package-lock.json b/web/vtadmin/package-lock.json index a754abbceb8..690f91f1d7d 100644 --- a/web/vtadmin/package-lock.json +++ b/web/vtadmin/package-lock.json @@ -24,7 +24,7 @@ "lodash-es": "^4.17.21", "postcss-flexbugs-fixes": "^5.0.2", "postcss-preset-env": "^8.0.1", - "query-string": "^6.14.0", + "query-string": "^7.1.3", "react": "^17.0.2", "react-dom": "^17.0.2", "react-flow-renderer": "^10.3.17", @@ -5167,9 +5167,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.2.tgz", - "integrity": "sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -5177,9 +5177,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "node_modules/@types/express": { @@ -9623,9 +9623,9 @@ "dev": true }, "node_modules/dns-packet": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.3.1.tgz", - "integrity": "sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", "dev": true, "dependencies": { "@leichtgewicht/ip-codec": "^2.0.1" @@ -9873,9 +9873,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -11351,7 +11351,7 @@ "node_modules/filter-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", "engines": { "node": ">=0.10.0" } @@ -16380,12 +16380,6 @@ "node": ">=4" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -19115,11 +19109,11 @@ } }, "node_modules/query-string": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", - "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", "dependencies": { - "decode-uri-component": "^0.2.0", + "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" @@ -21836,7 +21830,7 @@ "node_modules/strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", "engines": { "node": ">=4" } @@ -23440,9 +23434,9 @@ } }, "node_modules/watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -23485,35 +23479,35 @@ } }, "node_modules/webpack": { - "version": "5.65.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz", - "integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.3", + "enhanced-resolve": "^5.10.0", "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", - "webpack-sources": "^3.2.2" + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" }, "bin": { "webpack": "bin/webpack.js" @@ -23787,18 +23781,18 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz", - "integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, "engines": { "node": ">=10.13.0" } }, "node_modules/webpack/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -28214,9 +28208,9 @@ } }, "@types/eslint-scope": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.2.tgz", - "integrity": "sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "requires": { "@types/eslint": "*", @@ -28224,9 +28218,9 @@ } }, "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "@types/express": { @@ -31544,9 +31538,9 @@ "dev": true }, "dns-packet": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.3.1.tgz", - "integrity": "sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", "dev": true, "requires": { "@leichtgewicht/ip-codec": "^2.0.1" @@ -31748,9 +31742,9 @@ } }, "enhanced-resolve": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -32874,7 +32868,7 @@ "filter-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=" + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" }, "finalhandler": { "version": "1.2.0", @@ -36628,12 +36622,6 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -38569,11 +38557,11 @@ } }, "query-string": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", - "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", "requires": { - "decode-uri-component": "^0.2.0", + "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" @@ -40471,7 +40459,7 @@ "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" }, "string_decoder": { "version": "1.3.0", @@ -41652,9 +41640,9 @@ } }, "watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -41691,41 +41679,41 @@ "dev": true }, "webpack": { - "version": "5.65.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz", - "integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.3", + "enhanced-resolve": "^5.10.0", "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", - "webpack-sources": "^3.2.2" + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" }, "dependencies": { "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-import-assertions": { @@ -41931,9 +41919,9 @@ } }, "webpack-sources": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz", - "integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true }, "websocket-driver": { diff --git a/web/vtadmin/package.json b/web/vtadmin/package.json index f5a078cfce5..3ffdd5c9b6b 100644 --- a/web/vtadmin/package.json +++ b/web/vtadmin/package.json @@ -23,7 +23,7 @@ "lodash-es": "^4.17.21", "postcss-flexbugs-fixes": "^5.0.2", "postcss-preset-env": "^8.0.1", - "query-string": "^6.14.0", + "query-string": "^7.1.3", "react": "^17.0.2", "react-dom": "^17.0.2", "react-flow-renderer": "^10.3.17", diff --git a/web/vtadmin/src/components/inputs/Select.tsx b/web/vtadmin/src/components/inputs/Select.tsx index 3bf2d437b86..c9292b56d76 100644 --- a/web/vtadmin/src/components/inputs/Select.tsx +++ b/web/vtadmin/src/components/inputs/Select.tsx @@ -74,13 +74,20 @@ export const Select = ({ [onChange] ); - const { getItemProps, getLabelProps, getMenuProps, getToggleButtonProps, highlightedIndex, isOpen, selectItem } = - useSelect({ - itemToString: _itemToString, - items, - onSelectedItemChange, - selectedItem, - }); + const { + getItemProps, + getLabelProps, + getMenuProps, + getToggleButtonProps, + highlightedIndex, + isOpen, + selectItem, + } = useSelect({ + itemToString: _itemToString, + items, + onSelectedItemChange, + selectedItem, + }); const containerClass = cx(style.container, className, { [style.large]: size === 'large', diff --git a/web/vtadmin/src/hooks/api.ts b/web/vtadmin/src/hooks/api.ts index b1fafa6b04d..2af141b8069 100644 --- a/web/vtadmin/src/hooks/api.ts +++ b/web/vtadmin/src/hooks/api.ts @@ -86,20 +86,19 @@ import { formatAlias } from '../util/tablets'; /** * useBackups is a query hook that fetches all backups across every cluster. */ -export const useBackups = ( - options?: UseQueryOptions | undefined -) => useQuery(['backups'], fetchBackups, options); +export const useBackups = (options?: UseQueryOptions | undefined) => + useQuery(['backups'], fetchBackups, options); /** * useClusters is a query hook that fetches all clusters VTAdmin is configured to discover. */ -export const useClusters = (options?: UseQueryOptions | undefined) => +export const useClusters = (options?: UseQueryOptions | undefined) => useQuery(['clusters'], fetchClusters, options); /** * useGates is a query hook that fetches all VTGates across every cluster. */ -export const useGates = (options?: UseQueryOptions | undefined) => +export const useGates = (options?: UseQueryOptions | undefined) => useQuery(['gates'], fetchGates, options); /** @@ -107,7 +106,7 @@ export const useGates = (options?: UseQueryOptions[0], - options?: UseQueryOptions[0])[]> + options?: UseQueryOptions ) => { const queryClient = useQueryClient(); return useQuery(['keyspace', params], () => fetchKeyspace(params), { @@ -136,34 +135,31 @@ export const useCreateKeyspace = ( /** * useKeyspaces is a query hook that fetches all keyspaces across every cluster. */ -export const useKeyspaces = (options?: UseQueryOptions | undefined) => +export const useKeyspaces = (options?: UseQueryOptions | undefined) => useQuery(['keyspaces'], fetchKeyspaces, options); /** * useSchemas is a query hook that fetches all schemas across every cluster. */ -export const useSchemas = (options?: UseQueryOptions | undefined) => +export const useSchemas = (options?: UseQueryOptions | undefined) => useQuery(['schemas'], fetchSchemas, options); /** * useTablets is a query hook that fetches all tablets across every cluster. */ -export const useTablets = (options?: UseQueryOptions | undefined) => +export const useTablets = (options?: UseQueryOptions | undefined) => useQuery(['tablets'], fetchTablets, options); /** * useVtctlds is a query hook that fetches all vtctlds across every cluster. */ -export const useVtctlds = (options?: UseQueryOptions | undefined) => +export const useVtctlds = (options?: UseQueryOptions | undefined) => useQuery(['vtctlds'], fetchVtctlds, options); /** * useTablet is a query hook that fetches a single tablet by alias. */ -export const useTablet = ( - params: Parameters[0], - options?: UseQueryOptions[0])[]> -) => { +export const useTablet = (params: Parameters[0], options?: UseQueryOptions) => { const queryClient = useQueryClient(); return useQuery(['tablet', params], () => fetchTablet(params), { initialData: () => { @@ -232,14 +228,7 @@ export const useSetReadWrite = ( */ export const useShardReplicationPositions = ( params: Parameters[0], - options?: - | UseQueryOptions< - pb.GetShardReplicationPositionsResponse, - Error, - pb.GetShardReplicationPositionsResponse, - (string | Parameters[0])[] - > - | undefined + options?: UseQueryOptions | undefined ) => useQuery(['shard_replication_positions', params], () => fetchShardReplicationPositions(params), options); /** @@ -271,12 +260,7 @@ export const useStopReplication = ( */ export const usePingTablet = ( params: Parameters[0], - options?: UseQueryOptions< - pb.PingTabletResponse, - Error, - pb.PingTabletResponse, - (string | Parameters[0])[] - > + options?: UseQueryOptions ) => { return useQuery(['ping-tablet', params], () => pingTablet(params), options); }; @@ -286,12 +270,7 @@ export const usePingTablet = ( */ export const useRefreshState = ( params: Parameters[0], - options?: UseQueryOptions< - pb.RefreshStateResponse, - Error, - pb.RefreshStateResponse, - (string | Parameters[0])[] - > + options?: UseQueryOptions ) => { return useQuery(['refresh-state', params], () => refreshState(params), options); }; @@ -301,19 +280,14 @@ export const useRefreshState = ( */ export const useHealthCheck = ( params: Parameters[0], - options?: UseQueryOptions< - pb.RunHealthCheckResponse, - Error, - pb.RunHealthCheckResponse, - (string | Parameters[0])[] - > + options?: UseQueryOptions ) => { return useQuery(['run-health-check', params], () => runHealthCheck(params), options); }; export const useExperimentalTabletDebugVars = ( params: FetchTabletParams, - options?: UseQueryOptions + options?: UseQueryOptions ) => { return useQuery( ['experimental/tablet/debug/vars', params], @@ -341,9 +315,8 @@ export const useManyExperimentalTabletDebugVars = ( /** * useWorkflowsResponse is a query hook that fetches all workflows (by cluster) across every cluster. */ -export const useWorkflowsResponse = ( - options?: UseQueryOptions | undefined -) => useQuery(['workflows'], fetchWorkflows, options); +export const useWorkflowsResponse = (options?: UseQueryOptions | undefined) => + useQuery(['workflows'], fetchWorkflows, options); /** * useWorkflows is a helper hook for when a flattened list of workflows @@ -371,10 +344,7 @@ export const useWorkflows = (...args: Parameters) = /** * useSchema is a query hook that fetches a single schema for the given parameters. */ -export const useSchema = ( - params: FetchSchemaParams, - options?: UseQueryOptions | undefined -) => { +export const useSchema = (params: FetchSchemaParams, options?: UseQueryOptions | undefined) => { const queryClient = useQueryClient(); return useQuery(['schema', params], () => fetchSchema(params), { initialData: () => { @@ -435,16 +405,9 @@ export const useVSchema = (params: FetchVSchemaParams, options?: UseQueryOptions export const useVTExplain = ( params: Parameters[0], - options?: - | UseQueryOptions< - pb.VTExplainResponse, - Error, - pb.VTExplainResponse, - (string | Parameters[0])[] - > - | undefined + options?: UseQueryOptions | undefined ) => { - return useQuery(['vtexplain', params], () => fetchVTExplain(params), options); + return useQuery(['vtexplain', params], () => fetchVTExplain(params), { ...options }); }; /** @@ -452,9 +415,7 @@ export const useVTExplain = ( */ export const useWorkflow = ( params: Parameters[0], - options?: - | UseQueryOptions[0])[]> - | undefined + options?: UseQueryOptions | undefined ) => { const queryClient = useQueryClient(); return useQuery(['workflow', params], () => fetchWorkflow(params), { diff --git a/web/vtadmin/src/index.css b/web/vtadmin/src/index.css index 505c9f49134..29f801fb1e9 100644 --- a/web/vtadmin/src/index.css +++ b/web/vtadmin/src/index.css @@ -14,6 +14,8 @@ * limitations under the License. */ +@import './style/fonts.css'; + @tailwind base; @tailwind components; @tailwind utilities; diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 96603924542..0f6cb60b58c 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -20871,7 +20871,7 @@ export namespace tabletmanagerdata { interface IVReplicationWaitForPosRequest { /** VReplicationWaitForPosRequest id */ - id?: (number|Long|null); + id?: (number|null); /** VReplicationWaitForPosRequest position */ position?: (string|null); @@ -20887,7 +20887,7 @@ export namespace tabletmanagerdata { constructor(properties?: tabletmanagerdata.IVReplicationWaitForPosRequest); /** VReplicationWaitForPosRequest id. */ - public id: (number|Long); + public id: number; /** VReplicationWaitForPosRequest position. */ public position: string; @@ -23585,198 +23585,6 @@ export namespace tabletmanagerdata { public toJSON(): { [k: string]: any }; } - /** Properties of a VExecRequest. */ - interface IVExecRequest { - - /** VExecRequest query */ - query?: (string|null); - - /** VExecRequest workflow */ - workflow?: (string|null); - - /** VExecRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a VExecRequest. */ - class VExecRequest implements IVExecRequest { - - /** - * Constructs a new VExecRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVExecRequest); - - /** VExecRequest query. */ - public query: string; - - /** VExecRequest workflow. */ - public workflow: string; - - /** VExecRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new VExecRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VExecRequest instance - */ - public static create(properties?: tabletmanagerdata.IVExecRequest): tabletmanagerdata.VExecRequest; - - /** - * Encodes the specified VExecRequest message. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @param message VExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @param message VExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VExecRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VExecRequest; - - /** - * Decodes a VExecRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VExecRequest; - - /** - * Verifies a VExecRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VExecRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VExecRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VExecRequest; - - /** - * Creates a plain object from a VExecRequest message. Also converts values to other types if specified. - * @param message VExecRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VExecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VExecRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VExecResponse. */ - interface IVExecResponse { - - /** VExecResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a VExecResponse. */ - class VExecResponse implements IVExecResponse { - - /** - * Constructs a new VExecResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVExecResponse); - - /** VExecResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new VExecResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VExecResponse instance - */ - public static create(properties?: tabletmanagerdata.IVExecResponse): tabletmanagerdata.VExecResponse; - - /** - * Encodes the specified VExecResponse message. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @param message VExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @param message VExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VExecResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VExecResponse; - - /** - * Decodes a VExecResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VExecResponse; - - /** - * Verifies a VExecResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VExecResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VExecResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VExecResponse; - - /** - * Creates a plain object from a VExecResponse message. Also converts values to other types if specified. - * @param message VExecResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VExecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VExecResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a VDiffRequest. */ interface IVDiffRequest { @@ -24430,30170 +24238,30677 @@ export namespace tabletmanagerdata { */ public toJSON(): { [k: string]: any }; } -} - -/** Namespace query. */ -export namespace query { - /** Properties of a Target. */ - interface ITarget { + /** Properties of an UpdateVRWorkflowRequest. */ + interface IUpdateVRWorkflowRequest { - /** Target keyspace */ - keyspace?: (string|null); + /** UpdateVRWorkflowRequest workflow */ + workflow?: (string|null); - /** Target shard */ - shard?: (string|null); + /** UpdateVRWorkflowRequest cells */ + cells?: (string[]|null); - /** Target tablet_type */ - tablet_type?: (topodata.TabletType|null); + /** UpdateVRWorkflowRequest tablet_types */ + tablet_types?: (string[]|null); - /** Target cell */ - cell?: (string|null); + /** UpdateVRWorkflowRequest on_ddl */ + on_ddl?: (binlogdata.OnDDLAction|null); } - /** Represents a Target. */ - class Target implements ITarget { + /** Represents an UpdateVRWorkflowRequest. */ + class UpdateVRWorkflowRequest implements IUpdateVRWorkflowRequest { /** - * Constructs a new Target. + * Constructs a new UpdateVRWorkflowRequest. * @param [properties] Properties to set */ - constructor(properties?: query.ITarget); + constructor(properties?: tabletmanagerdata.IUpdateVRWorkflowRequest); - /** Target keyspace. */ - public keyspace: string; + /** UpdateVRWorkflowRequest workflow. */ + public workflow: string; - /** Target shard. */ - public shard: string; + /** UpdateVRWorkflowRequest cells. */ + public cells: string[]; - /** Target tablet_type. */ - public tablet_type: topodata.TabletType; + /** UpdateVRWorkflowRequest tablet_types. */ + public tablet_types: string[]; - /** Target cell. */ - public cell: string; + /** UpdateVRWorkflowRequest on_ddl. */ + public on_ddl: binlogdata.OnDDLAction; /** - * Creates a new Target instance using the specified properties. + * Creates a new UpdateVRWorkflowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Target instance + * @returns UpdateVRWorkflowRequest instance */ - public static create(properties?: query.ITarget): query.Target; + public static create(properties?: tabletmanagerdata.IUpdateVRWorkflowRequest): tabletmanagerdata.UpdateVRWorkflowRequest; /** - * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. - * @param message Target message or plain object to encode + * Encodes the specified UpdateVRWorkflowRequest message. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowRequest.verify|verify} messages. + * @param message UpdateVRWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: tabletmanagerdata.IUpdateVRWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. - * @param message Target message or plain object to encode + * Encodes the specified UpdateVRWorkflowRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowRequest.verify|verify} messages. + * @param message UpdateVRWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: tabletmanagerdata.IUpdateVRWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Target message from the specified reader or buffer. + * Decodes an UpdateVRWorkflowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Target + * @returns UpdateVRWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Target; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UpdateVRWorkflowRequest; /** - * Decodes a Target message from the specified reader or buffer, length delimited. + * Decodes an UpdateVRWorkflowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Target + * @returns UpdateVRWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Target; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UpdateVRWorkflowRequest; /** - * Verifies a Target message. + * Verifies an UpdateVRWorkflowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVRWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Target + * @returns UpdateVRWorkflowRequest */ - public static fromObject(object: { [k: string]: any }): query.Target; + public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UpdateVRWorkflowRequest; /** - * Creates a plain object from a Target message. Also converts values to other types if specified. - * @param message Target + * Creates a plain object from an UpdateVRWorkflowRequest message. Also converts values to other types if specified. + * @param message UpdateVRWorkflowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: tabletmanagerdata.UpdateVRWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Target to JSON. + * Converts this UpdateVRWorkflowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VTGateCallerID. */ - interface IVTGateCallerID { - - /** VTGateCallerID username */ - username?: (string|null); + /** Properties of an UpdateVRWorkflowResponse. */ + interface IUpdateVRWorkflowResponse { - /** VTGateCallerID groups */ - groups?: (string[]|null); + /** UpdateVRWorkflowResponse result */ + result?: (query.IQueryResult|null); } - /** Represents a VTGateCallerID. */ - class VTGateCallerID implements IVTGateCallerID { + /** Represents an UpdateVRWorkflowResponse. */ + class UpdateVRWorkflowResponse implements IUpdateVRWorkflowResponse { /** - * Constructs a new VTGateCallerID. + * Constructs a new UpdateVRWorkflowResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IVTGateCallerID); - - /** VTGateCallerID username. */ - public username: string; + constructor(properties?: tabletmanagerdata.IUpdateVRWorkflowResponse); - /** VTGateCallerID groups. */ - public groups: string[]; + /** UpdateVRWorkflowResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new VTGateCallerID instance using the specified properties. + * Creates a new UpdateVRWorkflowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VTGateCallerID instance + * @returns UpdateVRWorkflowResponse instance */ - public static create(properties?: query.IVTGateCallerID): query.VTGateCallerID; + public static create(properties?: tabletmanagerdata.IUpdateVRWorkflowResponse): tabletmanagerdata.UpdateVRWorkflowResponse; /** - * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @param message VTGateCallerID message or plain object to encode + * Encodes the specified UpdateVRWorkflowResponse message. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowResponse.verify|verify} messages. + * @param message UpdateVRWorkflowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: tabletmanagerdata.IUpdateVRWorkflowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @param message VTGateCallerID message or plain object to encode + * Encodes the specified UpdateVRWorkflowResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowResponse.verify|verify} messages. + * @param message UpdateVRWorkflowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: tabletmanagerdata.IUpdateVRWorkflowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VTGateCallerID message from the specified reader or buffer. + * Decodes an UpdateVRWorkflowResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VTGateCallerID + * @returns UpdateVRWorkflowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.VTGateCallerID; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UpdateVRWorkflowResponse; /** - * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. + * Decodes an UpdateVRWorkflowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VTGateCallerID + * @returns UpdateVRWorkflowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.VTGateCallerID; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UpdateVRWorkflowResponse; /** - * Verifies a VTGateCallerID message. + * Verifies an UpdateVRWorkflowResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVRWorkflowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VTGateCallerID + * @returns UpdateVRWorkflowResponse */ - public static fromObject(object: { [k: string]: any }): query.VTGateCallerID; + public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UpdateVRWorkflowResponse; /** - * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. - * @param message VTGateCallerID + * Creates a plain object from an UpdateVRWorkflowResponse message. Also converts values to other types if specified. + * @param message UpdateVRWorkflowResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.VTGateCallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: tabletmanagerdata.UpdateVRWorkflowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VTGateCallerID to JSON. + * Converts this UpdateVRWorkflowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } +} - /** Properties of an EventToken. */ - interface IEventToken { +/** Namespace binlogdata. */ +export namespace binlogdata { - /** EventToken timestamp */ - timestamp?: (number|Long|null); + /** Properties of a Charset. */ + interface ICharset { - /** EventToken shard */ - shard?: (string|null); + /** Charset client */ + client?: (number|null); - /** EventToken position */ - position?: (string|null); + /** Charset conn */ + conn?: (number|null); + + /** Charset server */ + server?: (number|null); } - /** Represents an EventToken. */ - class EventToken implements IEventToken { + /** Represents a Charset. */ + class Charset implements ICharset { /** - * Constructs a new EventToken. + * Constructs a new Charset. * @param [properties] Properties to set */ - constructor(properties?: query.IEventToken); + constructor(properties?: binlogdata.ICharset); - /** EventToken timestamp. */ - public timestamp: (number|Long); + /** Charset client. */ + public client: number; - /** EventToken shard. */ - public shard: string; + /** Charset conn. */ + public conn: number; - /** EventToken position. */ - public position: string; + /** Charset server. */ + public server: number; /** - * Creates a new EventToken instance using the specified properties. + * Creates a new Charset instance using the specified properties. * @param [properties] Properties to set - * @returns EventToken instance + * @returns Charset instance */ - public static create(properties?: query.IEventToken): query.EventToken; + public static create(properties?: binlogdata.ICharset): binlogdata.Charset; /** - * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @param message EventToken message or plain object to encode + * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. + * @param message Charset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @param message EventToken message or plain object to encode + * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. + * @param message Charset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventToken message from the specified reader or buffer. + * Decodes a Charset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventToken + * @returns Charset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.EventToken; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Charset; /** - * Decodes an EventToken message from the specified reader or buffer, length delimited. + * Decodes a Charset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventToken + * @returns Charset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.EventToken; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Charset; /** - * Verifies an EventToken message. + * Verifies a Charset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventToken message from a plain object. Also converts values to their respective internal types. + * Creates a Charset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventToken + * @returns Charset */ - public static fromObject(object: { [k: string]: any }): query.EventToken; + public static fromObject(object: { [k: string]: any }): binlogdata.Charset; /** - * Creates a plain object from an EventToken message. Also converts values to other types if specified. - * @param message EventToken + * Creates a plain object from a Charset message. Also converts values to other types if specified. + * @param message Charset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.EventToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.Charset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventToken to JSON. + * Converts this Charset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** MySqlFlag enum. */ - enum MySqlFlag { - EMPTY = 0, - NOT_NULL_FLAG = 1, - PRI_KEY_FLAG = 2, - UNIQUE_KEY_FLAG = 4, - MULTIPLE_KEY_FLAG = 8, - BLOB_FLAG = 16, - UNSIGNED_FLAG = 32, - ZEROFILL_FLAG = 64, - BINARY_FLAG = 128, - ENUM_FLAG = 256, - AUTO_INCREMENT_FLAG = 512, - TIMESTAMP_FLAG = 1024, - SET_FLAG = 2048, - NO_DEFAULT_VALUE_FLAG = 4096, - ON_UPDATE_NOW_FLAG = 8192, - NUM_FLAG = 32768, - PART_KEY_FLAG = 16384, - GROUP_FLAG = 32768, - UNIQUE_FLAG = 65536, - BINCMP_FLAG = 131072 - } - - /** Flag enum. */ - enum Flag { - NONE = 0, - ISINTEGRAL = 256, - ISUNSIGNED = 512, - ISFLOAT = 1024, - ISQUOTED = 2048, - ISTEXT = 4096, - ISBINARY = 8192 - } - - /** Type enum. */ - enum Type { - NULL_TYPE = 0, - INT8 = 257, - UINT8 = 770, - INT16 = 259, - UINT16 = 772, - INT24 = 261, - UINT24 = 774, - INT32 = 263, - UINT32 = 776, - INT64 = 265, - UINT64 = 778, - FLOAT32 = 1035, - FLOAT64 = 1036, - TIMESTAMP = 2061, - DATE = 2062, - TIME = 2063, - DATETIME = 2064, - YEAR = 785, - DECIMAL = 18, - TEXT = 6163, - BLOB = 10260, - VARCHAR = 6165, - VARBINARY = 10262, - CHAR = 6167, - BINARY = 10264, - BIT = 2073, - ENUM = 2074, - SET = 2075, - TUPLE = 28, - GEOMETRY = 2077, - JSON = 2078, - EXPRESSION = 31, - HEXNUM = 4128, - HEXVAL = 4129, - BITNUM = 4130 - } - - /** Properties of a Value. */ - interface IValue { + /** Properties of a BinlogTransaction. */ + interface IBinlogTransaction { - /** Value type */ - type?: (query.Type|null); + /** BinlogTransaction statements */ + statements?: (binlogdata.BinlogTransaction.IStatement[]|null); - /** Value value */ - value?: (Uint8Array|null); + /** BinlogTransaction event_token */ + event_token?: (query.IEventToken|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents a BinlogTransaction. */ + class BinlogTransaction implements IBinlogTransaction { /** - * Constructs a new Value. + * Constructs a new BinlogTransaction. * @param [properties] Properties to set */ - constructor(properties?: query.IValue); + constructor(properties?: binlogdata.IBinlogTransaction); - /** Value type. */ - public type: query.Type; + /** BinlogTransaction statements. */ + public statements: binlogdata.BinlogTransaction.IStatement[]; - /** Value value. */ - public value: Uint8Array; + /** BinlogTransaction event_token. */ + public event_token?: (query.IEventToken|null); /** - * Creates a new Value instance using the specified properties. + * Creates a new BinlogTransaction instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns BinlogTransaction instance */ - public static create(properties?: query.IValue): query.Value; + public static create(properties?: binlogdata.IBinlogTransaction): binlogdata.BinlogTransaction; /** - * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. + * @param message BinlogTransaction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. + * @param message BinlogTransaction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a BinlogTransaction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns BinlogTransaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns BinlogTransaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction; /** - * Verifies a Value message. + * Verifies a BinlogTransaction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns BinlogTransaction */ - public static fromObject(object: { [k: string]: any }): query.Value; + public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. + * @param message BinlogTransaction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.BinlogTransaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this BinlogTransaction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindVariable. */ - interface IBindVariable { + namespace BinlogTransaction { - /** BindVariable type */ - type?: (query.Type|null); + /** Properties of a Statement. */ + interface IStatement { - /** BindVariable value */ - value?: (Uint8Array|null); + /** Statement category */ + category?: (binlogdata.BinlogTransaction.Statement.Category|null); - /** BindVariable values */ - values?: (query.IValue[]|null); - } + /** Statement charset */ + charset?: (binlogdata.ICharset|null); - /** Represents a BindVariable. */ - class BindVariable implements IBindVariable { + /** Statement sql */ + sql?: (Uint8Array|null); + } - /** - * Constructs a new BindVariable. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBindVariable); + /** Represents a Statement. */ + class Statement implements IStatement { - /** BindVariable type. */ - public type: query.Type; + /** + * Constructs a new Statement. + * @param [properties] Properties to set + */ + constructor(properties?: binlogdata.BinlogTransaction.IStatement); - /** BindVariable value. */ - public value: Uint8Array; + /** Statement category. */ + public category: binlogdata.BinlogTransaction.Statement.Category; - /** BindVariable values. */ - public values: query.IValue[]; + /** Statement charset. */ + public charset?: (binlogdata.ICharset|null); - /** - * Creates a new BindVariable instance using the specified properties. - * @param [properties] Properties to set - * @returns BindVariable instance - */ - public static create(properties?: query.IBindVariable): query.BindVariable; + /** Statement sql. */ + public sql: Uint8Array; - /** - * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @param message BindVariable message or plain object to encode + /** + * Creates a new Statement instance using the specified properties. + * @param [properties] Properties to set + * @returns Statement instance + */ + public static create(properties?: binlogdata.BinlogTransaction.IStatement): binlogdata.BinlogTransaction.Statement; + + /** + * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. + * @param message Statement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. + * @param message Statement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Statement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction.Statement; + + /** + * Decodes a Statement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction.Statement; + + /** + * Verifies a Statement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Statement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Statement + */ + public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction.Statement; + + /** + * Creates a plain object from a Statement message. Also converts values to other types if specified. + * @param message Statement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: binlogdata.BinlogTransaction.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Statement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Statement { + + /** Category enum. */ + enum Category { + BL_UNRECOGNIZED = 0, + BL_BEGIN = 1, + BL_COMMIT = 2, + BL_ROLLBACK = 3, + BL_DML_DEPRECATED = 4, + BL_DDL = 5, + BL_SET = 6, + BL_INSERT = 7, + BL_UPDATE = 8, + BL_DELETE = 9 + } + } + } + + /** Properties of a StreamKeyRangeRequest. */ + interface IStreamKeyRangeRequest { + + /** StreamKeyRangeRequest position */ + position?: (string|null); + + /** StreamKeyRangeRequest key_range */ + key_range?: (topodata.IKeyRange|null); + + /** StreamKeyRangeRequest charset */ + charset?: (binlogdata.ICharset|null); + } + + /** Represents a StreamKeyRangeRequest. */ + class StreamKeyRangeRequest implements IStreamKeyRangeRequest { + + /** + * Constructs a new StreamKeyRangeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: binlogdata.IStreamKeyRangeRequest); + + /** StreamKeyRangeRequest position. */ + public position: string; + + /** StreamKeyRangeRequest key_range. */ + public key_range?: (topodata.IKeyRange|null); + + /** StreamKeyRangeRequest charset. */ + public charset?: (binlogdata.ICharset|null); + + /** + * Creates a new StreamKeyRangeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamKeyRangeRequest instance + */ + public static create(properties?: binlogdata.IStreamKeyRangeRequest): binlogdata.StreamKeyRangeRequest; + + /** + * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. + * @param message StreamKeyRangeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @param message BindVariable message or plain object to encode + * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. + * @param message StreamKeyRangeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindVariable message from the specified reader or buffer. + * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindVariable + * @returns StreamKeyRangeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BindVariable; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeRequest; /** - * Decodes a BindVariable message from the specified reader or buffer, length delimited. + * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindVariable + * @returns StreamKeyRangeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BindVariable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeRequest; /** - * Verifies a BindVariable message. + * Verifies a StreamKeyRangeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. + * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindVariable + * @returns StreamKeyRangeRequest */ - public static fromObject(object: { [k: string]: any }): query.BindVariable; + public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeRequest; /** - * Creates a plain object from a BindVariable message. Also converts values to other types if specified. - * @param message BindVariable + * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. + * @param message StreamKeyRangeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BindVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.StreamKeyRangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindVariable to JSON. + * Converts this StreamKeyRangeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BoundQuery. */ - interface IBoundQuery { - - /** BoundQuery sql */ - sql?: (string|null); + /** Properties of a StreamKeyRangeResponse. */ + interface IStreamKeyRangeResponse { - /** BoundQuery bind_variables */ - bind_variables?: ({ [k: string]: query.IBindVariable }|null); + /** StreamKeyRangeResponse binlog_transaction */ + binlog_transaction?: (binlogdata.IBinlogTransaction|null); } - /** Represents a BoundQuery. */ - class BoundQuery implements IBoundQuery { + /** Represents a StreamKeyRangeResponse. */ + class StreamKeyRangeResponse implements IStreamKeyRangeResponse { /** - * Constructs a new BoundQuery. + * Constructs a new StreamKeyRangeResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IBoundQuery); - - /** BoundQuery sql. */ - public sql: string; + constructor(properties?: binlogdata.IStreamKeyRangeResponse); - /** BoundQuery bind_variables. */ - public bind_variables: { [k: string]: query.IBindVariable }; + /** StreamKeyRangeResponse binlog_transaction. */ + public binlog_transaction?: (binlogdata.IBinlogTransaction|null); /** - * Creates a new BoundQuery instance using the specified properties. + * Creates a new StreamKeyRangeResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BoundQuery instance + * @returns StreamKeyRangeResponse instance */ - public static create(properties?: query.IBoundQuery): query.BoundQuery; + public static create(properties?: binlogdata.IStreamKeyRangeResponse): binlogdata.StreamKeyRangeResponse; /** - * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @param message BoundQuery message or plain object to encode + * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. + * @param message StreamKeyRangeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @param message BoundQuery message or plain object to encode + * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. + * @param message StreamKeyRangeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundQuery message from the specified reader or buffer. + * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundQuery + * @returns StreamKeyRangeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BoundQuery; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeResponse; /** - * Decodes a BoundQuery message from the specified reader or buffer, length delimited. + * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundQuery + * @returns StreamKeyRangeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BoundQuery; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeResponse; /** - * Verifies a BoundQuery message. + * Verifies a StreamKeyRangeResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. + * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundQuery + * @returns StreamKeyRangeResponse */ - public static fromObject(object: { [k: string]: any }): query.BoundQuery; + public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeResponse; /** - * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. - * @param message BoundQuery + * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. + * @param message StreamKeyRangeResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BoundQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.StreamKeyRangeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundQuery to JSON. + * Converts this StreamKeyRangeResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteOptions. */ - interface IExecuteOptions { + /** Properties of a StreamTablesRequest. */ + interface IStreamTablesRequest { - /** ExecuteOptions included_fields */ - included_fields?: (query.ExecuteOptions.IncludedFields|null); + /** StreamTablesRequest position */ + position?: (string|null); - /** ExecuteOptions client_found_rows */ - client_found_rows?: (boolean|null); + /** StreamTablesRequest tables */ + tables?: (string[]|null); - /** ExecuteOptions workload */ - workload?: (query.ExecuteOptions.Workload|null); + /** StreamTablesRequest charset */ + charset?: (binlogdata.ICharset|null); + } - /** ExecuteOptions sql_select_limit */ - sql_select_limit?: (number|Long|null); + /** Represents a StreamTablesRequest. */ + class StreamTablesRequest implements IStreamTablesRequest { - /** ExecuteOptions transaction_isolation */ - transaction_isolation?: (query.ExecuteOptions.TransactionIsolation|null); + /** + * Constructs a new StreamTablesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: binlogdata.IStreamTablesRequest); - /** ExecuteOptions skip_query_plan_cache */ - skip_query_plan_cache?: (boolean|null); + /** StreamTablesRequest position. */ + public position: string; - /** ExecuteOptions planner_version */ - planner_version?: (query.ExecuteOptions.PlannerVersion|null); + /** StreamTablesRequest tables. */ + public tables: string[]; - /** ExecuteOptions has_created_temp_tables */ - has_created_temp_tables?: (boolean|null); + /** StreamTablesRequest charset. */ + public charset?: (binlogdata.ICharset|null); - /** ExecuteOptions consolidator */ - consolidator?: (query.ExecuteOptions.Consolidator|null); + /** + * Creates a new StreamTablesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamTablesRequest instance + */ + public static create(properties?: binlogdata.IStreamTablesRequest): binlogdata.StreamTablesRequest; - /** ExecuteOptions transaction_access_mode */ - transaction_access_mode?: (query.ExecuteOptions.TransactionAccessMode[]|null); - } + /** + * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * @param message StreamTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an ExecuteOptions. */ - class ExecuteOptions implements IExecuteOptions { + /** + * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * @param message StreamTablesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new ExecuteOptions. - * @param [properties] Properties to set + * Decodes a StreamTablesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: query.IExecuteOptions); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesRequest; - /** ExecuteOptions included_fields. */ - public included_fields: query.ExecuteOptions.IncludedFields; + /** + * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesRequest; - /** ExecuteOptions client_found_rows. */ - public client_found_rows: boolean; + /** + * Verifies a StreamTablesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ExecuteOptions workload. */ - public workload: query.ExecuteOptions.Workload; + /** + * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamTablesRequest + */ + public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesRequest; - /** ExecuteOptions sql_select_limit. */ - public sql_select_limit: (number|Long); + /** + * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. + * @param message StreamTablesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: binlogdata.StreamTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ExecuteOptions transaction_isolation. */ - public transaction_isolation: query.ExecuteOptions.TransactionIsolation; + /** + * Converts this StreamTablesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ExecuteOptions skip_query_plan_cache. */ - public skip_query_plan_cache: boolean; + /** Properties of a StreamTablesResponse. */ + interface IStreamTablesResponse { - /** ExecuteOptions planner_version. */ - public planner_version: query.ExecuteOptions.PlannerVersion; + /** StreamTablesResponse binlog_transaction */ + binlog_transaction?: (binlogdata.IBinlogTransaction|null); + } - /** ExecuteOptions has_created_temp_tables. */ - public has_created_temp_tables: boolean; + /** Represents a StreamTablesResponse. */ + class StreamTablesResponse implements IStreamTablesResponse { - /** ExecuteOptions consolidator. */ - public consolidator: query.ExecuteOptions.Consolidator; + /** + * Constructs a new StreamTablesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: binlogdata.IStreamTablesResponse); - /** ExecuteOptions transaction_access_mode. */ - public transaction_access_mode: query.ExecuteOptions.TransactionAccessMode[]; + /** StreamTablesResponse binlog_transaction. */ + public binlog_transaction?: (binlogdata.IBinlogTransaction|null); /** - * Creates a new ExecuteOptions instance using the specified properties. + * Creates a new StreamTablesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteOptions instance + * @returns StreamTablesResponse instance */ - public static create(properties?: query.IExecuteOptions): query.ExecuteOptions; + public static create(properties?: binlogdata.IStreamTablesResponse): binlogdata.StreamTablesResponse; /** - * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @param message ExecuteOptions message or plain object to encode + * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. + * @param message StreamTablesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @param message ExecuteOptions message or plain object to encode + * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. + * @param message StreamTablesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteOptions message from the specified reader or buffer. + * Decodes a StreamTablesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteOptions + * @returns StreamTablesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesResponse; /** - * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. + * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteOptions + * @returns StreamTablesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesResponse; /** - * Verifies an ExecuteOptions message. + * Verifies a StreamTablesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. + * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteOptions + * @returns StreamTablesResponse */ - public static fromObject(object: { [k: string]: any }): query.ExecuteOptions; + public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesResponse; /** - * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. - * @param message ExecuteOptions + * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. + * @param message StreamTablesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ExecuteOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.StreamTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteOptions to JSON. + * Converts this StreamTablesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExecuteOptions { - - /** IncludedFields enum. */ - enum IncludedFields { - TYPE_AND_NAME = 0, - TYPE_ONLY = 1, - ALL = 2 - } - - /** Workload enum. */ - enum Workload { - UNSPECIFIED = 0, - OLTP = 1, - OLAP = 2, - DBA = 3 - } - - /** TransactionIsolation enum. */ - enum TransactionIsolation { - DEFAULT = 0, - REPEATABLE_READ = 1, - READ_COMMITTED = 2, - READ_UNCOMMITTED = 3, - SERIALIZABLE = 4, - CONSISTENT_SNAPSHOT_READ_ONLY = 5, - AUTOCOMMIT = 6 - } - - /** PlannerVersion enum. */ - enum PlannerVersion { - DEFAULT_PLANNER = 0, - V3 = 1, - Gen4 = 2, - Gen4Greedy = 3, - Gen4Left2Right = 4, - Gen4WithFallback = 5, - Gen4CompareV3 = 6 - } + /** Properties of a CharsetConversion. */ + interface ICharsetConversion { - /** Consolidator enum. */ - enum Consolidator { - CONSOLIDATOR_UNSPECIFIED = 0, - CONSOLIDATOR_DISABLED = 1, - CONSOLIDATOR_ENABLED = 2, - CONSOLIDATOR_ENABLED_REPLICAS = 3 - } + /** CharsetConversion from_charset */ + from_charset?: (string|null); - /** TransactionAccessMode enum. */ - enum TransactionAccessMode { - CONSISTENT_SNAPSHOT = 0, - READ_WRITE = 1, - READ_ONLY = 2 - } + /** CharsetConversion to_charset */ + to_charset?: (string|null); } - /** Properties of a Field. */ - interface IField { + /** Represents a CharsetConversion. */ + class CharsetConversion implements ICharsetConversion { - /** Field name */ - name?: (string|null); + /** + * Constructs a new CharsetConversion. + * @param [properties] Properties to set + */ + constructor(properties?: binlogdata.ICharsetConversion); - /** Field type */ - type?: (query.Type|null); + /** CharsetConversion from_charset. */ + public from_charset: string; - /** Field table */ - table?: (string|null); + /** CharsetConversion to_charset. */ + public to_charset: string; - /** Field org_table */ - org_table?: (string|null); - - /** Field database */ - database?: (string|null); - - /** Field org_name */ - org_name?: (string|null); - - /** Field column_length */ - column_length?: (number|null); - - /** Field charset */ - charset?: (number|null); - - /** Field decimals */ - decimals?: (number|null); - - /** Field flags */ - flags?: (number|null); - - /** Field column_type */ - column_type?: (string|null); - } - - /** Represents a Field. */ - class Field implements IField { - - /** - * Constructs a new Field. - * @param [properties] Properties to set - */ - constructor(properties?: query.IField); - - /** Field name. */ - public name: string; - - /** Field type. */ - public type: query.Type; - - /** Field table. */ - public table: string; - - /** Field org_table. */ - public org_table: string; - - /** Field database. */ - public database: string; - - /** Field org_name. */ - public org_name: string; - - /** Field column_length. */ - public column_length: number; - - /** Field charset. */ - public charset: number; - - /** Field decimals. */ - public decimals: number; - - /** Field flags. */ - public flags: number; - - /** Field column_type. */ - public column_type: string; + /** + * Creates a new CharsetConversion instance using the specified properties. + * @param [properties] Properties to set + * @returns CharsetConversion instance + */ + public static create(properties?: binlogdata.ICharsetConversion): binlogdata.CharsetConversion; /** - * Creates a new Field instance using the specified properties. - * @param [properties] Properties to set - * @returns Field instance - */ - public static create(properties?: query.IField): query.Field; - - /** - * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. - * @param message Field message or plain object to encode + * Encodes the specified CharsetConversion message. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. + * @param message CharsetConversion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.ICharsetConversion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. - * @param message Field message or plain object to encode + * Encodes the specified CharsetConversion message, length delimited. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. + * @param message CharsetConversion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.ICharsetConversion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Field message from the specified reader or buffer. + * Decodes a CharsetConversion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Field + * @returns CharsetConversion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Field; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.CharsetConversion; /** - * Decodes a Field message from the specified reader or buffer, length delimited. + * Decodes a CharsetConversion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Field + * @returns CharsetConversion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Field; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.CharsetConversion; /** - * Verifies a Field message. + * Verifies a CharsetConversion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. + * Creates a CharsetConversion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Field + * @returns CharsetConversion */ - public static fromObject(object: { [k: string]: any }): query.Field; + public static fromObject(object: { [k: string]: any }): binlogdata.CharsetConversion; /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @param message Field + * Creates a plain object from a CharsetConversion message. Also converts values to other types if specified. + * @param message CharsetConversion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.CharsetConversion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Field to JSON. + * Converts this CharsetConversion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Row. */ - interface IRow { + /** Properties of a Rule. */ + interface IRule { - /** Row lengths */ - lengths?: ((number|Long)[]|null); + /** Rule match */ + match?: (string|null); - /** Row values */ - values?: (Uint8Array|null); + /** Rule filter */ + filter?: (string|null); + + /** Rule convert_enum_to_text */ + convert_enum_to_text?: ({ [k: string]: string }|null); + + /** Rule convert_charset */ + convert_charset?: ({ [k: string]: binlogdata.ICharsetConversion }|null); + + /** Rule source_unique_key_columns */ + source_unique_key_columns?: (string|null); + + /** Rule target_unique_key_columns */ + target_unique_key_columns?: (string|null); + + /** Rule source_unique_key_target_columns */ + source_unique_key_target_columns?: (string|null); + + /** Rule convert_int_to_enum */ + convert_int_to_enum?: ({ [k: string]: boolean }|null); } - /** Represents a Row. */ - class Row implements IRow { + /** Represents a Rule. */ + class Rule implements IRule { /** - * Constructs a new Row. + * Constructs a new Rule. * @param [properties] Properties to set */ - constructor(properties?: query.IRow); + constructor(properties?: binlogdata.IRule); - /** Row lengths. */ - public lengths: (number|Long)[]; + /** Rule match. */ + public match: string; - /** Row values. */ - public values: Uint8Array; + /** Rule filter. */ + public filter: string; + + /** Rule convert_enum_to_text. */ + public convert_enum_to_text: { [k: string]: string }; + + /** Rule convert_charset. */ + public convert_charset: { [k: string]: binlogdata.ICharsetConversion }; + + /** Rule source_unique_key_columns. */ + public source_unique_key_columns: string; + + /** Rule target_unique_key_columns. */ + public target_unique_key_columns: string; + + /** Rule source_unique_key_target_columns. */ + public source_unique_key_target_columns: string; + + /** Rule convert_int_to_enum. */ + public convert_int_to_enum: { [k: string]: boolean }; /** - * Creates a new Row instance using the specified properties. + * Creates a new Rule instance using the specified properties. * @param [properties] Properties to set - * @returns Row instance + * @returns Rule instance */ - public static create(properties?: query.IRow): query.Row; + public static create(properties?: binlogdata.IRule): binlogdata.Rule; /** - * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a Rule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Row + * @returns Rule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Row; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Rule; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a Rule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Row + * @returns Rule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Row; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Rule; /** - * Verifies a Row message. + * Verifies a Rule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a Rule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Row + * @returns Rule */ - public static fromObject(object: { [k: string]: any }): query.Row; + public static fromObject(object: { [k: string]: any }): binlogdata.Rule; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @param message Rule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Row to JSON. + * Converts this Rule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** QueryResult fields */ - fields?: (query.IField[]|null); - - /** QueryResult rows_affected */ - rows_affected?: (number|Long|null); + /** Properties of a Filter. */ + interface IFilter { - /** QueryResult insert_id */ - insert_id?: (number|Long|null); + /** Filter rules */ + rules?: (binlogdata.IRule[]|null); - /** QueryResult rows */ - rows?: (query.IRow[]|null); + /** Filter field_event_mode */ + field_event_mode?: (binlogdata.Filter.FieldEventMode|null); - /** QueryResult info */ - info?: (string|null); + /** Filter workflow_type */ + workflow_type?: (number|Long|null); - /** QueryResult session_state_changes */ - session_state_changes?: (string|null); + /** Filter workflow_name */ + workflow_name?: (string|null); } - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { + /** Represents a Filter. */ + class Filter implements IFilter { /** - * Constructs a new QueryResult. + * Constructs a new Filter. * @param [properties] Properties to set */ - constructor(properties?: query.IQueryResult); - - /** QueryResult fields. */ - public fields: query.IField[]; - - /** QueryResult rows_affected. */ - public rows_affected: (number|Long); + constructor(properties?: binlogdata.IFilter); - /** QueryResult insert_id. */ - public insert_id: (number|Long); + /** Filter rules. */ + public rules: binlogdata.IRule[]; - /** QueryResult rows. */ - public rows: query.IRow[]; + /** Filter field_event_mode. */ + public field_event_mode: binlogdata.Filter.FieldEventMode; - /** QueryResult info. */ - public info: string; + /** Filter workflow_type. */ + public workflow_type: (number|Long); - /** QueryResult session_state_changes. */ - public session_state_changes: string; + /** Filter workflow_name. */ + public workflow_name: string; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new Filter instance using the specified properties. * @param [properties] Properties to set - * @returns QueryResult instance + * @returns Filter instance */ - public static create(properties?: query.IQueryResult): query.QueryResult; + public static create(properties?: binlogdata.IFilter): binlogdata.Filter; /** - * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a Filter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryResult + * @returns Filter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Filter; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a Filter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryResult + * @returns Filter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Filter; /** - * Verifies a QueryResult message. + * Verifies a Filter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. + * Creates a Filter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryResult + * @returns Filter */ - public static fromObject(object: { [k: string]: any }): query.QueryResult; + public static fromObject(object: { [k: string]: any }): binlogdata.Filter; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @param message QueryResult + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryResult to JSON. + * Converts this Filter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryWarning. */ - interface IQueryWarning { + namespace Filter { - /** QueryWarning code */ - code?: (number|null); + /** FieldEventMode enum. */ + enum FieldEventMode { + ERR_ON_MISMATCH = 0, + BEST_EFFORT = 1 + } + } - /** QueryWarning message */ - message?: (string|null); + /** OnDDLAction enum. */ + enum OnDDLAction { + IGNORE = 0, + STOP = 1, + EXEC = 2, + EXEC_IGNORE = 3 } - /** Represents a QueryWarning. */ - class QueryWarning implements IQueryWarning { + /** VReplicationWorkflowType enum. */ + enum VReplicationWorkflowType { + Materialize = 0, + MoveTables = 1, + CreateLookupIndex = 2, + Migrate = 3, + Reshard = 4, + OnlineDDL = 5 + } + + /** VReplicationWorkflowSubType enum. */ + enum VReplicationWorkflowSubType { + None = 0, + Partial = 1 + } + + /** Properties of a BinlogSource. */ + interface IBinlogSource { + + /** BinlogSource keyspace */ + keyspace?: (string|null); + + /** BinlogSource shard */ + shard?: (string|null); + + /** BinlogSource tablet_type */ + tablet_type?: (topodata.TabletType|null); + + /** BinlogSource key_range */ + key_range?: (topodata.IKeyRange|null); + + /** BinlogSource tables */ + tables?: (string[]|null); + + /** BinlogSource filter */ + filter?: (binlogdata.IFilter|null); + + /** BinlogSource on_ddl */ + on_ddl?: (binlogdata.OnDDLAction|null); + + /** BinlogSource external_mysql */ + external_mysql?: (string|null); + + /** BinlogSource stop_after_copy */ + stop_after_copy?: (boolean|null); + + /** BinlogSource external_cluster */ + external_cluster?: (string|null); + + /** BinlogSource source_time_zone */ + source_time_zone?: (string|null); + + /** BinlogSource target_time_zone */ + target_time_zone?: (string|null); + } + + /** Represents a BinlogSource. */ + class BinlogSource implements IBinlogSource { /** - * Constructs a new QueryWarning. + * Constructs a new BinlogSource. * @param [properties] Properties to set */ - constructor(properties?: query.IQueryWarning); + constructor(properties?: binlogdata.IBinlogSource); - /** QueryWarning code. */ - public code: number; + /** BinlogSource keyspace. */ + public keyspace: string; - /** QueryWarning message. */ - public message: string; + /** BinlogSource shard. */ + public shard: string; + + /** BinlogSource tablet_type. */ + public tablet_type: topodata.TabletType; + + /** BinlogSource key_range. */ + public key_range?: (topodata.IKeyRange|null); + + /** BinlogSource tables. */ + public tables: string[]; + + /** BinlogSource filter. */ + public filter?: (binlogdata.IFilter|null); + + /** BinlogSource on_ddl. */ + public on_ddl: binlogdata.OnDDLAction; + + /** BinlogSource external_mysql. */ + public external_mysql: string; + + /** BinlogSource stop_after_copy. */ + public stop_after_copy: boolean; + + /** BinlogSource external_cluster. */ + public external_cluster: string; + + /** BinlogSource source_time_zone. */ + public source_time_zone: string; + + /** BinlogSource target_time_zone. */ + public target_time_zone: string; /** - * Creates a new QueryWarning instance using the specified properties. + * Creates a new BinlogSource instance using the specified properties. * @param [properties] Properties to set - * @returns QueryWarning instance + * @returns BinlogSource instance */ - public static create(properties?: query.IQueryWarning): query.QueryWarning; + public static create(properties?: binlogdata.IBinlogSource): binlogdata.BinlogSource; /** - * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @param message QueryWarning message or plain object to encode + * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. + * @param message BinlogSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @param message QueryWarning message or plain object to encode + * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. + * @param message BinlogSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryWarning message from the specified reader or buffer. + * Decodes a BinlogSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryWarning + * @returns BinlogSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryWarning; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogSource; /** - * Decodes a QueryWarning message from the specified reader or buffer, length delimited. + * Decodes a BinlogSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryWarning + * @returns BinlogSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryWarning; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogSource; /** - * Verifies a QueryWarning message. + * Verifies a BinlogSource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. + * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryWarning + * @returns BinlogSource */ - public static fromObject(object: { [k: string]: any }): query.QueryWarning; + public static fromObject(object: { [k: string]: any }): binlogdata.BinlogSource; /** - * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. - * @param message QueryWarning + * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. + * @param message BinlogSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.QueryWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.BinlogSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryWarning to JSON. + * Converts this BinlogSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamEvent. */ - interface IStreamEvent { - - /** StreamEvent statements */ - statements?: (query.StreamEvent.IStatement[]|null); - - /** StreamEvent event_token */ - event_token?: (query.IEventToken|null); - } - - /** Represents a StreamEvent. */ - class StreamEvent implements IStreamEvent { - - /** - * Constructs a new StreamEvent. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamEvent); - - /** StreamEvent statements. */ - public statements: query.StreamEvent.IStatement[]; - - /** StreamEvent event_token. */ - public event_token?: (query.IEventToken|null); + /** VEventType enum. */ + enum VEventType { + UNKNOWN = 0, + GTID = 1, + BEGIN = 2, + COMMIT = 3, + ROLLBACK = 4, + DDL = 5, + INSERT = 6, + REPLACE = 7, + UPDATE = 8, + DELETE = 9, + SET = 10, + OTHER = 11, + ROW = 12, + FIELD = 13, + HEARTBEAT = 14, + VGTID = 15, + JOURNAL = 16, + VERSION = 17, + LASTPK = 18, + SAVEPOINT = 19, + COPY_COMPLETED = 20 + } + + /** Properties of a RowChange. */ + interface IRowChange { + + /** RowChange before */ + before?: (query.IRow|null); + + /** RowChange after */ + after?: (query.IRow|null); + } + + /** Represents a RowChange. */ + class RowChange implements IRowChange { /** - * Creates a new StreamEvent instance using the specified properties. + * Constructs a new RowChange. * @param [properties] Properties to set - * @returns StreamEvent instance */ - public static create(properties?: query.IStreamEvent): query.StreamEvent; + constructor(properties?: binlogdata.IRowChange); + + /** RowChange before. */ + public before?: (query.IRow|null); + + /** RowChange after. */ + public after?: (query.IRow|null); /** - * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @param message StreamEvent message or plain object to encode + * Creates a new RowChange instance using the specified properties. + * @param [properties] Properties to set + * @returns RowChange instance + */ + public static create(properties?: binlogdata.IRowChange): binlogdata.RowChange; + + /** + * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. + * @param message RowChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @param message StreamEvent message or plain object to encode + * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. + * @param message RowChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamEvent message from the specified reader or buffer. + * Decodes a RowChange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamEvent + * @returns RowChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowChange; /** - * Decodes a StreamEvent message from the specified reader or buffer, length delimited. + * Decodes a RowChange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamEvent + * @returns RowChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowChange; /** - * Verifies a StreamEvent message. + * Verifies a RowChange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. + * Creates a RowChange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamEvent + * @returns RowChange */ - public static fromObject(object: { [k: string]: any }): query.StreamEvent; + public static fromObject(object: { [k: string]: any }): binlogdata.RowChange; /** - * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. - * @param message StreamEvent + * Creates a plain object from a RowChange message. Also converts values to other types if specified. + * @param message RowChange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StreamEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.RowChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamEvent to JSON. + * Converts this RowChange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace StreamEvent { - - /** Properties of a Statement. */ - interface IStatement { - - /** Statement category */ - category?: (query.StreamEvent.Statement.Category|null); - - /** Statement table_name */ - table_name?: (string|null); - - /** Statement primary_key_fields */ - primary_key_fields?: (query.IField[]|null); - - /** Statement primary_key_values */ - primary_key_values?: (query.IRow[]|null); - - /** Statement sql */ - sql?: (Uint8Array|null); - } - - /** Represents a Statement. */ - class Statement implements IStatement { - - /** - * Constructs a new Statement. - * @param [properties] Properties to set - */ - constructor(properties?: query.StreamEvent.IStatement); - - /** Statement category. */ - public category: query.StreamEvent.Statement.Category; - - /** Statement table_name. */ - public table_name: string; - - /** Statement primary_key_fields. */ - public primary_key_fields: query.IField[]; - - /** Statement primary_key_values. */ - public primary_key_values: query.IRow[]; - - /** Statement sql. */ - public sql: Uint8Array; - - /** - * Creates a new Statement instance using the specified properties. - * @param [properties] Properties to set - * @returns Statement instance - */ - public static create(properties?: query.StreamEvent.IStatement): query.StreamEvent.Statement; - - /** - * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent.Statement; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent.Statement; - - /** - * Verifies a Statement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Statement - */ - public static fromObject(object: { [k: string]: any }): query.StreamEvent.Statement; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @param message Statement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamEvent.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Statement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Statement { - - /** Category enum. */ - enum Category { - Error = 0, - DML = 1, - DDL = 2 - } - } - } - - /** Properties of an ExecuteRequest. */ - interface IExecuteRequest { - - /** ExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteRequest target */ - target?: (query.ITarget|null); + /** Properties of a RowEvent. */ + interface IRowEvent { - /** ExecuteRequest query */ - query?: (query.IBoundQuery|null); + /** RowEvent table_name */ + table_name?: (string|null); - /** ExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); + /** RowEvent row_changes */ + row_changes?: (binlogdata.IRowChange[]|null); - /** ExecuteRequest options */ - options?: (query.IExecuteOptions|null); + /** RowEvent keyspace */ + keyspace?: (string|null); - /** ExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); + /** RowEvent shard */ + shard?: (string|null); } - /** Represents an ExecuteRequest. */ - class ExecuteRequest implements IExecuteRequest { + /** Represents a RowEvent. */ + class RowEvent implements IRowEvent { /** - * Constructs a new ExecuteRequest. + * Constructs a new RowEvent. * @param [properties] Properties to set */ - constructor(properties?: query.IExecuteRequest); - - /** ExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteRequest target. */ - public target?: (query.ITarget|null); + constructor(properties?: binlogdata.IRowEvent); - /** ExecuteRequest query. */ - public query?: (query.IBoundQuery|null); + /** RowEvent table_name. */ + public table_name: string; - /** ExecuteRequest transaction_id. */ - public transaction_id: (number|Long); + /** RowEvent row_changes. */ + public row_changes: binlogdata.IRowChange[]; - /** ExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); + /** RowEvent keyspace. */ + public keyspace: string; - /** ExecuteRequest reserved_id. */ - public reserved_id: (number|Long); + /** RowEvent shard. */ + public shard: string; /** - * Creates a new ExecuteRequest instance using the specified properties. + * Creates a new RowEvent instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteRequest instance + * @returns RowEvent instance */ - public static create(properties?: query.IExecuteRequest): query.ExecuteRequest; + public static create(properties?: binlogdata.IRowEvent): binlogdata.RowEvent; /** - * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @param message ExecuteRequest message or plain object to encode + * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. + * @param message RowEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @param message ExecuteRequest message or plain object to encode + * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. + * @param message RowEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteRequest message from the specified reader or buffer. + * Decodes a RowEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteRequest + * @returns RowEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowEvent; /** - * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a RowEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteRequest + * @returns RowEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowEvent; /** - * Verifies an ExecuteRequest message. + * Verifies a RowEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteRequest + * @returns RowEvent */ - public static fromObject(object: { [k: string]: any }): query.ExecuteRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.RowEvent; /** - * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. - * @param message ExecuteRequest + * Creates a plain object from a RowEvent message. Also converts values to other types if specified. + * @param message RowEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.RowEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteRequest to JSON. + * Converts this RowEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteResponse. */ - interface IExecuteResponse { + /** Properties of a FieldEvent. */ + interface IFieldEvent { - /** ExecuteResponse result */ - result?: (query.IQueryResult|null); + /** FieldEvent table_name */ + table_name?: (string|null); + + /** FieldEvent fields */ + fields?: (query.IField[]|null); + + /** FieldEvent keyspace */ + keyspace?: (string|null); + + /** FieldEvent shard */ + shard?: (string|null); } - /** Represents an ExecuteResponse. */ - class ExecuteResponse implements IExecuteResponse { + /** Represents a FieldEvent. */ + class FieldEvent implements IFieldEvent { /** - * Constructs a new ExecuteResponse. + * Constructs a new FieldEvent. * @param [properties] Properties to set */ - constructor(properties?: query.IExecuteResponse); + constructor(properties?: binlogdata.IFieldEvent); - /** ExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** FieldEvent table_name. */ + public table_name: string; + + /** FieldEvent fields. */ + public fields: query.IField[]; + + /** FieldEvent keyspace. */ + public keyspace: string; + + /** FieldEvent shard. */ + public shard: string; /** - * Creates a new ExecuteResponse instance using the specified properties. + * Creates a new FieldEvent instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteResponse instance + * @returns FieldEvent instance */ - public static create(properties?: query.IExecuteResponse): query.ExecuteResponse; + public static create(properties?: binlogdata.IFieldEvent): binlogdata.FieldEvent; /** - * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @param message ExecuteResponse message or plain object to encode + * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. + * @param message FieldEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @param message ExecuteResponse message or plain object to encode + * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. + * @param message FieldEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteResponse message from the specified reader or buffer. + * Decodes a FieldEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteResponse + * @returns FieldEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.FieldEvent; /** - * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a FieldEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteResponse + * @returns FieldEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.FieldEvent; /** - * Verifies an ExecuteResponse message. + * Verifies a FieldEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteResponse + * @returns FieldEvent */ - public static fromObject(object: { [k: string]: any }): query.ExecuteResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.FieldEvent; /** - * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. - * @param message ExecuteResponse + * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. + * @param message FieldEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.FieldEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteResponse to JSON. + * Converts this FieldEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ResultWithError. */ - interface IResultWithError { + /** Properties of a ShardGtid. */ + interface IShardGtid { - /** ResultWithError error */ - error?: (vtrpc.IRPCError|null); + /** ShardGtid keyspace */ + keyspace?: (string|null); - /** ResultWithError result */ - result?: (query.IQueryResult|null); + /** ShardGtid shard */ + shard?: (string|null); + + /** ShardGtid gtid */ + gtid?: (string|null); + + /** ShardGtid table_p_ks */ + table_p_ks?: (binlogdata.ITableLastPK[]|null); } - /** Represents a ResultWithError. */ - class ResultWithError implements IResultWithError { + /** Represents a ShardGtid. */ + class ShardGtid implements IShardGtid { /** - * Constructs a new ResultWithError. + * Constructs a new ShardGtid. * @param [properties] Properties to set */ - constructor(properties?: query.IResultWithError); + constructor(properties?: binlogdata.IShardGtid); - /** ResultWithError error. */ - public error?: (vtrpc.IRPCError|null); + /** ShardGtid keyspace. */ + public keyspace: string; - /** ResultWithError result. */ - public result?: (query.IQueryResult|null); + /** ShardGtid shard. */ + public shard: string; + + /** ShardGtid gtid. */ + public gtid: string; + + /** ShardGtid table_p_ks. */ + public table_p_ks: binlogdata.ITableLastPK[]; /** - * Creates a new ResultWithError instance using the specified properties. + * Creates a new ShardGtid instance using the specified properties. * @param [properties] Properties to set - * @returns ResultWithError instance + * @returns ShardGtid instance */ - public static create(properties?: query.IResultWithError): query.ResultWithError; + public static create(properties?: binlogdata.IShardGtid): binlogdata.ShardGtid; /** - * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @param message ResultWithError message or plain object to encode + * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. + * @param message ShardGtid message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @param message ResultWithError message or plain object to encode + * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. + * @param message ShardGtid message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResultWithError message from the specified reader or buffer. + * Decodes a ShardGtid message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResultWithError + * @returns ShardGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ResultWithError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.ShardGtid; /** - * Decodes a ResultWithError message from the specified reader or buffer, length delimited. + * Decodes a ShardGtid message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResultWithError + * @returns ShardGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ResultWithError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.ShardGtid; /** - * Verifies a ResultWithError message. + * Verifies a ShardGtid message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. + * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResultWithError + * @returns ShardGtid */ - public static fromObject(object: { [k: string]: any }): query.ResultWithError; + public static fromObject(object: { [k: string]: any }): binlogdata.ShardGtid; /** - * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. - * @param message ResultWithError + * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. + * @param message ShardGtid * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ResultWithError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.ShardGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResultWithError to JSON. + * Converts this ShardGtid to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamExecuteRequest. */ - interface IStreamExecuteRequest { + /** Properties of a VGtid. */ + interface IVGtid { - /** StreamExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** VGtid shard_gtids */ + shard_gtids?: (binlogdata.IShardGtid[]|null); + } - /** StreamExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StreamExecuteRequest target */ - target?: (query.ITarget|null); - - /** StreamExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** StreamExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** StreamExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** StreamExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); - } - - /** Represents a StreamExecuteRequest. */ - class StreamExecuteRequest implements IStreamExecuteRequest { + /** Represents a VGtid. */ + class VGtid implements IVGtid { /** - * Constructs a new StreamExecuteRequest. + * Constructs a new VGtid. * @param [properties] Properties to set */ - constructor(properties?: query.IStreamExecuteRequest); - - /** StreamExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** StreamExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StreamExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** StreamExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** StreamExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** StreamExecuteRequest transaction_id. */ - public transaction_id: (number|Long); + constructor(properties?: binlogdata.IVGtid); - /** StreamExecuteRequest reserved_id. */ - public reserved_id: (number|Long); + /** VGtid shard_gtids. */ + public shard_gtids: binlogdata.IShardGtid[]; /** - * Creates a new StreamExecuteRequest instance using the specified properties. + * Creates a new VGtid instance using the specified properties. * @param [properties] Properties to set - * @returns StreamExecuteRequest instance + * @returns VGtid instance */ - public static create(properties?: query.IStreamExecuteRequest): query.StreamExecuteRequest; + public static create(properties?: binlogdata.IVGtid): binlogdata.VGtid; /** - * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @param message StreamExecuteRequest message or plain object to encode + * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. + * @param message VGtid message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @param message StreamExecuteRequest message or plain object to encode + * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. + * @param message VGtid message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer. + * Decodes a VGtid message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamExecuteRequest + * @returns VGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VGtid; /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a VGtid message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamExecuteRequest + * @returns VGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VGtid; /** - * Verifies a StreamExecuteRequest message. + * Verifies a VGtid message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VGtid message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamExecuteRequest + * @returns VGtid */ - public static fromObject(object: { [k: string]: any }): query.StreamExecuteRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.VGtid; /** - * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. - * @param message StreamExecuteRequest + * Creates a plain object from a VGtid message. Also converts values to other types if specified. + * @param message VGtid * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamExecuteRequest to JSON. + * Converts this VGtid to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamExecuteResponse. */ - interface IStreamExecuteResponse { + /** Properties of a KeyspaceShard. */ + interface IKeyspaceShard { - /** StreamExecuteResponse result */ - result?: (query.IQueryResult|null); + /** KeyspaceShard keyspace */ + keyspace?: (string|null); + + /** KeyspaceShard shard */ + shard?: (string|null); } - /** Represents a StreamExecuteResponse. */ - class StreamExecuteResponse implements IStreamExecuteResponse { + /** Represents a KeyspaceShard. */ + class KeyspaceShard implements IKeyspaceShard { /** - * Constructs a new StreamExecuteResponse. + * Constructs a new KeyspaceShard. * @param [properties] Properties to set */ - constructor(properties?: query.IStreamExecuteResponse); + constructor(properties?: binlogdata.IKeyspaceShard); - /** StreamExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** KeyspaceShard keyspace. */ + public keyspace: string; + + /** KeyspaceShard shard. */ + public shard: string; /** - * Creates a new StreamExecuteResponse instance using the specified properties. + * Creates a new KeyspaceShard instance using the specified properties. * @param [properties] Properties to set - * @returns StreamExecuteResponse instance + * @returns KeyspaceShard instance */ - public static create(properties?: query.IStreamExecuteResponse): query.StreamExecuteResponse; + public static create(properties?: binlogdata.IKeyspaceShard): binlogdata.KeyspaceShard; /** - * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @param message StreamExecuteResponse message or plain object to encode + * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. + * @param message KeyspaceShard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @param message StreamExecuteResponse message or plain object to encode + * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. + * @param message KeyspaceShard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer. + * Decodes a KeyspaceShard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamExecuteResponse + * @returns KeyspaceShard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.KeyspaceShard; /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamExecuteResponse + * @returns KeyspaceShard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.KeyspaceShard; /** - * Verifies a StreamExecuteResponse message. + * Verifies a KeyspaceShard message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamExecuteResponse + * @returns KeyspaceShard */ - public static fromObject(object: { [k: string]: any }): query.StreamExecuteResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.KeyspaceShard; /** - * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. - * @param message StreamExecuteResponse + * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. + * @param message KeyspaceShard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.KeyspaceShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamExecuteResponse to JSON. + * Converts this KeyspaceShard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginRequest. */ - interface IBeginRequest { + /** MigrationType enum. */ + enum MigrationType { + TABLES = 0, + SHARDS = 1 + } - /** BeginRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** Properties of a Journal. */ + interface IJournal { - /** BeginRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** Journal id */ + id?: (number|Long|null); - /** BeginRequest target */ - target?: (query.ITarget|null); + /** Journal migration_type */ + migration_type?: (binlogdata.MigrationType|null); - /** BeginRequest options */ - options?: (query.IExecuteOptions|null); + /** Journal tables */ + tables?: (string[]|null); + + /** Journal local_position */ + local_position?: (string|null); + + /** Journal shard_gtids */ + shard_gtids?: (binlogdata.IShardGtid[]|null); + + /** Journal participants */ + participants?: (binlogdata.IKeyspaceShard[]|null); + + /** Journal source_workflows */ + source_workflows?: (string[]|null); } - /** Represents a BeginRequest. */ - class BeginRequest implements IBeginRequest { + /** Represents a Journal. */ + class Journal implements IJournal { /** - * Constructs a new BeginRequest. + * Constructs a new Journal. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginRequest); + constructor(properties?: binlogdata.IJournal); - /** BeginRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + /** Journal id. */ + public id: (number|Long); - /** BeginRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** Journal migration_type. */ + public migration_type: binlogdata.MigrationType; - /** BeginRequest target. */ - public target?: (query.ITarget|null); + /** Journal tables. */ + public tables: string[]; - /** BeginRequest options. */ - public options?: (query.IExecuteOptions|null); + /** Journal local_position. */ + public local_position: string; + + /** Journal shard_gtids. */ + public shard_gtids: binlogdata.IShardGtid[]; + + /** Journal participants. */ + public participants: binlogdata.IKeyspaceShard[]; + + /** Journal source_workflows. */ + public source_workflows: string[]; /** - * Creates a new BeginRequest instance using the specified properties. + * Creates a new Journal instance using the specified properties. * @param [properties] Properties to set - * @returns BeginRequest instance + * @returns Journal instance */ - public static create(properties?: query.IBeginRequest): query.BeginRequest; + public static create(properties?: binlogdata.IJournal): binlogdata.Journal; /** - * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @param message BeginRequest message or plain object to encode + * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. + * @param message Journal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @param message BeginRequest message or plain object to encode + * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. + * @param message Journal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginRequest message from the specified reader or buffer. + * Decodes a Journal message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginRequest + * @returns Journal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Journal; /** - * Decodes a BeginRequest message from the specified reader or buffer, length delimited. + * Decodes a Journal message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginRequest + * @returns Journal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Journal; /** - * Verifies a BeginRequest message. + * Verifies a Journal message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Journal message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginRequest + * @returns Journal */ - public static fromObject(object: { [k: string]: any }): query.BeginRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.Journal; /** - * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. - * @param message BeginRequest + * Creates a plain object from a Journal message. Also converts values to other types if specified. + * @param message Journal * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.Journal, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginRequest to JSON. + * Converts this Journal to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginResponse. */ - interface IBeginResponse { + /** Properties of a VEvent. */ + interface IVEvent { - /** BeginResponse transaction_id */ - transaction_id?: (number|Long|null); + /** VEvent type */ + type?: (binlogdata.VEventType|null); - /** BeginResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** VEvent timestamp */ + timestamp?: (number|Long|null); - /** BeginResponse session_state_changes */ - session_state_changes?: (string|null); + /** VEvent gtid */ + gtid?: (string|null); + + /** VEvent statement */ + statement?: (string|null); + + /** VEvent row_event */ + row_event?: (binlogdata.IRowEvent|null); + + /** VEvent field_event */ + field_event?: (binlogdata.IFieldEvent|null); + + /** VEvent vgtid */ + vgtid?: (binlogdata.IVGtid|null); + + /** VEvent journal */ + journal?: (binlogdata.IJournal|null); + + /** VEvent dml */ + dml?: (string|null); + + /** VEvent current_time */ + current_time?: (number|Long|null); + + /** VEvent last_p_k_event */ + last_p_k_event?: (binlogdata.ILastPKEvent|null); + + /** VEvent keyspace */ + keyspace?: (string|null); + + /** VEvent shard */ + shard?: (string|null); + + /** VEvent throttled */ + throttled?: (boolean|null); } - /** Represents a BeginResponse. */ - class BeginResponse implements IBeginResponse { + /** Represents a VEvent. */ + class VEvent implements IVEvent { /** - * Constructs a new BeginResponse. + * Constructs a new VEvent. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginResponse); + constructor(properties?: binlogdata.IVEvent); - /** BeginResponse transaction_id. */ - public transaction_id: (number|Long); + /** VEvent type. */ + public type: binlogdata.VEventType; - /** BeginResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** VEvent timestamp. */ + public timestamp: (number|Long); - /** BeginResponse session_state_changes. */ - public session_state_changes: string; + /** VEvent gtid. */ + public gtid: string; + + /** VEvent statement. */ + public statement: string; + + /** VEvent row_event. */ + public row_event?: (binlogdata.IRowEvent|null); + + /** VEvent field_event. */ + public field_event?: (binlogdata.IFieldEvent|null); + + /** VEvent vgtid. */ + public vgtid?: (binlogdata.IVGtid|null); + + /** VEvent journal. */ + public journal?: (binlogdata.IJournal|null); + + /** VEvent dml. */ + public dml: string; + + /** VEvent current_time. */ + public current_time: (number|Long); + + /** VEvent last_p_k_event. */ + public last_p_k_event?: (binlogdata.ILastPKEvent|null); + + /** VEvent keyspace. */ + public keyspace: string; + + /** VEvent shard. */ + public shard: string; + + /** VEvent throttled. */ + public throttled: boolean; /** - * Creates a new BeginResponse instance using the specified properties. + * Creates a new VEvent instance using the specified properties. * @param [properties] Properties to set - * @returns BeginResponse instance + * @returns VEvent instance */ - public static create(properties?: query.IBeginResponse): query.BeginResponse; + public static create(properties?: binlogdata.IVEvent): binlogdata.VEvent; /** - * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @param message BeginResponse message or plain object to encode + * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. + * @param message VEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @param message BeginResponse message or plain object to encode + * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. + * @param message VEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginResponse message from the specified reader or buffer. + * Decodes a VEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginResponse + * @returns VEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VEvent; /** - * Decodes a BeginResponse message from the specified reader or buffer, length delimited. + * Decodes a VEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginResponse + * @returns VEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VEvent; /** - * Verifies a BeginResponse message. + * Verifies a VEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginResponse + * @returns VEvent */ - public static fromObject(object: { [k: string]: any }): query.BeginResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.VEvent; /** - * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. - * @param message BeginResponse + * Creates a plain object from a VEvent message. Also converts values to other types if specified. + * @param message VEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginResponse to JSON. + * Converts this VEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CommitRequest. */ - interface ICommitRequest { - - /** CommitRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** Properties of a MinimalTable. */ + interface IMinimalTable { - /** CommitRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** MinimalTable name */ + name?: (string|null); - /** CommitRequest target */ - target?: (query.ITarget|null); + /** MinimalTable fields */ + fields?: (query.IField[]|null); - /** CommitRequest transaction_id */ - transaction_id?: (number|Long|null); + /** MinimalTable p_k_columns */ + p_k_columns?: ((number|Long)[]|null); } - /** Represents a CommitRequest. */ - class CommitRequest implements ICommitRequest { + /** Represents a MinimalTable. */ + class MinimalTable implements IMinimalTable { /** - * Constructs a new CommitRequest. + * Constructs a new MinimalTable. * @param [properties] Properties to set */ - constructor(properties?: query.ICommitRequest); - - /** CommitRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + constructor(properties?: binlogdata.IMinimalTable); - /** CommitRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** MinimalTable name. */ + public name: string; - /** CommitRequest target. */ - public target?: (query.ITarget|null); + /** MinimalTable fields. */ + public fields: query.IField[]; - /** CommitRequest transaction_id. */ - public transaction_id: (number|Long); + /** MinimalTable p_k_columns. */ + public p_k_columns: (number|Long)[]; /** - * Creates a new CommitRequest instance using the specified properties. + * Creates a new MinimalTable instance using the specified properties. * @param [properties] Properties to set - * @returns CommitRequest instance + * @returns MinimalTable instance */ - public static create(properties?: query.ICommitRequest): query.CommitRequest; + public static create(properties?: binlogdata.IMinimalTable): binlogdata.MinimalTable; /** - * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @param message CommitRequest message or plain object to encode + * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. + * @param message MinimalTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @param message CommitRequest message or plain object to encode + * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. + * @param message MinimalTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommitRequest message from the specified reader or buffer. + * Decodes a MinimalTable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommitRequest + * @returns MinimalTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalTable; /** - * Decodes a CommitRequest message from the specified reader or buffer, length delimited. + * Decodes a MinimalTable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommitRequest + * @returns MinimalTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalTable; /** - * Verifies a CommitRequest message. + * Verifies a MinimalTable message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommitRequest + * @returns MinimalTable */ - public static fromObject(object: { [k: string]: any }): query.CommitRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.MinimalTable; /** - * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. - * @param message CommitRequest + * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. + * @param message MinimalTable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.MinimalTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommitRequest to JSON. + * Converts this MinimalTable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CommitResponse. */ - interface ICommitResponse { + /** Properties of a MinimalSchema. */ + interface IMinimalSchema { - /** CommitResponse reserved_id */ - reserved_id?: (number|Long|null); + /** MinimalSchema tables */ + tables?: (binlogdata.IMinimalTable[]|null); } - /** Represents a CommitResponse. */ - class CommitResponse implements ICommitResponse { + /** Represents a MinimalSchema. */ + class MinimalSchema implements IMinimalSchema { /** - * Constructs a new CommitResponse. + * Constructs a new MinimalSchema. * @param [properties] Properties to set */ - constructor(properties?: query.ICommitResponse); + constructor(properties?: binlogdata.IMinimalSchema); - /** CommitResponse reserved_id. */ - public reserved_id: (number|Long); + /** MinimalSchema tables. */ + public tables: binlogdata.IMinimalTable[]; /** - * Creates a new CommitResponse instance using the specified properties. + * Creates a new MinimalSchema instance using the specified properties. * @param [properties] Properties to set - * @returns CommitResponse instance + * @returns MinimalSchema instance */ - public static create(properties?: query.ICommitResponse): query.CommitResponse; + public static create(properties?: binlogdata.IMinimalSchema): binlogdata.MinimalSchema; /** - * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @param message CommitResponse message or plain object to encode + * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. + * @param message MinimalSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @param message CommitResponse message or plain object to encode + * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. + * @param message MinimalSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommitResponse message from the specified reader or buffer. + * Decodes a MinimalSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommitResponse + * @returns MinimalSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalSchema; /** - * Decodes a CommitResponse message from the specified reader or buffer, length delimited. + * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommitResponse + * @returns MinimalSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalSchema; /** - * Verifies a CommitResponse message. + * Verifies a MinimalSchema message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommitResponse + * @returns MinimalSchema */ - public static fromObject(object: { [k: string]: any }): query.CommitResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.MinimalSchema; /** - * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. - * @param message CommitResponse + * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. + * @param message MinimalSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.MinimalSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommitResponse to JSON. + * Converts this MinimalSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RollbackRequest. */ - interface IRollbackRequest { + /** Properties of a VStreamRequest. */ + interface IVStreamRequest { - /** RollbackRequest effective_caller_id */ + /** VStreamRequest effective_caller_id */ effective_caller_id?: (vtrpc.ICallerID|null); - /** RollbackRequest immediate_caller_id */ + /** VStreamRequest immediate_caller_id */ immediate_caller_id?: (query.IVTGateCallerID|null); - /** RollbackRequest target */ + /** VStreamRequest target */ target?: (query.ITarget|null); - /** RollbackRequest transaction_id */ - transaction_id?: (number|Long|null); + /** VStreamRequest position */ + position?: (string|null); + + /** VStreamRequest filter */ + filter?: (binlogdata.IFilter|null); + + /** VStreamRequest table_last_p_ks */ + table_last_p_ks?: (binlogdata.ITableLastPK[]|null); } - /** Represents a RollbackRequest. */ - class RollbackRequest implements IRollbackRequest { + /** Represents a VStreamRequest. */ + class VStreamRequest implements IVStreamRequest { /** - * Constructs a new RollbackRequest. + * Constructs a new VStreamRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IRollbackRequest); + constructor(properties?: binlogdata.IVStreamRequest); - /** RollbackRequest effective_caller_id. */ + /** VStreamRequest effective_caller_id. */ public effective_caller_id?: (vtrpc.ICallerID|null); - /** RollbackRequest immediate_caller_id. */ + /** VStreamRequest immediate_caller_id. */ public immediate_caller_id?: (query.IVTGateCallerID|null); - /** RollbackRequest target. */ + /** VStreamRequest target. */ public target?: (query.ITarget|null); - /** RollbackRequest transaction_id. */ - public transaction_id: (number|Long); + /** VStreamRequest position. */ + public position: string; + + /** VStreamRequest filter. */ + public filter?: (binlogdata.IFilter|null); + + /** VStreamRequest table_last_p_ks. */ + public table_last_p_ks: binlogdata.ITableLastPK[]; /** - * Creates a new RollbackRequest instance using the specified properties. + * Creates a new VStreamRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RollbackRequest instance + * @returns VStreamRequest instance */ - public static create(properties?: query.IRollbackRequest): query.RollbackRequest; + public static create(properties?: binlogdata.IVStreamRequest): binlogdata.VStreamRequest; /** - * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @param message RollbackRequest message or plain object to encode + * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. + * @param message VStreamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @param message RollbackRequest message or plain object to encode + * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. + * @param message VStreamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RollbackRequest message from the specified reader or buffer. + * Decodes a VStreamRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RollbackRequest + * @returns VStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRequest; /** - * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RollbackRequest + * @returns VStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRequest; /** - * Verifies a RollbackRequest message. + * Verifies a VStreamRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RollbackRequest + * @returns VStreamRequest */ - public static fromObject(object: { [k: string]: any }): query.RollbackRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRequest; /** - * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. - * @param message RollbackRequest + * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. + * @param message VStreamRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.RollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RollbackRequest to JSON. + * Converts this VStreamRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RollbackResponse. */ - interface IRollbackResponse { + /** Properties of a VStreamResponse. */ + interface IVStreamResponse { - /** RollbackResponse reserved_id */ - reserved_id?: (number|Long|null); + /** VStreamResponse events */ + events?: (binlogdata.IVEvent[]|null); } - /** Represents a RollbackResponse. */ - class RollbackResponse implements IRollbackResponse { + /** Represents a VStreamResponse. */ + class VStreamResponse implements IVStreamResponse { /** - * Constructs a new RollbackResponse. + * Constructs a new VStreamResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IRollbackResponse); + constructor(properties?: binlogdata.IVStreamResponse); - /** RollbackResponse reserved_id. */ - public reserved_id: (number|Long); + /** VStreamResponse events. */ + public events: binlogdata.IVEvent[]; /** - * Creates a new RollbackResponse instance using the specified properties. + * Creates a new VStreamResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RollbackResponse instance + * @returns VStreamResponse instance */ - public static create(properties?: query.IRollbackResponse): query.RollbackResponse; + public static create(properties?: binlogdata.IVStreamResponse): binlogdata.VStreamResponse; /** - * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @param message RollbackResponse message or plain object to encode + * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. + * @param message VStreamResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @param message RollbackResponse message or plain object to encode + * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. + * @param message VStreamResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RollbackResponse message from the specified reader or buffer. + * Decodes a VStreamResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RollbackResponse + * @returns VStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResponse; /** - * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RollbackResponse + * @returns VStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResponse; /** - * Verifies a RollbackResponse message. + * Verifies a VStreamResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RollbackResponse + * @returns VStreamResponse */ - public static fromObject(object: { [k: string]: any }): query.RollbackResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResponse; /** - * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. - * @param message RollbackResponse + * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. + * @param message VStreamResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.RollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RollbackResponse to JSON. + * Converts this VStreamResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PrepareRequest. */ - interface IPrepareRequest { + /** Properties of a VStreamRowsRequest. */ + interface IVStreamRowsRequest { - /** PrepareRequest effective_caller_id */ + /** VStreamRowsRequest effective_caller_id */ effective_caller_id?: (vtrpc.ICallerID|null); - /** PrepareRequest immediate_caller_id */ + /** VStreamRowsRequest immediate_caller_id */ immediate_caller_id?: (query.IVTGateCallerID|null); - /** PrepareRequest target */ + /** VStreamRowsRequest target */ target?: (query.ITarget|null); - /** PrepareRequest transaction_id */ - transaction_id?: (number|Long|null); + /** VStreamRowsRequest query */ + query?: (string|null); - /** PrepareRequest dtid */ - dtid?: (string|null); + /** VStreamRowsRequest lastpk */ + lastpk?: (query.IQueryResult|null); } - /** Represents a PrepareRequest. */ - class PrepareRequest implements IPrepareRequest { + /** Represents a VStreamRowsRequest. */ + class VStreamRowsRequest implements IVStreamRowsRequest { /** - * Constructs a new PrepareRequest. + * Constructs a new VStreamRowsRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IPrepareRequest); + constructor(properties?: binlogdata.IVStreamRowsRequest); - /** PrepareRequest effective_caller_id. */ + /** VStreamRowsRequest effective_caller_id. */ public effective_caller_id?: (vtrpc.ICallerID|null); - /** PrepareRequest immediate_caller_id. */ + /** VStreamRowsRequest immediate_caller_id. */ public immediate_caller_id?: (query.IVTGateCallerID|null); - /** PrepareRequest target. */ + /** VStreamRowsRequest target. */ public target?: (query.ITarget|null); - /** PrepareRequest transaction_id. */ - public transaction_id: (number|Long); + /** VStreamRowsRequest query. */ + public query: string; - /** PrepareRequest dtid. */ - public dtid: string; + /** VStreamRowsRequest lastpk. */ + public lastpk?: (query.IQueryResult|null); /** - * Creates a new PrepareRequest instance using the specified properties. + * Creates a new VStreamRowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PrepareRequest instance + * @returns VStreamRowsRequest instance */ - public static create(properties?: query.IPrepareRequest): query.PrepareRequest; + public static create(properties?: binlogdata.IVStreamRowsRequest): binlogdata.VStreamRowsRequest; /** - * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @param message PrepareRequest message or plain object to encode + * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. + * @param message VStreamRowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @param message PrepareRequest message or plain object to encode + * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. + * @param message VStreamRowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PrepareRequest message from the specified reader or buffer. + * Decodes a VStreamRowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PrepareRequest + * @returns VStreamRowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsRequest; /** - * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PrepareRequest + * @returns VStreamRowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsRequest; /** - * Verifies a PrepareRequest message. + * Verifies a VStreamRowsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PrepareRequest + * @returns VStreamRowsRequest */ - public static fromObject(object: { [k: string]: any }): query.PrepareRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsRequest; /** - * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. - * @param message PrepareRequest + * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. + * @param message VStreamRowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.PrepareRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PrepareRequest to JSON. + * Converts this VStreamRowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PrepareResponse. */ - interface IPrepareResponse { + /** Properties of a VStreamRowsResponse. */ + interface IVStreamRowsResponse { + + /** VStreamRowsResponse fields */ + fields?: (query.IField[]|null); + + /** VStreamRowsResponse pkfields */ + pkfields?: (query.IField[]|null); + + /** VStreamRowsResponse gtid */ + gtid?: (string|null); + + /** VStreamRowsResponse rows */ + rows?: (query.IRow[]|null); + + /** VStreamRowsResponse lastpk */ + lastpk?: (query.IRow|null); + + /** VStreamRowsResponse throttled */ + throttled?: (boolean|null); + + /** VStreamRowsResponse heartbeat */ + heartbeat?: (boolean|null); } - /** Represents a PrepareResponse. */ - class PrepareResponse implements IPrepareResponse { + /** Represents a VStreamRowsResponse. */ + class VStreamRowsResponse implements IVStreamRowsResponse { /** - * Constructs a new PrepareResponse. + * Constructs a new VStreamRowsResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IPrepareResponse); + constructor(properties?: binlogdata.IVStreamRowsResponse); + + /** VStreamRowsResponse fields. */ + public fields: query.IField[]; + + /** VStreamRowsResponse pkfields. */ + public pkfields: query.IField[]; + + /** VStreamRowsResponse gtid. */ + public gtid: string; + + /** VStreamRowsResponse rows. */ + public rows: query.IRow[]; + + /** VStreamRowsResponse lastpk. */ + public lastpk?: (query.IRow|null); + + /** VStreamRowsResponse throttled. */ + public throttled: boolean; + + /** VStreamRowsResponse heartbeat. */ + public heartbeat: boolean; /** - * Creates a new PrepareResponse instance using the specified properties. + * Creates a new VStreamRowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PrepareResponse instance + * @returns VStreamRowsResponse instance */ - public static create(properties?: query.IPrepareResponse): query.PrepareResponse; + public static create(properties?: binlogdata.IVStreamRowsResponse): binlogdata.VStreamRowsResponse; /** - * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @param message PrepareResponse message or plain object to encode + * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. + * @param message VStreamRowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @param message PrepareResponse message or plain object to encode + * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. + * @param message VStreamRowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PrepareResponse message from the specified reader or buffer. + * Decodes a VStreamRowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PrepareResponse + * @returns VStreamRowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsResponse; /** - * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PrepareResponse + * @returns VStreamRowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsResponse; /** - * Verifies a PrepareResponse message. + * Verifies a VStreamRowsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PrepareResponse + * @returns VStreamRowsResponse */ - public static fromObject(object: { [k: string]: any }): query.PrepareResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsResponse; /** - * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. - * @param message PrepareResponse + * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. + * @param message VStreamRowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.PrepareResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PrepareResponse to JSON. + * Converts this VStreamRowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CommitPreparedRequest. */ - interface ICommitPreparedRequest { - - /** CommitPreparedRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitPreparedRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** Properties of a LastPKEvent. */ + interface ILastPKEvent { - /** CommitPreparedRequest target */ - target?: (query.ITarget|null); + /** LastPKEvent table_last_p_k */ + table_last_p_k?: (binlogdata.ITableLastPK|null); - /** CommitPreparedRequest dtid */ - dtid?: (string|null); + /** LastPKEvent completed */ + completed?: (boolean|null); } - /** Represents a CommitPreparedRequest. */ - class CommitPreparedRequest implements ICommitPreparedRequest { + /** Represents a LastPKEvent. */ + class LastPKEvent implements ILastPKEvent { /** - * Constructs a new CommitPreparedRequest. + * Constructs a new LastPKEvent. * @param [properties] Properties to set */ - constructor(properties?: query.ICommitPreparedRequest); - - /** CommitPreparedRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitPreparedRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + constructor(properties?: binlogdata.ILastPKEvent); - /** CommitPreparedRequest target. */ - public target?: (query.ITarget|null); + /** LastPKEvent table_last_p_k. */ + public table_last_p_k?: (binlogdata.ITableLastPK|null); - /** CommitPreparedRequest dtid. */ - public dtid: string; + /** LastPKEvent completed. */ + public completed: boolean; /** - * Creates a new CommitPreparedRequest instance using the specified properties. + * Creates a new LastPKEvent instance using the specified properties. * @param [properties] Properties to set - * @returns CommitPreparedRequest instance + * @returns LastPKEvent instance */ - public static create(properties?: query.ICommitPreparedRequest): query.CommitPreparedRequest; + public static create(properties?: binlogdata.ILastPKEvent): binlogdata.LastPKEvent; /** - * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @param message CommitPreparedRequest message or plain object to encode + * Encodes the specified LastPKEvent message. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. + * @param message LastPKEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @param message CommitPreparedRequest message or plain object to encode + * Encodes the specified LastPKEvent message, length delimited. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. + * @param message LastPKEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer. + * Decodes a LastPKEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommitPreparedRequest + * @returns LastPKEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.LastPKEvent; /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. + * Decodes a LastPKEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommitPreparedRequest + * @returns LastPKEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.LastPKEvent; /** - * Verifies a CommitPreparedRequest message. + * Verifies a LastPKEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LastPKEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommitPreparedRequest + * @returns LastPKEvent */ - public static fromObject(object: { [k: string]: any }): query.CommitPreparedRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.LastPKEvent; /** - * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. - * @param message CommitPreparedRequest + * Creates a plain object from a LastPKEvent message. Also converts values to other types if specified. + * @param message LastPKEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CommitPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.LastPKEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommitPreparedRequest to JSON. + * Converts this LastPKEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CommitPreparedResponse. */ - interface ICommitPreparedResponse { + /** Properties of a TableLastPK. */ + interface ITableLastPK { + + /** TableLastPK table_name */ + table_name?: (string|null); + + /** TableLastPK lastpk */ + lastpk?: (query.IQueryResult|null); } - /** Represents a CommitPreparedResponse. */ - class CommitPreparedResponse implements ICommitPreparedResponse { + /** Represents a TableLastPK. */ + class TableLastPK implements ITableLastPK { /** - * Constructs a new CommitPreparedResponse. + * Constructs a new TableLastPK. * @param [properties] Properties to set */ - constructor(properties?: query.ICommitPreparedResponse); + constructor(properties?: binlogdata.ITableLastPK); + + /** TableLastPK table_name. */ + public table_name: string; + + /** TableLastPK lastpk. */ + public lastpk?: (query.IQueryResult|null); /** - * Creates a new CommitPreparedResponse instance using the specified properties. + * Creates a new TableLastPK instance using the specified properties. * @param [properties] Properties to set - * @returns CommitPreparedResponse instance + * @returns TableLastPK instance */ - public static create(properties?: query.ICommitPreparedResponse): query.CommitPreparedResponse; + public static create(properties?: binlogdata.ITableLastPK): binlogdata.TableLastPK; /** - * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @param message CommitPreparedResponse message or plain object to encode + * Encodes the specified TableLastPK message. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. + * @param message TableLastPK message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @param message CommitPreparedResponse message or plain object to encode + * Encodes the specified TableLastPK message, length delimited. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. + * @param message TableLastPK message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer. + * Decodes a TableLastPK message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommitPreparedResponse + * @returns TableLastPK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.TableLastPK; /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. + * Decodes a TableLastPK message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommitPreparedResponse + * @returns TableLastPK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.TableLastPK; /** - * Verifies a CommitPreparedResponse message. + * Verifies a TableLastPK message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TableLastPK message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommitPreparedResponse + * @returns TableLastPK */ - public static fromObject(object: { [k: string]: any }): query.CommitPreparedResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.TableLastPK; /** - * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. - * @param message CommitPreparedResponse + * Creates a plain object from a TableLastPK message. Also converts values to other types if specified. + * @param message TableLastPK * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CommitPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.TableLastPK, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommitPreparedResponse to JSON. + * Converts this TableLastPK to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RollbackPreparedRequest. */ - interface IRollbackPreparedRequest { + /** Properties of a VStreamResultsRequest. */ + interface IVStreamResultsRequest { - /** RollbackPreparedRequest effective_caller_id */ + /** VStreamResultsRequest effective_caller_id */ effective_caller_id?: (vtrpc.ICallerID|null); - /** RollbackPreparedRequest immediate_caller_id */ + /** VStreamResultsRequest immediate_caller_id */ immediate_caller_id?: (query.IVTGateCallerID|null); - /** RollbackPreparedRequest target */ + /** VStreamResultsRequest target */ target?: (query.ITarget|null); - /** RollbackPreparedRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** RollbackPreparedRequest dtid */ - dtid?: (string|null); + /** VStreamResultsRequest query */ + query?: (string|null); } - /** Represents a RollbackPreparedRequest. */ - class RollbackPreparedRequest implements IRollbackPreparedRequest { + /** Represents a VStreamResultsRequest. */ + class VStreamResultsRequest implements IVStreamResultsRequest { /** - * Constructs a new RollbackPreparedRequest. + * Constructs a new VStreamResultsRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IRollbackPreparedRequest); + constructor(properties?: binlogdata.IVStreamResultsRequest); - /** RollbackPreparedRequest effective_caller_id. */ + /** VStreamResultsRequest effective_caller_id. */ public effective_caller_id?: (vtrpc.ICallerID|null); - /** RollbackPreparedRequest immediate_caller_id. */ + /** VStreamResultsRequest immediate_caller_id. */ public immediate_caller_id?: (query.IVTGateCallerID|null); - /** RollbackPreparedRequest target. */ + /** VStreamResultsRequest target. */ public target?: (query.ITarget|null); - /** RollbackPreparedRequest transaction_id. */ - public transaction_id: (number|Long); - - /** RollbackPreparedRequest dtid. */ - public dtid: string; + /** VStreamResultsRequest query. */ + public query: string; /** - * Creates a new RollbackPreparedRequest instance using the specified properties. + * Creates a new VStreamResultsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RollbackPreparedRequest instance + * @returns VStreamResultsRequest instance */ - public static create(properties?: query.IRollbackPreparedRequest): query.RollbackPreparedRequest; + public static create(properties?: binlogdata.IVStreamResultsRequest): binlogdata.VStreamResultsRequest; /** - * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @param message RollbackPreparedRequest message or plain object to encode + * Encodes the specified VStreamResultsRequest message. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. + * @param message VStreamResultsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @param message RollbackPreparedRequest message or plain object to encode + * Encodes the specified VStreamResultsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. + * @param message VStreamResultsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer. + * Decodes a VStreamResultsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RollbackPreparedRequest + * @returns VStreamResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResultsRequest; /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamResultsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RollbackPreparedRequest + * @returns VStreamResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResultsRequest; /** - * Verifies a RollbackPreparedRequest message. + * Verifies a VStreamResultsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResultsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RollbackPreparedRequest + * @returns VStreamResultsRequest */ - public static fromObject(object: { [k: string]: any }): query.RollbackPreparedRequest; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResultsRequest; /** - * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. - * @param message RollbackPreparedRequest + * Creates a plain object from a VStreamResultsRequest message. Also converts values to other types if specified. + * @param message VStreamResultsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.RollbackPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RollbackPreparedRequest to JSON. + * Converts this VStreamResultsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RollbackPreparedResponse. */ - interface IRollbackPreparedResponse { + /** Properties of a VStreamResultsResponse. */ + interface IVStreamResultsResponse { + + /** VStreamResultsResponse fields */ + fields?: (query.IField[]|null); + + /** VStreamResultsResponse gtid */ + gtid?: (string|null); + + /** VStreamResultsResponse rows */ + rows?: (query.IRow[]|null); } - /** Represents a RollbackPreparedResponse. */ - class RollbackPreparedResponse implements IRollbackPreparedResponse { + /** Represents a VStreamResultsResponse. */ + class VStreamResultsResponse implements IVStreamResultsResponse { /** - * Constructs a new RollbackPreparedResponse. + * Constructs a new VStreamResultsResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IRollbackPreparedResponse); + constructor(properties?: binlogdata.IVStreamResultsResponse); + + /** VStreamResultsResponse fields. */ + public fields: query.IField[]; + + /** VStreamResultsResponse gtid. */ + public gtid: string; + + /** VStreamResultsResponse rows. */ + public rows: query.IRow[]; /** - * Creates a new RollbackPreparedResponse instance using the specified properties. + * Creates a new VStreamResultsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RollbackPreparedResponse instance + * @returns VStreamResultsResponse instance */ - public static create(properties?: query.IRollbackPreparedResponse): query.RollbackPreparedResponse; + public static create(properties?: binlogdata.IVStreamResultsResponse): binlogdata.VStreamResultsResponse; /** - * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @param message RollbackPreparedResponse message or plain object to encode + * Encodes the specified VStreamResultsResponse message. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. + * @param message VStreamResultsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: binlogdata.IVStreamResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @param message RollbackPreparedResponse message or plain object to encode + * Encodes the specified VStreamResultsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. + * @param message VStreamResultsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: binlogdata.IVStreamResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer. + * Decodes a VStreamResultsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RollbackPreparedResponse + * @returns VStreamResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResultsResponse; /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamResultsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RollbackPreparedResponse + * @returns VStreamResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResultsResponse; /** - * Verifies a RollbackPreparedResponse message. + * Verifies a VStreamResultsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResultsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RollbackPreparedResponse + * @returns VStreamResultsResponse */ - public static fromObject(object: { [k: string]: any }): query.RollbackPreparedResponse; + public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResultsResponse; /** - * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. - * @param message RollbackPreparedResponse + * Creates a plain object from a VStreamResultsResponse message. Also converts values to other types if specified. + * @param message VStreamResultsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.RollbackPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: binlogdata.VStreamResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RollbackPreparedResponse to JSON. + * Converts this VStreamResultsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } +} - /** Properties of a CreateTransactionRequest. */ - interface ICreateTransactionRequest { +/** Namespace vtrpc. */ +export namespace vtrpc { - /** CreateTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** Properties of a CallerID. */ + interface ICallerID { - /** CreateTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** CallerID principal */ + principal?: (string|null); - /** CreateTransactionRequest target */ - target?: (query.ITarget|null); + /** CallerID component */ + component?: (string|null); - /** CreateTransactionRequest dtid */ - dtid?: (string|null); + /** CallerID subcomponent */ + subcomponent?: (string|null); - /** CreateTransactionRequest participants */ - participants?: (query.ITarget[]|null); + /** CallerID groups */ + groups?: (string[]|null); } - /** Represents a CreateTransactionRequest. */ - class CreateTransactionRequest implements ICreateTransactionRequest { + /** Represents a CallerID. */ + class CallerID implements ICallerID { /** - * Constructs a new CreateTransactionRequest. + * Constructs a new CallerID. * @param [properties] Properties to set */ - constructor(properties?: query.ICreateTransactionRequest); - - /** CreateTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + constructor(properties?: vtrpc.ICallerID); - /** CreateTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** CallerID principal. */ + public principal: string; - /** CreateTransactionRequest target. */ - public target?: (query.ITarget|null); + /** CallerID component. */ + public component: string; - /** CreateTransactionRequest dtid. */ - public dtid: string; + /** CallerID subcomponent. */ + public subcomponent: string; - /** CreateTransactionRequest participants. */ - public participants: query.ITarget[]; + /** CallerID groups. */ + public groups: string[]; /** - * Creates a new CreateTransactionRequest instance using the specified properties. + * Creates a new CallerID instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTransactionRequest instance + * @returns CallerID instance */ - public static create(properties?: query.ICreateTransactionRequest): query.CreateTransactionRequest; + public static create(properties?: vtrpc.ICallerID): vtrpc.CallerID; /** - * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @param message CreateTransactionRequest message or plain object to encode + * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. + * @param message CallerID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @param message CreateTransactionRequest message or plain object to encode + * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. + * @param message CallerID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer. + * Decodes a CallerID message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTransactionRequest + * @returns CallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.CallerID; /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes a CallerID message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTransactionRequest + * @returns CallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.CallerID; /** - * Verifies a CreateTransactionRequest message. + * Verifies a CallerID message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CallerID message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTransactionRequest + * @returns CallerID */ - public static fromObject(object: { [k: string]: any }): query.CreateTransactionRequest; + public static fromObject(object: { [k: string]: any }): vtrpc.CallerID; /** - * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. - * @param message CreateTransactionRequest + * Creates a plain object from a CallerID message. Also converts values to other types if specified. + * @param message CallerID * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CreateTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtrpc.CallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTransactionRequest to JSON. + * Converts this CallerID to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTransactionResponse. */ - interface ICreateTransactionResponse { + /** Code enum. */ + enum Code { + OK = 0, + CANCELED = 1, + UNKNOWN = 2, + INVALID_ARGUMENT = 3, + DEADLINE_EXCEEDED = 4, + NOT_FOUND = 5, + ALREADY_EXISTS = 6, + PERMISSION_DENIED = 7, + RESOURCE_EXHAUSTED = 8, + FAILED_PRECONDITION = 9, + ABORTED = 10, + OUT_OF_RANGE = 11, + UNIMPLEMENTED = 12, + INTERNAL = 13, + UNAVAILABLE = 14, + DATA_LOSS = 15, + UNAUTHENTICATED = 16, + CLUSTER_EVENT = 17, + READ_ONLY = 18 } - /** Represents a CreateTransactionResponse. */ - class CreateTransactionResponse implements ICreateTransactionResponse { + /** Properties of a RPCError. */ + interface IRPCError { + + /** RPCError message */ + message?: (string|null); + + /** RPCError code */ + code?: (vtrpc.Code|null); + } + + /** Represents a RPCError. */ + class RPCError implements IRPCError { /** - * Constructs a new CreateTransactionResponse. + * Constructs a new RPCError. * @param [properties] Properties to set */ - constructor(properties?: query.ICreateTransactionResponse); + constructor(properties?: vtrpc.IRPCError); + + /** RPCError message. */ + public message: string; + + /** RPCError code. */ + public code: vtrpc.Code; /** - * Creates a new CreateTransactionResponse instance using the specified properties. + * Creates a new RPCError instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTransactionResponse instance + * @returns RPCError instance */ - public static create(properties?: query.ICreateTransactionResponse): query.CreateTransactionResponse; + public static create(properties?: vtrpc.IRPCError): vtrpc.RPCError; /** - * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @param message CreateTransactionResponse message or plain object to encode + * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. + * @param message RPCError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @param message CreateTransactionResponse message or plain object to encode + * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. + * @param message RPCError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer. + * Decodes a RPCError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTransactionResponse + * @returns RPCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.RPCError; /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. + * Decodes a RPCError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTransactionResponse + * @returns RPCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.RPCError; /** - * Verifies a CreateTransactionResponse message. + * Verifies a RPCError message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RPCError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTransactionResponse + * @returns RPCError */ - public static fromObject(object: { [k: string]: any }): query.CreateTransactionResponse; + public static fromObject(object: { [k: string]: any }): vtrpc.RPCError; /** - * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. - * @param message CreateTransactionResponse + * Creates a plain object from a RPCError message. Also converts values to other types if specified. + * @param message RPCError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.CreateTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtrpc.RPCError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTransactionResponse to JSON. + * Converts this RPCError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } +} - /** Properties of a StartCommitRequest. */ - interface IStartCommitRequest { +/** Namespace query. */ +export namespace query { - /** StartCommitRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** Properties of a Target. */ + interface ITarget { - /** StartCommitRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** Target keyspace */ + keyspace?: (string|null); - /** StartCommitRequest target */ - target?: (query.ITarget|null); + /** Target shard */ + shard?: (string|null); - /** StartCommitRequest transaction_id */ - transaction_id?: (number|Long|null); + /** Target tablet_type */ + tablet_type?: (topodata.TabletType|null); - /** StartCommitRequest dtid */ - dtid?: (string|null); + /** Target cell */ + cell?: (string|null); } - /** Represents a StartCommitRequest. */ - class StartCommitRequest implements IStartCommitRequest { + /** Represents a Target. */ + class Target implements ITarget { /** - * Constructs a new StartCommitRequest. + * Constructs a new Target. * @param [properties] Properties to set */ - constructor(properties?: query.IStartCommitRequest); - - /** StartCommitRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + constructor(properties?: query.ITarget); - /** StartCommitRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** Target keyspace. */ + public keyspace: string; - /** StartCommitRequest target. */ - public target?: (query.ITarget|null); + /** Target shard. */ + public shard: string; - /** StartCommitRequest transaction_id. */ - public transaction_id: (number|Long); + /** Target tablet_type. */ + public tablet_type: topodata.TabletType; - /** StartCommitRequest dtid. */ - public dtid: string; + /** Target cell. */ + public cell: string; /** - * Creates a new StartCommitRequest instance using the specified properties. + * Creates a new Target instance using the specified properties. * @param [properties] Properties to set - * @returns StartCommitRequest instance + * @returns Target instance */ - public static create(properties?: query.IStartCommitRequest): query.StartCommitRequest; + public static create(properties?: query.ITarget): query.Target; /** - * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @param message StartCommitRequest message or plain object to encode + * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. + * @param message Target message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @param message StartCommitRequest message or plain object to encode + * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. + * @param message Target message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartCommitRequest message from the specified reader or buffer. + * Decodes a Target message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StartCommitRequest + * @returns Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Target; /** - * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. + * Decodes a Target message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartCommitRequest + * @returns Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Target; /** - * Verifies a StartCommitRequest message. + * Verifies a Target message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Target message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartCommitRequest + * @returns Target */ - public static fromObject(object: { [k: string]: any }): query.StartCommitRequest; + public static fromObject(object: { [k: string]: any }): query.Target; /** - * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. - * @param message StartCommitRequest + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StartCommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartCommitRequest to JSON. + * Converts this Target to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StartCommitResponse. */ - interface IStartCommitResponse { - } + /** Properties of a VTGateCallerID. */ + interface IVTGateCallerID { - /** Represents a StartCommitResponse. */ - class StartCommitResponse implements IStartCommitResponse { + /** VTGateCallerID username */ + username?: (string|null); + + /** VTGateCallerID groups */ + groups?: (string[]|null); + } + + /** Represents a VTGateCallerID. */ + class VTGateCallerID implements IVTGateCallerID { /** - * Constructs a new StartCommitResponse. + * Constructs a new VTGateCallerID. * @param [properties] Properties to set */ - constructor(properties?: query.IStartCommitResponse); + constructor(properties?: query.IVTGateCallerID); + + /** VTGateCallerID username. */ + public username: string; + + /** VTGateCallerID groups. */ + public groups: string[]; /** - * Creates a new StartCommitResponse instance using the specified properties. + * Creates a new VTGateCallerID instance using the specified properties. * @param [properties] Properties to set - * @returns StartCommitResponse instance + * @returns VTGateCallerID instance */ - public static create(properties?: query.IStartCommitResponse): query.StartCommitResponse; + public static create(properties?: query.IVTGateCallerID): query.VTGateCallerID; /** - * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @param message StartCommitResponse message or plain object to encode + * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. + * @param message VTGateCallerID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @param message StartCommitResponse message or plain object to encode + * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. + * @param message VTGateCallerID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartCommitResponse message from the specified reader or buffer. + * Decodes a VTGateCallerID message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StartCommitResponse + * @returns VTGateCallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.VTGateCallerID; /** - * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. + * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartCommitResponse + * @returns VTGateCallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.VTGateCallerID; /** - * Verifies a StartCommitResponse message. + * Verifies a VTGateCallerID message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartCommitResponse + * @returns VTGateCallerID */ - public static fromObject(object: { [k: string]: any }): query.StartCommitResponse; + public static fromObject(object: { [k: string]: any }): query.VTGateCallerID; /** - * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. - * @param message StartCommitResponse + * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. + * @param message VTGateCallerID * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StartCommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.VTGateCallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartCommitResponse to JSON. + * Converts this VTGateCallerID to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetRollbackRequest. */ - interface ISetRollbackRequest { - - /** SetRollbackRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** SetRollbackRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** Properties of an EventToken. */ + interface IEventToken { - /** SetRollbackRequest target */ - target?: (query.ITarget|null); + /** EventToken timestamp */ + timestamp?: (number|Long|null); - /** SetRollbackRequest transaction_id */ - transaction_id?: (number|Long|null); + /** EventToken shard */ + shard?: (string|null); - /** SetRollbackRequest dtid */ - dtid?: (string|null); + /** EventToken position */ + position?: (string|null); } - /** Represents a SetRollbackRequest. */ - class SetRollbackRequest implements ISetRollbackRequest { + /** Represents an EventToken. */ + class EventToken implements IEventToken { /** - * Constructs a new SetRollbackRequest. + * Constructs a new EventToken. * @param [properties] Properties to set */ - constructor(properties?: query.ISetRollbackRequest); - - /** SetRollbackRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** SetRollbackRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + constructor(properties?: query.IEventToken); - /** SetRollbackRequest target. */ - public target?: (query.ITarget|null); + /** EventToken timestamp. */ + public timestamp: (number|Long); - /** SetRollbackRequest transaction_id. */ - public transaction_id: (number|Long); + /** EventToken shard. */ + public shard: string; - /** SetRollbackRequest dtid. */ - public dtid: string; + /** EventToken position. */ + public position: string; /** - * Creates a new SetRollbackRequest instance using the specified properties. + * Creates a new EventToken instance using the specified properties. * @param [properties] Properties to set - * @returns SetRollbackRequest instance + * @returns EventToken instance */ - public static create(properties?: query.ISetRollbackRequest): query.SetRollbackRequest; + public static create(properties?: query.IEventToken): query.EventToken; /** - * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @param message SetRollbackRequest message or plain object to encode + * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. + * @param message EventToken message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @param message SetRollbackRequest message or plain object to encode + * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. + * @param message EventToken message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetRollbackRequest message from the specified reader or buffer. + * Decodes an EventToken message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetRollbackRequest + * @returns EventToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.EventToken; /** - * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. + * Decodes an EventToken message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetRollbackRequest + * @returns EventToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.EventToken; /** - * Verifies a SetRollbackRequest message. + * Verifies an EventToken message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventToken message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetRollbackRequest + * @returns EventToken */ - public static fromObject(object: { [k: string]: any }): query.SetRollbackRequest; + public static fromObject(object: { [k: string]: any }): query.EventToken; /** - * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. - * @param message SetRollbackRequest + * Creates a plain object from an EventToken message. Also converts values to other types if specified. + * @param message EventToken * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.SetRollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.EventToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetRollbackRequest to JSON. + * Converts this EventToken to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetRollbackResponse. */ - interface ISetRollbackResponse { + /** MySqlFlag enum. */ + enum MySqlFlag { + EMPTY = 0, + NOT_NULL_FLAG = 1, + PRI_KEY_FLAG = 2, + UNIQUE_KEY_FLAG = 4, + MULTIPLE_KEY_FLAG = 8, + BLOB_FLAG = 16, + UNSIGNED_FLAG = 32, + ZEROFILL_FLAG = 64, + BINARY_FLAG = 128, + ENUM_FLAG = 256, + AUTO_INCREMENT_FLAG = 512, + TIMESTAMP_FLAG = 1024, + SET_FLAG = 2048, + NO_DEFAULT_VALUE_FLAG = 4096, + ON_UPDATE_NOW_FLAG = 8192, + NUM_FLAG = 32768, + PART_KEY_FLAG = 16384, + GROUP_FLAG = 32768, + UNIQUE_FLAG = 65536, + BINCMP_FLAG = 131072 } - /** Represents a SetRollbackResponse. */ - class SetRollbackResponse implements ISetRollbackResponse { + /** Flag enum. */ + enum Flag { + NONE = 0, + ISINTEGRAL = 256, + ISUNSIGNED = 512, + ISFLOAT = 1024, + ISQUOTED = 2048, + ISTEXT = 4096, + ISBINARY = 8192 + } + + /** Type enum. */ + enum Type { + NULL_TYPE = 0, + INT8 = 257, + UINT8 = 770, + INT16 = 259, + UINT16 = 772, + INT24 = 261, + UINT24 = 774, + INT32 = 263, + UINT32 = 776, + INT64 = 265, + UINT64 = 778, + FLOAT32 = 1035, + FLOAT64 = 1036, + TIMESTAMP = 2061, + DATE = 2062, + TIME = 2063, + DATETIME = 2064, + YEAR = 785, + DECIMAL = 18, + TEXT = 6163, + BLOB = 10260, + VARCHAR = 6165, + VARBINARY = 10262, + CHAR = 6167, + BINARY = 10264, + BIT = 2073, + ENUM = 2074, + SET = 2075, + TUPLE = 28, + GEOMETRY = 2077, + JSON = 2078, + EXPRESSION = 31, + HEXNUM = 4128, + HEXVAL = 4129, + BITNUM = 4130 + } + + /** Properties of a Value. */ + interface IValue { + + /** Value type */ + type?: (query.Type|null); + + /** Value value */ + value?: (Uint8Array|null); + } + + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new SetRollbackResponse. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: query.ISetRollbackResponse); + constructor(properties?: query.IValue); + + /** Value type. */ + public type: query.Type; + + /** Value value. */ + public value: Uint8Array; /** - * Creates a new SetRollbackResponse instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns SetRollbackResponse instance + * @returns Value instance */ - public static create(properties?: query.ISetRollbackResponse): query.SetRollbackResponse; + public static create(properties?: query.IValue): query.Value; /** - * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @param message SetRollbackResponse message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @param message SetRollbackResponse message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetRollbackResponse message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetRollbackResponse + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Value; /** - * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetRollbackResponse + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Value; /** - * Verifies a SetRollbackResponse message. + * Verifies a Value message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetRollbackResponse + * @returns Value */ - public static fromObject(object: { [k: string]: any }): query.SetRollbackResponse; + public static fromObject(object: { [k: string]: any }): query.Value; /** - * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. - * @param message SetRollbackResponse + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.SetRollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetRollbackResponse to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ConcludeTransactionRequest. */ - interface IConcludeTransactionRequest { - - /** ConcludeTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** Properties of a BindVariable. */ + interface IBindVariable { - /** ConcludeTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** BindVariable type */ + type?: (query.Type|null); - /** ConcludeTransactionRequest target */ - target?: (query.ITarget|null); + /** BindVariable value */ + value?: (Uint8Array|null); - /** ConcludeTransactionRequest dtid */ - dtid?: (string|null); + /** BindVariable values */ + values?: (query.IValue[]|null); } - /** Represents a ConcludeTransactionRequest. */ - class ConcludeTransactionRequest implements IConcludeTransactionRequest { + /** Represents a BindVariable. */ + class BindVariable implements IBindVariable { /** - * Constructs a new ConcludeTransactionRequest. + * Constructs a new BindVariable. * @param [properties] Properties to set */ - constructor(properties?: query.IConcludeTransactionRequest); - - /** ConcludeTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + constructor(properties?: query.IBindVariable); - /** ConcludeTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** BindVariable type. */ + public type: query.Type; - /** ConcludeTransactionRequest target. */ - public target?: (query.ITarget|null); + /** BindVariable value. */ + public value: Uint8Array; - /** ConcludeTransactionRequest dtid. */ - public dtid: string; + /** BindVariable values. */ + public values: query.IValue[]; /** - * Creates a new ConcludeTransactionRequest instance using the specified properties. + * Creates a new BindVariable instance using the specified properties. * @param [properties] Properties to set - * @returns ConcludeTransactionRequest instance + * @returns BindVariable instance */ - public static create(properties?: query.IConcludeTransactionRequest): query.ConcludeTransactionRequest; + public static create(properties?: query.IBindVariable): query.BindVariable; /** - * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @param message ConcludeTransactionRequest message or plain object to encode + * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. + * @param message BindVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @param message ConcludeTransactionRequest message or plain object to encode + * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. + * @param message BindVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. + * Decodes a BindVariable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConcludeTransactionRequest + * @returns BindVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BindVariable; /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes a BindVariable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConcludeTransactionRequest + * @returns BindVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BindVariable; /** - * Verifies a ConcludeTransactionRequest message. + * Verifies a BindVariable message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConcludeTransactionRequest + * @returns BindVariable */ - public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionRequest; + public static fromObject(object: { [k: string]: any }): query.BindVariable; /** - * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. - * @param message ConcludeTransactionRequest + * Creates a plain object from a BindVariable message. Also converts values to other types if specified. + * @param message BindVariable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ConcludeTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BindVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConcludeTransactionRequest to JSON. + * Converts this BindVariable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ConcludeTransactionResponse. */ - interface IConcludeTransactionResponse { + /** Properties of a BoundQuery. */ + interface IBoundQuery { + + /** BoundQuery sql */ + sql?: (string|null); + + /** BoundQuery bind_variables */ + bind_variables?: ({ [k: string]: query.IBindVariable }|null); } - /** Represents a ConcludeTransactionResponse. */ - class ConcludeTransactionResponse implements IConcludeTransactionResponse { + /** Represents a BoundQuery. */ + class BoundQuery implements IBoundQuery { /** - * Constructs a new ConcludeTransactionResponse. + * Constructs a new BoundQuery. * @param [properties] Properties to set */ - constructor(properties?: query.IConcludeTransactionResponse); + constructor(properties?: query.IBoundQuery); + + /** BoundQuery sql. */ + public sql: string; + + /** BoundQuery bind_variables. */ + public bind_variables: { [k: string]: query.IBindVariable }; /** - * Creates a new ConcludeTransactionResponse instance using the specified properties. + * Creates a new BoundQuery instance using the specified properties. * @param [properties] Properties to set - * @returns ConcludeTransactionResponse instance + * @returns BoundQuery instance */ - public static create(properties?: query.IConcludeTransactionResponse): query.ConcludeTransactionResponse; + public static create(properties?: query.IBoundQuery): query.BoundQuery; /** - * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @param message ConcludeTransactionResponse message or plain object to encode + * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. + * @param message BoundQuery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @param message ConcludeTransactionResponse message or plain object to encode + * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. + * @param message BoundQuery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. + * Decodes a BoundQuery message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConcludeTransactionResponse + * @returns BoundQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BoundQuery; /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. + * Decodes a BoundQuery message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConcludeTransactionResponse + * @returns BoundQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BoundQuery; /** - * Verifies a ConcludeTransactionResponse message. + * Verifies a BoundQuery message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConcludeTransactionResponse + * @returns BoundQuery */ - public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionResponse; + public static fromObject(object: { [k: string]: any }): query.BoundQuery; /** - * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. - * @param message ConcludeTransactionResponse + * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. + * @param message BoundQuery * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ConcludeTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BoundQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConcludeTransactionResponse to JSON. + * Converts this BoundQuery to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReadTransactionRequest. */ - interface IReadTransactionRequest { + /** Properties of an ExecuteOptions. */ + interface IExecuteOptions { - /** ReadTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** ExecuteOptions included_fields */ + included_fields?: (query.ExecuteOptions.IncludedFields|null); - /** ReadTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** ExecuteOptions client_found_rows */ + client_found_rows?: (boolean|null); - /** ReadTransactionRequest target */ - target?: (query.ITarget|null); + /** ExecuteOptions workload */ + workload?: (query.ExecuteOptions.Workload|null); - /** ReadTransactionRequest dtid */ - dtid?: (string|null); + /** ExecuteOptions sql_select_limit */ + sql_select_limit?: (number|Long|null); + + /** ExecuteOptions transaction_isolation */ + transaction_isolation?: (query.ExecuteOptions.TransactionIsolation|null); + + /** ExecuteOptions skip_query_plan_cache */ + skip_query_plan_cache?: (boolean|null); + + /** ExecuteOptions planner_version */ + planner_version?: (query.ExecuteOptions.PlannerVersion|null); + + /** ExecuteOptions has_created_temp_tables */ + has_created_temp_tables?: (boolean|null); + + /** ExecuteOptions consolidator */ + consolidator?: (query.ExecuteOptions.Consolidator|null); + + /** ExecuteOptions transaction_access_mode */ + transaction_access_mode?: (query.ExecuteOptions.TransactionAccessMode[]|null); + + /** ExecuteOptions WorkloadName */ + WorkloadName?: (string|null); } - /** Represents a ReadTransactionRequest. */ - class ReadTransactionRequest implements IReadTransactionRequest { + /** Represents an ExecuteOptions. */ + class ExecuteOptions implements IExecuteOptions { /** - * Constructs a new ReadTransactionRequest. + * Constructs a new ExecuteOptions. * @param [properties] Properties to set */ - constructor(properties?: query.IReadTransactionRequest); + constructor(properties?: query.IExecuteOptions); - /** ReadTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); + /** ExecuteOptions included_fields. */ + public included_fields: query.ExecuteOptions.IncludedFields; - /** ReadTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + /** ExecuteOptions client_found_rows. */ + public client_found_rows: boolean; - /** ReadTransactionRequest target. */ - public target?: (query.ITarget|null); + /** ExecuteOptions workload. */ + public workload: query.ExecuteOptions.Workload; - /** ReadTransactionRequest dtid. */ - public dtid: string; + /** ExecuteOptions sql_select_limit. */ + public sql_select_limit: (number|Long); + + /** ExecuteOptions transaction_isolation. */ + public transaction_isolation: query.ExecuteOptions.TransactionIsolation; + + /** ExecuteOptions skip_query_plan_cache. */ + public skip_query_plan_cache: boolean; + + /** ExecuteOptions planner_version. */ + public planner_version: query.ExecuteOptions.PlannerVersion; + + /** ExecuteOptions has_created_temp_tables. */ + public has_created_temp_tables: boolean; + + /** ExecuteOptions consolidator. */ + public consolidator: query.ExecuteOptions.Consolidator; + + /** ExecuteOptions transaction_access_mode. */ + public transaction_access_mode: query.ExecuteOptions.TransactionAccessMode[]; + + /** ExecuteOptions WorkloadName. */ + public WorkloadName: string; /** - * Creates a new ReadTransactionRequest instance using the specified properties. + * Creates a new ExecuteOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ReadTransactionRequest instance + * @returns ExecuteOptions instance */ - public static create(properties?: query.IReadTransactionRequest): query.ReadTransactionRequest; + public static create(properties?: query.IExecuteOptions): query.ExecuteOptions; /** - * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @param message ReadTransactionRequest message or plain object to encode + * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. + * @param message ExecuteOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @param message ReadTransactionRequest message or plain object to encode + * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. + * @param message ExecuteOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer. + * Decodes an ExecuteOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReadTransactionRequest + * @returns ExecuteOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteOptions; /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadTransactionRequest + * @returns ExecuteOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteOptions; /** - * Verifies a ReadTransactionRequest message. + * Verifies an ExecuteOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadTransactionRequest + * @returns ExecuteOptions */ - public static fromObject(object: { [k: string]: any }): query.ReadTransactionRequest; + public static fromObject(object: { [k: string]: any }): query.ExecuteOptions; /** - * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. - * @param message ReadTransactionRequest + * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. + * @param message ExecuteOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReadTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ExecuteOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadTransactionRequest to JSON. + * Converts this ExecuteOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReadTransactionResponse. */ - interface IReadTransactionResponse { + namespace ExecuteOptions { - /** ReadTransactionResponse metadata */ - metadata?: (query.ITransactionMetadata|null); + /** IncludedFields enum. */ + enum IncludedFields { + TYPE_AND_NAME = 0, + TYPE_ONLY = 1, + ALL = 2 + } + + /** Workload enum. */ + enum Workload { + UNSPECIFIED = 0, + OLTP = 1, + OLAP = 2, + DBA = 3 + } + + /** TransactionIsolation enum. */ + enum TransactionIsolation { + DEFAULT = 0, + REPEATABLE_READ = 1, + READ_COMMITTED = 2, + READ_UNCOMMITTED = 3, + SERIALIZABLE = 4, + CONSISTENT_SNAPSHOT_READ_ONLY = 5, + AUTOCOMMIT = 6 + } + + /** PlannerVersion enum. */ + enum PlannerVersion { + DEFAULT_PLANNER = 0, + V3 = 1, + Gen4 = 2, + Gen4Greedy = 3, + Gen4Left2Right = 4, + Gen4WithFallback = 5, + Gen4CompareV3 = 6 + } + + /** Consolidator enum. */ + enum Consolidator { + CONSOLIDATOR_UNSPECIFIED = 0, + CONSOLIDATOR_DISABLED = 1, + CONSOLIDATOR_ENABLED = 2, + CONSOLIDATOR_ENABLED_REPLICAS = 3 + } + + /** TransactionAccessMode enum. */ + enum TransactionAccessMode { + CONSISTENT_SNAPSHOT = 0, + READ_WRITE = 1, + READ_ONLY = 2 + } } - /** Represents a ReadTransactionResponse. */ - class ReadTransactionResponse implements IReadTransactionResponse { + /** Properties of a Field. */ + interface IField { + + /** Field name */ + name?: (string|null); + + /** Field type */ + type?: (query.Type|null); + + /** Field table */ + table?: (string|null); + + /** Field org_table */ + org_table?: (string|null); + + /** Field database */ + database?: (string|null); + + /** Field org_name */ + org_name?: (string|null); + + /** Field column_length */ + column_length?: (number|null); + + /** Field charset */ + charset?: (number|null); + + /** Field decimals */ + decimals?: (number|null); + + /** Field flags */ + flags?: (number|null); + + /** Field column_type */ + column_type?: (string|null); + } + + /** Represents a Field. */ + class Field implements IField { /** - * Constructs a new ReadTransactionResponse. + * Constructs a new Field. * @param [properties] Properties to set */ - constructor(properties?: query.IReadTransactionResponse); + constructor(properties?: query.IField); - /** ReadTransactionResponse metadata. */ - public metadata?: (query.ITransactionMetadata|null); + /** Field name. */ + public name: string; + + /** Field type. */ + public type: query.Type; + + /** Field table. */ + public table: string; + + /** Field org_table. */ + public org_table: string; + + /** Field database. */ + public database: string; + + /** Field org_name. */ + public org_name: string; + + /** Field column_length. */ + public column_length: number; + + /** Field charset. */ + public charset: number; + + /** Field decimals. */ + public decimals: number; + + /** Field flags. */ + public flags: number; + + /** Field column_type. */ + public column_type: string; /** - * Creates a new ReadTransactionResponse instance using the specified properties. + * Creates a new Field instance using the specified properties. * @param [properties] Properties to set - * @returns ReadTransactionResponse instance + * @returns Field instance */ - public static create(properties?: query.IReadTransactionResponse): query.ReadTransactionResponse; + public static create(properties?: query.IField): query.Field; /** - * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @param message ReadTransactionResponse message or plain object to encode + * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. + * @param message Field message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @param message ReadTransactionResponse message or plain object to encode + * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. + * @param message Field message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer. + * Decodes a Field message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReadTransactionResponse + * @returns Field * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Field; /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. + * Decodes a Field message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadTransactionResponse + * @returns Field * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Field; /** - * Verifies a ReadTransactionResponse message. + * Verifies a Field message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Field message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadTransactionResponse + * @returns Field */ - public static fromObject(object: { [k: string]: any }): query.ReadTransactionResponse; + public static fromObject(object: { [k: string]: any }): query.Field; /** - * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. - * @param message ReadTransactionResponse + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReadTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadTransactionResponse to JSON. + * Converts this Field to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginExecuteRequest. */ - interface IBeginExecuteRequest { - - /** BeginExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteRequest target */ - target?: (query.ITarget|null); - - /** BeginExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** BeginExecuteRequest options */ - options?: (query.IExecuteOptions|null); + /** Properties of a Row. */ + interface IRow { - /** BeginExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); + /** Row lengths */ + lengths?: ((number|Long)[]|null); - /** BeginExecuteRequest pre_queries */ - pre_queries?: (string[]|null); + /** Row values */ + values?: (Uint8Array|null); } - /** Represents a BeginExecuteRequest. */ - class BeginExecuteRequest implements IBeginExecuteRequest { + /** Represents a Row. */ + class Row implements IRow { /** - * Constructs a new BeginExecuteRequest. + * Constructs a new Row. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginExecuteRequest); - - /** BeginExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** BeginExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** BeginExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); + constructor(properties?: query.IRow); - /** BeginExecuteRequest reserved_id. */ - public reserved_id: (number|Long); + /** Row lengths. */ + public lengths: (number|Long)[]; - /** BeginExecuteRequest pre_queries. */ - public pre_queries: string[]; + /** Row values. */ + public values: Uint8Array; /** - * Creates a new BeginExecuteRequest instance using the specified properties. + * Creates a new Row instance using the specified properties. * @param [properties] Properties to set - * @returns BeginExecuteRequest instance + * @returns Row instance */ - public static create(properties?: query.IBeginExecuteRequest): query.BeginExecuteRequest; + public static create(properties?: query.IRow): query.Row; /** - * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @param message BeginExecuteRequest message or plain object to encode + * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @param message BeginExecuteRequest message or plain object to encode + * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginExecuteRequest + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Row; /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginExecuteRequest + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Row; /** - * Verifies a BeginExecuteRequest message. + * Verifies a Row message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginExecuteRequest + * @returns Row */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.Row; /** - * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. - * @param message BeginExecuteRequest + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginExecuteRequest to JSON. + * Converts this Row to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginExecuteResponse. */ - interface IBeginExecuteResponse { + /** Properties of a QueryResult. */ + interface IQueryResult { - /** BeginExecuteResponse error */ - error?: (vtrpc.IRPCError|null); + /** QueryResult fields */ + fields?: (query.IField[]|null); - /** BeginExecuteResponse result */ - result?: (query.IQueryResult|null); + /** QueryResult rows_affected */ + rows_affected?: (number|Long|null); - /** BeginExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); + /** QueryResult insert_id */ + insert_id?: (number|Long|null); - /** BeginExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** QueryResult rows */ + rows?: (query.IRow[]|null); - /** BeginExecuteResponse session_state_changes */ + /** QueryResult info */ + info?: (string|null); + + /** QueryResult session_state_changes */ session_state_changes?: (string|null); } - /** Represents a BeginExecuteResponse. */ - class BeginExecuteResponse implements IBeginExecuteResponse { + /** Represents a QueryResult. */ + class QueryResult implements IQueryResult { /** - * Constructs a new BeginExecuteResponse. + * Constructs a new QueryResult. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginExecuteResponse); + constructor(properties?: query.IQueryResult); - /** BeginExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); + /** QueryResult fields. */ + public fields: query.IField[]; - /** BeginExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** QueryResult rows_affected. */ + public rows_affected: (number|Long); - /** BeginExecuteResponse transaction_id. */ - public transaction_id: (number|Long); + /** QueryResult insert_id. */ + public insert_id: (number|Long); - /** BeginExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** QueryResult rows. */ + public rows: query.IRow[]; - /** BeginExecuteResponse session_state_changes. */ + /** QueryResult info. */ + public info: string; + + /** QueryResult session_state_changes. */ public session_state_changes: string; /** - * Creates a new BeginExecuteResponse instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @param [properties] Properties to set - * @returns BeginExecuteResponse instance + * @returns QueryResult instance */ - public static create(properties?: query.IBeginExecuteResponse): query.BeginExecuteResponse; + public static create(properties?: query.IQueryResult): query.QueryResult; /** - * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @param message BeginExecuteResponse message or plain object to encode + * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. + * @param message QueryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @param message BeginExecuteResponse message or plain object to encode + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. + * @param message QueryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginExecuteResponse + * @returns QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryResult; /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a QueryResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginExecuteResponse + * @returns QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryResult; /** - * Verifies a BeginExecuteResponse message. + * Verifies a QueryResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginExecuteResponse + * @returns QueryResult */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.QueryResult; /** - * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. - * @param message BeginExecuteResponse + * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * @param message QueryResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginExecuteResponse to JSON. + * Converts this QueryResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginStreamExecuteRequest. */ - interface IBeginStreamExecuteRequest { - - /** BeginStreamExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginStreamExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginStreamExecuteRequest target */ - target?: (query.ITarget|null); - - /** BeginStreamExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** BeginStreamExecuteRequest options */ - options?: (query.IExecuteOptions|null); + /** Properties of a QueryWarning. */ + interface IQueryWarning { - /** BeginStreamExecuteRequest pre_queries */ - pre_queries?: (string[]|null); + /** QueryWarning code */ + code?: (number|null); - /** BeginStreamExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); + /** QueryWarning message */ + message?: (string|null); } - /** Represents a BeginStreamExecuteRequest. */ - class BeginStreamExecuteRequest implements IBeginStreamExecuteRequest { + /** Represents a QueryWarning. */ + class QueryWarning implements IQueryWarning { /** - * Constructs a new BeginStreamExecuteRequest. + * Constructs a new QueryWarning. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginStreamExecuteRequest); - - /** BeginStreamExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginStreamExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + constructor(properties?: query.IQueryWarning); - /** BeginStreamExecuteRequest target. */ - public target?: (query.ITarget|null); + /** QueryWarning code. */ + public code: number; - /** BeginStreamExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** BeginStreamExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** BeginStreamExecuteRequest pre_queries. */ - public pre_queries: string[]; - - /** BeginStreamExecuteRequest reserved_id. */ - public reserved_id: (number|Long); + /** QueryWarning message. */ + public message: string; /** - * Creates a new BeginStreamExecuteRequest instance using the specified properties. + * Creates a new QueryWarning instance using the specified properties. * @param [properties] Properties to set - * @returns BeginStreamExecuteRequest instance + * @returns QueryWarning instance */ - public static create(properties?: query.IBeginStreamExecuteRequest): query.BeginStreamExecuteRequest; + public static create(properties?: query.IQueryWarning): query.QueryWarning; /** - * Encodes the specified BeginStreamExecuteRequest message. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. - * @param message BeginStreamExecuteRequest message or plain object to encode + * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. + * @param message QueryWarning message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. - * @param message BeginStreamExecuteRequest message or plain object to encode + * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. + * @param message QueryWarning message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer. + * Decodes a QueryWarning message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginStreamExecuteRequest + * @returns QueryWarning * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginStreamExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryWarning; /** - * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryWarning message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginStreamExecuteRequest + * @returns QueryWarning * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginStreamExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryWarning; /** - * Verifies a BeginStreamExecuteRequest message. + * Verifies a QueryWarning message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginStreamExecuteRequest + * @returns QueryWarning */ - public static fromObject(object: { [k: string]: any }): query.BeginStreamExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.QueryWarning; /** - * Creates a plain object from a BeginStreamExecuteRequest message. Also converts values to other types if specified. - * @param message BeginStreamExecuteRequest + * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. + * @param message QueryWarning * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.QueryWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginStreamExecuteRequest to JSON. + * Converts this QueryWarning to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BeginStreamExecuteResponse. */ - interface IBeginStreamExecuteResponse { - - /** BeginStreamExecuteResponse error */ - error?: (vtrpc.IRPCError|null); - - /** BeginStreamExecuteResponse result */ - result?: (query.IQueryResult|null); - - /** BeginStreamExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); + /** Properties of a StreamEvent. */ + interface IStreamEvent { - /** BeginStreamExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** StreamEvent statements */ + statements?: (query.StreamEvent.IStatement[]|null); - /** BeginStreamExecuteResponse session_state_changes */ - session_state_changes?: (string|null); + /** StreamEvent event_token */ + event_token?: (query.IEventToken|null); } - /** Represents a BeginStreamExecuteResponse. */ - class BeginStreamExecuteResponse implements IBeginStreamExecuteResponse { + /** Represents a StreamEvent. */ + class StreamEvent implements IStreamEvent { /** - * Constructs a new BeginStreamExecuteResponse. + * Constructs a new StreamEvent. * @param [properties] Properties to set */ - constructor(properties?: query.IBeginStreamExecuteResponse); - - /** BeginStreamExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** BeginStreamExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** BeginStreamExecuteResponse transaction_id. */ - public transaction_id: (number|Long); + constructor(properties?: query.IStreamEvent); - /** BeginStreamExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** StreamEvent statements. */ + public statements: query.StreamEvent.IStatement[]; - /** BeginStreamExecuteResponse session_state_changes. */ - public session_state_changes: string; + /** StreamEvent event_token. */ + public event_token?: (query.IEventToken|null); /** - * Creates a new BeginStreamExecuteResponse instance using the specified properties. + * Creates a new StreamEvent instance using the specified properties. * @param [properties] Properties to set - * @returns BeginStreamExecuteResponse instance + * @returns StreamEvent instance */ - public static create(properties?: query.IBeginStreamExecuteResponse): query.BeginStreamExecuteResponse; + public static create(properties?: query.IStreamEvent): query.StreamEvent; /** - * Encodes the specified BeginStreamExecuteResponse message. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. - * @param message BeginStreamExecuteResponse message or plain object to encode + * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. + * @param message StreamEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. - * @param message BeginStreamExecuteResponse message or plain object to encode + * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. + * @param message StreamEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer. + * Decodes a StreamEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BeginStreamExecuteResponse + * @returns StreamEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginStreamExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent; /** - * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BeginStreamExecuteResponse + * @returns StreamEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginStreamExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent; /** - * Verifies a BeginStreamExecuteResponse message. + * Verifies a StreamEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BeginStreamExecuteResponse + * @returns StreamEvent */ - public static fromObject(object: { [k: string]: any }): query.BeginStreamExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.StreamEvent; /** - * Creates a plain object from a BeginStreamExecuteResponse message. Also converts values to other types if specified. - * @param message BeginStreamExecuteResponse + * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. + * @param message StreamEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.BeginStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StreamEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BeginStreamExecuteResponse to JSON. + * Converts this StreamEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MessageStreamRequest. */ - interface IMessageStreamRequest { + namespace StreamEvent { - /** MessageStreamRequest effective_caller_id */ + /** Properties of a Statement. */ + interface IStatement { + + /** Statement category */ + category?: (query.StreamEvent.Statement.Category|null); + + /** Statement table_name */ + table_name?: (string|null); + + /** Statement primary_key_fields */ + primary_key_fields?: (query.IField[]|null); + + /** Statement primary_key_values */ + primary_key_values?: (query.IRow[]|null); + + /** Statement sql */ + sql?: (Uint8Array|null); + } + + /** Represents a Statement. */ + class Statement implements IStatement { + + /** + * Constructs a new Statement. + * @param [properties] Properties to set + */ + constructor(properties?: query.StreamEvent.IStatement); + + /** Statement category. */ + public category: query.StreamEvent.Statement.Category; + + /** Statement table_name. */ + public table_name: string; + + /** Statement primary_key_fields. */ + public primary_key_fields: query.IField[]; + + /** Statement primary_key_values. */ + public primary_key_values: query.IRow[]; + + /** Statement sql. */ + public sql: Uint8Array; + + /** + * Creates a new Statement instance using the specified properties. + * @param [properties] Properties to set + * @returns Statement instance + */ + public static create(properties?: query.StreamEvent.IStatement): query.StreamEvent.Statement; + + /** + * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. + * @param message Statement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. + * @param message Statement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Statement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent.Statement; + + /** + * Decodes a Statement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent.Statement; + + /** + * Verifies a Statement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Statement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Statement + */ + public static fromObject(object: { [k: string]: any }): query.StreamEvent.Statement; + + /** + * Creates a plain object from a Statement message. Also converts values to other types if specified. + * @param message Statement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.StreamEvent.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Statement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Statement { + + /** Category enum. */ + enum Category { + Error = 0, + DML = 1, + DDL = 2 + } + } + } + + /** Properties of an ExecuteRequest. */ + interface IExecuteRequest { + + /** ExecuteRequest effective_caller_id */ effective_caller_id?: (vtrpc.ICallerID|null); - /** MessageStreamRequest immediate_caller_id */ + /** ExecuteRequest immediate_caller_id */ immediate_caller_id?: (query.IVTGateCallerID|null); - /** MessageStreamRequest target */ + /** ExecuteRequest target */ target?: (query.ITarget|null); - /** MessageStreamRequest name */ - name?: (string|null); + /** ExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** ExecuteRequest transaction_id */ + transaction_id?: (number|Long|null); + + /** ExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** ExecuteRequest reserved_id */ + reserved_id?: (number|Long|null); } - /** Represents a MessageStreamRequest. */ - class MessageStreamRequest implements IMessageStreamRequest { + /** Represents an ExecuteRequest. */ + class ExecuteRequest implements IExecuteRequest { /** - * Constructs a new MessageStreamRequest. + * Constructs a new ExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IMessageStreamRequest); + constructor(properties?: query.IExecuteRequest); - /** MessageStreamRequest effective_caller_id. */ + /** ExecuteRequest effective_caller_id. */ public effective_caller_id?: (vtrpc.ICallerID|null); - /** MessageStreamRequest immediate_caller_id. */ + /** ExecuteRequest immediate_caller_id. */ public immediate_caller_id?: (query.IVTGateCallerID|null); - /** MessageStreamRequest target. */ + /** ExecuteRequest target. */ public target?: (query.ITarget|null); - /** MessageStreamRequest name. */ - public name: string; + /** ExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** ExecuteRequest transaction_id. */ + public transaction_id: (number|Long); + + /** ExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** ExecuteRequest reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new MessageStreamRequest instance using the specified properties. + * Creates a new ExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MessageStreamRequest instance + * @returns ExecuteRequest instance */ - public static create(properties?: query.IMessageStreamRequest): query.MessageStreamRequest; + public static create(properties?: query.IExecuteRequest): query.ExecuteRequest; /** - * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @param message MessageStreamRequest message or plain object to encode + * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. + * @param message ExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @param message MessageStreamRequest message or plain object to encode + * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. + * @param message ExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageStreamRequest message from the specified reader or buffer. + * Decodes an ExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageStreamRequest + * @returns ExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteRequest; /** - * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageStreamRequest + * @returns ExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteRequest; /** - * Verifies a MessageStreamRequest message. + * Verifies an ExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageStreamRequest + * @returns ExecuteRequest */ - public static fromObject(object: { [k: string]: any }): query.MessageStreamRequest; + public static fromObject(object: { [k: string]: any }): query.ExecuteRequest; /** - * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. - * @param message MessageStreamRequest + * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. + * @param message ExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.MessageStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageStreamRequest to JSON. + * Converts this ExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MessageStreamResponse. */ - interface IMessageStreamResponse { + /** Properties of an ExecuteResponse. */ + interface IExecuteResponse { - /** MessageStreamResponse result */ + /** ExecuteResponse result */ result?: (query.IQueryResult|null); } - /** Represents a MessageStreamResponse. */ - class MessageStreamResponse implements IMessageStreamResponse { + /** Represents an ExecuteResponse. */ + class ExecuteResponse implements IExecuteResponse { /** - * Constructs a new MessageStreamResponse. + * Constructs a new ExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IMessageStreamResponse); + constructor(properties?: query.IExecuteResponse); - /** MessageStreamResponse result. */ + /** ExecuteResponse result. */ public result?: (query.IQueryResult|null); /** - * Creates a new MessageStreamResponse instance using the specified properties. + * Creates a new ExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MessageStreamResponse instance + * @returns ExecuteResponse instance */ - public static create(properties?: query.IMessageStreamResponse): query.MessageStreamResponse; + public static create(properties?: query.IExecuteResponse): query.ExecuteResponse; /** - * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @param message MessageStreamResponse message or plain object to encode + * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. + * @param message ExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @param message MessageStreamResponse message or plain object to encode + * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. + * @param message ExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageStreamResponse message from the specified reader or buffer. + * Decodes an ExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageStreamResponse + * @returns ExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteResponse; /** - * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageStreamResponse + * @returns ExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteResponse; /** - * Verifies a MessageStreamResponse message. + * Verifies an ExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageStreamResponse + * @returns ExecuteResponse */ - public static fromObject(object: { [k: string]: any }): query.MessageStreamResponse; + public static fromObject(object: { [k: string]: any }): query.ExecuteResponse; /** - * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. - * @param message MessageStreamResponse + * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. + * @param message ExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.MessageStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageStreamResponse to JSON. + * Converts this ExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MessageAckRequest. */ - interface IMessageAckRequest { - - /** MessageAckRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageAckRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageAckRequest target */ - target?: (query.ITarget|null); + /** Properties of a ResultWithError. */ + interface IResultWithError { - /** MessageAckRequest name */ - name?: (string|null); + /** ResultWithError error */ + error?: (vtrpc.IRPCError|null); - /** MessageAckRequest ids */ - ids?: (query.IValue[]|null); + /** ResultWithError result */ + result?: (query.IQueryResult|null); } - /** Represents a MessageAckRequest. */ - class MessageAckRequest implements IMessageAckRequest { + /** Represents a ResultWithError. */ + class ResultWithError implements IResultWithError { /** - * Constructs a new MessageAckRequest. + * Constructs a new ResultWithError. * @param [properties] Properties to set */ - constructor(properties?: query.IMessageAckRequest); - - /** MessageAckRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageAckRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageAckRequest target. */ - public target?: (query.ITarget|null); + constructor(properties?: query.IResultWithError); - /** MessageAckRequest name. */ - public name: string; + /** ResultWithError error. */ + public error?: (vtrpc.IRPCError|null); - /** MessageAckRequest ids. */ - public ids: query.IValue[]; + /** ResultWithError result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new MessageAckRequest instance using the specified properties. + * Creates a new ResultWithError instance using the specified properties. * @param [properties] Properties to set - * @returns MessageAckRequest instance + * @returns ResultWithError instance */ - public static create(properties?: query.IMessageAckRequest): query.MessageAckRequest; + public static create(properties?: query.IResultWithError): query.ResultWithError; /** - * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @param message MessageAckRequest message or plain object to encode + * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. + * @param message ResultWithError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @param message MessageAckRequest message or plain object to encode + * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. + * @param message ResultWithError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageAckRequest message from the specified reader or buffer. + * Decodes a ResultWithError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageAckRequest + * @returns ResultWithError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ResultWithError; /** - * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. + * Decodes a ResultWithError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageAckRequest + * @returns ResultWithError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ResultWithError; /** - * Verifies a MessageAckRequest message. + * Verifies a ResultWithError message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageAckRequest + * @returns ResultWithError */ - public static fromObject(object: { [k: string]: any }): query.MessageAckRequest; + public static fromObject(object: { [k: string]: any }): query.ResultWithError; /** - * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. - * @param message MessageAckRequest + * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. + * @param message ResultWithError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.MessageAckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ResultWithError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageAckRequest to JSON. + * Converts this ResultWithError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MessageAckResponse. */ - interface IMessageAckResponse { + /** Properties of a StreamExecuteRequest. */ + interface IStreamExecuteRequest { - /** MessageAckResponse result */ - result?: (query.IQueryResult|null); + /** StreamExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); + + /** StreamExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** StreamExecuteRequest target */ + target?: (query.ITarget|null); + + /** StreamExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** StreamExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** StreamExecuteRequest transaction_id */ + transaction_id?: (number|Long|null); + + /** StreamExecuteRequest reserved_id */ + reserved_id?: (number|Long|null); } - /** Represents a MessageAckResponse. */ - class MessageAckResponse implements IMessageAckResponse { + /** Represents a StreamExecuteRequest. */ + class StreamExecuteRequest implements IStreamExecuteRequest { /** - * Constructs a new MessageAckResponse. + * Constructs a new StreamExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IMessageAckResponse); + constructor(properties?: query.IStreamExecuteRequest); - /** MessageAckResponse result. */ - public result?: (query.IQueryResult|null); + /** StreamExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** StreamExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** StreamExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** StreamExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** StreamExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** StreamExecuteRequest transaction_id. */ + public transaction_id: (number|Long); + + /** StreamExecuteRequest reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new MessageAckResponse instance using the specified properties. + * Creates a new StreamExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MessageAckResponse instance + * @returns StreamExecuteRequest instance */ - public static create(properties?: query.IMessageAckResponse): query.MessageAckResponse; + public static create(properties?: query.IStreamExecuteRequest): query.StreamExecuteRequest; /** - * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @param message MessageAckResponse message or plain object to encode + * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. + * @param message StreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @param message MessageAckResponse message or plain object to encode + * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. + * @param message StreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageAckResponse message from the specified reader or buffer. + * Decodes a StreamExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageAckResponse + * @returns StreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteRequest; /** - * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageAckResponse + * @returns StreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteRequest; /** - * Verifies a MessageAckResponse message. + * Verifies a StreamExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageAckResponse + * @returns StreamExecuteRequest */ - public static fromObject(object: { [k: string]: any }): query.MessageAckResponse; + public static fromObject(object: { [k: string]: any }): query.StreamExecuteRequest; /** - * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. - * @param message MessageAckResponse + * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. + * @param message StreamExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.MessageAckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageAckResponse to JSON. + * Converts this StreamExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveExecuteRequest. */ - interface IReserveExecuteRequest { - - /** ReserveExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ReserveExecuteRequest options */ - options?: (query.IExecuteOptions|null); + /** Properties of a StreamExecuteResponse. */ + interface IStreamExecuteResponse { - /** ReserveExecuteRequest pre_queries */ - pre_queries?: (string[]|null); + /** StreamExecuteResponse result */ + result?: (query.IQueryResult|null); } - /** Represents a ReserveExecuteRequest. */ - class ReserveExecuteRequest implements IReserveExecuteRequest { + /** Represents a StreamExecuteResponse. */ + class StreamExecuteResponse implements IStreamExecuteResponse { /** - * Constructs a new ReserveExecuteRequest. + * Constructs a new StreamExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveExecuteRequest); - - /** ReserveExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveExecuteRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ReserveExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); + constructor(properties?: query.IStreamExecuteResponse); - /** ReserveExecuteRequest pre_queries. */ - public pre_queries: string[]; + /** StreamExecuteResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new ReserveExecuteRequest instance using the specified properties. + * Creates a new StreamExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveExecuteRequest instance + * @returns StreamExecuteResponse instance */ - public static create(properties?: query.IReserveExecuteRequest): query.ReserveExecuteRequest; + public static create(properties?: query.IStreamExecuteResponse): query.StreamExecuteResponse; /** - * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @param message ReserveExecuteRequest message or plain object to encode + * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. + * @param message StreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @param message ReserveExecuteRequest message or plain object to encode + * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. + * @param message StreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer. + * Decodes a StreamExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveExecuteRequest + * @returns StreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteResponse; /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveExecuteRequest + * @returns StreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteResponse; /** - * Verifies a ReserveExecuteRequest message. + * Verifies a StreamExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveExecuteRequest + * @returns StreamExecuteResponse */ - public static fromObject(object: { [k: string]: any }): query.ReserveExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.StreamExecuteResponse; /** - * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveExecuteRequest + * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. + * @param message StreamExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveExecuteRequest to JSON. + * Converts this StreamExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveExecuteResponse. */ - interface IReserveExecuteResponse { + /** Properties of a BeginRequest. */ + interface IBeginRequest { - /** ReserveExecuteResponse error */ - error?: (vtrpc.IRPCError|null); + /** BeginRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveExecuteResponse result */ - result?: (query.IQueryResult|null); + /** BeginRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); + /** BeginRequest target */ + target?: (query.ITarget|null); - /** ReserveExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** BeginRequest options */ + options?: (query.IExecuteOptions|null); } - /** Represents a ReserveExecuteResponse. */ - class ReserveExecuteResponse implements IReserveExecuteResponse { + /** Represents a BeginRequest. */ + class BeginRequest implements IBeginRequest { /** - * Constructs a new ReserveExecuteResponse. + * Constructs a new BeginRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveExecuteResponse); + constructor(properties?: query.IBeginRequest); - /** ReserveExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); + /** BeginRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** BeginRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveExecuteResponse reserved_id. */ - public reserved_id: (number|Long); + /** BeginRequest target. */ + public target?: (query.ITarget|null); - /** ReserveExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** BeginRequest options. */ + public options?: (query.IExecuteOptions|null); /** - * Creates a new ReserveExecuteResponse instance using the specified properties. + * Creates a new BeginRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveExecuteResponse instance + * @returns BeginRequest instance */ - public static create(properties?: query.IReserveExecuteResponse): query.ReserveExecuteResponse; + public static create(properties?: query.IBeginRequest): query.BeginRequest; /** - * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @param message ReserveExecuteResponse message or plain object to encode + * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. + * @param message BeginRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @param message ReserveExecuteResponse message or plain object to encode + * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. + * @param message BeginRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer. + * Decodes a BeginRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveExecuteResponse + * @returns BeginRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginRequest; /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a BeginRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveExecuteResponse + * @returns BeginRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginRequest; /** - * Verifies a ReserveExecuteResponse message. + * Verifies a BeginRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveExecuteResponse + * @returns BeginRequest */ - public static fromObject(object: { [k: string]: any }): query.ReserveExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.BeginRequest; /** - * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveExecuteResponse + * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. + * @param message BeginRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveExecuteResponse to JSON. + * Converts this BeginRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveStreamExecuteRequest. */ - interface IReserveStreamExecuteRequest { - - /** ReserveStreamExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveStreamExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveStreamExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveStreamExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveStreamExecuteRequest options */ - options?: (query.IExecuteOptions|null); + /** Properties of a BeginResponse. */ + interface IBeginResponse { - /** ReserveStreamExecuteRequest transaction_id */ + /** BeginResponse transaction_id */ transaction_id?: (number|Long|null); - /** ReserveStreamExecuteRequest pre_queries */ - pre_queries?: (string[]|null); + /** BeginResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginResponse session_state_changes */ + session_state_changes?: (string|null); } - /** Represents a ReserveStreamExecuteRequest. */ - class ReserveStreamExecuteRequest implements IReserveStreamExecuteRequest { + /** Represents a BeginResponse. */ + class BeginResponse implements IBeginResponse { /** - * Constructs a new ReserveStreamExecuteRequest. + * Constructs a new BeginResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveStreamExecuteRequest); - - /** ReserveStreamExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveStreamExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveStreamExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveStreamExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveStreamExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); + constructor(properties?: query.IBeginResponse); - /** ReserveStreamExecuteRequest transaction_id. */ + /** BeginResponse transaction_id. */ public transaction_id: (number|Long); - /** ReserveStreamExecuteRequest pre_queries. */ - public pre_queries: string[]; + /** BeginResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginResponse session_state_changes. */ + public session_state_changes: string; /** - * Creates a new ReserveStreamExecuteRequest instance using the specified properties. + * Creates a new BeginResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveStreamExecuteRequest instance + * @returns BeginResponse instance */ - public static create(properties?: query.IReserveStreamExecuteRequest): query.ReserveStreamExecuteRequest; + public static create(properties?: query.IBeginResponse): query.BeginResponse; /** - * Encodes the specified ReserveStreamExecuteRequest message. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. - * @param message ReserveStreamExecuteRequest message or plain object to encode + * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. + * @param message BeginResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. - * @param message ReserveStreamExecuteRequest message or plain object to encode + * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. + * @param message BeginResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer. + * Decodes a BeginResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveStreamExecuteRequest + * @returns BeginResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveStreamExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginResponse; /** - * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a BeginResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveStreamExecuteRequest + * @returns BeginResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveStreamExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginResponse; /** - * Verifies a ReserveStreamExecuteRequest message. + * Verifies a BeginResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveStreamExecuteRequest + * @returns BeginResponse */ - public static fromObject(object: { [k: string]: any }): query.ReserveStreamExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.BeginResponse; /** - * Creates a plain object from a ReserveStreamExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveStreamExecuteRequest + * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. + * @param message BeginResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveStreamExecuteRequest to JSON. + * Converts this BeginResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveStreamExecuteResponse. */ - interface IReserveStreamExecuteResponse { + /** Properties of a CommitRequest. */ + interface ICommitRequest { - /** ReserveStreamExecuteResponse error */ - error?: (vtrpc.IRPCError|null); + /** CommitRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveStreamExecuteResponse result */ - result?: (query.IQueryResult|null); + /** CommitRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveStreamExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); + /** CommitRequest target */ + target?: (query.ITarget|null); - /** ReserveStreamExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** CommitRequest transaction_id */ + transaction_id?: (number|Long|null); } - /** Represents a ReserveStreamExecuteResponse. */ - class ReserveStreamExecuteResponse implements IReserveStreamExecuteResponse { + /** Represents a CommitRequest. */ + class CommitRequest implements ICommitRequest { /** - * Constructs a new ReserveStreamExecuteResponse. + * Constructs a new CommitRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveStreamExecuteResponse); + constructor(properties?: query.ICommitRequest); - /** ReserveStreamExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); + /** CommitRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveStreamExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** CommitRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveStreamExecuteResponse reserved_id. */ - public reserved_id: (number|Long); + /** CommitRequest target. */ + public target?: (query.ITarget|null); - /** ReserveStreamExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** CommitRequest transaction_id. */ + public transaction_id: (number|Long); /** - * Creates a new ReserveStreamExecuteResponse instance using the specified properties. + * Creates a new CommitRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveStreamExecuteResponse instance + * @returns CommitRequest instance */ - public static create(properties?: query.IReserveStreamExecuteResponse): query.ReserveStreamExecuteResponse; + public static create(properties?: query.ICommitRequest): query.CommitRequest; /** - * Encodes the specified ReserveStreamExecuteResponse message. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. - * @param message ReserveStreamExecuteResponse message or plain object to encode + * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. + * @param message CommitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. - * @param message ReserveStreamExecuteResponse message or plain object to encode + * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. + * @param message CommitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer. + * Decodes a CommitRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveStreamExecuteResponse + * @returns CommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveStreamExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitRequest; /** - * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a CommitRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveStreamExecuteResponse + * @returns CommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveStreamExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitRequest; /** - * Verifies a ReserveStreamExecuteResponse message. + * Verifies a CommitRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveStreamExecuteResponse + * @returns CommitRequest */ - public static fromObject(object: { [k: string]: any }): query.ReserveStreamExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.CommitRequest; /** - * Creates a plain object from a ReserveStreamExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveStreamExecuteResponse + * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. + * @param message CommitRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveStreamExecuteResponse to JSON. + * Converts this CommitRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveBeginExecuteRequest. */ - interface IReserveBeginExecuteRequest { + /** Properties of a CommitResponse. */ + interface ICommitResponse { - /** ReserveBeginExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); + /** CommitResponse reserved_id */ + reserved_id?: (number|Long|null); + } - /** ReserveBeginExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveBeginExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveBeginExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** ReserveBeginExecuteRequest pre_queries */ - pre_queries?: (string[]|null); - - /** ReserveBeginExecuteRequest post_begin_queries */ - post_begin_queries?: (string[]|null); - } - - /** Represents a ReserveBeginExecuteRequest. */ - class ReserveBeginExecuteRequest implements IReserveBeginExecuteRequest { + /** Represents a CommitResponse. */ + class CommitResponse implements ICommitResponse { /** - * Constructs a new ReserveBeginExecuteRequest. + * Constructs a new CommitResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveBeginExecuteRequest); - - /** ReserveBeginExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveBeginExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveBeginExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveBeginExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** ReserveBeginExecuteRequest pre_queries. */ - public pre_queries: string[]; + constructor(properties?: query.ICommitResponse); - /** ReserveBeginExecuteRequest post_begin_queries. */ - public post_begin_queries: string[]; + /** CommitResponse reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new ReserveBeginExecuteRequest instance using the specified properties. + * Creates a new CommitResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveBeginExecuteRequest instance + * @returns CommitResponse instance */ - public static create(properties?: query.IReserveBeginExecuteRequest): query.ReserveBeginExecuteRequest; + public static create(properties?: query.ICommitResponse): query.CommitResponse; /** - * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @param message ReserveBeginExecuteRequest message or plain object to encode + * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * @param message CommitResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @param message ReserveBeginExecuteRequest message or plain object to encode + * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * @param message CommitResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. + * Decodes a CommitResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveBeginExecuteRequest + * @returns CommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitResponse; /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a CommitResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveBeginExecuteRequest + * @returns CommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitResponse; /** - * Verifies a ReserveBeginExecuteRequest message. + * Verifies a CommitResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveBeginExecuteRequest + * @returns CommitResponse */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.CommitResponse; /** - * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveBeginExecuteRequest + * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. + * @param message CommitResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveBeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveBeginExecuteRequest to JSON. + * Converts this CommitResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveBeginExecuteResponse. */ - interface IReserveBeginExecuteResponse { - - /** ReserveBeginExecuteResponse error */ - error?: (vtrpc.IRPCError|null); - - /** ReserveBeginExecuteResponse result */ - result?: (query.IQueryResult|null); + /** Properties of a RollbackRequest. */ + interface IRollbackRequest { - /** ReserveBeginExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); + /** RollbackRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveBeginExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); + /** RollbackRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveBeginExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** RollbackRequest target */ + target?: (query.ITarget|null); - /** ReserveBeginExecuteResponse session_state_changes */ - session_state_changes?: (string|null); + /** RollbackRequest transaction_id */ + transaction_id?: (number|Long|null); } - /** Represents a ReserveBeginExecuteResponse. */ - class ReserveBeginExecuteResponse implements IReserveBeginExecuteResponse { + /** Represents a RollbackRequest. */ + class RollbackRequest implements IRollbackRequest { /** - * Constructs a new ReserveBeginExecuteResponse. + * Constructs a new RollbackRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveBeginExecuteResponse); - - /** ReserveBeginExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** ReserveBeginExecuteResponse result. */ - public result?: (query.IQueryResult|null); + constructor(properties?: query.IRollbackRequest); - /** ReserveBeginExecuteResponse transaction_id. */ - public transaction_id: (number|Long); + /** RollbackRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveBeginExecuteResponse reserved_id. */ - public reserved_id: (number|Long); + /** RollbackRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveBeginExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** RollbackRequest target. */ + public target?: (query.ITarget|null); - /** ReserveBeginExecuteResponse session_state_changes. */ - public session_state_changes: string; + /** RollbackRequest transaction_id. */ + public transaction_id: (number|Long); /** - * Creates a new ReserveBeginExecuteResponse instance using the specified properties. + * Creates a new RollbackRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveBeginExecuteResponse instance + * @returns RollbackRequest instance */ - public static create(properties?: query.IReserveBeginExecuteResponse): query.ReserveBeginExecuteResponse; + public static create(properties?: query.IRollbackRequest): query.RollbackRequest; /** - * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @param message ReserveBeginExecuteResponse message or plain object to encode + * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. + * @param message RollbackRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @param message ReserveBeginExecuteResponse message or plain object to encode + * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. + * @param message RollbackRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. + * Decodes a RollbackRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveBeginExecuteResponse + * @returns RollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackRequest; /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveBeginExecuteResponse + * @returns RollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackRequest; /** - * Verifies a ReserveBeginExecuteResponse message. + * Verifies a RollbackRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveBeginExecuteResponse + * @returns RollbackRequest */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.RollbackRequest; /** - * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveBeginExecuteResponse + * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. + * @param message RollbackRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveBeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.RollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveBeginExecuteResponse to JSON. + * Converts this RollbackRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveBeginStreamExecuteRequest. */ - interface IReserveBeginStreamExecuteRequest { - - /** ReserveBeginStreamExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveBeginStreamExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginStreamExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveBeginStreamExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveBeginStreamExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** ReserveBeginStreamExecuteRequest pre_queries */ - pre_queries?: (string[]|null); + /** Properties of a RollbackResponse. */ + interface IRollbackResponse { - /** ReserveBeginStreamExecuteRequest post_begin_queries */ - post_begin_queries?: (string[]|null); + /** RollbackResponse reserved_id */ + reserved_id?: (number|Long|null); } - /** Represents a ReserveBeginStreamExecuteRequest. */ - class ReserveBeginStreamExecuteRequest implements IReserveBeginStreamExecuteRequest { + /** Represents a RollbackResponse. */ + class RollbackResponse implements IRollbackResponse { /** - * Constructs a new ReserveBeginStreamExecuteRequest. + * Constructs a new RollbackResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveBeginStreamExecuteRequest); - - /** ReserveBeginStreamExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveBeginStreamExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginStreamExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveBeginStreamExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveBeginStreamExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** ReserveBeginStreamExecuteRequest pre_queries. */ - public pre_queries: string[]; + constructor(properties?: query.IRollbackResponse); - /** ReserveBeginStreamExecuteRequest post_begin_queries. */ - public post_begin_queries: string[]; + /** RollbackResponse reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new ReserveBeginStreamExecuteRequest instance using the specified properties. + * Creates a new RollbackResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveBeginStreamExecuteRequest instance + * @returns RollbackResponse instance */ - public static create(properties?: query.IReserveBeginStreamExecuteRequest): query.ReserveBeginStreamExecuteRequest; + public static create(properties?: query.IRollbackResponse): query.RollbackResponse; /** - * Encodes the specified ReserveBeginStreamExecuteRequest message. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. - * @param message ReserveBeginStreamExecuteRequest message or plain object to encode + * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. + * @param message RollbackResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveBeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. - * @param message ReserveBeginStreamExecuteRequest message or plain object to encode + * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. + * @param message RollbackResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer. + * Decodes a RollbackResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveBeginStreamExecuteRequest + * @returns RollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginStreamExecuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackResponse; /** - * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveBeginStreamExecuteRequest + * @returns RollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginStreamExecuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackResponse; /** - * Verifies a ReserveBeginStreamExecuteRequest message. + * Verifies a RollbackResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveBeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveBeginStreamExecuteRequest + * @returns RollbackResponse */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginStreamExecuteRequest; + public static fromObject(object: { [k: string]: any }): query.RollbackResponse; /** - * Creates a plain object from a ReserveBeginStreamExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveBeginStreamExecuteRequest + * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. + * @param message RollbackResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveBeginStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.RollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveBeginStreamExecuteRequest to JSON. + * Converts this RollbackResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReserveBeginStreamExecuteResponse. */ - interface IReserveBeginStreamExecuteResponse { - - /** ReserveBeginStreamExecuteResponse error */ - error?: (vtrpc.IRPCError|null); + /** Properties of a PrepareRequest. */ + interface IPrepareRequest { - /** ReserveBeginStreamExecuteResponse result */ - result?: (query.IQueryResult|null); + /** PrepareRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveBeginStreamExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); + /** PrepareRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveBeginStreamExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); + /** PrepareRequest target */ + target?: (query.ITarget|null); - /** ReserveBeginStreamExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** PrepareRequest transaction_id */ + transaction_id?: (number|Long|null); - /** ReserveBeginStreamExecuteResponse session_state_changes */ - session_state_changes?: (string|null); + /** PrepareRequest dtid */ + dtid?: (string|null); } - /** Represents a ReserveBeginStreamExecuteResponse. */ - class ReserveBeginStreamExecuteResponse implements IReserveBeginStreamExecuteResponse { + /** Represents a PrepareRequest. */ + class PrepareRequest implements IPrepareRequest { /** - * Constructs a new ReserveBeginStreamExecuteResponse. + * Constructs a new PrepareRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IReserveBeginStreamExecuteResponse); - - /** ReserveBeginStreamExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); + constructor(properties?: query.IPrepareRequest); - /** ReserveBeginStreamExecuteResponse result. */ - public result?: (query.IQueryResult|null); + /** PrepareRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** ReserveBeginStreamExecuteResponse transaction_id. */ - public transaction_id: (number|Long); + /** PrepareRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** ReserveBeginStreamExecuteResponse reserved_id. */ - public reserved_id: (number|Long); + /** PrepareRequest target. */ + public target?: (query.ITarget|null); - /** ReserveBeginStreamExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** PrepareRequest transaction_id. */ + public transaction_id: (number|Long); - /** ReserveBeginStreamExecuteResponse session_state_changes. */ - public session_state_changes: string; + /** PrepareRequest dtid. */ + public dtid: string; /** - * Creates a new ReserveBeginStreamExecuteResponse instance using the specified properties. + * Creates a new PrepareRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReserveBeginStreamExecuteResponse instance + * @returns PrepareRequest instance */ - public static create(properties?: query.IReserveBeginStreamExecuteResponse): query.ReserveBeginStreamExecuteResponse; + public static create(properties?: query.IPrepareRequest): query.PrepareRequest; /** - * Encodes the specified ReserveBeginStreamExecuteResponse message. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. - * @param message ReserveBeginStreamExecuteResponse message or plain object to encode + * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. + * @param message PrepareRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReserveBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReserveBeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. - * @param message ReserveBeginStreamExecuteResponse message or plain object to encode + * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. + * @param message PrepareRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReserveBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer. + * Decodes a PrepareRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReserveBeginStreamExecuteResponse + * @returns PrepareRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginStreamExecuteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareRequest; /** - * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReserveBeginStreamExecuteResponse + * @returns PrepareRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginStreamExecuteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareRequest; /** - * Verifies a ReserveBeginStreamExecuteResponse message. + * Verifies a PrepareRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReserveBeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReserveBeginStreamExecuteResponse + * @returns PrepareRequest */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginStreamExecuteResponse; + public static fromObject(object: { [k: string]: any }): query.PrepareRequest; /** - * Creates a plain object from a ReserveBeginStreamExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveBeginStreamExecuteResponse + * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. + * @param message PrepareRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReserveBeginStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.PrepareRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReserveBeginStreamExecuteResponse to JSON. + * Converts this PrepareRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReleaseRequest. */ - interface IReleaseRequest { - - /** ReleaseRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReleaseRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReleaseRequest target */ - target?: (query.ITarget|null); - - /** ReleaseRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ReleaseRequest reserved_id */ - reserved_id?: (number|Long|null); + /** Properties of a PrepareResponse. */ + interface IPrepareResponse { } - /** Represents a ReleaseRequest. */ - class ReleaseRequest implements IReleaseRequest { + /** Represents a PrepareResponse. */ + class PrepareResponse implements IPrepareResponse { /** - * Constructs a new ReleaseRequest. + * Constructs a new PrepareResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IReleaseRequest); - - /** ReleaseRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReleaseRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReleaseRequest target. */ - public target?: (query.ITarget|null); - - /** ReleaseRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ReleaseRequest reserved_id. */ - public reserved_id: (number|Long); + constructor(properties?: query.IPrepareResponse); /** - * Creates a new ReleaseRequest instance using the specified properties. + * Creates a new PrepareResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReleaseRequest instance + * @returns PrepareResponse instance */ - public static create(properties?: query.IReleaseRequest): query.ReleaseRequest; + public static create(properties?: query.IPrepareResponse): query.PrepareResponse; /** - * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @param message ReleaseRequest message or plain object to encode + * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. + * @param message PrepareResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @param message ReleaseRequest message or plain object to encode + * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. + * @param message PrepareResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReleaseRequest message from the specified reader or buffer. + * Decodes a PrepareResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReleaseRequest + * @returns PrepareResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareResponse; /** - * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReleaseRequest + * @returns PrepareResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareResponse; /** - * Verifies a ReleaseRequest message. + * Verifies a PrepareResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReleaseRequest + * @returns PrepareResponse */ - public static fromObject(object: { [k: string]: any }): query.ReleaseRequest; + public static fromObject(object: { [k: string]: any }): query.PrepareResponse; /** - * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. - * @param message ReleaseRequest + * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. + * @param message PrepareResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.PrepareResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReleaseRequest to JSON. + * Converts this PrepareResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReleaseResponse. */ - interface IReleaseResponse { + /** Properties of a CommitPreparedRequest. */ + interface ICommitPreparedRequest { + + /** CommitPreparedRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); + + /** CommitPreparedRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** CommitPreparedRequest target */ + target?: (query.ITarget|null); + + /** CommitPreparedRequest dtid */ + dtid?: (string|null); } - /** Represents a ReleaseResponse. */ - class ReleaseResponse implements IReleaseResponse { + /** Represents a CommitPreparedRequest. */ + class CommitPreparedRequest implements ICommitPreparedRequest { /** - * Constructs a new ReleaseResponse. + * Constructs a new CommitPreparedRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IReleaseResponse); + constructor(properties?: query.ICommitPreparedRequest); + + /** CommitPreparedRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** CommitPreparedRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** CommitPreparedRequest target. */ + public target?: (query.ITarget|null); + + /** CommitPreparedRequest dtid. */ + public dtid: string; /** - * Creates a new ReleaseResponse instance using the specified properties. + * Creates a new CommitPreparedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReleaseResponse instance + * @returns CommitPreparedRequest instance */ - public static create(properties?: query.IReleaseResponse): query.ReleaseResponse; + public static create(properties?: query.ICommitPreparedRequest): query.CommitPreparedRequest; /** - * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @param message ReleaseResponse message or plain object to encode + * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. + * @param message CommitPreparedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @param message ReleaseResponse message or plain object to encode + * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. + * @param message CommitPreparedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReleaseResponse message from the specified reader or buffer. + * Decodes a CommitPreparedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReleaseResponse + * @returns CommitPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedRequest; /** - * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. + * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReleaseResponse + * @returns CommitPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedRequest; /** - * Verifies a ReleaseResponse message. + * Verifies a CommitPreparedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReleaseResponse + * @returns CommitPreparedRequest */ - public static fromObject(object: { [k: string]: any }): query.ReleaseResponse; + public static fromObject(object: { [k: string]: any }): query.CommitPreparedRequest; /** - * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. - * @param message ReleaseResponse + * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. + * @param message CommitPreparedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.ReleaseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CommitPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReleaseResponse to JSON. + * Converts this CommitPreparedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamHealthRequest. */ - interface IStreamHealthRequest { + /** Properties of a CommitPreparedResponse. */ + interface ICommitPreparedResponse { } - /** Represents a StreamHealthRequest. */ - class StreamHealthRequest implements IStreamHealthRequest { + /** Represents a CommitPreparedResponse. */ + class CommitPreparedResponse implements ICommitPreparedResponse { /** - * Constructs a new StreamHealthRequest. + * Constructs a new CommitPreparedResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IStreamHealthRequest); + constructor(properties?: query.ICommitPreparedResponse); /** - * Creates a new StreamHealthRequest instance using the specified properties. + * Creates a new CommitPreparedResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StreamHealthRequest instance + * @returns CommitPreparedResponse instance */ - public static create(properties?: query.IStreamHealthRequest): query.StreamHealthRequest; + public static create(properties?: query.ICommitPreparedResponse): query.CommitPreparedResponse; /** - * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @param message StreamHealthRequest message or plain object to encode + * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. + * @param message CommitPreparedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @param message StreamHealthRequest message or plain object to encode + * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. + * @param message CommitPreparedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamHealthRequest message from the specified reader or buffer. + * Decodes a CommitPreparedResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamHealthRequest + * @returns CommitPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedResponse; /** - * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. + * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamHealthRequest + * @returns CommitPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedResponse; /** - * Verifies a StreamHealthRequest message. + * Verifies a CommitPreparedResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamHealthRequest + * @returns CommitPreparedResponse */ - public static fromObject(object: { [k: string]: any }): query.StreamHealthRequest; + public static fromObject(object: { [k: string]: any }): query.CommitPreparedResponse; /** - * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. - * @param message StreamHealthRequest + * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. + * @param message CommitPreparedResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StreamHealthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CommitPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamHealthRequest to JSON. + * Converts this CommitPreparedResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RealtimeStats. */ - interface IRealtimeStats { - - /** RealtimeStats health_error */ - health_error?: (string|null); - - /** RealtimeStats replication_lag_seconds */ - replication_lag_seconds?: (number|null); - - /** RealtimeStats binlog_players_count */ - binlog_players_count?: (number|null); + /** Properties of a RollbackPreparedRequest. */ + interface IRollbackPreparedRequest { - /** RealtimeStats filtered_replication_lag_seconds */ - filtered_replication_lag_seconds?: (number|Long|null); + /** RollbackPreparedRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** RealtimeStats cpu_usage */ - cpu_usage?: (number|null); + /** RollbackPreparedRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** RealtimeStats qps */ - qps?: (number|null); + /** RollbackPreparedRequest target */ + target?: (query.ITarget|null); - /** RealtimeStats table_schema_changed */ - table_schema_changed?: (string[]|null); + /** RollbackPreparedRequest transaction_id */ + transaction_id?: (number|Long|null); - /** RealtimeStats view_schema_changed */ - view_schema_changed?: (string[]|null); + /** RollbackPreparedRequest dtid */ + dtid?: (string|null); } - /** Represents a RealtimeStats. */ - class RealtimeStats implements IRealtimeStats { + /** Represents a RollbackPreparedRequest. */ + class RollbackPreparedRequest implements IRollbackPreparedRequest { /** - * Constructs a new RealtimeStats. + * Constructs a new RollbackPreparedRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IRealtimeStats); - - /** RealtimeStats health_error. */ - public health_error: string; - - /** RealtimeStats replication_lag_seconds. */ - public replication_lag_seconds: number; - - /** RealtimeStats binlog_players_count. */ - public binlog_players_count: number; + constructor(properties?: query.IRollbackPreparedRequest); - /** RealtimeStats filtered_replication_lag_seconds. */ - public filtered_replication_lag_seconds: (number|Long); + /** RollbackPreparedRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** RealtimeStats cpu_usage. */ - public cpu_usage: number; + /** RollbackPreparedRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** RealtimeStats qps. */ - public qps: number; + /** RollbackPreparedRequest target. */ + public target?: (query.ITarget|null); - /** RealtimeStats table_schema_changed. */ - public table_schema_changed: string[]; + /** RollbackPreparedRequest transaction_id. */ + public transaction_id: (number|Long); - /** RealtimeStats view_schema_changed. */ - public view_schema_changed: string[]; + /** RollbackPreparedRequest dtid. */ + public dtid: string; /** - * Creates a new RealtimeStats instance using the specified properties. + * Creates a new RollbackPreparedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RealtimeStats instance + * @returns RollbackPreparedRequest instance */ - public static create(properties?: query.IRealtimeStats): query.RealtimeStats; + public static create(properties?: query.IRollbackPreparedRequest): query.RollbackPreparedRequest; /** - * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @param message RealtimeStats message or plain object to encode + * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. + * @param message RollbackPreparedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @param message RealtimeStats message or plain object to encode + * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. + * @param message RollbackPreparedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RealtimeStats message from the specified reader or buffer. + * Decodes a RollbackPreparedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RealtimeStats + * @returns RollbackPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RealtimeStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedRequest; /** - * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. + * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RealtimeStats + * @returns RollbackPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RealtimeStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedRequest; /** - * Verifies a RealtimeStats message. + * Verifies a RollbackPreparedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RealtimeStats + * @returns RollbackPreparedRequest */ - public static fromObject(object: { [k: string]: any }): query.RealtimeStats; + public static fromObject(object: { [k: string]: any }): query.RollbackPreparedRequest; /** - * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. - * @param message RealtimeStats + * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. + * @param message RollbackPreparedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.RealtimeStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.RollbackPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RealtimeStats to JSON. + * Converts this RollbackPreparedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AggregateStats. */ - interface IAggregateStats { - - /** AggregateStats healthy_tablet_count */ - healthy_tablet_count?: (number|null); - - /** AggregateStats unhealthy_tablet_count */ - unhealthy_tablet_count?: (number|null); - - /** AggregateStats replication_lag_seconds_min */ - replication_lag_seconds_min?: (number|null); - - /** AggregateStats replication_lag_seconds_max */ - replication_lag_seconds_max?: (number|null); + /** Properties of a RollbackPreparedResponse. */ + interface IRollbackPreparedResponse { } - /** Represents an AggregateStats. */ - class AggregateStats implements IAggregateStats { + /** Represents a RollbackPreparedResponse. */ + class RollbackPreparedResponse implements IRollbackPreparedResponse { /** - * Constructs a new AggregateStats. + * Constructs a new RollbackPreparedResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IAggregateStats); - - /** AggregateStats healthy_tablet_count. */ - public healthy_tablet_count: number; - - /** AggregateStats unhealthy_tablet_count. */ - public unhealthy_tablet_count: number; - - /** AggregateStats replication_lag_seconds_min. */ - public replication_lag_seconds_min: number; - - /** AggregateStats replication_lag_seconds_max. */ - public replication_lag_seconds_max: number; + constructor(properties?: query.IRollbackPreparedResponse); /** - * Creates a new AggregateStats instance using the specified properties. + * Creates a new RollbackPreparedResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AggregateStats instance + * @returns RollbackPreparedResponse instance */ - public static create(properties?: query.IAggregateStats): query.AggregateStats; + public static create(properties?: query.IRollbackPreparedResponse): query.RollbackPreparedResponse; /** - * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @param message AggregateStats message or plain object to encode + * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. + * @param message RollbackPreparedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @param message AggregateStats message or plain object to encode + * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. + * @param message RollbackPreparedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AggregateStats message from the specified reader or buffer. + * Decodes a RollbackPreparedResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AggregateStats + * @returns RollbackPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.AggregateStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedResponse; /** - * Decodes an AggregateStats message from the specified reader or buffer, length delimited. + * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AggregateStats + * @returns RollbackPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.AggregateStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedResponse; /** - * Verifies an AggregateStats message. + * Verifies a RollbackPreparedResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AggregateStats + * @returns RollbackPreparedResponse */ - public static fromObject(object: { [k: string]: any }): query.AggregateStats; + public static fromObject(object: { [k: string]: any }): query.RollbackPreparedResponse; /** - * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. - * @param message AggregateStats + * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. + * @param message RollbackPreparedResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.AggregateStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.RollbackPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AggregateStats to JSON. + * Converts this RollbackPreparedResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamHealthResponse. */ - interface IStreamHealthResponse { + /** Properties of a CreateTransactionRequest. */ + interface ICreateTransactionRequest { - /** StreamHealthResponse target */ - target?: (query.ITarget|null); + /** CreateTransactionRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** StreamHealthResponse serving */ - serving?: (boolean|null); + /** CreateTransactionRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** StreamHealthResponse tablet_externally_reparented_timestamp */ - tablet_externally_reparented_timestamp?: (number|Long|null); + /** CreateTransactionRequest target */ + target?: (query.ITarget|null); - /** StreamHealthResponse realtime_stats */ - realtime_stats?: (query.IRealtimeStats|null); + /** CreateTransactionRequest dtid */ + dtid?: (string|null); - /** StreamHealthResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** CreateTransactionRequest participants */ + participants?: (query.ITarget[]|null); } - /** Represents a StreamHealthResponse. */ - class StreamHealthResponse implements IStreamHealthResponse { + /** Represents a CreateTransactionRequest. */ + class CreateTransactionRequest implements ICreateTransactionRequest { /** - * Constructs a new StreamHealthResponse. + * Constructs a new CreateTransactionRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IStreamHealthResponse); + constructor(properties?: query.ICreateTransactionRequest); - /** StreamHealthResponse target. */ - public target?: (query.ITarget|null); + /** CreateTransactionRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** StreamHealthResponse serving. */ - public serving: boolean; + /** CreateTransactionRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** StreamHealthResponse tablet_externally_reparented_timestamp. */ - public tablet_externally_reparented_timestamp: (number|Long); + /** CreateTransactionRequest target. */ + public target?: (query.ITarget|null); - /** StreamHealthResponse realtime_stats. */ - public realtime_stats?: (query.IRealtimeStats|null); + /** CreateTransactionRequest dtid. */ + public dtid: string; - /** StreamHealthResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** CreateTransactionRequest participants. */ + public participants: query.ITarget[]; /** - * Creates a new StreamHealthResponse instance using the specified properties. + * Creates a new CreateTransactionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamHealthResponse instance + * @returns CreateTransactionRequest instance */ - public static create(properties?: query.IStreamHealthResponse): query.StreamHealthResponse; + public static create(properties?: query.ICreateTransactionRequest): query.CreateTransactionRequest; /** - * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @param message StreamHealthResponse message or plain object to encode + * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. + * @param message CreateTransactionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @param message StreamHealthResponse message or plain object to encode + * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. + * @param message CreateTransactionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamHealthResponse message from the specified reader or buffer. + * Decodes a CreateTransactionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamHealthResponse + * @returns CreateTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionRequest; /** - * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamHealthResponse + * @returns CreateTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionRequest; /** - * Verifies a StreamHealthResponse message. + * Verifies a CreateTransactionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamHealthResponse + * @returns CreateTransactionRequest */ - public static fromObject(object: { [k: string]: any }): query.StreamHealthResponse; + public static fromObject(object: { [k: string]: any }): query.CreateTransactionRequest; /** - * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. - * @param message StreamHealthResponse + * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. + * @param message CreateTransactionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.StreamHealthResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CreateTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamHealthResponse to JSON. + * Converts this CreateTransactionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** TransactionState enum. */ - enum TransactionState { - UNKNOWN = 0, - PREPARE = 1, - COMMIT = 2, - ROLLBACK = 3 - } - - /** Properties of a TransactionMetadata. */ - interface ITransactionMetadata { - - /** TransactionMetadata dtid */ - dtid?: (string|null); - - /** TransactionMetadata state */ - state?: (query.TransactionState|null); - - /** TransactionMetadata time_created */ - time_created?: (number|Long|null); - - /** TransactionMetadata participants */ - participants?: (query.ITarget[]|null); + /** Properties of a CreateTransactionResponse. */ + interface ICreateTransactionResponse { } - /** Represents a TransactionMetadata. */ - class TransactionMetadata implements ITransactionMetadata { + /** Represents a CreateTransactionResponse. */ + class CreateTransactionResponse implements ICreateTransactionResponse { /** - * Constructs a new TransactionMetadata. + * Constructs a new CreateTransactionResponse. * @param [properties] Properties to set */ - constructor(properties?: query.ITransactionMetadata); - - /** TransactionMetadata dtid. */ - public dtid: string; - - /** TransactionMetadata state. */ - public state: query.TransactionState; - - /** TransactionMetadata time_created. */ - public time_created: (number|Long); - - /** TransactionMetadata participants. */ - public participants: query.ITarget[]; + constructor(properties?: query.ICreateTransactionResponse); /** - * Creates a new TransactionMetadata instance using the specified properties. + * Creates a new CreateTransactionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionMetadata instance + * @returns CreateTransactionResponse instance */ - public static create(properties?: query.ITransactionMetadata): query.TransactionMetadata; + public static create(properties?: query.ICreateTransactionResponse): query.CreateTransactionResponse; /** - * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @param message TransactionMetadata message or plain object to encode + * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. + * @param message CreateTransactionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @param message TransactionMetadata message or plain object to encode + * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. + * @param message CreateTransactionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionMetadata message from the specified reader or buffer. + * Decodes a CreateTransactionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionMetadata + * @returns CreateTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.TransactionMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionResponse; /** - * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionMetadata + * @returns CreateTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.TransactionMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionResponse; /** - * Verifies a TransactionMetadata message. + * Verifies a CreateTransactionResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionMetadata + * @returns CreateTransactionResponse */ - public static fromObject(object: { [k: string]: any }): query.TransactionMetadata; + public static fromObject(object: { [k: string]: any }): query.CreateTransactionResponse; /** - * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. - * @param message TransactionMetadata + * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. + * @param message CreateTransactionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.TransactionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.CreateTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionMetadata to JSON. + * Converts this CreateTransactionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** SchemaTableType enum. */ - enum SchemaTableType { - VIEWS = 0, - TABLES = 1, - ALL = 2 - } + /** Properties of a StartCommitRequest. */ + interface IStartCommitRequest { - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { + /** StartCommitRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** GetSchemaRequest target */ + /** StartCommitRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** StartCommitRequest target */ target?: (query.ITarget|null); - /** GetSchemaRequest table_type */ - table_type?: (query.SchemaTableType|null); + /** StartCommitRequest transaction_id */ + transaction_id?: (number|Long|null); - /** GetSchemaRequest table_names */ - table_names?: (string[]|null); + /** StartCommitRequest dtid */ + dtid?: (string|null); } - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { + /** Represents a StartCommitRequest. */ + class StartCommitRequest implements IStartCommitRequest { /** - * Constructs a new GetSchemaRequest. + * Constructs a new StartCommitRequest. * @param [properties] Properties to set */ - constructor(properties?: query.IGetSchemaRequest); + constructor(properties?: query.IStartCommitRequest); - /** GetSchemaRequest target. */ + /** StartCommitRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** StartCommitRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** StartCommitRequest target. */ public target?: (query.ITarget|null); - /** GetSchemaRequest table_type. */ - public table_type: query.SchemaTableType; + /** StartCommitRequest transaction_id. */ + public transaction_id: (number|Long); - /** GetSchemaRequest table_names. */ - public table_names: string[]; + /** StartCommitRequest dtid. */ + public dtid: string; /** - * Creates a new GetSchemaRequest instance using the specified properties. + * Creates a new StartCommitRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSchemaRequest instance + * @returns StartCommitRequest instance */ - public static create(properties?: query.IGetSchemaRequest): query.GetSchemaRequest; + public static create(properties?: query.IStartCommitRequest): query.StartCommitRequest; /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode + * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. + * @param message StartCommitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode + * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. + * @param message StartCommitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. + * Decodes a StartCommitRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSchemaRequest + * @returns StartCommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.GetSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitRequest; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest + * @returns StartCommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.GetSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitRequest; /** - * Verifies a GetSchemaRequest message. + * Verifies a StartCommitRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSchemaRequest + * @returns StartCommitRequest */ - public static fromObject(object: { [k: string]: any }): query.GetSchemaRequest; + public static fromObject(object: { [k: string]: any }): query.StartCommitRequest; /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest + * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. + * @param message StartCommitRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StartCommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSchemaRequest to JSON. + * Converts this StartCommitRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSchemaResponse. */ - interface IGetSchemaResponse { - - /** GetSchemaResponse table_definition */ - table_definition?: ({ [k: string]: string }|null); + /** Properties of a StartCommitResponse. */ + interface IStartCommitResponse { } - /** Represents a GetSchemaResponse. */ - class GetSchemaResponse implements IGetSchemaResponse { + /** Represents a StartCommitResponse. */ + class StartCommitResponse implements IStartCommitResponse { /** - * Constructs a new GetSchemaResponse. + * Constructs a new StartCommitResponse. * @param [properties] Properties to set */ - constructor(properties?: query.IGetSchemaResponse); - - /** GetSchemaResponse table_definition. */ - public table_definition: { [k: string]: string }; + constructor(properties?: query.IStartCommitResponse); /** - * Creates a new GetSchemaResponse instance using the specified properties. + * Creates a new StartCommitResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSchemaResponse instance + * @returns StartCommitResponse instance */ - public static create(properties?: query.IGetSchemaResponse): query.GetSchemaResponse; + public static create(properties?: query.IStartCommitResponse): query.StartCommitResponse; /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode + * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. + * @param message StartCommitResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: query.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode + * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. + * @param message StartCommitResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: query.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. + * Decodes a StartCommitResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSchemaResponse + * @returns StartCommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.GetSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitResponse; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSchemaResponse + * @returns StartCommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.GetSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitResponse; /** - * Verifies a GetSchemaResponse message. + * Verifies a StartCommitResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSchemaResponse + * @returns StartCommitResponse */ - public static fromObject(object: { [k: string]: any }): query.GetSchemaResponse; + public static fromObject(object: { [k: string]: any }): query.StartCommitResponse; /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @param message GetSchemaResponse + * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. + * @param message StartCommitResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: query.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StartCommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSchemaResponse to JSON. + * Converts this StartCommitResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } -} -/** Namespace vtrpc. */ -export namespace vtrpc { + /** Properties of a SetRollbackRequest. */ + interface ISetRollbackRequest { - /** Properties of a CallerID. */ - interface ICallerID { + /** SetRollbackRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** CallerID principal */ - principal?: (string|null); + /** SetRollbackRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** CallerID component */ - component?: (string|null); + /** SetRollbackRequest target */ + target?: (query.ITarget|null); - /** CallerID subcomponent */ - subcomponent?: (string|null); + /** SetRollbackRequest transaction_id */ + transaction_id?: (number|Long|null); - /** CallerID groups */ - groups?: (string[]|null); + /** SetRollbackRequest dtid */ + dtid?: (string|null); } - /** Represents a CallerID. */ - class CallerID implements ICallerID { + /** Represents a SetRollbackRequest. */ + class SetRollbackRequest implements ISetRollbackRequest { /** - * Constructs a new CallerID. + * Constructs a new SetRollbackRequest. * @param [properties] Properties to set */ - constructor(properties?: vtrpc.ICallerID); + constructor(properties?: query.ISetRollbackRequest); - /** CallerID principal. */ - public principal: string; + /** SetRollbackRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** CallerID component. */ - public component: string; + /** SetRollbackRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** CallerID subcomponent. */ - public subcomponent: string; + /** SetRollbackRequest target. */ + public target?: (query.ITarget|null); - /** CallerID groups. */ - public groups: string[]; + /** SetRollbackRequest transaction_id. */ + public transaction_id: (number|Long); + + /** SetRollbackRequest dtid. */ + public dtid: string; /** - * Creates a new CallerID instance using the specified properties. + * Creates a new SetRollbackRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CallerID instance + * @returns SetRollbackRequest instance */ - public static create(properties?: vtrpc.ICallerID): vtrpc.CallerID; + public static create(properties?: query.ISetRollbackRequest): query.SetRollbackRequest; /** - * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @param message CallerID message or plain object to encode + * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. + * @param message SetRollbackRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @param message CallerID message or plain object to encode + * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. + * @param message SetRollbackRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CallerID message from the specified reader or buffer. + * Decodes a SetRollbackRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CallerID + * @returns SetRollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.CallerID; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackRequest; /** - * Decodes a CallerID message from the specified reader or buffer, length delimited. + * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CallerID + * @returns SetRollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.CallerID; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackRequest; /** - * Verifies a CallerID message. + * Verifies a SetRollbackRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CallerID message from a plain object. Also converts values to their respective internal types. + * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CallerID + * @returns SetRollbackRequest */ - public static fromObject(object: { [k: string]: any }): vtrpc.CallerID; + public static fromObject(object: { [k: string]: any }): query.SetRollbackRequest; /** - * Creates a plain object from a CallerID message. Also converts values to other types if specified. - * @param message CallerID + * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. + * @param message SetRollbackRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtrpc.CallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.SetRollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CallerID to JSON. + * Converts this SetRollbackRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Code enum. */ - enum Code { - OK = 0, - CANCELED = 1, - UNKNOWN = 2, - INVALID_ARGUMENT = 3, - DEADLINE_EXCEEDED = 4, - NOT_FOUND = 5, - ALREADY_EXISTS = 6, - PERMISSION_DENIED = 7, - RESOURCE_EXHAUSTED = 8, - FAILED_PRECONDITION = 9, - ABORTED = 10, - OUT_OF_RANGE = 11, - UNIMPLEMENTED = 12, - INTERNAL = 13, - UNAVAILABLE = 14, - DATA_LOSS = 15, - UNAUTHENTICATED = 16, - CLUSTER_EVENT = 17, - READ_ONLY = 18 - } - - /** Properties of a RPCError. */ - interface IRPCError { - - /** RPCError message */ - message?: (string|null); - - /** RPCError code */ - code?: (vtrpc.Code|null); + /** Properties of a SetRollbackResponse. */ + interface ISetRollbackResponse { } - /** Represents a RPCError. */ - class RPCError implements IRPCError { + /** Represents a SetRollbackResponse. */ + class SetRollbackResponse implements ISetRollbackResponse { /** - * Constructs a new RPCError. + * Constructs a new SetRollbackResponse. * @param [properties] Properties to set */ - constructor(properties?: vtrpc.IRPCError); - - /** RPCError message. */ - public message: string; - - /** RPCError code. */ - public code: vtrpc.Code; + constructor(properties?: query.ISetRollbackResponse); /** - * Creates a new RPCError instance using the specified properties. + * Creates a new SetRollbackResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RPCError instance + * @returns SetRollbackResponse instance */ - public static create(properties?: vtrpc.IRPCError): vtrpc.RPCError; + public static create(properties?: query.ISetRollbackResponse): query.SetRollbackResponse; /** - * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @param message RPCError message or plain object to encode + * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * @param message SetRollbackResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @param message RPCError message or plain object to encode + * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * @param message SetRollbackResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RPCError message from the specified reader or buffer. + * Decodes a SetRollbackResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RPCError + * @returns SetRollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.RPCError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackResponse; /** - * Decodes a RPCError message from the specified reader or buffer, length delimited. + * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RPCError + * @returns SetRollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.RPCError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackResponse; /** - * Verifies a RPCError message. + * Verifies a SetRollbackResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RPCError message from a plain object. Also converts values to their respective internal types. + * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RPCError + * @returns SetRollbackResponse */ - public static fromObject(object: { [k: string]: any }): vtrpc.RPCError; + public static fromObject(object: { [k: string]: any }): query.SetRollbackResponse; /** - * Creates a plain object from a RPCError message. Also converts values to other types if specified. - * @param message RPCError + * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. + * @param message SetRollbackResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtrpc.RPCError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.SetRollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RPCError to JSON. + * Converts this SetRollbackResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } -} - -/** Namespace replicationdata. */ -export namespace replicationdata { - - /** Properties of a Status. */ - interface IStatus { - /** Status position */ - position?: (string|null); - - /** Status replication_lag_seconds */ - replication_lag_seconds?: (number|null); + /** Properties of a ConcludeTransactionRequest. */ + interface IConcludeTransactionRequest { - /** Status source_host */ - source_host?: (string|null); + /** ConcludeTransactionRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** Status source_port */ - source_port?: (number|null); + /** ConcludeTransactionRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** Status connect_retry */ - connect_retry?: (number|null); + /** ConcludeTransactionRequest target */ + target?: (query.ITarget|null); - /** Status relay_log_position */ - relay_log_position?: (string|null); + /** ConcludeTransactionRequest dtid */ + dtid?: (string|null); + } - /** Status file_position */ - file_position?: (string|null); + /** Represents a ConcludeTransactionRequest. */ + class ConcludeTransactionRequest implements IConcludeTransactionRequest { - /** Status relay_log_source_binlog_equivalent_position */ - relay_log_source_binlog_equivalent_position?: (string|null); + /** + * Constructs a new ConcludeTransactionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: query.IConcludeTransactionRequest); - /** Status source_server_id */ - source_server_id?: (number|null); + /** ConcludeTransactionRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** Status source_uuid */ - source_uuid?: (string|null); + /** ConcludeTransactionRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** Status io_state */ - io_state?: (number|null); + /** ConcludeTransactionRequest target. */ + public target?: (query.ITarget|null); - /** Status last_io_error */ - last_io_error?: (string|null); + /** ConcludeTransactionRequest dtid. */ + public dtid: string; - /** Status sql_state */ - sql_state?: (number|null); + /** + * Creates a new ConcludeTransactionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcludeTransactionRequest instance + */ + public static create(properties?: query.IConcludeTransactionRequest): query.ConcludeTransactionRequest; - /** Status last_sql_error */ - last_sql_error?: (string|null); + /** + * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. + * @param message ConcludeTransactionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Status relay_log_file_position */ - relay_log_file_position?: (string|null); + /** + * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. + * @param message ConcludeTransactionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Status source_user */ - source_user?: (string|null); + /** + * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcludeTransactionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionRequest; - /** Status sql_delay */ - sql_delay?: (number|null); + /** + * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcludeTransactionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionRequest; - /** Status auto_position */ - auto_position?: (boolean|null); + /** + * Verifies a ConcludeTransactionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Status using_gtid */ - using_gtid?: (boolean|null); + /** + * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcludeTransactionRequest + */ + public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionRequest; - /** Status has_replication_filters */ - has_replication_filters?: (boolean|null); + /** + * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. + * @param message ConcludeTransactionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.ConcludeTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Status ssl_allowed */ - ssl_allowed?: (boolean|null); + /** + * Converts this ConcludeTransactionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Status replication_lag_unknown */ - replication_lag_unknown?: (boolean|null); + /** Properties of a ConcludeTransactionResponse. */ + interface IConcludeTransactionResponse { } - /** Represents a Status. */ - class Status implements IStatus { + /** Represents a ConcludeTransactionResponse. */ + class ConcludeTransactionResponse implements IConcludeTransactionResponse { /** - * Constructs a new Status. + * Constructs a new ConcludeTransactionResponse. * @param [properties] Properties to set */ - constructor(properties?: replicationdata.IStatus); - - /** Status position. */ - public position: string; + constructor(properties?: query.IConcludeTransactionResponse); - /** Status replication_lag_seconds. */ - public replication_lag_seconds: number; + /** + * Creates a new ConcludeTransactionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcludeTransactionResponse instance + */ + public static create(properties?: query.IConcludeTransactionResponse): query.ConcludeTransactionResponse; - /** Status source_host. */ - public source_host: string; - - /** Status source_port. */ - public source_port: number; - - /** Status connect_retry. */ - public connect_retry: number; - - /** Status relay_log_position. */ - public relay_log_position: string; - - /** Status file_position. */ - public file_position: string; - - /** Status relay_log_source_binlog_equivalent_position. */ - public relay_log_source_binlog_equivalent_position: string; - - /** Status source_server_id. */ - public source_server_id: number; - - /** Status source_uuid. */ - public source_uuid: string; - - /** Status io_state. */ - public io_state: number; - - /** Status last_io_error. */ - public last_io_error: string; - - /** Status sql_state. */ - public sql_state: number; - - /** Status last_sql_error. */ - public last_sql_error: string; - - /** Status relay_log_file_position. */ - public relay_log_file_position: string; - - /** Status source_user. */ - public source_user: string; - - /** Status sql_delay. */ - public sql_delay: number; - - /** Status auto_position. */ - public auto_position: boolean; - - /** Status using_gtid. */ - public using_gtid: boolean; - - /** Status has_replication_filters. */ - public has_replication_filters: boolean; - - /** Status ssl_allowed. */ - public ssl_allowed: boolean; - - /** Status replication_lag_unknown. */ - public replication_lag_unknown: boolean; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: replicationdata.IStatus): replicationdata.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. + * @param message ConcludeTransactionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @param message Status message or plain object to encode + * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. + * @param message ConcludeTransactionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Status message from the specified reader or buffer. + * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Status + * @returns ConcludeTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.Status; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionResponse; /** - * Decodes a Status message from the specified reader or buffer, length delimited. + * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Status + * @returns ConcludeTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.Status; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionResponse; /** - * Verifies a Status message. + * Verifies a ConcludeTransactionResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Status + * @returns ConcludeTransactionResponse */ - public static fromObject(object: { [k: string]: any }): replicationdata.Status; + public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionResponse; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status + * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. + * @param message ConcludeTransactionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: replicationdata.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ConcludeTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Status to JSON. + * Converts this ConcludeTransactionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StopReplicationStatus. */ - interface IStopReplicationStatus { + /** Properties of a ReadTransactionRequest. */ + interface IReadTransactionRequest { - /** StopReplicationStatus before */ - before?: (replicationdata.IStatus|null); + /** ReadTransactionRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** StopReplicationStatus after */ - after?: (replicationdata.IStatus|null); + /** ReadTransactionRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReadTransactionRequest target */ + target?: (query.ITarget|null); + + /** ReadTransactionRequest dtid */ + dtid?: (string|null); } - /** Represents a StopReplicationStatus. */ - class StopReplicationStatus implements IStopReplicationStatus { + /** Represents a ReadTransactionRequest. */ + class ReadTransactionRequest implements IReadTransactionRequest { /** - * Constructs a new StopReplicationStatus. + * Constructs a new ReadTransactionRequest. * @param [properties] Properties to set */ - constructor(properties?: replicationdata.IStopReplicationStatus); + constructor(properties?: query.IReadTransactionRequest); - /** StopReplicationStatus before. */ - public before?: (replicationdata.IStatus|null); + /** ReadTransactionRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** StopReplicationStatus after. */ - public after?: (replicationdata.IStatus|null); + /** ReadTransactionRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReadTransactionRequest target. */ + public target?: (query.ITarget|null); + + /** ReadTransactionRequest dtid. */ + public dtid: string; /** - * Creates a new StopReplicationStatus instance using the specified properties. + * Creates a new ReadTransactionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StopReplicationStatus instance + * @returns ReadTransactionRequest instance */ - public static create(properties?: replicationdata.IStopReplicationStatus): replicationdata.StopReplicationStatus; + public static create(properties?: query.IReadTransactionRequest): query.ReadTransactionRequest; /** - * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @param message StopReplicationStatus message or plain object to encode + * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. + * @param message ReadTransactionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @param message StopReplicationStatus message or plain object to encode + * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. + * @param message ReadTransactionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopReplicationStatus message from the specified reader or buffer. + * Decodes a ReadTransactionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StopReplicationStatus + * @returns ReadTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.StopReplicationStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionRequest; /** - * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. + * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopReplicationStatus + * @returns ReadTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.StopReplicationStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionRequest; /** - * Verifies a StopReplicationStatus message. + * Verifies a ReadTransactionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopReplicationStatus + * @returns ReadTransactionRequest */ - public static fromObject(object: { [k: string]: any }): replicationdata.StopReplicationStatus; + public static fromObject(object: { [k: string]: any }): query.ReadTransactionRequest; /** - * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. - * @param message StopReplicationStatus + * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. + * @param message ReadTransactionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: replicationdata.StopReplicationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReadTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopReplicationStatus to JSON. + * Converts this ReadTransactionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** StopReplicationMode enum. */ - enum StopReplicationMode { - IOANDSQLTHREAD = 0, - IOTHREADONLY = 1 - } - - /** Properties of a PrimaryStatus. */ - interface IPrimaryStatus { - - /** PrimaryStatus position */ - position?: (string|null); + /** Properties of a ReadTransactionResponse. */ + interface IReadTransactionResponse { - /** PrimaryStatus file_position */ - file_position?: (string|null); + /** ReadTransactionResponse metadata */ + metadata?: (query.ITransactionMetadata|null); } - /** Represents a PrimaryStatus. */ - class PrimaryStatus implements IPrimaryStatus { + /** Represents a ReadTransactionResponse. */ + class ReadTransactionResponse implements IReadTransactionResponse { /** - * Constructs a new PrimaryStatus. + * Constructs a new ReadTransactionResponse. * @param [properties] Properties to set */ - constructor(properties?: replicationdata.IPrimaryStatus); - - /** PrimaryStatus position. */ - public position: string; + constructor(properties?: query.IReadTransactionResponse); - /** PrimaryStatus file_position. */ - public file_position: string; + /** ReadTransactionResponse metadata. */ + public metadata?: (query.ITransactionMetadata|null); /** - * Creates a new PrimaryStatus instance using the specified properties. + * Creates a new ReadTransactionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PrimaryStatus instance + * @returns ReadTransactionResponse instance */ - public static create(properties?: replicationdata.IPrimaryStatus): replicationdata.PrimaryStatus; + public static create(properties?: query.IReadTransactionResponse): query.ReadTransactionResponse; /** - * Encodes the specified PrimaryStatus message. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. - * @param message PrimaryStatus message or plain object to encode + * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. + * @param message ReadTransactionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: replicationdata.IPrimaryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PrimaryStatus message, length delimited. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. - * @param message PrimaryStatus message or plain object to encode + * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. + * @param message ReadTransactionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: replicationdata.IPrimaryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PrimaryStatus message from the specified reader or buffer. + * Decodes a ReadTransactionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PrimaryStatus + * @returns ReadTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.PrimaryStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionResponse; /** - * Decodes a PrimaryStatus message from the specified reader or buffer, length delimited. + * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PrimaryStatus + * @returns ReadTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.PrimaryStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionResponse; /** - * Verifies a PrimaryStatus message. + * Verifies a ReadTransactionResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PrimaryStatus message from a plain object. Also converts values to their respective internal types. + * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PrimaryStatus + * @returns ReadTransactionResponse */ - public static fromObject(object: { [k: string]: any }): replicationdata.PrimaryStatus; + public static fromObject(object: { [k: string]: any }): query.ReadTransactionResponse; /** - * Creates a plain object from a PrimaryStatus message. Also converts values to other types if specified. - * @param message PrimaryStatus + * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. + * @param message ReadTransactionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: replicationdata.PrimaryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReadTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PrimaryStatus to JSON. + * Converts this ReadTransactionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FullStatus. */ - interface IFullStatus { - - /** FullStatus server_id */ - server_id?: (number|null); - - /** FullStatus server_uuid */ - server_uuid?: (string|null); - - /** FullStatus replication_status */ - replication_status?: (replicationdata.IStatus|null); - - /** FullStatus primary_status */ - primary_status?: (replicationdata.IPrimaryStatus|null); - - /** FullStatus gtid_purged */ - gtid_purged?: (string|null); - - /** FullStatus version */ - version?: (string|null); - - /** FullStatus version_comment */ - version_comment?: (string|null); - - /** FullStatus read_only */ - read_only?: (boolean|null); - - /** FullStatus gtid_mode */ - gtid_mode?: (string|null); - - /** FullStatus binlog_format */ - binlog_format?: (string|null); - - /** FullStatus binlog_row_image */ - binlog_row_image?: (string|null); - - /** FullStatus log_bin_enabled */ - log_bin_enabled?: (boolean|null); - - /** FullStatus log_replica_updates */ - log_replica_updates?: (boolean|null); + /** Properties of a BeginExecuteRequest. */ + interface IBeginExecuteRequest { - /** FullStatus semi_sync_primary_enabled */ - semi_sync_primary_enabled?: (boolean|null); + /** BeginExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** FullStatus semi_sync_replica_enabled */ - semi_sync_replica_enabled?: (boolean|null); + /** BeginExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** FullStatus semi_sync_primary_status */ - semi_sync_primary_status?: (boolean|null); + /** BeginExecuteRequest target */ + target?: (query.ITarget|null); - /** FullStatus semi_sync_replica_status */ - semi_sync_replica_status?: (boolean|null); + /** BeginExecuteRequest query */ + query?: (query.IBoundQuery|null); - /** FullStatus semi_sync_primary_clients */ - semi_sync_primary_clients?: (number|null); + /** BeginExecuteRequest options */ + options?: (query.IExecuteOptions|null); - /** FullStatus semi_sync_primary_timeout */ - semi_sync_primary_timeout?: (number|Long|null); + /** BeginExecuteRequest reserved_id */ + reserved_id?: (number|Long|null); - /** FullStatus semi_sync_wait_for_replica_count */ - semi_sync_wait_for_replica_count?: (number|null); + /** BeginExecuteRequest pre_queries */ + pre_queries?: (string[]|null); } - /** Represents a FullStatus. */ - class FullStatus implements IFullStatus { + /** Represents a BeginExecuteRequest. */ + class BeginExecuteRequest implements IBeginExecuteRequest { /** - * Constructs a new FullStatus. + * Constructs a new BeginExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: replicationdata.IFullStatus); - - /** FullStatus server_id. */ - public server_id: number; - - /** FullStatus server_uuid. */ - public server_uuid: string; - - /** FullStatus replication_status. */ - public replication_status?: (replicationdata.IStatus|null); - - /** FullStatus primary_status. */ - public primary_status?: (replicationdata.IPrimaryStatus|null); - - /** FullStatus gtid_purged. */ - public gtid_purged: string; - - /** FullStatus version. */ - public version: string; - - /** FullStatus version_comment. */ - public version_comment: string; - - /** FullStatus read_only. */ - public read_only: boolean; - - /** FullStatus gtid_mode. */ - public gtid_mode: string; - - /** FullStatus binlog_format. */ - public binlog_format: string; - - /** FullStatus binlog_row_image. */ - public binlog_row_image: string; - - /** FullStatus log_bin_enabled. */ - public log_bin_enabled: boolean; - - /** FullStatus log_replica_updates. */ - public log_replica_updates: boolean; + constructor(properties?: query.IBeginExecuteRequest); - /** FullStatus semi_sync_primary_enabled. */ - public semi_sync_primary_enabled: boolean; + /** BeginExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** FullStatus semi_sync_replica_enabled. */ - public semi_sync_replica_enabled: boolean; + /** BeginExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** FullStatus semi_sync_primary_status. */ - public semi_sync_primary_status: boolean; + /** BeginExecuteRequest target. */ + public target?: (query.ITarget|null); - /** FullStatus semi_sync_replica_status. */ - public semi_sync_replica_status: boolean; + /** BeginExecuteRequest query. */ + public query?: (query.IBoundQuery|null); - /** FullStatus semi_sync_primary_clients. */ - public semi_sync_primary_clients: number; + /** BeginExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); - /** FullStatus semi_sync_primary_timeout. */ - public semi_sync_primary_timeout: (number|Long); + /** BeginExecuteRequest reserved_id. */ + public reserved_id: (number|Long); - /** FullStatus semi_sync_wait_for_replica_count. */ - public semi_sync_wait_for_replica_count: number; + /** BeginExecuteRequest pre_queries. */ + public pre_queries: string[]; /** - * Creates a new FullStatus instance using the specified properties. + * Creates a new BeginExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FullStatus instance + * @returns BeginExecuteRequest instance */ - public static create(properties?: replicationdata.IFullStatus): replicationdata.FullStatus; + public static create(properties?: query.IBeginExecuteRequest): query.BeginExecuteRequest; /** - * Encodes the specified FullStatus message. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. - * @param message FullStatus message or plain object to encode + * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. + * @param message BeginExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: replicationdata.IFullStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FullStatus message, length delimited. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. - * @param message FullStatus message or plain object to encode + * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. + * @param message BeginExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: replicationdata.IFullStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FullStatus message from the specified reader or buffer. + * Decodes a BeginExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FullStatus + * @returns BeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.FullStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteRequest; /** - * Decodes a FullStatus message from the specified reader or buffer, length delimited. + * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FullStatus + * @returns BeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.FullStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteRequest; /** - * Verifies a FullStatus message. + * Verifies a BeginExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FullStatus message from a plain object. Also converts values to their respective internal types. + * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FullStatus + * @returns BeginExecuteRequest */ - public static fromObject(object: { [k: string]: any }): replicationdata.FullStatus; + public static fromObject(object: { [k: string]: any }): query.BeginExecuteRequest; /** - * Creates a plain object from a FullStatus message. Also converts values to other types if specified. - * @param message FullStatus + * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. + * @param message BeginExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: replicationdata.FullStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FullStatus to JSON. + * Converts this BeginExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } -} -/** Namespace vschema. */ -export namespace vschema { + /** Properties of a BeginExecuteResponse. */ + interface IBeginExecuteResponse { - /** Properties of a RoutingRules. */ - interface IRoutingRules { + /** BeginExecuteResponse error */ + error?: (vtrpc.IRPCError|null); - /** RoutingRules rules */ - rules?: (vschema.IRoutingRule[]|null); + /** BeginExecuteResponse result */ + result?: (query.IQueryResult|null); + + /** BeginExecuteResponse transaction_id */ + transaction_id?: (number|Long|null); + + /** BeginExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginExecuteResponse session_state_changes */ + session_state_changes?: (string|null); } - /** Represents a RoutingRules. */ - class RoutingRules implements IRoutingRules { + /** Represents a BeginExecuteResponse. */ + class BeginExecuteResponse implements IBeginExecuteResponse { /** - * Constructs a new RoutingRules. + * Constructs a new BeginExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.IRoutingRules); + constructor(properties?: query.IBeginExecuteResponse); - /** RoutingRules rules. */ - public rules: vschema.IRoutingRule[]; + /** BeginExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); + + /** BeginExecuteResponse result. */ + public result?: (query.IQueryResult|null); + + /** BeginExecuteResponse transaction_id. */ + public transaction_id: (number|Long); + + /** BeginExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginExecuteResponse session_state_changes. */ + public session_state_changes: string; /** - * Creates a new RoutingRules instance using the specified properties. + * Creates a new BeginExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RoutingRules instance + * @returns BeginExecuteResponse instance */ - public static create(properties?: vschema.IRoutingRules): vschema.RoutingRules; + public static create(properties?: query.IBeginExecuteResponse): query.BeginExecuteResponse; /** - * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @param message RoutingRules message or plain object to encode + * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. + * @param message BeginExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @param message RoutingRules message or plain object to encode + * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. + * @param message BeginExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RoutingRules message from the specified reader or buffer. + * Decodes a BeginExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RoutingRules + * @returns BeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRules; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteResponse; /** - * Decodes a RoutingRules message from the specified reader or buffer, length delimited. + * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RoutingRules + * @returns BeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRules; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteResponse; /** - * Verifies a RoutingRules message. + * Verifies a BeginExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. + * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RoutingRules + * @returns BeginExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vschema.RoutingRules; + public static fromObject(object: { [k: string]: any }): query.BeginExecuteResponse; /** - * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. - * @param message RoutingRules + * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. + * @param message BeginExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.RoutingRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RoutingRules to JSON. + * Converts this BeginExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RoutingRule. */ - interface IRoutingRule { + /** Properties of a BeginStreamExecuteRequest. */ + interface IBeginStreamExecuteRequest { - /** RoutingRule from_table */ - from_table?: (string|null); + /** BeginStreamExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** RoutingRule to_tables */ - to_tables?: (string[]|null); + /** BeginStreamExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** BeginStreamExecuteRequest target */ + target?: (query.ITarget|null); + + /** BeginStreamExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** BeginStreamExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** BeginStreamExecuteRequest pre_queries */ + pre_queries?: (string[]|null); + + /** BeginStreamExecuteRequest reserved_id */ + reserved_id?: (number|Long|null); } - /** Represents a RoutingRule. */ - class RoutingRule implements IRoutingRule { + /** Represents a BeginStreamExecuteRequest. */ + class BeginStreamExecuteRequest implements IBeginStreamExecuteRequest { /** - * Constructs a new RoutingRule. + * Constructs a new BeginStreamExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: vschema.IRoutingRule); + constructor(properties?: query.IBeginStreamExecuteRequest); - /** RoutingRule from_table. */ - public from_table: string; + /** BeginStreamExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** RoutingRule to_tables. */ - public to_tables: string[]; + /** BeginStreamExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** BeginStreamExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** BeginStreamExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** BeginStreamExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** BeginStreamExecuteRequest pre_queries. */ + public pre_queries: string[]; + + /** BeginStreamExecuteRequest reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new RoutingRule instance using the specified properties. + * Creates a new BeginStreamExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RoutingRule instance + * @returns BeginStreamExecuteRequest instance */ - public static create(properties?: vschema.IRoutingRule): vschema.RoutingRule; + public static create(properties?: query.IBeginStreamExecuteRequest): query.BeginStreamExecuteRequest; /** - * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @param message RoutingRule message or plain object to encode + * Encodes the specified BeginStreamExecuteRequest message. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. + * @param message BeginStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @param message RoutingRule message or plain object to encode + * Encodes the specified BeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. + * @param message BeginStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RoutingRule message from the specified reader or buffer. + * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RoutingRule + * @returns BeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginStreamExecuteRequest; /** - * Decodes a RoutingRule message from the specified reader or buffer, length delimited. + * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RoutingRule + * @returns BeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginStreamExecuteRequest; /** - * Verifies a RoutingRule message. + * Verifies a BeginStreamExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. + * Creates a BeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RoutingRule + * @returns BeginStreamExecuteRequest */ - public static fromObject(object: { [k: string]: any }): vschema.RoutingRule; + public static fromObject(object: { [k: string]: any }): query.BeginStreamExecuteRequest; /** - * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. - * @param message RoutingRule + * Creates a plain object from a BeginStreamExecuteRequest message. Also converts values to other types if specified. + * @param message BeginStreamExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.RoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RoutingRule to JSON. + * Converts this BeginStreamExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Keyspace. */ - interface IKeyspace { + /** Properties of a BeginStreamExecuteResponse. */ + interface IBeginStreamExecuteResponse { - /** Keyspace sharded */ - sharded?: (boolean|null); + /** BeginStreamExecuteResponse error */ + error?: (vtrpc.IRPCError|null); - /** Keyspace vindexes */ - vindexes?: ({ [k: string]: vschema.IVindex }|null); + /** BeginStreamExecuteResponse result */ + result?: (query.IQueryResult|null); - /** Keyspace tables */ - tables?: ({ [k: string]: vschema.ITable }|null); + /** BeginStreamExecuteResponse transaction_id */ + transaction_id?: (number|Long|null); - /** Keyspace require_explicit_routing */ - require_explicit_routing?: (boolean|null); + /** BeginStreamExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginStreamExecuteResponse session_state_changes */ + session_state_changes?: (string|null); } - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { + /** Represents a BeginStreamExecuteResponse. */ + class BeginStreamExecuteResponse implements IBeginStreamExecuteResponse { /** - * Constructs a new Keyspace. + * Constructs a new BeginStreamExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.IKeyspace); + constructor(properties?: query.IBeginStreamExecuteResponse); - /** Keyspace sharded. */ - public sharded: boolean; + /** BeginStreamExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); - /** Keyspace vindexes. */ - public vindexes: { [k: string]: vschema.IVindex }; + /** BeginStreamExecuteResponse result. */ + public result?: (query.IQueryResult|null); - /** Keyspace tables. */ - public tables: { [k: string]: vschema.ITable }; + /** BeginStreamExecuteResponse transaction_id. */ + public transaction_id: (number|Long); - /** Keyspace require_explicit_routing. */ - public require_explicit_routing: boolean; + /** BeginStreamExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** BeginStreamExecuteResponse session_state_changes. */ + public session_state_changes: string; /** - * Creates a new Keyspace instance using the specified properties. + * Creates a new BeginStreamExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Keyspace instance + * @returns BeginStreamExecuteResponse instance */ - public static create(properties?: vschema.IKeyspace): vschema.Keyspace; + public static create(properties?: query.IBeginStreamExecuteResponse): query.BeginStreamExecuteResponse; /** - * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode + * Encodes the specified BeginStreamExecuteResponse message. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. + * @param message BeginStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode + * Encodes the specified BeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. + * @param message BeginStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Keyspace + * @returns BeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Keyspace; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginStreamExecuteResponse; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Keyspace + * @returns BeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Keyspace; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginStreamExecuteResponse; /** - * Verifies a Keyspace message. + * Verifies a BeginStreamExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. + * Creates a BeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Keyspace + * @returns BeginStreamExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vschema.Keyspace; + public static fromObject(object: { [k: string]: any }): query.BeginStreamExecuteResponse; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace + * Creates a plain object from a BeginStreamExecuteResponse message. Also converts values to other types if specified. + * @param message BeginStreamExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.BeginStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Keyspace to JSON. + * Converts this BeginStreamExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Vindex. */ - interface IVindex { + /** Properties of a MessageStreamRequest. */ + interface IMessageStreamRequest { - /** Vindex type */ - type?: (string|null); + /** MessageStreamRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** Vindex params */ - params?: ({ [k: string]: string }|null); + /** MessageStreamRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** Vindex owner */ - owner?: (string|null); + /** MessageStreamRequest target */ + target?: (query.ITarget|null); + + /** MessageStreamRequest name */ + name?: (string|null); } - /** Represents a Vindex. */ - class Vindex implements IVindex { + /** Represents a MessageStreamRequest. */ + class MessageStreamRequest implements IMessageStreamRequest { /** - * Constructs a new Vindex. + * Constructs a new MessageStreamRequest. * @param [properties] Properties to set */ - constructor(properties?: vschema.IVindex); + constructor(properties?: query.IMessageStreamRequest); - /** Vindex type. */ - public type: string; + /** MessageStreamRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** Vindex params. */ - public params: { [k: string]: string }; + /** MessageStreamRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** Vindex owner. */ - public owner: string; + /** MessageStreamRequest target. */ + public target?: (query.ITarget|null); + + /** MessageStreamRequest name. */ + public name: string; /** - * Creates a new Vindex instance using the specified properties. + * Creates a new MessageStreamRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Vindex instance + * @returns MessageStreamRequest instance */ - public static create(properties?: vschema.IVindex): vschema.Vindex; + public static create(properties?: query.IMessageStreamRequest): query.MessageStreamRequest; /** - * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @param message Vindex message or plain object to encode + * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. + * @param message MessageStreamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @param message Vindex message or plain object to encode + * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. + * @param message MessageStreamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Vindex message from the specified reader or buffer. + * Decodes a MessageStreamRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Vindex + * @returns MessageStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Vindex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamRequest; /** - * Decodes a Vindex message from the specified reader or buffer, length delimited. + * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Vindex + * @returns MessageStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Vindex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamRequest; /** - * Verifies a Vindex message. + * Verifies a MessageStreamRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Vindex message from a plain object. Also converts values to their respective internal types. + * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Vindex + * @returns MessageStreamRequest */ - public static fromObject(object: { [k: string]: any }): vschema.Vindex; + public static fromObject(object: { [k: string]: any }): query.MessageStreamRequest; /** - * Creates a plain object from a Vindex message. Also converts values to other types if specified. - * @param message Vindex + * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. + * @param message MessageStreamRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.Vindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.MessageStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Vindex to JSON. + * Converts this MessageStreamRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Table. */ - interface ITable { - - /** Table type */ - type?: (string|null); - - /** Table column_vindexes */ - column_vindexes?: (vschema.IColumnVindex[]|null); - - /** Table auto_increment */ - auto_increment?: (vschema.IAutoIncrement|null); - - /** Table columns */ - columns?: (vschema.IColumn[]|null); - - /** Table pinned */ - pinned?: (string|null); - - /** Table column_list_authoritative */ - column_list_authoritative?: (boolean|null); + /** Properties of a MessageStreamResponse. */ + interface IMessageStreamResponse { - /** Table source */ - source?: (string|null); + /** MessageStreamResponse result */ + result?: (query.IQueryResult|null); } - /** Represents a Table. */ - class Table implements ITable { + /** Represents a MessageStreamResponse. */ + class MessageStreamResponse implements IMessageStreamResponse { /** - * Constructs a new Table. + * Constructs a new MessageStreamResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.ITable); - - /** Table type. */ - public type: string; - - /** Table column_vindexes. */ - public column_vindexes: vschema.IColumnVindex[]; - - /** Table auto_increment. */ - public auto_increment?: (vschema.IAutoIncrement|null); - - /** Table columns. */ - public columns: vschema.IColumn[]; - - /** Table pinned. */ - public pinned: string; - - /** Table column_list_authoritative. */ - public column_list_authoritative: boolean; + constructor(properties?: query.IMessageStreamResponse); - /** Table source. */ - public source: string; + /** MessageStreamResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new Table instance using the specified properties. + * Creates a new MessageStreamResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Table instance + * @returns MessageStreamResponse instance */ - public static create(properties?: vschema.ITable): vschema.Table; + public static create(properties?: query.IMessageStreamResponse): query.MessageStreamResponse; /** - * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @param message Table message or plain object to encode + * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. + * @param message MessageStreamResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @param message Table message or plain object to encode + * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. + * @param message MessageStreamResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Table message from the specified reader or buffer. + * Decodes a MessageStreamResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Table + * @returns MessageStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Table; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamResponse; /** - * Decodes a Table message from the specified reader or buffer, length delimited. + * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Table + * @returns MessageStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Table; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamResponse; /** - * Verifies a Table message. + * Verifies a MessageStreamResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Table message from a plain object. Also converts values to their respective internal types. + * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Table + * @returns MessageStreamResponse */ - public static fromObject(object: { [k: string]: any }): vschema.Table; + public static fromObject(object: { [k: string]: any }): query.MessageStreamResponse; /** - * Creates a plain object from a Table message. Also converts values to other types if specified. - * @param message Table + * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. + * @param message MessageStreamResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.MessageStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Table to JSON. + * Converts this MessageStreamResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ColumnVindex. */ - interface IColumnVindex { + /** Properties of a MessageAckRequest. */ + interface IMessageAckRequest { - /** ColumnVindex column */ - column?: (string|null); + /** MessageAckRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ColumnVindex name */ + /** MessageAckRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** MessageAckRequest target */ + target?: (query.ITarget|null); + + /** MessageAckRequest name */ name?: (string|null); - /** ColumnVindex columns */ - columns?: (string[]|null); + /** MessageAckRequest ids */ + ids?: (query.IValue[]|null); } - /** Represents a ColumnVindex. */ - class ColumnVindex implements IColumnVindex { + /** Represents a MessageAckRequest. */ + class MessageAckRequest implements IMessageAckRequest { /** - * Constructs a new ColumnVindex. + * Constructs a new MessageAckRequest. * @param [properties] Properties to set */ - constructor(properties?: vschema.IColumnVindex); + constructor(properties?: query.IMessageAckRequest); - /** ColumnVindex column. */ - public column: string; + /** MessageAckRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** ColumnVindex name. */ + /** MessageAckRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** MessageAckRequest target. */ + public target?: (query.ITarget|null); + + /** MessageAckRequest name. */ public name: string; - /** ColumnVindex columns. */ - public columns: string[]; + /** MessageAckRequest ids. */ + public ids: query.IValue[]; /** - * Creates a new ColumnVindex instance using the specified properties. + * Creates a new MessageAckRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ColumnVindex instance + * @returns MessageAckRequest instance */ - public static create(properties?: vschema.IColumnVindex): vschema.ColumnVindex; + public static create(properties?: query.IMessageAckRequest): query.MessageAckRequest; /** - * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @param message ColumnVindex message or plain object to encode + * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. + * @param message MessageAckRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @param message ColumnVindex message or plain object to encode + * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. + * @param message MessageAckRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ColumnVindex message from the specified reader or buffer. + * Decodes a MessageAckRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ColumnVindex + * @returns MessageAckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ColumnVindex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckRequest; /** - * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. + * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ColumnVindex + * @returns MessageAckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ColumnVindex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckRequest; /** - * Verifies a ColumnVindex message. + * Verifies a MessageAckRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ColumnVindex + * @returns MessageAckRequest */ - public static fromObject(object: { [k: string]: any }): vschema.ColumnVindex; + public static fromObject(object: { [k: string]: any }): query.MessageAckRequest; /** - * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. - * @param message ColumnVindex + * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. + * @param message MessageAckRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.ColumnVindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.MessageAckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ColumnVindex to JSON. + * Converts this MessageAckRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AutoIncrement. */ - interface IAutoIncrement { - - /** AutoIncrement column */ - column?: (string|null); + /** Properties of a MessageAckResponse. */ + interface IMessageAckResponse { - /** AutoIncrement sequence */ - sequence?: (string|null); + /** MessageAckResponse result */ + result?: (query.IQueryResult|null); } - /** Represents an AutoIncrement. */ - class AutoIncrement implements IAutoIncrement { + /** Represents a MessageAckResponse. */ + class MessageAckResponse implements IMessageAckResponse { /** - * Constructs a new AutoIncrement. + * Constructs a new MessageAckResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.IAutoIncrement); - - /** AutoIncrement column. */ - public column: string; + constructor(properties?: query.IMessageAckResponse); - /** AutoIncrement sequence. */ - public sequence: string; + /** MessageAckResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new AutoIncrement instance using the specified properties. + * Creates a new MessageAckResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AutoIncrement instance + * @returns MessageAckResponse instance */ - public static create(properties?: vschema.IAutoIncrement): vschema.AutoIncrement; + public static create(properties?: query.IMessageAckResponse): query.MessageAckResponse; /** - * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @param message AutoIncrement message or plain object to encode + * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. + * @param message MessageAckResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @param message AutoIncrement message or plain object to encode + * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. + * @param message MessageAckResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AutoIncrement message from the specified reader or buffer. + * Decodes a MessageAckResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AutoIncrement + * @returns MessageAckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.AutoIncrement; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckResponse; /** - * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. + * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AutoIncrement + * @returns MessageAckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.AutoIncrement; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckResponse; /** - * Verifies an AutoIncrement message. + * Verifies a MessageAckResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AutoIncrement + * @returns MessageAckResponse */ - public static fromObject(object: { [k: string]: any }): vschema.AutoIncrement; + public static fromObject(object: { [k: string]: any }): query.MessageAckResponse; /** - * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. - * @param message AutoIncrement + * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. + * @param message MessageAckResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.AutoIncrement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.MessageAckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AutoIncrement to JSON. + * Converts this MessageAckResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Column. */ - interface IColumn { + /** Properties of a ReserveExecuteRequest. */ + interface IReserveExecuteRequest { - /** Column name */ - name?: (string|null); + /** ReserveExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** Column type */ - type?: (query.Type|null); + /** ReserveExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReserveExecuteRequest target */ + target?: (query.ITarget|null); + + /** ReserveExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** ReserveExecuteRequest transaction_id */ + transaction_id?: (number|Long|null); + + /** ReserveExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** ReserveExecuteRequest pre_queries */ + pre_queries?: (string[]|null); } - /** Represents a Column. */ - class Column implements IColumn { + /** Represents a ReserveExecuteRequest. */ + class ReserveExecuteRequest implements IReserveExecuteRequest { /** - * Constructs a new Column. + * Constructs a new ReserveExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: vschema.IColumn); + constructor(properties?: query.IReserveExecuteRequest); - /** Column name. */ - public name: string; + /** ReserveExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** Column type. */ - public type: query.Type; + /** ReserveExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReserveExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** ReserveExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** ReserveExecuteRequest transaction_id. */ + public transaction_id: (number|Long); + + /** ReserveExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** ReserveExecuteRequest pre_queries. */ + public pre_queries: string[]; /** - * Creates a new Column instance using the specified properties. + * Creates a new ReserveExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Column instance + * @returns ReserveExecuteRequest instance */ - public static create(properties?: vschema.IColumn): vschema.Column; + public static create(properties?: query.IReserveExecuteRequest): query.ReserveExecuteRequest; /** - * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @param message Column message or plain object to encode + * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. + * @param message ReserveExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @param message Column message or plain object to encode + * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. + * @param message ReserveExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Column message from the specified reader or buffer. + * Decodes a ReserveExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Column + * @returns ReserveExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Column; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteRequest; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Column + * @returns ReserveExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Column; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteRequest; /** - * Verifies a Column message. + * Verifies a ReserveExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Column + * @returns ReserveExecuteRequest */ - public static fromObject(object: { [k: string]: any }): vschema.Column; + public static fromObject(object: { [k: string]: any }): query.ReserveExecuteRequest; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @param message Column + * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. + * @param message ReserveExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Column to JSON. + * Converts this ReserveExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SrvVSchema. */ - interface ISrvVSchema { + /** Properties of a ReserveExecuteResponse. */ + interface IReserveExecuteResponse { - /** SrvVSchema keyspaces */ - keyspaces?: ({ [k: string]: vschema.IKeyspace }|null); + /** ReserveExecuteResponse error */ + error?: (vtrpc.IRPCError|null); - /** SrvVSchema routing_rules */ - routing_rules?: (vschema.IRoutingRules|null); + /** ReserveExecuteResponse result */ + result?: (query.IQueryResult|null); - /** SrvVSchema shard_routing_rules */ - shard_routing_rules?: (vschema.IShardRoutingRules|null); + /** ReserveExecuteResponse reserved_id */ + reserved_id?: (number|Long|null); + + /** ReserveExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a SrvVSchema. */ - class SrvVSchema implements ISrvVSchema { + /** Represents a ReserveExecuteResponse. */ + class ReserveExecuteResponse implements IReserveExecuteResponse { /** - * Constructs a new SrvVSchema. + * Constructs a new ReserveExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.ISrvVSchema); + constructor(properties?: query.IReserveExecuteResponse); - /** SrvVSchema keyspaces. */ - public keyspaces: { [k: string]: vschema.IKeyspace }; + /** ReserveExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); - /** SrvVSchema routing_rules. */ - public routing_rules?: (vschema.IRoutingRules|null); + /** ReserveExecuteResponse result. */ + public result?: (query.IQueryResult|null); - /** SrvVSchema shard_routing_rules. */ - public shard_routing_rules?: (vschema.IShardRoutingRules|null); + /** ReserveExecuteResponse reserved_id. */ + public reserved_id: (number|Long); + + /** ReserveExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new SrvVSchema instance using the specified properties. + * Creates a new ReserveExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SrvVSchema instance + * @returns ReserveExecuteResponse instance */ - public static create(properties?: vschema.ISrvVSchema): vschema.SrvVSchema; + public static create(properties?: query.IReserveExecuteResponse): query.ReserveExecuteResponse; /** - * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @param message SrvVSchema message or plain object to encode + * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. + * @param message ReserveExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @param message SrvVSchema message or plain object to encode + * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. + * @param message ReserveExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SrvVSchema message from the specified reader or buffer. + * Decodes a ReserveExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SrvVSchema + * @returns ReserveExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.SrvVSchema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteResponse; /** - * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. + * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SrvVSchema + * @returns ReserveExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.SrvVSchema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteResponse; /** - * Verifies a SrvVSchema message. + * Verifies a ReserveExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SrvVSchema + * @returns ReserveExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vschema.SrvVSchema; + public static fromObject(object: { [k: string]: any }): query.ReserveExecuteResponse; /** - * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. - * @param message SrvVSchema + * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. + * @param message ReserveExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.SrvVSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SrvVSchema to JSON. + * Converts this ReserveExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardRoutingRules. */ - interface IShardRoutingRules { + /** Properties of a ReserveStreamExecuteRequest. */ + interface IReserveStreamExecuteRequest { - /** ShardRoutingRules rules */ - rules?: (vschema.IShardRoutingRule[]|null); + /** ReserveStreamExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); + + /** ReserveStreamExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReserveStreamExecuteRequest target */ + target?: (query.ITarget|null); + + /** ReserveStreamExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** ReserveStreamExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** ReserveStreamExecuteRequest transaction_id */ + transaction_id?: (number|Long|null); + + /** ReserveStreamExecuteRequest pre_queries */ + pre_queries?: (string[]|null); } - /** Represents a ShardRoutingRules. */ - class ShardRoutingRules implements IShardRoutingRules { + /** Represents a ReserveStreamExecuteRequest. */ + class ReserveStreamExecuteRequest implements IReserveStreamExecuteRequest { /** - * Constructs a new ShardRoutingRules. + * Constructs a new ReserveStreamExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: vschema.IShardRoutingRules); + constructor(properties?: query.IReserveStreamExecuteRequest); - /** ShardRoutingRules rules. */ - public rules: vschema.IShardRoutingRule[]; + /** ReserveStreamExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** ReserveStreamExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReserveStreamExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** ReserveStreamExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** ReserveStreamExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** ReserveStreamExecuteRequest transaction_id. */ + public transaction_id: (number|Long); + + /** ReserveStreamExecuteRequest pre_queries. */ + public pre_queries: string[]; /** - * Creates a new ShardRoutingRules instance using the specified properties. + * Creates a new ReserveStreamExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ShardRoutingRules instance + * @returns ReserveStreamExecuteRequest instance */ - public static create(properties?: vschema.IShardRoutingRules): vschema.ShardRoutingRules; + public static create(properties?: query.IReserveStreamExecuteRequest): query.ReserveStreamExecuteRequest; /** - * Encodes the specified ShardRoutingRules message. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. - * @param message ShardRoutingRules message or plain object to encode + * Encodes the specified ReserveStreamExecuteRequest message. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. + * @param message ReserveStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IShardRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardRoutingRules message, length delimited. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. - * @param message ShardRoutingRules message or plain object to encode + * Encodes the specified ReserveStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. + * @param message ReserveStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IShardRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardRoutingRules message from the specified reader or buffer. + * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardRoutingRules + * @returns ReserveStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ShardRoutingRules; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveStreamExecuteRequest; /** - * Decodes a ShardRoutingRules message from the specified reader or buffer, length delimited. + * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardRoutingRules + * @returns ReserveStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ShardRoutingRules; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveStreamExecuteRequest; /** - * Verifies a ShardRoutingRules message. + * Verifies a ReserveStreamExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardRoutingRules message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardRoutingRules + * @returns ReserveStreamExecuteRequest */ - public static fromObject(object: { [k: string]: any }): vschema.ShardRoutingRules; + public static fromObject(object: { [k: string]: any }): query.ReserveStreamExecuteRequest; /** - * Creates a plain object from a ShardRoutingRules message. Also converts values to other types if specified. - * @param message ShardRoutingRules + * Creates a plain object from a ReserveStreamExecuteRequest message. Also converts values to other types if specified. + * @param message ReserveStreamExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.ShardRoutingRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardRoutingRules to JSON. + * Converts this ReserveStreamExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardRoutingRule. */ - interface IShardRoutingRule { + /** Properties of a ReserveStreamExecuteResponse. */ + interface IReserveStreamExecuteResponse { - /** ShardRoutingRule from_keyspace */ - from_keyspace?: (string|null); + /** ReserveStreamExecuteResponse error */ + error?: (vtrpc.IRPCError|null); - /** ShardRoutingRule to_keyspace */ - to_keyspace?: (string|null); + /** ReserveStreamExecuteResponse result */ + result?: (query.IQueryResult|null); - /** ShardRoutingRule shard */ - shard?: (string|null); + /** ReserveStreamExecuteResponse reserved_id */ + reserved_id?: (number|Long|null); + + /** ReserveStreamExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a ShardRoutingRule. */ - class ShardRoutingRule implements IShardRoutingRule { + /** Represents a ReserveStreamExecuteResponse. */ + class ReserveStreamExecuteResponse implements IReserveStreamExecuteResponse { /** - * Constructs a new ShardRoutingRule. + * Constructs a new ReserveStreamExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vschema.IShardRoutingRule); + constructor(properties?: query.IReserveStreamExecuteResponse); - /** ShardRoutingRule from_keyspace. */ - public from_keyspace: string; + /** ReserveStreamExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); - /** ShardRoutingRule to_keyspace. */ - public to_keyspace: string; + /** ReserveStreamExecuteResponse result. */ + public result?: (query.IQueryResult|null); - /** ShardRoutingRule shard. */ - public shard: string; + /** ReserveStreamExecuteResponse reserved_id. */ + public reserved_id: (number|Long); + + /** ReserveStreamExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new ShardRoutingRule instance using the specified properties. + * Creates a new ReserveStreamExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardRoutingRule instance + * @returns ReserveStreamExecuteResponse instance */ - public static create(properties?: vschema.IShardRoutingRule): vschema.ShardRoutingRule; + public static create(properties?: query.IReserveStreamExecuteResponse): query.ReserveStreamExecuteResponse; /** - * Encodes the specified ShardRoutingRule message. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. - * @param message ShardRoutingRule message or plain object to encode + * Encodes the specified ReserveStreamExecuteResponse message. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. + * @param message ReserveStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vschema.IShardRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardRoutingRule message, length delimited. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. - * @param message ShardRoutingRule message or plain object to encode + * Encodes the specified ReserveStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. + * @param message ReserveStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vschema.IShardRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardRoutingRule message from the specified reader or buffer. + * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardRoutingRule + * @returns ReserveStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ShardRoutingRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveStreamExecuteResponse; /** - * Decodes a ShardRoutingRule message from the specified reader or buffer, length delimited. + * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardRoutingRule + * @returns ReserveStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ShardRoutingRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveStreamExecuteResponse; /** - * Verifies a ShardRoutingRule message. + * Verifies a ReserveStreamExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardRoutingRule message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardRoutingRule + * @returns ReserveStreamExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vschema.ShardRoutingRule; + public static fromObject(object: { [k: string]: any }): query.ReserveStreamExecuteResponse; /** - * Creates a plain object from a ShardRoutingRule message. Also converts values to other types if specified. - * @param message ShardRoutingRule + * Creates a plain object from a ReserveStreamExecuteResponse message. Also converts values to other types if specified. + * @param message ReserveStreamExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vschema.ShardRoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardRoutingRule to JSON. + * Converts this ReserveStreamExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } -} -/** Namespace vtctldata. */ -export namespace vtctldata { + /** Properties of a ReserveBeginExecuteRequest. */ + interface IReserveBeginExecuteRequest { - /** Properties of an ExecuteVtctlCommandRequest. */ - interface IExecuteVtctlCommandRequest { + /** ReserveBeginExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** ExecuteVtctlCommandRequest args */ - args?: (string[]|null); + /** ReserveBeginExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** ExecuteVtctlCommandRequest action_timeout */ - action_timeout?: (number|Long|null); - } + /** ReserveBeginExecuteRequest target */ + target?: (query.ITarget|null); - /** Represents an ExecuteVtctlCommandRequest. */ - class ExecuteVtctlCommandRequest implements IExecuteVtctlCommandRequest { + /** ReserveBeginExecuteRequest query */ + query?: (query.IBoundQuery|null); - /** - * Constructs a new ExecuteVtctlCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IExecuteVtctlCommandRequest); + /** ReserveBeginExecuteRequest options */ + options?: (query.IExecuteOptions|null); - /** ExecuteVtctlCommandRequest args. */ - public args: string[]; + /** ReserveBeginExecuteRequest pre_queries */ + pre_queries?: (string[]|null); - /** ExecuteVtctlCommandRequest action_timeout. */ - public action_timeout: (number|Long); + /** ReserveBeginExecuteRequest post_begin_queries */ + post_begin_queries?: (string[]|null); + } + + /** Represents a ReserveBeginExecuteRequest. */ + class ReserveBeginExecuteRequest implements IReserveBeginExecuteRequest { /** - * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. + * Constructs a new ReserveBeginExecuteRequest. * @param [properties] Properties to set - * @returns ExecuteVtctlCommandRequest instance */ - public static create(properties?: vtctldata.IExecuteVtctlCommandRequest): vtctldata.ExecuteVtctlCommandRequest; + constructor(properties?: query.IReserveBeginExecuteRequest); - /** - * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @param message ExecuteVtctlCommandRequest message or plain object to encode + /** ReserveBeginExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); + + /** ReserveBeginExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReserveBeginExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** ReserveBeginExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** ReserveBeginExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** ReserveBeginExecuteRequest pre_queries. */ + public pre_queries: string[]; + + /** ReserveBeginExecuteRequest post_begin_queries. */ + public post_begin_queries: string[]; + + /** + * Creates a new ReserveBeginExecuteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReserveBeginExecuteRequest instance + */ + public static create(properties?: query.IReserveBeginExecuteRequest): query.ReserveBeginExecuteRequest; + + /** + * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. + * @param message ReserveBeginExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @param message ExecuteVtctlCommandRequest message or plain object to encode + * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. + * @param message ReserveBeginExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. + * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteVtctlCommandRequest + * @returns ReserveBeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteRequest; /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteVtctlCommandRequest + * @returns ReserveBeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteRequest; /** - * Verifies an ExecuteVtctlCommandRequest message. + * Verifies a ReserveBeginExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteVtctlCommandRequest + * @returns ReserveBeginExecuteRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandRequest; + public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteRequest; /** - * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. - * @param message ExecuteVtctlCommandRequest + * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. + * @param message ReserveBeginExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteVtctlCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveBeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteVtctlCommandRequest to JSON. + * Converts this ReserveBeginExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteVtctlCommandResponse. */ - interface IExecuteVtctlCommandResponse { + /** Properties of a ReserveBeginExecuteResponse. */ + interface IReserveBeginExecuteResponse { - /** ExecuteVtctlCommandResponse event */ - event?: (logutil.IEvent|null); + /** ReserveBeginExecuteResponse error */ + error?: (vtrpc.IRPCError|null); + + /** ReserveBeginExecuteResponse result */ + result?: (query.IQueryResult|null); + + /** ReserveBeginExecuteResponse transaction_id */ + transaction_id?: (number|Long|null); + + /** ReserveBeginExecuteResponse reserved_id */ + reserved_id?: (number|Long|null); + + /** ReserveBeginExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** ReserveBeginExecuteResponse session_state_changes */ + session_state_changes?: (string|null); } - /** Represents an ExecuteVtctlCommandResponse. */ - class ExecuteVtctlCommandResponse implements IExecuteVtctlCommandResponse { + /** Represents a ReserveBeginExecuteResponse. */ + class ReserveBeginExecuteResponse implements IReserveBeginExecuteResponse { /** - * Constructs a new ExecuteVtctlCommandResponse. + * Constructs a new ReserveBeginExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteVtctlCommandResponse); + constructor(properties?: query.IReserveBeginExecuteResponse); - /** ExecuteVtctlCommandResponse event. */ - public event?: (logutil.IEvent|null); + /** ReserveBeginExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); + + /** ReserveBeginExecuteResponse result. */ + public result?: (query.IQueryResult|null); + + /** ReserveBeginExecuteResponse transaction_id. */ + public transaction_id: (number|Long); + + /** ReserveBeginExecuteResponse reserved_id. */ + public reserved_id: (number|Long); + + /** ReserveBeginExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** ReserveBeginExecuteResponse session_state_changes. */ + public session_state_changes: string; /** - * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. + * Creates a new ReserveBeginExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteVtctlCommandResponse instance + * @returns ReserveBeginExecuteResponse instance */ - public static create(properties?: vtctldata.IExecuteVtctlCommandResponse): vtctldata.ExecuteVtctlCommandResponse; + public static create(properties?: query.IReserveBeginExecuteResponse): query.ReserveBeginExecuteResponse; /** - * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @param message ExecuteVtctlCommandResponse message or plain object to encode + * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. + * @param message ReserveBeginExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @param message ExecuteVtctlCommandResponse message or plain object to encode + * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. + * @param message ReserveBeginExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. + * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteVtctlCommandResponse + * @returns ReserveBeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteResponse; /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteVtctlCommandResponse + * @returns ReserveBeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteResponse; /** - * Verifies an ExecuteVtctlCommandResponse message. + * Verifies a ReserveBeginExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteVtctlCommandResponse + * @returns ReserveBeginExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandResponse; + public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteResponse; /** - * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. - * @param message ExecuteVtctlCommandResponse + * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. + * @param message ReserveBeginExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteVtctlCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveBeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteVtctlCommandResponse to JSON. + * Converts this ReserveBeginExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** MaterializationIntent enum. */ - enum MaterializationIntent { - CUSTOM = 0, - MOVETABLES = 1, - CREATELOOKUPINDEX = 2 - } + /** Properties of a ReserveBeginStreamExecuteRequest. */ + interface IReserveBeginStreamExecuteRequest { - /** Properties of a TableMaterializeSettings. */ - interface ITableMaterializeSettings { + /** ReserveBeginStreamExecuteRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** TableMaterializeSettings target_table */ - target_table?: (string|null); + /** ReserveBeginStreamExecuteRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); - /** TableMaterializeSettings source_expression */ - source_expression?: (string|null); + /** ReserveBeginStreamExecuteRequest target */ + target?: (query.ITarget|null); - /** TableMaterializeSettings create_ddl */ - create_ddl?: (string|null); + /** ReserveBeginStreamExecuteRequest query */ + query?: (query.IBoundQuery|null); + + /** ReserveBeginStreamExecuteRequest options */ + options?: (query.IExecuteOptions|null); + + /** ReserveBeginStreamExecuteRequest pre_queries */ + pre_queries?: (string[]|null); + + /** ReserveBeginStreamExecuteRequest post_begin_queries */ + post_begin_queries?: (string[]|null); } - /** Represents a TableMaterializeSettings. */ - class TableMaterializeSettings implements ITableMaterializeSettings { + /** Represents a ReserveBeginStreamExecuteRequest. */ + class ReserveBeginStreamExecuteRequest implements IReserveBeginStreamExecuteRequest { /** - * Constructs a new TableMaterializeSettings. + * Constructs a new ReserveBeginStreamExecuteRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ITableMaterializeSettings); + constructor(properties?: query.IReserveBeginStreamExecuteRequest); - /** TableMaterializeSettings target_table. */ - public target_table: string; + /** ReserveBeginStreamExecuteRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** TableMaterializeSettings source_expression. */ - public source_expression: string; + /** ReserveBeginStreamExecuteRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); - /** TableMaterializeSettings create_ddl. */ - public create_ddl: string; + /** ReserveBeginStreamExecuteRequest target. */ + public target?: (query.ITarget|null); + + /** ReserveBeginStreamExecuteRequest query. */ + public query?: (query.IBoundQuery|null); + + /** ReserveBeginStreamExecuteRequest options. */ + public options?: (query.IExecuteOptions|null); + + /** ReserveBeginStreamExecuteRequest pre_queries. */ + public pre_queries: string[]; + + /** ReserveBeginStreamExecuteRequest post_begin_queries. */ + public post_begin_queries: string[]; /** - * Creates a new TableMaterializeSettings instance using the specified properties. + * Creates a new ReserveBeginStreamExecuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TableMaterializeSettings instance + * @returns ReserveBeginStreamExecuteRequest instance */ - public static create(properties?: vtctldata.ITableMaterializeSettings): vtctldata.TableMaterializeSettings; + public static create(properties?: query.IReserveBeginStreamExecuteRequest): query.ReserveBeginStreamExecuteRequest; /** - * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @param message TableMaterializeSettings message or plain object to encode + * Encodes the specified ReserveBeginStreamExecuteRequest message. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. + * @param message ReserveBeginStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @param message TableMaterializeSettings message or plain object to encode + * Encodes the specified ReserveBeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. + * @param message ReserveBeginStreamExecuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveBeginStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer. + * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TableMaterializeSettings + * @returns ReserveBeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TableMaterializeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginStreamExecuteRequest; /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TableMaterializeSettings + * @returns ReserveBeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TableMaterializeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginStreamExecuteRequest; /** - * Verifies a TableMaterializeSettings message. + * Verifies a ReserveBeginStreamExecuteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TableMaterializeSettings + * @returns ReserveBeginStreamExecuteRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.TableMaterializeSettings; + public static fromObject(object: { [k: string]: any }): query.ReserveBeginStreamExecuteRequest; /** - * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. - * @param message TableMaterializeSettings + * Creates a plain object from a ReserveBeginStreamExecuteRequest message. Also converts values to other types if specified. + * @param message ReserveBeginStreamExecuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.TableMaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveBeginStreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TableMaterializeSettings to JSON. + * Converts this ReserveBeginStreamExecuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MaterializeSettings. */ - interface IMaterializeSettings { - - /** MaterializeSettings workflow */ - workflow?: (string|null); - - /** MaterializeSettings source_keyspace */ - source_keyspace?: (string|null); - - /** MaterializeSettings target_keyspace */ - target_keyspace?: (string|null); - - /** MaterializeSettings stop_after_copy */ - stop_after_copy?: (boolean|null); - - /** MaterializeSettings table_settings */ - table_settings?: (vtctldata.ITableMaterializeSettings[]|null); - - /** MaterializeSettings cell */ - cell?: (string|null); - - /** MaterializeSettings tablet_types */ - tablet_types?: (string|null); - - /** MaterializeSettings external_cluster */ - external_cluster?: (string|null); + /** Properties of a ReserveBeginStreamExecuteResponse. */ + interface IReserveBeginStreamExecuteResponse { - /** MaterializeSettings materialization_intent */ - materialization_intent?: (vtctldata.MaterializationIntent|null); + /** ReserveBeginStreamExecuteResponse error */ + error?: (vtrpc.IRPCError|null); - /** MaterializeSettings source_time_zone */ - source_time_zone?: (string|null); + /** ReserveBeginStreamExecuteResponse result */ + result?: (query.IQueryResult|null); - /** MaterializeSettings target_time_zone */ - target_time_zone?: (string|null); + /** ReserveBeginStreamExecuteResponse transaction_id */ + transaction_id?: (number|Long|null); - /** MaterializeSettings source_shards */ - source_shards?: (string[]|null); + /** ReserveBeginStreamExecuteResponse reserved_id */ + reserved_id?: (number|Long|null); - /** MaterializeSettings on_ddl */ - on_ddl?: (string|null); + /** ReserveBeginStreamExecuteResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); - /** MaterializeSettings defer_secondary_keys */ - defer_secondary_keys?: (boolean|null); + /** ReserveBeginStreamExecuteResponse session_state_changes */ + session_state_changes?: (string|null); } - /** Represents a MaterializeSettings. */ - class MaterializeSettings implements IMaterializeSettings { + /** Represents a ReserveBeginStreamExecuteResponse. */ + class ReserveBeginStreamExecuteResponse implements IReserveBeginStreamExecuteResponse { /** - * Constructs a new MaterializeSettings. + * Constructs a new ReserveBeginStreamExecuteResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IMaterializeSettings); - - /** MaterializeSettings workflow. */ - public workflow: string; - - /** MaterializeSettings source_keyspace. */ - public source_keyspace: string; - - /** MaterializeSettings target_keyspace. */ - public target_keyspace: string; - - /** MaterializeSettings stop_after_copy. */ - public stop_after_copy: boolean; - - /** MaterializeSettings table_settings. */ - public table_settings: vtctldata.ITableMaterializeSettings[]; - - /** MaterializeSettings cell. */ - public cell: string; - - /** MaterializeSettings tablet_types. */ - public tablet_types: string; - - /** MaterializeSettings external_cluster. */ - public external_cluster: string; + constructor(properties?: query.IReserveBeginStreamExecuteResponse); - /** MaterializeSettings materialization_intent. */ - public materialization_intent: vtctldata.MaterializationIntent; + /** ReserveBeginStreamExecuteResponse error. */ + public error?: (vtrpc.IRPCError|null); - /** MaterializeSettings source_time_zone. */ - public source_time_zone: string; + /** ReserveBeginStreamExecuteResponse result. */ + public result?: (query.IQueryResult|null); - /** MaterializeSettings target_time_zone. */ - public target_time_zone: string; + /** ReserveBeginStreamExecuteResponse transaction_id. */ + public transaction_id: (number|Long); - /** MaterializeSettings source_shards. */ - public source_shards: string[]; + /** ReserveBeginStreamExecuteResponse reserved_id. */ + public reserved_id: (number|Long); - /** MaterializeSettings on_ddl. */ - public on_ddl: string; + /** ReserveBeginStreamExecuteResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** MaterializeSettings defer_secondary_keys. */ - public defer_secondary_keys: boolean; + /** ReserveBeginStreamExecuteResponse session_state_changes. */ + public session_state_changes: string; /** - * Creates a new MaterializeSettings instance using the specified properties. + * Creates a new ReserveBeginStreamExecuteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MaterializeSettings instance + * @returns ReserveBeginStreamExecuteResponse instance */ - public static create(properties?: vtctldata.IMaterializeSettings): vtctldata.MaterializeSettings; + public static create(properties?: query.IReserveBeginStreamExecuteResponse): query.ReserveBeginStreamExecuteResponse; /** - * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @param message MaterializeSettings message or plain object to encode + * Encodes the specified ReserveBeginStreamExecuteResponse message. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. + * @param message ReserveBeginStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReserveBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @param message MaterializeSettings message or plain object to encode + * Encodes the specified ReserveBeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. + * @param message ReserveBeginStreamExecuteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReserveBeginStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MaterializeSettings message from the specified reader or buffer. + * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MaterializeSettings + * @returns ReserveBeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.MaterializeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginStreamExecuteResponse; /** - * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MaterializeSettings + * @returns ReserveBeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.MaterializeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginStreamExecuteResponse; /** - * Verifies a MaterializeSettings message. + * Verifies a ReserveBeginStreamExecuteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MaterializeSettings + * @returns ReserveBeginStreamExecuteResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.MaterializeSettings; + public static fromObject(object: { [k: string]: any }): query.ReserveBeginStreamExecuteResponse; /** - * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. - * @param message MaterializeSettings + * Creates a plain object from a ReserveBeginStreamExecuteResponse message. Also converts values to other types if specified. + * @param message ReserveBeginStreamExecuteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.MaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReserveBeginStreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MaterializeSettings to JSON. + * Converts this ReserveBeginStreamExecuteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Keyspace. */ - interface IKeyspace { + /** Properties of a ReleaseRequest. */ + interface IReleaseRequest { - /** Keyspace name */ - name?: (string|null); + /** ReleaseRequest effective_caller_id */ + effective_caller_id?: (vtrpc.ICallerID|null); - /** Keyspace keyspace */ - keyspace?: (topodata.IKeyspace|null); + /** ReleaseRequest immediate_caller_id */ + immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReleaseRequest target */ + target?: (query.ITarget|null); + + /** ReleaseRequest transaction_id */ + transaction_id?: (number|Long|null); + + /** ReleaseRequest reserved_id */ + reserved_id?: (number|Long|null); } - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { + /** Represents a ReleaseRequest. */ + class ReleaseRequest implements IReleaseRequest { /** - * Constructs a new Keyspace. + * Constructs a new ReleaseRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IKeyspace); + constructor(properties?: query.IReleaseRequest); - /** Keyspace name. */ - public name: string; + /** ReleaseRequest effective_caller_id. */ + public effective_caller_id?: (vtrpc.ICallerID|null); - /** Keyspace keyspace. */ - public keyspace?: (topodata.IKeyspace|null); + /** ReleaseRequest immediate_caller_id. */ + public immediate_caller_id?: (query.IVTGateCallerID|null); + + /** ReleaseRequest target. */ + public target?: (query.ITarget|null); + + /** ReleaseRequest transaction_id. */ + public transaction_id: (number|Long); + + /** ReleaseRequest reserved_id. */ + public reserved_id: (number|Long); /** - * Creates a new Keyspace instance using the specified properties. + * Creates a new ReleaseRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Keyspace instance + * @returns ReleaseRequest instance */ - public static create(properties?: vtctldata.IKeyspace): vtctldata.Keyspace; + public static create(properties?: query.IReleaseRequest): query.ReleaseRequest; /** - * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode + * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. + * @param message ReleaseRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode + * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. + * @param message ReleaseRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a ReleaseRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Keyspace + * @returns ReleaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Keyspace; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseRequest; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Keyspace + * @returns ReleaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Keyspace; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseRequest; /** - * Verifies a Keyspace message. + * Verifies a ReleaseRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. + * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Keyspace + * @returns ReleaseRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.Keyspace; + public static fromObject(object: { [k: string]: any }): query.ReleaseRequest; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace + * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. + * @param message ReleaseRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.ReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Keyspace to JSON. + * Converts this ReleaseRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Shard. */ - interface IShard { + /** Properties of a ReleaseResponse. */ + interface IReleaseResponse { + } - /** Shard keyspace */ - keyspace?: (string|null); + /** Represents a ReleaseResponse. */ + class ReleaseResponse implements IReleaseResponse { - /** Shard name */ - name?: (string|null); + /** + * Constructs a new ReleaseResponse. + * @param [properties] Properties to set + */ + constructor(properties?: query.IReleaseResponse); - /** Shard shard */ - shard?: (topodata.IShard|null); - } + /** + * Creates a new ReleaseResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseResponse instance + */ + public static create(properties?: query.IReleaseResponse): query.ReleaseResponse; - /** Represents a Shard. */ - class Shard implements IShard { + /** + * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * @param message ReleaseResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new Shard. - * @param [properties] Properties to set + * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * @param message ReleaseResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - constructor(properties?: vtctldata.IShard); + public static encodeDelimited(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Shard keyspace. */ - public keyspace: string; + /** + * Decodes a ReleaseResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseResponse; - /** Shard name. */ - public name: string; + /** + * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseResponse; - /** Shard shard. */ - public shard?: (topodata.IShard|null); + /** + * Verifies a ReleaseResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a new Shard instance using the specified properties. + * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseResponse + */ + public static fromObject(object: { [k: string]: any }): query.ReleaseResponse; + + /** + * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. + * @param message ReleaseResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.ReleaseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StreamHealthRequest. */ + interface IStreamHealthRequest { + } + + /** Represents a StreamHealthRequest. */ + class StreamHealthRequest implements IStreamHealthRequest { + + /** + * Constructs a new StreamHealthRequest. * @param [properties] Properties to set - * @returns Shard instance */ - public static create(properties?: vtctldata.IShard): vtctldata.Shard; + constructor(properties?: query.IStreamHealthRequest); /** - * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode + * Creates a new StreamHealthRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamHealthRequest instance + */ + public static create(properties?: query.IStreamHealthRequest): query.StreamHealthRequest; + + /** + * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. + * @param message StreamHealthRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode + * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. + * @param message StreamHealthRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Shard message from the specified reader or buffer. + * Decodes a StreamHealthRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Shard + * @returns StreamHealthRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Shard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthRequest; /** - * Decodes a Shard message from the specified reader or buffer, length delimited. + * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Shard + * @returns StreamHealthRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Shard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthRequest; /** - * Verifies a Shard message. + * Verifies a StreamHealthRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. + * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Shard + * @returns StreamHealthRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.Shard; + public static fromObject(object: { [k: string]: any }): query.StreamHealthRequest; /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @param message Shard + * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. + * @param message StreamHealthRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.Shard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.StreamHealthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Shard to JSON. + * Converts this StreamHealthRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Workflow. */ - interface IWorkflow { + /** Properties of a RealtimeStats. */ + interface IRealtimeStats { - /** Workflow name */ - name?: (string|null); + /** RealtimeStats health_error */ + health_error?: (string|null); - /** Workflow source */ - source?: (vtctldata.Workflow.IReplicationLocation|null); + /** RealtimeStats replication_lag_seconds */ + replication_lag_seconds?: (number|null); - /** Workflow target */ - target?: (vtctldata.Workflow.IReplicationLocation|null); + /** RealtimeStats binlog_players_count */ + binlog_players_count?: (number|null); - /** Workflow max_v_replication_lag */ - max_v_replication_lag?: (number|Long|null); + /** RealtimeStats filtered_replication_lag_seconds */ + filtered_replication_lag_seconds?: (number|Long|null); - /** Workflow shard_streams */ - shard_streams?: ({ [k: string]: vtctldata.Workflow.IShardStream }|null); + /** RealtimeStats cpu_usage */ + cpu_usage?: (number|null); - /** Workflow workflow_type */ - workflow_type?: (string|null); + /** RealtimeStats qps */ + qps?: (number|null); - /** Workflow workflow_sub_type */ - workflow_sub_type?: (string|null); + /** RealtimeStats table_schema_changed */ + table_schema_changed?: (string[]|null); + + /** RealtimeStats view_schema_changed */ + view_schema_changed?: (string[]|null); } - /** Represents a Workflow. */ - class Workflow implements IWorkflow { + /** Represents a RealtimeStats. */ + class RealtimeStats implements IRealtimeStats { /** - * Constructs a new Workflow. + * Constructs a new RealtimeStats. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IWorkflow); + constructor(properties?: query.IRealtimeStats); - /** Workflow name. */ - public name: string; + /** RealtimeStats health_error. */ + public health_error: string; - /** Workflow source. */ - public source?: (vtctldata.Workflow.IReplicationLocation|null); + /** RealtimeStats replication_lag_seconds. */ + public replication_lag_seconds: number; - /** Workflow target. */ - public target?: (vtctldata.Workflow.IReplicationLocation|null); + /** RealtimeStats binlog_players_count. */ + public binlog_players_count: number; - /** Workflow max_v_replication_lag. */ - public max_v_replication_lag: (number|Long); + /** RealtimeStats filtered_replication_lag_seconds. */ + public filtered_replication_lag_seconds: (number|Long); - /** Workflow shard_streams. */ - public shard_streams: { [k: string]: vtctldata.Workflow.IShardStream }; + /** RealtimeStats cpu_usage. */ + public cpu_usage: number; - /** Workflow workflow_type. */ - public workflow_type: string; + /** RealtimeStats qps. */ + public qps: number; - /** Workflow workflow_sub_type. */ - public workflow_sub_type: string; + /** RealtimeStats table_schema_changed. */ + public table_schema_changed: string[]; + + /** RealtimeStats view_schema_changed. */ + public view_schema_changed: string[]; /** - * Creates a new Workflow instance using the specified properties. + * Creates a new RealtimeStats instance using the specified properties. * @param [properties] Properties to set - * @returns Workflow instance + * @returns RealtimeStats instance */ - public static create(properties?: vtctldata.IWorkflow): vtctldata.Workflow; + public static create(properties?: query.IRealtimeStats): query.RealtimeStats; /** - * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @param message Workflow message or plain object to encode + * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. + * @param message RealtimeStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @param message Workflow message or plain object to encode + * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. + * @param message RealtimeStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Workflow message from the specified reader or buffer. + * Decodes a RealtimeStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Workflow + * @returns RealtimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RealtimeStats; /** - * Decodes a Workflow message from the specified reader or buffer, length delimited. + * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Workflow + * @returns RealtimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RealtimeStats; /** - * Verifies a Workflow message. + * Verifies a RealtimeStats message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Workflow message from a plain object. Also converts values to their respective internal types. + * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Workflow + * @returns RealtimeStats */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow; + public static fromObject(object: { [k: string]: any }): query.RealtimeStats; /** - * Creates a plain object from a Workflow message. Also converts values to other types if specified. - * @param message Workflow + * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. + * @param message RealtimeStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.Workflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: query.RealtimeStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Workflow to JSON. + * Converts this RealtimeStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Workflow { - - /** Properties of a ReplicationLocation. */ - interface IReplicationLocation { + /** Properties of an AggregateStats. */ + interface IAggregateStats { - /** ReplicationLocation keyspace */ - keyspace?: (string|null); + /** AggregateStats healthy_tablet_count */ + healthy_tablet_count?: (number|null); - /** ReplicationLocation shards */ - shards?: (string[]|null); - } + /** AggregateStats unhealthy_tablet_count */ + unhealthy_tablet_count?: (number|null); - /** Represents a ReplicationLocation. */ - class ReplicationLocation implements IReplicationLocation { + /** AggregateStats replication_lag_seconds_min */ + replication_lag_seconds_min?: (number|null); - /** - * Constructs a new ReplicationLocation. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IReplicationLocation); + /** AggregateStats replication_lag_seconds_max */ + replication_lag_seconds_max?: (number|null); + } - /** ReplicationLocation keyspace. */ - public keyspace: string; + /** Represents an AggregateStats. */ + class AggregateStats implements IAggregateStats { - /** ReplicationLocation shards. */ - public shards: string[]; + /** + * Constructs a new AggregateStats. + * @param [properties] Properties to set + */ + constructor(properties?: query.IAggregateStats); - /** - * Creates a new ReplicationLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicationLocation instance - */ - public static create(properties?: vtctldata.Workflow.IReplicationLocation): vtctldata.Workflow.ReplicationLocation; + /** AggregateStats healthy_tablet_count. */ + public healthy_tablet_count: number; - /** - * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @param message ReplicationLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** AggregateStats unhealthy_tablet_count. */ + public unhealthy_tablet_count: number; - /** - * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @param message ReplicationLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** AggregateStats replication_lag_seconds_min. */ + public replication_lag_seconds_min: number; - /** - * Decodes a ReplicationLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ReplicationLocation; + /** AggregateStats replication_lag_seconds_max. */ + public replication_lag_seconds_max: number; - /** - * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ReplicationLocation; + /** + * Creates a new AggregateStats instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregateStats instance + */ + public static create(properties?: query.IAggregateStats): query.AggregateStats; - /** - * Verifies a ReplicationLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * @param message AggregateStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicationLocation - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ReplicationLocation; + /** + * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * @param message AggregateStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. - * @param message ReplicationLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.ReplicationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an AggregateStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.AggregateStats; - /** - * Converts this ReplicationLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an AggregateStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.AggregateStats; - /** Properties of a ShardStream. */ - interface IShardStream { + /** + * Verifies an AggregateStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ShardStream streams */ - streams?: (vtctldata.Workflow.IStream[]|null); + /** + * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregateStats + */ + public static fromObject(object: { [k: string]: any }): query.AggregateStats; - /** ShardStream tablet_controls */ - tablet_controls?: (topodata.Shard.ITabletControl[]|null); + /** + * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. + * @param message AggregateStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.AggregateStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ShardStream is_primary_serving */ - is_primary_serving?: (boolean|null); - } + /** + * Converts this AggregateStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ShardStream. */ - class ShardStream implements IShardStream { + /** Properties of a StreamHealthResponse. */ + interface IStreamHealthResponse { - /** - * Constructs a new ShardStream. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IShardStream); + /** StreamHealthResponse target */ + target?: (query.ITarget|null); - /** ShardStream streams. */ - public streams: vtctldata.Workflow.IStream[]; + /** StreamHealthResponse serving */ + serving?: (boolean|null); - /** ShardStream tablet_controls. */ - public tablet_controls: topodata.Shard.ITabletControl[]; + /** StreamHealthResponse tablet_externally_reparented_timestamp */ + tablet_externally_reparented_timestamp?: (number|Long|null); - /** ShardStream is_primary_serving. */ - public is_primary_serving: boolean; + /** StreamHealthResponse realtime_stats */ + realtime_stats?: (query.IRealtimeStats|null); - /** - * Creates a new ShardStream instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardStream instance - */ - public static create(properties?: vtctldata.Workflow.IShardStream): vtctldata.Workflow.ShardStream; + /** StreamHealthResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + } - /** - * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @param message ShardStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a StreamHealthResponse. */ + class StreamHealthResponse implements IStreamHealthResponse { - /** - * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @param message ShardStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new StreamHealthResponse. + * @param [properties] Properties to set + */ + constructor(properties?: query.IStreamHealthResponse); - /** - * Decodes a ShardStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ShardStream; + /** StreamHealthResponse target. */ + public target?: (query.ITarget|null); - /** - * Decodes a ShardStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ShardStream; + /** StreamHealthResponse serving. */ + public serving: boolean; - /** - * Verifies a ShardStream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** StreamHealthResponse tablet_externally_reparented_timestamp. */ + public tablet_externally_reparented_timestamp: (number|Long); - /** - * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardStream - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ShardStream; + /** StreamHealthResponse realtime_stats. */ + public realtime_stats?: (query.IRealtimeStats|null); - /** - * Creates a plain object from a ShardStream message. Also converts values to other types if specified. - * @param message ShardStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.ShardStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** StreamHealthResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** - * Converts this ShardStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new StreamHealthResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamHealthResponse instance + */ + public static create(properties?: query.IStreamHealthResponse): query.StreamHealthResponse; - /** Properties of a Stream. */ - interface IStream { + /** + * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * @param message StreamHealthResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Stream id */ - id?: (number|Long|null); + /** + * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * @param message StreamHealthResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Stream shard */ - shard?: (string|null); + /** + * Decodes a StreamHealthResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamHealthResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthResponse; - /** Stream tablet */ - tablet?: (topodata.ITabletAlias|null); + /** + * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamHealthResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthResponse; - /** Stream binlog_source */ - binlog_source?: (binlogdata.IBinlogSource|null); + /** + * Verifies a StreamHealthResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Stream position */ - position?: (string|null); + /** + * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamHealthResponse + */ + public static fromObject(object: { [k: string]: any }): query.StreamHealthResponse; - /** Stream stop_position */ - stop_position?: (string|null); + /** + * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. + * @param message StreamHealthResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.StreamHealthResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Stream state */ - state?: (string|null); + /** + * Converts this StreamHealthResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Stream db_name */ - db_name?: (string|null); + /** TransactionState enum. */ + enum TransactionState { + UNKNOWN = 0, + PREPARE = 1, + COMMIT = 2, + ROLLBACK = 3 + } - /** Stream transaction_timestamp */ - transaction_timestamp?: (vttime.ITime|null); + /** Properties of a TransactionMetadata. */ + interface ITransactionMetadata { - /** Stream time_updated */ - time_updated?: (vttime.ITime|null); + /** TransactionMetadata dtid */ + dtid?: (string|null); - /** Stream message */ - message?: (string|null); + /** TransactionMetadata state */ + state?: (query.TransactionState|null); - /** Stream copy_states */ - copy_states?: (vtctldata.Workflow.Stream.ICopyState[]|null); + /** TransactionMetadata time_created */ + time_created?: (number|Long|null); - /** Stream logs */ - logs?: (vtctldata.Workflow.Stream.ILog[]|null); + /** TransactionMetadata participants */ + participants?: (query.ITarget[]|null); + } - /** Stream log_fetch_error */ - log_fetch_error?: (string|null); + /** Represents a TransactionMetadata. */ + class TransactionMetadata implements ITransactionMetadata { - /** Stream tags */ - tags?: (string[]|null); - } + /** + * Constructs a new TransactionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: query.ITransactionMetadata); - /** Represents a Stream. */ - class Stream implements IStream { + /** TransactionMetadata dtid. */ + public dtid: string; - /** - * Constructs a new Stream. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IStream); + /** TransactionMetadata state. */ + public state: query.TransactionState; - /** Stream id. */ - public id: (number|Long); + /** TransactionMetadata time_created. */ + public time_created: (number|Long); - /** Stream shard. */ - public shard: string; + /** TransactionMetadata participants. */ + public participants: query.ITarget[]; - /** Stream tablet. */ - public tablet?: (topodata.ITabletAlias|null); + /** + * Creates a new TransactionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TransactionMetadata instance + */ + public static create(properties?: query.ITransactionMetadata): query.TransactionMetadata; - /** Stream binlog_source. */ - public binlog_source?: (binlogdata.IBinlogSource|null); + /** + * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * @param message TransactionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** Stream position. */ - public position: string; + /** + * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * @param message TransactionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** Stream stop_position. */ - public stop_position: string; + /** + * Decodes a TransactionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransactionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.TransactionMetadata; - /** Stream state. */ - public state: string; + /** + * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransactionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.TransactionMetadata; - /** Stream db_name. */ - public db_name: string; + /** + * Verifies a TransactionMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Stream transaction_timestamp. */ - public transaction_timestamp?: (vttime.ITime|null); + /** + * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransactionMetadata + */ + public static fromObject(object: { [k: string]: any }): query.TransactionMetadata; - /** Stream time_updated. */ - public time_updated?: (vttime.ITime|null); + /** + * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. + * @param message TransactionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.TransactionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Stream message. */ - public message: string; + /** + * Converts this TransactionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Stream copy_states. */ - public copy_states: vtctldata.Workflow.Stream.ICopyState[]; + /** SchemaTableType enum. */ + enum SchemaTableType { + VIEWS = 0, + TABLES = 1, + ALL = 2 + } - /** Stream logs. */ - public logs: vtctldata.Workflow.Stream.ILog[]; + /** Properties of a GetSchemaRequest. */ + interface IGetSchemaRequest { - /** Stream log_fetch_error. */ - public log_fetch_error: string; + /** GetSchemaRequest target */ + target?: (query.ITarget|null); - /** Stream tags. */ - public tags: string[]; + /** GetSchemaRequest table_type */ + table_type?: (query.SchemaTableType|null); - /** - * Creates a new Stream instance using the specified properties. - * @param [properties] Properties to set - * @returns Stream instance - */ - public static create(properties?: vtctldata.Workflow.IStream): vtctldata.Workflow.Stream; + /** GetSchemaRequest table_names */ + table_names?: (string[]|null); + } - /** - * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a GetSchemaRequest. */ + class GetSchemaRequest implements IGetSchemaRequest { - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GetSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: query.IGetSchemaRequest); - /** - * Decodes a Stream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream; + /** GetSchemaRequest target. */ + public target?: (query.ITarget|null); - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream; + /** GetSchemaRequest table_type. */ + public table_type: query.SchemaTableType; - /** - * Verifies a Stream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** GetSchemaRequest table_names. */ + public table_names: string[]; - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stream - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream; + /** + * Creates a new GetSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaRequest instance + */ + public static create(properties?: query.IGetSchemaRequest): query.GetSchemaRequest; - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @param message Stream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Stream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - namespace Stream { + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.GetSchemaRequest; - /** Properties of a CopyState. */ - interface ICopyState { + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.GetSchemaRequest; - /** CopyState table */ - table?: (string|null); + /** + * Verifies a GetSchemaRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CopyState last_pk */ - last_pk?: (string|null); - } + /** + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): query.GetSchemaRequest; - /** Represents a CopyState. */ - class CopyState implements ICopyState { + /** + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @param message GetSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new CopyState. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.Stream.ICopyState); + /** + * Converts this GetSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CopyState table. */ - public table: string; + /** Properties of a GetSchemaResponse. */ + interface IGetSchemaResponse { - /** CopyState last_pk. */ - public last_pk: string; + /** GetSchemaResponse table_definition */ + table_definition?: ({ [k: string]: string }|null); + } - /** - * Creates a new CopyState instance using the specified properties. - * @param [properties] Properties to set - * @returns CopyState instance - */ - public static create(properties?: vtctldata.Workflow.Stream.ICopyState): vtctldata.Workflow.Stream.CopyState; + /** Represents a GetSchemaResponse. */ + class GetSchemaResponse implements IGetSchemaResponse { - /** - * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @param message CopyState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GetSchemaResponse. + * @param [properties] Properties to set + */ + constructor(properties?: query.IGetSchemaResponse); - /** - * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @param message CopyState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; + /** GetSchemaResponse table_definition. */ + public table_definition: { [k: string]: string }; - /** - * Decodes a CopyState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream.CopyState; + /** + * Creates a new GetSchemaResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaResponse instance + */ + public static create(properties?: query.IGetSchemaResponse): query.GetSchemaResponse; - /** - * Decodes a CopyState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream.CopyState; + /** + * Encodes the specified GetSchemaResponse message. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. + * @param message GetSchemaResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: query.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CopyState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. + * @param message GetSchemaResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: query.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a CopyState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CopyState - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream.CopyState; + /** + * Decodes a GetSchemaResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.GetSchemaResponse; - /** - * Creates a plain object from a CopyState message. Also converts values to other types if specified. - * @param message CopyState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.Stream.CopyState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.GetSchemaResponse; - /** - * Converts this CopyState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a GetSchemaResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a Log. */ - interface ILog { + /** + * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaResponse + */ + public static fromObject(object: { [k: string]: any }): query.GetSchemaResponse; - /** Log id */ - id?: (number|Long|null); + /** + * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. + * @param message GetSchemaResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: query.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Log stream_id */ - stream_id?: (number|Long|null); + /** + * Converts this GetSchemaResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } +} - /** Log type */ - type?: (string|null); +/** Namespace replicationdata. */ +export namespace replicationdata { - /** Log state */ - state?: (string|null); + /** Properties of a Status. */ + interface IStatus { - /** Log created_at */ - created_at?: (vttime.ITime|null); + /** Status position */ + position?: (string|null); - /** Log updated_at */ - updated_at?: (vttime.ITime|null); + /** Status replication_lag_seconds */ + replication_lag_seconds?: (number|null); - /** Log message */ - message?: (string|null); + /** Status source_host */ + source_host?: (string|null); - /** Log count */ - count?: (number|Long|null); - } + /** Status source_port */ + source_port?: (number|null); - /** Represents a Log. */ - class Log implements ILog { + /** Status connect_retry */ + connect_retry?: (number|null); - /** - * Constructs a new Log. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.Stream.ILog); + /** Status relay_log_position */ + relay_log_position?: (string|null); - /** Log id. */ - public id: (number|Long); + /** Status file_position */ + file_position?: (string|null); - /** Log stream_id. */ - public stream_id: (number|Long); + /** Status relay_log_source_binlog_equivalent_position */ + relay_log_source_binlog_equivalent_position?: (string|null); - /** Log type. */ - public type: string; + /** Status source_server_id */ + source_server_id?: (number|null); - /** Log state. */ - public state: string; + /** Status source_uuid */ + source_uuid?: (string|null); - /** Log created_at. */ - public created_at?: (vttime.ITime|null); + /** Status io_state */ + io_state?: (number|null); - /** Log updated_at. */ - public updated_at?: (vttime.ITime|null); + /** Status last_io_error */ + last_io_error?: (string|null); - /** Log message. */ - public message: string; + /** Status sql_state */ + sql_state?: (number|null); - /** Log count. */ - public count: (number|Long); + /** Status last_sql_error */ + last_sql_error?: (string|null); - /** - * Creates a new Log instance using the specified properties. - * @param [properties] Properties to set - * @returns Log instance - */ - public static create(properties?: vtctldata.Workflow.Stream.ILog): vtctldata.Workflow.Stream.Log; + /** Status relay_log_file_position */ + relay_log_file_position?: (string|null); - /** - * Encodes the specified Log message. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. - * @param message Log message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.Stream.ILog, writer?: $protobuf.Writer): $protobuf.Writer; + /** Status source_user */ + source_user?: (string|null); - /** - * Encodes the specified Log message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. - * @param message Log message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.Stream.ILog, writer?: $protobuf.Writer): $protobuf.Writer; + /** Status sql_delay */ + sql_delay?: (number|null); + + /** Status auto_position */ + auto_position?: (boolean|null); + + /** Status using_gtid */ + using_gtid?: (boolean|null); + + /** Status has_replication_filters */ + has_replication_filters?: (boolean|null); + + /** Status ssl_allowed */ + ssl_allowed?: (boolean|null); + + /** Status replication_lag_unknown */ + replication_lag_unknown?: (boolean|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: replicationdata.IStatus); + + /** Status position. */ + public position: string; + + /** Status replication_lag_seconds. */ + public replication_lag_seconds: number; + + /** Status source_host. */ + public source_host: string; + + /** Status source_port. */ + public source_port: number; + + /** Status connect_retry. */ + public connect_retry: number; + + /** Status relay_log_position. */ + public relay_log_position: string; + + /** Status file_position. */ + public file_position: string; + + /** Status relay_log_source_binlog_equivalent_position. */ + public relay_log_source_binlog_equivalent_position: string; + + /** Status source_server_id. */ + public source_server_id: number; - /** - * Decodes a Log message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Log - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream.Log; + /** Status source_uuid. */ + public source_uuid: string; - /** - * Decodes a Log message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Log - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream.Log; + /** Status io_state. */ + public io_state: number; - /** - * Verifies a Log message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Status last_io_error. */ + public last_io_error: string; - /** - * Creates a Log message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Log - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream.Log; + /** Status sql_state. */ + public sql_state: number; - /** - * Creates a plain object from a Log message. Also converts values to other types if specified. - * @param message Log - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.Stream.Log, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Status last_sql_error. */ + public last_sql_error: string; - /** - * Converts this Log to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } + /** Status relay_log_file_position. */ + public relay_log_file_position: string; - /** Properties of an AddCellInfoRequest. */ - interface IAddCellInfoRequest { + /** Status source_user. */ + public source_user: string; - /** AddCellInfoRequest name */ - name?: (string|null); + /** Status sql_delay. */ + public sql_delay: number; - /** AddCellInfoRequest cell_info */ - cell_info?: (topodata.ICellInfo|null); - } + /** Status auto_position. */ + public auto_position: boolean; - /** Represents an AddCellInfoRequest. */ - class AddCellInfoRequest implements IAddCellInfoRequest { + /** Status using_gtid. */ + public using_gtid: boolean; - /** - * Constructs a new AddCellInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IAddCellInfoRequest); + /** Status has_replication_filters. */ + public has_replication_filters: boolean; - /** AddCellInfoRequest name. */ - public name: string; + /** Status ssl_allowed. */ + public ssl_allowed: boolean; - /** AddCellInfoRequest cell_info. */ - public cell_info?: (topodata.ICellInfo|null); + /** Status replication_lag_unknown. */ + public replication_lag_unknown: boolean; /** - * Creates a new AddCellInfoRequest instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns AddCellInfoRequest instance + * @returns Status instance */ - public static create(properties?: vtctldata.IAddCellInfoRequest): vtctldata.AddCellInfoRequest; + public static create(properties?: replicationdata.IStatus): replicationdata.Status; /** - * Encodes the specified AddCellInfoRequest message. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. - * @param message AddCellInfoRequest message or plain object to encode + * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. + * @param message Status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IAddCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AddCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. - * @param message AddCellInfoRequest message or plain object to encode + * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. + * @param message Status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IAddCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddCellInfoRequest message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AddCellInfoRequest + * @returns Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellInfoRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.Status; /** - * Decodes an AddCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AddCellInfoRequest + * @returns Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellInfoRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.Status; /** - * Verifies an AddCellInfoRequest message. + * Verifies a Status message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AddCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AddCellInfoRequest + * @returns Status */ - public static fromObject(object: { [k: string]: any }): vtctldata.AddCellInfoRequest; + public static fromObject(object: { [k: string]: any }): replicationdata.Status; /** - * Creates a plain object from an AddCellInfoRequest message. Also converts values to other types if specified. - * @param message AddCellInfoRequest + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.AddCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: replicationdata.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AddCellInfoRequest to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AddCellInfoResponse. */ - interface IAddCellInfoResponse { + /** Properties of a StopReplicationStatus. */ + interface IStopReplicationStatus { + + /** StopReplicationStatus before */ + before?: (replicationdata.IStatus|null); + + /** StopReplicationStatus after */ + after?: (replicationdata.IStatus|null); } - /** Represents an AddCellInfoResponse. */ - class AddCellInfoResponse implements IAddCellInfoResponse { + /** Represents a StopReplicationStatus. */ + class StopReplicationStatus implements IStopReplicationStatus { /** - * Constructs a new AddCellInfoResponse. + * Constructs a new StopReplicationStatus. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IAddCellInfoResponse); + constructor(properties?: replicationdata.IStopReplicationStatus); + + /** StopReplicationStatus before. */ + public before?: (replicationdata.IStatus|null); + + /** StopReplicationStatus after. */ + public after?: (replicationdata.IStatus|null); /** - * Creates a new AddCellInfoResponse instance using the specified properties. + * Creates a new StopReplicationStatus instance using the specified properties. * @param [properties] Properties to set - * @returns AddCellInfoResponse instance + * @returns StopReplicationStatus instance */ - public static create(properties?: vtctldata.IAddCellInfoResponse): vtctldata.AddCellInfoResponse; + public static create(properties?: replicationdata.IStopReplicationStatus): replicationdata.StopReplicationStatus; /** - * Encodes the specified AddCellInfoResponse message. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. - * @param message AddCellInfoResponse message or plain object to encode + * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. + * @param message StopReplicationStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IAddCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AddCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. - * @param message AddCellInfoResponse message or plain object to encode + * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. + * @param message StopReplicationStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IAddCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddCellInfoResponse message from the specified reader or buffer. + * Decodes a StopReplicationStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AddCellInfoResponse + * @returns StopReplicationStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellInfoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.StopReplicationStatus; /** - * Decodes an AddCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AddCellInfoResponse + * @returns StopReplicationStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellInfoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.StopReplicationStatus; /** - * Verifies an AddCellInfoResponse message. + * Verifies a StopReplicationStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AddCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AddCellInfoResponse + * @returns StopReplicationStatus */ - public static fromObject(object: { [k: string]: any }): vtctldata.AddCellInfoResponse; + public static fromObject(object: { [k: string]: any }): replicationdata.StopReplicationStatus; /** - * Creates a plain object from an AddCellInfoResponse message. Also converts values to other types if specified. - * @param message AddCellInfoResponse + * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. + * @param message StopReplicationStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.AddCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: replicationdata.StopReplicationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AddCellInfoResponse to JSON. + * Converts this StopReplicationStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AddCellsAliasRequest. */ - interface IAddCellsAliasRequest { + /** StopReplicationMode enum. */ + enum StopReplicationMode { + IOANDSQLTHREAD = 0, + IOTHREADONLY = 1 + } - /** AddCellsAliasRequest name */ - name?: (string|null); + /** Properties of a PrimaryStatus. */ + interface IPrimaryStatus { - /** AddCellsAliasRequest cells */ - cells?: (string[]|null); + /** PrimaryStatus position */ + position?: (string|null); + + /** PrimaryStatus file_position */ + file_position?: (string|null); } - /** Represents an AddCellsAliasRequest. */ - class AddCellsAliasRequest implements IAddCellsAliasRequest { + /** Represents a PrimaryStatus. */ + class PrimaryStatus implements IPrimaryStatus { /** - * Constructs a new AddCellsAliasRequest. + * Constructs a new PrimaryStatus. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IAddCellsAliasRequest); + constructor(properties?: replicationdata.IPrimaryStatus); - /** AddCellsAliasRequest name. */ - public name: string; + /** PrimaryStatus position. */ + public position: string; - /** AddCellsAliasRequest cells. */ - public cells: string[]; + /** PrimaryStatus file_position. */ + public file_position: string; /** - * Creates a new AddCellsAliasRequest instance using the specified properties. + * Creates a new PrimaryStatus instance using the specified properties. * @param [properties] Properties to set - * @returns AddCellsAliasRequest instance + * @returns PrimaryStatus instance */ - public static create(properties?: vtctldata.IAddCellsAliasRequest): vtctldata.AddCellsAliasRequest; + public static create(properties?: replicationdata.IPrimaryStatus): replicationdata.PrimaryStatus; /** - * Encodes the specified AddCellsAliasRequest message. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. - * @param message AddCellsAliasRequest message or plain object to encode + * Encodes the specified PrimaryStatus message. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. + * @param message PrimaryStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IAddCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: replicationdata.IPrimaryStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AddCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. - * @param message AddCellsAliasRequest message or plain object to encode + * Encodes the specified PrimaryStatus message, length delimited. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. + * @param message PrimaryStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IAddCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: replicationdata.IPrimaryStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddCellsAliasRequest message from the specified reader or buffer. + * Decodes a PrimaryStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AddCellsAliasRequest + * @returns PrimaryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellsAliasRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.PrimaryStatus; /** - * Decodes an AddCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a PrimaryStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AddCellsAliasRequest + * @returns PrimaryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellsAliasRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.PrimaryStatus; /** - * Verifies an AddCellsAliasRequest message. + * Verifies a PrimaryStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AddCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PrimaryStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AddCellsAliasRequest + * @returns PrimaryStatus */ - public static fromObject(object: { [k: string]: any }): vtctldata.AddCellsAliasRequest; + public static fromObject(object: { [k: string]: any }): replicationdata.PrimaryStatus; /** - * Creates a plain object from an AddCellsAliasRequest message. Also converts values to other types if specified. - * @param message AddCellsAliasRequest + * Creates a plain object from a PrimaryStatus message. Also converts values to other types if specified. + * @param message PrimaryStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.AddCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: replicationdata.PrimaryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AddCellsAliasRequest to JSON. + * Converts this PrimaryStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AddCellsAliasResponse. */ - interface IAddCellsAliasResponse { - } + /** Properties of a FullStatus. */ + interface IFullStatus { - /** Represents an AddCellsAliasResponse. */ - class AddCellsAliasResponse implements IAddCellsAliasResponse { + /** FullStatus server_id */ + server_id?: (number|null); - /** - * Constructs a new AddCellsAliasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IAddCellsAliasResponse); + /** FullStatus server_uuid */ + server_uuid?: (string|null); - /** - * Creates a new AddCellsAliasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AddCellsAliasResponse instance - */ - public static create(properties?: vtctldata.IAddCellsAliasResponse): vtctldata.AddCellsAliasResponse; + /** FullStatus replication_status */ + replication_status?: (replicationdata.IStatus|null); - /** - * Encodes the specified AddCellsAliasResponse message. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. - * @param message AddCellsAliasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IAddCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FullStatus primary_status */ + primary_status?: (replicationdata.IPrimaryStatus|null); - /** - * Encodes the specified AddCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. - * @param message AddCellsAliasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IAddCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FullStatus gtid_purged */ + gtid_purged?: (string|null); - /** - * Decodes an AddCellsAliasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellsAliasResponse; + /** FullStatus version */ + version?: (string|null); - /** - * Decodes an AddCellsAliasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellsAliasResponse; + /** FullStatus version_comment */ + version_comment?: (string|null); - /** - * Verifies an AddCellsAliasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FullStatus read_only */ + read_only?: (boolean|null); - /** - * Creates an AddCellsAliasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddCellsAliasResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.AddCellsAliasResponse; + /** FullStatus gtid_mode */ + gtid_mode?: (string|null); - /** - * Creates a plain object from an AddCellsAliasResponse message. Also converts values to other types if specified. - * @param message AddCellsAliasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.AddCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FullStatus binlog_format */ + binlog_format?: (string|null); - /** - * Converts this AddCellsAliasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FullStatus binlog_row_image */ + binlog_row_image?: (string|null); - /** Properties of an ApplyRoutingRulesRequest. */ - interface IApplyRoutingRulesRequest { + /** FullStatus log_bin_enabled */ + log_bin_enabled?: (boolean|null); - /** ApplyRoutingRulesRequest routing_rules */ - routing_rules?: (vschema.IRoutingRules|null); + /** FullStatus log_replica_updates */ + log_replica_updates?: (boolean|null); - /** ApplyRoutingRulesRequest skip_rebuild */ - skip_rebuild?: (boolean|null); + /** FullStatus semi_sync_primary_enabled */ + semi_sync_primary_enabled?: (boolean|null); - /** ApplyRoutingRulesRequest rebuild_cells */ - rebuild_cells?: (string[]|null); + /** FullStatus semi_sync_replica_enabled */ + semi_sync_replica_enabled?: (boolean|null); + + /** FullStatus semi_sync_primary_status */ + semi_sync_primary_status?: (boolean|null); + + /** FullStatus semi_sync_replica_status */ + semi_sync_replica_status?: (boolean|null); + + /** FullStatus semi_sync_primary_clients */ + semi_sync_primary_clients?: (number|null); + + /** FullStatus semi_sync_primary_timeout */ + semi_sync_primary_timeout?: (number|Long|null); + + /** FullStatus semi_sync_wait_for_replica_count */ + semi_sync_wait_for_replica_count?: (number|null); + + /** FullStatus super_read_only */ + super_read_only?: (boolean|null); } - /** Represents an ApplyRoutingRulesRequest. */ - class ApplyRoutingRulesRequest implements IApplyRoutingRulesRequest { + /** Represents a FullStatus. */ + class FullStatus implements IFullStatus { /** - * Constructs a new ApplyRoutingRulesRequest. + * Constructs a new FullStatus. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyRoutingRulesRequest); + constructor(properties?: replicationdata.IFullStatus); - /** ApplyRoutingRulesRequest routing_rules. */ - public routing_rules?: (vschema.IRoutingRules|null); + /** FullStatus server_id. */ + public server_id: number; - /** ApplyRoutingRulesRequest skip_rebuild. */ - public skip_rebuild: boolean; + /** FullStatus server_uuid. */ + public server_uuid: string; - /** ApplyRoutingRulesRequest rebuild_cells. */ - public rebuild_cells: string[]; + /** FullStatus replication_status. */ + public replication_status?: (replicationdata.IStatus|null); + + /** FullStatus primary_status. */ + public primary_status?: (replicationdata.IPrimaryStatus|null); + + /** FullStatus gtid_purged. */ + public gtid_purged: string; + + /** FullStatus version. */ + public version: string; + + /** FullStatus version_comment. */ + public version_comment: string; + + /** FullStatus read_only. */ + public read_only: boolean; + + /** FullStatus gtid_mode. */ + public gtid_mode: string; + + /** FullStatus binlog_format. */ + public binlog_format: string; + + /** FullStatus binlog_row_image. */ + public binlog_row_image: string; + + /** FullStatus log_bin_enabled. */ + public log_bin_enabled: boolean; + + /** FullStatus log_replica_updates. */ + public log_replica_updates: boolean; + + /** FullStatus semi_sync_primary_enabled. */ + public semi_sync_primary_enabled: boolean; + + /** FullStatus semi_sync_replica_enabled. */ + public semi_sync_replica_enabled: boolean; + + /** FullStatus semi_sync_primary_status. */ + public semi_sync_primary_status: boolean; + + /** FullStatus semi_sync_replica_status. */ + public semi_sync_replica_status: boolean; + + /** FullStatus semi_sync_primary_clients. */ + public semi_sync_primary_clients: number; + + /** FullStatus semi_sync_primary_timeout. */ + public semi_sync_primary_timeout: (number|Long); + + /** FullStatus semi_sync_wait_for_replica_count. */ + public semi_sync_wait_for_replica_count: number; + + /** FullStatus super_read_only. */ + public super_read_only: boolean; /** - * Creates a new ApplyRoutingRulesRequest instance using the specified properties. + * Creates a new FullStatus instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyRoutingRulesRequest instance + * @returns FullStatus instance */ - public static create(properties?: vtctldata.IApplyRoutingRulesRequest): vtctldata.ApplyRoutingRulesRequest; + public static create(properties?: replicationdata.IFullStatus): replicationdata.FullStatus; /** - * Encodes the specified ApplyRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. - * @param message ApplyRoutingRulesRequest message or plain object to encode + * Encodes the specified FullStatus message. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. + * @param message FullStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: replicationdata.IFullStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. - * @param message ApplyRoutingRulesRequest message or plain object to encode + * Encodes the specified FullStatus message, length delimited. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. + * @param message FullStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: replicationdata.IFullStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer. + * Decodes a FullStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyRoutingRulesRequest + * @returns FullStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyRoutingRulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.FullStatus; /** - * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a FullStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyRoutingRulesRequest + * @returns FullStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyRoutingRulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.FullStatus; /** - * Verifies an ApplyRoutingRulesRequest message. + * Verifies a FullStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FullStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyRoutingRulesRequest + * @returns FullStatus */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyRoutingRulesRequest; + public static fromObject(object: { [k: string]: any }): replicationdata.FullStatus; /** - * Creates a plain object from an ApplyRoutingRulesRequest message. Also converts values to other types if specified. - * @param message ApplyRoutingRulesRequest + * Creates a plain object from a FullStatus message. Also converts values to other types if specified. + * @param message FullStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: replicationdata.FullStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyRoutingRulesRequest to JSON. + * Converts this FullStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } +} - /** Properties of an ApplyRoutingRulesResponse. */ - interface IApplyRoutingRulesResponse { +/** Namespace vschema. */ +export namespace vschema { + + /** Properties of a RoutingRules. */ + interface IRoutingRules { + + /** RoutingRules rules */ + rules?: (vschema.IRoutingRule[]|null); } - /** Represents an ApplyRoutingRulesResponse. */ - class ApplyRoutingRulesResponse implements IApplyRoutingRulesResponse { + /** Represents a RoutingRules. */ + class RoutingRules implements IRoutingRules { /** - * Constructs a new ApplyRoutingRulesResponse. + * Constructs a new RoutingRules. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyRoutingRulesResponse); + constructor(properties?: vschema.IRoutingRules); + + /** RoutingRules rules. */ + public rules: vschema.IRoutingRule[]; /** - * Creates a new ApplyRoutingRulesResponse instance using the specified properties. + * Creates a new RoutingRules instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyRoutingRulesResponse instance + * @returns RoutingRules instance */ - public static create(properties?: vtctldata.IApplyRoutingRulesResponse): vtctldata.ApplyRoutingRulesResponse; + public static create(properties?: vschema.IRoutingRules): vschema.RoutingRules; /** - * Encodes the specified ApplyRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. - * @param message ApplyRoutingRulesResponse message or plain object to encode + * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. + * @param message RoutingRules message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. - * @param message ApplyRoutingRulesResponse message or plain object to encode + * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. + * @param message RoutingRules message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer. + * Decodes a RoutingRules message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyRoutingRulesResponse + * @returns RoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyRoutingRulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRules; /** - * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a RoutingRules message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyRoutingRulesResponse + * @returns RoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyRoutingRulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRules; /** - * Verifies an ApplyRoutingRulesResponse message. + * Verifies a RoutingRules message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyRoutingRulesResponse + * @returns RoutingRules */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyRoutingRulesResponse; + public static fromObject(object: { [k: string]: any }): vschema.RoutingRules; /** - * Creates a plain object from an ApplyRoutingRulesResponse message. Also converts values to other types if specified. - * @param message ApplyRoutingRulesResponse + * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. + * @param message RoutingRules * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.RoutingRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyRoutingRulesResponse to JSON. + * Converts this RoutingRules to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplyShardRoutingRulesRequest. */ - interface IApplyShardRoutingRulesRequest { - - /** ApplyShardRoutingRulesRequest shard_routing_rules */ - shard_routing_rules?: (vschema.IShardRoutingRules|null); + /** Properties of a RoutingRule. */ + interface IRoutingRule { - /** ApplyShardRoutingRulesRequest skip_rebuild */ - skip_rebuild?: (boolean|null); + /** RoutingRule from_table */ + from_table?: (string|null); - /** ApplyShardRoutingRulesRequest rebuild_cells */ - rebuild_cells?: (string[]|null); + /** RoutingRule to_tables */ + to_tables?: (string[]|null); } - /** Represents an ApplyShardRoutingRulesRequest. */ - class ApplyShardRoutingRulesRequest implements IApplyShardRoutingRulesRequest { + /** Represents a RoutingRule. */ + class RoutingRule implements IRoutingRule { /** - * Constructs a new ApplyShardRoutingRulesRequest. + * Constructs a new RoutingRule. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyShardRoutingRulesRequest); - - /** ApplyShardRoutingRulesRequest shard_routing_rules. */ - public shard_routing_rules?: (vschema.IShardRoutingRules|null); + constructor(properties?: vschema.IRoutingRule); - /** ApplyShardRoutingRulesRequest skip_rebuild. */ - public skip_rebuild: boolean; + /** RoutingRule from_table. */ + public from_table: string; - /** ApplyShardRoutingRulesRequest rebuild_cells. */ - public rebuild_cells: string[]; + /** RoutingRule to_tables. */ + public to_tables: string[]; /** - * Creates a new ApplyShardRoutingRulesRequest instance using the specified properties. + * Creates a new RoutingRule instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyShardRoutingRulesRequest instance + * @returns RoutingRule instance */ - public static create(properties?: vtctldata.IApplyShardRoutingRulesRequest): vtctldata.ApplyShardRoutingRulesRequest; + public static create(properties?: vschema.IRoutingRule): vschema.RoutingRule; /** - * Encodes the specified ApplyShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. - * @param message ApplyShardRoutingRulesRequest message or plain object to encode + * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. + * @param message RoutingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. - * @param message ApplyShardRoutingRulesRequest message or plain object to encode + * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. + * @param message RoutingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer. + * Decodes a RoutingRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyShardRoutingRulesRequest + * @returns RoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyShardRoutingRulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRule; /** - * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyShardRoutingRulesRequest + * @returns RoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyShardRoutingRulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRule; /** - * Verifies an ApplyShardRoutingRulesRequest message. + * Verifies a RoutingRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyShardRoutingRulesRequest + * @returns RoutingRule */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyShardRoutingRulesRequest; + public static fromObject(object: { [k: string]: any }): vschema.RoutingRule; /** - * Creates a plain object from an ApplyShardRoutingRulesRequest message. Also converts values to other types if specified. - * @param message ApplyShardRoutingRulesRequest + * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. + * @param message RoutingRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyShardRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.RoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyShardRoutingRulesRequest to JSON. + * Converts this RoutingRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplyShardRoutingRulesResponse. */ - interface IApplyShardRoutingRulesResponse { + /** Properties of a Keyspace. */ + interface IKeyspace { + + /** Keyspace sharded */ + sharded?: (boolean|null); + + /** Keyspace vindexes */ + vindexes?: ({ [k: string]: vschema.IVindex }|null); + + /** Keyspace tables */ + tables?: ({ [k: string]: vschema.ITable }|null); + + /** Keyspace require_explicit_routing */ + require_explicit_routing?: (boolean|null); } - /** Represents an ApplyShardRoutingRulesResponse. */ - class ApplyShardRoutingRulesResponse implements IApplyShardRoutingRulesResponse { + /** Represents a Keyspace. */ + class Keyspace implements IKeyspace { /** - * Constructs a new ApplyShardRoutingRulesResponse. + * Constructs a new Keyspace. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyShardRoutingRulesResponse); + constructor(properties?: vschema.IKeyspace); + + /** Keyspace sharded. */ + public sharded: boolean; + + /** Keyspace vindexes. */ + public vindexes: { [k: string]: vschema.IVindex }; + + /** Keyspace tables. */ + public tables: { [k: string]: vschema.ITable }; + + /** Keyspace require_explicit_routing. */ + public require_explicit_routing: boolean; /** - * Creates a new ApplyShardRoutingRulesResponse instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyShardRoutingRulesResponse instance + * @returns Keyspace instance */ - public static create(properties?: vtctldata.IApplyShardRoutingRulesResponse): vtctldata.ApplyShardRoutingRulesResponse; + public static create(properties?: vschema.IKeyspace): vschema.Keyspace; /** - * Encodes the specified ApplyShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. - * @param message ApplyShardRoutingRulesResponse message or plain object to encode + * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. + * @param message Keyspace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. - * @param message ApplyShardRoutingRulesResponse message or plain object to encode + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. + * @param message Keyspace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyShardRoutingRulesResponse + * @returns Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyShardRoutingRulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Keyspace; /** - * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyShardRoutingRulesResponse + * @returns Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyShardRoutingRulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Keyspace; /** - * Verifies an ApplyShardRoutingRulesResponse message. + * Verifies a Keyspace message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyShardRoutingRulesResponse + * @returns Keyspace */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyShardRoutingRulesResponse; + public static fromObject(object: { [k: string]: any }): vschema.Keyspace; /** - * Creates a plain object from an ApplyShardRoutingRulesResponse message. Also converts values to other types if specified. - * @param message ApplyShardRoutingRulesResponse + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. + * @param message Keyspace * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyShardRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyShardRoutingRulesResponse to JSON. + * Converts this Keyspace to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplySchemaRequest. */ - interface IApplySchemaRequest { - - /** ApplySchemaRequest keyspace */ - keyspace?: (string|null); - - /** ApplySchemaRequest allow_long_unavailability */ - allow_long_unavailability?: (boolean|null); - - /** ApplySchemaRequest sql */ - sql?: (string[]|null); - - /** ApplySchemaRequest ddl_strategy */ - ddl_strategy?: (string|null); - - /** ApplySchemaRequest uuid_list */ - uuid_list?: (string[]|null); - - /** ApplySchemaRequest migration_context */ - migration_context?: (string|null); + /** Properties of a Vindex. */ + interface IVindex { - /** ApplySchemaRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); + /** Vindex type */ + type?: (string|null); - /** ApplySchemaRequest skip_preflight */ - skip_preflight?: (boolean|null); + /** Vindex params */ + params?: ({ [k: string]: string }|null); - /** ApplySchemaRequest caller_id */ - caller_id?: (vtrpc.ICallerID|null); + /** Vindex owner */ + owner?: (string|null); } - /** Represents an ApplySchemaRequest. */ - class ApplySchemaRequest implements IApplySchemaRequest { + /** Represents a Vindex. */ + class Vindex implements IVindex { /** - * Constructs a new ApplySchemaRequest. + * Constructs a new Vindex. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplySchemaRequest); - - /** ApplySchemaRequest keyspace. */ - public keyspace: string; - - /** ApplySchemaRequest allow_long_unavailability. */ - public allow_long_unavailability: boolean; - - /** ApplySchemaRequest sql. */ - public sql: string[]; - - /** ApplySchemaRequest ddl_strategy. */ - public ddl_strategy: string; - - /** ApplySchemaRequest uuid_list. */ - public uuid_list: string[]; - - /** ApplySchemaRequest migration_context. */ - public migration_context: string; + constructor(properties?: vschema.IVindex); - /** ApplySchemaRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); + /** Vindex type. */ + public type: string; - /** ApplySchemaRequest skip_preflight. */ - public skip_preflight: boolean; + /** Vindex params. */ + public params: { [k: string]: string }; - /** ApplySchemaRequest caller_id. */ - public caller_id?: (vtrpc.ICallerID|null); + /** Vindex owner. */ + public owner: string; /** - * Creates a new ApplySchemaRequest instance using the specified properties. + * Creates a new Vindex instance using the specified properties. * @param [properties] Properties to set - * @returns ApplySchemaRequest instance + * @returns Vindex instance */ - public static create(properties?: vtctldata.IApplySchemaRequest): vtctldata.ApplySchemaRequest; + public static create(properties?: vschema.IVindex): vschema.Vindex; /** - * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. - * @param message ApplySchemaRequest message or plain object to encode + * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. + * @param message Vindex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. - * @param message ApplySchemaRequest message or plain object to encode + * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. + * @param message Vindex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer. + * Decodes a Vindex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplySchemaRequest + * @returns Vindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplySchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Vindex; /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a Vindex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplySchemaRequest + * @returns Vindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplySchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Vindex; /** - * Verifies an ApplySchemaRequest message. + * Verifies a Vindex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Vindex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplySchemaRequest + * @returns Vindex */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplySchemaRequest; + public static fromObject(object: { [k: string]: any }): vschema.Vindex; /** - * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. - * @param message ApplySchemaRequest + * Creates a plain object from a Vindex message. Also converts values to other types if specified. + * @param message Vindex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplySchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.Vindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplySchemaRequest to JSON. + * Converts this Vindex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplySchemaResponse. */ - interface IApplySchemaResponse { + /** Properties of a Table. */ + interface ITable { - /** ApplySchemaResponse uuid_list */ - uuid_list?: (string[]|null); + /** Table type */ + type?: (string|null); + + /** Table column_vindexes */ + column_vindexes?: (vschema.IColumnVindex[]|null); + + /** Table auto_increment */ + auto_increment?: (vschema.IAutoIncrement|null); + + /** Table columns */ + columns?: (vschema.IColumn[]|null); + + /** Table pinned */ + pinned?: (string|null); + + /** Table column_list_authoritative */ + column_list_authoritative?: (boolean|null); + + /** Table source */ + source?: (string|null); } - /** Represents an ApplySchemaResponse. */ - class ApplySchemaResponse implements IApplySchemaResponse { + /** Represents a Table. */ + class Table implements ITable { /** - * Constructs a new ApplySchemaResponse. + * Constructs a new Table. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplySchemaResponse); + constructor(properties?: vschema.ITable); - /** ApplySchemaResponse uuid_list. */ - public uuid_list: string[]; + /** Table type. */ + public type: string; + + /** Table column_vindexes. */ + public column_vindexes: vschema.IColumnVindex[]; + + /** Table auto_increment. */ + public auto_increment?: (vschema.IAutoIncrement|null); + + /** Table columns. */ + public columns: vschema.IColumn[]; + + /** Table pinned. */ + public pinned: string; + + /** Table column_list_authoritative. */ + public column_list_authoritative: boolean; + + /** Table source. */ + public source: string; /** - * Creates a new ApplySchemaResponse instance using the specified properties. + * Creates a new Table instance using the specified properties. * @param [properties] Properties to set - * @returns ApplySchemaResponse instance + * @returns Table instance */ - public static create(properties?: vtctldata.IApplySchemaResponse): vtctldata.ApplySchemaResponse; + public static create(properties?: vschema.ITable): vschema.Table; /** - * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. - * @param message ApplySchemaResponse message or plain object to encode + * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. + * @param message Table message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. - * @param message ApplySchemaResponse message or plain object to encode + * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. + * @param message Table message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer. + * Decodes a Table message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplySchemaResponse + * @returns Table * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplySchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Table; /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a Table message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplySchemaResponse + * @returns Table * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplySchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Table; /** - * Verifies an ApplySchemaResponse message. + * Verifies a Table message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Table message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplySchemaResponse + * @returns Table */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplySchemaResponse; + public static fromObject(object: { [k: string]: any }): vschema.Table; /** - * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. - * @param message ApplySchemaResponse + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @param message Table * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplySchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplySchemaResponse to JSON. + * Converts this Table to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplyVSchemaRequest. */ - interface IApplyVSchemaRequest { - - /** ApplyVSchemaRequest keyspace */ - keyspace?: (string|null); - - /** ApplyVSchemaRequest skip_rebuild */ - skip_rebuild?: (boolean|null); - - /** ApplyVSchemaRequest dry_run */ - dry_run?: (boolean|null); + /** Properties of a ColumnVindex. */ + interface IColumnVindex { - /** ApplyVSchemaRequest cells */ - cells?: (string[]|null); + /** ColumnVindex column */ + column?: (string|null); - /** ApplyVSchemaRequest v_schema */ - v_schema?: (vschema.IKeyspace|null); + /** ColumnVindex name */ + name?: (string|null); - /** ApplyVSchemaRequest sql */ - sql?: (string|null); + /** ColumnVindex columns */ + columns?: (string[]|null); } - /** Represents an ApplyVSchemaRequest. */ - class ApplyVSchemaRequest implements IApplyVSchemaRequest { + /** Represents a ColumnVindex. */ + class ColumnVindex implements IColumnVindex { /** - * Constructs a new ApplyVSchemaRequest. + * Constructs a new ColumnVindex. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyVSchemaRequest); - - /** ApplyVSchemaRequest keyspace. */ - public keyspace: string; - - /** ApplyVSchemaRequest skip_rebuild. */ - public skip_rebuild: boolean; - - /** ApplyVSchemaRequest dry_run. */ - public dry_run: boolean; + constructor(properties?: vschema.IColumnVindex); - /** ApplyVSchemaRequest cells. */ - public cells: string[]; + /** ColumnVindex column. */ + public column: string; - /** ApplyVSchemaRequest v_schema. */ - public v_schema?: (vschema.IKeyspace|null); + /** ColumnVindex name. */ + public name: string; - /** ApplyVSchemaRequest sql. */ - public sql: string; + /** ColumnVindex columns. */ + public columns: string[]; /** - * Creates a new ApplyVSchemaRequest instance using the specified properties. + * Creates a new ColumnVindex instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyVSchemaRequest instance + * @returns ColumnVindex instance */ - public static create(properties?: vtctldata.IApplyVSchemaRequest): vtctldata.ApplyVSchemaRequest; + public static create(properties?: vschema.IColumnVindex): vschema.ColumnVindex; /** - * Encodes the specified ApplyVSchemaRequest message. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. - * @param message ApplyVSchemaRequest message or plain object to encode + * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. + * @param message ColumnVindex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. - * @param message ApplyVSchemaRequest message or plain object to encode + * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. + * @param message ColumnVindex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyVSchemaRequest message from the specified reader or buffer. + * Decodes a ColumnVindex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyVSchemaRequest + * @returns ColumnVindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyVSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ColumnVindex; /** - * Decodes an ApplyVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyVSchemaRequest + * @returns ColumnVindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyVSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ColumnVindex; /** - * Verifies an ApplyVSchemaRequest message. + * Verifies a ColumnVindex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyVSchemaRequest + * @returns ColumnVindex */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyVSchemaRequest; + public static fromObject(object: { [k: string]: any }): vschema.ColumnVindex; /** - * Creates a plain object from an ApplyVSchemaRequest message. Also converts values to other types if specified. - * @param message ApplyVSchemaRequest + * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. + * @param message ColumnVindex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.ColumnVindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyVSchemaRequest to JSON. + * Converts this ColumnVindex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ApplyVSchemaResponse. */ - interface IApplyVSchemaResponse { + /** Properties of an AutoIncrement. */ + interface IAutoIncrement { - /** ApplyVSchemaResponse v_schema */ - v_schema?: (vschema.IKeyspace|null); + /** AutoIncrement column */ + column?: (string|null); + + /** AutoIncrement sequence */ + sequence?: (string|null); } - /** Represents an ApplyVSchemaResponse. */ - class ApplyVSchemaResponse implements IApplyVSchemaResponse { + /** Represents an AutoIncrement. */ + class AutoIncrement implements IAutoIncrement { /** - * Constructs a new ApplyVSchemaResponse. + * Constructs a new AutoIncrement. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IApplyVSchemaResponse); + constructor(properties?: vschema.IAutoIncrement); - /** ApplyVSchemaResponse v_schema. */ - public v_schema?: (vschema.IKeyspace|null); + /** AutoIncrement column. */ + public column: string; + + /** AutoIncrement sequence. */ + public sequence: string; /** - * Creates a new ApplyVSchemaResponse instance using the specified properties. + * Creates a new AutoIncrement instance using the specified properties. * @param [properties] Properties to set - * @returns ApplyVSchemaResponse instance + * @returns AutoIncrement instance */ - public static create(properties?: vtctldata.IApplyVSchemaResponse): vtctldata.ApplyVSchemaResponse; + public static create(properties?: vschema.IAutoIncrement): vschema.AutoIncrement; /** - * Encodes the specified ApplyVSchemaResponse message. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. - * @param message ApplyVSchemaResponse message or plain object to encode + * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. + * @param message AutoIncrement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IApplyVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplyVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. - * @param message ApplyVSchemaResponse message or plain object to encode + * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. + * @param message AutoIncrement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IApplyVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplyVSchemaResponse message from the specified reader or buffer. + * Decodes an AutoIncrement message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplyVSchemaResponse + * @returns AutoIncrement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyVSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.AutoIncrement; /** - * Decodes an ApplyVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplyVSchemaResponse + * @returns AutoIncrement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyVSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.AutoIncrement; /** - * Verifies an ApplyVSchemaResponse message. + * Verifies an AutoIncrement message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplyVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplyVSchemaResponse + * @returns AutoIncrement */ - public static fromObject(object: { [k: string]: any }): vtctldata.ApplyVSchemaResponse; + public static fromObject(object: { [k: string]: any }): vschema.AutoIncrement; /** - * Creates a plain object from an ApplyVSchemaResponse message. Also converts values to other types if specified. - * @param message ApplyVSchemaResponse + * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. + * @param message AutoIncrement * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ApplyVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.AutoIncrement, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplyVSchemaResponse to JSON. + * Converts this AutoIncrement to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BackupRequest. */ - interface IBackupRequest { - - /** BackupRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** BackupRequest allow_primary */ - allow_primary?: (boolean|null); + /** Properties of a Column. */ + interface IColumn { - /** BackupRequest concurrency */ - concurrency?: (number|Long|null); + /** Column name */ + name?: (string|null); - /** BackupRequest incremental_from_pos */ - incremental_from_pos?: (string|null); + /** Column type */ + type?: (query.Type|null); } - /** Represents a BackupRequest. */ - class BackupRequest implements IBackupRequest { + /** Represents a Column. */ + class Column implements IColumn { /** - * Constructs a new BackupRequest. + * Constructs a new Column. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IBackupRequest); - - /** BackupRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** BackupRequest allow_primary. */ - public allow_primary: boolean; + constructor(properties?: vschema.IColumn); - /** BackupRequest concurrency. */ - public concurrency: (number|Long); + /** Column name. */ + public name: string; - /** BackupRequest incremental_from_pos. */ - public incremental_from_pos: string; + /** Column type. */ + public type: query.Type; /** - * Creates a new BackupRequest instance using the specified properties. + * Creates a new Column instance using the specified properties. * @param [properties] Properties to set - * @returns BackupRequest instance + * @returns Column instance */ - public static create(properties?: vtctldata.IBackupRequest): vtctldata.BackupRequest; + public static create(properties?: vschema.IColumn): vschema.Column; /** - * Encodes the specified BackupRequest message. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. - * @param message BackupRequest message or plain object to encode + * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. + * @param message Column message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. - * @param message BackupRequest message or plain object to encode + * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. + * @param message Column message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackupRequest message from the specified reader or buffer. + * Decodes a Column message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackupRequest + * @returns Column * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Column; /** - * Decodes a BackupRequest message from the specified reader or buffer, length delimited. + * Decodes a Column message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackupRequest + * @returns Column * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Column; /** - * Verifies a BackupRequest message. + * Verifies a Column message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Column message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackupRequest + * @returns Column */ - public static fromObject(object: { [k: string]: any }): vtctldata.BackupRequest; + public static fromObject(object: { [k: string]: any }): vschema.Column; /** - * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. - * @param message BackupRequest + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @param message Column * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.BackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackupRequest to JSON. + * Converts this Column to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BackupResponse. */ - interface IBackupResponse { - - /** BackupResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** Properties of a SrvVSchema. */ + interface ISrvVSchema { - /** BackupResponse keyspace */ - keyspace?: (string|null); + /** SrvVSchema keyspaces */ + keyspaces?: ({ [k: string]: vschema.IKeyspace }|null); - /** BackupResponse shard */ - shard?: (string|null); + /** SrvVSchema routing_rules */ + routing_rules?: (vschema.IRoutingRules|null); - /** BackupResponse event */ - event?: (logutil.IEvent|null); + /** SrvVSchema shard_routing_rules */ + shard_routing_rules?: (vschema.IShardRoutingRules|null); } - /** Represents a BackupResponse. */ - class BackupResponse implements IBackupResponse { + /** Represents a SrvVSchema. */ + class SrvVSchema implements ISrvVSchema { /** - * Constructs a new BackupResponse. + * Constructs a new SrvVSchema. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IBackupResponse); - - /** BackupResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + constructor(properties?: vschema.ISrvVSchema); - /** BackupResponse keyspace. */ - public keyspace: string; + /** SrvVSchema keyspaces. */ + public keyspaces: { [k: string]: vschema.IKeyspace }; - /** BackupResponse shard. */ - public shard: string; + /** SrvVSchema routing_rules. */ + public routing_rules?: (vschema.IRoutingRules|null); - /** BackupResponse event. */ - public event?: (logutil.IEvent|null); + /** SrvVSchema shard_routing_rules. */ + public shard_routing_rules?: (vschema.IShardRoutingRules|null); /** - * Creates a new BackupResponse instance using the specified properties. + * Creates a new SrvVSchema instance using the specified properties. * @param [properties] Properties to set - * @returns BackupResponse instance + * @returns SrvVSchema instance */ - public static create(properties?: vtctldata.IBackupResponse): vtctldata.BackupResponse; + public static create(properties?: vschema.ISrvVSchema): vschema.SrvVSchema; /** - * Encodes the specified BackupResponse message. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. - * @param message BackupResponse message or plain object to encode + * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. + * @param message SrvVSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. - * @param message BackupResponse message or plain object to encode + * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. + * @param message SrvVSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackupResponse message from the specified reader or buffer. + * Decodes a SrvVSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackupResponse + * @returns SrvVSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.SrvVSchema; /** - * Decodes a BackupResponse message from the specified reader or buffer, length delimited. + * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackupResponse + * @returns SrvVSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.SrvVSchema; /** - * Verifies a BackupResponse message. + * Verifies a SrvVSchema message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackupResponse + * @returns SrvVSchema */ - public static fromObject(object: { [k: string]: any }): vtctldata.BackupResponse; + public static fromObject(object: { [k: string]: any }): vschema.SrvVSchema; /** - * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. - * @param message BackupResponse + * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. + * @param message SrvVSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.BackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.SrvVSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackupResponse to JSON. + * Converts this SrvVSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BackupShardRequest. */ - interface IBackupShardRequest { - - /** BackupShardRequest keyspace */ - keyspace?: (string|null); - - /** BackupShardRequest shard */ - shard?: (string|null); - - /** BackupShardRequest allow_primary */ - allow_primary?: (boolean|null); + /** Properties of a ShardRoutingRules. */ + interface IShardRoutingRules { - /** BackupShardRequest concurrency */ - concurrency?: (number|Long|null); + /** ShardRoutingRules rules */ + rules?: (vschema.IShardRoutingRule[]|null); } - /** Represents a BackupShardRequest. */ - class BackupShardRequest implements IBackupShardRequest { + /** Represents a ShardRoutingRules. */ + class ShardRoutingRules implements IShardRoutingRules { /** - * Constructs a new BackupShardRequest. + * Constructs a new ShardRoutingRules. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IBackupShardRequest); - - /** BackupShardRequest keyspace. */ - public keyspace: string; - - /** BackupShardRequest shard. */ - public shard: string; - - /** BackupShardRequest allow_primary. */ - public allow_primary: boolean; + constructor(properties?: vschema.IShardRoutingRules); - /** BackupShardRequest concurrency. */ - public concurrency: (number|Long); + /** ShardRoutingRules rules. */ + public rules: vschema.IShardRoutingRule[]; /** - * Creates a new BackupShardRequest instance using the specified properties. + * Creates a new ShardRoutingRules instance using the specified properties. * @param [properties] Properties to set - * @returns BackupShardRequest instance + * @returns ShardRoutingRules instance */ - public static create(properties?: vtctldata.IBackupShardRequest): vtctldata.BackupShardRequest; + public static create(properties?: vschema.IShardRoutingRules): vschema.ShardRoutingRules; /** - * Encodes the specified BackupShardRequest message. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. - * @param message BackupShardRequest message or plain object to encode + * Encodes the specified ShardRoutingRules message. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. + * @param message ShardRoutingRules message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IBackupShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IShardRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackupShardRequest message, length delimited. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. - * @param message BackupShardRequest message or plain object to encode + * Encodes the specified ShardRoutingRules message, length delimited. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. + * @param message ShardRoutingRules message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IBackupShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IShardRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackupShardRequest message from the specified reader or buffer. + * Decodes a ShardRoutingRules message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackupShardRequest + * @returns ShardRoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ShardRoutingRules; /** - * Decodes a BackupShardRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardRoutingRules message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackupShardRequest + * @returns ShardRoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ShardRoutingRules; /** - * Verifies a BackupShardRequest message. + * Verifies a ShardRoutingRules message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BackupShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardRoutingRules message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackupShardRequest + * @returns ShardRoutingRules */ - public static fromObject(object: { [k: string]: any }): vtctldata.BackupShardRequest; + public static fromObject(object: { [k: string]: any }): vschema.ShardRoutingRules; /** - * Creates a plain object from a BackupShardRequest message. Also converts values to other types if specified. - * @param message BackupShardRequest + * Creates a plain object from a ShardRoutingRules message. Also converts values to other types if specified. + * @param message ShardRoutingRules * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.BackupShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.ShardRoutingRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackupShardRequest to JSON. + * Converts this ShardRoutingRules to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ChangeTabletTypeRequest. */ - interface IChangeTabletTypeRequest { + /** Properties of a ShardRoutingRule. */ + interface IShardRoutingRule { - /** ChangeTabletTypeRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** ShardRoutingRule from_keyspace */ + from_keyspace?: (string|null); - /** ChangeTabletTypeRequest db_type */ - db_type?: (topodata.TabletType|null); + /** ShardRoutingRule to_keyspace */ + to_keyspace?: (string|null); - /** ChangeTabletTypeRequest dry_run */ - dry_run?: (boolean|null); + /** ShardRoutingRule shard */ + shard?: (string|null); } - /** Represents a ChangeTabletTypeRequest. */ - class ChangeTabletTypeRequest implements IChangeTabletTypeRequest { + /** Represents a ShardRoutingRule. */ + class ShardRoutingRule implements IShardRoutingRule { /** - * Constructs a new ChangeTabletTypeRequest. + * Constructs a new ShardRoutingRule. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IChangeTabletTypeRequest); + constructor(properties?: vschema.IShardRoutingRule); - /** ChangeTabletTypeRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** ShardRoutingRule from_keyspace. */ + public from_keyspace: string; - /** ChangeTabletTypeRequest db_type. */ - public db_type: topodata.TabletType; + /** ShardRoutingRule to_keyspace. */ + public to_keyspace: string; - /** ChangeTabletTypeRequest dry_run. */ - public dry_run: boolean; + /** ShardRoutingRule shard. */ + public shard: string; /** - * Creates a new ChangeTabletTypeRequest instance using the specified properties. + * Creates a new ShardRoutingRule instance using the specified properties. * @param [properties] Properties to set - * @returns ChangeTabletTypeRequest instance + * @returns ShardRoutingRule instance */ - public static create(properties?: vtctldata.IChangeTabletTypeRequest): vtctldata.ChangeTabletTypeRequest; + public static create(properties?: vschema.IShardRoutingRule): vschema.ShardRoutingRule; /** - * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @param message ChangeTabletTypeRequest message or plain object to encode + * Encodes the specified ShardRoutingRule message. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. + * @param message ShardRoutingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IShardRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @param message ChangeTabletTypeRequest message or plain object to encode + * Encodes the specified ShardRoutingRule message, length delimited. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. + * @param message ShardRoutingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IShardRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. + * Decodes a ShardRoutingRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChangeTabletTypeRequest + * @returns ShardRoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ShardRoutingRule; /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardRoutingRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChangeTabletTypeRequest + * @returns ShardRoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ShardRoutingRule; /** - * Verifies a ChangeTabletTypeRequest message. + * Verifies a ShardRoutingRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardRoutingRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChangeTabletTypeRequest + * @returns ShardRoutingRule */ - public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeRequest; + public static fromObject(object: { [k: string]: any }): vschema.ShardRoutingRule; /** - * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. - * @param message ChangeTabletTypeRequest + * Creates a plain object from a ShardRoutingRule message. Also converts values to other types if specified. + * @param message ShardRoutingRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ChangeTabletTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.ShardRoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChangeTabletTypeRequest to JSON. + * Converts this ShardRoutingRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } +} - /** Properties of a ChangeTabletTypeResponse. */ - interface IChangeTabletTypeResponse { +/** Namespace vtctldata. */ +export namespace vtctldata { - /** ChangeTabletTypeResponse before_tablet */ - before_tablet?: (topodata.ITablet|null); + /** Properties of an ExecuteVtctlCommandRequest. */ + interface IExecuteVtctlCommandRequest { - /** ChangeTabletTypeResponse after_tablet */ - after_tablet?: (topodata.ITablet|null); + /** ExecuteVtctlCommandRequest args */ + args?: (string[]|null); - /** ChangeTabletTypeResponse was_dry_run */ - was_dry_run?: (boolean|null); + /** ExecuteVtctlCommandRequest action_timeout */ + action_timeout?: (number|Long|null); } - /** Represents a ChangeTabletTypeResponse. */ - class ChangeTabletTypeResponse implements IChangeTabletTypeResponse { + /** Represents an ExecuteVtctlCommandRequest. */ + class ExecuteVtctlCommandRequest implements IExecuteVtctlCommandRequest { /** - * Constructs a new ChangeTabletTypeResponse. + * Constructs a new ExecuteVtctlCommandRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IChangeTabletTypeResponse); - - /** ChangeTabletTypeResponse before_tablet. */ - public before_tablet?: (topodata.ITablet|null); + constructor(properties?: vtctldata.IExecuteVtctlCommandRequest); - /** ChangeTabletTypeResponse after_tablet. */ - public after_tablet?: (topodata.ITablet|null); + /** ExecuteVtctlCommandRequest args. */ + public args: string[]; - /** ChangeTabletTypeResponse was_dry_run. */ - public was_dry_run: boolean; + /** ExecuteVtctlCommandRequest action_timeout. */ + public action_timeout: (number|Long); /** - * Creates a new ChangeTabletTypeResponse instance using the specified properties. + * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ChangeTabletTypeResponse instance + * @returns ExecuteVtctlCommandRequest instance */ - public static create(properties?: vtctldata.IChangeTabletTypeResponse): vtctldata.ChangeTabletTypeResponse; + public static create(properties?: vtctldata.IExecuteVtctlCommandRequest): vtctldata.ExecuteVtctlCommandRequest; /** - * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @param message ChangeTabletTypeResponse message or plain object to encode + * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. + * @param message ExecuteVtctlCommandRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @param message ChangeTabletTypeResponse message or plain object to encode + * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. + * @param message ExecuteVtctlCommandRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. + * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChangeTabletTypeResponse + * @returns ExecuteVtctlCommandRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandRequest; /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChangeTabletTypeResponse + * @returns ExecuteVtctlCommandRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandRequest; /** - * Verifies a ChangeTabletTypeResponse message. + * Verifies an ExecuteVtctlCommandRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChangeTabletTypeResponse + * @returns ExecuteVtctlCommandRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandRequest; /** - * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. - * @param message ChangeTabletTypeResponse + * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. + * @param message ExecuteVtctlCommandRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ChangeTabletTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteVtctlCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChangeTabletTypeResponse to JSON. + * Converts this ExecuteVtctlCommandRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateKeyspaceRequest. */ - interface ICreateKeyspaceRequest { - - /** CreateKeyspaceRequest name */ - name?: (string|null); - - /** CreateKeyspaceRequest force */ - force?: (boolean|null); - - /** CreateKeyspaceRequest allow_empty_v_schema */ - allow_empty_v_schema?: (boolean|null); - - /** CreateKeyspaceRequest served_froms */ - served_froms?: (topodata.Keyspace.IServedFrom[]|null); - - /** CreateKeyspaceRequest type */ - type?: (topodata.KeyspaceType|null); - - /** CreateKeyspaceRequest base_keyspace */ - base_keyspace?: (string|null); - - /** CreateKeyspaceRequest snapshot_time */ - snapshot_time?: (vttime.ITime|null); - - /** CreateKeyspaceRequest durability_policy */ - durability_policy?: (string|null); + /** Properties of an ExecuteVtctlCommandResponse. */ + interface IExecuteVtctlCommandResponse { - /** CreateKeyspaceRequest sidecar_db_name */ - sidecar_db_name?: (string|null); + /** ExecuteVtctlCommandResponse event */ + event?: (logutil.IEvent|null); } - /** Represents a CreateKeyspaceRequest. */ - class CreateKeyspaceRequest implements ICreateKeyspaceRequest { + /** Represents an ExecuteVtctlCommandResponse. */ + class ExecuteVtctlCommandResponse implements IExecuteVtctlCommandResponse { /** - * Constructs a new CreateKeyspaceRequest. + * Constructs a new ExecuteVtctlCommandResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ICreateKeyspaceRequest); - - /** CreateKeyspaceRequest name. */ - public name: string; - - /** CreateKeyspaceRequest force. */ - public force: boolean; - - /** CreateKeyspaceRequest allow_empty_v_schema. */ - public allow_empty_v_schema: boolean; - - /** CreateKeyspaceRequest served_froms. */ - public served_froms: topodata.Keyspace.IServedFrom[]; - - /** CreateKeyspaceRequest type. */ - public type: topodata.KeyspaceType; - - /** CreateKeyspaceRequest base_keyspace. */ - public base_keyspace: string; - - /** CreateKeyspaceRequest snapshot_time. */ - public snapshot_time?: (vttime.ITime|null); - - /** CreateKeyspaceRequest durability_policy. */ - public durability_policy: string; + constructor(properties?: vtctldata.IExecuteVtctlCommandResponse); - /** CreateKeyspaceRequest sidecar_db_name. */ - public sidecar_db_name: string; + /** ExecuteVtctlCommandResponse event. */ + public event?: (logutil.IEvent|null); /** - * Creates a new CreateKeyspaceRequest instance using the specified properties. + * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateKeyspaceRequest instance + * @returns ExecuteVtctlCommandResponse instance */ - public static create(properties?: vtctldata.ICreateKeyspaceRequest): vtctldata.CreateKeyspaceRequest; + public static create(properties?: vtctldata.IExecuteVtctlCommandResponse): vtctldata.ExecuteVtctlCommandResponse; /** - * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @param message CreateKeyspaceRequest message or plain object to encode + * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. + * @param message ExecuteVtctlCommandResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @param message CreateKeyspaceRequest message or plain object to encode + * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. + * @param message ExecuteVtctlCommandResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. + * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateKeyspaceRequest + * @returns ExecuteVtctlCommandResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandResponse; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateKeyspaceRequest + * @returns ExecuteVtctlCommandResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandResponse; /** - * Verifies a CreateKeyspaceRequest message. + * Verifies an ExecuteVtctlCommandResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateKeyspaceRequest + * @returns ExecuteVtctlCommandResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandResponse; /** - * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. - * @param message CreateKeyspaceRequest + * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. + * @param message ExecuteVtctlCommandResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.CreateKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteVtctlCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateKeyspaceRequest to JSON. + * Converts this ExecuteVtctlCommandResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateKeyspaceResponse. */ - interface ICreateKeyspaceResponse { + /** MaterializationIntent enum. */ + enum MaterializationIntent { + CUSTOM = 0, + MOVETABLES = 1, + CREATELOOKUPINDEX = 2 + } - /** CreateKeyspaceResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); + /** Properties of a TableMaterializeSettings. */ + interface ITableMaterializeSettings { + + /** TableMaterializeSettings target_table */ + target_table?: (string|null); + + /** TableMaterializeSettings source_expression */ + source_expression?: (string|null); + + /** TableMaterializeSettings create_ddl */ + create_ddl?: (string|null); } - /** Represents a CreateKeyspaceResponse. */ - class CreateKeyspaceResponse implements ICreateKeyspaceResponse { + /** Represents a TableMaterializeSettings. */ + class TableMaterializeSettings implements ITableMaterializeSettings { /** - * Constructs a new CreateKeyspaceResponse. + * Constructs a new TableMaterializeSettings. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ICreateKeyspaceResponse); + constructor(properties?: vtctldata.ITableMaterializeSettings); - /** CreateKeyspaceResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); + /** TableMaterializeSettings target_table. */ + public target_table: string; + + /** TableMaterializeSettings source_expression. */ + public source_expression: string; + + /** TableMaterializeSettings create_ddl. */ + public create_ddl: string; /** - * Creates a new CreateKeyspaceResponse instance using the specified properties. + * Creates a new TableMaterializeSettings instance using the specified properties. * @param [properties] Properties to set - * @returns CreateKeyspaceResponse instance + * @returns TableMaterializeSettings instance */ - public static create(properties?: vtctldata.ICreateKeyspaceResponse): vtctldata.CreateKeyspaceResponse; + public static create(properties?: vtctldata.ITableMaterializeSettings): vtctldata.TableMaterializeSettings; /** - * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @param message CreateKeyspaceResponse message or plain object to encode + * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. + * @param message TableMaterializeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @param message CreateKeyspaceResponse message or plain object to encode + * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. + * @param message TableMaterializeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. + * Decodes a TableMaterializeSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateKeyspaceResponse + * @returns TableMaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TableMaterializeSettings; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateKeyspaceResponse + * @returns TableMaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TableMaterializeSettings; /** - * Verifies a CreateKeyspaceResponse message. + * Verifies a TableMaterializeSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateKeyspaceResponse + * @returns TableMaterializeSettings */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.TableMaterializeSettings; /** - * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. - * @param message CreateKeyspaceResponse + * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. + * @param message TableMaterializeSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.CreateKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.TableMaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateKeyspaceResponse to JSON. + * Converts this TableMaterializeSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateShardRequest. */ - interface ICreateShardRequest { + /** Properties of a MaterializeSettings. */ + interface IMaterializeSettings { - /** CreateShardRequest keyspace */ - keyspace?: (string|null); + /** MaterializeSettings workflow */ + workflow?: (string|null); - /** CreateShardRequest shard_name */ - shard_name?: (string|null); + /** MaterializeSettings source_keyspace */ + source_keyspace?: (string|null); - /** CreateShardRequest force */ - force?: (boolean|null); + /** MaterializeSettings target_keyspace */ + target_keyspace?: (string|null); - /** CreateShardRequest include_parent */ - include_parent?: (boolean|null); + /** MaterializeSettings stop_after_copy */ + stop_after_copy?: (boolean|null); + + /** MaterializeSettings table_settings */ + table_settings?: (vtctldata.ITableMaterializeSettings[]|null); + + /** MaterializeSettings cell */ + cell?: (string|null); + + /** MaterializeSettings tablet_types */ + tablet_types?: (string|null); + + /** MaterializeSettings external_cluster */ + external_cluster?: (string|null); + + /** MaterializeSettings materialization_intent */ + materialization_intent?: (vtctldata.MaterializationIntent|null); + + /** MaterializeSettings source_time_zone */ + source_time_zone?: (string|null); + + /** MaterializeSettings target_time_zone */ + target_time_zone?: (string|null); + + /** MaterializeSettings source_shards */ + source_shards?: (string[]|null); + + /** MaterializeSettings on_ddl */ + on_ddl?: (string|null); + + /** MaterializeSettings defer_secondary_keys */ + defer_secondary_keys?: (boolean|null); } - /** Represents a CreateShardRequest. */ - class CreateShardRequest implements ICreateShardRequest { + /** Represents a MaterializeSettings. */ + class MaterializeSettings implements IMaterializeSettings { /** - * Constructs a new CreateShardRequest. + * Constructs a new MaterializeSettings. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ICreateShardRequest); + constructor(properties?: vtctldata.IMaterializeSettings); - /** CreateShardRequest keyspace. */ - public keyspace: string; + /** MaterializeSettings workflow. */ + public workflow: string; - /** CreateShardRequest shard_name. */ - public shard_name: string; + /** MaterializeSettings source_keyspace. */ + public source_keyspace: string; - /** CreateShardRequest force. */ - public force: boolean; + /** MaterializeSettings target_keyspace. */ + public target_keyspace: string; - /** CreateShardRequest include_parent. */ - public include_parent: boolean; + /** MaterializeSettings stop_after_copy. */ + public stop_after_copy: boolean; + + /** MaterializeSettings table_settings. */ + public table_settings: vtctldata.ITableMaterializeSettings[]; + + /** MaterializeSettings cell. */ + public cell: string; + + /** MaterializeSettings tablet_types. */ + public tablet_types: string; + + /** MaterializeSettings external_cluster. */ + public external_cluster: string; + + /** MaterializeSettings materialization_intent. */ + public materialization_intent: vtctldata.MaterializationIntent; + + /** MaterializeSettings source_time_zone. */ + public source_time_zone: string; + + /** MaterializeSettings target_time_zone. */ + public target_time_zone: string; + + /** MaterializeSettings source_shards. */ + public source_shards: string[]; + + /** MaterializeSettings on_ddl. */ + public on_ddl: string; + + /** MaterializeSettings defer_secondary_keys. */ + public defer_secondary_keys: boolean; /** - * Creates a new CreateShardRequest instance using the specified properties. + * Creates a new MaterializeSettings instance using the specified properties. * @param [properties] Properties to set - * @returns CreateShardRequest instance + * @returns MaterializeSettings instance */ - public static create(properties?: vtctldata.ICreateShardRequest): vtctldata.CreateShardRequest; + public static create(properties?: vtctldata.IMaterializeSettings): vtctldata.MaterializeSettings; /** - * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @param message CreateShardRequest message or plain object to encode + * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. + * @param message MaterializeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @param message CreateShardRequest message or plain object to encode + * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. + * @param message MaterializeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateShardRequest message from the specified reader or buffer. + * Decodes a MaterializeSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateShardRequest + * @returns MaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.MaterializeSettings; /** - * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. + * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateShardRequest + * @returns MaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.MaterializeSettings; /** - * Verifies a CreateShardRequest message. + * Verifies a MaterializeSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateShardRequest + * @returns MaterializeSettings */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.MaterializeSettings; /** - * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. - * @param message CreateShardRequest + * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. + * @param message MaterializeSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.CreateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.MaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateShardRequest to JSON. + * Converts this MaterializeSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateShardResponse. */ - interface ICreateShardResponse { - - /** CreateShardResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); + /** Properties of a Keyspace. */ + interface IKeyspace { - /** CreateShardResponse shard */ - shard?: (vtctldata.IShard|null); + /** Keyspace name */ + name?: (string|null); - /** CreateShardResponse shard_already_exists */ - shard_already_exists?: (boolean|null); + /** Keyspace keyspace */ + keyspace?: (topodata.IKeyspace|null); } - /** Represents a CreateShardResponse. */ - class CreateShardResponse implements ICreateShardResponse { + /** Represents a Keyspace. */ + class Keyspace implements IKeyspace { /** - * Constructs a new CreateShardResponse. + * Constructs a new Keyspace. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ICreateShardResponse); - - /** CreateShardResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); + constructor(properties?: vtctldata.IKeyspace); - /** CreateShardResponse shard. */ - public shard?: (vtctldata.IShard|null); + /** Keyspace name. */ + public name: string; - /** CreateShardResponse shard_already_exists. */ - public shard_already_exists: boolean; + /** Keyspace keyspace. */ + public keyspace?: (topodata.IKeyspace|null); /** - * Creates a new CreateShardResponse instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @param [properties] Properties to set - * @returns CreateShardResponse instance + * @returns Keyspace instance */ - public static create(properties?: vtctldata.ICreateShardResponse): vtctldata.CreateShardResponse; + public static create(properties?: vtctldata.IKeyspace): vtctldata.Keyspace; /** - * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @param message CreateShardResponse message or plain object to encode + * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. + * @param message Keyspace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @param message CreateShardResponse message or plain object to encode + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. + * @param message Keyspace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateShardResponse message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateShardResponse + * @returns Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Keyspace; /** - * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateShardResponse + * @returns Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Keyspace; /** - * Verifies a CreateShardResponse message. + * Verifies a Keyspace message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateShardResponse + * @returns Keyspace */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.Keyspace; /** - * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. - * @param message CreateShardResponse + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. + * @param message Keyspace * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.CreateShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateShardResponse to JSON. + * Converts this Keyspace to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteCellInfoRequest. */ - interface IDeleteCellInfoRequest { + /** Properties of a Shard. */ + interface IShard { - /** DeleteCellInfoRequest name */ + /** Shard keyspace */ + keyspace?: (string|null); + + /** Shard name */ name?: (string|null); - /** DeleteCellInfoRequest force */ - force?: (boolean|null); + /** Shard shard */ + shard?: (topodata.IShard|null); } - /** Represents a DeleteCellInfoRequest. */ - class DeleteCellInfoRequest implements IDeleteCellInfoRequest { + /** Represents a Shard. */ + class Shard implements IShard { /** - * Constructs a new DeleteCellInfoRequest. + * Constructs a new Shard. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteCellInfoRequest); + constructor(properties?: vtctldata.IShard); - /** DeleteCellInfoRequest name. */ + /** Shard keyspace. */ + public keyspace: string; + + /** Shard name. */ public name: string; - /** DeleteCellInfoRequest force. */ - public force: boolean; + /** Shard shard. */ + public shard?: (topodata.IShard|null); /** - * Creates a new DeleteCellInfoRequest instance using the specified properties. + * Creates a new Shard instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteCellInfoRequest instance + * @returns Shard instance */ - public static create(properties?: vtctldata.IDeleteCellInfoRequest): vtctldata.DeleteCellInfoRequest; + public static create(properties?: vtctldata.IShard): vtctldata.Shard; /** - * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. - * @param message DeleteCellInfoRequest message or plain object to encode + * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. + * @param message Shard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. - * @param message DeleteCellInfoRequest message or plain object to encode + /** + * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. + * @param message Shard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. + * Decodes a Shard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteCellInfoRequest + * @returns Shard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellInfoRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Shard; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a Shard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteCellInfoRequest + * @returns Shard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellInfoRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Shard; /** - * Verifies a DeleteCellInfoRequest message. + * Verifies a Shard message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Shard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteCellInfoRequest + * @returns Shard */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellInfoRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.Shard; /** - * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. - * @param message DeleteCellInfoRequest + * Creates a plain object from a Shard message. Also converts values to other types if specified. + * @param message Shard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.Shard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteCellInfoRequest to JSON. + * Converts this Shard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteCellInfoResponse. */ - interface IDeleteCellInfoResponse { + /** Properties of a Workflow. */ + interface IWorkflow { + + /** Workflow name */ + name?: (string|null); + + /** Workflow source */ + source?: (vtctldata.Workflow.IReplicationLocation|null); + + /** Workflow target */ + target?: (vtctldata.Workflow.IReplicationLocation|null); + + /** Workflow max_v_replication_lag */ + max_v_replication_lag?: (number|Long|null); + + /** Workflow shard_streams */ + shard_streams?: ({ [k: string]: vtctldata.Workflow.IShardStream }|null); + + /** Workflow workflow_type */ + workflow_type?: (string|null); + + /** Workflow workflow_sub_type */ + workflow_sub_type?: (string|null); } - /** Represents a DeleteCellInfoResponse. */ - class DeleteCellInfoResponse implements IDeleteCellInfoResponse { + /** Represents a Workflow. */ + class Workflow implements IWorkflow { /** - * Constructs a new DeleteCellInfoResponse. + * Constructs a new Workflow. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteCellInfoResponse); + constructor(properties?: vtctldata.IWorkflow); + + /** Workflow name. */ + public name: string; + + /** Workflow source. */ + public source?: (vtctldata.Workflow.IReplicationLocation|null); + + /** Workflow target. */ + public target?: (vtctldata.Workflow.IReplicationLocation|null); + + /** Workflow max_v_replication_lag. */ + public max_v_replication_lag: (number|Long); + + /** Workflow shard_streams. */ + public shard_streams: { [k: string]: vtctldata.Workflow.IShardStream }; + + /** Workflow workflow_type. */ + public workflow_type: string; + + /** Workflow workflow_sub_type. */ + public workflow_sub_type: string; /** - * Creates a new DeleteCellInfoResponse instance using the specified properties. + * Creates a new Workflow instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteCellInfoResponse instance + * @returns Workflow instance */ - public static create(properties?: vtctldata.IDeleteCellInfoResponse): vtctldata.DeleteCellInfoResponse; + public static create(properties?: vtctldata.IWorkflow): vtctldata.Workflow; /** - * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. - * @param message DeleteCellInfoResponse message or plain object to encode + * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. + * @param message Workflow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. - * @param message DeleteCellInfoResponse message or plain object to encode + * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. + * @param message Workflow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. + * Decodes a Workflow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteCellInfoResponse + * @returns Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellInfoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a Workflow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteCellInfoResponse + * @returns Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellInfoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow; /** - * Verifies a DeleteCellInfoResponse message. + * Verifies a Workflow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Workflow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteCellInfoResponse + * @returns Workflow */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellInfoResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow; /** - * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. - * @param message DeleteCellInfoResponse + * Creates a plain object from a Workflow message. Also converts values to other types if specified. + * @param message Workflow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.Workflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workflow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Workflow { + + /** Properties of a ReplicationLocation. */ + interface IReplicationLocation { + + /** ReplicationLocation keyspace */ + keyspace?: (string|null); + + /** ReplicationLocation shards */ + shards?: (string[]|null); + } + + /** Represents a ReplicationLocation. */ + class ReplicationLocation implements IReplicationLocation { + + /** + * Constructs a new ReplicationLocation. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.Workflow.IReplicationLocation); + + /** ReplicationLocation keyspace. */ + public keyspace: string; + + /** ReplicationLocation shards. */ + public shards: string[]; + + /** + * Creates a new ReplicationLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplicationLocation instance + */ + public static create(properties?: vtctldata.Workflow.IReplicationLocation): vtctldata.Workflow.ReplicationLocation; + + /** + * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. + * @param message ReplicationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. + * @param message ReplicationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplicationLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplicationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ReplicationLocation; + + /** + * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplicationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ReplicationLocation; + + /** + * Verifies a ReplicationLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplicationLocation + */ + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ReplicationLocation; + + /** + * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. + * @param message ReplicationLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.Workflow.ReplicationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplicationLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ShardStream. */ + interface IShardStream { + + /** ShardStream streams */ + streams?: (vtctldata.Workflow.IStream[]|null); + + /** ShardStream tablet_controls */ + tablet_controls?: (topodata.Shard.ITabletControl[]|null); + + /** ShardStream is_primary_serving */ + is_primary_serving?: (boolean|null); + } + + /** Represents a ShardStream. */ + class ShardStream implements IShardStream { + + /** + * Constructs a new ShardStream. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.Workflow.IShardStream); + + /** ShardStream streams. */ + public streams: vtctldata.Workflow.IStream[]; + + /** ShardStream tablet_controls. */ + public tablet_controls: topodata.Shard.ITabletControl[]; + + /** ShardStream is_primary_serving. */ + public is_primary_serving: boolean; + + /** + * Creates a new ShardStream instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardStream instance + */ + public static create(properties?: vtctldata.Workflow.IShardStream): vtctldata.Workflow.ShardStream; + + /** + * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. + * @param message ShardStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. + * @param message ShardStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ShardStream; + + /** + * Decodes a ShardStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ShardStream; + + /** + * Verifies a ShardStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardStream + */ + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ShardStream; + + /** + * Creates a plain object from a ShardStream message. Also converts values to other types if specified. + * @param message ShardStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.Workflow.ShardStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Stream. */ + interface IStream { + + /** Stream id */ + id?: (number|Long|null); + + /** Stream shard */ + shard?: (string|null); + + /** Stream tablet */ + tablet?: (topodata.ITabletAlias|null); + + /** Stream binlog_source */ + binlog_source?: (binlogdata.IBinlogSource|null); + + /** Stream position */ + position?: (string|null); + + /** Stream stop_position */ + stop_position?: (string|null); + + /** Stream state */ + state?: (string|null); + + /** Stream db_name */ + db_name?: (string|null); + + /** Stream transaction_timestamp */ + transaction_timestamp?: (vttime.ITime|null); + + /** Stream time_updated */ + time_updated?: (vttime.ITime|null); + + /** Stream message */ + message?: (string|null); + + /** Stream copy_states */ + copy_states?: (vtctldata.Workflow.Stream.ICopyState[]|null); + + /** Stream logs */ + logs?: (vtctldata.Workflow.Stream.ILog[]|null); + + /** Stream log_fetch_error */ + log_fetch_error?: (string|null); + + /** Stream tags */ + tags?: (string[]|null); + } + + /** Represents a Stream. */ + class Stream implements IStream { + + /** + * Constructs a new Stream. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.Workflow.IStream); + + /** Stream id. */ + public id: (number|Long); + + /** Stream shard. */ + public shard: string; + + /** Stream tablet. */ + public tablet?: (topodata.ITabletAlias|null); + + /** Stream binlog_source. */ + public binlog_source?: (binlogdata.IBinlogSource|null); + + /** Stream position. */ + public position: string; + + /** Stream stop_position. */ + public stop_position: string; + + /** Stream state. */ + public state: string; + + /** Stream db_name. */ + public db_name: string; + + /** Stream transaction_timestamp. */ + public transaction_timestamp?: (vttime.ITime|null); + + /** Stream time_updated. */ + public time_updated?: (vttime.ITime|null); + + /** Stream message. */ + public message: string; + + /** Stream copy_states. */ + public copy_states: vtctldata.Workflow.Stream.ICopyState[]; + + /** Stream logs. */ + public logs: vtctldata.Workflow.Stream.ILog[]; + + /** Stream log_fetch_error. */ + public log_fetch_error: string; + + /** Stream tags. */ + public tags: string[]; + + /** + * Creates a new Stream instance using the specified properties. + * @param [properties] Properties to set + * @returns Stream instance + */ + public static create(properties?: vtctldata.Workflow.IStream): vtctldata.Workflow.Stream; + + /** + * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. + * @param message Stream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. + * @param message Stream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream; + + /** + * Decodes a Stream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream; + + /** + * Verifies a Stream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Stream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stream + */ + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream; + + /** + * Creates a plain object from a Stream message. Also converts values to other types if specified. + * @param message Stream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.Workflow.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this DeleteCellInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace Stream { - /** Properties of a DeleteCellsAliasRequest. */ - interface IDeleteCellsAliasRequest { + /** Properties of a CopyState. */ + interface ICopyState { - /** DeleteCellsAliasRequest name */ - name?: (string|null); - } + /** CopyState table */ + table?: (string|null); - /** Represents a DeleteCellsAliasRequest. */ - class DeleteCellsAliasRequest implements IDeleteCellsAliasRequest { + /** CopyState last_pk */ + last_pk?: (string|null); + } - /** - * Constructs a new DeleteCellsAliasRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteCellsAliasRequest); + /** Represents a CopyState. */ + class CopyState implements ICopyState { - /** DeleteCellsAliasRequest name. */ - public name: string; + /** + * Constructs a new CopyState. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.Workflow.Stream.ICopyState); - /** - * Creates a new DeleteCellsAliasRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteCellsAliasRequest instance - */ - public static create(properties?: vtctldata.IDeleteCellsAliasRequest): vtctldata.DeleteCellsAliasRequest; + /** CopyState table. */ + public table: string; - /** - * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. - * @param message DeleteCellsAliasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** CopyState last_pk. */ + public last_pk: string; - /** - * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. - * @param message DeleteCellsAliasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CopyState instance using the specified properties. + * @param [properties] Properties to set + * @returns CopyState instance + */ + public static create(properties?: vtctldata.Workflow.Stream.ICopyState): vtctldata.Workflow.Stream.CopyState; - /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteCellsAliasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellsAliasRequest; + /** + * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. + * @param message CopyState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteCellsAliasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellsAliasRequest; + /** + * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. + * @param message CopyState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a DeleteCellsAliasRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a CopyState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CopyState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream.CopyState; - /** - * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteCellsAliasRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellsAliasRequest; + /** + * Decodes a CopyState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CopyState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream.CopyState; - /** - * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. - * @param message DeleteCellsAliasRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a CopyState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this DeleteCellsAliasRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a CopyState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CopyState + */ + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream.CopyState; - /** Properties of a DeleteCellsAliasResponse. */ - interface IDeleteCellsAliasResponse { - } + /** + * Creates a plain object from a CopyState message. Also converts values to other types if specified. + * @param message CopyState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.Workflow.Stream.CopyState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a DeleteCellsAliasResponse. */ - class DeleteCellsAliasResponse implements IDeleteCellsAliasResponse { + /** + * Converts this CopyState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new DeleteCellsAliasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteCellsAliasResponse); + /** Properties of a Log. */ + interface ILog { - /** - * Creates a new DeleteCellsAliasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteCellsAliasResponse instance - */ - public static create(properties?: vtctldata.IDeleteCellsAliasResponse): vtctldata.DeleteCellsAliasResponse; + /** Log id */ + id?: (number|Long|null); - /** - * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. - * @param message DeleteCellsAliasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Log stream_id */ + stream_id?: (number|Long|null); - /** - * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. - * @param message DeleteCellsAliasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Log type */ + type?: (string|null); - /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellsAliasResponse; + /** Log state */ + state?: (string|null); - /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellsAliasResponse; + /** Log created_at */ + created_at?: (vttime.ITime|null); - /** - * Verifies a DeleteCellsAliasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Log updated_at */ + updated_at?: (vttime.ITime|null); - /** - * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteCellsAliasResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellsAliasResponse; + /** Log message */ + message?: (string|null); - /** - * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. - * @param message DeleteCellsAliasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Log count */ + count?: (number|Long|null); + } - /** - * Converts this DeleteCellsAliasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a Log. */ + class Log implements ILog { - /** Properties of a DeleteKeyspaceRequest. */ - interface IDeleteKeyspaceRequest { + /** + * Constructs a new Log. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.Workflow.Stream.ILog); - /** DeleteKeyspaceRequest keyspace */ - keyspace?: (string|null); + /** Log id. */ + public id: (number|Long); - /** DeleteKeyspaceRequest recursive */ - recursive?: (boolean|null); + /** Log stream_id. */ + public stream_id: (number|Long); - /** DeleteKeyspaceRequest force */ - force?: (boolean|null); - } + /** Log type. */ + public type: string; - /** Represents a DeleteKeyspaceRequest. */ - class DeleteKeyspaceRequest implements IDeleteKeyspaceRequest { + /** Log state. */ + public state: string; - /** - * Constructs a new DeleteKeyspaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteKeyspaceRequest); + /** Log created_at. */ + public created_at?: (vttime.ITime|null); - /** DeleteKeyspaceRequest keyspace. */ - public keyspace: string; + /** Log updated_at. */ + public updated_at?: (vttime.ITime|null); - /** DeleteKeyspaceRequest recursive. */ - public recursive: boolean; + /** Log message. */ + public message: string; - /** DeleteKeyspaceRequest force. */ - public force: boolean; + /** Log count. */ + public count: (number|Long); - /** - * Creates a new DeleteKeyspaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKeyspaceRequest instance - */ - public static create(properties?: vtctldata.IDeleteKeyspaceRequest): vtctldata.DeleteKeyspaceRequest; + /** + * Creates a new Log instance using the specified properties. + * @param [properties] Properties to set + * @returns Log instance + */ + public static create(properties?: vtctldata.Workflow.Stream.ILog): vtctldata.Workflow.Stream.Log; - /** - * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @param message DeleteKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Log message. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. + * @param message Log message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.Workflow.Stream.ILog, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @param message DeleteKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Log message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. + * @param message Log message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.Workflow.Stream.ILog, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceRequest; + /** + * Decodes a Log message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream.Log; - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceRequest; + /** + * Decodes a Log message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream.Log; - /** - * Verifies a DeleteKeyspaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Log message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteKeyspaceRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceRequest; + /** + * Creates a Log message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Log + */ + public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream.Log; - /** - * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. - * @param message DeleteKeyspaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Log message. Also converts values to other types if specified. + * @param message Log + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.Workflow.Stream.Log, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DeleteKeyspaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Log to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } - /** Properties of a DeleteKeyspaceResponse. */ - interface IDeleteKeyspaceResponse { + /** Properties of an AddCellInfoRequest. */ + interface IAddCellInfoRequest { + + /** AddCellInfoRequest name */ + name?: (string|null); + + /** AddCellInfoRequest cell_info */ + cell_info?: (topodata.ICellInfo|null); } - /** Represents a DeleteKeyspaceResponse. */ - class DeleteKeyspaceResponse implements IDeleteKeyspaceResponse { + /** Represents an AddCellInfoRequest. */ + class AddCellInfoRequest implements IAddCellInfoRequest { /** - * Constructs a new DeleteKeyspaceResponse. + * Constructs a new AddCellInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteKeyspaceResponse); + constructor(properties?: vtctldata.IAddCellInfoRequest); + + /** AddCellInfoRequest name. */ + public name: string; + + /** AddCellInfoRequest cell_info. */ + public cell_info?: (topodata.ICellInfo|null); /** - * Creates a new DeleteKeyspaceResponse instance using the specified properties. + * Creates a new AddCellInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteKeyspaceResponse instance + * @returns AddCellInfoRequest instance */ - public static create(properties?: vtctldata.IDeleteKeyspaceResponse): vtctldata.DeleteKeyspaceResponse; + public static create(properties?: vtctldata.IAddCellInfoRequest): vtctldata.AddCellInfoRequest; /** - * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @param message DeleteKeyspaceResponse message or plain object to encode + * Encodes the specified AddCellInfoRequest message. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. + * @param message AddCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IAddCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @param message DeleteKeyspaceResponse message or plain object to encode + * Encodes the specified AddCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. + * @param message AddCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IAddCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. + * Decodes an AddCellInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteKeyspaceResponse + * @returns AddCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellInfoRequest; /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes an AddCellInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteKeyspaceResponse + * @returns AddCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellInfoRequest; /** - * Verifies a DeleteKeyspaceResponse message. + * Verifies an AddCellInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteKeyspaceResponse + * @returns AddCellInfoRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.AddCellInfoRequest; /** - * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. - * @param message DeleteKeyspaceResponse + * Creates a plain object from an AddCellInfoRequest message. Also converts values to other types if specified. + * @param message AddCellInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.AddCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteKeyspaceResponse to JSON. + * Converts this AddCellInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteShardsRequest. */ - interface IDeleteShardsRequest { - - /** DeleteShardsRequest shards */ - shards?: (vtctldata.IShard[]|null); - - /** DeleteShardsRequest recursive */ - recursive?: (boolean|null); - - /** DeleteShardsRequest even_if_serving */ - even_if_serving?: (boolean|null); - - /** DeleteShardsRequest force */ - force?: (boolean|null); + /** Properties of an AddCellInfoResponse. */ + interface IAddCellInfoResponse { } - /** Represents a DeleteShardsRequest. */ - class DeleteShardsRequest implements IDeleteShardsRequest { + /** Represents an AddCellInfoResponse. */ + class AddCellInfoResponse implements IAddCellInfoResponse { /** - * Constructs a new DeleteShardsRequest. + * Constructs a new AddCellInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteShardsRequest); - - /** DeleteShardsRequest shards. */ - public shards: vtctldata.IShard[]; - - /** DeleteShardsRequest recursive. */ - public recursive: boolean; - - /** DeleteShardsRequest even_if_serving. */ - public even_if_serving: boolean; - - /** DeleteShardsRequest force. */ - public force: boolean; + constructor(properties?: vtctldata.IAddCellInfoResponse); /** - * Creates a new DeleteShardsRequest instance using the specified properties. + * Creates a new AddCellInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteShardsRequest instance + * @returns AddCellInfoResponse instance */ - public static create(properties?: vtctldata.IDeleteShardsRequest): vtctldata.DeleteShardsRequest; + public static create(properties?: vtctldata.IAddCellInfoResponse): vtctldata.AddCellInfoResponse; /** - * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @param message DeleteShardsRequest message or plain object to encode + * Encodes the specified AddCellInfoResponse message. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. + * @param message AddCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IAddCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @param message DeleteShardsRequest message or plain object to encode + * Encodes the specified AddCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. + * @param message AddCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IAddCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer. + * Decodes an AddCellInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteShardsRequest + * @returns AddCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellInfoResponse; /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. + * Decodes an AddCellInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteShardsRequest + * @returns AddCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellInfoResponse; /** - * Verifies a DeleteShardsRequest message. + * Verifies an AddCellInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteShardsRequest + * @returns AddCellInfoResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.AddCellInfoResponse; /** - * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. - * @param message DeleteShardsRequest + * Creates a plain object from an AddCellInfoResponse message. Also converts values to other types if specified. + * @param message AddCellInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteShardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.AddCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteShardsRequest to JSON. + * Converts this AddCellInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteShardsResponse. */ - interface IDeleteShardsResponse { + /** Properties of an AddCellsAliasRequest. */ + interface IAddCellsAliasRequest { + + /** AddCellsAliasRequest name */ + name?: (string|null); + + /** AddCellsAliasRequest cells */ + cells?: (string[]|null); } - /** Represents a DeleteShardsResponse. */ - class DeleteShardsResponse implements IDeleteShardsResponse { + /** Represents an AddCellsAliasRequest. */ + class AddCellsAliasRequest implements IAddCellsAliasRequest { /** - * Constructs a new DeleteShardsResponse. + * Constructs a new AddCellsAliasRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteShardsResponse); + constructor(properties?: vtctldata.IAddCellsAliasRequest); + + /** AddCellsAliasRequest name. */ + public name: string; + + /** AddCellsAliasRequest cells. */ + public cells: string[]; /** - * Creates a new DeleteShardsResponse instance using the specified properties. + * Creates a new AddCellsAliasRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteShardsResponse instance + * @returns AddCellsAliasRequest instance */ - public static create(properties?: vtctldata.IDeleteShardsResponse): vtctldata.DeleteShardsResponse; + public static create(properties?: vtctldata.IAddCellsAliasRequest): vtctldata.AddCellsAliasRequest; /** - * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @param message DeleteShardsResponse message or plain object to encode + * Encodes the specified AddCellsAliasRequest message. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. + * @param message AddCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IAddCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @param message DeleteShardsResponse message or plain object to encode + * Encodes the specified AddCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. + * @param message AddCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IAddCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer. + * Decodes an AddCellsAliasRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteShardsResponse + * @returns AddCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellsAliasRequest; /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. + * Decodes an AddCellsAliasRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteShardsResponse + * @returns AddCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellsAliasRequest; /** - * Verifies a DeleteShardsResponse message. + * Verifies an AddCellsAliasRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteShardsResponse + * @returns AddCellsAliasRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.AddCellsAliasRequest; /** - * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. - * @param message DeleteShardsResponse + * Creates a plain object from an AddCellsAliasRequest message. Also converts values to other types if specified. + * @param message AddCellsAliasRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteShardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.AddCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteShardsResponse to JSON. + * Converts this AddCellsAliasRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSrvVSchemaRequest. */ - interface IDeleteSrvVSchemaRequest { - - /** DeleteSrvVSchemaRequest cell */ - cell?: (string|null); + /** Properties of an AddCellsAliasResponse. */ + interface IAddCellsAliasResponse { } - /** Represents a DeleteSrvVSchemaRequest. */ - class DeleteSrvVSchemaRequest implements IDeleteSrvVSchemaRequest { + /** Represents an AddCellsAliasResponse. */ + class AddCellsAliasResponse implements IAddCellsAliasResponse { /** - * Constructs a new DeleteSrvVSchemaRequest. + * Constructs a new AddCellsAliasResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteSrvVSchemaRequest); - - /** DeleteSrvVSchemaRequest cell. */ - public cell: string; + constructor(properties?: vtctldata.IAddCellsAliasResponse); /** - * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. + * Creates a new AddCellsAliasResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSrvVSchemaRequest instance + * @returns AddCellsAliasResponse instance */ - public static create(properties?: vtctldata.IDeleteSrvVSchemaRequest): vtctldata.DeleteSrvVSchemaRequest; + public static create(properties?: vtctldata.IAddCellsAliasResponse): vtctldata.AddCellsAliasResponse; /** - * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. - * @param message DeleteSrvVSchemaRequest message or plain object to encode + * Encodes the specified AddCellsAliasResponse message. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. + * @param message AddCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IAddCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. - * @param message DeleteSrvVSchemaRequest message or plain object to encode + * Encodes the specified AddCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. + * @param message AddCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IAddCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. + * Decodes an AddCellsAliasResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSrvVSchemaRequest + * @returns AddCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteSrvVSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.AddCellsAliasResponse; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes an AddCellsAliasResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSrvVSchemaRequest + * @returns AddCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteSrvVSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.AddCellsAliasResponse; /** - * Verifies a DeleteSrvVSchemaRequest message. + * Verifies an AddCellsAliasResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSrvVSchemaRequest + * @returns AddCellsAliasResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteSrvVSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.AddCellsAliasResponse; /** - * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. - * @param message DeleteSrvVSchemaRequest + * Creates a plain object from an AddCellsAliasResponse message. Also converts values to other types if specified. + * @param message AddCellsAliasResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteSrvVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.AddCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSrvVSchemaRequest to JSON. + * Converts this AddCellsAliasResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSrvVSchemaResponse. */ - interface IDeleteSrvVSchemaResponse { + /** Properties of an ApplyRoutingRulesRequest. */ + interface IApplyRoutingRulesRequest { + + /** ApplyRoutingRulesRequest routing_rules */ + routing_rules?: (vschema.IRoutingRules|null); + + /** ApplyRoutingRulesRequest skip_rebuild */ + skip_rebuild?: (boolean|null); + + /** ApplyRoutingRulesRequest rebuild_cells */ + rebuild_cells?: (string[]|null); } - /** Represents a DeleteSrvVSchemaResponse. */ - class DeleteSrvVSchemaResponse implements IDeleteSrvVSchemaResponse { + /** Represents an ApplyRoutingRulesRequest. */ + class ApplyRoutingRulesRequest implements IApplyRoutingRulesRequest { /** - * Constructs a new DeleteSrvVSchemaResponse. + * Constructs a new ApplyRoutingRulesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteSrvVSchemaResponse); + constructor(properties?: vtctldata.IApplyRoutingRulesRequest); + + /** ApplyRoutingRulesRequest routing_rules. */ + public routing_rules?: (vschema.IRoutingRules|null); + + /** ApplyRoutingRulesRequest skip_rebuild. */ + public skip_rebuild: boolean; + + /** ApplyRoutingRulesRequest rebuild_cells. */ + public rebuild_cells: string[]; /** - * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. + * Creates a new ApplyRoutingRulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSrvVSchemaResponse instance + * @returns ApplyRoutingRulesRequest instance */ - public static create(properties?: vtctldata.IDeleteSrvVSchemaResponse): vtctldata.DeleteSrvVSchemaResponse; + public static create(properties?: vtctldata.IApplyRoutingRulesRequest): vtctldata.ApplyRoutingRulesRequest; /** - * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. - * @param message DeleteSrvVSchemaResponse message or plain object to encode + * Encodes the specified ApplyRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. + * @param message ApplyRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. - * @param message DeleteSrvVSchemaResponse message or plain object to encode + * Encodes the specified ApplyRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. + * @param message ApplyRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. + * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSrvVSchemaResponse + * @returns ApplyRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteSrvVSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyRoutingRulesRequest; /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSrvVSchemaResponse + * @returns ApplyRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteSrvVSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyRoutingRulesRequest; /** - * Verifies a DeleteSrvVSchemaResponse message. + * Verifies an ApplyRoutingRulesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSrvVSchemaResponse + * @returns ApplyRoutingRulesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteSrvVSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyRoutingRulesRequest; /** - * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. - * @param message DeleteSrvVSchemaResponse + * Creates a plain object from an ApplyRoutingRulesRequest message. Also converts values to other types if specified. + * @param message ApplyRoutingRulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteSrvVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSrvVSchemaResponse to JSON. + * Converts this ApplyRoutingRulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTabletsRequest. */ - interface IDeleteTabletsRequest { - - /** DeleteTabletsRequest tablet_aliases */ - tablet_aliases?: (topodata.ITabletAlias[]|null); - - /** DeleteTabletsRequest allow_primary */ - allow_primary?: (boolean|null); + /** Properties of an ApplyRoutingRulesResponse. */ + interface IApplyRoutingRulesResponse { } - /** Represents a DeleteTabletsRequest. */ - class DeleteTabletsRequest implements IDeleteTabletsRequest { + /** Represents an ApplyRoutingRulesResponse. */ + class ApplyRoutingRulesResponse implements IApplyRoutingRulesResponse { /** - * Constructs a new DeleteTabletsRequest. + * Constructs a new ApplyRoutingRulesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteTabletsRequest); - - /** DeleteTabletsRequest tablet_aliases. */ - public tablet_aliases: topodata.ITabletAlias[]; - - /** DeleteTabletsRequest allow_primary. */ - public allow_primary: boolean; + constructor(properties?: vtctldata.IApplyRoutingRulesResponse); /** - * Creates a new DeleteTabletsRequest instance using the specified properties. + * Creates a new ApplyRoutingRulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTabletsRequest instance + * @returns ApplyRoutingRulesResponse instance */ - public static create(properties?: vtctldata.IDeleteTabletsRequest): vtctldata.DeleteTabletsRequest; + public static create(properties?: vtctldata.IApplyRoutingRulesResponse): vtctldata.ApplyRoutingRulesResponse; /** - * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @param message DeleteTabletsRequest message or plain object to encode + * Encodes the specified ApplyRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. + * @param message ApplyRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @param message DeleteTabletsRequest message or plain object to encode + * Encodes the specified ApplyRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. + * @param message ApplyRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer. + * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTabletsRequest + * @returns ApplyRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyRoutingRulesResponse; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTabletsRequest + * @returns ApplyRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyRoutingRulesResponse; /** - * Verifies a DeleteTabletsRequest message. + * Verifies an ApplyRoutingRulesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTabletsRequest + * @returns ApplyRoutingRulesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyRoutingRulesResponse; /** - * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. - * @param message DeleteTabletsRequest + * Creates a plain object from an ApplyRoutingRulesResponse message. Also converts values to other types if specified. + * @param message ApplyRoutingRulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTabletsRequest to JSON. + * Converts this ApplyRoutingRulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTabletsResponse. */ - interface IDeleteTabletsResponse { + /** Properties of an ApplyShardRoutingRulesRequest. */ + interface IApplyShardRoutingRulesRequest { + + /** ApplyShardRoutingRulesRequest shard_routing_rules */ + shard_routing_rules?: (vschema.IShardRoutingRules|null); + + /** ApplyShardRoutingRulesRequest skip_rebuild */ + skip_rebuild?: (boolean|null); + + /** ApplyShardRoutingRulesRequest rebuild_cells */ + rebuild_cells?: (string[]|null); } - /** Represents a DeleteTabletsResponse. */ - class DeleteTabletsResponse implements IDeleteTabletsResponse { + /** Represents an ApplyShardRoutingRulesRequest. */ + class ApplyShardRoutingRulesRequest implements IApplyShardRoutingRulesRequest { /** - * Constructs a new DeleteTabletsResponse. + * Constructs a new ApplyShardRoutingRulesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IDeleteTabletsResponse); + constructor(properties?: vtctldata.IApplyShardRoutingRulesRequest); + + /** ApplyShardRoutingRulesRequest shard_routing_rules. */ + public shard_routing_rules?: (vschema.IShardRoutingRules|null); + + /** ApplyShardRoutingRulesRequest skip_rebuild. */ + public skip_rebuild: boolean; + + /** ApplyShardRoutingRulesRequest rebuild_cells. */ + public rebuild_cells: string[]; /** - * Creates a new DeleteTabletsResponse instance using the specified properties. + * Creates a new ApplyShardRoutingRulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTabletsResponse instance + * @returns ApplyShardRoutingRulesRequest instance */ - public static create(properties?: vtctldata.IDeleteTabletsResponse): vtctldata.DeleteTabletsResponse; + public static create(properties?: vtctldata.IApplyShardRoutingRulesRequest): vtctldata.ApplyShardRoutingRulesRequest; /** - * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @param message DeleteTabletsResponse message or plain object to encode + * Encodes the specified ApplyShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. + * @param message ApplyShardRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @param message DeleteTabletsResponse message or plain object to encode + * Encodes the specified ApplyShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. + * @param message ApplyShardRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer. + * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTabletsResponse + * @returns ApplyShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyShardRoutingRulesRequest; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTabletsResponse + * @returns ApplyShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyShardRoutingRulesRequest; /** - * Verifies a DeleteTabletsResponse message. + * Verifies an ApplyShardRoutingRulesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTabletsResponse + * @returns ApplyShardRoutingRulesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyShardRoutingRulesRequest; /** - * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. - * @param message DeleteTabletsResponse + * Creates a plain object from an ApplyShardRoutingRulesRequest message. Also converts values to other types if specified. + * @param message ApplyShardRoutingRulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.DeleteTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyShardRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTabletsResponse to JSON. + * Converts this ApplyShardRoutingRulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EmergencyReparentShardRequest. */ - interface IEmergencyReparentShardRequest { - - /** EmergencyReparentShardRequest keyspace */ - keyspace?: (string|null); - - /** EmergencyReparentShardRequest shard */ - shard?: (string|null); - - /** EmergencyReparentShardRequest new_primary */ - new_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardRequest ignore_replicas */ - ignore_replicas?: (topodata.ITabletAlias[]|null); - - /** EmergencyReparentShardRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); - - /** EmergencyReparentShardRequest prevent_cross_cell_promotion */ - prevent_cross_cell_promotion?: (boolean|null); + /** Properties of an ApplyShardRoutingRulesResponse. */ + interface IApplyShardRoutingRulesResponse { } - /** Represents an EmergencyReparentShardRequest. */ - class EmergencyReparentShardRequest implements IEmergencyReparentShardRequest { + /** Represents an ApplyShardRoutingRulesResponse. */ + class ApplyShardRoutingRulesResponse implements IApplyShardRoutingRulesResponse { /** - * Constructs a new EmergencyReparentShardRequest. + * Constructs a new ApplyShardRoutingRulesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IEmergencyReparentShardRequest); - - /** EmergencyReparentShardRequest keyspace. */ - public keyspace: string; - - /** EmergencyReparentShardRequest shard. */ - public shard: string; - - /** EmergencyReparentShardRequest new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardRequest ignore_replicas. */ - public ignore_replicas: topodata.ITabletAlias[]; - - /** EmergencyReparentShardRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); - - /** EmergencyReparentShardRequest prevent_cross_cell_promotion. */ - public prevent_cross_cell_promotion: boolean; + constructor(properties?: vtctldata.IApplyShardRoutingRulesResponse); /** - * Creates a new EmergencyReparentShardRequest instance using the specified properties. + * Creates a new ApplyShardRoutingRulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EmergencyReparentShardRequest instance + * @returns ApplyShardRoutingRulesResponse instance */ - public static create(properties?: vtctldata.IEmergencyReparentShardRequest): vtctldata.EmergencyReparentShardRequest; + public static create(properties?: vtctldata.IApplyShardRoutingRulesResponse): vtctldata.ApplyShardRoutingRulesResponse; /** - * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @param message EmergencyReparentShardRequest message or plain object to encode + * Encodes the specified ApplyShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. + * @param message ApplyShardRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @param message EmergencyReparentShardRequest message or plain object to encode + * Encodes the specified ApplyShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. + * @param message ApplyShardRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. + * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EmergencyReparentShardRequest + * @returns ApplyShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyShardRoutingRulesResponse; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EmergencyReparentShardRequest + * @returns ApplyShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyShardRoutingRulesResponse; /** - * Verifies an EmergencyReparentShardRequest message. + * Verifies an ApplyShardRoutingRulesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EmergencyReparentShardRequest + * @returns ApplyShardRoutingRulesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyShardRoutingRulesResponse; /** - * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. - * @param message EmergencyReparentShardRequest + * Creates a plain object from an ApplyShardRoutingRulesResponse message. Also converts values to other types if specified. + * @param message ApplyShardRoutingRulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.EmergencyReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyShardRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EmergencyReparentShardRequest to JSON. + * Converts this ApplyShardRoutingRulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EmergencyReparentShardResponse. */ - interface IEmergencyReparentShardResponse { + /** Properties of an ApplySchemaRequest. */ + interface IApplySchemaRequest { - /** EmergencyReparentShardResponse keyspace */ + /** ApplySchemaRequest keyspace */ keyspace?: (string|null); - /** EmergencyReparentShardResponse shard */ - shard?: (string|null); + /** ApplySchemaRequest allow_long_unavailability */ + allow_long_unavailability?: (boolean|null); - /** EmergencyReparentShardResponse promoted_primary */ - promoted_primary?: (topodata.ITabletAlias|null); + /** ApplySchemaRequest sql */ + sql?: (string[]|null); - /** EmergencyReparentShardResponse events */ - events?: (logutil.IEvent[]|null); + /** ApplySchemaRequest ddl_strategy */ + ddl_strategy?: (string|null); + + /** ApplySchemaRequest uuid_list */ + uuid_list?: (string[]|null); + + /** ApplySchemaRequest migration_context */ + migration_context?: (string|null); + + /** ApplySchemaRequest wait_replicas_timeout */ + wait_replicas_timeout?: (vttime.IDuration|null); + + /** ApplySchemaRequest skip_preflight */ + skip_preflight?: (boolean|null); + + /** ApplySchemaRequest caller_id */ + caller_id?: (vtrpc.ICallerID|null); } - /** Represents an EmergencyReparentShardResponse. */ - class EmergencyReparentShardResponse implements IEmergencyReparentShardResponse { + /** Represents an ApplySchemaRequest. */ + class ApplySchemaRequest implements IApplySchemaRequest { /** - * Constructs a new EmergencyReparentShardResponse. + * Constructs a new ApplySchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IEmergencyReparentShardResponse); + constructor(properties?: vtctldata.IApplySchemaRequest); - /** EmergencyReparentShardResponse keyspace. */ + /** ApplySchemaRequest keyspace. */ public keyspace: string; - /** EmergencyReparentShardResponse shard. */ - public shard: string; + /** ApplySchemaRequest allow_long_unavailability. */ + public allow_long_unavailability: boolean; - /** EmergencyReparentShardResponse promoted_primary. */ - public promoted_primary?: (topodata.ITabletAlias|null); + /** ApplySchemaRequest sql. */ + public sql: string[]; - /** EmergencyReparentShardResponse events. */ - public events: logutil.IEvent[]; + /** ApplySchemaRequest ddl_strategy. */ + public ddl_strategy: string; + + /** ApplySchemaRequest uuid_list. */ + public uuid_list: string[]; + + /** ApplySchemaRequest migration_context. */ + public migration_context: string; + + /** ApplySchemaRequest wait_replicas_timeout. */ + public wait_replicas_timeout?: (vttime.IDuration|null); + + /** ApplySchemaRequest skip_preflight. */ + public skip_preflight: boolean; + + /** ApplySchemaRequest caller_id. */ + public caller_id?: (vtrpc.ICallerID|null); /** - * Creates a new EmergencyReparentShardResponse instance using the specified properties. + * Creates a new ApplySchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EmergencyReparentShardResponse instance + * @returns ApplySchemaRequest instance */ - public static create(properties?: vtctldata.IEmergencyReparentShardResponse): vtctldata.EmergencyReparentShardResponse; + public static create(properties?: vtctldata.IApplySchemaRequest): vtctldata.ApplySchemaRequest; /** - * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @param message EmergencyReparentShardResponse message or plain object to encode + * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. + * @param message ApplySchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @param message EmergencyReparentShardResponse message or plain object to encode + * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. + * @param message ApplySchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. + * Decodes an ApplySchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EmergencyReparentShardResponse + * @returns ApplySchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplySchemaRequest; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EmergencyReparentShardResponse + * @returns ApplySchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplySchemaRequest; /** - * Verifies an EmergencyReparentShardResponse message. + * Verifies an ApplySchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EmergencyReparentShardResponse + * @returns ApplySchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplySchemaRequest; /** - * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. - * @param message EmergencyReparentShardResponse + * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. + * @param message ApplySchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.EmergencyReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplySchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EmergencyReparentShardResponse to JSON. + * Converts this ApplySchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteFetchAsAppRequest. */ - interface IExecuteFetchAsAppRequest { - - /** ExecuteFetchAsAppRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** ExecuteFetchAsAppRequest query */ - query?: (string|null); - - /** ExecuteFetchAsAppRequest max_rows */ - max_rows?: (number|Long|null); + /** Properties of an ApplySchemaResponse. */ + interface IApplySchemaResponse { - /** ExecuteFetchAsAppRequest use_pool */ - use_pool?: (boolean|null); + /** ApplySchemaResponse uuid_list */ + uuid_list?: (string[]|null); } - /** Represents an ExecuteFetchAsAppRequest. */ - class ExecuteFetchAsAppRequest implements IExecuteFetchAsAppRequest { + /** Represents an ApplySchemaResponse. */ + class ApplySchemaResponse implements IApplySchemaResponse { /** - * Constructs a new ExecuteFetchAsAppRequest. + * Constructs a new ApplySchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteFetchAsAppRequest); - - /** ExecuteFetchAsAppRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** ExecuteFetchAsAppRequest query. */ - public query: string; - - /** ExecuteFetchAsAppRequest max_rows. */ - public max_rows: (number|Long); + constructor(properties?: vtctldata.IApplySchemaResponse); - /** ExecuteFetchAsAppRequest use_pool. */ - public use_pool: boolean; + /** ApplySchemaResponse uuid_list. */ + public uuid_list: string[]; /** - * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. + * Creates a new ApplySchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteFetchAsAppRequest instance + * @returns ApplySchemaResponse instance */ - public static create(properties?: vtctldata.IExecuteFetchAsAppRequest): vtctldata.ExecuteFetchAsAppRequest; + public static create(properties?: vtctldata.IApplySchemaResponse): vtctldata.ApplySchemaResponse; /** - * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @param message ExecuteFetchAsAppRequest message or plain object to encode + * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. + * @param message ApplySchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @param message ExecuteFetchAsAppRequest message or plain object to encode + * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. + * @param message ApplySchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. + * Decodes an ApplySchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAppRequest + * @returns ApplySchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsAppRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplySchemaResponse; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAppRequest + * @returns ApplySchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsAppRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplySchemaResponse; /** - * Verifies an ExecuteFetchAsAppRequest message. + * Verifies an ApplySchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteFetchAsAppRequest + * @returns ApplySchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsAppRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplySchemaResponse; /** - * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAppRequest + * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. + * @param message ApplySchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteFetchAsAppRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplySchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteFetchAsAppRequest to JSON. + * Converts this ApplySchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteFetchAsAppResponse. */ - interface IExecuteFetchAsAppResponse { + /** Properties of an ApplyVSchemaRequest. */ + interface IApplyVSchemaRequest { - /** ExecuteFetchAsAppResponse result */ - result?: (query.IQueryResult|null); + /** ApplyVSchemaRequest keyspace */ + keyspace?: (string|null); + + /** ApplyVSchemaRequest skip_rebuild */ + skip_rebuild?: (boolean|null); + + /** ApplyVSchemaRequest dry_run */ + dry_run?: (boolean|null); + + /** ApplyVSchemaRequest cells */ + cells?: (string[]|null); + + /** ApplyVSchemaRequest v_schema */ + v_schema?: (vschema.IKeyspace|null); + + /** ApplyVSchemaRequest sql */ + sql?: (string|null); } - /** Represents an ExecuteFetchAsAppResponse. */ - class ExecuteFetchAsAppResponse implements IExecuteFetchAsAppResponse { + /** Represents an ApplyVSchemaRequest. */ + class ApplyVSchemaRequest implements IApplyVSchemaRequest { /** - * Constructs a new ExecuteFetchAsAppResponse. + * Constructs a new ApplyVSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteFetchAsAppResponse); + constructor(properties?: vtctldata.IApplyVSchemaRequest); - /** ExecuteFetchAsAppResponse result. */ - public result?: (query.IQueryResult|null); + /** ApplyVSchemaRequest keyspace. */ + public keyspace: string; + + /** ApplyVSchemaRequest skip_rebuild. */ + public skip_rebuild: boolean; + + /** ApplyVSchemaRequest dry_run. */ + public dry_run: boolean; + + /** ApplyVSchemaRequest cells. */ + public cells: string[]; + + /** ApplyVSchemaRequest v_schema. */ + public v_schema?: (vschema.IKeyspace|null); + + /** ApplyVSchemaRequest sql. */ + public sql: string; /** - * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. + * Creates a new ApplyVSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteFetchAsAppResponse instance + * @returns ApplyVSchemaRequest instance */ - public static create(properties?: vtctldata.IExecuteFetchAsAppResponse): vtctldata.ExecuteFetchAsAppResponse; + public static create(properties?: vtctldata.IApplyVSchemaRequest): vtctldata.ApplyVSchemaRequest; /** - * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @param message ExecuteFetchAsAppResponse message or plain object to encode + * Encodes the specified ApplyVSchemaRequest message. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. + * @param message ApplyVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @param message ExecuteFetchAsAppResponse message or plain object to encode + * Encodes the specified ApplyVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. + * @param message ApplyVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. + * Decodes an ApplyVSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAppResponse + * @returns ApplyVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsAppResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyVSchemaRequest; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyVSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAppResponse + * @returns ApplyVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsAppResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyVSchemaRequest; /** - * Verifies an ExecuteFetchAsAppResponse message. + * Verifies an ApplyVSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteFetchAsAppResponse + * @returns ApplyVSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsAppResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyVSchemaRequest; /** - * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAppResponse + * Creates a plain object from an ApplyVSchemaRequest message. Also converts values to other types if specified. + * @param message ApplyVSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteFetchAsAppResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteFetchAsAppResponse to JSON. + * Converts this ApplyVSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteFetchAsDBARequest. */ - interface IExecuteFetchAsDBARequest { - - /** ExecuteFetchAsDBARequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** ExecuteFetchAsDBARequest query */ - query?: (string|null); - - /** ExecuteFetchAsDBARequest max_rows */ - max_rows?: (number|Long|null); - - /** ExecuteFetchAsDBARequest disable_binlogs */ - disable_binlogs?: (boolean|null); + /** Properties of an ApplyVSchemaResponse. */ + interface IApplyVSchemaResponse { - /** ExecuteFetchAsDBARequest reload_schema */ - reload_schema?: (boolean|null); + /** ApplyVSchemaResponse v_schema */ + v_schema?: (vschema.IKeyspace|null); } - /** Represents an ExecuteFetchAsDBARequest. */ - class ExecuteFetchAsDBARequest implements IExecuteFetchAsDBARequest { + /** Represents an ApplyVSchemaResponse. */ + class ApplyVSchemaResponse implements IApplyVSchemaResponse { /** - * Constructs a new ExecuteFetchAsDBARequest. + * Constructs a new ApplyVSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteFetchAsDBARequest); - - /** ExecuteFetchAsDBARequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** ExecuteFetchAsDBARequest query. */ - public query: string; - - /** ExecuteFetchAsDBARequest max_rows. */ - public max_rows: (number|Long); - - /** ExecuteFetchAsDBARequest disable_binlogs. */ - public disable_binlogs: boolean; + constructor(properties?: vtctldata.IApplyVSchemaResponse); - /** ExecuteFetchAsDBARequest reload_schema. */ - public reload_schema: boolean; + /** ApplyVSchemaResponse v_schema. */ + public v_schema?: (vschema.IKeyspace|null); /** - * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. + * Creates a new ApplyVSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteFetchAsDBARequest instance + * @returns ApplyVSchemaResponse instance */ - public static create(properties?: vtctldata.IExecuteFetchAsDBARequest): vtctldata.ExecuteFetchAsDBARequest; + public static create(properties?: vtctldata.IApplyVSchemaResponse): vtctldata.ApplyVSchemaResponse; /** - * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. - * @param message ExecuteFetchAsDBARequest message or plain object to encode + * Encodes the specified ApplyVSchemaResponse message. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. + * @param message ApplyVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteFetchAsDBARequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IApplyVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. - * @param message ExecuteFetchAsDBARequest message or plain object to encode + * Encodes the specified ApplyVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. + * @param message ApplyVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteFetchAsDBARequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IApplyVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. + * Decodes an ApplyVSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsDBARequest + * @returns ApplyVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsDBARequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ApplyVSchemaResponse; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyVSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsDBARequest + * @returns ApplyVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsDBARequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ApplyVSchemaResponse; /** - * Verifies an ExecuteFetchAsDBARequest message. + * Verifies an ApplyVSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteFetchAsDBARequest + * @returns ApplyVSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsDBARequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ApplyVSchemaResponse; /** - * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. - * @param message ExecuteFetchAsDBARequest + * Creates a plain object from an ApplyVSchemaResponse message. Also converts values to other types if specified. + * @param message ApplyVSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteFetchAsDBARequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ApplyVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteFetchAsDBARequest to JSON. + * Converts this ApplyVSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteFetchAsDBAResponse. */ - interface IExecuteFetchAsDBAResponse { + /** Properties of a BackupRequest. */ + interface IBackupRequest { - /** ExecuteFetchAsDBAResponse result */ - result?: (query.IQueryResult|null); + /** BackupRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** BackupRequest allow_primary */ + allow_primary?: (boolean|null); + + /** BackupRequest concurrency */ + concurrency?: (number|Long|null); + + /** BackupRequest incremental_from_pos */ + incremental_from_pos?: (string|null); } - /** Represents an ExecuteFetchAsDBAResponse. */ - class ExecuteFetchAsDBAResponse implements IExecuteFetchAsDBAResponse { + /** Represents a BackupRequest. */ + class BackupRequest implements IBackupRequest { /** - * Constructs a new ExecuteFetchAsDBAResponse. + * Constructs a new BackupRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteFetchAsDBAResponse); + constructor(properties?: vtctldata.IBackupRequest); - /** ExecuteFetchAsDBAResponse result. */ - public result?: (query.IQueryResult|null); + /** BackupRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** BackupRequest allow_primary. */ + public allow_primary: boolean; + + /** BackupRequest concurrency. */ + public concurrency: (number|Long); + + /** BackupRequest incremental_from_pos. */ + public incremental_from_pos: string; /** - * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. + * Creates a new BackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteFetchAsDBAResponse instance + * @returns BackupRequest instance */ - public static create(properties?: vtctldata.IExecuteFetchAsDBAResponse): vtctldata.ExecuteFetchAsDBAResponse; + public static create(properties?: vtctldata.IBackupRequest): vtctldata.BackupRequest; /** - * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. - * @param message ExecuteFetchAsDBAResponse message or plain object to encode + * Encodes the specified BackupRequest message. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. + * @param message BackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteFetchAsDBAResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. - * @param message ExecuteFetchAsDBAResponse message or plain object to encode + * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. + * @param message BackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteFetchAsDBAResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. + * Decodes a BackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsDBAResponse + * @returns BackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsDBAResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupRequest; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. + * Decodes a BackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsDBAResponse + * @returns BackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsDBAResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupRequest; /** - * Verifies an ExecuteFetchAsDBAResponse message. + * Verifies a BackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteFetchAsDBAResponse + * @returns BackupRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsDBAResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.BackupRequest; /** - * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. - * @param message ExecuteFetchAsDBAResponse + * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. + * @param message BackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteFetchAsDBAResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.BackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteFetchAsDBAResponse to JSON. + * Converts this BackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteHookRequest. */ - interface IExecuteHookRequest { + /** Properties of a BackupResponse. */ + interface IBackupResponse { - /** ExecuteHookRequest tablet_alias */ + /** BackupResponse tablet_alias */ tablet_alias?: (topodata.ITabletAlias|null); - /** ExecuteHookRequest tablet_hook_request */ - tablet_hook_request?: (tabletmanagerdata.IExecuteHookRequest|null); + /** BackupResponse keyspace */ + keyspace?: (string|null); + + /** BackupResponse shard */ + shard?: (string|null); + + /** BackupResponse event */ + event?: (logutil.IEvent|null); } - /** Represents an ExecuteHookRequest. */ - class ExecuteHookRequest implements IExecuteHookRequest { + /** Represents a BackupResponse. */ + class BackupResponse implements IBackupResponse { /** - * Constructs a new ExecuteHookRequest. + * Constructs a new BackupResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteHookRequest); + constructor(properties?: vtctldata.IBackupResponse); - /** ExecuteHookRequest tablet_alias. */ + /** BackupResponse tablet_alias. */ public tablet_alias?: (topodata.ITabletAlias|null); - /** ExecuteHookRequest tablet_hook_request. */ - public tablet_hook_request?: (tabletmanagerdata.IExecuteHookRequest|null); + /** BackupResponse keyspace. */ + public keyspace: string; + + /** BackupResponse shard. */ + public shard: string; + + /** BackupResponse event. */ + public event?: (logutil.IEvent|null); /** - * Creates a new ExecuteHookRequest instance using the specified properties. + * Creates a new BackupResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteHookRequest instance + * @returns BackupResponse instance */ - public static create(properties?: vtctldata.IExecuteHookRequest): vtctldata.ExecuteHookRequest; + public static create(properties?: vtctldata.IBackupResponse): vtctldata.BackupResponse; /** - * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. - * @param message ExecuteHookRequest message or plain object to encode + * Encodes the specified BackupResponse message. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. + * @param message BackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. - * @param message ExecuteHookRequest message or plain object to encode + * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. + * @param message BackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer. + * Decodes a BackupResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteHookRequest + * @returns BackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteHookRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupResponse; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. + * Decodes a BackupResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteHookRequest + * @returns BackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteHookRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupResponse; /** - * Verifies an ExecuteHookRequest message. + * Verifies a BackupResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteHookRequest + * @returns BackupResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteHookRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.BackupResponse; /** - * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. - * @param message ExecuteHookRequest + * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. + * @param message BackupResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteHookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.BackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteHookRequest to JSON. + * Converts this BackupResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecuteHookResponse. */ - interface IExecuteHookResponse { + /** Properties of a BackupShardRequest. */ + interface IBackupShardRequest { - /** ExecuteHookResponse hook_result */ - hook_result?: (tabletmanagerdata.IExecuteHookResponse|null); + /** BackupShardRequest keyspace */ + keyspace?: (string|null); + + /** BackupShardRequest shard */ + shard?: (string|null); + + /** BackupShardRequest allow_primary */ + allow_primary?: (boolean|null); + + /** BackupShardRequest concurrency */ + concurrency?: (number|Long|null); } - /** Represents an ExecuteHookResponse. */ - class ExecuteHookResponse implements IExecuteHookResponse { + /** Represents a BackupShardRequest. */ + class BackupShardRequest implements IBackupShardRequest { /** - * Constructs a new ExecuteHookResponse. + * Constructs a new BackupShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IExecuteHookResponse); + constructor(properties?: vtctldata.IBackupShardRequest); - /** ExecuteHookResponse hook_result. */ - public hook_result?: (tabletmanagerdata.IExecuteHookResponse|null); + /** BackupShardRequest keyspace. */ + public keyspace: string; + + /** BackupShardRequest shard. */ + public shard: string; + + /** BackupShardRequest allow_primary. */ + public allow_primary: boolean; + + /** BackupShardRequest concurrency. */ + public concurrency: (number|Long); /** - * Creates a new ExecuteHookResponse instance using the specified properties. + * Creates a new BackupShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExecuteHookResponse instance + * @returns BackupShardRequest instance */ - public static create(properties?: vtctldata.IExecuteHookResponse): vtctldata.ExecuteHookResponse; + public static create(properties?: vtctldata.IBackupShardRequest): vtctldata.BackupShardRequest; /** - * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. - * @param message ExecuteHookResponse message or plain object to encode + * Encodes the specified BackupShardRequest message. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. + * @param message BackupShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IBackupShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. - * @param message ExecuteHookResponse message or plain object to encode + * Encodes the specified BackupShardRequest message, length delimited. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. + * @param message BackupShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IBackupShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer. + * Decodes a BackupShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecuteHookResponse + * @returns BackupShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteHookResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.BackupShardRequest; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. + * Decodes a BackupShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecuteHookResponse + * @returns BackupShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteHookResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.BackupShardRequest; /** - * Verifies an ExecuteHookResponse message. + * Verifies a BackupShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BackupShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecuteHookResponse + * @returns BackupShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteHookResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.BackupShardRequest; /** - * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. - * @param message ExecuteHookResponse + * Creates a plain object from a BackupShardRequest message. Also converts values to other types if specified. + * @param message BackupShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ExecuteHookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.BackupShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecuteHookResponse to JSON. + * Converts this BackupShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FindAllShardsInKeyspaceRequest. */ - interface IFindAllShardsInKeyspaceRequest { + /** Properties of a ChangeTabletTypeRequest. */ + interface IChangeTabletTypeRequest { - /** FindAllShardsInKeyspaceRequest keyspace */ - keyspace?: (string|null); + /** ChangeTabletTypeRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** ChangeTabletTypeRequest db_type */ + db_type?: (topodata.TabletType|null); + + /** ChangeTabletTypeRequest dry_run */ + dry_run?: (boolean|null); } - /** Represents a FindAllShardsInKeyspaceRequest. */ - class FindAllShardsInKeyspaceRequest implements IFindAllShardsInKeyspaceRequest { + /** Represents a ChangeTabletTypeRequest. */ + class ChangeTabletTypeRequest implements IChangeTabletTypeRequest { /** - * Constructs a new FindAllShardsInKeyspaceRequest. + * Constructs a new ChangeTabletTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IFindAllShardsInKeyspaceRequest); + constructor(properties?: vtctldata.IChangeTabletTypeRequest); - /** FindAllShardsInKeyspaceRequest keyspace. */ - public keyspace: string; + /** ChangeTabletTypeRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** ChangeTabletTypeRequest db_type. */ + public db_type: topodata.TabletType; + + /** ChangeTabletTypeRequest dry_run. */ + public dry_run: boolean; /** - * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. + * Creates a new ChangeTabletTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FindAllShardsInKeyspaceRequest instance + * @returns ChangeTabletTypeRequest instance */ - public static create(properties?: vtctldata.IFindAllShardsInKeyspaceRequest): vtctldata.FindAllShardsInKeyspaceRequest; + public static create(properties?: vtctldata.IChangeTabletTypeRequest): vtctldata.ChangeTabletTypeRequest; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @param message FindAllShardsInKeyspaceRequest message or plain object to encode + * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. + * @param message ChangeTabletTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @param message FindAllShardsInKeyspaceRequest message or plain object to encode + * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. + * @param message ChangeTabletTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. + * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FindAllShardsInKeyspaceRequest + * @returns ChangeTabletTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeRequest; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindAllShardsInKeyspaceRequest + * @returns ChangeTabletTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeRequest; /** - * Verifies a FindAllShardsInKeyspaceRequest message. + * Verifies a ChangeTabletTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FindAllShardsInKeyspaceRequest + * @returns ChangeTabletTypeRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeRequest; /** - * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. - * @param message FindAllShardsInKeyspaceRequest + * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. + * @param message ChangeTabletTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.FindAllShardsInKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ChangeTabletTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FindAllShardsInKeyspaceRequest to JSON. + * Converts this ChangeTabletTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FindAllShardsInKeyspaceResponse. */ - interface IFindAllShardsInKeyspaceResponse { + /** Properties of a ChangeTabletTypeResponse. */ + interface IChangeTabletTypeResponse { - /** FindAllShardsInKeyspaceResponse shards */ - shards?: ({ [k: string]: vtctldata.IShard }|null); + /** ChangeTabletTypeResponse before_tablet */ + before_tablet?: (topodata.ITablet|null); + + /** ChangeTabletTypeResponse after_tablet */ + after_tablet?: (topodata.ITablet|null); + + /** ChangeTabletTypeResponse was_dry_run */ + was_dry_run?: (boolean|null); } - /** Represents a FindAllShardsInKeyspaceResponse. */ - class FindAllShardsInKeyspaceResponse implements IFindAllShardsInKeyspaceResponse { + /** Represents a ChangeTabletTypeResponse. */ + class ChangeTabletTypeResponse implements IChangeTabletTypeResponse { /** - * Constructs a new FindAllShardsInKeyspaceResponse. + * Constructs a new ChangeTabletTypeResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IFindAllShardsInKeyspaceResponse); + constructor(properties?: vtctldata.IChangeTabletTypeResponse); - /** FindAllShardsInKeyspaceResponse shards. */ - public shards: { [k: string]: vtctldata.IShard }; + /** ChangeTabletTypeResponse before_tablet. */ + public before_tablet?: (topodata.ITablet|null); + + /** ChangeTabletTypeResponse after_tablet. */ + public after_tablet?: (topodata.ITablet|null); + + /** ChangeTabletTypeResponse was_dry_run. */ + public was_dry_run: boolean; /** - * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. + * Creates a new ChangeTabletTypeResponse instance using the specified properties. * @param [properties] Properties to set - * @returns FindAllShardsInKeyspaceResponse instance + * @returns ChangeTabletTypeResponse instance */ - public static create(properties?: vtctldata.IFindAllShardsInKeyspaceResponse): vtctldata.FindAllShardsInKeyspaceResponse; + public static create(properties?: vtctldata.IChangeTabletTypeResponse): vtctldata.ChangeTabletTypeResponse; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @param message FindAllShardsInKeyspaceResponse message or plain object to encode + * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. + * @param message ChangeTabletTypeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @param message FindAllShardsInKeyspaceResponse message or plain object to encode + * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. + * @param message ChangeTabletTypeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. + * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FindAllShardsInKeyspaceResponse + * @returns ChangeTabletTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeResponse; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindAllShardsInKeyspaceResponse + * @returns ChangeTabletTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeResponse; /** - * Verifies a FindAllShardsInKeyspaceResponse message. + * Verifies a ChangeTabletTypeResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FindAllShardsInKeyspaceResponse + * @returns ChangeTabletTypeResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeResponse; /** - * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. - * @param message FindAllShardsInKeyspaceResponse + * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. + * @param message ChangeTabletTypeResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.FindAllShardsInKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ChangeTabletTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FindAllShardsInKeyspaceResponse to JSON. + * Converts this ChangeTabletTypeResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetBackupsRequest. */ - interface IGetBackupsRequest { + /** Properties of a CreateKeyspaceRequest. */ + interface ICreateKeyspaceRequest { - /** GetBackupsRequest keyspace */ - keyspace?: (string|null); + /** CreateKeyspaceRequest name */ + name?: (string|null); - /** GetBackupsRequest shard */ - shard?: (string|null); + /** CreateKeyspaceRequest force */ + force?: (boolean|null); - /** GetBackupsRequest limit */ - limit?: (number|null); + /** CreateKeyspaceRequest allow_empty_v_schema */ + allow_empty_v_schema?: (boolean|null); - /** GetBackupsRequest detailed */ - detailed?: (boolean|null); + /** CreateKeyspaceRequest served_froms */ + served_froms?: (topodata.Keyspace.IServedFrom[]|null); - /** GetBackupsRequest detailed_limit */ - detailed_limit?: (number|null); + /** CreateKeyspaceRequest type */ + type?: (topodata.KeyspaceType|null); + + /** CreateKeyspaceRequest base_keyspace */ + base_keyspace?: (string|null); + + /** CreateKeyspaceRequest snapshot_time */ + snapshot_time?: (vttime.ITime|null); + + /** CreateKeyspaceRequest durability_policy */ + durability_policy?: (string|null); + + /** CreateKeyspaceRequest sidecar_db_name */ + sidecar_db_name?: (string|null); } - /** Represents a GetBackupsRequest. */ - class GetBackupsRequest implements IGetBackupsRequest { + /** Represents a CreateKeyspaceRequest. */ + class CreateKeyspaceRequest implements ICreateKeyspaceRequest { /** - * Constructs a new GetBackupsRequest. + * Constructs a new CreateKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetBackupsRequest); + constructor(properties?: vtctldata.ICreateKeyspaceRequest); - /** GetBackupsRequest keyspace. */ - public keyspace: string; + /** CreateKeyspaceRequest name. */ + public name: string; - /** GetBackupsRequest shard. */ - public shard: string; + /** CreateKeyspaceRequest force. */ + public force: boolean; - /** GetBackupsRequest limit. */ - public limit: number; + /** CreateKeyspaceRequest allow_empty_v_schema. */ + public allow_empty_v_schema: boolean; - /** GetBackupsRequest detailed. */ - public detailed: boolean; + /** CreateKeyspaceRequest served_froms. */ + public served_froms: topodata.Keyspace.IServedFrom[]; - /** GetBackupsRequest detailed_limit. */ - public detailed_limit: number; + /** CreateKeyspaceRequest type. */ + public type: topodata.KeyspaceType; + + /** CreateKeyspaceRequest base_keyspace. */ + public base_keyspace: string; + + /** CreateKeyspaceRequest snapshot_time. */ + public snapshot_time?: (vttime.ITime|null); + + /** CreateKeyspaceRequest durability_policy. */ + public durability_policy: string; + + /** CreateKeyspaceRequest sidecar_db_name. */ + public sidecar_db_name: string; /** - * Creates a new GetBackupsRequest instance using the specified properties. + * Creates a new CreateKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetBackupsRequest instance + * @returns CreateKeyspaceRequest instance */ - public static create(properties?: vtctldata.IGetBackupsRequest): vtctldata.GetBackupsRequest; + public static create(properties?: vtctldata.ICreateKeyspaceRequest): vtctldata.CreateKeyspaceRequest; /** - * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @param message GetBackupsRequest message or plain object to encode + * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * @param message CreateKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @param message GetBackupsRequest message or plain object to encode + * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * @param message CreateKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBackupsRequest + * @returns CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceRequest; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBackupsRequest + * @returns CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceRequest; /** - * Verifies a GetBackupsRequest message. + * Verifies a CreateKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBackupsRequest + * @returns CreateKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceRequest; /** - * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. - * @param message GetBackupsRequest + * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. + * @param message CreateKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.CreateKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBackupsRequest to JSON. + * Converts this CreateKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetBackupsResponse. */ - interface IGetBackupsResponse { + /** Properties of a CreateKeyspaceResponse. */ + interface ICreateKeyspaceResponse { - /** GetBackupsResponse backups */ - backups?: (mysqlctl.IBackupInfo[]|null); + /** CreateKeyspaceResponse keyspace */ + keyspace?: (vtctldata.IKeyspace|null); } - /** Represents a GetBackupsResponse. */ - class GetBackupsResponse implements IGetBackupsResponse { + /** Represents a CreateKeyspaceResponse. */ + class CreateKeyspaceResponse implements ICreateKeyspaceResponse { /** - * Constructs a new GetBackupsResponse. + * Constructs a new CreateKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetBackupsResponse); + constructor(properties?: vtctldata.ICreateKeyspaceResponse); - /** GetBackupsResponse backups. */ - public backups: mysqlctl.IBackupInfo[]; + /** CreateKeyspaceResponse keyspace. */ + public keyspace?: (vtctldata.IKeyspace|null); /** - * Creates a new GetBackupsResponse instance using the specified properties. + * Creates a new CreateKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetBackupsResponse instance + * @returns CreateKeyspaceResponse instance */ - public static create(properties?: vtctldata.IGetBackupsResponse): vtctldata.GetBackupsResponse; + public static create(properties?: vtctldata.ICreateKeyspaceResponse): vtctldata.CreateKeyspaceResponse; /** - * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @param message GetBackupsResponse message or plain object to encode + * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * @param message CreateKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @param message GetBackupsResponse message or plain object to encode + * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * @param message CreateKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBackupsResponse + * @returns CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceResponse; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBackupsResponse + * @returns CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceResponse; /** - * Verifies a GetBackupsResponse message. + * Verifies a CreateKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBackupsResponse + * @returns CreateKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceResponse; /** - * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. - * @param message GetBackupsResponse + * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. + * @param message CreateKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.CreateKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBackupsResponse to JSON. + * Converts this CreateKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellInfoRequest. */ - interface IGetCellInfoRequest { + /** Properties of a CreateShardRequest. */ + interface ICreateShardRequest { - /** GetCellInfoRequest cell */ - cell?: (string|null); + /** CreateShardRequest keyspace */ + keyspace?: (string|null); + + /** CreateShardRequest shard_name */ + shard_name?: (string|null); + + /** CreateShardRequest force */ + force?: (boolean|null); + + /** CreateShardRequest include_parent */ + include_parent?: (boolean|null); } - /** Represents a GetCellInfoRequest. */ - class GetCellInfoRequest implements IGetCellInfoRequest { + /** Represents a CreateShardRequest. */ + class CreateShardRequest implements ICreateShardRequest { /** - * Constructs a new GetCellInfoRequest. + * Constructs a new CreateShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellInfoRequest); + constructor(properties?: vtctldata.ICreateShardRequest); - /** GetCellInfoRequest cell. */ - public cell: string; + /** CreateShardRequest keyspace. */ + public keyspace: string; + + /** CreateShardRequest shard_name. */ + public shard_name: string; + + /** CreateShardRequest force. */ + public force: boolean; + + /** CreateShardRequest include_parent. */ + public include_parent: boolean; /** - * Creates a new GetCellInfoRequest instance using the specified properties. + * Creates a new CreateShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellInfoRequest instance + * @returns CreateShardRequest instance */ - public static create(properties?: vtctldata.IGetCellInfoRequest): vtctldata.GetCellInfoRequest; + public static create(properties?: vtctldata.ICreateShardRequest): vtctldata.CreateShardRequest; /** - * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @param message GetCellInfoRequest message or plain object to encode + * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * @param message CreateShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @param message GetCellInfoRequest message or plain object to encode + * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * @param message CreateShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer. + * Decodes a CreateShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellInfoRequest + * @returns CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardRequest; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellInfoRequest + * @returns CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardRequest; /** - * Verifies a GetCellInfoRequest message. + * Verifies a CreateShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellInfoRequest + * @returns CreateShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardRequest; /** - * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. - * @param message GetCellInfoRequest + * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. + * @param message CreateShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.CreateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellInfoRequest to JSON. + * Converts this CreateShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellInfoResponse. */ - interface IGetCellInfoResponse { + /** Properties of a CreateShardResponse. */ + interface ICreateShardResponse { - /** GetCellInfoResponse cell_info */ - cell_info?: (topodata.ICellInfo|null); + /** CreateShardResponse keyspace */ + keyspace?: (vtctldata.IKeyspace|null); + + /** CreateShardResponse shard */ + shard?: (vtctldata.IShard|null); + + /** CreateShardResponse shard_already_exists */ + shard_already_exists?: (boolean|null); } - /** Represents a GetCellInfoResponse. */ - class GetCellInfoResponse implements IGetCellInfoResponse { + /** Represents a CreateShardResponse. */ + class CreateShardResponse implements ICreateShardResponse { /** - * Constructs a new GetCellInfoResponse. + * Constructs a new CreateShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellInfoResponse); + constructor(properties?: vtctldata.ICreateShardResponse); - /** GetCellInfoResponse cell_info. */ - public cell_info?: (topodata.ICellInfo|null); + /** CreateShardResponse keyspace. */ + public keyspace?: (vtctldata.IKeyspace|null); + + /** CreateShardResponse shard. */ + public shard?: (vtctldata.IShard|null); + + /** CreateShardResponse shard_already_exists. */ + public shard_already_exists: boolean; /** - * Creates a new GetCellInfoResponse instance using the specified properties. + * Creates a new CreateShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellInfoResponse instance + * @returns CreateShardResponse instance */ - public static create(properties?: vtctldata.IGetCellInfoResponse): vtctldata.GetCellInfoResponse; + public static create(properties?: vtctldata.ICreateShardResponse): vtctldata.CreateShardResponse; /** - * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @param message GetCellInfoResponse message or plain object to encode + * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * @param message CreateShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @param message GetCellInfoResponse message or plain object to encode + * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * @param message CreateShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer. + * Decodes a CreateShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellInfoResponse + * @returns CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardResponse; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellInfoResponse + * @returns CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardResponse; /** - * Verifies a GetCellInfoResponse message. + * Verifies a CreateShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellInfoResponse + * @returns CreateShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardResponse; /** - * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. - * @param message GetCellInfoResponse + * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. + * @param message CreateShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.CreateShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellInfoResponse to JSON. + * Converts this CreateShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellInfoNamesRequest. */ - interface IGetCellInfoNamesRequest { + /** Properties of a DeleteCellInfoRequest. */ + interface IDeleteCellInfoRequest { + + /** DeleteCellInfoRequest name */ + name?: (string|null); + + /** DeleteCellInfoRequest force */ + force?: (boolean|null); } - /** Represents a GetCellInfoNamesRequest. */ - class GetCellInfoNamesRequest implements IGetCellInfoNamesRequest { + /** Represents a DeleteCellInfoRequest. */ + class DeleteCellInfoRequest implements IDeleteCellInfoRequest { /** - * Constructs a new GetCellInfoNamesRequest. + * Constructs a new DeleteCellInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellInfoNamesRequest); + constructor(properties?: vtctldata.IDeleteCellInfoRequest); + + /** DeleteCellInfoRequest name. */ + public name: string; + + /** DeleteCellInfoRequest force. */ + public force: boolean; /** - * Creates a new GetCellInfoNamesRequest instance using the specified properties. + * Creates a new DeleteCellInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellInfoNamesRequest instance + * @returns DeleteCellInfoRequest instance */ - public static create(properties?: vtctldata.IGetCellInfoNamesRequest): vtctldata.GetCellInfoNamesRequest; + public static create(properties?: vtctldata.IDeleteCellInfoRequest): vtctldata.DeleteCellInfoRequest; /** - * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @param message GetCellInfoNamesRequest message or plain object to encode + * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * @param message DeleteCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @param message GetCellInfoNamesRequest message or plain object to encode + * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * @param message DeleteCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellInfoNamesRequest + * @returns DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellInfoRequest; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellInfoNamesRequest + * @returns DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellInfoRequest; /** - * Verifies a GetCellInfoNamesRequest message. + * Verifies a DeleteCellInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellInfoNamesRequest + * @returns DeleteCellInfoRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellInfoRequest; /** - * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. - * @param message GetCellInfoNamesRequest + * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. + * @param message DeleteCellInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellInfoNamesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellInfoNamesRequest to JSON. + * Converts this DeleteCellInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellInfoNamesResponse. */ - interface IGetCellInfoNamesResponse { - - /** GetCellInfoNamesResponse names */ - names?: (string[]|null); + /** Properties of a DeleteCellInfoResponse. */ + interface IDeleteCellInfoResponse { } - /** Represents a GetCellInfoNamesResponse. */ - class GetCellInfoNamesResponse implements IGetCellInfoNamesResponse { + /** Represents a DeleteCellInfoResponse. */ + class DeleteCellInfoResponse implements IDeleteCellInfoResponse { /** - * Constructs a new GetCellInfoNamesResponse. + * Constructs a new DeleteCellInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellInfoNamesResponse); - - /** GetCellInfoNamesResponse names. */ - public names: string[]; + constructor(properties?: vtctldata.IDeleteCellInfoResponse); /** - * Creates a new GetCellInfoNamesResponse instance using the specified properties. + * Creates a new DeleteCellInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellInfoNamesResponse instance + * @returns DeleteCellInfoResponse instance */ - public static create(properties?: vtctldata.IGetCellInfoNamesResponse): vtctldata.GetCellInfoNamesResponse; + public static create(properties?: vtctldata.IDeleteCellInfoResponse): vtctldata.DeleteCellInfoResponse; /** - * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @param message GetCellInfoNamesResponse message or plain object to encode + * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * @param message DeleteCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @param message GetCellInfoNamesResponse message or plain object to encode + * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * @param message DeleteCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellInfoNamesResponse + * @returns DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellInfoResponse; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellInfoNamesResponse + * @returns DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellInfoResponse; /** - * Verifies a GetCellInfoNamesResponse message. + * Verifies a DeleteCellInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellInfoNamesResponse + * @returns DeleteCellInfoResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellInfoResponse; /** - * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. - * @param message GetCellInfoNamesResponse + * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. + * @param message DeleteCellInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellInfoNamesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellInfoNamesResponse to JSON. + * Converts this DeleteCellInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellsAliasesRequest. */ - interface IGetCellsAliasesRequest { + /** Properties of a DeleteCellsAliasRequest. */ + interface IDeleteCellsAliasRequest { + + /** DeleteCellsAliasRequest name */ + name?: (string|null); } - /** Represents a GetCellsAliasesRequest. */ - class GetCellsAliasesRequest implements IGetCellsAliasesRequest { + /** Represents a DeleteCellsAliasRequest. */ + class DeleteCellsAliasRequest implements IDeleteCellsAliasRequest { /** - * Constructs a new GetCellsAliasesRequest. + * Constructs a new DeleteCellsAliasRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellsAliasesRequest); + constructor(properties?: vtctldata.IDeleteCellsAliasRequest); + + /** DeleteCellsAliasRequest name. */ + public name: string; /** - * Creates a new GetCellsAliasesRequest instance using the specified properties. + * Creates a new DeleteCellsAliasRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellsAliasesRequest instance + * @returns DeleteCellsAliasRequest instance */ - public static create(properties?: vtctldata.IGetCellsAliasesRequest): vtctldata.GetCellsAliasesRequest; + public static create(properties?: vtctldata.IDeleteCellsAliasRequest): vtctldata.DeleteCellsAliasRequest; /** - * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @param message GetCellsAliasesRequest message or plain object to encode + * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * @param message DeleteCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @param message GetCellsAliasesRequest message or plain object to encode + * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * @param message DeleteCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellsAliasesRequest + * @returns DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellsAliasRequest; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellsAliasesRequest + * @returns DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellsAliasRequest; /** - * Verifies a GetCellsAliasesRequest message. + * Verifies a DeleteCellsAliasRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellsAliasesRequest + * @returns DeleteCellsAliasRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellsAliasRequest; /** - * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. - * @param message GetCellsAliasesRequest + * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. + * @param message DeleteCellsAliasRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellsAliasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellsAliasesRequest to JSON. + * Converts this DeleteCellsAliasRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCellsAliasesResponse. */ - interface IGetCellsAliasesResponse { - - /** GetCellsAliasesResponse aliases */ - aliases?: ({ [k: string]: topodata.ICellsAlias }|null); + /** Properties of a DeleteCellsAliasResponse. */ + interface IDeleteCellsAliasResponse { } - /** Represents a GetCellsAliasesResponse. */ - class GetCellsAliasesResponse implements IGetCellsAliasesResponse { + /** Represents a DeleteCellsAliasResponse. */ + class DeleteCellsAliasResponse implements IDeleteCellsAliasResponse { /** - * Constructs a new GetCellsAliasesResponse. + * Constructs a new DeleteCellsAliasResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetCellsAliasesResponse); - - /** GetCellsAliasesResponse aliases. */ - public aliases: { [k: string]: topodata.ICellsAlias }; + constructor(properties?: vtctldata.IDeleteCellsAliasResponse); /** - * Creates a new GetCellsAliasesResponse instance using the specified properties. + * Creates a new DeleteCellsAliasResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetCellsAliasesResponse instance + * @returns DeleteCellsAliasResponse instance */ - public static create(properties?: vtctldata.IGetCellsAliasesResponse): vtctldata.GetCellsAliasesResponse; + public static create(properties?: vtctldata.IDeleteCellsAliasResponse): vtctldata.DeleteCellsAliasResponse; /** - * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @param message GetCellsAliasesResponse message or plain object to encode + * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. + * @param message DeleteCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @param message GetCellsAliasesResponse message or plain object to encode + * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. + * @param message DeleteCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCellsAliasesResponse + * @returns DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteCellsAliasResponse; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCellsAliasesResponse + * @returns DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteCellsAliasResponse; /** - * Verifies a GetCellsAliasesResponse message. + * Verifies a DeleteCellsAliasResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCellsAliasesResponse + * @returns DeleteCellsAliasResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteCellsAliasResponse; /** - * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. - * @param message GetCellsAliasesResponse + * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. + * @param message DeleteCellsAliasResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetCellsAliasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCellsAliasesResponse to JSON. + * Converts this DeleteCellsAliasResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetFullStatusRequest. */ - interface IGetFullStatusRequest { + /** Properties of a DeleteKeyspaceRequest. */ + interface IDeleteKeyspaceRequest { - /** GetFullStatusRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** DeleteKeyspaceRequest keyspace */ + keyspace?: (string|null); + + /** DeleteKeyspaceRequest recursive */ + recursive?: (boolean|null); + + /** DeleteKeyspaceRequest force */ + force?: (boolean|null); } - /** Represents a GetFullStatusRequest. */ - class GetFullStatusRequest implements IGetFullStatusRequest { + /** Represents a DeleteKeyspaceRequest. */ + class DeleteKeyspaceRequest implements IDeleteKeyspaceRequest { /** - * Constructs a new GetFullStatusRequest. + * Constructs a new DeleteKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetFullStatusRequest); + constructor(properties?: vtctldata.IDeleteKeyspaceRequest); - /** GetFullStatusRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** DeleteKeyspaceRequest keyspace. */ + public keyspace: string; + + /** DeleteKeyspaceRequest recursive. */ + public recursive: boolean; + + /** DeleteKeyspaceRequest force. */ + public force: boolean; /** - * Creates a new GetFullStatusRequest instance using the specified properties. + * Creates a new DeleteKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFullStatusRequest instance + * @returns DeleteKeyspaceRequest instance */ - public static create(properties?: vtctldata.IGetFullStatusRequest): vtctldata.GetFullStatusRequest; + public static create(properties?: vtctldata.IDeleteKeyspaceRequest): vtctldata.DeleteKeyspaceRequest; /** - * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. - * @param message GetFullStatusRequest message or plain object to encode + * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. + * @param message DeleteKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. - * @param message GetFullStatusRequest message or plain object to encode + * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. + * @param message DeleteKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFullStatusRequest + * @returns DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetFullStatusRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceRequest; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFullStatusRequest + * @returns DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetFullStatusRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceRequest; /** - * Verifies a GetFullStatusRequest message. + * Verifies a DeleteKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFullStatusRequest + * @returns DeleteKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetFullStatusRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceRequest; /** - * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. - * @param message GetFullStatusRequest + * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. + * @param message DeleteKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetFullStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFullStatusRequest to JSON. + * Converts this DeleteKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetFullStatusResponse. */ - interface IGetFullStatusResponse { - - /** GetFullStatusResponse status */ - status?: (replicationdata.IFullStatus|null); + /** Properties of a DeleteKeyspaceResponse. */ + interface IDeleteKeyspaceResponse { } - /** Represents a GetFullStatusResponse. */ - class GetFullStatusResponse implements IGetFullStatusResponse { + /** Represents a DeleteKeyspaceResponse. */ + class DeleteKeyspaceResponse implements IDeleteKeyspaceResponse { /** - * Constructs a new GetFullStatusResponse. + * Constructs a new DeleteKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetFullStatusResponse); - - /** GetFullStatusResponse status. */ - public status?: (replicationdata.IFullStatus|null); + constructor(properties?: vtctldata.IDeleteKeyspaceResponse); /** - * Creates a new GetFullStatusResponse instance using the specified properties. + * Creates a new DeleteKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetFullStatusResponse instance + * @returns DeleteKeyspaceResponse instance */ - public static create(properties?: vtctldata.IGetFullStatusResponse): vtctldata.GetFullStatusResponse; + public static create(properties?: vtctldata.IDeleteKeyspaceResponse): vtctldata.DeleteKeyspaceResponse; /** - * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. - * @param message GetFullStatusResponse message or plain object to encode + * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. + * @param message DeleteKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetFullStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. - * @param message GetFullStatusResponse message or plain object to encode + * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. + * @param message DeleteKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetFullStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFullStatusResponse + * @returns DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetFullStatusResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceResponse; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFullStatusResponse + * @returns DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetFullStatusResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceResponse; /** - * Verifies a GetFullStatusResponse message. + * Verifies a DeleteKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFullStatusResponse + * @returns DeleteKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetFullStatusResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceResponse; /** - * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. - * @param message GetFullStatusResponse + * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. + * @param message DeleteKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetFullStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFullStatusResponse to JSON. + * Converts this DeleteKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetKeyspacesRequest. */ - interface IGetKeyspacesRequest { + /** Properties of a DeleteShardsRequest. */ + interface IDeleteShardsRequest { + + /** DeleteShardsRequest shards */ + shards?: (vtctldata.IShard[]|null); + + /** DeleteShardsRequest recursive */ + recursive?: (boolean|null); + + /** DeleteShardsRequest even_if_serving */ + even_if_serving?: (boolean|null); + + /** DeleteShardsRequest force */ + force?: (boolean|null); } - /** Represents a GetKeyspacesRequest. */ - class GetKeyspacesRequest implements IGetKeyspacesRequest { + /** Represents a DeleteShardsRequest. */ + class DeleteShardsRequest implements IDeleteShardsRequest { /** - * Constructs a new GetKeyspacesRequest. + * Constructs a new DeleteShardsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetKeyspacesRequest); + constructor(properties?: vtctldata.IDeleteShardsRequest); + + /** DeleteShardsRequest shards. */ + public shards: vtctldata.IShard[]; + + /** DeleteShardsRequest recursive. */ + public recursive: boolean; + + /** DeleteShardsRequest even_if_serving. */ + public even_if_serving: boolean; + + /** DeleteShardsRequest force. */ + public force: boolean; /** - * Creates a new GetKeyspacesRequest instance using the specified properties. + * Creates a new DeleteShardsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetKeyspacesRequest instance + * @returns DeleteShardsRequest instance */ - public static create(properties?: vtctldata.IGetKeyspacesRequest): vtctldata.GetKeyspacesRequest; + public static create(properties?: vtctldata.IDeleteShardsRequest): vtctldata.DeleteShardsRequest; /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode + * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. + * @param message DeleteShardsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode + * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. + * @param message DeleteShardsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. + * Decodes a DeleteShardsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetKeyspacesRequest + * @returns DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsRequest; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetKeyspacesRequest + * @returns DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsRequest; /** - * Verifies a GetKeyspacesRequest message. + * Verifies a DeleteShardsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetKeyspacesRequest + * @returns DeleteShardsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsRequest; /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. - * @param message GetKeyspacesRequest + * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. + * @param message DeleteShardsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteShardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetKeyspacesRequest to JSON. + * Converts this DeleteShardsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetKeyspacesResponse. */ - interface IGetKeyspacesResponse { - - /** GetKeyspacesResponse keyspaces */ - keyspaces?: (vtctldata.IKeyspace[]|null); + /** Properties of a DeleteShardsResponse. */ + interface IDeleteShardsResponse { } - /** Represents a GetKeyspacesResponse. */ - class GetKeyspacesResponse implements IGetKeyspacesResponse { + /** Represents a DeleteShardsResponse. */ + class DeleteShardsResponse implements IDeleteShardsResponse { /** - * Constructs a new GetKeyspacesResponse. + * Constructs a new DeleteShardsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetKeyspacesResponse); - - /** GetKeyspacesResponse keyspaces. */ - public keyspaces: vtctldata.IKeyspace[]; + constructor(properties?: vtctldata.IDeleteShardsResponse); /** - * Creates a new GetKeyspacesResponse instance using the specified properties. + * Creates a new DeleteShardsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetKeyspacesResponse instance + * @returns DeleteShardsResponse instance */ - public static create(properties?: vtctldata.IGetKeyspacesResponse): vtctldata.GetKeyspacesResponse; + public static create(properties?: vtctldata.IDeleteShardsResponse): vtctldata.DeleteShardsResponse; /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode + * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. + * @param message DeleteShardsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode + * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. + * @param message DeleteShardsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. + * Decodes a DeleteShardsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetKeyspacesResponse + * @returns DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsResponse; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetKeyspacesResponse + * @returns DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsResponse; /** - * Verifies a GetKeyspacesResponse message. + * Verifies a DeleteShardsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetKeyspacesResponse + * @returns DeleteShardsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsResponse; /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. - * @param message GetKeyspacesResponse + * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. + * @param message DeleteShardsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteShardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetKeyspacesResponse to JSON. + * Converts this DeleteShardsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetKeyspaceRequest. */ - interface IGetKeyspaceRequest { + /** Properties of a DeleteSrvVSchemaRequest. */ + interface IDeleteSrvVSchemaRequest { - /** GetKeyspaceRequest keyspace */ - keyspace?: (string|null); + /** DeleteSrvVSchemaRequest cell */ + cell?: (string|null); } - /** Represents a GetKeyspaceRequest. */ - class GetKeyspaceRequest implements IGetKeyspaceRequest { + /** Represents a DeleteSrvVSchemaRequest. */ + class DeleteSrvVSchemaRequest implements IDeleteSrvVSchemaRequest { /** - * Constructs a new GetKeyspaceRequest. + * Constructs a new DeleteSrvVSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetKeyspaceRequest); + constructor(properties?: vtctldata.IDeleteSrvVSchemaRequest); - /** GetKeyspaceRequest keyspace. */ - public keyspace: string; + /** DeleteSrvVSchemaRequest cell. */ + public cell: string; /** - * Creates a new GetKeyspaceRequest instance using the specified properties. + * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetKeyspaceRequest instance + * @returns DeleteSrvVSchemaRequest instance */ - public static create(properties?: vtctldata.IGetKeyspaceRequest): vtctldata.GetKeyspaceRequest; + public static create(properties?: vtctldata.IDeleteSrvVSchemaRequest): vtctldata.DeleteSrvVSchemaRequest; /** - * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @param message GetKeyspaceRequest message or plain object to encode + * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * @param message DeleteSrvVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @param message GetKeyspaceRequest message or plain object to encode + * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * @param message DeleteSrvVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetKeyspaceRequest + * @returns DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteSrvVSchemaRequest; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetKeyspaceRequest + * @returns DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteSrvVSchemaRequest; /** - * Verifies a GetKeyspaceRequest message. + * Verifies a DeleteSrvVSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetKeyspaceRequest + * @returns DeleteSrvVSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteSrvVSchemaRequest; /** - * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. - * @param message GetKeyspaceRequest + * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. + * @param message DeleteSrvVSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteSrvVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetKeyspaceRequest to JSON. + * Converts this DeleteSrvVSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetKeyspaceResponse. */ - interface IGetKeyspaceResponse { - - /** GetKeyspaceResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); + /** Properties of a DeleteSrvVSchemaResponse. */ + interface IDeleteSrvVSchemaResponse { } - /** Represents a GetKeyspaceResponse. */ - class GetKeyspaceResponse implements IGetKeyspaceResponse { + /** Represents a DeleteSrvVSchemaResponse. */ + class DeleteSrvVSchemaResponse implements IDeleteSrvVSchemaResponse { /** - * Constructs a new GetKeyspaceResponse. + * Constructs a new DeleteSrvVSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetKeyspaceResponse); - - /** GetKeyspaceResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); + constructor(properties?: vtctldata.IDeleteSrvVSchemaResponse); /** - * Creates a new GetKeyspaceResponse instance using the specified properties. + * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetKeyspaceResponse instance + * @returns DeleteSrvVSchemaResponse instance */ - public static create(properties?: vtctldata.IGetKeyspaceResponse): vtctldata.GetKeyspaceResponse; + public static create(properties?: vtctldata.IDeleteSrvVSchemaResponse): vtctldata.DeleteSrvVSchemaResponse; /** - * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @param message GetKeyspaceResponse message or plain object to encode + * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. + * @param message DeleteSrvVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @param message GetKeyspaceResponse message or plain object to encode + * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. + * @param message DeleteSrvVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetKeyspaceResponse + * @returns DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteSrvVSchemaResponse; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetKeyspaceResponse + * @returns DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteSrvVSchemaResponse; /** - * Verifies a GetKeyspaceResponse message. + * Verifies a DeleteSrvVSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetKeyspaceResponse + * @returns DeleteSrvVSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteSrvVSchemaResponse; /** - * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. - * @param message GetKeyspaceResponse + * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. + * @param message DeleteSrvVSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteSrvVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetKeyspaceResponse to JSON. + * Converts this DeleteSrvVSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPermissionsRequest. */ - interface IGetPermissionsRequest { + /** Properties of a DeleteTabletsRequest. */ + interface IDeleteTabletsRequest { - /** GetPermissionsRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** DeleteTabletsRequest tablet_aliases */ + tablet_aliases?: (topodata.ITabletAlias[]|null); + + /** DeleteTabletsRequest allow_primary */ + allow_primary?: (boolean|null); } - /** Represents a GetPermissionsRequest. */ - class GetPermissionsRequest implements IGetPermissionsRequest { + /** Represents a DeleteTabletsRequest. */ + class DeleteTabletsRequest implements IDeleteTabletsRequest { /** - * Constructs a new GetPermissionsRequest. + * Constructs a new DeleteTabletsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetPermissionsRequest); + constructor(properties?: vtctldata.IDeleteTabletsRequest); - /** GetPermissionsRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** DeleteTabletsRequest tablet_aliases. */ + public tablet_aliases: topodata.ITabletAlias[]; + + /** DeleteTabletsRequest allow_primary. */ + public allow_primary: boolean; /** - * Creates a new GetPermissionsRequest instance using the specified properties. + * Creates a new DeleteTabletsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPermissionsRequest instance + * @returns DeleteTabletsRequest instance */ - public static create(properties?: vtctldata.IGetPermissionsRequest): vtctldata.GetPermissionsRequest; + public static create(properties?: vtctldata.IDeleteTabletsRequest): vtctldata.DeleteTabletsRequest; /** - * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. - * @param message GetPermissionsRequest message or plain object to encode + * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * @param message DeleteTabletsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. - * @param message GetPermissionsRequest message or plain object to encode + * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * @param message DeleteTabletsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPermissionsRequest + * @returns DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetPermissionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsRequest; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPermissionsRequest + * @returns DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetPermissionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsRequest; /** - * Verifies a GetPermissionsRequest message. + * Verifies a DeleteTabletsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPermissionsRequest + * @returns DeleteTabletsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetPermissionsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsRequest; /** - * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. - * @param message GetPermissionsRequest + * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. + * @param message DeleteTabletsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPermissionsRequest to JSON. + * Converts this DeleteTabletsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPermissionsResponse. */ - interface IGetPermissionsResponse { - - /** GetPermissionsResponse permissions */ - permissions?: (tabletmanagerdata.IPermissions|null); + /** Properties of a DeleteTabletsResponse. */ + interface IDeleteTabletsResponse { } - /** Represents a GetPermissionsResponse. */ - class GetPermissionsResponse implements IGetPermissionsResponse { + /** Represents a DeleteTabletsResponse. */ + class DeleteTabletsResponse implements IDeleteTabletsResponse { /** - * Constructs a new GetPermissionsResponse. + * Constructs a new DeleteTabletsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetPermissionsResponse); - - /** GetPermissionsResponse permissions. */ - public permissions?: (tabletmanagerdata.IPermissions|null); + constructor(properties?: vtctldata.IDeleteTabletsResponse); /** - * Creates a new GetPermissionsResponse instance using the specified properties. + * Creates a new DeleteTabletsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetPermissionsResponse instance + * @returns DeleteTabletsResponse instance */ - public static create(properties?: vtctldata.IGetPermissionsResponse): vtctldata.GetPermissionsResponse; + public static create(properties?: vtctldata.IDeleteTabletsResponse): vtctldata.DeleteTabletsResponse; /** - * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. - * @param message GetPermissionsResponse message or plain object to encode + * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * @param message DeleteTabletsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. - * @param message GetPermissionsResponse message or plain object to encode + * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * @param message DeleteTabletsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPermissionsResponse + * @returns DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetPermissionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsResponse; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPermissionsResponse + * @returns DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetPermissionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsResponse; /** - * Verifies a GetPermissionsResponse message. + * Verifies a DeleteTabletsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPermissionsResponse + * @returns DeleteTabletsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetPermissionsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsResponse; /** - * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. - * @param message GetPermissionsResponse + * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. + * @param message DeleteTabletsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.DeleteTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPermissionsResponse to JSON. + * Converts this DeleteTabletsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetRoutingRulesRequest. */ - interface IGetRoutingRulesRequest { + /** Properties of an EmergencyReparentShardRequest. */ + interface IEmergencyReparentShardRequest { + + /** EmergencyReparentShardRequest keyspace */ + keyspace?: (string|null); + + /** EmergencyReparentShardRequest shard */ + shard?: (string|null); + + /** EmergencyReparentShardRequest new_primary */ + new_primary?: (topodata.ITabletAlias|null); + + /** EmergencyReparentShardRequest ignore_replicas */ + ignore_replicas?: (topodata.ITabletAlias[]|null); + + /** EmergencyReparentShardRequest wait_replicas_timeout */ + wait_replicas_timeout?: (vttime.IDuration|null); + + /** EmergencyReparentShardRequest prevent_cross_cell_promotion */ + prevent_cross_cell_promotion?: (boolean|null); } - /** Represents a GetRoutingRulesRequest. */ - class GetRoutingRulesRequest implements IGetRoutingRulesRequest { + /** Represents an EmergencyReparentShardRequest. */ + class EmergencyReparentShardRequest implements IEmergencyReparentShardRequest { /** - * Constructs a new GetRoutingRulesRequest. + * Constructs a new EmergencyReparentShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetRoutingRulesRequest); + constructor(properties?: vtctldata.IEmergencyReparentShardRequest); + + /** EmergencyReparentShardRequest keyspace. */ + public keyspace: string; + + /** EmergencyReparentShardRequest shard. */ + public shard: string; + + /** EmergencyReparentShardRequest new_primary. */ + public new_primary?: (topodata.ITabletAlias|null); + + /** EmergencyReparentShardRequest ignore_replicas. */ + public ignore_replicas: topodata.ITabletAlias[]; + + /** EmergencyReparentShardRequest wait_replicas_timeout. */ + public wait_replicas_timeout?: (vttime.IDuration|null); + + /** EmergencyReparentShardRequest prevent_cross_cell_promotion. */ + public prevent_cross_cell_promotion: boolean; /** - * Creates a new GetRoutingRulesRequest instance using the specified properties. + * Creates a new EmergencyReparentShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetRoutingRulesRequest instance + * @returns EmergencyReparentShardRequest instance */ - public static create(properties?: vtctldata.IGetRoutingRulesRequest): vtctldata.GetRoutingRulesRequest; + public static create(properties?: vtctldata.IEmergencyReparentShardRequest): vtctldata.EmergencyReparentShardRequest; /** - * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. - * @param message GetRoutingRulesRequest message or plain object to encode + * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * @param message EmergencyReparentShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. - * @param message GetRoutingRulesRequest message or plain object to encode + * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * @param message EmergencyReparentShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetRoutingRulesRequest + * @returns EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetRoutingRulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardRequest; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRoutingRulesRequest + * @returns EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetRoutingRulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardRequest; /** - * Verifies a GetRoutingRulesRequest message. + * Verifies an EmergencyReparentShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRoutingRulesRequest + * @returns EmergencyReparentShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetRoutingRulesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardRequest; - /** - * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. - * @param message GetRoutingRulesRequest + /** + * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. + * @param message EmergencyReparentShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.EmergencyReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRoutingRulesRequest to JSON. + * Converts this EmergencyReparentShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetRoutingRulesResponse. */ - interface IGetRoutingRulesResponse { + /** Properties of an EmergencyReparentShardResponse. */ + interface IEmergencyReparentShardResponse { - /** GetRoutingRulesResponse routing_rules */ - routing_rules?: (vschema.IRoutingRules|null); + /** EmergencyReparentShardResponse keyspace */ + keyspace?: (string|null); + + /** EmergencyReparentShardResponse shard */ + shard?: (string|null); + + /** EmergencyReparentShardResponse promoted_primary */ + promoted_primary?: (topodata.ITabletAlias|null); + + /** EmergencyReparentShardResponse events */ + events?: (logutil.IEvent[]|null); } - /** Represents a GetRoutingRulesResponse. */ - class GetRoutingRulesResponse implements IGetRoutingRulesResponse { + /** Represents an EmergencyReparentShardResponse. */ + class EmergencyReparentShardResponse implements IEmergencyReparentShardResponse { /** - * Constructs a new GetRoutingRulesResponse. + * Constructs a new EmergencyReparentShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetRoutingRulesResponse); + constructor(properties?: vtctldata.IEmergencyReparentShardResponse); - /** GetRoutingRulesResponse routing_rules. */ - public routing_rules?: (vschema.IRoutingRules|null); + /** EmergencyReparentShardResponse keyspace. */ + public keyspace: string; + + /** EmergencyReparentShardResponse shard. */ + public shard: string; + + /** EmergencyReparentShardResponse promoted_primary. */ + public promoted_primary?: (topodata.ITabletAlias|null); + + /** EmergencyReparentShardResponse events. */ + public events: logutil.IEvent[]; /** - * Creates a new GetRoutingRulesResponse instance using the specified properties. + * Creates a new EmergencyReparentShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetRoutingRulesResponse instance + * @returns EmergencyReparentShardResponse instance */ - public static create(properties?: vtctldata.IGetRoutingRulesResponse): vtctldata.GetRoutingRulesResponse; + public static create(properties?: vtctldata.IEmergencyReparentShardResponse): vtctldata.EmergencyReparentShardResponse; /** - * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. - * @param message GetRoutingRulesResponse message or plain object to encode + * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * @param message EmergencyReparentShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. - * @param message GetRoutingRulesResponse message or plain object to encode + * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * @param message EmergencyReparentShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetRoutingRulesResponse + * @returns EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetRoutingRulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardResponse; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRoutingRulesResponse + * @returns EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetRoutingRulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardResponse; /** - * Verifies a GetRoutingRulesResponse message. + * Verifies an EmergencyReparentShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRoutingRulesResponse + * @returns EmergencyReparentShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetRoutingRulesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardResponse; /** - * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. - * @param message GetRoutingRulesResponse + * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. + * @param message EmergencyReparentShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.EmergencyReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRoutingRulesResponse to JSON. + * Converts this EmergencyReparentShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { + /** Properties of an ExecuteFetchAsAppRequest. */ + interface IExecuteFetchAsAppRequest { - /** GetSchemaRequest tablet_alias */ + /** ExecuteFetchAsAppRequest tablet_alias */ tablet_alias?: (topodata.ITabletAlias|null); - /** GetSchemaRequest tables */ - tables?: (string[]|null); - - /** GetSchemaRequest exclude_tables */ - exclude_tables?: (string[]|null); - - /** GetSchemaRequest include_views */ - include_views?: (boolean|null); - - /** GetSchemaRequest table_names_only */ - table_names_only?: (boolean|null); + /** ExecuteFetchAsAppRequest query */ + query?: (string|null); - /** GetSchemaRequest table_sizes_only */ - table_sizes_only?: (boolean|null); + /** ExecuteFetchAsAppRequest max_rows */ + max_rows?: (number|Long|null); - /** GetSchemaRequest table_schema_only */ - table_schema_only?: (boolean|null); + /** ExecuteFetchAsAppRequest use_pool */ + use_pool?: (boolean|null); } - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { + /** Represents an ExecuteFetchAsAppRequest. */ + class ExecuteFetchAsAppRequest implements IExecuteFetchAsAppRequest { /** - * Constructs a new GetSchemaRequest. + * Constructs a new ExecuteFetchAsAppRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSchemaRequest); + constructor(properties?: vtctldata.IExecuteFetchAsAppRequest); - /** GetSchemaRequest tablet_alias. */ + /** ExecuteFetchAsAppRequest tablet_alias. */ public tablet_alias?: (topodata.ITabletAlias|null); - /** GetSchemaRequest tables. */ - public tables: string[]; - - /** GetSchemaRequest exclude_tables. */ - public exclude_tables: string[]; - - /** GetSchemaRequest include_views. */ - public include_views: boolean; - - /** GetSchemaRequest table_names_only. */ - public table_names_only: boolean; + /** ExecuteFetchAsAppRequest query. */ + public query: string; - /** GetSchemaRequest table_sizes_only. */ - public table_sizes_only: boolean; + /** ExecuteFetchAsAppRequest max_rows. */ + public max_rows: (number|Long); - /** GetSchemaRequest table_schema_only. */ - public table_schema_only: boolean; + /** ExecuteFetchAsAppRequest use_pool. */ + public use_pool: boolean; /** - * Creates a new GetSchemaRequest instance using the specified properties. + * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSchemaRequest instance + * @returns ExecuteFetchAsAppRequest instance */ - public static create(properties?: vtctldata.IGetSchemaRequest): vtctldata.GetSchemaRequest; + public static create(properties?: vtctldata.IExecuteFetchAsAppRequest): vtctldata.ExecuteFetchAsAppRequest; /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode + * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * @param message ExecuteFetchAsAppRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode + * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * @param message ExecuteFetchAsAppRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSchemaRequest + * @returns ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsAppRequest; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest + * @returns ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsAppRequest; /** - * Verifies a GetSchemaRequest message. + * Verifies an ExecuteFetchAsAppRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSchemaRequest + * @returns ExecuteFetchAsAppRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsAppRequest; /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest + * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. + * @param message ExecuteFetchAsAppRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteFetchAsAppRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSchemaRequest to JSON. + * Converts this ExecuteFetchAsAppRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSchemaResponse. */ - interface IGetSchemaResponse { + /** Properties of an ExecuteFetchAsAppResponse. */ + interface IExecuteFetchAsAppResponse { - /** GetSchemaResponse schema */ - schema?: (tabletmanagerdata.ISchemaDefinition|null); + /** ExecuteFetchAsAppResponse result */ + result?: (query.IQueryResult|null); } - /** Represents a GetSchemaResponse. */ - class GetSchemaResponse implements IGetSchemaResponse { + /** Represents an ExecuteFetchAsAppResponse. */ + class ExecuteFetchAsAppResponse implements IExecuteFetchAsAppResponse { /** - * Constructs a new GetSchemaResponse. + * Constructs a new ExecuteFetchAsAppResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSchemaResponse); + constructor(properties?: vtctldata.IExecuteFetchAsAppResponse); - /** GetSchemaResponse schema. */ - public schema?: (tabletmanagerdata.ISchemaDefinition|null); + /** ExecuteFetchAsAppResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new GetSchemaResponse instance using the specified properties. + * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSchemaResponse instance + * @returns ExecuteFetchAsAppResponse instance */ - public static create(properties?: vtctldata.IGetSchemaResponse): vtctldata.GetSchemaResponse; + public static create(properties?: vtctldata.IExecuteFetchAsAppResponse): vtctldata.ExecuteFetchAsAppResponse; /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode + * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * @param message ExecuteFetchAsAppResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode + * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * @param message ExecuteFetchAsAppResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSchemaResponse + * @returns ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsAppResponse; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSchemaResponse + * @returns ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsAppResponse; /** - * Verifies a GetSchemaResponse message. + * Verifies an ExecuteFetchAsAppResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSchemaResponse + * @returns ExecuteFetchAsAppResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsAppResponse; /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @param message GetSchemaResponse + * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. + * @param message ExecuteFetchAsAppResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteFetchAsAppResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSchemaResponse to JSON. + * Converts this ExecuteFetchAsAppResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetShardRequest. */ - interface IGetShardRequest { + /** Properties of an ExecuteFetchAsDBARequest. */ + interface IExecuteFetchAsDBARequest { - /** GetShardRequest keyspace */ - keyspace?: (string|null); + /** ExecuteFetchAsDBARequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); - /** GetShardRequest shard_name */ - shard_name?: (string|null); + /** ExecuteFetchAsDBARequest query */ + query?: (string|null); + + /** ExecuteFetchAsDBARequest max_rows */ + max_rows?: (number|Long|null); + + /** ExecuteFetchAsDBARequest disable_binlogs */ + disable_binlogs?: (boolean|null); + + /** ExecuteFetchAsDBARequest reload_schema */ + reload_schema?: (boolean|null); } - /** Represents a GetShardRequest. */ - class GetShardRequest implements IGetShardRequest { + /** Represents an ExecuteFetchAsDBARequest. */ + class ExecuteFetchAsDBARequest implements IExecuteFetchAsDBARequest { /** - * Constructs a new GetShardRequest. + * Constructs a new ExecuteFetchAsDBARequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetShardRequest); + constructor(properties?: vtctldata.IExecuteFetchAsDBARequest); - /** GetShardRequest keyspace. */ - public keyspace: string; + /** ExecuteFetchAsDBARequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** GetShardRequest shard_name. */ - public shard_name: string; + /** ExecuteFetchAsDBARequest query. */ + public query: string; + + /** ExecuteFetchAsDBARequest max_rows. */ + public max_rows: (number|Long); + + /** ExecuteFetchAsDBARequest disable_binlogs. */ + public disable_binlogs: boolean; + + /** ExecuteFetchAsDBARequest reload_schema. */ + public reload_schema: boolean; /** - * Creates a new GetShardRequest instance using the specified properties. + * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetShardRequest instance + * @returns ExecuteFetchAsDBARequest instance */ - public static create(properties?: vtctldata.IGetShardRequest): vtctldata.GetShardRequest; + public static create(properties?: vtctldata.IExecuteFetchAsDBARequest): vtctldata.ExecuteFetchAsDBARequest; /** - * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @param message GetShardRequest message or plain object to encode + * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * @param message ExecuteFetchAsDBARequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteFetchAsDBARequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @param message GetShardRequest message or plain object to encode + * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * @param message ExecuteFetchAsDBARequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteFetchAsDBARequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetShardRequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetShardRequest + * @returns ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsDBARequest; /** - * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetShardRequest + * @returns ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsDBARequest; /** - * Verifies a GetShardRequest message. + * Verifies an ExecuteFetchAsDBARequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetShardRequest + * @returns ExecuteFetchAsDBARequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsDBARequest; /** - * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. - * @param message GetShardRequest + * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. + * @param message ExecuteFetchAsDBARequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteFetchAsDBARequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetShardRequest to JSON. + * Converts this ExecuteFetchAsDBARequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetShardResponse. */ - interface IGetShardResponse { + /** Properties of an ExecuteFetchAsDBAResponse. */ + interface IExecuteFetchAsDBAResponse { - /** GetShardResponse shard */ - shard?: (vtctldata.IShard|null); + /** ExecuteFetchAsDBAResponse result */ + result?: (query.IQueryResult|null); } - /** Represents a GetShardResponse. */ - class GetShardResponse implements IGetShardResponse { + /** Represents an ExecuteFetchAsDBAResponse. */ + class ExecuteFetchAsDBAResponse implements IExecuteFetchAsDBAResponse { /** - * Constructs a new GetShardResponse. + * Constructs a new ExecuteFetchAsDBAResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetShardResponse); + constructor(properties?: vtctldata.IExecuteFetchAsDBAResponse); - /** GetShardResponse shard. */ - public shard?: (vtctldata.IShard|null); + /** ExecuteFetchAsDBAResponse result. */ + public result?: (query.IQueryResult|null); /** - * Creates a new GetShardResponse instance using the specified properties. + * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetShardResponse instance + * @returns ExecuteFetchAsDBAResponse instance */ - public static create(properties?: vtctldata.IGetShardResponse): vtctldata.GetShardResponse; + public static create(properties?: vtctldata.IExecuteFetchAsDBAResponse): vtctldata.ExecuteFetchAsDBAResponse; /** - * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @param message GetShardResponse message or plain object to encode + * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * @param message ExecuteFetchAsDBAResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteFetchAsDBAResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @param message GetShardResponse message or plain object to encode + * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * @param message ExecuteFetchAsDBAResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteFetchAsDBAResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetShardResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetShardResponse + * @returns ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteFetchAsDBAResponse; /** - * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetShardResponse + * @returns ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteFetchAsDBAResponse; /** - * Verifies a GetShardResponse message. + * Verifies an ExecuteFetchAsDBAResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetShardResponse + * @returns ExecuteFetchAsDBAResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteFetchAsDBAResponse; /** - * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. - * @param message GetShardResponse + * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. + * @param message ExecuteFetchAsDBAResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteFetchAsDBAResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetShardResponse to JSON. + * Converts this ExecuteFetchAsDBAResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetShardRoutingRulesRequest. */ - interface IGetShardRoutingRulesRequest { + /** Properties of an ExecuteHookRequest. */ + interface IExecuteHookRequest { + + /** ExecuteHookRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** ExecuteHookRequest tablet_hook_request */ + tablet_hook_request?: (tabletmanagerdata.IExecuteHookRequest|null); } - /** Represents a GetShardRoutingRulesRequest. */ - class GetShardRoutingRulesRequest implements IGetShardRoutingRulesRequest { + /** Represents an ExecuteHookRequest. */ + class ExecuteHookRequest implements IExecuteHookRequest { /** - * Constructs a new GetShardRoutingRulesRequest. + * Constructs a new ExecuteHookRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetShardRoutingRulesRequest); + constructor(properties?: vtctldata.IExecuteHookRequest); + + /** ExecuteHookRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** ExecuteHookRequest tablet_hook_request. */ + public tablet_hook_request?: (tabletmanagerdata.IExecuteHookRequest|null); /** - * Creates a new GetShardRoutingRulesRequest instance using the specified properties. + * Creates a new ExecuteHookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetShardRoutingRulesRequest instance + * @returns ExecuteHookRequest instance */ - public static create(properties?: vtctldata.IGetShardRoutingRulesRequest): vtctldata.GetShardRoutingRulesRequest; + public static create(properties?: vtctldata.IExecuteHookRequest): vtctldata.ExecuteHookRequest; /** - * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. - * @param message GetShardRoutingRulesRequest message or plain object to encode + * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * @param message ExecuteHookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. - * @param message GetShardRoutingRulesRequest message or plain object to encode + * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * @param message ExecuteHookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. + * Decodes an ExecuteHookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetShardRoutingRulesRequest + * @returns ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRoutingRulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteHookRequest; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetShardRoutingRulesRequest + * @returns ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRoutingRulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteHookRequest; /** - * Verifies a GetShardRoutingRulesRequest message. + * Verifies an ExecuteHookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetShardRoutingRulesRequest + * @returns ExecuteHookRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRoutingRulesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteHookRequest; /** - * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. - * @param message GetShardRoutingRulesRequest + * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. + * @param message ExecuteHookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetShardRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteHookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetShardRoutingRulesRequest to JSON. + * Converts this ExecuteHookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetShardRoutingRulesResponse. */ - interface IGetShardRoutingRulesResponse { + /** Properties of an ExecuteHookResponse. */ + interface IExecuteHookResponse { - /** GetShardRoutingRulesResponse shard_routing_rules */ - shard_routing_rules?: (vschema.IShardRoutingRules|null); + /** ExecuteHookResponse hook_result */ + hook_result?: (tabletmanagerdata.IExecuteHookResponse|null); } - /** Represents a GetShardRoutingRulesResponse. */ - class GetShardRoutingRulesResponse implements IGetShardRoutingRulesResponse { + /** Represents an ExecuteHookResponse. */ + class ExecuteHookResponse implements IExecuteHookResponse { /** - * Constructs a new GetShardRoutingRulesResponse. + * Constructs a new ExecuteHookResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetShardRoutingRulesResponse); + constructor(properties?: vtctldata.IExecuteHookResponse); - /** GetShardRoutingRulesResponse shard_routing_rules. */ - public shard_routing_rules?: (vschema.IShardRoutingRules|null); + /** ExecuteHookResponse hook_result. */ + public hook_result?: (tabletmanagerdata.IExecuteHookResponse|null); /** - * Creates a new GetShardRoutingRulesResponse instance using the specified properties. + * Creates a new ExecuteHookResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetShardRoutingRulesResponse instance + * @returns ExecuteHookResponse instance */ - public static create(properties?: vtctldata.IGetShardRoutingRulesResponse): vtctldata.GetShardRoutingRulesResponse; + public static create(properties?: vtctldata.IExecuteHookResponse): vtctldata.ExecuteHookResponse; /** - * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. - * @param message GetShardRoutingRulesResponse message or plain object to encode + * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * @param message ExecuteHookResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. - * @param message GetShardRoutingRulesResponse message or plain object to encode + * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * @param message ExecuteHookResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. + * Decodes an ExecuteHookResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetShardRoutingRulesResponse + * @returns ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRoutingRulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteHookResponse; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetShardRoutingRulesResponse + * @returns ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRoutingRulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteHookResponse; /** - * Verifies a GetShardRoutingRulesResponse message. + * Verifies an ExecuteHookResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetShardRoutingRulesResponse + * @returns ExecuteHookResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRoutingRulesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteHookResponse; /** - * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. - * @param message GetShardRoutingRulesResponse + * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. + * @param message ExecuteHookResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetShardRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ExecuteHookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetShardRoutingRulesResponse to JSON. + * Converts this ExecuteHookResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvKeyspaceNamesRequest. */ - interface IGetSrvKeyspaceNamesRequest { + /** Properties of a FindAllShardsInKeyspaceRequest. */ + interface IFindAllShardsInKeyspaceRequest { - /** GetSrvKeyspaceNamesRequest cells */ - cells?: (string[]|null); + /** FindAllShardsInKeyspaceRequest keyspace */ + keyspace?: (string|null); } - /** Represents a GetSrvKeyspaceNamesRequest. */ - class GetSrvKeyspaceNamesRequest implements IGetSrvKeyspaceNamesRequest { + /** Represents a FindAllShardsInKeyspaceRequest. */ + class FindAllShardsInKeyspaceRequest implements IFindAllShardsInKeyspaceRequest { /** - * Constructs a new GetSrvKeyspaceNamesRequest. + * Constructs a new FindAllShardsInKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvKeyspaceNamesRequest); + constructor(properties?: vtctldata.IFindAllShardsInKeyspaceRequest); - /** GetSrvKeyspaceNamesRequest cells. */ - public cells: string[]; + /** FindAllShardsInKeyspaceRequest keyspace. */ + public keyspace: string; /** - * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. + * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvKeyspaceNamesRequest instance + * @returns FindAllShardsInKeyspaceRequest instance */ - public static create(properties?: vtctldata.IGetSrvKeyspaceNamesRequest): vtctldata.GetSrvKeyspaceNamesRequest; + public static create(properties?: vtctldata.IFindAllShardsInKeyspaceRequest): vtctldata.FindAllShardsInKeyspaceRequest; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. - * @param message GetSrvKeyspaceNamesRequest message or plain object to encode + * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * @param message FindAllShardsInKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvKeyspaceNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. - * @param message GetSrvKeyspaceNamesRequest message or plain object to encode + * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * @param message FindAllShardsInKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspaceNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvKeyspaceNamesRequest + * @returns FindAllShardsInKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceRequest; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspaceNamesRequest + * @returns FindAllShardsInKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceRequest; /** - * Verifies a GetSrvKeyspaceNamesRequest message. + * Verifies a FindAllShardsInKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvKeyspaceNamesRequest + * @returns FindAllShardsInKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceRequest; /** - * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. - * @param message GetSrvKeyspaceNamesRequest + * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. + * @param message FindAllShardsInKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvKeyspaceNamesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.FindAllShardsInKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvKeyspaceNamesRequest to JSON. + * Converts this FindAllShardsInKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvKeyspaceNamesResponse. */ - interface IGetSrvKeyspaceNamesResponse { + /** Properties of a FindAllShardsInKeyspaceResponse. */ + interface IFindAllShardsInKeyspaceResponse { - /** GetSrvKeyspaceNamesResponse names */ - names?: ({ [k: string]: vtctldata.GetSrvKeyspaceNamesResponse.INameList }|null); + /** FindAllShardsInKeyspaceResponse shards */ + shards?: ({ [k: string]: vtctldata.IShard }|null); } - /** Represents a GetSrvKeyspaceNamesResponse. */ - class GetSrvKeyspaceNamesResponse implements IGetSrvKeyspaceNamesResponse { + /** Represents a FindAllShardsInKeyspaceResponse. */ + class FindAllShardsInKeyspaceResponse implements IFindAllShardsInKeyspaceResponse { /** - * Constructs a new GetSrvKeyspaceNamesResponse. + * Constructs a new FindAllShardsInKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvKeyspaceNamesResponse); + constructor(properties?: vtctldata.IFindAllShardsInKeyspaceResponse); - /** GetSrvKeyspaceNamesResponse names. */ - public names: { [k: string]: vtctldata.GetSrvKeyspaceNamesResponse.INameList }; + /** FindAllShardsInKeyspaceResponse shards. */ + public shards: { [k: string]: vtctldata.IShard }; /** - * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. + * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvKeyspaceNamesResponse instance + * @returns FindAllShardsInKeyspaceResponse instance */ - public static create(properties?: vtctldata.IGetSrvKeyspaceNamesResponse): vtctldata.GetSrvKeyspaceNamesResponse; + public static create(properties?: vtctldata.IFindAllShardsInKeyspaceResponse): vtctldata.FindAllShardsInKeyspaceResponse; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. - * @param message GetSrvKeyspaceNamesResponse message or plain object to encode + * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * @param message FindAllShardsInKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvKeyspaceNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. - * @param message GetSrvKeyspaceNamesResponse message or plain object to encode + * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * @param message FindAllShardsInKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspaceNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvKeyspaceNamesResponse + * @returns FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceResponse; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspaceNamesResponse + * @returns FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceResponse; /** - * Verifies a GetSrvKeyspaceNamesResponse message. + * Verifies a FindAllShardsInKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvKeyspaceNamesResponse + * @returns FindAllShardsInKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceResponse; /** - * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. - * @param message GetSrvKeyspaceNamesResponse + * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. + * @param message FindAllShardsInKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvKeyspaceNamesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.FindAllShardsInKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvKeyspaceNamesResponse to JSON. + * Converts this FindAllShardsInKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace GetSrvKeyspaceNamesResponse { - - /** Properties of a NameList. */ - interface INameList { - - /** NameList names */ - names?: (string[]|null); - } - - /** Represents a NameList. */ - class NameList implements INameList { - - /** - * Constructs a new NameList. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.GetSrvKeyspaceNamesResponse.INameList); - - /** NameList names. */ - public names: string[]; - - /** - * Creates a new NameList instance using the specified properties. - * @param [properties] Properties to set - * @returns NameList instance - */ - public static create(properties?: vtctldata.GetSrvKeyspaceNamesResponse.INameList): vtctldata.GetSrvKeyspaceNamesResponse.NameList; - - /** - * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @param message NameList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.GetSrvKeyspaceNamesResponse.INameList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @param message NameList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.GetSrvKeyspaceNamesResponse.INameList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NameList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesResponse.NameList; - - /** - * Decodes a NameList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesResponse.NameList; - - /** - * Verifies a NameList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NameList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NameList - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesResponse.NameList; + /** Properties of a GetBackupsRequest. */ + interface IGetBackupsRequest { - /** - * Creates a plain object from a NameList message. Also converts values to other types if specified. - * @param message NameList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSrvKeyspaceNamesResponse.NameList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GetBackupsRequest keyspace */ + keyspace?: (string|null); - /** - * Converts this NameList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** GetBackupsRequest shard */ + shard?: (string|null); - /** Properties of a GetSrvKeyspacesRequest. */ - interface IGetSrvKeyspacesRequest { + /** GetBackupsRequest limit */ + limit?: (number|null); - /** GetSrvKeyspacesRequest keyspace */ - keyspace?: (string|null); + /** GetBackupsRequest detailed */ + detailed?: (boolean|null); - /** GetSrvKeyspacesRequest cells */ - cells?: (string[]|null); + /** GetBackupsRequest detailed_limit */ + detailed_limit?: (number|null); } - /** Represents a GetSrvKeyspacesRequest. */ - class GetSrvKeyspacesRequest implements IGetSrvKeyspacesRequest { + /** Represents a GetBackupsRequest. */ + class GetBackupsRequest implements IGetBackupsRequest { /** - * Constructs a new GetSrvKeyspacesRequest. + * Constructs a new GetBackupsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvKeyspacesRequest); + constructor(properties?: vtctldata.IGetBackupsRequest); - /** GetSrvKeyspacesRequest keyspace. */ + /** GetBackupsRequest keyspace. */ public keyspace: string; - /** GetSrvKeyspacesRequest cells. */ - public cells: string[]; + /** GetBackupsRequest shard. */ + public shard: string; + + /** GetBackupsRequest limit. */ + public limit: number; + + /** GetBackupsRequest detailed. */ + public detailed: boolean; + + /** GetBackupsRequest detailed_limit. */ + public detailed_limit: number; /** - * Creates a new GetSrvKeyspacesRequest instance using the specified properties. + * Creates a new GetBackupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvKeyspacesRequest instance + * @returns GetBackupsRequest instance */ - public static create(properties?: vtctldata.IGetSrvKeyspacesRequest): vtctldata.GetSrvKeyspacesRequest; + public static create(properties?: vtctldata.IGetBackupsRequest): vtctldata.GetBackupsRequest; /** - * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @param message GetSrvKeyspacesRequest message or plain object to encode + * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * @param message GetBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @param message GetSrvKeyspacesRequest message or plain object to encode + * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * @param message GetBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. + * Decodes a GetBackupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvKeyspacesRequest + * @returns GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsRequest; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspacesRequest + * @returns GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsRequest; /** - * Verifies a GetSrvKeyspacesRequest message. + * Verifies a GetBackupsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvKeyspacesRequest + * @returns GetBackupsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsRequest; /** - * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. - * @param message GetSrvKeyspacesRequest + * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. + * @param message GetBackupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvKeyspacesRequest to JSON. + * Converts this GetBackupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvKeyspacesResponse. */ - interface IGetSrvKeyspacesResponse { + /** Properties of a GetBackupsResponse. */ + interface IGetBackupsResponse { - /** GetSrvKeyspacesResponse srv_keyspaces */ - srv_keyspaces?: ({ [k: string]: topodata.ISrvKeyspace }|null); + /** GetBackupsResponse backups */ + backups?: (mysqlctl.IBackupInfo[]|null); } - /** Represents a GetSrvKeyspacesResponse. */ - class GetSrvKeyspacesResponse implements IGetSrvKeyspacesResponse { + /** Represents a GetBackupsResponse. */ + class GetBackupsResponse implements IGetBackupsResponse { /** - * Constructs a new GetSrvKeyspacesResponse. + * Constructs a new GetBackupsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvKeyspacesResponse); + constructor(properties?: vtctldata.IGetBackupsResponse); - /** GetSrvKeyspacesResponse srv_keyspaces. */ - public srv_keyspaces: { [k: string]: topodata.ISrvKeyspace }; + /** GetBackupsResponse backups. */ + public backups: mysqlctl.IBackupInfo[]; /** - * Creates a new GetSrvKeyspacesResponse instance using the specified properties. + * Creates a new GetBackupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvKeyspacesResponse instance + * @returns GetBackupsResponse instance */ - public static create(properties?: vtctldata.IGetSrvKeyspacesResponse): vtctldata.GetSrvKeyspacesResponse; + public static create(properties?: vtctldata.IGetBackupsResponse): vtctldata.GetBackupsResponse; /** - * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @param message GetSrvKeyspacesResponse message or plain object to encode + * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * @param message GetBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @param message GetSrvKeyspacesResponse message or plain object to encode + * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * @param message GetBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. + * Decodes a GetBackupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvKeyspacesResponse + * @returns GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsResponse; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspacesResponse + * @returns GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsResponse; /** - * Verifies a GetSrvKeyspacesResponse message. + * Verifies a GetBackupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvKeyspacesResponse + * @returns GetBackupsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsResponse; /** - * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. - * @param message GetSrvKeyspacesResponse + * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. + * @param message GetBackupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvKeyspacesResponse to JSON. + * Converts this GetBackupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateThrottlerConfigRequest. */ - interface IUpdateThrottlerConfigRequest { - - /** UpdateThrottlerConfigRequest keyspace */ - keyspace?: (string|null); - - /** UpdateThrottlerConfigRequest enable */ - enable?: (boolean|null); - - /** UpdateThrottlerConfigRequest disable */ - disable?: (boolean|null); - - /** UpdateThrottlerConfigRequest threshold */ - threshold?: (number|null); - - /** UpdateThrottlerConfigRequest custom_query */ - custom_query?: (string|null); - - /** UpdateThrottlerConfigRequest custom_query_set */ - custom_query_set?: (boolean|null); - - /** UpdateThrottlerConfigRequest check_as_check_self */ - check_as_check_self?: (boolean|null); + /** Properties of a GetCellInfoRequest. */ + interface IGetCellInfoRequest { - /** UpdateThrottlerConfigRequest check_as_check_shard */ - check_as_check_shard?: (boolean|null); + /** GetCellInfoRequest cell */ + cell?: (string|null); } - /** Represents an UpdateThrottlerConfigRequest. */ - class UpdateThrottlerConfigRequest implements IUpdateThrottlerConfigRequest { + /** Represents a GetCellInfoRequest. */ + class GetCellInfoRequest implements IGetCellInfoRequest { /** - * Constructs a new UpdateThrottlerConfigRequest. + * Constructs a new GetCellInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateThrottlerConfigRequest); - - /** UpdateThrottlerConfigRequest keyspace. */ - public keyspace: string; - - /** UpdateThrottlerConfigRequest enable. */ - public enable: boolean; - - /** UpdateThrottlerConfigRequest disable. */ - public disable: boolean; - - /** UpdateThrottlerConfigRequest threshold. */ - public threshold: number; - - /** UpdateThrottlerConfigRequest custom_query. */ - public custom_query: string; - - /** UpdateThrottlerConfigRequest custom_query_set. */ - public custom_query_set: boolean; - - /** UpdateThrottlerConfigRequest check_as_check_self. */ - public check_as_check_self: boolean; + constructor(properties?: vtctldata.IGetCellInfoRequest); - /** UpdateThrottlerConfigRequest check_as_check_shard. */ - public check_as_check_shard: boolean; + /** GetCellInfoRequest cell. */ + public cell: string; /** - * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. + * Creates a new GetCellInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateThrottlerConfigRequest instance + * @returns GetCellInfoRequest instance */ - public static create(properties?: vtctldata.IUpdateThrottlerConfigRequest): vtctldata.UpdateThrottlerConfigRequest; + public static create(properties?: vtctldata.IGetCellInfoRequest): vtctldata.GetCellInfoRequest; /** - * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. - * @param message UpdateThrottlerConfigRequest message or plain object to encode + * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * @param message GetCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateThrottlerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. - * @param message UpdateThrottlerConfigRequest message or plain object to encode + * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * @param message GetCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateThrottlerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. + * Decodes a GetCellInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateThrottlerConfigRequest + * @returns GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateThrottlerConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoRequest; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateThrottlerConfigRequest + * @returns GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateThrottlerConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoRequest; /** - * Verifies an UpdateThrottlerConfigRequest message. + * Verifies a GetCellInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateThrottlerConfigRequest + * @returns GetCellInfoRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateThrottlerConfigRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoRequest; /** - * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. - * @param message UpdateThrottlerConfigRequest + * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. + * @param message GetCellInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateThrottlerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateThrottlerConfigRequest to JSON. + * Converts this GetCellInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateThrottlerConfigResponse. */ - interface IUpdateThrottlerConfigResponse { + /** Properties of a GetCellInfoResponse. */ + interface IGetCellInfoResponse { + + /** GetCellInfoResponse cell_info */ + cell_info?: (topodata.ICellInfo|null); } - /** Represents an UpdateThrottlerConfigResponse. */ - class UpdateThrottlerConfigResponse implements IUpdateThrottlerConfigResponse { + /** Represents a GetCellInfoResponse. */ + class GetCellInfoResponse implements IGetCellInfoResponse { /** - * Constructs a new UpdateThrottlerConfigResponse. + * Constructs a new GetCellInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateThrottlerConfigResponse); + constructor(properties?: vtctldata.IGetCellInfoResponse); + + /** GetCellInfoResponse cell_info. */ + public cell_info?: (topodata.ICellInfo|null); /** - * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. + * Creates a new GetCellInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateThrottlerConfigResponse instance + * @returns GetCellInfoResponse instance */ - public static create(properties?: vtctldata.IUpdateThrottlerConfigResponse): vtctldata.UpdateThrottlerConfigResponse; + public static create(properties?: vtctldata.IGetCellInfoResponse): vtctldata.GetCellInfoResponse; /** - * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. - * @param message UpdateThrottlerConfigResponse message or plain object to encode + * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * @param message GetCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateThrottlerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. - * @param message UpdateThrottlerConfigResponse message or plain object to encode + * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * @param message GetCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateThrottlerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. + * Decodes a GetCellInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateThrottlerConfigResponse + * @returns GetCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateThrottlerConfigResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoResponse; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateThrottlerConfigResponse + * @returns GetCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateThrottlerConfigResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoResponse; /** - * Verifies an UpdateThrottlerConfigResponse message. + * Verifies a GetCellInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateThrottlerConfigResponse + * @returns GetCellInfoResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateThrottlerConfigResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoResponse; /** - * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. - * @param message UpdateThrottlerConfigResponse + * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. + * @param message GetCellInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateThrottlerConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateThrottlerConfigResponse to JSON. + * Converts this GetCellInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvVSchemaRequest. */ - interface IGetSrvVSchemaRequest { - - /** GetSrvVSchemaRequest cell */ - cell?: (string|null); + /** Properties of a GetCellInfoNamesRequest. */ + interface IGetCellInfoNamesRequest { } - /** Represents a GetSrvVSchemaRequest. */ - class GetSrvVSchemaRequest implements IGetSrvVSchemaRequest { + /** Represents a GetCellInfoNamesRequest. */ + class GetCellInfoNamesRequest implements IGetCellInfoNamesRequest { /** - * Constructs a new GetSrvVSchemaRequest. + * Constructs a new GetCellInfoNamesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvVSchemaRequest); - - /** GetSrvVSchemaRequest cell. */ - public cell: string; + constructor(properties?: vtctldata.IGetCellInfoNamesRequest); /** - * Creates a new GetSrvVSchemaRequest instance using the specified properties. + * Creates a new GetCellInfoNamesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvVSchemaRequest instance + * @returns GetCellInfoNamesRequest instance */ - public static create(properties?: vtctldata.IGetSrvVSchemaRequest): vtctldata.GetSrvVSchemaRequest; + public static create(properties?: vtctldata.IGetCellInfoNamesRequest): vtctldata.GetCellInfoNamesRequest; /** - * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @param message GetSrvVSchemaRequest message or plain object to encode + * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * @param message GetCellInfoNamesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @param message GetSrvVSchemaRequest message or plain object to encode + * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * @param message GetCellInfoNamesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvVSchemaRequest + * @returns GetCellInfoNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesRequest; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemaRequest + * @returns GetCellInfoNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesRequest; /** - * Verifies a GetSrvVSchemaRequest message. + * Verifies a GetCellInfoNamesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvVSchemaRequest + * @returns GetCellInfoNamesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesRequest; /** - * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. - * @param message GetSrvVSchemaRequest + * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. + * @param message GetCellInfoNamesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellInfoNamesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvVSchemaRequest to JSON. + * Converts this GetCellInfoNamesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvVSchemaResponse. */ - interface IGetSrvVSchemaResponse { + /** Properties of a GetCellInfoNamesResponse. */ + interface IGetCellInfoNamesResponse { - /** GetSrvVSchemaResponse srv_v_schema */ - srv_v_schema?: (vschema.ISrvVSchema|null); + /** GetCellInfoNamesResponse names */ + names?: (string[]|null); } - /** Represents a GetSrvVSchemaResponse. */ - class GetSrvVSchemaResponse implements IGetSrvVSchemaResponse { + /** Represents a GetCellInfoNamesResponse. */ + class GetCellInfoNamesResponse implements IGetCellInfoNamesResponse { /** - * Constructs a new GetSrvVSchemaResponse. + * Constructs a new GetCellInfoNamesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvVSchemaResponse); + constructor(properties?: vtctldata.IGetCellInfoNamesResponse); - /** GetSrvVSchemaResponse srv_v_schema. */ - public srv_v_schema?: (vschema.ISrvVSchema|null); + /** GetCellInfoNamesResponse names. */ + public names: string[]; /** - * Creates a new GetSrvVSchemaResponse instance using the specified properties. + * Creates a new GetCellInfoNamesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvVSchemaResponse instance + * @returns GetCellInfoNamesResponse instance */ - public static create(properties?: vtctldata.IGetSrvVSchemaResponse): vtctldata.GetSrvVSchemaResponse; + public static create(properties?: vtctldata.IGetCellInfoNamesResponse): vtctldata.GetCellInfoNamesResponse; /** - * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @param message GetSrvVSchemaResponse message or plain object to encode + * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * @param message GetCellInfoNamesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @param message GetSrvVSchemaResponse message or plain object to encode + * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * @param message GetCellInfoNamesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvVSchemaResponse + * @returns GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesResponse; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemaResponse + * @returns GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesResponse; /** - * Verifies a GetSrvVSchemaResponse message. + * Verifies a GetCellInfoNamesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvVSchemaResponse + * @returns GetCellInfoNamesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesResponse; /** - * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. - * @param message GetSrvVSchemaResponse + * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. + * @param message GetCellInfoNamesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellInfoNamesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvVSchemaResponse to JSON. + * Converts this GetCellInfoNamesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvVSchemasRequest. */ - interface IGetSrvVSchemasRequest { - - /** GetSrvVSchemasRequest cells */ - cells?: (string[]|null); + /** Properties of a GetCellsAliasesRequest. */ + interface IGetCellsAliasesRequest { } - /** Represents a GetSrvVSchemasRequest. */ - class GetSrvVSchemasRequest implements IGetSrvVSchemasRequest { + /** Represents a GetCellsAliasesRequest. */ + class GetCellsAliasesRequest implements IGetCellsAliasesRequest { /** - * Constructs a new GetSrvVSchemasRequest. + * Constructs a new GetCellsAliasesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvVSchemasRequest); - - /** GetSrvVSchemasRequest cells. */ - public cells: string[]; + constructor(properties?: vtctldata.IGetCellsAliasesRequest); /** - * Creates a new GetSrvVSchemasRequest instance using the specified properties. + * Creates a new GetCellsAliasesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvVSchemasRequest instance + * @returns GetCellsAliasesRequest instance */ - public static create(properties?: vtctldata.IGetSrvVSchemasRequest): vtctldata.GetSrvVSchemasRequest; + public static create(properties?: vtctldata.IGetCellsAliasesRequest): vtctldata.GetCellsAliasesRequest; /** - * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. - * @param message GetSrvVSchemasRequest message or plain object to encode + * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * @param message GetCellsAliasesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. - * @param message GetSrvVSchemasRequest message or plain object to encode + * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * @param message GetCellsAliasesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvVSchemasRequest + * @returns GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemasRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesRequest; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemasRequest + * @returns GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemasRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesRequest; /** - * Verifies a GetSrvVSchemasRequest message. + * Verifies a GetCellsAliasesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvVSchemasRequest + * @returns GetCellsAliasesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemasRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesRequest; /** - * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. - * @param message GetSrvVSchemasRequest + * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. + * @param message GetCellsAliasesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvVSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellsAliasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvVSchemasRequest to JSON. + * Converts this GetCellsAliasesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSrvVSchemasResponse. */ - interface IGetSrvVSchemasResponse { + /** Properties of a GetCellsAliasesResponse. */ + interface IGetCellsAliasesResponse { - /** GetSrvVSchemasResponse srv_v_schemas */ - srv_v_schemas?: ({ [k: string]: vschema.ISrvVSchema }|null); + /** GetCellsAliasesResponse aliases */ + aliases?: ({ [k: string]: topodata.ICellsAlias }|null); } - /** Represents a GetSrvVSchemasResponse. */ - class GetSrvVSchemasResponse implements IGetSrvVSchemasResponse { + /** Represents a GetCellsAliasesResponse. */ + class GetCellsAliasesResponse implements IGetCellsAliasesResponse { /** - * Constructs a new GetSrvVSchemasResponse. + * Constructs a new GetCellsAliasesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetSrvVSchemasResponse); + constructor(properties?: vtctldata.IGetCellsAliasesResponse); - /** GetSrvVSchemasResponse srv_v_schemas. */ - public srv_v_schemas: { [k: string]: vschema.ISrvVSchema }; + /** GetCellsAliasesResponse aliases. */ + public aliases: { [k: string]: topodata.ICellsAlias }; /** - * Creates a new GetSrvVSchemasResponse instance using the specified properties. + * Creates a new GetCellsAliasesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSrvVSchemasResponse instance + * @returns GetCellsAliasesResponse instance */ - public static create(properties?: vtctldata.IGetSrvVSchemasResponse): vtctldata.GetSrvVSchemasResponse; + public static create(properties?: vtctldata.IGetCellsAliasesResponse): vtctldata.GetCellsAliasesResponse; /** - * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. - * @param message GetSrvVSchemasResponse message or plain object to encode + * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * @param message GetCellsAliasesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetSrvVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. - * @param message GetSrvVSchemasResponse message or plain object to encode + * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * @param message GetCellsAliasesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSrvVSchemasResponse + * @returns GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemasResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesResponse; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemasResponse + * @returns GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemasResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesResponse; /** - * Verifies a GetSrvVSchemasResponse message. + * Verifies a GetCellsAliasesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSrvVSchemasResponse + * @returns GetCellsAliasesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemasResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesResponse; /** - * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. - * @param message GetSrvVSchemasResponse + * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. + * @param message GetCellsAliasesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetSrvVSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetCellsAliasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSrvVSchemasResponse to JSON. + * Converts this GetCellsAliasesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletRequest. */ - interface IGetTabletRequest { + /** Properties of a GetFullStatusRequest. */ + interface IGetFullStatusRequest { - /** GetTabletRequest tablet_alias */ + /** GetFullStatusRequest tablet_alias */ tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a GetTabletRequest. */ - class GetTabletRequest implements IGetTabletRequest { + /** Represents a GetFullStatusRequest. */ + class GetFullStatusRequest implements IGetFullStatusRequest { /** - * Constructs a new GetTabletRequest. + * Constructs a new GetFullStatusRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetTabletRequest); + constructor(properties?: vtctldata.IGetFullStatusRequest); - /** GetTabletRequest tablet_alias. */ + /** GetFullStatusRequest tablet_alias. */ public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new GetTabletRequest instance using the specified properties. + * Creates a new GetFullStatusRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletRequest instance + * @returns GetFullStatusRequest instance */ - public static create(properties?: vtctldata.IGetTabletRequest): vtctldata.GetTabletRequest; + public static create(properties?: vtctldata.IGetFullStatusRequest): vtctldata.GetFullStatusRequest; /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode + * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * @param message GetFullStatusRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode + * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * @param message GetFullStatusRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetFullStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletRequest message from the specified reader or buffer. + * Decodes a GetFullStatusRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTabletRequest + * @returns GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetFullStatusRequest; /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletRequest + * @returns GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetFullStatusRequest; /** - * Verifies a GetTabletRequest message. + * Verifies a GetFullStatusRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletRequest + * @returns GetFullStatusRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetFullStatusRequest; /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @param message GetTabletRequest + * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. + * @param message GetFullStatusRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetFullStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletRequest to JSON. + * Converts this GetFullStatusRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletResponse. */ - interface IGetTabletResponse { + /** Properties of a GetFullStatusResponse. */ + interface IGetFullStatusResponse { - /** GetTabletResponse tablet */ - tablet?: (topodata.ITablet|null); + /** GetFullStatusResponse status */ + status?: (replicationdata.IFullStatus|null); } - /** Represents a GetTabletResponse. */ - class GetTabletResponse implements IGetTabletResponse { + /** Represents a GetFullStatusResponse. */ + class GetFullStatusResponse implements IGetFullStatusResponse { /** - * Constructs a new GetTabletResponse. + * Constructs a new GetFullStatusResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetTabletResponse); + constructor(properties?: vtctldata.IGetFullStatusResponse); - /** GetTabletResponse tablet. */ - public tablet?: (topodata.ITablet|null); + /** GetFullStatusResponse status. */ + public status?: (replicationdata.IFullStatus|null); /** - * Creates a new GetTabletResponse instance using the specified properties. + * Creates a new GetFullStatusResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletResponse instance + * @returns GetFullStatusResponse instance */ - public static create(properties?: vtctldata.IGetTabletResponse): vtctldata.GetTabletResponse; + public static create(properties?: vtctldata.IGetFullStatusResponse): vtctldata.GetFullStatusResponse; /** - * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @param message GetTabletResponse message or plain object to encode + * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * @param message GetFullStatusResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetFullStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @param message GetTabletResponse message or plain object to encode + * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * @param message GetFullStatusResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetFullStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletResponse message from the specified reader or buffer. + * Decodes a GetFullStatusResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTabletResponse + * @returns GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetFullStatusResponse; /** - * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletResponse + * @returns GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetFullStatusResponse; /** - * Verifies a GetTabletResponse message. + * Verifies a GetFullStatusResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletResponse + * @returns GetFullStatusResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetFullStatusResponse; /** - * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. - * @param message GetTabletResponse + * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. + * @param message GetFullStatusResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetFullStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletResponse to JSON. + * Converts this GetFullStatusResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletsRequest. */ - interface IGetTabletsRequest { - - /** GetTabletsRequest keyspace */ - keyspace?: (string|null); - - /** GetTabletsRequest shard */ - shard?: (string|null); - - /** GetTabletsRequest cells */ - cells?: (string[]|null); - - /** GetTabletsRequest strict */ - strict?: (boolean|null); - - /** GetTabletsRequest tablet_aliases */ - tablet_aliases?: (topodata.ITabletAlias[]|null); - - /** GetTabletsRequest tablet_type */ - tablet_type?: (topodata.TabletType|null); + /** Properties of a GetKeyspacesRequest. */ + interface IGetKeyspacesRequest { } - /** Represents a GetTabletsRequest. */ - class GetTabletsRequest implements IGetTabletsRequest { - - /** - * Constructs a new GetTabletsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetTabletsRequest); - - /** GetTabletsRequest keyspace. */ - public keyspace: string; - - /** GetTabletsRequest shard. */ - public shard: string; - - /** GetTabletsRequest cells. */ - public cells: string[]; - - /** GetTabletsRequest strict. */ - public strict: boolean; - - /** GetTabletsRequest tablet_aliases. */ - public tablet_aliases: topodata.ITabletAlias[]; + /** Represents a GetKeyspacesRequest. */ + class GetKeyspacesRequest implements IGetKeyspacesRequest { - /** GetTabletsRequest tablet_type. */ - public tablet_type: topodata.TabletType; + /** + * Constructs a new GetKeyspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IGetKeyspacesRequest); /** - * Creates a new GetTabletsRequest instance using the specified properties. + * Creates a new GetKeyspacesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletsRequest instance + * @returns GetKeyspacesRequest instance */ - public static create(properties?: vtctldata.IGetTabletsRequest): vtctldata.GetTabletsRequest; + public static create(properties?: vtctldata.IGetKeyspacesRequest): vtctldata.GetKeyspacesRequest; /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode + * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * @param message GetKeyspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode + * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * @param message GetKeyspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTabletsRequest + * @returns GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesRequest; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletsRequest + * @returns GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesRequest; /** - * Verifies a GetTabletsRequest message. + * Verifies a GetKeyspacesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletsRequest + * @returns GetKeyspacesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesRequest; /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @param message GetTabletsRequest + * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. + * @param message GetKeyspacesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletsRequest to JSON. + * Converts this GetKeyspacesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletsResponse. */ - interface IGetTabletsResponse { + /** Properties of a GetKeyspacesResponse. */ + interface IGetKeyspacesResponse { - /** GetTabletsResponse tablets */ - tablets?: (topodata.ITablet[]|null); + /** GetKeyspacesResponse keyspaces */ + keyspaces?: (vtctldata.IKeyspace[]|null); } - /** Represents a GetTabletsResponse. */ - class GetTabletsResponse implements IGetTabletsResponse { + /** Represents a GetKeyspacesResponse. */ + class GetKeyspacesResponse implements IGetKeyspacesResponse { /** - * Constructs a new GetTabletsResponse. + * Constructs a new GetKeyspacesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetTabletsResponse); + constructor(properties?: vtctldata.IGetKeyspacesResponse); - /** GetTabletsResponse tablets. */ - public tablets: topodata.ITablet[]; + /** GetKeyspacesResponse keyspaces. */ + public keyspaces: vtctldata.IKeyspace[]; /** - * Creates a new GetTabletsResponse instance using the specified properties. + * Creates a new GetKeyspacesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletsResponse instance + * @returns GetKeyspacesResponse instance */ - public static create(properties?: vtctldata.IGetTabletsResponse): vtctldata.GetTabletsResponse; + public static create(properties?: vtctldata.IGetKeyspacesResponse): vtctldata.GetKeyspacesResponse; /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode + * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * @param message GetKeyspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode + * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * @param message GetKeyspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTabletsResponse + * @returns GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesResponse; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletsResponse + * @returns GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesResponse; /** - * Verifies a GetTabletsResponse message. + * Verifies a GetKeyspacesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletsResponse + * @returns GetKeyspacesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesResponse; /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @param message GetTabletsResponse + * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. + * @param message GetKeyspacesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletsResponse to JSON. + * Converts this GetKeyspacesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTopologyPathRequest. */ - interface IGetTopologyPathRequest { + /** Properties of a GetKeyspaceRequest. */ + interface IGetKeyspaceRequest { - /** GetTopologyPathRequest path */ - path?: (string|null); + /** GetKeyspaceRequest keyspace */ + keyspace?: (string|null); } - /** Represents a GetTopologyPathRequest. */ - class GetTopologyPathRequest implements IGetTopologyPathRequest { + /** Represents a GetKeyspaceRequest. */ + class GetKeyspaceRequest implements IGetKeyspaceRequest { /** - * Constructs a new GetTopologyPathRequest. + * Constructs a new GetKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetTopologyPathRequest); + constructor(properties?: vtctldata.IGetKeyspaceRequest); - /** GetTopologyPathRequest path. */ - public path: string; + /** GetKeyspaceRequest keyspace. */ + public keyspace: string; /** - * Creates a new GetTopologyPathRequest instance using the specified properties. + * Creates a new GetKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTopologyPathRequest instance + * @returns GetKeyspaceRequest instance */ - public static create(properties?: vtctldata.IGetTopologyPathRequest): vtctldata.GetTopologyPathRequest; + public static create(properties?: vtctldata.IGetKeyspaceRequest): vtctldata.GetKeyspaceRequest; /** - * Encodes the specified GetTopologyPathRequest message. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. - * @param message GetTopologyPathRequest message or plain object to encode + * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * @param message GetKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTopologyPathRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTopologyPathRequest message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. - * @param message GetTopologyPathRequest message or plain object to encode + * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * @param message GetKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTopologyPathRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTopologyPathRequest message from the specified reader or buffer. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTopologyPathRequest + * @returns GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTopologyPathRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceRequest; /** - * Decodes a GetTopologyPathRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTopologyPathRequest + * @returns GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTopologyPathRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceRequest; /** - * Verifies a GetTopologyPathRequest message. + * Verifies a GetKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTopologyPathRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTopologyPathRequest + * @returns GetKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTopologyPathRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceRequest; /** - * Creates a plain object from a GetTopologyPathRequest message. Also converts values to other types if specified. - * @param message GetTopologyPathRequest + * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. + * @param message GetKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTopologyPathRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTopologyPathRequest to JSON. + * Converts this GetKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTopologyPathResponse. */ - interface IGetTopologyPathResponse { + /** Properties of a GetKeyspaceResponse. */ + interface IGetKeyspaceResponse { - /** GetTopologyPathResponse cell */ - cell?: (vtctldata.ITopologyCell|null); + /** GetKeyspaceResponse keyspace */ + keyspace?: (vtctldata.IKeyspace|null); } - /** Represents a GetTopologyPathResponse. */ - class GetTopologyPathResponse implements IGetTopologyPathResponse { + /** Represents a GetKeyspaceResponse. */ + class GetKeyspaceResponse implements IGetKeyspaceResponse { /** - * Constructs a new GetTopologyPathResponse. + * Constructs a new GetKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetTopologyPathResponse); + constructor(properties?: vtctldata.IGetKeyspaceResponse); - /** GetTopologyPathResponse cell. */ - public cell?: (vtctldata.ITopologyCell|null); + /** GetKeyspaceResponse keyspace. */ + public keyspace?: (vtctldata.IKeyspace|null); /** - * Creates a new GetTopologyPathResponse instance using the specified properties. + * Creates a new GetKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetTopologyPathResponse instance + * @returns GetKeyspaceResponse instance */ - public static create(properties?: vtctldata.IGetTopologyPathResponse): vtctldata.GetTopologyPathResponse; + public static create(properties?: vtctldata.IGetKeyspaceResponse): vtctldata.GetKeyspaceResponse; /** - * Encodes the specified GetTopologyPathResponse message. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. - * @param message GetTopologyPathResponse message or plain object to encode + * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * @param message GetKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetTopologyPathResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTopologyPathResponse message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. - * @param message GetTopologyPathResponse message or plain object to encode + * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * @param message GetKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetTopologyPathResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTopologyPathResponse message from the specified reader or buffer. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTopologyPathResponse + * @returns GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTopologyPathResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceResponse; /** - * Decodes a GetTopologyPathResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTopologyPathResponse + * @returns GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTopologyPathResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceResponse; /** - * Verifies a GetTopologyPathResponse message. + * Verifies a GetKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTopologyPathResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTopologyPathResponse + * @returns GetKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTopologyPathResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceResponse; /** - * Creates a plain object from a GetTopologyPathResponse message. Also converts values to other types if specified. - * @param message GetTopologyPathResponse + * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. + * @param message GetKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetTopologyPathResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTopologyPathResponse to JSON. + * Converts this GetKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TopologyCell. */ - interface ITopologyCell { - - /** TopologyCell name */ - name?: (string|null); - - /** TopologyCell path */ - path?: (string|null); - - /** TopologyCell data */ - data?: (string|null); + /** Properties of a GetPermissionsRequest. */ + interface IGetPermissionsRequest { - /** TopologyCell children */ - children?: (string[]|null); + /** GetPermissionsRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a TopologyCell. */ - class TopologyCell implements ITopologyCell { + /** Represents a GetPermissionsRequest. */ + class GetPermissionsRequest implements IGetPermissionsRequest { /** - * Constructs a new TopologyCell. + * Constructs a new GetPermissionsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ITopologyCell); - - /** TopologyCell name. */ - public name: string; - - /** TopologyCell path. */ - public path: string; - - /** TopologyCell data. */ - public data: string; + constructor(properties?: vtctldata.IGetPermissionsRequest); - /** TopologyCell children. */ - public children: string[]; + /** GetPermissionsRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new TopologyCell instance using the specified properties. + * Creates a new GetPermissionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TopologyCell instance + * @returns GetPermissionsRequest instance */ - public static create(properties?: vtctldata.ITopologyCell): vtctldata.TopologyCell; + public static create(properties?: vtctldata.IGetPermissionsRequest): vtctldata.GetPermissionsRequest; /** - * Encodes the specified TopologyCell message. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. - * @param message TopologyCell message or plain object to encode + * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * @param message GetPermissionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ITopologyCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TopologyCell message, length delimited. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. - * @param message TopologyCell message or plain object to encode + * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * @param message GetPermissionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ITopologyCell, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TopologyCell message from the specified reader or buffer. + * Decodes a GetPermissionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TopologyCell + * @returns GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TopologyCell; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetPermissionsRequest; /** - * Decodes a TopologyCell message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TopologyCell + * @returns GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TopologyCell; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetPermissionsRequest; /** - * Verifies a TopologyCell message. + * Verifies a GetPermissionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TopologyCell message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TopologyCell + * @returns GetPermissionsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.TopologyCell; + public static fromObject(object: { [k: string]: any }): vtctldata.GetPermissionsRequest; /** - * Creates a plain object from a TopologyCell message. Also converts values to other types if specified. - * @param message TopologyCell + * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. + * @param message GetPermissionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.TopologyCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TopologyCell to JSON. + * Converts this GetPermissionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVSchemaRequest. */ - interface IGetVSchemaRequest { + /** Properties of a GetPermissionsResponse. */ + interface IGetPermissionsResponse { - /** GetVSchemaRequest keyspace */ - keyspace?: (string|null); + /** GetPermissionsResponse permissions */ + permissions?: (tabletmanagerdata.IPermissions|null); } - /** Represents a GetVSchemaRequest. */ - class GetVSchemaRequest implements IGetVSchemaRequest { + /** Represents a GetPermissionsResponse. */ + class GetPermissionsResponse implements IGetPermissionsResponse { /** - * Constructs a new GetVSchemaRequest. + * Constructs a new GetPermissionsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetVSchemaRequest); + constructor(properties?: vtctldata.IGetPermissionsResponse); - /** GetVSchemaRequest keyspace. */ - public keyspace: string; + /** GetPermissionsResponse permissions. */ + public permissions?: (tabletmanagerdata.IPermissions|null); /** - * Creates a new GetVSchemaRequest instance using the specified properties. + * Creates a new GetPermissionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetVSchemaRequest instance + * @returns GetPermissionsResponse instance */ - public static create(properties?: vtctldata.IGetVSchemaRequest): vtctldata.GetVSchemaRequest; + public static create(properties?: vtctldata.IGetPermissionsResponse): vtctldata.GetPermissionsResponse; /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode + * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * @param message GetPermissionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode + * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * @param message GetPermissionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. + * Decodes a GetPermissionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetVSchemaRequest + * @returns GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetPermissionsResponse; /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVSchemaRequest + * @returns GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetPermissionsResponse; /** - * Verifies a GetVSchemaRequest message. + * Verifies a GetPermissionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVSchemaRequest + * @returns GetPermissionsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetPermissionsResponse; /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. - * @param message GetVSchemaRequest + * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. + * @param message GetPermissionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVSchemaRequest to JSON. + * Converts this GetPermissionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVersionRequest. */ - interface IGetVersionRequest { - - /** GetVersionRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** Properties of a GetRoutingRulesRequest. */ + interface IGetRoutingRulesRequest { } - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { + /** Represents a GetRoutingRulesRequest. */ + class GetRoutingRulesRequest implements IGetRoutingRulesRequest { /** - * Constructs a new GetVersionRequest. + * Constructs a new GetRoutingRulesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetVersionRequest); - - /** GetVersionRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + constructor(properties?: vtctldata.IGetRoutingRulesRequest); /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new GetRoutingRulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetVersionRequest instance + * @returns GetRoutingRulesRequest instance */ - public static create(properties?: vtctldata.IGetVersionRequest): vtctldata.GetVersionRequest; + public static create(properties?: vtctldata.IGetRoutingRulesRequest): vtctldata.GetRoutingRulesRequest; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * @param message GetRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * @param message GetRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetVersionRequest + * @returns GetRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetRoutingRulesRequest; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVersionRequest + * @returns GetRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetRoutingRulesRequest; /** - * Verifies a GetVersionRequest message. + * Verifies a GetRoutingRulesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVersionRequest + * @returns GetRoutingRulesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVersionRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetRoutingRulesRequest; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest + * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. + * @param message GetRoutingRulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVersionRequest to JSON. + * Converts this GetRoutingRulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVersionResponse. */ - interface IGetVersionResponse { + /** Properties of a GetRoutingRulesResponse. */ + interface IGetRoutingRulesResponse { - /** GetVersionResponse version */ - version?: (string|null); + /** GetRoutingRulesResponse routing_rules */ + routing_rules?: (vschema.IRoutingRules|null); } - /** Represents a GetVersionResponse. */ - class GetVersionResponse implements IGetVersionResponse { + /** Represents a GetRoutingRulesResponse. */ + class GetRoutingRulesResponse implements IGetRoutingRulesResponse { /** - * Constructs a new GetVersionResponse. + * Constructs a new GetRoutingRulesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetVersionResponse); + constructor(properties?: vtctldata.IGetRoutingRulesResponse); - /** GetVersionResponse version. */ - public version: string; + /** GetRoutingRulesResponse routing_rules. */ + public routing_rules?: (vschema.IRoutingRules|null); /** - * Creates a new GetVersionResponse instance using the specified properties. + * Creates a new GetRoutingRulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetVersionResponse instance + * @returns GetRoutingRulesResponse instance */ - public static create(properties?: vtctldata.IGetVersionResponse): vtctldata.GetVersionResponse; + public static create(properties?: vtctldata.IGetRoutingRulesResponse): vtctldata.GetRoutingRulesResponse; /** - * Encodes the specified GetVersionResponse message. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. - * @param message GetVersionResponse message or plain object to encode + * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * @param message GetRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVersionResponse message, length delimited. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. - * @param message GetVersionResponse message or plain object to encode + * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * @param message GetRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVersionResponse message from the specified reader or buffer. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetVersionResponse + * @returns GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVersionResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetRoutingRulesResponse; /** - * Decodes a GetVersionResponse message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVersionResponse + * @returns GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVersionResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetRoutingRulesResponse; /** - * Verifies a GetVersionResponse message. + * Verifies a GetRoutingRulesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetVersionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVersionResponse + * @returns GetRoutingRulesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVersionResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetRoutingRulesResponse; /** - * Creates a plain object from a GetVersionResponse message. Also converts values to other types if specified. - * @param message GetVersionResponse + * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. + * @param message GetRoutingRulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVersionResponse to JSON. + * Converts this GetRoutingRulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVSchemaResponse. */ - interface IGetVSchemaResponse { + /** Properties of a GetSchemaRequest. */ + interface IGetSchemaRequest { - /** GetVSchemaResponse v_schema */ - v_schema?: (vschema.IKeyspace|null); + /** GetSchemaRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** GetSchemaRequest tables */ + tables?: (string[]|null); + + /** GetSchemaRequest exclude_tables */ + exclude_tables?: (string[]|null); + + /** GetSchemaRequest include_views */ + include_views?: (boolean|null); + + /** GetSchemaRequest table_names_only */ + table_names_only?: (boolean|null); + + /** GetSchemaRequest table_sizes_only */ + table_sizes_only?: (boolean|null); + + /** GetSchemaRequest table_schema_only */ + table_schema_only?: (boolean|null); } - /** Represents a GetVSchemaResponse. */ - class GetVSchemaResponse implements IGetVSchemaResponse { + /** Represents a GetSchemaRequest. */ + class GetSchemaRequest implements IGetSchemaRequest { /** - * Constructs a new GetVSchemaResponse. + * Constructs a new GetSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetVSchemaResponse); + constructor(properties?: vtctldata.IGetSchemaRequest); - /** GetVSchemaResponse v_schema. */ - public v_schema?: (vschema.IKeyspace|null); + /** GetSchemaRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** GetSchemaRequest tables. */ + public tables: string[]; + + /** GetSchemaRequest exclude_tables. */ + public exclude_tables: string[]; + + /** GetSchemaRequest include_views. */ + public include_views: boolean; + + /** GetSchemaRequest table_names_only. */ + public table_names_only: boolean; + + /** GetSchemaRequest table_sizes_only. */ + public table_sizes_only: boolean; + + /** GetSchemaRequest table_schema_only. */ + public table_schema_only: boolean; /** - * Creates a new GetVSchemaResponse instance using the specified properties. + * Creates a new GetSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetVSchemaResponse instance + * @returns GetSchemaRequest instance */ - public static create(properties?: vtctldata.IGetVSchemaResponse): vtctldata.GetVSchemaResponse; + public static create(properties?: vtctldata.IGetSchemaRequest): vtctldata.GetSchemaRequest; /** - * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @param message GetVSchemaResponse message or plain object to encode + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @param message GetVSchemaResponse message or plain object to encode + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer. + * Decodes a GetSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetVSchemaResponse + * @returns GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaRequest; /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVSchemaResponse + * @returns GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaRequest; /** - * Verifies a GetVSchemaResponse message. + * Verifies a GetSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVSchemaResponse + * @returns GetSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaRequest; /** - * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. - * @param message GetVSchemaResponse + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @param message GetSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVSchemaResponse to JSON. + * Converts this GetSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetWorkflowsRequest. */ - interface IGetWorkflowsRequest { - - /** GetWorkflowsRequest keyspace */ - keyspace?: (string|null); + /** Properties of a GetSchemaResponse. */ + interface IGetSchemaResponse { - /** GetWorkflowsRequest active_only */ - active_only?: (boolean|null); + /** GetSchemaResponse schema */ + schema?: (tabletmanagerdata.ISchemaDefinition|null); } - /** Represents a GetWorkflowsRequest. */ - class GetWorkflowsRequest implements IGetWorkflowsRequest { + /** Represents a GetSchemaResponse. */ + class GetSchemaResponse implements IGetSchemaResponse { /** - * Constructs a new GetWorkflowsRequest. + * Constructs a new GetSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetWorkflowsRequest); - - /** GetWorkflowsRequest keyspace. */ - public keyspace: string; + constructor(properties?: vtctldata.IGetSchemaResponse); - /** GetWorkflowsRequest active_only. */ - public active_only: boolean; + /** GetSchemaResponse schema. */ + public schema?: (tabletmanagerdata.ISchemaDefinition|null); /** - * Creates a new GetWorkflowsRequest instance using the specified properties. + * Creates a new GetSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetWorkflowsRequest instance + * @returns GetSchemaResponse instance */ - public static create(properties?: vtctldata.IGetWorkflowsRequest): vtctldata.GetWorkflowsRequest; + public static create(properties?: vtctldata.IGetSchemaResponse): vtctldata.GetSchemaResponse; /** - * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @param message GetWorkflowsRequest message or plain object to encode + * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * @param message GetSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @param message GetWorkflowsRequest message or plain object to encode + * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * @param message GetSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer. + * Decodes a GetSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetWorkflowsRequest + * @returns GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaResponse; /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetWorkflowsRequest + * @returns GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaResponse; /** - * Verifies a GetWorkflowsRequest message. + * Verifies a GetSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetWorkflowsRequest + * @returns GetSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaResponse; /** - * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. - * @param message GetWorkflowsRequest + * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. + * @param message GetSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetWorkflowsRequest to JSON. + * Converts this GetSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetWorkflowsResponse. */ - interface IGetWorkflowsResponse { + /** Properties of a GetShardRequest. */ + interface IGetShardRequest { - /** GetWorkflowsResponse workflows */ - workflows?: (vtctldata.IWorkflow[]|null); + /** GetShardRequest keyspace */ + keyspace?: (string|null); + + /** GetShardRequest shard_name */ + shard_name?: (string|null); } - /** Represents a GetWorkflowsResponse. */ - class GetWorkflowsResponse implements IGetWorkflowsResponse { + /** Represents a GetShardRequest. */ + class GetShardRequest implements IGetShardRequest { /** - * Constructs a new GetWorkflowsResponse. + * Constructs a new GetShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IGetWorkflowsResponse); + constructor(properties?: vtctldata.IGetShardRequest); - /** GetWorkflowsResponse workflows. */ - public workflows: vtctldata.IWorkflow[]; + /** GetShardRequest keyspace. */ + public keyspace: string; + + /** GetShardRequest shard_name. */ + public shard_name: string; /** - * Creates a new GetWorkflowsResponse instance using the specified properties. + * Creates a new GetShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetWorkflowsResponse instance + * @returns GetShardRequest instance */ - public static create(properties?: vtctldata.IGetWorkflowsResponse): vtctldata.GetWorkflowsResponse; + public static create(properties?: vtctldata.IGetShardRequest): vtctldata.GetShardRequest; /** - * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @param message GetWorkflowsResponse message or plain object to encode + * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * @param message GetShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @param message GetWorkflowsResponse message or plain object to encode + * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * @param message GetShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer. + * Decodes a GetShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetWorkflowsResponse + * @returns GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRequest; /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetWorkflowsResponse + * @returns GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRequest; /** - * Verifies a GetWorkflowsResponse message. + * Verifies a GetShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetWorkflowsResponse + * @returns GetShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRequest; /** - * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. - * @param message GetWorkflowsResponse + * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. + * @param message GetShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.GetWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetWorkflowsResponse to JSON. + * Converts this GetShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InitShardPrimaryRequest. */ - interface IInitShardPrimaryRequest { - - /** InitShardPrimaryRequest keyspace */ - keyspace?: (string|null); - - /** InitShardPrimaryRequest shard */ - shard?: (string|null); - - /** InitShardPrimaryRequest primary_elect_tablet_alias */ - primary_elect_tablet_alias?: (topodata.ITabletAlias|null); - - /** InitShardPrimaryRequest force */ - force?: (boolean|null); + /** Properties of a GetShardResponse. */ + interface IGetShardResponse { - /** InitShardPrimaryRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); + /** GetShardResponse shard */ + shard?: (vtctldata.IShard|null); } - /** Represents an InitShardPrimaryRequest. */ - class InitShardPrimaryRequest implements IInitShardPrimaryRequest { + /** Represents a GetShardResponse. */ + class GetShardResponse implements IGetShardResponse { /** - * Constructs a new InitShardPrimaryRequest. + * Constructs a new GetShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IInitShardPrimaryRequest); - - /** InitShardPrimaryRequest keyspace. */ - public keyspace: string; - - /** InitShardPrimaryRequest shard. */ - public shard: string; - - /** InitShardPrimaryRequest primary_elect_tablet_alias. */ - public primary_elect_tablet_alias?: (topodata.ITabletAlias|null); - - /** InitShardPrimaryRequest force. */ - public force: boolean; + constructor(properties?: vtctldata.IGetShardResponse); - /** InitShardPrimaryRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); + /** GetShardResponse shard. */ + public shard?: (vtctldata.IShard|null); /** - * Creates a new InitShardPrimaryRequest instance using the specified properties. + * Creates a new GetShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns InitShardPrimaryRequest instance + * @returns GetShardResponse instance */ - public static create(properties?: vtctldata.IInitShardPrimaryRequest): vtctldata.InitShardPrimaryRequest; + public static create(properties?: vtctldata.IGetShardResponse): vtctldata.GetShardResponse; /** - * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @param message InitShardPrimaryRequest message or plain object to encode + * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * @param message GetShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @param message InitShardPrimaryRequest message or plain object to encode + * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * @param message GetShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. + * Decodes a GetShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitShardPrimaryRequest + * @returns GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardResponse; /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitShardPrimaryRequest + * @returns GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardResponse; /** - * Verifies an InitShardPrimaryRequest message. + * Verifies a GetShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitShardPrimaryRequest + * @returns GetShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetShardResponse; /** - * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. - * @param message InitShardPrimaryRequest + * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. + * @param message GetShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.InitShardPrimaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitShardPrimaryRequest to JSON. + * Converts this GetShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InitShardPrimaryResponse. */ - interface IInitShardPrimaryResponse { - - /** InitShardPrimaryResponse events */ - events?: (logutil.IEvent[]|null); + /** Properties of a GetShardRoutingRulesRequest. */ + interface IGetShardRoutingRulesRequest { } - /** Represents an InitShardPrimaryResponse. */ - class InitShardPrimaryResponse implements IInitShardPrimaryResponse { + /** Represents a GetShardRoutingRulesRequest. */ + class GetShardRoutingRulesRequest implements IGetShardRoutingRulesRequest { /** - * Constructs a new InitShardPrimaryResponse. + * Constructs a new GetShardRoutingRulesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IInitShardPrimaryResponse); - - /** InitShardPrimaryResponse events. */ - public events: logutil.IEvent[]; + constructor(properties?: vtctldata.IGetShardRoutingRulesRequest); /** - * Creates a new InitShardPrimaryResponse instance using the specified properties. + * Creates a new GetShardRoutingRulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitShardPrimaryResponse instance + * @returns GetShardRoutingRulesRequest instance */ - public static create(properties?: vtctldata.IInitShardPrimaryResponse): vtctldata.InitShardPrimaryResponse; + public static create(properties?: vtctldata.IGetShardRoutingRulesRequest): vtctldata.GetShardRoutingRulesRequest; /** - * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @param message InitShardPrimaryResponse message or plain object to encode + * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * @param message GetShardRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @param message InitShardPrimaryResponse message or plain object to encode + * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * @param message GetShardRoutingRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetShardRoutingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitShardPrimaryResponse + * @returns GetShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRoutingRulesRequest; /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitShardPrimaryResponse + * @returns GetShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRoutingRulesRequest; /** - * Verifies an InitShardPrimaryResponse message. + * Verifies a GetShardRoutingRulesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitShardPrimaryResponse + * @returns GetShardRoutingRulesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRoutingRulesRequest; /** - * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. - * @param message InitShardPrimaryResponse + * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. + * @param message GetShardRoutingRulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.InitShardPrimaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetShardRoutingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitShardPrimaryResponse to JSON. + * Converts this GetShardRoutingRulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PingTabletRequest. */ - interface IPingTabletRequest { + /** Properties of a GetShardRoutingRulesResponse. */ + interface IGetShardRoutingRulesResponse { - /** PingTabletRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** GetShardRoutingRulesResponse shard_routing_rules */ + shard_routing_rules?: (vschema.IShardRoutingRules|null); } - /** Represents a PingTabletRequest. */ - class PingTabletRequest implements IPingTabletRequest { + /** Represents a GetShardRoutingRulesResponse. */ + class GetShardRoutingRulesResponse implements IGetShardRoutingRulesResponse { /** - * Constructs a new PingTabletRequest. + * Constructs a new GetShardRoutingRulesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IPingTabletRequest); + constructor(properties?: vtctldata.IGetShardRoutingRulesResponse); - /** PingTabletRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** GetShardRoutingRulesResponse shard_routing_rules. */ + public shard_routing_rules?: (vschema.IShardRoutingRules|null); /** - * Creates a new PingTabletRequest instance using the specified properties. + * Creates a new GetShardRoutingRulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PingTabletRequest instance + * @returns GetShardRoutingRulesResponse instance */ - public static create(properties?: vtctldata.IPingTabletRequest): vtctldata.PingTabletRequest; + public static create(properties?: vtctldata.IGetShardRoutingRulesResponse): vtctldata.GetShardRoutingRulesResponse; /** - * Encodes the specified PingTabletRequest message. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. - * @param message PingTabletRequest message or plain object to encode + * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * @param message GetShardRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IPingTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PingTabletRequest message, length delimited. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. - * @param message PingTabletRequest message or plain object to encode + * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * @param message GetShardRoutingRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IPingTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetShardRoutingRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingTabletRequest message from the specified reader or buffer. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PingTabletRequest + * @returns GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PingTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRoutingRulesResponse; /** - * Decodes a PingTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingTabletRequest + * @returns GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PingTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRoutingRulesResponse; /** - * Verifies a PingTabletRequest message. + * Verifies a GetShardRoutingRulesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PingTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PingTabletRequest + * @returns GetShardRoutingRulesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.PingTabletRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRoutingRulesResponse; /** - * Creates a plain object from a PingTabletRequest message. Also converts values to other types if specified. - * @param message PingTabletRequest + * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. + * @param message GetShardRoutingRulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.PingTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetShardRoutingRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PingTabletRequest to JSON. + * Converts this GetShardRoutingRulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PingTabletResponse. */ - interface IPingTabletResponse { + /** Properties of a GetSrvKeyspaceNamesRequest. */ + interface IGetSrvKeyspaceNamesRequest { + + /** GetSrvKeyspaceNamesRequest cells */ + cells?: (string[]|null); } - /** Represents a PingTabletResponse. */ - class PingTabletResponse implements IPingTabletResponse { + /** Represents a GetSrvKeyspaceNamesRequest. */ + class GetSrvKeyspaceNamesRequest implements IGetSrvKeyspaceNamesRequest { /** - * Constructs a new PingTabletResponse. + * Constructs a new GetSrvKeyspaceNamesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IPingTabletResponse); + constructor(properties?: vtctldata.IGetSrvKeyspaceNamesRequest); + + /** GetSrvKeyspaceNamesRequest cells. */ + public cells: string[]; /** - * Creates a new PingTabletResponse instance using the specified properties. + * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PingTabletResponse instance + * @returns GetSrvKeyspaceNamesRequest instance */ - public static create(properties?: vtctldata.IPingTabletResponse): vtctldata.PingTabletResponse; + public static create(properties?: vtctldata.IGetSrvKeyspaceNamesRequest): vtctldata.GetSrvKeyspaceNamesRequest; /** - * Encodes the specified PingTabletResponse message. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. - * @param message PingTabletResponse message or plain object to encode + * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * @param message GetSrvKeyspaceNamesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IPingTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvKeyspaceNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PingTabletResponse message, length delimited. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. - * @param message PingTabletResponse message or plain object to encode + * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * @param message GetSrvKeyspaceNamesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IPingTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvKeyspaceNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingTabletResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PingTabletResponse + * @returns GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PingTabletResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesRequest; /** - * Decodes a PingTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingTabletResponse + * @returns GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PingTabletResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesRequest; /** - * Verifies a PingTabletResponse message. + * Verifies a GetSrvKeyspaceNamesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PingTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PingTabletResponse + * @returns GetSrvKeyspaceNamesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.PingTabletResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesRequest; /** - * Creates a plain object from a PingTabletResponse message. Also converts values to other types if specified. - * @param message PingTabletResponse + * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. + * @param message GetSrvKeyspaceNamesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.PingTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvKeyspaceNamesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PingTabletResponse to JSON. + * Converts this GetSrvKeyspaceNamesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PlannedReparentShardRequest. */ - interface IPlannedReparentShardRequest { - - /** PlannedReparentShardRequest keyspace */ - keyspace?: (string|null); - - /** PlannedReparentShardRequest shard */ - shard?: (string|null); - - /** PlannedReparentShardRequest new_primary */ - new_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest avoid_primary */ - avoid_primary?: (topodata.ITabletAlias|null); + /** Properties of a GetSrvKeyspaceNamesResponse. */ + interface IGetSrvKeyspaceNamesResponse { - /** PlannedReparentShardRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); + /** GetSrvKeyspaceNamesResponse names */ + names?: ({ [k: string]: vtctldata.GetSrvKeyspaceNamesResponse.INameList }|null); } - /** Represents a PlannedReparentShardRequest. */ - class PlannedReparentShardRequest implements IPlannedReparentShardRequest { + /** Represents a GetSrvKeyspaceNamesResponse. */ + class GetSrvKeyspaceNamesResponse implements IGetSrvKeyspaceNamesResponse { /** - * Constructs a new PlannedReparentShardRequest. + * Constructs a new GetSrvKeyspaceNamesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IPlannedReparentShardRequest); - - /** PlannedReparentShardRequest keyspace. */ - public keyspace: string; - - /** PlannedReparentShardRequest shard. */ - public shard: string; - - /** PlannedReparentShardRequest new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest avoid_primary. */ - public avoid_primary?: (topodata.ITabletAlias|null); + constructor(properties?: vtctldata.IGetSrvKeyspaceNamesResponse); - /** PlannedReparentShardRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); + /** GetSrvKeyspaceNamesResponse names. */ + public names: { [k: string]: vtctldata.GetSrvKeyspaceNamesResponse.INameList }; /** - * Creates a new PlannedReparentShardRequest instance using the specified properties. + * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PlannedReparentShardRequest instance + * @returns GetSrvKeyspaceNamesResponse instance */ - public static create(properties?: vtctldata.IPlannedReparentShardRequest): vtctldata.PlannedReparentShardRequest; + public static create(properties?: vtctldata.IGetSrvKeyspaceNamesResponse): vtctldata.GetSrvKeyspaceNamesResponse; /** - * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @param message PlannedReparentShardRequest message or plain object to encode + * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * @param message GetSrvKeyspaceNamesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvKeyspaceNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @param message PlannedReparentShardRequest message or plain object to encode + * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * @param message GetSrvKeyspaceNamesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvKeyspaceNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlannedReparentShardRequest + * @returns GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesResponse; /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlannedReparentShardRequest + * @returns GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesResponse; /** - * Verifies a PlannedReparentShardRequest message. + * Verifies a GetSrvKeyspaceNamesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlannedReparentShardRequest + * @returns GetSrvKeyspaceNamesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesResponse; /** - * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. - * @param message PlannedReparentShardRequest + * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. + * @param message GetSrvKeyspaceNamesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.PlannedReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvKeyspaceNamesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlannedReparentShardRequest to JSON. + * Converts this GetSrvKeyspaceNamesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PlannedReparentShardResponse. */ - interface IPlannedReparentShardResponse { + namespace GetSrvKeyspaceNamesResponse { - /** PlannedReparentShardResponse keyspace */ - keyspace?: (string|null); + /** Properties of a NameList. */ + interface INameList { - /** PlannedReparentShardResponse shard */ - shard?: (string|null); + /** NameList names */ + names?: (string[]|null); + } - /** PlannedReparentShardResponse promoted_primary */ - promoted_primary?: (topodata.ITabletAlias|null); + /** Represents a NameList. */ + class NameList implements INameList { - /** PlannedReparentShardResponse events */ - events?: (logutil.IEvent[]|null); + /** + * Constructs a new NameList. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.GetSrvKeyspaceNamesResponse.INameList); + + /** NameList names. */ + public names: string[]; + + /** + * Creates a new NameList instance using the specified properties. + * @param [properties] Properties to set + * @returns NameList instance + */ + public static create(properties?: vtctldata.GetSrvKeyspaceNamesResponse.INameList): vtctldata.GetSrvKeyspaceNamesResponse.NameList; + + /** + * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @param message NameList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.GetSrvKeyspaceNamesResponse.INameList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @param message NameList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.GetSrvKeyspaceNamesResponse.INameList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NameList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspaceNamesResponse.NameList; + + /** + * Decodes a NameList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspaceNamesResponse.NameList; + + /** + * Verifies a NameList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NameList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NameList + */ + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspaceNamesResponse.NameList; + + /** + * Creates a plain object from a NameList message. Also converts values to other types if specified. + * @param message NameList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.GetSrvKeyspaceNamesResponse.NameList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NameList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a PlannedReparentShardResponse. */ - class PlannedReparentShardResponse implements IPlannedReparentShardResponse { + /** Properties of a GetSrvKeyspacesRequest. */ + interface IGetSrvKeyspacesRequest { + + /** GetSrvKeyspacesRequest keyspace */ + keyspace?: (string|null); + + /** GetSrvKeyspacesRequest cells */ + cells?: (string[]|null); + } + + /** Represents a GetSrvKeyspacesRequest. */ + class GetSrvKeyspacesRequest implements IGetSrvKeyspacesRequest { /** - * Constructs a new PlannedReparentShardResponse. + * Constructs a new GetSrvKeyspacesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IPlannedReparentShardResponse); + constructor(properties?: vtctldata.IGetSrvKeyspacesRequest); - /** PlannedReparentShardResponse keyspace. */ + /** GetSrvKeyspacesRequest keyspace. */ public keyspace: string; - /** PlannedReparentShardResponse shard. */ - public shard: string; - - /** PlannedReparentShardResponse promoted_primary. */ - public promoted_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardResponse events. */ - public events: logutil.IEvent[]; + /** GetSrvKeyspacesRequest cells. */ + public cells: string[]; /** - * Creates a new PlannedReparentShardResponse instance using the specified properties. + * Creates a new GetSrvKeyspacesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PlannedReparentShardResponse instance + * @returns GetSrvKeyspacesRequest instance */ - public static create(properties?: vtctldata.IPlannedReparentShardResponse): vtctldata.PlannedReparentShardResponse; + public static create(properties?: vtctldata.IGetSrvKeyspacesRequest): vtctldata.GetSrvKeyspacesRequest; /** - * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @param message PlannedReparentShardResponse message or plain object to encode + * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * @param message GetSrvKeyspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @param message PlannedReparentShardResponse message or plain object to encode + * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * @param message GetSrvKeyspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlannedReparentShardResponse + * @returns GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesRequest; /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlannedReparentShardResponse + * @returns GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesRequest; /** - * Verifies a PlannedReparentShardResponse message. + * Verifies a GetSrvKeyspacesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlannedReparentShardResponse + * @returns GetSrvKeyspacesRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesRequest; /** - * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. - * @param message PlannedReparentShardResponse + * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. + * @param message GetSrvKeyspacesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.PlannedReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlannedReparentShardResponse to JSON. + * Converts this GetSrvKeyspacesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RebuildKeyspaceGraphRequest. */ - interface IRebuildKeyspaceGraphRequest { - - /** RebuildKeyspaceGraphRequest keyspace */ - keyspace?: (string|null); - - /** RebuildKeyspaceGraphRequest cells */ - cells?: (string[]|null); + /** Properties of a GetSrvKeyspacesResponse. */ + interface IGetSrvKeyspacesResponse { - /** RebuildKeyspaceGraphRequest allow_partial */ - allow_partial?: (boolean|null); + /** GetSrvKeyspacesResponse srv_keyspaces */ + srv_keyspaces?: ({ [k: string]: topodata.ISrvKeyspace }|null); } - /** Represents a RebuildKeyspaceGraphRequest. */ - class RebuildKeyspaceGraphRequest implements IRebuildKeyspaceGraphRequest { + /** Represents a GetSrvKeyspacesResponse. */ + class GetSrvKeyspacesResponse implements IGetSrvKeyspacesResponse { /** - * Constructs a new RebuildKeyspaceGraphRequest. + * Constructs a new GetSrvKeyspacesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRebuildKeyspaceGraphRequest); - - /** RebuildKeyspaceGraphRequest keyspace. */ - public keyspace: string; - - /** RebuildKeyspaceGraphRequest cells. */ - public cells: string[]; + constructor(properties?: vtctldata.IGetSrvKeyspacesResponse); - /** RebuildKeyspaceGraphRequest allow_partial. */ - public allow_partial: boolean; + /** GetSrvKeyspacesResponse srv_keyspaces. */ + public srv_keyspaces: { [k: string]: topodata.ISrvKeyspace }; /** - * Creates a new RebuildKeyspaceGraphRequest instance using the specified properties. + * Creates a new GetSrvKeyspacesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RebuildKeyspaceGraphRequest instance + * @returns GetSrvKeyspacesResponse instance */ - public static create(properties?: vtctldata.IRebuildKeyspaceGraphRequest): vtctldata.RebuildKeyspaceGraphRequest; + public static create(properties?: vtctldata.IGetSrvKeyspacesResponse): vtctldata.GetSrvKeyspacesResponse; /** - * Encodes the specified RebuildKeyspaceGraphRequest message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. - * @param message RebuildKeyspaceGraphRequest message or plain object to encode + * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * @param message GetSrvKeyspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRebuildKeyspaceGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RebuildKeyspaceGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. - * @param message RebuildKeyspaceGraphRequest message or plain object to encode + * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * @param message GetSrvKeyspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRebuildKeyspaceGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RebuildKeyspaceGraphRequest + * @returns GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildKeyspaceGraphRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesResponse; /** - * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RebuildKeyspaceGraphRequest + * @returns GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildKeyspaceGraphRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesResponse; /** - * Verifies a RebuildKeyspaceGraphRequest message. + * Verifies a GetSrvKeyspacesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RebuildKeyspaceGraphRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RebuildKeyspaceGraphRequest + * @returns GetSrvKeyspacesResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RebuildKeyspaceGraphRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesResponse; /** - * Creates a plain object from a RebuildKeyspaceGraphRequest message. Also converts values to other types if specified. - * @param message RebuildKeyspaceGraphRequest + * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. + * @param message GetSrvKeyspacesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RebuildKeyspaceGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RebuildKeyspaceGraphRequest to JSON. + * Converts this GetSrvKeyspacesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RebuildKeyspaceGraphResponse. */ - interface IRebuildKeyspaceGraphResponse { + /** Properties of an UpdateThrottlerConfigRequest. */ + interface IUpdateThrottlerConfigRequest { + + /** UpdateThrottlerConfigRequest keyspace */ + keyspace?: (string|null); + + /** UpdateThrottlerConfigRequest enable */ + enable?: (boolean|null); + + /** UpdateThrottlerConfigRequest disable */ + disable?: (boolean|null); + + /** UpdateThrottlerConfigRequest threshold */ + threshold?: (number|null); + + /** UpdateThrottlerConfigRequest custom_query */ + custom_query?: (string|null); + + /** UpdateThrottlerConfigRequest custom_query_set */ + custom_query_set?: (boolean|null); + + /** UpdateThrottlerConfigRequest check_as_check_self */ + check_as_check_self?: (boolean|null); + + /** UpdateThrottlerConfigRequest check_as_check_shard */ + check_as_check_shard?: (boolean|null); } - /** Represents a RebuildKeyspaceGraphResponse. */ - class RebuildKeyspaceGraphResponse implements IRebuildKeyspaceGraphResponse { + /** Represents an UpdateThrottlerConfigRequest. */ + class UpdateThrottlerConfigRequest implements IUpdateThrottlerConfigRequest { /** - * Constructs a new RebuildKeyspaceGraphResponse. + * Constructs a new UpdateThrottlerConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRebuildKeyspaceGraphResponse); + constructor(properties?: vtctldata.IUpdateThrottlerConfigRequest); + + /** UpdateThrottlerConfigRequest keyspace. */ + public keyspace: string; + + /** UpdateThrottlerConfigRequest enable. */ + public enable: boolean; + + /** UpdateThrottlerConfigRequest disable. */ + public disable: boolean; + + /** UpdateThrottlerConfigRequest threshold. */ + public threshold: number; + + /** UpdateThrottlerConfigRequest custom_query. */ + public custom_query: string; + + /** UpdateThrottlerConfigRequest custom_query_set. */ + public custom_query_set: boolean; + + /** UpdateThrottlerConfigRequest check_as_check_self. */ + public check_as_check_self: boolean; + + /** UpdateThrottlerConfigRequest check_as_check_shard. */ + public check_as_check_shard: boolean; /** - * Creates a new RebuildKeyspaceGraphResponse instance using the specified properties. + * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RebuildKeyspaceGraphResponse instance + * @returns UpdateThrottlerConfigRequest instance */ - public static create(properties?: vtctldata.IRebuildKeyspaceGraphResponse): vtctldata.RebuildKeyspaceGraphResponse; + public static create(properties?: vtctldata.IUpdateThrottlerConfigRequest): vtctldata.UpdateThrottlerConfigRequest; /** - * Encodes the specified RebuildKeyspaceGraphResponse message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. - * @param message RebuildKeyspaceGraphResponse message or plain object to encode + * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * @param message UpdateThrottlerConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRebuildKeyspaceGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateThrottlerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RebuildKeyspaceGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. - * @param message RebuildKeyspaceGraphResponse message or plain object to encode + * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * @param message UpdateThrottlerConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRebuildKeyspaceGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateThrottlerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RebuildKeyspaceGraphResponse + * @returns UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildKeyspaceGraphResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateThrottlerConfigRequest; /** - * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RebuildKeyspaceGraphResponse + * @returns UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildKeyspaceGraphResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateThrottlerConfigRequest; /** - * Verifies a RebuildKeyspaceGraphResponse message. + * Verifies an UpdateThrottlerConfigRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RebuildKeyspaceGraphResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RebuildKeyspaceGraphResponse + * @returns UpdateThrottlerConfigRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RebuildKeyspaceGraphResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateThrottlerConfigRequest; /** - * Creates a plain object from a RebuildKeyspaceGraphResponse message. Also converts values to other types if specified. - * @param message RebuildKeyspaceGraphResponse + * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. + * @param message UpdateThrottlerConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RebuildKeyspaceGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateThrottlerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RebuildKeyspaceGraphResponse to JSON. + * Converts this UpdateThrottlerConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RebuildVSchemaGraphRequest. */ - interface IRebuildVSchemaGraphRequest { - - /** RebuildVSchemaGraphRequest cells */ - cells?: (string[]|null); + /** Properties of an UpdateThrottlerConfigResponse. */ + interface IUpdateThrottlerConfigResponse { } - /** Represents a RebuildVSchemaGraphRequest. */ - class RebuildVSchemaGraphRequest implements IRebuildVSchemaGraphRequest { + /** Represents an UpdateThrottlerConfigResponse. */ + class UpdateThrottlerConfigResponse implements IUpdateThrottlerConfigResponse { /** - * Constructs a new RebuildVSchemaGraphRequest. + * Constructs a new UpdateThrottlerConfigResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRebuildVSchemaGraphRequest); - - /** RebuildVSchemaGraphRequest cells. */ - public cells: string[]; + constructor(properties?: vtctldata.IUpdateThrottlerConfigResponse); /** - * Creates a new RebuildVSchemaGraphRequest instance using the specified properties. + * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RebuildVSchemaGraphRequest instance + * @returns UpdateThrottlerConfigResponse instance */ - public static create(properties?: vtctldata.IRebuildVSchemaGraphRequest): vtctldata.RebuildVSchemaGraphRequest; + public static create(properties?: vtctldata.IUpdateThrottlerConfigResponse): vtctldata.UpdateThrottlerConfigResponse; - /** - * Encodes the specified RebuildVSchemaGraphRequest message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. - * @param message RebuildVSchemaGraphRequest message or plain object to encode + /** + * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * @param message UpdateThrottlerConfigResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRebuildVSchemaGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateThrottlerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RebuildVSchemaGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. - * @param message RebuildVSchemaGraphRequest message or plain object to encode + * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * @param message UpdateThrottlerConfigResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRebuildVSchemaGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateThrottlerConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RebuildVSchemaGraphRequest + * @returns UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildVSchemaGraphRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateThrottlerConfigResponse; /** - * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RebuildVSchemaGraphRequest + * @returns UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildVSchemaGraphRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateThrottlerConfigResponse; /** - * Verifies a RebuildVSchemaGraphRequest message. + * Verifies an UpdateThrottlerConfigResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RebuildVSchemaGraphRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RebuildVSchemaGraphRequest + * @returns UpdateThrottlerConfigResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RebuildVSchemaGraphRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateThrottlerConfigResponse; /** - * Creates a plain object from a RebuildVSchemaGraphRequest message. Also converts values to other types if specified. - * @param message RebuildVSchemaGraphRequest + * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. + * @param message UpdateThrottlerConfigResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RebuildVSchemaGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateThrottlerConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RebuildVSchemaGraphRequest to JSON. + * Converts this UpdateThrottlerConfigResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RebuildVSchemaGraphResponse. */ - interface IRebuildVSchemaGraphResponse { + /** Properties of a GetSrvVSchemaRequest. */ + interface IGetSrvVSchemaRequest { + + /** GetSrvVSchemaRequest cell */ + cell?: (string|null); } - /** Represents a RebuildVSchemaGraphResponse. */ - class RebuildVSchemaGraphResponse implements IRebuildVSchemaGraphResponse { + /** Represents a GetSrvVSchemaRequest. */ + class GetSrvVSchemaRequest implements IGetSrvVSchemaRequest { /** - * Constructs a new RebuildVSchemaGraphResponse. + * Constructs a new GetSrvVSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRebuildVSchemaGraphResponse); + constructor(properties?: vtctldata.IGetSrvVSchemaRequest); + + /** GetSrvVSchemaRequest cell. */ + public cell: string; /** - * Creates a new RebuildVSchemaGraphResponse instance using the specified properties. + * Creates a new GetSrvVSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RebuildVSchemaGraphResponse instance + * @returns GetSrvVSchemaRequest instance */ - public static create(properties?: vtctldata.IRebuildVSchemaGraphResponse): vtctldata.RebuildVSchemaGraphResponse; + public static create(properties?: vtctldata.IGetSrvVSchemaRequest): vtctldata.GetSrvVSchemaRequest; /** - * Encodes the specified RebuildVSchemaGraphResponse message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. - * @param message RebuildVSchemaGraphResponse message or plain object to encode + * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * @param message GetSrvVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRebuildVSchemaGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RebuildVSchemaGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. - * @param message RebuildVSchemaGraphResponse message or plain object to encode + * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * @param message GetSrvVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRebuildVSchemaGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RebuildVSchemaGraphResponse + * @returns GetSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildVSchemaGraphResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaRequest; /** - * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RebuildVSchemaGraphResponse + * @returns GetSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildVSchemaGraphResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaRequest; /** - * Verifies a RebuildVSchemaGraphResponse message. + * Verifies a GetSrvVSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RebuildVSchemaGraphResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RebuildVSchemaGraphResponse + * @returns GetSrvVSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RebuildVSchemaGraphResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaRequest; /** - * Creates a plain object from a RebuildVSchemaGraphResponse message. Also converts values to other types if specified. - * @param message RebuildVSchemaGraphResponse + * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. + * @param message GetSrvVSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RebuildVSchemaGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RebuildVSchemaGraphResponse to JSON. + * Converts this GetSrvVSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RefreshStateRequest. */ - interface IRefreshStateRequest { + /** Properties of a GetSrvVSchemaResponse. */ + interface IGetSrvVSchemaResponse { - /** RefreshStateRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** GetSrvVSchemaResponse srv_v_schema */ + srv_v_schema?: (vschema.ISrvVSchema|null); } - /** Represents a RefreshStateRequest. */ - class RefreshStateRequest implements IRefreshStateRequest { + /** Represents a GetSrvVSchemaResponse. */ + class GetSrvVSchemaResponse implements IGetSrvVSchemaResponse { /** - * Constructs a new RefreshStateRequest. + * Constructs a new GetSrvVSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRefreshStateRequest); + constructor(properties?: vtctldata.IGetSrvVSchemaResponse); - /** RefreshStateRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** GetSrvVSchemaResponse srv_v_schema. */ + public srv_v_schema?: (vschema.ISrvVSchema|null); /** - * Creates a new RefreshStateRequest instance using the specified properties. + * Creates a new GetSrvVSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RefreshStateRequest instance + * @returns GetSrvVSchemaResponse instance */ - public static create(properties?: vtctldata.IRefreshStateRequest): vtctldata.RefreshStateRequest; + public static create(properties?: vtctldata.IGetSrvVSchemaResponse): vtctldata.GetSrvVSchemaResponse; /** - * Encodes the specified RefreshStateRequest message. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. - * @param message RefreshStateRequest message or plain object to encode + * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * @param message GetSrvVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. - * @param message RefreshStateRequest message or plain object to encode + * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * @param message GetSrvVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RefreshStateRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RefreshStateRequest + * @returns GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaResponse; /** - * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RefreshStateRequest + * @returns GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaResponse; /** - * Verifies a RefreshStateRequest message. + * Verifies a GetSrvVSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RefreshStateRequest + * @returns GetSrvVSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaResponse; /** - * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. - * @param message RefreshStateRequest + * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. + * @param message GetSrvVSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RefreshStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RefreshStateRequest to JSON. + * Converts this GetSrvVSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RefreshStateResponse. */ - interface IRefreshStateResponse { + /** Properties of a GetSrvVSchemasRequest. */ + interface IGetSrvVSchemasRequest { + + /** GetSrvVSchemasRequest cells */ + cells?: (string[]|null); } - /** Represents a RefreshStateResponse. */ - class RefreshStateResponse implements IRefreshStateResponse { + /** Represents a GetSrvVSchemasRequest. */ + class GetSrvVSchemasRequest implements IGetSrvVSchemasRequest { /** - * Constructs a new RefreshStateResponse. + * Constructs a new GetSrvVSchemasRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRefreshStateResponse); + constructor(properties?: vtctldata.IGetSrvVSchemasRequest); + + /** GetSrvVSchemasRequest cells. */ + public cells: string[]; /** - * Creates a new RefreshStateResponse instance using the specified properties. + * Creates a new GetSrvVSchemasRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RefreshStateResponse instance + * @returns GetSrvVSchemasRequest instance */ - public static create(properties?: vtctldata.IRefreshStateResponse): vtctldata.RefreshStateResponse; + public static create(properties?: vtctldata.IGetSrvVSchemasRequest): vtctldata.GetSrvVSchemasRequest; /** - * Encodes the specified RefreshStateResponse message. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. - * @param message RefreshStateResponse message or plain object to encode + * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * @param message GetSrvVSchemasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. - * @param message RefreshStateResponse message or plain object to encode + * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * @param message GetSrvVSchemasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RefreshStateResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RefreshStateResponse + * @returns GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemasRequest; /** - * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RefreshStateResponse + * @returns GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemasRequest; /** - * Verifies a RefreshStateResponse message. + * Verifies a GetSrvVSchemasRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RefreshStateResponse + * @returns GetSrvVSchemasRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemasRequest; /** - * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. - * @param message RefreshStateResponse + * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. + * @param message GetSrvVSchemasRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RefreshStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvVSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RefreshStateResponse to JSON. + * Converts this GetSrvVSchemasRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RefreshStateByShardRequest. */ - interface IRefreshStateByShardRequest { - - /** RefreshStateByShardRequest keyspace */ - keyspace?: (string|null); - - /** RefreshStateByShardRequest shard */ - shard?: (string|null); + /** Properties of a GetSrvVSchemasResponse. */ + interface IGetSrvVSchemasResponse { - /** RefreshStateByShardRequest cells */ - cells?: (string[]|null); + /** GetSrvVSchemasResponse srv_v_schemas */ + srv_v_schemas?: ({ [k: string]: vschema.ISrvVSchema }|null); } - /** Represents a RefreshStateByShardRequest. */ - class RefreshStateByShardRequest implements IRefreshStateByShardRequest { + /** Represents a GetSrvVSchemasResponse. */ + class GetSrvVSchemasResponse implements IGetSrvVSchemasResponse { /** - * Constructs a new RefreshStateByShardRequest. + * Constructs a new GetSrvVSchemasResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRefreshStateByShardRequest); - - /** RefreshStateByShardRequest keyspace. */ - public keyspace: string; - - /** RefreshStateByShardRequest shard. */ - public shard: string; + constructor(properties?: vtctldata.IGetSrvVSchemasResponse); - /** RefreshStateByShardRequest cells. */ - public cells: string[]; + /** GetSrvVSchemasResponse srv_v_schemas. */ + public srv_v_schemas: { [k: string]: vschema.ISrvVSchema }; /** - * Creates a new RefreshStateByShardRequest instance using the specified properties. + * Creates a new GetSrvVSchemasResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RefreshStateByShardRequest instance + * @returns GetSrvVSchemasResponse instance */ - public static create(properties?: vtctldata.IRefreshStateByShardRequest): vtctldata.RefreshStateByShardRequest; + public static create(properties?: vtctldata.IGetSrvVSchemasResponse): vtctldata.GetSrvVSchemasResponse; /** - * Encodes the specified RefreshStateByShardRequest message. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. - * @param message RefreshStateByShardRequest message or plain object to encode + * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * @param message GetSrvVSchemasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRefreshStateByShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetSrvVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RefreshStateByShardRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. - * @param message RefreshStateByShardRequest message or plain object to encode + * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * @param message GetSrvVSchemasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRefreshStateByShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetSrvVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RefreshStateByShardRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RefreshStateByShardRequest + * @returns GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateByShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemasResponse; /** - * Decodes a RefreshStateByShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RefreshStateByShardRequest + * @returns GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateByShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemasResponse; /** - * Verifies a RefreshStateByShardRequest message. + * Verifies a GetSrvVSchemasResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RefreshStateByShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RefreshStateByShardRequest + * @returns GetSrvVSchemasResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateByShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemasResponse; /** - * Creates a plain object from a RefreshStateByShardRequest message. Also converts values to other types if specified. - * @param message RefreshStateByShardRequest + * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. + * @param message GetSrvVSchemasResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RefreshStateByShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetSrvVSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RefreshStateByShardRequest to JSON. + * Converts this GetSrvVSchemasResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RefreshStateByShardResponse. */ - interface IRefreshStateByShardResponse { - - /** RefreshStateByShardResponse is_partial_refresh */ - is_partial_refresh?: (boolean|null); + /** Properties of a GetTabletRequest. */ + interface IGetTabletRequest { - /** RefreshStateByShardResponse partial_refresh_details */ - partial_refresh_details?: (string|null); + /** GetTabletRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a RefreshStateByShardResponse. */ - class RefreshStateByShardResponse implements IRefreshStateByShardResponse { + /** Represents a GetTabletRequest. */ + class GetTabletRequest implements IGetTabletRequest { /** - * Constructs a new RefreshStateByShardResponse. + * Constructs a new GetTabletRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRefreshStateByShardResponse); - - /** RefreshStateByShardResponse is_partial_refresh. */ - public is_partial_refresh: boolean; + constructor(properties?: vtctldata.IGetTabletRequest); - /** RefreshStateByShardResponse partial_refresh_details. */ - public partial_refresh_details: string; + /** GetTabletRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new RefreshStateByShardResponse instance using the specified properties. + * Creates a new GetTabletRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RefreshStateByShardResponse instance + * @returns GetTabletRequest instance */ - public static create(properties?: vtctldata.IRefreshStateByShardResponse): vtctldata.RefreshStateByShardResponse; + public static create(properties?: vtctldata.IGetTabletRequest): vtctldata.GetTabletRequest; /** - * Encodes the specified RefreshStateByShardResponse message. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. - * @param message RefreshStateByShardResponse message or plain object to encode + * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * @param message GetTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRefreshStateByShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RefreshStateByShardResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. - * @param message RefreshStateByShardResponse message or plain object to encode + * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * @param message GetTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRefreshStateByShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RefreshStateByShardResponse message from the specified reader or buffer. + * Decodes a GetTabletRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RefreshStateByShardResponse + * @returns GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateByShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletRequest; /** - * Decodes a RefreshStateByShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RefreshStateByShardResponse + * @returns GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateByShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletRequest; /** - * Verifies a RefreshStateByShardResponse message. + * Verifies a GetTabletRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RefreshStateByShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RefreshStateByShardResponse + * @returns GetTabletRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateByShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletRequest; /** - * Creates a plain object from a RefreshStateByShardResponse message. Also converts values to other types if specified. - * @param message RefreshStateByShardResponse + * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. + * @param message GetTabletRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RefreshStateByShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RefreshStateByShardResponse to JSON. + * Converts this GetTabletRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaRequest. */ - interface IReloadSchemaRequest { + /** Properties of a GetTabletResponse. */ + interface IGetTabletResponse { - /** ReloadSchemaRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** GetTabletResponse tablet */ + tablet?: (topodata.ITablet|null); } - /** Represents a ReloadSchemaRequest. */ - class ReloadSchemaRequest implements IReloadSchemaRequest { + /** Represents a GetTabletResponse. */ + class GetTabletResponse implements IGetTabletResponse { /** - * Constructs a new ReloadSchemaRequest. + * Constructs a new GetTabletResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaRequest); + constructor(properties?: vtctldata.IGetTabletResponse); - /** ReloadSchemaRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** GetTabletResponse tablet. */ + public tablet?: (topodata.ITablet|null); /** - * Creates a new ReloadSchemaRequest instance using the specified properties. + * Creates a new GetTabletResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaRequest instance + * @returns GetTabletResponse instance */ - public static create(properties?: vtctldata.IReloadSchemaRequest): vtctldata.ReloadSchemaRequest; + public static create(properties?: vtctldata.IGetTabletResponse): vtctldata.GetTabletResponse; /** - * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. - * @param message ReloadSchemaRequest message or plain object to encode + * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * @param message GetTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. - * @param message ReloadSchemaRequest message or plain object to encode + * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * @param message GetTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer. + * Decodes a GetTabletResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaRequest + * @returns GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletResponse; /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaRequest + * @returns GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletResponse; /** - * Verifies a ReloadSchemaRequest message. + * Verifies a GetTabletResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaRequest + * @returns GetTabletResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletResponse; /** - * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. - * @param message ReloadSchemaRequest + * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. + * @param message GetTabletResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaRequest to JSON. + * Converts this GetTabletResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaResponse. */ - interface IReloadSchemaResponse { + /** Properties of a GetTabletsRequest. */ + interface IGetTabletsRequest { + + /** GetTabletsRequest keyspace */ + keyspace?: (string|null); + + /** GetTabletsRequest shard */ + shard?: (string|null); + + /** GetTabletsRequest cells */ + cells?: (string[]|null); + + /** GetTabletsRequest strict */ + strict?: (boolean|null); + + /** GetTabletsRequest tablet_aliases */ + tablet_aliases?: (topodata.ITabletAlias[]|null); + + /** GetTabletsRequest tablet_type */ + tablet_type?: (topodata.TabletType|null); } - /** Represents a ReloadSchemaResponse. */ - class ReloadSchemaResponse implements IReloadSchemaResponse { + /** Represents a GetTabletsRequest. */ + class GetTabletsRequest implements IGetTabletsRequest { /** - * Constructs a new ReloadSchemaResponse. + * Constructs a new GetTabletsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaResponse); + constructor(properties?: vtctldata.IGetTabletsRequest); + + /** GetTabletsRequest keyspace. */ + public keyspace: string; + + /** GetTabletsRequest shard. */ + public shard: string; + + /** GetTabletsRequest cells. */ + public cells: string[]; + + /** GetTabletsRequest strict. */ + public strict: boolean; + + /** GetTabletsRequest tablet_aliases. */ + public tablet_aliases: topodata.ITabletAlias[]; + + /** GetTabletsRequest tablet_type. */ + public tablet_type: topodata.TabletType; /** - * Creates a new ReloadSchemaResponse instance using the specified properties. + * Creates a new GetTabletsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaResponse instance + * @returns GetTabletsRequest instance */ - public static create(properties?: vtctldata.IReloadSchemaResponse): vtctldata.ReloadSchemaResponse; + public static create(properties?: vtctldata.IGetTabletsRequest): vtctldata.GetTabletsRequest; /** - * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. - * @param message ReloadSchemaResponse message or plain object to encode + * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * @param message GetTabletsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. - * @param message ReloadSchemaResponse message or plain object to encode + * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * @param message GetTabletsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer. + * Decodes a GetTabletsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaResponse + * @returns GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsRequest; /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaResponse + * @returns GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsRequest; /** - * Verifies a ReloadSchemaResponse message. + * Verifies a GetTabletsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaResponse + * @returns GetTabletsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsRequest; /** - * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. - * @param message ReloadSchemaResponse + * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. + * @param message GetTabletsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaResponse to JSON. + * Converts this GetTabletsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaKeyspaceRequest. */ - interface IReloadSchemaKeyspaceRequest { - - /** ReloadSchemaKeyspaceRequest keyspace */ - keyspace?: (string|null); - - /** ReloadSchemaKeyspaceRequest wait_position */ - wait_position?: (string|null); - - /** ReloadSchemaKeyspaceRequest include_primary */ - include_primary?: (boolean|null); + /** Properties of a GetTabletsResponse. */ + interface IGetTabletsResponse { - /** ReloadSchemaKeyspaceRequest concurrency */ - concurrency?: (number|null); + /** GetTabletsResponse tablets */ + tablets?: (topodata.ITablet[]|null); } - /** Represents a ReloadSchemaKeyspaceRequest. */ - class ReloadSchemaKeyspaceRequest implements IReloadSchemaKeyspaceRequest { + /** Represents a GetTabletsResponse. */ + class GetTabletsResponse implements IGetTabletsResponse { /** - * Constructs a new ReloadSchemaKeyspaceRequest. + * Constructs a new GetTabletsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaKeyspaceRequest); - - /** ReloadSchemaKeyspaceRequest keyspace. */ - public keyspace: string; - - /** ReloadSchemaKeyspaceRequest wait_position. */ - public wait_position: string; - - /** ReloadSchemaKeyspaceRequest include_primary. */ - public include_primary: boolean; + constructor(properties?: vtctldata.IGetTabletsResponse); - /** ReloadSchemaKeyspaceRequest concurrency. */ - public concurrency: number; + /** GetTabletsResponse tablets. */ + public tablets: topodata.ITablet[]; /** - * Creates a new ReloadSchemaKeyspaceRequest instance using the specified properties. + * Creates a new GetTabletsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaKeyspaceRequest instance + * @returns GetTabletsResponse instance */ - public static create(properties?: vtctldata.IReloadSchemaKeyspaceRequest): vtctldata.ReloadSchemaKeyspaceRequest; + public static create(properties?: vtctldata.IGetTabletsResponse): vtctldata.GetTabletsResponse; /** - * Encodes the specified ReloadSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. - * @param message ReloadSchemaKeyspaceRequest message or plain object to encode + * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * @param message GetTabletsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. - * @param message ReloadSchemaKeyspaceRequest message or plain object to encode + * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * @param message GetTabletsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer. + * Decodes a GetTabletsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaKeyspaceRequest + * @returns GetTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsResponse; /** - * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaKeyspaceRequest + * @returns GetTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsResponse; /** - * Verifies a ReloadSchemaKeyspaceRequest message. + * Verifies a GetTabletsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaKeyspaceRequest + * @returns GetTabletsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsResponse; /** - * Creates a plain object from a ReloadSchemaKeyspaceRequest message. Also converts values to other types if specified. - * @param message ReloadSchemaKeyspaceRequest + * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. + * @param message GetTabletsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaKeyspaceRequest to JSON. + * Converts this GetTabletsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaKeyspaceResponse. */ - interface IReloadSchemaKeyspaceResponse { + /** Properties of a GetTopologyPathRequest. */ + interface IGetTopologyPathRequest { - /** ReloadSchemaKeyspaceResponse events */ - events?: (logutil.IEvent[]|null); + /** GetTopologyPathRequest path */ + path?: (string|null); } - /** Represents a ReloadSchemaKeyspaceResponse. */ - class ReloadSchemaKeyspaceResponse implements IReloadSchemaKeyspaceResponse { + /** Represents a GetTopologyPathRequest. */ + class GetTopologyPathRequest implements IGetTopologyPathRequest { /** - * Constructs a new ReloadSchemaKeyspaceResponse. + * Constructs a new GetTopologyPathRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaKeyspaceResponse); + constructor(properties?: vtctldata.IGetTopologyPathRequest); - /** ReloadSchemaKeyspaceResponse events. */ - public events: logutil.IEvent[]; + /** GetTopologyPathRequest path. */ + public path: string; /** - * Creates a new ReloadSchemaKeyspaceResponse instance using the specified properties. + * Creates a new GetTopologyPathRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaKeyspaceResponse instance + * @returns GetTopologyPathRequest instance */ - public static create(properties?: vtctldata.IReloadSchemaKeyspaceResponse): vtctldata.ReloadSchemaKeyspaceResponse; + public static create(properties?: vtctldata.IGetTopologyPathRequest): vtctldata.GetTopologyPathRequest; /** - * Encodes the specified ReloadSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. - * @param message ReloadSchemaKeyspaceResponse message or plain object to encode + * Encodes the specified GetTopologyPathRequest message. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. + * @param message GetTopologyPathRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTopologyPathRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. - * @param message ReloadSchemaKeyspaceResponse message or plain object to encode + * Encodes the specified GetTopologyPathRequest message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. + * @param message GetTopologyPathRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTopologyPathRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer. + * Decodes a GetTopologyPathRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaKeyspaceResponse + * @returns GetTopologyPathRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTopologyPathRequest; /** - * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTopologyPathRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaKeyspaceResponse + * @returns GetTopologyPathRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTopologyPathRequest; /** - * Verifies a ReloadSchemaKeyspaceResponse message. + * Verifies a GetTopologyPathRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTopologyPathRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaKeyspaceResponse + * @returns GetTopologyPathRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTopologyPathRequest; /** - * Creates a plain object from a ReloadSchemaKeyspaceResponse message. Also converts values to other types if specified. - * @param message ReloadSchemaKeyspaceResponse + * Creates a plain object from a GetTopologyPathRequest message. Also converts values to other types if specified. + * @param message GetTopologyPathRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTopologyPathRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaKeyspaceResponse to JSON. + * Converts this GetTopologyPathRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaShardRequest. */ - interface IReloadSchemaShardRequest { - - /** ReloadSchemaShardRequest keyspace */ - keyspace?: (string|null); - - /** ReloadSchemaShardRequest shard */ - shard?: (string|null); - - /** ReloadSchemaShardRequest wait_position */ - wait_position?: (string|null); - - /** ReloadSchemaShardRequest include_primary */ - include_primary?: (boolean|null); + /** Properties of a GetTopologyPathResponse. */ + interface IGetTopologyPathResponse { - /** ReloadSchemaShardRequest concurrency */ - concurrency?: (number|null); + /** GetTopologyPathResponse cell */ + cell?: (vtctldata.ITopologyCell|null); } - /** Represents a ReloadSchemaShardRequest. */ - class ReloadSchemaShardRequest implements IReloadSchemaShardRequest { + /** Represents a GetTopologyPathResponse. */ + class GetTopologyPathResponse implements IGetTopologyPathResponse { /** - * Constructs a new ReloadSchemaShardRequest. + * Constructs a new GetTopologyPathResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaShardRequest); - - /** ReloadSchemaShardRequest keyspace. */ - public keyspace: string; - - /** ReloadSchemaShardRequest shard. */ - public shard: string; - - /** ReloadSchemaShardRequest wait_position. */ - public wait_position: string; - - /** ReloadSchemaShardRequest include_primary. */ - public include_primary: boolean; + constructor(properties?: vtctldata.IGetTopologyPathResponse); - /** ReloadSchemaShardRequest concurrency. */ - public concurrency: number; + /** GetTopologyPathResponse cell. */ + public cell?: (vtctldata.ITopologyCell|null); /** - * Creates a new ReloadSchemaShardRequest instance using the specified properties. + * Creates a new GetTopologyPathResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaShardRequest instance + * @returns GetTopologyPathResponse instance */ - public static create(properties?: vtctldata.IReloadSchemaShardRequest): vtctldata.ReloadSchemaShardRequest; + public static create(properties?: vtctldata.IGetTopologyPathResponse): vtctldata.GetTopologyPathResponse; /** - * Encodes the specified ReloadSchemaShardRequest message. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. - * @param message ReloadSchemaShardRequest message or plain object to encode + * Encodes the specified GetTopologyPathResponse message. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. + * @param message GetTopologyPathResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetTopologyPathResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaShardRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. - * @param message ReloadSchemaShardRequest message or plain object to encode + * Encodes the specified GetTopologyPathResponse message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. + * @param message GetTopologyPathResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetTopologyPathResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer. + * Decodes a GetTopologyPathResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaShardRequest + * @returns GetTopologyPathResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTopologyPathResponse; /** - * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTopologyPathResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaShardRequest + * @returns GetTopologyPathResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTopologyPathResponse; /** - * Verifies a ReloadSchemaShardRequest message. + * Verifies a GetTopologyPathResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTopologyPathResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaShardRequest + * @returns GetTopologyPathResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetTopologyPathResponse; /** - * Creates a plain object from a ReloadSchemaShardRequest message. Also converts values to other types if specified. - * @param message ReloadSchemaShardRequest + * Creates a plain object from a GetTopologyPathResponse message. Also converts values to other types if specified. + * @param message GetTopologyPathResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetTopologyPathResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaShardRequest to JSON. + * Converts this GetTopologyPathResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReloadSchemaShardResponse. */ - interface IReloadSchemaShardResponse { + /** Properties of a TopologyCell. */ + interface ITopologyCell { - /** ReloadSchemaShardResponse events */ - events?: (logutil.IEvent[]|null); + /** TopologyCell name */ + name?: (string|null); + + /** TopologyCell path */ + path?: (string|null); + + /** TopologyCell data */ + data?: (string|null); + + /** TopologyCell children */ + children?: (string[]|null); } - /** Represents a ReloadSchemaShardResponse. */ - class ReloadSchemaShardResponse implements IReloadSchemaShardResponse { + /** Represents a TopologyCell. */ + class TopologyCell implements ITopologyCell { /** - * Constructs a new ReloadSchemaShardResponse. + * Constructs a new TopologyCell. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReloadSchemaShardResponse); + constructor(properties?: vtctldata.ITopologyCell); - /** ReloadSchemaShardResponse events. */ - public events: logutil.IEvent[]; + /** TopologyCell name. */ + public name: string; + + /** TopologyCell path. */ + public path: string; + + /** TopologyCell data. */ + public data: string; + + /** TopologyCell children. */ + public children: string[]; /** - * Creates a new ReloadSchemaShardResponse instance using the specified properties. + * Creates a new TopologyCell instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadSchemaShardResponse instance + * @returns TopologyCell instance */ - public static create(properties?: vtctldata.IReloadSchemaShardResponse): vtctldata.ReloadSchemaShardResponse; + public static create(properties?: vtctldata.ITopologyCell): vtctldata.TopologyCell; /** - * Encodes the specified ReloadSchemaShardResponse message. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. - * @param message ReloadSchemaShardResponse message or plain object to encode + * Encodes the specified TopologyCell message. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. + * @param message TopologyCell message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReloadSchemaShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ITopologyCell, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadSchemaShardResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. - * @param message ReloadSchemaShardResponse message or plain object to encode + * Encodes the specified TopologyCell message, length delimited. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. + * @param message TopologyCell message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReloadSchemaShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ITopologyCell, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer. + * Decodes a TopologyCell message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadSchemaShardResponse + * @returns TopologyCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TopologyCell; /** - * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer, length delimited. + * Decodes a TopologyCell message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadSchemaShardResponse + * @returns TopologyCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TopologyCell; /** - * Verifies a ReloadSchemaShardResponse message. + * Verifies a TopologyCell message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReloadSchemaShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TopologyCell message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadSchemaShardResponse + * @returns TopologyCell */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.TopologyCell; /** - * Creates a plain object from a ReloadSchemaShardResponse message. Also converts values to other types if specified. - * @param message ReloadSchemaShardResponse + * Creates a plain object from a TopologyCell message. Also converts values to other types if specified. + * @param message TopologyCell * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReloadSchemaShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.TopologyCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadSchemaShardResponse to JSON. + * Converts this TopologyCell to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveBackupRequest. */ - interface IRemoveBackupRequest { + /** Properties of a GetVSchemaRequest. */ + interface IGetVSchemaRequest { - /** RemoveBackupRequest keyspace */ + /** GetVSchemaRequest keyspace */ keyspace?: (string|null); - - /** RemoveBackupRequest shard */ - shard?: (string|null); - - /** RemoveBackupRequest name */ - name?: (string|null); } - /** Represents a RemoveBackupRequest. */ - class RemoveBackupRequest implements IRemoveBackupRequest { + /** Represents a GetVSchemaRequest. */ + class GetVSchemaRequest implements IGetVSchemaRequest { /** - * Constructs a new RemoveBackupRequest. + * Constructs a new GetVSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveBackupRequest); + constructor(properties?: vtctldata.IGetVSchemaRequest); - /** RemoveBackupRequest keyspace. */ + /** GetVSchemaRequest keyspace. */ public keyspace: string; - /** RemoveBackupRequest shard. */ - public shard: string; - - /** RemoveBackupRequest name. */ - public name: string; - /** - * Creates a new RemoveBackupRequest instance using the specified properties. + * Creates a new GetVSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveBackupRequest instance + * @returns GetVSchemaRequest instance */ - public static create(properties?: vtctldata.IRemoveBackupRequest): vtctldata.RemoveBackupRequest; + public static create(properties?: vtctldata.IGetVSchemaRequest): vtctldata.GetVSchemaRequest; /** - * Encodes the specified RemoveBackupRequest message. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. - * @param message RemoveBackupRequest message or plain object to encode + * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. + * @param message GetVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. - * @param message RemoveBackupRequest message or plain object to encode + * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. + * @param message GetVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveBackupRequest message from the specified reader or buffer. + * Decodes a GetVSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveBackupRequest + * @returns GetVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaRequest; /** - * Decodes a RemoveBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveBackupRequest + * @returns GetVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaRequest; /** - * Verifies a RemoveBackupRequest message. + * Verifies a GetVSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveBackupRequest + * @returns GetVSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveBackupRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaRequest; /** - * Creates a plain object from a RemoveBackupRequest message. Also converts values to other types if specified. - * @param message RemoveBackupRequest + * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. + * @param message GetVSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveBackupRequest to JSON. + * Converts this GetVSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveBackupResponse. */ - interface IRemoveBackupResponse { + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { + + /** GetVersionRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a RemoveBackupResponse. */ - class RemoveBackupResponse implements IRemoveBackupResponse { + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { /** - * Constructs a new RemoveBackupResponse. + * Constructs a new GetVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveBackupResponse); + constructor(properties?: vtctldata.IGetVersionRequest); + + /** GetVersionRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new RemoveBackupResponse instance using the specified properties. + * Creates a new GetVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveBackupResponse instance + * @returns GetVersionRequest instance */ - public static create(properties?: vtctldata.IRemoveBackupResponse): vtctldata.RemoveBackupResponse; + public static create(properties?: vtctldata.IGetVersionRequest): vtctldata.GetVersionRequest; /** - * Encodes the specified RemoveBackupResponse message. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. - * @param message RemoveBackupResponse message or plain object to encode + * Encodes the specified GetVersionRequest message. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. - * @param message RemoveBackupResponse message or plain object to encode + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveBackupResponse message from the specified reader or buffer. + * Decodes a GetVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveBackupResponse + * @returns GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveBackupResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVersionRequest; /** - * Decodes a RemoveBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveBackupResponse + * @returns GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveBackupResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVersionRequest; /** - * Verifies a RemoveBackupResponse message. + * Verifies a GetVersionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveBackupResponse + * @returns GetVersionRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveBackupResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetVersionRequest; /** - * Creates a plain object from a RemoveBackupResponse message. Also converts values to other types if specified. - * @param message RemoveBackupResponse + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveBackupResponse to JSON. + * Converts this GetVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveKeyspaceCellRequest. */ - interface IRemoveKeyspaceCellRequest { - - /** RemoveKeyspaceCellRequest keyspace */ - keyspace?: (string|null); - - /** RemoveKeyspaceCellRequest cell */ - cell?: (string|null); - - /** RemoveKeyspaceCellRequest force */ - force?: (boolean|null); + /** Properties of a GetVersionResponse. */ + interface IGetVersionResponse { - /** RemoveKeyspaceCellRequest recursive */ - recursive?: (boolean|null); + /** GetVersionResponse version */ + version?: (string|null); } - /** Represents a RemoveKeyspaceCellRequest. */ - class RemoveKeyspaceCellRequest implements IRemoveKeyspaceCellRequest { + /** Represents a GetVersionResponse. */ + class GetVersionResponse implements IGetVersionResponse { /** - * Constructs a new RemoveKeyspaceCellRequest. + * Constructs a new GetVersionResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveKeyspaceCellRequest); - - /** RemoveKeyspaceCellRequest keyspace. */ - public keyspace: string; - - /** RemoveKeyspaceCellRequest cell. */ - public cell: string; - - /** RemoveKeyspaceCellRequest force. */ - public force: boolean; + constructor(properties?: vtctldata.IGetVersionResponse); - /** RemoveKeyspaceCellRequest recursive. */ - public recursive: boolean; + /** GetVersionResponse version. */ + public version: string; /** - * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. + * Creates a new GetVersionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveKeyspaceCellRequest instance + * @returns GetVersionResponse instance */ - public static create(properties?: vtctldata.IRemoveKeyspaceCellRequest): vtctldata.RemoveKeyspaceCellRequest; + public static create(properties?: vtctldata.IGetVersionResponse): vtctldata.GetVersionResponse; /** - * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @param message RemoveKeyspaceCellRequest message or plain object to encode + * Encodes the specified GetVersionResponse message. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. + * @param message GetVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @param message RemoveKeyspaceCellRequest message or plain object to encode + * Encodes the specified GetVersionResponse message, length delimited. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. + * @param message GetVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. + * Decodes a GetVersionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveKeyspaceCellRequest + * @returns GetVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVersionResponse; /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVersionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveKeyspaceCellRequest + * @returns GetVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVersionResponse; /** - * Verifies a RemoveKeyspaceCellRequest message. + * Verifies a GetVersionResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveKeyspaceCellRequest + * @returns GetVersionResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetVersionResponse; /** - * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. - * @param message RemoveKeyspaceCellRequest + * Creates a plain object from a GetVersionResponse message. Also converts values to other types if specified. + * @param message GetVersionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveKeyspaceCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveKeyspaceCellRequest to JSON. + * Converts this GetVersionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveKeyspaceCellResponse. */ - interface IRemoveKeyspaceCellResponse { + /** Properties of a GetVSchemaResponse. */ + interface IGetVSchemaResponse { + + /** GetVSchemaResponse v_schema */ + v_schema?: (vschema.IKeyspace|null); } - /** Represents a RemoveKeyspaceCellResponse. */ - class RemoveKeyspaceCellResponse implements IRemoveKeyspaceCellResponse { + /** Represents a GetVSchemaResponse. */ + class GetVSchemaResponse implements IGetVSchemaResponse { /** - * Constructs a new RemoveKeyspaceCellResponse. + * Constructs a new GetVSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveKeyspaceCellResponse); + constructor(properties?: vtctldata.IGetVSchemaResponse); + + /** GetVSchemaResponse v_schema. */ + public v_schema?: (vschema.IKeyspace|null); /** - * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. + * Creates a new GetVSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveKeyspaceCellResponse instance + * @returns GetVSchemaResponse instance */ - public static create(properties?: vtctldata.IRemoveKeyspaceCellResponse): vtctldata.RemoveKeyspaceCellResponse; + public static create(properties?: vtctldata.IGetVSchemaResponse): vtctldata.GetVSchemaResponse; /** - * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @param message RemoveKeyspaceCellResponse message or plain object to encode + * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. + * @param message GetVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @param message RemoveKeyspaceCellResponse message or plain object to encode + * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. + * @param message GetVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. + * Decodes a GetVSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveKeyspaceCellResponse + * @returns GetVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaResponse; /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveKeyspaceCellResponse + * @returns GetVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaResponse; /** - * Verifies a RemoveKeyspaceCellResponse message. + * Verifies a GetVSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveKeyspaceCellResponse + * @returns GetVSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaResponse; /** - * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. - * @param message RemoveKeyspaceCellResponse + * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. + * @param message GetVSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveKeyspaceCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveKeyspaceCellResponse to JSON. + * Converts this GetVSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveShardCellRequest. */ - interface IRemoveShardCellRequest { + /** Properties of a GetWorkflowsRequest. */ + interface IGetWorkflowsRequest { - /** RemoveShardCellRequest keyspace */ + /** GetWorkflowsRequest keyspace */ keyspace?: (string|null); - /** RemoveShardCellRequest shard_name */ - shard_name?: (string|null); - - /** RemoveShardCellRequest cell */ - cell?: (string|null); - - /** RemoveShardCellRequest force */ - force?: (boolean|null); + /** GetWorkflowsRequest active_only */ + active_only?: (boolean|null); - /** RemoveShardCellRequest recursive */ - recursive?: (boolean|null); + /** GetWorkflowsRequest name_only */ + name_only?: (boolean|null); } - /** Represents a RemoveShardCellRequest. */ - class RemoveShardCellRequest implements IRemoveShardCellRequest { + /** Represents a GetWorkflowsRequest. */ + class GetWorkflowsRequest implements IGetWorkflowsRequest { /** - * Constructs a new RemoveShardCellRequest. + * Constructs a new GetWorkflowsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveShardCellRequest); + constructor(properties?: vtctldata.IGetWorkflowsRequest); - /** RemoveShardCellRequest keyspace. */ + /** GetWorkflowsRequest keyspace. */ public keyspace: string; - /** RemoveShardCellRequest shard_name. */ - public shard_name: string; - - /** RemoveShardCellRequest cell. */ - public cell: string; - - /** RemoveShardCellRequest force. */ - public force: boolean; + /** GetWorkflowsRequest active_only. */ + public active_only: boolean; - /** RemoveShardCellRequest recursive. */ - public recursive: boolean; + /** GetWorkflowsRequest name_only. */ + public name_only: boolean; /** - * Creates a new RemoveShardCellRequest instance using the specified properties. + * Creates a new GetWorkflowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveShardCellRequest instance + * @returns GetWorkflowsRequest instance */ - public static create(properties?: vtctldata.IRemoveShardCellRequest): vtctldata.RemoveShardCellRequest; + public static create(properties?: vtctldata.IGetWorkflowsRequest): vtctldata.GetWorkflowsRequest; /** - * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @param message RemoveShardCellRequest message or plain object to encode + * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. + * @param message GetWorkflowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @param message RemoveShardCellRequest message or plain object to encode + * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. + * @param message GetWorkflowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer. + * Decodes a GetWorkflowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveShardCellRequest + * @returns GetWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsRequest; /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. + * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveShardCellRequest + * @returns GetWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsRequest; /** - * Verifies a RemoveShardCellRequest message. + * Verifies a GetWorkflowsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveShardCellRequest + * @returns GetWorkflowsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsRequest; /** - * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. - * @param message RemoveShardCellRequest + * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. + * @param message GetWorkflowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveShardCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveShardCellRequest to JSON. + * Converts this GetWorkflowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RemoveShardCellResponse. */ - interface IRemoveShardCellResponse { + /** Properties of a GetWorkflowsResponse. */ + interface IGetWorkflowsResponse { + + /** GetWorkflowsResponse workflows */ + workflows?: (vtctldata.IWorkflow[]|null); } - /** Represents a RemoveShardCellResponse. */ - class RemoveShardCellResponse implements IRemoveShardCellResponse { + /** Represents a GetWorkflowsResponse. */ + class GetWorkflowsResponse implements IGetWorkflowsResponse { /** - * Constructs a new RemoveShardCellResponse. + * Constructs a new GetWorkflowsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRemoveShardCellResponse); + constructor(properties?: vtctldata.IGetWorkflowsResponse); + + /** GetWorkflowsResponse workflows. */ + public workflows: vtctldata.IWorkflow[]; /** - * Creates a new RemoveShardCellResponse instance using the specified properties. + * Creates a new GetWorkflowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveShardCellResponse instance + * @returns GetWorkflowsResponse instance */ - public static create(properties?: vtctldata.IRemoveShardCellResponse): vtctldata.RemoveShardCellResponse; + public static create(properties?: vtctldata.IGetWorkflowsResponse): vtctldata.GetWorkflowsResponse; /** - * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @param message RemoveShardCellResponse message or plain object to encode + * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. + * @param message GetWorkflowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @param message RemoveShardCellResponse message or plain object to encode + * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. + * @param message GetWorkflowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer. + * Decodes a GetWorkflowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveShardCellResponse + * @returns GetWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsResponse; /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. + * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveShardCellResponse + * @returns GetWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsResponse; /** - * Verifies a RemoveShardCellResponse message. + * Verifies a GetWorkflowsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveShardCellResponse + * @returns GetWorkflowsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsResponse; /** - * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. - * @param message RemoveShardCellResponse + * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. + * @param message GetWorkflowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RemoveShardCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.GetWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveShardCellResponse to JSON. + * Converts this GetWorkflowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReparentTabletRequest. */ - interface IReparentTabletRequest { + /** Properties of an InitShardPrimaryRequest. */ + interface IInitShardPrimaryRequest { - /** ReparentTabletRequest tablet */ - tablet?: (topodata.ITabletAlias|null); + /** InitShardPrimaryRequest keyspace */ + keyspace?: (string|null); + + /** InitShardPrimaryRequest shard */ + shard?: (string|null); + + /** InitShardPrimaryRequest primary_elect_tablet_alias */ + primary_elect_tablet_alias?: (topodata.ITabletAlias|null); + + /** InitShardPrimaryRequest force */ + force?: (boolean|null); + + /** InitShardPrimaryRequest wait_replicas_timeout */ + wait_replicas_timeout?: (vttime.IDuration|null); } - /** Represents a ReparentTabletRequest. */ - class ReparentTabletRequest implements IReparentTabletRequest { + /** Represents an InitShardPrimaryRequest. */ + class InitShardPrimaryRequest implements IInitShardPrimaryRequest { /** - * Constructs a new ReparentTabletRequest. + * Constructs a new InitShardPrimaryRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReparentTabletRequest); + constructor(properties?: vtctldata.IInitShardPrimaryRequest); - /** ReparentTabletRequest tablet. */ - public tablet?: (topodata.ITabletAlias|null); + /** InitShardPrimaryRequest keyspace. */ + public keyspace: string; + + /** InitShardPrimaryRequest shard. */ + public shard: string; + + /** InitShardPrimaryRequest primary_elect_tablet_alias. */ + public primary_elect_tablet_alias?: (topodata.ITabletAlias|null); + + /** InitShardPrimaryRequest force. */ + public force: boolean; + + /** InitShardPrimaryRequest wait_replicas_timeout. */ + public wait_replicas_timeout?: (vttime.IDuration|null); /** - * Creates a new ReparentTabletRequest instance using the specified properties. + * Creates a new InitShardPrimaryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReparentTabletRequest instance + * @returns InitShardPrimaryRequest instance */ - public static create(properties?: vtctldata.IReparentTabletRequest): vtctldata.ReparentTabletRequest; + public static create(properties?: vtctldata.IInitShardPrimaryRequest): vtctldata.InitShardPrimaryRequest; /** - * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @param message ReparentTabletRequest message or plain object to encode + * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. + * @param message InitShardPrimaryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @param message ReparentTabletRequest message or plain object to encode + * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. + * @param message InitShardPrimaryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer. + * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReparentTabletRequest + * @returns InitShardPrimaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryRequest; /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. + * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReparentTabletRequest + * @returns InitShardPrimaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryRequest; /** - * Verifies a ReparentTabletRequest message. + * Verifies an InitShardPrimaryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReparentTabletRequest + * @returns InitShardPrimaryRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryRequest; /** - * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. - * @param message ReparentTabletRequest + * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. + * @param message InitShardPrimaryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReparentTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.InitShardPrimaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReparentTabletRequest to JSON. + * Converts this InitShardPrimaryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReparentTabletResponse. */ - interface IReparentTabletResponse { - - /** ReparentTabletResponse keyspace */ - keyspace?: (string|null); - - /** ReparentTabletResponse shard */ - shard?: (string|null); + /** Properties of an InitShardPrimaryResponse. */ + interface IInitShardPrimaryResponse { - /** ReparentTabletResponse primary */ - primary?: (topodata.ITabletAlias|null); + /** InitShardPrimaryResponse events */ + events?: (logutil.IEvent[]|null); } - /** Represents a ReparentTabletResponse. */ - class ReparentTabletResponse implements IReparentTabletResponse { + /** Represents an InitShardPrimaryResponse. */ + class InitShardPrimaryResponse implements IInitShardPrimaryResponse { /** - * Constructs a new ReparentTabletResponse. + * Constructs a new InitShardPrimaryResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IReparentTabletResponse); - - /** ReparentTabletResponse keyspace. */ - public keyspace: string; - - /** ReparentTabletResponse shard. */ - public shard: string; + constructor(properties?: vtctldata.IInitShardPrimaryResponse); - /** ReparentTabletResponse primary. */ - public primary?: (topodata.ITabletAlias|null); + /** InitShardPrimaryResponse events. */ + public events: logutil.IEvent[]; /** - * Creates a new ReparentTabletResponse instance using the specified properties. + * Creates a new InitShardPrimaryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReparentTabletResponse instance + * @returns InitShardPrimaryResponse instance */ - public static create(properties?: vtctldata.IReparentTabletResponse): vtctldata.ReparentTabletResponse; + public static create(properties?: vtctldata.IInitShardPrimaryResponse): vtctldata.InitShardPrimaryResponse; /** - * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @param message ReparentTabletResponse message or plain object to encode + * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. + * @param message InitShardPrimaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @param message ReparentTabletResponse message or plain object to encode + * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. + * @param message InitShardPrimaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer. + * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReparentTabletResponse + * @returns InitShardPrimaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryResponse; /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. + * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReparentTabletResponse + * @returns InitShardPrimaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryResponse; /** - * Verifies a ReparentTabletResponse message. + * Verifies an InitShardPrimaryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReparentTabletResponse + * @returns InitShardPrimaryResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryResponse; /** - * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. - * @param message ReparentTabletResponse + * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. + * @param message InitShardPrimaryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ReparentTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.InitShardPrimaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReparentTabletResponse to JSON. + * Converts this InitShardPrimaryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RestoreFromBackupRequest. */ - interface IRestoreFromBackupRequest { + /** Properties of a PingTabletRequest. */ + interface IPingTabletRequest { - /** RestoreFromBackupRequest tablet_alias */ + /** PingTabletRequest tablet_alias */ tablet_alias?: (topodata.ITabletAlias|null); - - /** RestoreFromBackupRequest backup_time */ - backup_time?: (vttime.ITime|null); - - /** RestoreFromBackupRequest restore_to_pos */ - restore_to_pos?: (string|null); - - /** RestoreFromBackupRequest dry_run */ - dry_run?: (boolean|null); } - /** Represents a RestoreFromBackupRequest. */ - class RestoreFromBackupRequest implements IRestoreFromBackupRequest { + /** Represents a PingTabletRequest. */ + class PingTabletRequest implements IPingTabletRequest { /** - * Constructs a new RestoreFromBackupRequest. + * Constructs a new PingTabletRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRestoreFromBackupRequest); + constructor(properties?: vtctldata.IPingTabletRequest); - /** RestoreFromBackupRequest tablet_alias. */ + /** PingTabletRequest tablet_alias. */ public tablet_alias?: (topodata.ITabletAlias|null); - /** RestoreFromBackupRequest backup_time. */ - public backup_time?: (vttime.ITime|null); - - /** RestoreFromBackupRequest restore_to_pos. */ - public restore_to_pos: string; - - /** RestoreFromBackupRequest dry_run. */ - public dry_run: boolean; - /** - * Creates a new RestoreFromBackupRequest instance using the specified properties. + * Creates a new PingTabletRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreFromBackupRequest instance + * @returns PingTabletRequest instance */ - public static create(properties?: vtctldata.IRestoreFromBackupRequest): vtctldata.RestoreFromBackupRequest; + public static create(properties?: vtctldata.IPingTabletRequest): vtctldata.PingTabletRequest; /** - * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. - * @param message RestoreFromBackupRequest message or plain object to encode + * Encodes the specified PingTabletRequest message. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. + * @param message PingTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IPingTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. - * @param message RestoreFromBackupRequest message or plain object to encode + * Encodes the specified PingTabletRequest message, length delimited. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. + * @param message PingTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IPingTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. + * Decodes a PingTabletRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreFromBackupRequest + * @returns PingTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RestoreFromBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PingTabletRequest; /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a PingTabletRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreFromBackupRequest + * @returns PingTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RestoreFromBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PingTabletRequest; /** - * Verifies a RestoreFromBackupRequest message. + * Verifies a PingTabletRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PingTabletRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreFromBackupRequest + * @returns PingTabletRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RestoreFromBackupRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.PingTabletRequest; /** - * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. - * @param message RestoreFromBackupRequest + * Creates a plain object from a PingTabletRequest message. Also converts values to other types if specified. + * @param message PingTabletRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RestoreFromBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.PingTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreFromBackupRequest to JSON. + * Converts this PingTabletRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RestoreFromBackupResponse. */ - interface IRestoreFromBackupResponse { - - /** RestoreFromBackupResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** RestoreFromBackupResponse keyspace */ - keyspace?: (string|null); - - /** RestoreFromBackupResponse shard */ - shard?: (string|null); - - /** RestoreFromBackupResponse event */ - event?: (logutil.IEvent|null); + /** Properties of a PingTabletResponse. */ + interface IPingTabletResponse { } - /** Represents a RestoreFromBackupResponse. */ - class RestoreFromBackupResponse implements IRestoreFromBackupResponse { + /** Represents a PingTabletResponse. */ + class PingTabletResponse implements IPingTabletResponse { /** - * Constructs a new RestoreFromBackupResponse. + * Constructs a new PingTabletResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRestoreFromBackupResponse); - - /** RestoreFromBackupResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** RestoreFromBackupResponse keyspace. */ - public keyspace: string; - - /** RestoreFromBackupResponse shard. */ - public shard: string; - - /** RestoreFromBackupResponse event. */ - public event?: (logutil.IEvent|null); + constructor(properties?: vtctldata.IPingTabletResponse); /** - * Creates a new RestoreFromBackupResponse instance using the specified properties. + * Creates a new PingTabletResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreFromBackupResponse instance + * @returns PingTabletResponse instance */ - public static create(properties?: vtctldata.IRestoreFromBackupResponse): vtctldata.RestoreFromBackupResponse; + public static create(properties?: vtctldata.IPingTabletResponse): vtctldata.PingTabletResponse; /** - * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. - * @param message RestoreFromBackupResponse message or plain object to encode + * Encodes the specified PingTabletResponse message. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. + * @param message PingTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IPingTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. - * @param message RestoreFromBackupResponse message or plain object to encode + * Encodes the specified PingTabletResponse message, length delimited. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. + * @param message PingTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IPingTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. + * Decodes a PingTabletResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreFromBackupResponse + * @returns PingTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RestoreFromBackupResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PingTabletResponse; /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a PingTabletResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreFromBackupResponse + * @returns PingTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RestoreFromBackupResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PingTabletResponse; /** - * Verifies a RestoreFromBackupResponse message. + * Verifies a PingTabletResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PingTabletResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreFromBackupResponse + * @returns PingTabletResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RestoreFromBackupResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.PingTabletResponse; /** - * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. - * @param message RestoreFromBackupResponse + * Creates a plain object from a PingTabletResponse message. Also converts values to other types if specified. + * @param message PingTabletResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RestoreFromBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.PingTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreFromBackupResponse to JSON. + * Converts this PingTabletResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RunHealthCheckRequest. */ - interface IRunHealthCheckRequest { + /** Properties of a PlannedReparentShardRequest. */ + interface IPlannedReparentShardRequest { - /** RunHealthCheckRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** PlannedReparentShardRequest keyspace */ + keyspace?: (string|null); + + /** PlannedReparentShardRequest shard */ + shard?: (string|null); + + /** PlannedReparentShardRequest new_primary */ + new_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardRequest avoid_primary */ + avoid_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardRequest wait_replicas_timeout */ + wait_replicas_timeout?: (vttime.IDuration|null); } - /** Represents a RunHealthCheckRequest. */ - class RunHealthCheckRequest implements IRunHealthCheckRequest { + /** Represents a PlannedReparentShardRequest. */ + class PlannedReparentShardRequest implements IPlannedReparentShardRequest { /** - * Constructs a new RunHealthCheckRequest. + * Constructs a new PlannedReparentShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRunHealthCheckRequest); + constructor(properties?: vtctldata.IPlannedReparentShardRequest); - /** RunHealthCheckRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** PlannedReparentShardRequest keyspace. */ + public keyspace: string; + + /** PlannedReparentShardRequest shard. */ + public shard: string; + + /** PlannedReparentShardRequest new_primary. */ + public new_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardRequest avoid_primary. */ + public avoid_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardRequest wait_replicas_timeout. */ + public wait_replicas_timeout?: (vttime.IDuration|null); /** - * Creates a new RunHealthCheckRequest instance using the specified properties. + * Creates a new PlannedReparentShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RunHealthCheckRequest instance + * @returns PlannedReparentShardRequest instance */ - public static create(properties?: vtctldata.IRunHealthCheckRequest): vtctldata.RunHealthCheckRequest; + public static create(properties?: vtctldata.IPlannedReparentShardRequest): vtctldata.PlannedReparentShardRequest; /** - * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. - * @param message RunHealthCheckRequest message or plain object to encode + * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. + * @param message PlannedReparentShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. - * @param message RunHealthCheckRequest message or plain object to encode + * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. + * @param message PlannedReparentShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer. + * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunHealthCheckRequest + * @returns PlannedReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RunHealthCheckRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardRequest; /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. + * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunHealthCheckRequest + * @returns PlannedReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RunHealthCheckRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardRequest; /** - * Verifies a RunHealthCheckRequest message. + * Verifies a PlannedReparentShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunHealthCheckRequest + * @returns PlannedReparentShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.RunHealthCheckRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardRequest; /** - * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. - * @param message RunHealthCheckRequest + * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. + * @param message PlannedReparentShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RunHealthCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.PlannedReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunHealthCheckRequest to JSON. + * Converts this PlannedReparentShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RunHealthCheckResponse. */ - interface IRunHealthCheckResponse { + /** Properties of a PlannedReparentShardResponse. */ + interface IPlannedReparentShardResponse { + + /** PlannedReparentShardResponse keyspace */ + keyspace?: (string|null); + + /** PlannedReparentShardResponse shard */ + shard?: (string|null); + + /** PlannedReparentShardResponse promoted_primary */ + promoted_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardResponse events */ + events?: (logutil.IEvent[]|null); } - /** Represents a RunHealthCheckResponse. */ - class RunHealthCheckResponse implements IRunHealthCheckResponse { + /** Represents a PlannedReparentShardResponse. */ + class PlannedReparentShardResponse implements IPlannedReparentShardResponse { /** - * Constructs a new RunHealthCheckResponse. + * Constructs a new PlannedReparentShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IRunHealthCheckResponse); + constructor(properties?: vtctldata.IPlannedReparentShardResponse); + + /** PlannedReparentShardResponse keyspace. */ + public keyspace: string; + + /** PlannedReparentShardResponse shard. */ + public shard: string; + + /** PlannedReparentShardResponse promoted_primary. */ + public promoted_primary?: (topodata.ITabletAlias|null); + + /** PlannedReparentShardResponse events. */ + public events: logutil.IEvent[]; /** - * Creates a new RunHealthCheckResponse instance using the specified properties. + * Creates a new PlannedReparentShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RunHealthCheckResponse instance + * @returns PlannedReparentShardResponse instance */ - public static create(properties?: vtctldata.IRunHealthCheckResponse): vtctldata.RunHealthCheckResponse; + public static create(properties?: vtctldata.IPlannedReparentShardResponse): vtctldata.PlannedReparentShardResponse; /** - * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. - * @param message RunHealthCheckResponse message or plain object to encode + * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. + * @param message PlannedReparentShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. - * @param message RunHealthCheckResponse message or plain object to encode + * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. + * @param message PlannedReparentShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer. + * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunHealthCheckResponse + * @returns PlannedReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RunHealthCheckResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardResponse; /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. + * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunHealthCheckResponse + * @returns PlannedReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RunHealthCheckResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardResponse; /** - * Verifies a RunHealthCheckResponse message. + * Verifies a PlannedReparentShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunHealthCheckResponse + * @returns PlannedReparentShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.RunHealthCheckResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardResponse; /** - * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. - * @param message RunHealthCheckResponse + * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. + * @param message PlannedReparentShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.RunHealthCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.PlannedReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunHealthCheckResponse to JSON. + * Converts this PlannedReparentShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceDurabilityPolicyRequest. */ - interface ISetKeyspaceDurabilityPolicyRequest { + /** Properties of a RebuildKeyspaceGraphRequest. */ + interface IRebuildKeyspaceGraphRequest { - /** SetKeyspaceDurabilityPolicyRequest keyspace */ + /** RebuildKeyspaceGraphRequest keyspace */ keyspace?: (string|null); - /** SetKeyspaceDurabilityPolicyRequest durability_policy */ - durability_policy?: (string|null); + /** RebuildKeyspaceGraphRequest cells */ + cells?: (string[]|null); + + /** RebuildKeyspaceGraphRequest allow_partial */ + allow_partial?: (boolean|null); } - /** Represents a SetKeyspaceDurabilityPolicyRequest. */ - class SetKeyspaceDurabilityPolicyRequest implements ISetKeyspaceDurabilityPolicyRequest { + /** Represents a RebuildKeyspaceGraphRequest. */ + class RebuildKeyspaceGraphRequest implements IRebuildKeyspaceGraphRequest { /** - * Constructs a new SetKeyspaceDurabilityPolicyRequest. + * Constructs a new RebuildKeyspaceGraphRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceDurabilityPolicyRequest); + constructor(properties?: vtctldata.IRebuildKeyspaceGraphRequest); - /** SetKeyspaceDurabilityPolicyRequest keyspace. */ + /** RebuildKeyspaceGraphRequest keyspace. */ public keyspace: string; - /** SetKeyspaceDurabilityPolicyRequest durability_policy. */ - public durability_policy: string; + /** RebuildKeyspaceGraphRequest cells. */ + public cells: string[]; + + /** RebuildKeyspaceGraphRequest allow_partial. */ + public allow_partial: boolean; /** - * Creates a new SetKeyspaceDurabilityPolicyRequest instance using the specified properties. + * Creates a new RebuildKeyspaceGraphRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceDurabilityPolicyRequest instance + * @returns RebuildKeyspaceGraphRequest instance */ - public static create(properties?: vtctldata.ISetKeyspaceDurabilityPolicyRequest): vtctldata.SetKeyspaceDurabilityPolicyRequest; + public static create(properties?: vtctldata.IRebuildKeyspaceGraphRequest): vtctldata.RebuildKeyspaceGraphRequest; /** - * Encodes the specified SetKeyspaceDurabilityPolicyRequest message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. - * @param message SetKeyspaceDurabilityPolicyRequest message or plain object to encode + * Encodes the specified RebuildKeyspaceGraphRequest message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. + * @param message RebuildKeyspaceGraphRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceDurabilityPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRebuildKeyspaceGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceDurabilityPolicyRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. - * @param message SetKeyspaceDurabilityPolicyRequest message or plain object to encode + * Encodes the specified RebuildKeyspaceGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. + * @param message RebuildKeyspaceGraphRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceDurabilityPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRebuildKeyspaceGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer. + * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceDurabilityPolicyRequest + * @returns RebuildKeyspaceGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceDurabilityPolicyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildKeyspaceGraphRequest; /** - * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceDurabilityPolicyRequest + * @returns RebuildKeyspaceGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceDurabilityPolicyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildKeyspaceGraphRequest; /** - * Verifies a SetKeyspaceDurabilityPolicyRequest message. + * Verifies a RebuildKeyspaceGraphRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceDurabilityPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildKeyspaceGraphRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceDurabilityPolicyRequest + * @returns RebuildKeyspaceGraphRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceDurabilityPolicyRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RebuildKeyspaceGraphRequest; /** - * Creates a plain object from a SetKeyspaceDurabilityPolicyRequest message. Also converts values to other types if specified. - * @param message SetKeyspaceDurabilityPolicyRequest + * Creates a plain object from a RebuildKeyspaceGraphRequest message. Also converts values to other types if specified. + * @param message RebuildKeyspaceGraphRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceDurabilityPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RebuildKeyspaceGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceDurabilityPolicyRequest to JSON. + * Converts this RebuildKeyspaceGraphRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceDurabilityPolicyResponse. */ - interface ISetKeyspaceDurabilityPolicyResponse { - - /** SetKeyspaceDurabilityPolicyResponse keyspace */ - keyspace?: (topodata.IKeyspace|null); + /** Properties of a RebuildKeyspaceGraphResponse. */ + interface IRebuildKeyspaceGraphResponse { } - /** Represents a SetKeyspaceDurabilityPolicyResponse. */ - class SetKeyspaceDurabilityPolicyResponse implements ISetKeyspaceDurabilityPolicyResponse { + /** Represents a RebuildKeyspaceGraphResponse. */ + class RebuildKeyspaceGraphResponse implements IRebuildKeyspaceGraphResponse { /** - * Constructs a new SetKeyspaceDurabilityPolicyResponse. + * Constructs a new RebuildKeyspaceGraphResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceDurabilityPolicyResponse); - - /** SetKeyspaceDurabilityPolicyResponse keyspace. */ - public keyspace?: (topodata.IKeyspace|null); + constructor(properties?: vtctldata.IRebuildKeyspaceGraphResponse); /** - * Creates a new SetKeyspaceDurabilityPolicyResponse instance using the specified properties. + * Creates a new RebuildKeyspaceGraphResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceDurabilityPolicyResponse instance + * @returns RebuildKeyspaceGraphResponse instance */ - public static create(properties?: vtctldata.ISetKeyspaceDurabilityPolicyResponse): vtctldata.SetKeyspaceDurabilityPolicyResponse; + public static create(properties?: vtctldata.IRebuildKeyspaceGraphResponse): vtctldata.RebuildKeyspaceGraphResponse; /** - * Encodes the specified SetKeyspaceDurabilityPolicyResponse message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. - * @param message SetKeyspaceDurabilityPolicyResponse message or plain object to encode + * Encodes the specified RebuildKeyspaceGraphResponse message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. + * @param message RebuildKeyspaceGraphResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceDurabilityPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRebuildKeyspaceGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceDurabilityPolicyResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. - * @param message SetKeyspaceDurabilityPolicyResponse message or plain object to encode + * Encodes the specified RebuildKeyspaceGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. + * @param message RebuildKeyspaceGraphResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceDurabilityPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRebuildKeyspaceGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer. + * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceDurabilityPolicyResponse + * @returns RebuildKeyspaceGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceDurabilityPolicyResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildKeyspaceGraphResponse; /** - * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer, length delimited. + * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceDurabilityPolicyResponse + * @returns RebuildKeyspaceGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceDurabilityPolicyResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildKeyspaceGraphResponse; /** - * Verifies a SetKeyspaceDurabilityPolicyResponse message. + * Verifies a RebuildKeyspaceGraphResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceDurabilityPolicyResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildKeyspaceGraphResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceDurabilityPolicyResponse + * @returns RebuildKeyspaceGraphResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceDurabilityPolicyResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RebuildKeyspaceGraphResponse; /** - * Creates a plain object from a SetKeyspaceDurabilityPolicyResponse message. Also converts values to other types if specified. - * @param message SetKeyspaceDurabilityPolicyResponse + * Creates a plain object from a RebuildKeyspaceGraphResponse message. Also converts values to other types if specified. + * @param message RebuildKeyspaceGraphResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceDurabilityPolicyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RebuildKeyspaceGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceDurabilityPolicyResponse to JSON. + * Converts this RebuildKeyspaceGraphResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceServedFromRequest. */ - interface ISetKeyspaceServedFromRequest { - - /** SetKeyspaceServedFromRequest keyspace */ - keyspace?: (string|null); - - /** SetKeyspaceServedFromRequest tablet_type */ - tablet_type?: (topodata.TabletType|null); + /** Properties of a RebuildVSchemaGraphRequest. */ + interface IRebuildVSchemaGraphRequest { - /** SetKeyspaceServedFromRequest cells */ + /** RebuildVSchemaGraphRequest cells */ cells?: (string[]|null); - - /** SetKeyspaceServedFromRequest remove */ - remove?: (boolean|null); - - /** SetKeyspaceServedFromRequest source_keyspace */ - source_keyspace?: (string|null); } - /** Represents a SetKeyspaceServedFromRequest. */ - class SetKeyspaceServedFromRequest implements ISetKeyspaceServedFromRequest { + /** Represents a RebuildVSchemaGraphRequest. */ + class RebuildVSchemaGraphRequest implements IRebuildVSchemaGraphRequest { /** - * Constructs a new SetKeyspaceServedFromRequest. + * Constructs a new RebuildVSchemaGraphRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceServedFromRequest); - - /** SetKeyspaceServedFromRequest keyspace. */ - public keyspace: string; - - /** SetKeyspaceServedFromRequest tablet_type. */ - public tablet_type: topodata.TabletType; + constructor(properties?: vtctldata.IRebuildVSchemaGraphRequest); - /** SetKeyspaceServedFromRequest cells. */ + /** RebuildVSchemaGraphRequest cells. */ public cells: string[]; - /** SetKeyspaceServedFromRequest remove. */ - public remove: boolean; - - /** SetKeyspaceServedFromRequest source_keyspace. */ - public source_keyspace: string; - /** - * Creates a new SetKeyspaceServedFromRequest instance using the specified properties. + * Creates a new RebuildVSchemaGraphRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceServedFromRequest instance + * @returns RebuildVSchemaGraphRequest instance */ - public static create(properties?: vtctldata.ISetKeyspaceServedFromRequest): vtctldata.SetKeyspaceServedFromRequest; + public static create(properties?: vtctldata.IRebuildVSchemaGraphRequest): vtctldata.RebuildVSchemaGraphRequest; /** - * Encodes the specified SetKeyspaceServedFromRequest message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. - * @param message SetKeyspaceServedFromRequest message or plain object to encode + * Encodes the specified RebuildVSchemaGraphRequest message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. + * @param message RebuildVSchemaGraphRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceServedFromRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRebuildVSchemaGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceServedFromRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. - * @param message SetKeyspaceServedFromRequest message or plain object to encode + * Encodes the specified RebuildVSchemaGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. + * @param message RebuildVSchemaGraphRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceServedFromRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRebuildVSchemaGraphRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer. + * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceServedFromRequest + * @returns RebuildVSchemaGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceServedFromRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildVSchemaGraphRequest; /** - * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer, length delimited. + * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceServedFromRequest + * @returns RebuildVSchemaGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceServedFromRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildVSchemaGraphRequest; /** - * Verifies a SetKeyspaceServedFromRequest message. + * Verifies a RebuildVSchemaGraphRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceServedFromRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildVSchemaGraphRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceServedFromRequest + * @returns RebuildVSchemaGraphRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceServedFromRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RebuildVSchemaGraphRequest; /** - * Creates a plain object from a SetKeyspaceServedFromRequest message. Also converts values to other types if specified. - * @param message SetKeyspaceServedFromRequest + * Creates a plain object from a RebuildVSchemaGraphRequest message. Also converts values to other types if specified. + * @param message RebuildVSchemaGraphRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceServedFromRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RebuildVSchemaGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceServedFromRequest to JSON. + * Converts this RebuildVSchemaGraphRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceServedFromResponse. */ - interface ISetKeyspaceServedFromResponse { - - /** SetKeyspaceServedFromResponse keyspace */ - keyspace?: (topodata.IKeyspace|null); + /** Properties of a RebuildVSchemaGraphResponse. */ + interface IRebuildVSchemaGraphResponse { } - /** Represents a SetKeyspaceServedFromResponse. */ - class SetKeyspaceServedFromResponse implements ISetKeyspaceServedFromResponse { + /** Represents a RebuildVSchemaGraphResponse. */ + class RebuildVSchemaGraphResponse implements IRebuildVSchemaGraphResponse { /** - * Constructs a new SetKeyspaceServedFromResponse. + * Constructs a new RebuildVSchemaGraphResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceServedFromResponse); - - /** SetKeyspaceServedFromResponse keyspace. */ - public keyspace?: (topodata.IKeyspace|null); + constructor(properties?: vtctldata.IRebuildVSchemaGraphResponse); /** - * Creates a new SetKeyspaceServedFromResponse instance using the specified properties. + * Creates a new RebuildVSchemaGraphResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceServedFromResponse instance + * @returns RebuildVSchemaGraphResponse instance */ - public static create(properties?: vtctldata.ISetKeyspaceServedFromResponse): vtctldata.SetKeyspaceServedFromResponse; + public static create(properties?: vtctldata.IRebuildVSchemaGraphResponse): vtctldata.RebuildVSchemaGraphResponse; /** - * Encodes the specified SetKeyspaceServedFromResponse message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. - * @param message SetKeyspaceServedFromResponse message or plain object to encode + * Encodes the specified RebuildVSchemaGraphResponse message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. + * @param message RebuildVSchemaGraphResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceServedFromResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRebuildVSchemaGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceServedFromResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. - * @param message SetKeyspaceServedFromResponse message or plain object to encode + * Encodes the specified RebuildVSchemaGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. + * @param message RebuildVSchemaGraphResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceServedFromResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRebuildVSchemaGraphResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer. + * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceServedFromResponse + * @returns RebuildVSchemaGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceServedFromResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RebuildVSchemaGraphResponse; /** - * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer, length delimited. + * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceServedFromResponse + * @returns RebuildVSchemaGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceServedFromResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RebuildVSchemaGraphResponse; /** - * Verifies a SetKeyspaceServedFromResponse message. + * Verifies a RebuildVSchemaGraphResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceServedFromResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildVSchemaGraphResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceServedFromResponse + * @returns RebuildVSchemaGraphResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceServedFromResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RebuildVSchemaGraphResponse; /** - * Creates a plain object from a SetKeyspaceServedFromResponse message. Also converts values to other types if specified. - * @param message SetKeyspaceServedFromResponse + * Creates a plain object from a RebuildVSchemaGraphResponse message. Also converts values to other types if specified. + * @param message RebuildVSchemaGraphResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceServedFromResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RebuildVSchemaGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceServedFromResponse to JSON. + * Converts this RebuildVSchemaGraphResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceShardingInfoRequest. */ - interface ISetKeyspaceShardingInfoRequest { - - /** SetKeyspaceShardingInfoRequest keyspace */ - keyspace?: (string|null); + /** Properties of a RefreshStateRequest. */ + interface IRefreshStateRequest { - /** SetKeyspaceShardingInfoRequest force */ - force?: (boolean|null); + /** RefreshStateRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a SetKeyspaceShardingInfoRequest. */ - class SetKeyspaceShardingInfoRequest implements ISetKeyspaceShardingInfoRequest { + /** Represents a RefreshStateRequest. */ + class RefreshStateRequest implements IRefreshStateRequest { /** - * Constructs a new SetKeyspaceShardingInfoRequest. + * Constructs a new RefreshStateRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceShardingInfoRequest); - - /** SetKeyspaceShardingInfoRequest keyspace. */ - public keyspace: string; + constructor(properties?: vtctldata.IRefreshStateRequest); - /** SetKeyspaceShardingInfoRequest force. */ - public force: boolean; + /** RefreshStateRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new SetKeyspaceShardingInfoRequest instance using the specified properties. + * Creates a new RefreshStateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceShardingInfoRequest instance + * @returns RefreshStateRequest instance */ - public static create(properties?: vtctldata.ISetKeyspaceShardingInfoRequest): vtctldata.SetKeyspaceShardingInfoRequest; + public static create(properties?: vtctldata.IRefreshStateRequest): vtctldata.RefreshStateRequest; /** - * Encodes the specified SetKeyspaceShardingInfoRequest message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. - * @param message SetKeyspaceShardingInfoRequest message or plain object to encode + * Encodes the specified RefreshStateRequest message. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. + * @param message RefreshStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceShardingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceShardingInfoRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. - * @param message SetKeyspaceShardingInfoRequest message or plain object to encode + * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. + * @param message RefreshStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceShardingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer. + * Decodes a RefreshStateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceShardingInfoRequest + * @returns RefreshStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceShardingInfoRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateRequest; /** - * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceShardingInfoRequest + * @returns RefreshStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceShardingInfoRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateRequest; /** - * Verifies a SetKeyspaceShardingInfoRequest message. + * Verifies a RefreshStateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceShardingInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceShardingInfoRequest + * @returns RefreshStateRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceShardingInfoRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateRequest; /** - * Creates a plain object from a SetKeyspaceShardingInfoRequest message. Also converts values to other types if specified. - * @param message SetKeyspaceShardingInfoRequest + * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. + * @param message RefreshStateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceShardingInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RefreshStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceShardingInfoRequest to JSON. + * Converts this RefreshStateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetKeyspaceShardingInfoResponse. */ - interface ISetKeyspaceShardingInfoResponse { - - /** SetKeyspaceShardingInfoResponse keyspace */ - keyspace?: (topodata.IKeyspace|null); + /** Properties of a RefreshStateResponse. */ + interface IRefreshStateResponse { } - /** Represents a SetKeyspaceShardingInfoResponse. */ - class SetKeyspaceShardingInfoResponse implements ISetKeyspaceShardingInfoResponse { + /** Represents a RefreshStateResponse. */ + class RefreshStateResponse implements IRefreshStateResponse { /** - * Constructs a new SetKeyspaceShardingInfoResponse. + * Constructs a new RefreshStateResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetKeyspaceShardingInfoResponse); - - /** SetKeyspaceShardingInfoResponse keyspace. */ - public keyspace?: (topodata.IKeyspace|null); + constructor(properties?: vtctldata.IRefreshStateResponse); /** - * Creates a new SetKeyspaceShardingInfoResponse instance using the specified properties. + * Creates a new RefreshStateResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetKeyspaceShardingInfoResponse instance + * @returns RefreshStateResponse instance */ - public static create(properties?: vtctldata.ISetKeyspaceShardingInfoResponse): vtctldata.SetKeyspaceShardingInfoResponse; + public static create(properties?: vtctldata.IRefreshStateResponse): vtctldata.RefreshStateResponse; /** - * Encodes the specified SetKeyspaceShardingInfoResponse message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. - * @param message SetKeyspaceShardingInfoResponse message or plain object to encode + * Encodes the specified RefreshStateResponse message. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. + * @param message RefreshStateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetKeyspaceShardingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetKeyspaceShardingInfoResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. - * @param message SetKeyspaceShardingInfoResponse message or plain object to encode + * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. + * @param message RefreshStateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetKeyspaceShardingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer. + * Decodes a RefreshStateResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetKeyspaceShardingInfoResponse + * @returns RefreshStateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceShardingInfoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateResponse; /** - * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetKeyspaceShardingInfoResponse + * @returns RefreshStateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceShardingInfoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateResponse; /** - * Verifies a SetKeyspaceShardingInfoResponse message. + * Verifies a RefreshStateResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetKeyspaceShardingInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetKeyspaceShardingInfoResponse + * @returns RefreshStateResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceShardingInfoResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateResponse; /** - * Creates a plain object from a SetKeyspaceShardingInfoResponse message. Also converts values to other types if specified. - * @param message SetKeyspaceShardingInfoResponse + * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. + * @param message RefreshStateResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetKeyspaceShardingInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RefreshStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetKeyspaceShardingInfoResponse to JSON. + * Converts this RefreshStateResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetShardIsPrimaryServingRequest. */ - interface ISetShardIsPrimaryServingRequest { + /** Properties of a RefreshStateByShardRequest. */ + interface IRefreshStateByShardRequest { - /** SetShardIsPrimaryServingRequest keyspace */ + /** RefreshStateByShardRequest keyspace */ keyspace?: (string|null); - /** SetShardIsPrimaryServingRequest shard */ + /** RefreshStateByShardRequest shard */ shard?: (string|null); - /** SetShardIsPrimaryServingRequest is_serving */ - is_serving?: (boolean|null); + /** RefreshStateByShardRequest cells */ + cells?: (string[]|null); } - /** Represents a SetShardIsPrimaryServingRequest. */ - class SetShardIsPrimaryServingRequest implements ISetShardIsPrimaryServingRequest { + /** Represents a RefreshStateByShardRequest. */ + class RefreshStateByShardRequest implements IRefreshStateByShardRequest { /** - * Constructs a new SetShardIsPrimaryServingRequest. + * Constructs a new RefreshStateByShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetShardIsPrimaryServingRequest); + constructor(properties?: vtctldata.IRefreshStateByShardRequest); - /** SetShardIsPrimaryServingRequest keyspace. */ + /** RefreshStateByShardRequest keyspace. */ public keyspace: string; - /** SetShardIsPrimaryServingRequest shard. */ + /** RefreshStateByShardRequest shard. */ public shard: string; - /** SetShardIsPrimaryServingRequest is_serving. */ - public is_serving: boolean; + /** RefreshStateByShardRequest cells. */ + public cells: string[]; /** - * Creates a new SetShardIsPrimaryServingRequest instance using the specified properties. + * Creates a new RefreshStateByShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetShardIsPrimaryServingRequest instance + * @returns RefreshStateByShardRequest instance */ - public static create(properties?: vtctldata.ISetShardIsPrimaryServingRequest): vtctldata.SetShardIsPrimaryServingRequest; + public static create(properties?: vtctldata.IRefreshStateByShardRequest): vtctldata.RefreshStateByShardRequest; /** - * Encodes the specified SetShardIsPrimaryServingRequest message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. - * @param message SetShardIsPrimaryServingRequest message or plain object to encode + * Encodes the specified RefreshStateByShardRequest message. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. + * @param message RefreshStateByShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetShardIsPrimaryServingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRefreshStateByShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetShardIsPrimaryServingRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. - * @param message SetShardIsPrimaryServingRequest message or plain object to encode + * Encodes the specified RefreshStateByShardRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. + * @param message RefreshStateByShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetShardIsPrimaryServingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRefreshStateByShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer. + * Decodes a RefreshStateByShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetShardIsPrimaryServingRequest + * @returns RefreshStateByShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardIsPrimaryServingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateByShardRequest; /** - * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateByShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetShardIsPrimaryServingRequest + * @returns RefreshStateByShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardIsPrimaryServingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateByShardRequest; /** - * Verifies a SetShardIsPrimaryServingRequest message. + * Verifies a RefreshStateByShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetShardIsPrimaryServingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateByShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetShardIsPrimaryServingRequest + * @returns RefreshStateByShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetShardIsPrimaryServingRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateByShardRequest; /** - * Creates a plain object from a SetShardIsPrimaryServingRequest message. Also converts values to other types if specified. - * @param message SetShardIsPrimaryServingRequest + * Creates a plain object from a RefreshStateByShardRequest message. Also converts values to other types if specified. + * @param message RefreshStateByShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetShardIsPrimaryServingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RefreshStateByShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetShardIsPrimaryServingRequest to JSON. + * Converts this RefreshStateByShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetShardIsPrimaryServingResponse. */ - interface ISetShardIsPrimaryServingResponse { + /** Properties of a RefreshStateByShardResponse. */ + interface IRefreshStateByShardResponse { - /** SetShardIsPrimaryServingResponse shard */ - shard?: (topodata.IShard|null); + /** RefreshStateByShardResponse is_partial_refresh */ + is_partial_refresh?: (boolean|null); + + /** RefreshStateByShardResponse partial_refresh_details */ + partial_refresh_details?: (string|null); } - /** Represents a SetShardIsPrimaryServingResponse. */ - class SetShardIsPrimaryServingResponse implements ISetShardIsPrimaryServingResponse { + /** Represents a RefreshStateByShardResponse. */ + class RefreshStateByShardResponse implements IRefreshStateByShardResponse { /** - * Constructs a new SetShardIsPrimaryServingResponse. + * Constructs a new RefreshStateByShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetShardIsPrimaryServingResponse); + constructor(properties?: vtctldata.IRefreshStateByShardResponse); - /** SetShardIsPrimaryServingResponse shard. */ - public shard?: (topodata.IShard|null); + /** RefreshStateByShardResponse is_partial_refresh. */ + public is_partial_refresh: boolean; + + /** RefreshStateByShardResponse partial_refresh_details. */ + public partial_refresh_details: string; /** - * Creates a new SetShardIsPrimaryServingResponse instance using the specified properties. + * Creates a new RefreshStateByShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetShardIsPrimaryServingResponse instance + * @returns RefreshStateByShardResponse instance */ - public static create(properties?: vtctldata.ISetShardIsPrimaryServingResponse): vtctldata.SetShardIsPrimaryServingResponse; + public static create(properties?: vtctldata.IRefreshStateByShardResponse): vtctldata.RefreshStateByShardResponse; /** - * Encodes the specified SetShardIsPrimaryServingResponse message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. - * @param message SetShardIsPrimaryServingResponse message or plain object to encode + * Encodes the specified RefreshStateByShardResponse message. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. + * @param message RefreshStateByShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetShardIsPrimaryServingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRefreshStateByShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetShardIsPrimaryServingResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. - * @param message SetShardIsPrimaryServingResponse message or plain object to encode + * Encodes the specified RefreshStateByShardResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. + * @param message RefreshStateByShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetShardIsPrimaryServingResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRefreshStateByShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer. + * Decodes a RefreshStateByShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetShardIsPrimaryServingResponse + * @returns RefreshStateByShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardIsPrimaryServingResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RefreshStateByShardResponse; /** - * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateByShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetShardIsPrimaryServingResponse + * @returns RefreshStateByShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardIsPrimaryServingResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RefreshStateByShardResponse; /** - * Verifies a SetShardIsPrimaryServingResponse message. + * Verifies a RefreshStateByShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetShardIsPrimaryServingResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateByShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetShardIsPrimaryServingResponse + * @returns RefreshStateByShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetShardIsPrimaryServingResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RefreshStateByShardResponse; /** - * Creates a plain object from a SetShardIsPrimaryServingResponse message. Also converts values to other types if specified. - * @param message SetShardIsPrimaryServingResponse + * Creates a plain object from a RefreshStateByShardResponse message. Also converts values to other types if specified. + * @param message RefreshStateByShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetShardIsPrimaryServingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RefreshStateByShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetShardIsPrimaryServingResponse to JSON. + * Converts this RefreshStateByShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetShardTabletControlRequest. */ - interface ISetShardTabletControlRequest { - - /** SetShardTabletControlRequest keyspace */ - keyspace?: (string|null); - - /** SetShardTabletControlRequest shard */ - shard?: (string|null); - - /** SetShardTabletControlRequest tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** SetShardTabletControlRequest cells */ - cells?: (string[]|null); - - /** SetShardTabletControlRequest denied_tables */ - denied_tables?: (string[]|null); - - /** SetShardTabletControlRequest disable_query_service */ - disable_query_service?: (boolean|null); + /** Properties of a ReloadSchemaRequest. */ + interface IReloadSchemaRequest { - /** SetShardTabletControlRequest remove */ - remove?: (boolean|null); + /** ReloadSchemaRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a SetShardTabletControlRequest. */ - class SetShardTabletControlRequest implements ISetShardTabletControlRequest { + /** Represents a ReloadSchemaRequest. */ + class ReloadSchemaRequest implements IReloadSchemaRequest { /** - * Constructs a new SetShardTabletControlRequest. + * Constructs a new ReloadSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetShardTabletControlRequest); - - /** SetShardTabletControlRequest keyspace. */ - public keyspace: string; - - /** SetShardTabletControlRequest shard. */ - public shard: string; - - /** SetShardTabletControlRequest tablet_type. */ - public tablet_type: topodata.TabletType; - - /** SetShardTabletControlRequest cells. */ - public cells: string[]; - - /** SetShardTabletControlRequest denied_tables. */ - public denied_tables: string[]; - - /** SetShardTabletControlRequest disable_query_service. */ - public disable_query_service: boolean; + constructor(properties?: vtctldata.IReloadSchemaRequest); - /** SetShardTabletControlRequest remove. */ - public remove: boolean; + /** ReloadSchemaRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new SetShardTabletControlRequest instance using the specified properties. + * Creates a new ReloadSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetShardTabletControlRequest instance + * @returns ReloadSchemaRequest instance */ - public static create(properties?: vtctldata.ISetShardTabletControlRequest): vtctldata.SetShardTabletControlRequest; + public static create(properties?: vtctldata.IReloadSchemaRequest): vtctldata.ReloadSchemaRequest; /** - * Encodes the specified SetShardTabletControlRequest message. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. - * @param message SetShardTabletControlRequest message or plain object to encode + * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. + * @param message ReloadSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetShardTabletControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetShardTabletControlRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. - * @param message SetShardTabletControlRequest message or plain object to encode + * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. + * @param message ReloadSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetShardTabletControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetShardTabletControlRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetShardTabletControlRequest + * @returns ReloadSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardTabletControlRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaRequest; /** - * Decodes a SetShardTabletControlRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetShardTabletControlRequest + * @returns ReloadSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardTabletControlRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaRequest; /** - * Verifies a SetShardTabletControlRequest message. + * Verifies a ReloadSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetShardTabletControlRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetShardTabletControlRequest + * @returns ReloadSchemaRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetShardTabletControlRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaRequest; /** - * Creates a plain object from a SetShardTabletControlRequest message. Also converts values to other types if specified. - * @param message SetShardTabletControlRequest + * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. + * @param message ReloadSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetShardTabletControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetShardTabletControlRequest to JSON. + * Converts this ReloadSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetShardTabletControlResponse. */ - interface ISetShardTabletControlResponse { - - /** SetShardTabletControlResponse shard */ - shard?: (topodata.IShard|null); + /** Properties of a ReloadSchemaResponse. */ + interface IReloadSchemaResponse { } - /** Represents a SetShardTabletControlResponse. */ - class SetShardTabletControlResponse implements ISetShardTabletControlResponse { + /** Represents a ReloadSchemaResponse. */ + class ReloadSchemaResponse implements IReloadSchemaResponse { /** - * Constructs a new SetShardTabletControlResponse. + * Constructs a new ReloadSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetShardTabletControlResponse); - - /** SetShardTabletControlResponse shard. */ - public shard?: (topodata.IShard|null); + constructor(properties?: vtctldata.IReloadSchemaResponse); /** - * Creates a new SetShardTabletControlResponse instance using the specified properties. + * Creates a new ReloadSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetShardTabletControlResponse instance + * @returns ReloadSchemaResponse instance */ - public static create(properties?: vtctldata.ISetShardTabletControlResponse): vtctldata.SetShardTabletControlResponse; + public static create(properties?: vtctldata.IReloadSchemaResponse): vtctldata.ReloadSchemaResponse; /** - * Encodes the specified SetShardTabletControlResponse message. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. - * @param message SetShardTabletControlResponse message or plain object to encode + * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. + * @param message ReloadSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetShardTabletControlResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetShardTabletControlResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. - * @param message SetShardTabletControlResponse message or plain object to encode + * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. + * @param message ReloadSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetShardTabletControlResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetShardTabletControlResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetShardTabletControlResponse + * @returns ReloadSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardTabletControlResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaResponse; /** - * Decodes a SetShardTabletControlResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetShardTabletControlResponse + * @returns ReloadSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardTabletControlResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaResponse; /** - * Verifies a SetShardTabletControlResponse message. + * Verifies a ReloadSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetShardTabletControlResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetShardTabletControlResponse + * @returns ReloadSchemaResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetShardTabletControlResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaResponse; /** - * Creates a plain object from a SetShardTabletControlResponse message. Also converts values to other types if specified. - * @param message SetShardTabletControlResponse + * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. + * @param message ReloadSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetShardTabletControlResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetShardTabletControlResponse to JSON. + * Converts this ReloadSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetWritableRequest. */ - interface ISetWritableRequest { + /** Properties of a ReloadSchemaKeyspaceRequest. */ + interface IReloadSchemaKeyspaceRequest { - /** SetWritableRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** ReloadSchemaKeyspaceRequest keyspace */ + keyspace?: (string|null); - /** SetWritableRequest writable */ - writable?: (boolean|null); + /** ReloadSchemaKeyspaceRequest wait_position */ + wait_position?: (string|null); + + /** ReloadSchemaKeyspaceRequest include_primary */ + include_primary?: (boolean|null); + + /** ReloadSchemaKeyspaceRequest concurrency */ + concurrency?: (number|null); } - /** Represents a SetWritableRequest. */ - class SetWritableRequest implements ISetWritableRequest { + /** Represents a ReloadSchemaKeyspaceRequest. */ + class ReloadSchemaKeyspaceRequest implements IReloadSchemaKeyspaceRequest { /** - * Constructs a new SetWritableRequest. + * Constructs a new ReloadSchemaKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetWritableRequest); + constructor(properties?: vtctldata.IReloadSchemaKeyspaceRequest); - /** SetWritableRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** ReloadSchemaKeyspaceRequest keyspace. */ + public keyspace: string; - /** SetWritableRequest writable. */ - public writable: boolean; + /** ReloadSchemaKeyspaceRequest wait_position. */ + public wait_position: string; + + /** ReloadSchemaKeyspaceRequest include_primary. */ + public include_primary: boolean; + + /** ReloadSchemaKeyspaceRequest concurrency. */ + public concurrency: number; /** - * Creates a new SetWritableRequest instance using the specified properties. + * Creates a new ReloadSchemaKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetWritableRequest instance + * @returns ReloadSchemaKeyspaceRequest instance */ - public static create(properties?: vtctldata.ISetWritableRequest): vtctldata.SetWritableRequest; + public static create(properties?: vtctldata.IReloadSchemaKeyspaceRequest): vtctldata.ReloadSchemaKeyspaceRequest; /** - * Encodes the specified SetWritableRequest message. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. - * @param message SetWritableRequest message or plain object to encode + * Encodes the specified ReloadSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. + * @param message ReloadSchemaKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetWritableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetWritableRequest message, length delimited. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. - * @param message SetWritableRequest message or plain object to encode + * Encodes the specified ReloadSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. + * @param message ReloadSchemaKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetWritableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetWritableRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetWritableRequest + * @returns ReloadSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetWritableRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaKeyspaceRequest; /** - * Decodes a SetWritableRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetWritableRequest + * @returns ReloadSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetWritableRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaKeyspaceRequest; /** - * Verifies a SetWritableRequest message. + * Verifies a ReloadSchemaKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetWritableRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetWritableRequest + * @returns ReloadSchemaKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetWritableRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaKeyspaceRequest; /** - * Creates a plain object from a SetWritableRequest message. Also converts values to other types if specified. - * @param message SetWritableRequest + * Creates a plain object from a ReloadSchemaKeyspaceRequest message. Also converts values to other types if specified. + * @param message ReloadSchemaKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetWritableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetWritableRequest to JSON. + * Converts this ReloadSchemaKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SetWritableResponse. */ - interface ISetWritableResponse { + /** Properties of a ReloadSchemaKeyspaceResponse. */ + interface IReloadSchemaKeyspaceResponse { + + /** ReloadSchemaKeyspaceResponse events */ + events?: (logutil.IEvent[]|null); } - /** Represents a SetWritableResponse. */ - class SetWritableResponse implements ISetWritableResponse { + /** Represents a ReloadSchemaKeyspaceResponse. */ + class ReloadSchemaKeyspaceResponse implements IReloadSchemaKeyspaceResponse { /** - * Constructs a new SetWritableResponse. + * Constructs a new ReloadSchemaKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISetWritableResponse); + constructor(properties?: vtctldata.IReloadSchemaKeyspaceResponse); + + /** ReloadSchemaKeyspaceResponse events. */ + public events: logutil.IEvent[]; /** - * Creates a new SetWritableResponse instance using the specified properties. + * Creates a new ReloadSchemaKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetWritableResponse instance + * @returns ReloadSchemaKeyspaceResponse instance */ - public static create(properties?: vtctldata.ISetWritableResponse): vtctldata.SetWritableResponse; + public static create(properties?: vtctldata.IReloadSchemaKeyspaceResponse): vtctldata.ReloadSchemaKeyspaceResponse; /** - * Encodes the specified SetWritableResponse message. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. - * @param message SetWritableResponse message or plain object to encode + * Encodes the specified ReloadSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. + * @param message ReloadSchemaKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISetWritableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetWritableResponse message, length delimited. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. - * @param message SetWritableResponse message or plain object to encode + * Encodes the specified ReloadSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. + * @param message ReloadSchemaKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISetWritableResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetWritableResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetWritableResponse + * @returns ReloadSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetWritableResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaKeyspaceResponse; /** - * Decodes a SetWritableResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetWritableResponse + * @returns ReloadSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetWritableResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaKeyspaceResponse; /** - * Verifies a SetWritableResponse message. + * Verifies a ReloadSchemaKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetWritableResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetWritableResponse + * @returns ReloadSchemaKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SetWritableResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaKeyspaceResponse; /** - * Creates a plain object from a SetWritableResponse message. Also converts values to other types if specified. - * @param message SetWritableResponse + * Creates a plain object from a ReloadSchemaKeyspaceResponse message. Also converts values to other types if specified. + * @param message ReloadSchemaKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SetWritableResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetWritableResponse to JSON. + * Converts this ReloadSchemaKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationAddRequest. */ - interface IShardReplicationAddRequest { + /** Properties of a ReloadSchemaShardRequest. */ + interface IReloadSchemaShardRequest { - /** ShardReplicationAddRequest keyspace */ + /** ReloadSchemaShardRequest keyspace */ keyspace?: (string|null); - /** ShardReplicationAddRequest shard */ + /** ReloadSchemaShardRequest shard */ shard?: (string|null); - /** ShardReplicationAddRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** ReloadSchemaShardRequest wait_position */ + wait_position?: (string|null); + + /** ReloadSchemaShardRequest include_primary */ + include_primary?: (boolean|null); + + /** ReloadSchemaShardRequest concurrency */ + concurrency?: (number|null); } - /** Represents a ShardReplicationAddRequest. */ - class ShardReplicationAddRequest implements IShardReplicationAddRequest { + /** Represents a ReloadSchemaShardRequest. */ + class ReloadSchemaShardRequest implements IReloadSchemaShardRequest { /** - * Constructs a new ShardReplicationAddRequest. + * Constructs a new ReloadSchemaShardRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationAddRequest); + constructor(properties?: vtctldata.IReloadSchemaShardRequest); - /** ShardReplicationAddRequest keyspace. */ + /** ReloadSchemaShardRequest keyspace. */ public keyspace: string; - /** ShardReplicationAddRequest shard. */ + /** ReloadSchemaShardRequest shard. */ public shard: string; - /** ShardReplicationAddRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** ReloadSchemaShardRequest wait_position. */ + public wait_position: string; + + /** ReloadSchemaShardRequest include_primary. */ + public include_primary: boolean; + + /** ReloadSchemaShardRequest concurrency. */ + public concurrency: number; /** - * Creates a new ShardReplicationAddRequest instance using the specified properties. + * Creates a new ReloadSchemaShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationAddRequest instance + * @returns ReloadSchemaShardRequest instance */ - public static create(properties?: vtctldata.IShardReplicationAddRequest): vtctldata.ShardReplicationAddRequest; + public static create(properties?: vtctldata.IReloadSchemaShardRequest): vtctldata.ReloadSchemaShardRequest; /** - * Encodes the specified ShardReplicationAddRequest message. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. - * @param message ShardReplicationAddRequest message or plain object to encode + * Encodes the specified ReloadSchemaShardRequest message. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. + * @param message ReloadSchemaShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationAddRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. - * @param message ShardReplicationAddRequest message or plain object to encode + * Encodes the specified ReloadSchemaShardRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. + * @param message ReloadSchemaShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationAddRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationAddRequest + * @returns ReloadSchemaShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationAddRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaShardRequest; /** - * Decodes a ShardReplicationAddRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationAddRequest + * @returns ReloadSchemaShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationAddRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaShardRequest; /** - * Verifies a ShardReplicationAddRequest message. + * Verifies a ReloadSchemaShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationAddRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationAddRequest + * @returns ReloadSchemaShardRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationAddRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaShardRequest; /** - * Creates a plain object from a ShardReplicationAddRequest message. Also converts values to other types if specified. - * @param message ShardReplicationAddRequest + * Creates a plain object from a ReloadSchemaShardRequest message. Also converts values to other types if specified. + * @param message ReloadSchemaShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationAddRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationAddRequest to JSON. + * Converts this ReloadSchemaShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationAddResponse. */ - interface IShardReplicationAddResponse { + /** Properties of a ReloadSchemaShardResponse. */ + interface IReloadSchemaShardResponse { + + /** ReloadSchemaShardResponse events */ + events?: (logutil.IEvent[]|null); } - /** Represents a ShardReplicationAddResponse. */ - class ShardReplicationAddResponse implements IShardReplicationAddResponse { + /** Represents a ReloadSchemaShardResponse. */ + class ReloadSchemaShardResponse implements IReloadSchemaShardResponse { /** - * Constructs a new ShardReplicationAddResponse. + * Constructs a new ReloadSchemaShardResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationAddResponse); + constructor(properties?: vtctldata.IReloadSchemaShardResponse); + + /** ReloadSchemaShardResponse events. */ + public events: logutil.IEvent[]; /** - * Creates a new ShardReplicationAddResponse instance using the specified properties. + * Creates a new ReloadSchemaShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationAddResponse instance + * @returns ReloadSchemaShardResponse instance */ - public static create(properties?: vtctldata.IShardReplicationAddResponse): vtctldata.ShardReplicationAddResponse; + public static create(properties?: vtctldata.IReloadSchemaShardResponse): vtctldata.ReloadSchemaShardResponse; /** - * Encodes the specified ShardReplicationAddResponse message. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. - * @param message ShardReplicationAddResponse message or plain object to encode + * Encodes the specified ReloadSchemaShardResponse message. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. + * @param message ReloadSchemaShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReloadSchemaShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationAddResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. - * @param message ShardReplicationAddResponse message or plain object to encode + * Encodes the specified ReloadSchemaShardResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. + * @param message ReloadSchemaShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReloadSchemaShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationAddResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationAddResponse + * @returns ReloadSchemaShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationAddResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReloadSchemaShardResponse; /** - * Decodes a ShardReplicationAddResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationAddResponse + * @returns ReloadSchemaShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationAddResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReloadSchemaShardResponse; /** - * Verifies a ShardReplicationAddResponse message. + * Verifies a ReloadSchemaShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationAddResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationAddResponse + * @returns ReloadSchemaShardResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationAddResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ReloadSchemaShardResponse; /** - * Creates a plain object from a ShardReplicationAddResponse message. Also converts values to other types if specified. - * @param message ShardReplicationAddResponse + * Creates a plain object from a ReloadSchemaShardResponse message. Also converts values to other types if specified. + * @param message ReloadSchemaShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationAddResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReloadSchemaShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationAddResponse to JSON. + * Converts this ReloadSchemaShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationFixRequest. */ - interface IShardReplicationFixRequest { + /** Properties of a RemoveBackupRequest. */ + interface IRemoveBackupRequest { - /** ShardReplicationFixRequest keyspace */ + /** RemoveBackupRequest keyspace */ keyspace?: (string|null); - /** ShardReplicationFixRequest shard */ + /** RemoveBackupRequest shard */ shard?: (string|null); - /** ShardReplicationFixRequest cell */ - cell?: (string|null); + /** RemoveBackupRequest name */ + name?: (string|null); } - /** Represents a ShardReplicationFixRequest. */ - class ShardReplicationFixRequest implements IShardReplicationFixRequest { + /** Represents a RemoveBackupRequest. */ + class RemoveBackupRequest implements IRemoveBackupRequest { /** - * Constructs a new ShardReplicationFixRequest. + * Constructs a new RemoveBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationFixRequest); + constructor(properties?: vtctldata.IRemoveBackupRequest); - /** ShardReplicationFixRequest keyspace. */ + /** RemoveBackupRequest keyspace. */ public keyspace: string; - /** ShardReplicationFixRequest shard. */ + /** RemoveBackupRequest shard. */ public shard: string; - /** ShardReplicationFixRequest cell. */ - public cell: string; + /** RemoveBackupRequest name. */ + public name: string; /** - * Creates a new ShardReplicationFixRequest instance using the specified properties. + * Creates a new RemoveBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationFixRequest instance + * @returns RemoveBackupRequest instance */ - public static create(properties?: vtctldata.IShardReplicationFixRequest): vtctldata.ShardReplicationFixRequest; + public static create(properties?: vtctldata.IRemoveBackupRequest): vtctldata.RemoveBackupRequest; /** - * Encodes the specified ShardReplicationFixRequest message. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. - * @param message ShardReplicationFixRequest message or plain object to encode + * Encodes the specified RemoveBackupRequest message. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. + * @param message RemoveBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationFixRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationFixRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. - * @param message ShardReplicationFixRequest message or plain object to encode + * Encodes the specified RemoveBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. + * @param message RemoveBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationFixRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationFixRequest message from the specified reader or buffer. + * Decodes a RemoveBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationFixRequest + * @returns RemoveBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationFixRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveBackupRequest; /** - * Decodes a ShardReplicationFixRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationFixRequest + * @returns RemoveBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationFixRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveBackupRequest; /** - * Verifies a ShardReplicationFixRequest message. + * Verifies a RemoveBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationFixRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationFixRequest + * @returns RemoveBackupRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationFixRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveBackupRequest; /** - * Creates a plain object from a ShardReplicationFixRequest message. Also converts values to other types if specified. - * @param message ShardReplicationFixRequest + * Creates a plain object from a RemoveBackupRequest message. Also converts values to other types if specified. + * @param message RemoveBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationFixRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationFixRequest to JSON. + * Converts this RemoveBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationFixResponse. */ - interface IShardReplicationFixResponse { - - /** ShardReplicationFixResponse error */ - error?: (topodata.IShardReplicationError|null); + /** Properties of a RemoveBackupResponse. */ + interface IRemoveBackupResponse { } - /** Represents a ShardReplicationFixResponse. */ - class ShardReplicationFixResponse implements IShardReplicationFixResponse { + /** Represents a RemoveBackupResponse. */ + class RemoveBackupResponse implements IRemoveBackupResponse { /** - * Constructs a new ShardReplicationFixResponse. + * Constructs a new RemoveBackupResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationFixResponse); - - /** ShardReplicationFixResponse error. */ - public error?: (topodata.IShardReplicationError|null); + constructor(properties?: vtctldata.IRemoveBackupResponse); /** - * Creates a new ShardReplicationFixResponse instance using the specified properties. + * Creates a new RemoveBackupResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationFixResponse instance + * @returns RemoveBackupResponse instance */ - public static create(properties?: vtctldata.IShardReplicationFixResponse): vtctldata.ShardReplicationFixResponse; + public static create(properties?: vtctldata.IRemoveBackupResponse): vtctldata.RemoveBackupResponse; /** - * Encodes the specified ShardReplicationFixResponse message. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. - * @param message ShardReplicationFixResponse message or plain object to encode + * Encodes the specified RemoveBackupResponse message. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. + * @param message RemoveBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationFixResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationFixResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. - * @param message ShardReplicationFixResponse message or plain object to encode + * Encodes the specified RemoveBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. + * @param message RemoveBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationFixResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationFixResponse message from the specified reader or buffer. + * Decodes a RemoveBackupResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationFixResponse + * @returns RemoveBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationFixResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveBackupResponse; /** - * Decodes a ShardReplicationFixResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveBackupResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationFixResponse + * @returns RemoveBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationFixResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveBackupResponse; /** - * Verifies a ShardReplicationFixResponse message. + * Verifies a RemoveBackupResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationFixResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveBackupResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationFixResponse + * @returns RemoveBackupResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationFixResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveBackupResponse; /** - * Creates a plain object from a ShardReplicationFixResponse message. Also converts values to other types if specified. - * @param message ShardReplicationFixResponse + * Creates a plain object from a RemoveBackupResponse message. Also converts values to other types if specified. + * @param message RemoveBackupResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationFixResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationFixResponse to JSON. + * Converts this RemoveBackupResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationPositionsRequest. */ - interface IShardReplicationPositionsRequest { + /** Properties of a RemoveKeyspaceCellRequest. */ + interface IRemoveKeyspaceCellRequest { - /** ShardReplicationPositionsRequest keyspace */ + /** RemoveKeyspaceCellRequest keyspace */ keyspace?: (string|null); - /** ShardReplicationPositionsRequest shard */ - shard?: (string|null); + /** RemoveKeyspaceCellRequest cell */ + cell?: (string|null); + + /** RemoveKeyspaceCellRequest force */ + force?: (boolean|null); + + /** RemoveKeyspaceCellRequest recursive */ + recursive?: (boolean|null); } - /** Represents a ShardReplicationPositionsRequest. */ - class ShardReplicationPositionsRequest implements IShardReplicationPositionsRequest { + /** Represents a RemoveKeyspaceCellRequest. */ + class RemoveKeyspaceCellRequest implements IRemoveKeyspaceCellRequest { /** - * Constructs a new ShardReplicationPositionsRequest. + * Constructs a new RemoveKeyspaceCellRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationPositionsRequest); + constructor(properties?: vtctldata.IRemoveKeyspaceCellRequest); - /** ShardReplicationPositionsRequest keyspace. */ + /** RemoveKeyspaceCellRequest keyspace. */ public keyspace: string; - /** ShardReplicationPositionsRequest shard. */ - public shard: string; + /** RemoveKeyspaceCellRequest cell. */ + public cell: string; + + /** RemoveKeyspaceCellRequest force. */ + public force: boolean; + + /** RemoveKeyspaceCellRequest recursive. */ + public recursive: boolean; /** - * Creates a new ShardReplicationPositionsRequest instance using the specified properties. + * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationPositionsRequest instance + * @returns RemoveKeyspaceCellRequest instance */ - public static create(properties?: vtctldata.IShardReplicationPositionsRequest): vtctldata.ShardReplicationPositionsRequest; + public static create(properties?: vtctldata.IRemoveKeyspaceCellRequest): vtctldata.RemoveKeyspaceCellRequest; /** - * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @param message ShardReplicationPositionsRequest message or plain object to encode + * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. + * @param message RemoveKeyspaceCellRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @param message ShardReplicationPositionsRequest message or plain object to encode + * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. + * @param message RemoveKeyspaceCellRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. + * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationPositionsRequest + * @returns RemoveKeyspaceCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellRequest; /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationPositionsRequest + * @returns RemoveKeyspaceCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellRequest; /** - * Verifies a ShardReplicationPositionsRequest message. + * Verifies a RemoveKeyspaceCellRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationPositionsRequest + * @returns RemoveKeyspaceCellRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellRequest; /** - * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. - * @param message ShardReplicationPositionsRequest + * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. + * @param message RemoveKeyspaceCellRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationPositionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveKeyspaceCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationPositionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardReplicationPositionsResponse. */ - interface IShardReplicationPositionsResponse { - - /** ShardReplicationPositionsResponse replication_statuses */ - replication_statuses?: ({ [k: string]: replicationdata.IStatus }|null); + * Converts this RemoveKeyspaceCellRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ShardReplicationPositionsResponse tablet_map */ - tablet_map?: ({ [k: string]: topodata.ITablet }|null); + /** Properties of a RemoveKeyspaceCellResponse. */ + interface IRemoveKeyspaceCellResponse { } - /** Represents a ShardReplicationPositionsResponse. */ - class ShardReplicationPositionsResponse implements IShardReplicationPositionsResponse { + /** Represents a RemoveKeyspaceCellResponse. */ + class RemoveKeyspaceCellResponse implements IRemoveKeyspaceCellResponse { /** - * Constructs a new ShardReplicationPositionsResponse. + * Constructs a new RemoveKeyspaceCellResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationPositionsResponse); - - /** ShardReplicationPositionsResponse replication_statuses. */ - public replication_statuses: { [k: string]: replicationdata.IStatus }; - - /** ShardReplicationPositionsResponse tablet_map. */ - public tablet_map: { [k: string]: topodata.ITablet }; + constructor(properties?: vtctldata.IRemoveKeyspaceCellResponse); /** - * Creates a new ShardReplicationPositionsResponse instance using the specified properties. + * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationPositionsResponse instance + * @returns RemoveKeyspaceCellResponse instance */ - public static create(properties?: vtctldata.IShardReplicationPositionsResponse): vtctldata.ShardReplicationPositionsResponse; + public static create(properties?: vtctldata.IRemoveKeyspaceCellResponse): vtctldata.RemoveKeyspaceCellResponse; /** - * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @param message ShardReplicationPositionsResponse message or plain object to encode + * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. + * @param message RemoveKeyspaceCellResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @param message ShardReplicationPositionsResponse message or plain object to encode + * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. + * @param message RemoveKeyspaceCellResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. + * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationPositionsResponse + * @returns RemoveKeyspaceCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellResponse; /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationPositionsResponse + * @returns RemoveKeyspaceCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellResponse; /** - * Verifies a ShardReplicationPositionsResponse message. + * Verifies a RemoveKeyspaceCellResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationPositionsResponse + * @returns RemoveKeyspaceCellResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellResponse; /** - * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. - * @param message ShardReplicationPositionsResponse + * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. + * @param message RemoveKeyspaceCellResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationPositionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveKeyspaceCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationPositionsResponse to JSON. + * Converts this RemoveKeyspaceCellResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationRemoveRequest. */ - interface IShardReplicationRemoveRequest { + /** Properties of a RemoveShardCellRequest. */ + interface IRemoveShardCellRequest { - /** ShardReplicationRemoveRequest keyspace */ + /** RemoveShardCellRequest keyspace */ keyspace?: (string|null); - /** ShardReplicationRemoveRequest shard */ - shard?: (string|null); + /** RemoveShardCellRequest shard_name */ + shard_name?: (string|null); - /** ShardReplicationRemoveRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** RemoveShardCellRequest cell */ + cell?: (string|null); + + /** RemoveShardCellRequest force */ + force?: (boolean|null); + + /** RemoveShardCellRequest recursive */ + recursive?: (boolean|null); } - /** Represents a ShardReplicationRemoveRequest. */ - class ShardReplicationRemoveRequest implements IShardReplicationRemoveRequest { + /** Represents a RemoveShardCellRequest. */ + class RemoveShardCellRequest implements IRemoveShardCellRequest { /** - * Constructs a new ShardReplicationRemoveRequest. + * Constructs a new RemoveShardCellRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationRemoveRequest); + constructor(properties?: vtctldata.IRemoveShardCellRequest); - /** ShardReplicationRemoveRequest keyspace. */ + /** RemoveShardCellRequest keyspace. */ public keyspace: string; - /** ShardReplicationRemoveRequest shard. */ - public shard: string; + /** RemoveShardCellRequest shard_name. */ + public shard_name: string; - /** ShardReplicationRemoveRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** RemoveShardCellRequest cell. */ + public cell: string; + + /** RemoveShardCellRequest force. */ + public force: boolean; + + /** RemoveShardCellRequest recursive. */ + public recursive: boolean; /** - * Creates a new ShardReplicationRemoveRequest instance using the specified properties. + * Creates a new RemoveShardCellRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationRemoveRequest instance + * @returns RemoveShardCellRequest instance */ - public static create(properties?: vtctldata.IShardReplicationRemoveRequest): vtctldata.ShardReplicationRemoveRequest; + public static create(properties?: vtctldata.IRemoveShardCellRequest): vtctldata.RemoveShardCellRequest; /** - * Encodes the specified ShardReplicationRemoveRequest message. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. - * @param message ShardReplicationRemoveRequest message or plain object to encode + * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. + * @param message RemoveShardCellRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationRemoveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationRemoveRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. - * @param message ShardReplicationRemoveRequest message or plain object to encode + * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. + * @param message RemoveShardCellRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationRemoveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer. + * Decodes a RemoveShardCellRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationRemoveRequest + * @returns RemoveShardCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationRemoveRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellRequest; /** - * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationRemoveRequest + * @returns RemoveShardCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationRemoveRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellRequest; /** - * Verifies a ShardReplicationRemoveRequest message. + * Verifies a RemoveShardCellRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationRemoveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationRemoveRequest + * @returns RemoveShardCellRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationRemoveRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellRequest; /** - * Creates a plain object from a ShardReplicationRemoveRequest message. Also converts values to other types if specified. - * @param message ShardReplicationRemoveRequest + * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. + * @param message RemoveShardCellRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationRemoveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveShardCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationRemoveRequest to JSON. + * Converts this RemoveShardCellRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardReplicationRemoveResponse. */ - interface IShardReplicationRemoveResponse { + /** Properties of a RemoveShardCellResponse. */ + interface IRemoveShardCellResponse { } - /** Represents a ShardReplicationRemoveResponse. */ - class ShardReplicationRemoveResponse implements IShardReplicationRemoveResponse { + /** Represents a RemoveShardCellResponse. */ + class RemoveShardCellResponse implements IRemoveShardCellResponse { /** - * Constructs a new ShardReplicationRemoveResponse. + * Constructs a new RemoveShardCellResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IShardReplicationRemoveResponse); + constructor(properties?: vtctldata.IRemoveShardCellResponse); /** - * Creates a new ShardReplicationRemoveResponse instance using the specified properties. + * Creates a new RemoveShardCellResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplicationRemoveResponse instance + * @returns RemoveShardCellResponse instance */ - public static create(properties?: vtctldata.IShardReplicationRemoveResponse): vtctldata.ShardReplicationRemoveResponse; + public static create(properties?: vtctldata.IRemoveShardCellResponse): vtctldata.RemoveShardCellResponse; /** - * Encodes the specified ShardReplicationRemoveResponse message. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. - * @param message ShardReplicationRemoveResponse message or plain object to encode + * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. + * @param message RemoveShardCellResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IShardReplicationRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardReplicationRemoveResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. - * @param message ShardReplicationRemoveResponse message or plain object to encode + * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. + * @param message RemoveShardCellResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IShardReplicationRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer. + * Decodes a RemoveShardCellResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplicationRemoveResponse + * @returns RemoveShardCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationRemoveResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellResponse; /** - * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplicationRemoveResponse + * @returns RemoveShardCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationRemoveResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellResponse; /** - * Verifies a ShardReplicationRemoveResponse message. + * Verifies a RemoveShardCellResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardReplicationRemoveResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplicationRemoveResponse + * @returns RemoveShardCellResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationRemoveResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellResponse; /** - * Creates a plain object from a ShardReplicationRemoveResponse message. Also converts values to other types if specified. - * @param message ShardReplicationRemoveResponse + * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. + * @param message RemoveShardCellResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ShardReplicationRemoveResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RemoveShardCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplicationRemoveResponse to JSON. + * Converts this RemoveShardCellResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SleepTabletRequest. */ - interface ISleepTabletRequest { - - /** SleepTabletRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** Properties of a ReparentTabletRequest. */ + interface IReparentTabletRequest { - /** SleepTabletRequest duration */ - duration?: (vttime.IDuration|null); + /** ReparentTabletRequest tablet */ + tablet?: (topodata.ITabletAlias|null); } - /** Represents a SleepTabletRequest. */ - class SleepTabletRequest implements ISleepTabletRequest { + /** Represents a ReparentTabletRequest. */ + class ReparentTabletRequest implements IReparentTabletRequest { /** - * Constructs a new SleepTabletRequest. + * Constructs a new ReparentTabletRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISleepTabletRequest); - - /** SleepTabletRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + constructor(properties?: vtctldata.IReparentTabletRequest); - /** SleepTabletRequest duration. */ - public duration?: (vttime.IDuration|null); + /** ReparentTabletRequest tablet. */ + public tablet?: (topodata.ITabletAlias|null); /** - * Creates a new SleepTabletRequest instance using the specified properties. + * Creates a new ReparentTabletRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SleepTabletRequest instance + * @returns ReparentTabletRequest instance */ - public static create(properties?: vtctldata.ISleepTabletRequest): vtctldata.SleepTabletRequest; + public static create(properties?: vtctldata.IReparentTabletRequest): vtctldata.ReparentTabletRequest; /** - * Encodes the specified SleepTabletRequest message. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. - * @param message SleepTabletRequest message or plain object to encode + * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. + * @param message ReparentTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISleepTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SleepTabletRequest message, length delimited. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. - * @param message SleepTabletRequest message or plain object to encode + * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. + * @param message ReparentTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISleepTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SleepTabletRequest message from the specified reader or buffer. + * Decodes a ReparentTabletRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SleepTabletRequest + * @returns ReparentTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SleepTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletRequest; /** - * Decodes a SleepTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SleepTabletRequest + * @returns ReparentTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SleepTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletRequest; /** - * Verifies a SleepTabletRequest message. + * Verifies a ReparentTabletRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SleepTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SleepTabletRequest + * @returns ReparentTabletRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SleepTabletRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletRequest; /** - * Creates a plain object from a SleepTabletRequest message. Also converts values to other types if specified. - * @param message SleepTabletRequest + * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. + * @param message ReparentTabletRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SleepTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReparentTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SleepTabletRequest to JSON. + * Converts this ReparentTabletRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SleepTabletResponse. */ - interface ISleepTabletResponse { + /** Properties of a ReparentTabletResponse. */ + interface IReparentTabletResponse { + + /** ReparentTabletResponse keyspace */ + keyspace?: (string|null); + + /** ReparentTabletResponse shard */ + shard?: (string|null); + + /** ReparentTabletResponse primary */ + primary?: (topodata.ITabletAlias|null); } - /** Represents a SleepTabletResponse. */ - class SleepTabletResponse implements ISleepTabletResponse { + /** Represents a ReparentTabletResponse. */ + class ReparentTabletResponse implements IReparentTabletResponse { /** - * Constructs a new SleepTabletResponse. + * Constructs a new ReparentTabletResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISleepTabletResponse); + constructor(properties?: vtctldata.IReparentTabletResponse); + + /** ReparentTabletResponse keyspace. */ + public keyspace: string; + + /** ReparentTabletResponse shard. */ + public shard: string; + + /** ReparentTabletResponse primary. */ + public primary?: (topodata.ITabletAlias|null); /** - * Creates a new SleepTabletResponse instance using the specified properties. + * Creates a new ReparentTabletResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SleepTabletResponse instance + * @returns ReparentTabletResponse instance */ - public static create(properties?: vtctldata.ISleepTabletResponse): vtctldata.SleepTabletResponse; + public static create(properties?: vtctldata.IReparentTabletResponse): vtctldata.ReparentTabletResponse; /** - * Encodes the specified SleepTabletResponse message. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. - * @param message SleepTabletResponse message or plain object to encode + * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. + * @param message ReparentTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISleepTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SleepTabletResponse message, length delimited. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. - * @param message SleepTabletResponse message or plain object to encode + * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. + * @param message ReparentTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISleepTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SleepTabletResponse message from the specified reader or buffer. + * Decodes a ReparentTabletResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SleepTabletResponse + * @returns ReparentTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SleepTabletResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletResponse; /** - * Decodes a SleepTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SleepTabletResponse + * @returns ReparentTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SleepTabletResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletResponse; /** - * Verifies a SleepTabletResponse message. + * Verifies a ReparentTabletResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SleepTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SleepTabletResponse + * @returns ReparentTabletResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SleepTabletResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletResponse; /** - * Creates a plain object from a SleepTabletResponse message. Also converts values to other types if specified. - * @param message SleepTabletResponse + * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. + * @param message ReparentTabletResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SleepTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ReparentTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SleepTabletResponse to JSON. + * Converts this ReparentTabletResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SourceShardAddRequest. */ - interface ISourceShardAddRequest { - - /** SourceShardAddRequest keyspace */ - keyspace?: (string|null); - - /** SourceShardAddRequest shard */ - shard?: (string|null); - - /** SourceShardAddRequest uid */ - uid?: (number|null); + /** Properties of a RestoreFromBackupRequest. */ + interface IRestoreFromBackupRequest { - /** SourceShardAddRequest source_keyspace */ - source_keyspace?: (string|null); + /** RestoreFromBackupRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); - /** SourceShardAddRequest source_shard */ - source_shard?: (string|null); + /** RestoreFromBackupRequest backup_time */ + backup_time?: (vttime.ITime|null); - /** SourceShardAddRequest key_range */ - key_range?: (topodata.IKeyRange|null); + /** RestoreFromBackupRequest restore_to_pos */ + restore_to_pos?: (string|null); - /** SourceShardAddRequest tables */ - tables?: (string[]|null); + /** RestoreFromBackupRequest dry_run */ + dry_run?: (boolean|null); } - /** Represents a SourceShardAddRequest. */ - class SourceShardAddRequest implements ISourceShardAddRequest { + /** Represents a RestoreFromBackupRequest. */ + class RestoreFromBackupRequest implements IRestoreFromBackupRequest { /** - * Constructs a new SourceShardAddRequest. + * Constructs a new RestoreFromBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISourceShardAddRequest); - - /** SourceShardAddRequest keyspace. */ - public keyspace: string; - - /** SourceShardAddRequest shard. */ - public shard: string; - - /** SourceShardAddRequest uid. */ - public uid: number; + constructor(properties?: vtctldata.IRestoreFromBackupRequest); - /** SourceShardAddRequest source_keyspace. */ - public source_keyspace: string; + /** RestoreFromBackupRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** SourceShardAddRequest source_shard. */ - public source_shard: string; + /** RestoreFromBackupRequest backup_time. */ + public backup_time?: (vttime.ITime|null); - /** SourceShardAddRequest key_range. */ - public key_range?: (topodata.IKeyRange|null); + /** RestoreFromBackupRequest restore_to_pos. */ + public restore_to_pos: string; - /** SourceShardAddRequest tables. */ - public tables: string[]; + /** RestoreFromBackupRequest dry_run. */ + public dry_run: boolean; /** - * Creates a new SourceShardAddRequest instance using the specified properties. + * Creates a new RestoreFromBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SourceShardAddRequest instance + * @returns RestoreFromBackupRequest instance */ - public static create(properties?: vtctldata.ISourceShardAddRequest): vtctldata.SourceShardAddRequest; + public static create(properties?: vtctldata.IRestoreFromBackupRequest): vtctldata.RestoreFromBackupRequest; /** - * Encodes the specified SourceShardAddRequest message. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. - * @param message SourceShardAddRequest message or plain object to encode + * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. + * @param message RestoreFromBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISourceShardAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceShardAddRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. - * @param message SourceShardAddRequest message or plain object to encode + * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. + * @param message RestoreFromBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISourceShardAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceShardAddRequest message from the specified reader or buffer. + * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceShardAddRequest + * @returns RestoreFromBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardAddRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RestoreFromBackupRequest; /** - * Decodes a SourceShardAddRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceShardAddRequest + * @returns RestoreFromBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardAddRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RestoreFromBackupRequest; /** - * Verifies a SourceShardAddRequest message. + * Verifies a RestoreFromBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SourceShardAddRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceShardAddRequest + * @returns RestoreFromBackupRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardAddRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RestoreFromBackupRequest; /** - * Creates a plain object from a SourceShardAddRequest message. Also converts values to other types if specified. - * @param message SourceShardAddRequest + * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. + * @param message RestoreFromBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SourceShardAddRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RestoreFromBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceShardAddRequest to JSON. + * Converts this RestoreFromBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SourceShardAddResponse. */ - interface ISourceShardAddResponse { + /** Properties of a RestoreFromBackupResponse. */ + interface IRestoreFromBackupResponse { - /** SourceShardAddResponse shard */ - shard?: (topodata.IShard|null); + /** RestoreFromBackupResponse tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** RestoreFromBackupResponse keyspace */ + keyspace?: (string|null); + + /** RestoreFromBackupResponse shard */ + shard?: (string|null); + + /** RestoreFromBackupResponse event */ + event?: (logutil.IEvent|null); } - /** Represents a SourceShardAddResponse. */ - class SourceShardAddResponse implements ISourceShardAddResponse { + /** Represents a RestoreFromBackupResponse. */ + class RestoreFromBackupResponse implements IRestoreFromBackupResponse { /** - * Constructs a new SourceShardAddResponse. + * Constructs a new RestoreFromBackupResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISourceShardAddResponse); + constructor(properties?: vtctldata.IRestoreFromBackupResponse); - /** SourceShardAddResponse shard. */ - public shard?: (topodata.IShard|null); + /** RestoreFromBackupResponse tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** RestoreFromBackupResponse keyspace. */ + public keyspace: string; + + /** RestoreFromBackupResponse shard. */ + public shard: string; + + /** RestoreFromBackupResponse event. */ + public event?: (logutil.IEvent|null); /** - * Creates a new SourceShardAddResponse instance using the specified properties. + * Creates a new RestoreFromBackupResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SourceShardAddResponse instance + * @returns RestoreFromBackupResponse instance */ - public static create(properties?: vtctldata.ISourceShardAddResponse): vtctldata.SourceShardAddResponse; + public static create(properties?: vtctldata.IRestoreFromBackupResponse): vtctldata.RestoreFromBackupResponse; /** - * Encodes the specified SourceShardAddResponse message. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. - * @param message SourceShardAddResponse message or plain object to encode + * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. + * @param message RestoreFromBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISourceShardAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceShardAddResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. - * @param message SourceShardAddResponse message or plain object to encode + * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. + * @param message RestoreFromBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISourceShardAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceShardAddResponse message from the specified reader or buffer. + * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceShardAddResponse + * @returns RestoreFromBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardAddResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RestoreFromBackupResponse; /** - * Decodes a SourceShardAddResponse message from the specified reader or buffer, length delimited. + * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceShardAddResponse + * @returns RestoreFromBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardAddResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RestoreFromBackupResponse; /** - * Verifies a SourceShardAddResponse message. + * Verifies a RestoreFromBackupResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SourceShardAddResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceShardAddResponse + * @returns RestoreFromBackupResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardAddResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RestoreFromBackupResponse; /** - * Creates a plain object from a SourceShardAddResponse message. Also converts values to other types if specified. - * @param message SourceShardAddResponse + * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. + * @param message RestoreFromBackupResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SourceShardAddResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RestoreFromBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceShardAddResponse to JSON. + * Converts this RestoreFromBackupResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SourceShardDeleteRequest. */ - interface ISourceShardDeleteRequest { - - /** SourceShardDeleteRequest keyspace */ - keyspace?: (string|null); - - /** SourceShardDeleteRequest shard */ - shard?: (string|null); + /** Properties of a RunHealthCheckRequest. */ + interface IRunHealthCheckRequest { - /** SourceShardDeleteRequest uid */ - uid?: (number|null); + /** RunHealthCheckRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a SourceShardDeleteRequest. */ - class SourceShardDeleteRequest implements ISourceShardDeleteRequest { + /** Represents a RunHealthCheckRequest. */ + class RunHealthCheckRequest implements IRunHealthCheckRequest { /** - * Constructs a new SourceShardDeleteRequest. + * Constructs a new RunHealthCheckRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISourceShardDeleteRequest); - - /** SourceShardDeleteRequest keyspace. */ - public keyspace: string; - - /** SourceShardDeleteRequest shard. */ - public shard: string; + constructor(properties?: vtctldata.IRunHealthCheckRequest); - /** SourceShardDeleteRequest uid. */ - public uid: number; + /** RunHealthCheckRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new SourceShardDeleteRequest instance using the specified properties. + * Creates a new RunHealthCheckRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SourceShardDeleteRequest instance + * @returns RunHealthCheckRequest instance */ - public static create(properties?: vtctldata.ISourceShardDeleteRequest): vtctldata.SourceShardDeleteRequest; + public static create(properties?: vtctldata.IRunHealthCheckRequest): vtctldata.RunHealthCheckRequest; /** - * Encodes the specified SourceShardDeleteRequest message. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. - * @param message SourceShardDeleteRequest message or plain object to encode + * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. + * @param message RunHealthCheckRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISourceShardDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceShardDeleteRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. - * @param message SourceShardDeleteRequest message or plain object to encode + * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. + * @param message RunHealthCheckRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISourceShardDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceShardDeleteRequest message from the specified reader or buffer. + * Decodes a RunHealthCheckRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceShardDeleteRequest + * @returns RunHealthCheckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardDeleteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RunHealthCheckRequest; /** - * Decodes a SourceShardDeleteRequest message from the specified reader or buffer, length delimited. + * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceShardDeleteRequest + * @returns RunHealthCheckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardDeleteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RunHealthCheckRequest; /** - * Verifies a SourceShardDeleteRequest message. + * Verifies a RunHealthCheckRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SourceShardDeleteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceShardDeleteRequest + * @returns RunHealthCheckRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardDeleteRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.RunHealthCheckRequest; /** - * Creates a plain object from a SourceShardDeleteRequest message. Also converts values to other types if specified. - * @param message SourceShardDeleteRequest + * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. + * @param message RunHealthCheckRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SourceShardDeleteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RunHealthCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceShardDeleteRequest to JSON. + * Converts this RunHealthCheckRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SourceShardDeleteResponse. */ - interface ISourceShardDeleteResponse { - - /** SourceShardDeleteResponse shard */ - shard?: (topodata.IShard|null); + /** Properties of a RunHealthCheckResponse. */ + interface IRunHealthCheckResponse { } - /** Represents a SourceShardDeleteResponse. */ - class SourceShardDeleteResponse implements ISourceShardDeleteResponse { + /** Represents a RunHealthCheckResponse. */ + class RunHealthCheckResponse implements IRunHealthCheckResponse { /** - * Constructs a new SourceShardDeleteResponse. + * Constructs a new RunHealthCheckResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ISourceShardDeleteResponse); - - /** SourceShardDeleteResponse shard. */ - public shard?: (topodata.IShard|null); + constructor(properties?: vtctldata.IRunHealthCheckResponse); /** - * Creates a new SourceShardDeleteResponse instance using the specified properties. + * Creates a new RunHealthCheckResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SourceShardDeleteResponse instance + * @returns RunHealthCheckResponse instance */ - public static create(properties?: vtctldata.ISourceShardDeleteResponse): vtctldata.SourceShardDeleteResponse; + public static create(properties?: vtctldata.IRunHealthCheckResponse): vtctldata.RunHealthCheckResponse; /** - * Encodes the specified SourceShardDeleteResponse message. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. - * @param message SourceShardDeleteResponse message or plain object to encode + * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. + * @param message RunHealthCheckResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ISourceShardDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceShardDeleteResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. - * @param message SourceShardDeleteResponse message or plain object to encode + * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. + * @param message RunHealthCheckResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ISourceShardDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceShardDeleteResponse message from the specified reader or buffer. + * Decodes a RunHealthCheckResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceShardDeleteResponse + * @returns RunHealthCheckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardDeleteResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RunHealthCheckResponse; /** - * Decodes a SourceShardDeleteResponse message from the specified reader or buffer, length delimited. + * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceShardDeleteResponse + * @returns RunHealthCheckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardDeleteResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RunHealthCheckResponse; /** - * Verifies a SourceShardDeleteResponse message. + * Verifies a RunHealthCheckResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SourceShardDeleteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceShardDeleteResponse + * @returns RunHealthCheckResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardDeleteResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.RunHealthCheckResponse; /** - * Creates a plain object from a SourceShardDeleteResponse message. Also converts values to other types if specified. - * @param message SourceShardDeleteResponse + * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. + * @param message RunHealthCheckResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.SourceShardDeleteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.RunHealthCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceShardDeleteResponse to JSON. + * Converts this RunHealthCheckResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StartReplicationRequest. */ - interface IStartReplicationRequest { + /** Properties of a SetKeyspaceDurabilityPolicyRequest. */ + interface ISetKeyspaceDurabilityPolicyRequest { - /** StartReplicationRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** SetKeyspaceDurabilityPolicyRequest keyspace */ + keyspace?: (string|null); + + /** SetKeyspaceDurabilityPolicyRequest durability_policy */ + durability_policy?: (string|null); } - /** Represents a StartReplicationRequest. */ - class StartReplicationRequest implements IStartReplicationRequest { + /** Represents a SetKeyspaceDurabilityPolicyRequest. */ + class SetKeyspaceDurabilityPolicyRequest implements ISetKeyspaceDurabilityPolicyRequest { /** - * Constructs a new StartReplicationRequest. + * Constructs a new SetKeyspaceDurabilityPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IStartReplicationRequest); + constructor(properties?: vtctldata.ISetKeyspaceDurabilityPolicyRequest); - /** StartReplicationRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** SetKeyspaceDurabilityPolicyRequest keyspace. */ + public keyspace: string; + + /** SetKeyspaceDurabilityPolicyRequest durability_policy. */ + public durability_policy: string; /** - * Creates a new StartReplicationRequest instance using the specified properties. + * Creates a new SetKeyspaceDurabilityPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StartReplicationRequest instance + * @returns SetKeyspaceDurabilityPolicyRequest instance */ - public static create(properties?: vtctldata.IStartReplicationRequest): vtctldata.StartReplicationRequest; + public static create(properties?: vtctldata.ISetKeyspaceDurabilityPolicyRequest): vtctldata.SetKeyspaceDurabilityPolicyRequest; /** - * Encodes the specified StartReplicationRequest message. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. - * @param message StartReplicationRequest message or plain object to encode + * Encodes the specified SetKeyspaceDurabilityPolicyRequest message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. + * @param message SetKeyspaceDurabilityPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceDurabilityPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. - * @param message StartReplicationRequest message or plain object to encode + * Encodes the specified SetKeyspaceDurabilityPolicyRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. + * @param message SetKeyspaceDurabilityPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceDurabilityPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartReplicationRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StartReplicationRequest + * @returns SetKeyspaceDurabilityPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StartReplicationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceDurabilityPolicyRequest; /** - * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartReplicationRequest + * @returns SetKeyspaceDurabilityPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StartReplicationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceDurabilityPolicyRequest; /** - * Verifies a StartReplicationRequest message. + * Verifies a SetKeyspaceDurabilityPolicyRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceDurabilityPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartReplicationRequest + * @returns SetKeyspaceDurabilityPolicyRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.StartReplicationRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceDurabilityPolicyRequest; /** - * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. - * @param message StartReplicationRequest + * Creates a plain object from a SetKeyspaceDurabilityPolicyRequest message. Also converts values to other types if specified. + * @param message SetKeyspaceDurabilityPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.StartReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceDurabilityPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartReplicationRequest to JSON. + * Converts this SetKeyspaceDurabilityPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StartReplicationResponse. */ - interface IStartReplicationResponse { + /** Properties of a SetKeyspaceDurabilityPolicyResponse. */ + interface ISetKeyspaceDurabilityPolicyResponse { + + /** SetKeyspaceDurabilityPolicyResponse keyspace */ + keyspace?: (topodata.IKeyspace|null); } - /** Represents a StartReplicationResponse. */ - class StartReplicationResponse implements IStartReplicationResponse { + /** Represents a SetKeyspaceDurabilityPolicyResponse. */ + class SetKeyspaceDurabilityPolicyResponse implements ISetKeyspaceDurabilityPolicyResponse { /** - * Constructs a new StartReplicationResponse. + * Constructs a new SetKeyspaceDurabilityPolicyResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IStartReplicationResponse); + constructor(properties?: vtctldata.ISetKeyspaceDurabilityPolicyResponse); + + /** SetKeyspaceDurabilityPolicyResponse keyspace. */ + public keyspace?: (topodata.IKeyspace|null); /** - * Creates a new StartReplicationResponse instance using the specified properties. + * Creates a new SetKeyspaceDurabilityPolicyResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StartReplicationResponse instance + * @returns SetKeyspaceDurabilityPolicyResponse instance */ - public static create(properties?: vtctldata.IStartReplicationResponse): vtctldata.StartReplicationResponse; + public static create(properties?: vtctldata.ISetKeyspaceDurabilityPolicyResponse): vtctldata.SetKeyspaceDurabilityPolicyResponse; /** - * Encodes the specified StartReplicationResponse message. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. - * @param message StartReplicationResponse message or plain object to encode + * Encodes the specified SetKeyspaceDurabilityPolicyResponse message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. + * @param message SetKeyspaceDurabilityPolicyResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceDurabilityPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. - * @param message StartReplicationResponse message or plain object to encode + * Encodes the specified SetKeyspaceDurabilityPolicyResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. + * @param message SetKeyspaceDurabilityPolicyResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceDurabilityPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartReplicationResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StartReplicationResponse + * @returns SetKeyspaceDurabilityPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StartReplicationResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceDurabilityPolicyResponse; /** - * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartReplicationResponse + * @returns SetKeyspaceDurabilityPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StartReplicationResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceDurabilityPolicyResponse; /** - * Verifies a StartReplicationResponse message. + * Verifies a SetKeyspaceDurabilityPolicyResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceDurabilityPolicyResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartReplicationResponse + * @returns SetKeyspaceDurabilityPolicyResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.StartReplicationResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceDurabilityPolicyResponse; /** - * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. - * @param message StartReplicationResponse + * Creates a plain object from a SetKeyspaceDurabilityPolicyResponse message. Also converts values to other types if specified. + * @param message SetKeyspaceDurabilityPolicyResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.StartReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceDurabilityPolicyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartReplicationResponse to JSON. + * Converts this SetKeyspaceDurabilityPolicyResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StopReplicationRequest. */ - interface IStopReplicationRequest { + /** Properties of a SetKeyspaceServedFromRequest. */ + interface ISetKeyspaceServedFromRequest { - /** StopReplicationRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); + /** SetKeyspaceServedFromRequest keyspace */ + keyspace?: (string|null); + + /** SetKeyspaceServedFromRequest tablet_type */ + tablet_type?: (topodata.TabletType|null); + + /** SetKeyspaceServedFromRequest cells */ + cells?: (string[]|null); + + /** SetKeyspaceServedFromRequest remove */ + remove?: (boolean|null); + + /** SetKeyspaceServedFromRequest source_keyspace */ + source_keyspace?: (string|null); } - /** Represents a StopReplicationRequest. */ - class StopReplicationRequest implements IStopReplicationRequest { + /** Represents a SetKeyspaceServedFromRequest. */ + class SetKeyspaceServedFromRequest implements ISetKeyspaceServedFromRequest { /** - * Constructs a new StopReplicationRequest. + * Constructs a new SetKeyspaceServedFromRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IStopReplicationRequest); + constructor(properties?: vtctldata.ISetKeyspaceServedFromRequest); - /** StopReplicationRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); + /** SetKeyspaceServedFromRequest keyspace. */ + public keyspace: string; + + /** SetKeyspaceServedFromRequest tablet_type. */ + public tablet_type: topodata.TabletType; + + /** SetKeyspaceServedFromRequest cells. */ + public cells: string[]; + + /** SetKeyspaceServedFromRequest remove. */ + public remove: boolean; + + /** SetKeyspaceServedFromRequest source_keyspace. */ + public source_keyspace: string; /** - * Creates a new StopReplicationRequest instance using the specified properties. + * Creates a new SetKeyspaceServedFromRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StopReplicationRequest instance + * @returns SetKeyspaceServedFromRequest instance */ - public static create(properties?: vtctldata.IStopReplicationRequest): vtctldata.StopReplicationRequest; + public static create(properties?: vtctldata.ISetKeyspaceServedFromRequest): vtctldata.SetKeyspaceServedFromRequest; /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode + * Encodes the specified SetKeyspaceServedFromRequest message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. + * @param message SetKeyspaceServedFromRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceServedFromRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode + * Encodes the specified SetKeyspaceServedFromRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. + * @param message SetKeyspaceServedFromRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceServedFromRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StopReplicationRequest + * @returns SetKeyspaceServedFromRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StopReplicationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceServedFromRequest; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopReplicationRequest + * @returns SetKeyspaceServedFromRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StopReplicationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceServedFromRequest; /** - * Verifies a StopReplicationRequest message. + * Verifies a SetKeyspaceServedFromRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceServedFromRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopReplicationRequest + * @returns SetKeyspaceServedFromRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.StopReplicationRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceServedFromRequest; /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. - * @param message StopReplicationRequest + * Creates a plain object from a SetKeyspaceServedFromRequest message. Also converts values to other types if specified. + * @param message SetKeyspaceServedFromRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceServedFromRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopReplicationRequest to JSON. + * Converts this SetKeyspaceServedFromRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StopReplicationResponse. */ - interface IStopReplicationResponse { + /** Properties of a SetKeyspaceServedFromResponse. */ + interface ISetKeyspaceServedFromResponse { + + /** SetKeyspaceServedFromResponse keyspace */ + keyspace?: (topodata.IKeyspace|null); } - /** Represents a StopReplicationResponse. */ - class StopReplicationResponse implements IStopReplicationResponse { + /** Represents a SetKeyspaceServedFromResponse. */ + class SetKeyspaceServedFromResponse implements ISetKeyspaceServedFromResponse { /** - * Constructs a new StopReplicationResponse. + * Constructs a new SetKeyspaceServedFromResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IStopReplicationResponse); + constructor(properties?: vtctldata.ISetKeyspaceServedFromResponse); + + /** SetKeyspaceServedFromResponse keyspace. */ + public keyspace?: (topodata.IKeyspace|null); /** - * Creates a new StopReplicationResponse instance using the specified properties. + * Creates a new SetKeyspaceServedFromResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StopReplicationResponse instance + * @returns SetKeyspaceServedFromResponse instance */ - public static create(properties?: vtctldata.IStopReplicationResponse): vtctldata.StopReplicationResponse; + public static create(properties?: vtctldata.ISetKeyspaceServedFromResponse): vtctldata.SetKeyspaceServedFromResponse; /** - * Encodes the specified StopReplicationResponse message. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. - * @param message StopReplicationResponse message or plain object to encode + * Encodes the specified SetKeyspaceServedFromResponse message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. + * @param message SetKeyspaceServedFromResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceServedFromResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. - * @param message StopReplicationResponse message or plain object to encode + * Encodes the specified SetKeyspaceServedFromResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. + * @param message SetKeyspaceServedFromResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceServedFromResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopReplicationResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StopReplicationResponse + * @returns SetKeyspaceServedFromResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StopReplicationResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceServedFromResponse; /** - * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopReplicationResponse + * @returns SetKeyspaceServedFromResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StopReplicationResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceServedFromResponse; /** - * Verifies a StopReplicationResponse message. + * Verifies a SetKeyspaceServedFromResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceServedFromResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopReplicationResponse + * @returns SetKeyspaceServedFromResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.StopReplicationResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceServedFromResponse; /** - * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. - * @param message StopReplicationResponse + * Creates a plain object from a SetKeyspaceServedFromResponse message. Also converts values to other types if specified. + * @param message SetKeyspaceServedFromResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.StopReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceServedFromResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopReplicationResponse to JSON. + * Converts this SetKeyspaceServedFromResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TabletExternallyReparentedRequest. */ - interface ITabletExternallyReparentedRequest { + /** Properties of a SetKeyspaceShardingInfoRequest. */ + interface ISetKeyspaceShardingInfoRequest { - /** TabletExternallyReparentedRequest tablet */ - tablet?: (topodata.ITabletAlias|null); + /** SetKeyspaceShardingInfoRequest keyspace */ + keyspace?: (string|null); + + /** SetKeyspaceShardingInfoRequest force */ + force?: (boolean|null); } - /** Represents a TabletExternallyReparentedRequest. */ - class TabletExternallyReparentedRequest implements ITabletExternallyReparentedRequest { + /** Represents a SetKeyspaceShardingInfoRequest. */ + class SetKeyspaceShardingInfoRequest implements ISetKeyspaceShardingInfoRequest { /** - * Constructs a new TabletExternallyReparentedRequest. + * Constructs a new SetKeyspaceShardingInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ITabletExternallyReparentedRequest); + constructor(properties?: vtctldata.ISetKeyspaceShardingInfoRequest); - /** TabletExternallyReparentedRequest tablet. */ - public tablet?: (topodata.ITabletAlias|null); + /** SetKeyspaceShardingInfoRequest keyspace. */ + public keyspace: string; + + /** SetKeyspaceShardingInfoRequest force. */ + public force: boolean; /** - * Creates a new TabletExternallyReparentedRequest instance using the specified properties. + * Creates a new SetKeyspaceShardingInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TabletExternallyReparentedRequest instance + * @returns SetKeyspaceShardingInfoRequest instance */ - public static create(properties?: vtctldata.ITabletExternallyReparentedRequest): vtctldata.TabletExternallyReparentedRequest; + public static create(properties?: vtctldata.ISetKeyspaceShardingInfoRequest): vtctldata.SetKeyspaceShardingInfoRequest; /** - * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @param message TabletExternallyReparentedRequest message or plain object to encode + * Encodes the specified SetKeyspaceShardingInfoRequest message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. + * @param message SetKeyspaceShardingInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceShardingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @param message TabletExternallyReparentedRequest message or plain object to encode + * Encodes the specified SetKeyspaceShardingInfoRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. + * @param message SetKeyspaceShardingInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceShardingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TabletExternallyReparentedRequest + * @returns SetKeyspaceShardingInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceShardingInfoRequest; /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TabletExternallyReparentedRequest + * @returns SetKeyspaceShardingInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceShardingInfoRequest; /** - * Verifies a TabletExternallyReparentedRequest message. + * Verifies a SetKeyspaceShardingInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceShardingInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TabletExternallyReparentedRequest + * @returns SetKeyspaceShardingInfoRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceShardingInfoRequest; /** - * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. - * @param message TabletExternallyReparentedRequest + * Creates a plain object from a SetKeyspaceShardingInfoRequest message. Also converts values to other types if specified. + * @param message SetKeyspaceShardingInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.TabletExternallyReparentedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceShardingInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TabletExternallyReparentedRequest to JSON. + * Converts this SetKeyspaceShardingInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TabletExternallyReparentedResponse. */ - interface ITabletExternallyReparentedResponse { - - /** TabletExternallyReparentedResponse keyspace */ - keyspace?: (string|null); - - /** TabletExternallyReparentedResponse shard */ - shard?: (string|null); - - /** TabletExternallyReparentedResponse new_primary */ - new_primary?: (topodata.ITabletAlias|null); + /** Properties of a SetKeyspaceShardingInfoResponse. */ + interface ISetKeyspaceShardingInfoResponse { - /** TabletExternallyReparentedResponse old_primary */ - old_primary?: (topodata.ITabletAlias|null); + /** SetKeyspaceShardingInfoResponse keyspace */ + keyspace?: (topodata.IKeyspace|null); } - /** Represents a TabletExternallyReparentedResponse. */ - class TabletExternallyReparentedResponse implements ITabletExternallyReparentedResponse { + /** Represents a SetKeyspaceShardingInfoResponse. */ + class SetKeyspaceShardingInfoResponse implements ISetKeyspaceShardingInfoResponse { /** - * Constructs a new TabletExternallyReparentedResponse. + * Constructs a new SetKeyspaceShardingInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.ITabletExternallyReparentedResponse); - - /** TabletExternallyReparentedResponse keyspace. */ - public keyspace: string; - - /** TabletExternallyReparentedResponse shard. */ - public shard: string; - - /** TabletExternallyReparentedResponse new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); + constructor(properties?: vtctldata.ISetKeyspaceShardingInfoResponse); - /** TabletExternallyReparentedResponse old_primary. */ - public old_primary?: (topodata.ITabletAlias|null); + /** SetKeyspaceShardingInfoResponse keyspace. */ + public keyspace?: (topodata.IKeyspace|null); /** - * Creates a new TabletExternallyReparentedResponse instance using the specified properties. + * Creates a new SetKeyspaceShardingInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TabletExternallyReparentedResponse instance + * @returns SetKeyspaceShardingInfoResponse instance */ - public static create(properties?: vtctldata.ITabletExternallyReparentedResponse): vtctldata.TabletExternallyReparentedResponse; + public static create(properties?: vtctldata.ISetKeyspaceShardingInfoResponse): vtctldata.SetKeyspaceShardingInfoResponse; /** - * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @param message TabletExternallyReparentedResponse message or plain object to encode + * Encodes the specified SetKeyspaceShardingInfoResponse message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. + * @param message SetKeyspaceShardingInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetKeyspaceShardingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @param message TabletExternallyReparentedResponse message or plain object to encode + * Encodes the specified SetKeyspaceShardingInfoResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. + * @param message SetKeyspaceShardingInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetKeyspaceShardingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TabletExternallyReparentedResponse + * @returns SetKeyspaceShardingInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetKeyspaceShardingInfoResponse; /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TabletExternallyReparentedResponse + * @returns SetKeyspaceShardingInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetKeyspaceShardingInfoResponse; /** - * Verifies a TabletExternallyReparentedResponse message. + * Verifies a SetKeyspaceShardingInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceShardingInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TabletExternallyReparentedResponse + * @returns SetKeyspaceShardingInfoResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetKeyspaceShardingInfoResponse; /** - * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. - * @param message TabletExternallyReparentedResponse + * Creates a plain object from a SetKeyspaceShardingInfoResponse message. Also converts values to other types if specified. + * @param message SetKeyspaceShardingInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.TabletExternallyReparentedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetKeyspaceShardingInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TabletExternallyReparentedResponse to JSON. + * Converts this SetKeyspaceShardingInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateCellInfoRequest. */ - interface IUpdateCellInfoRequest { + /** Properties of a SetShardIsPrimaryServingRequest. */ + interface ISetShardIsPrimaryServingRequest { - /** UpdateCellInfoRequest name */ - name?: (string|null); + /** SetShardIsPrimaryServingRequest keyspace */ + keyspace?: (string|null); - /** UpdateCellInfoRequest cell_info */ - cell_info?: (topodata.ICellInfo|null); + /** SetShardIsPrimaryServingRequest shard */ + shard?: (string|null); + + /** SetShardIsPrimaryServingRequest is_serving */ + is_serving?: (boolean|null); } - /** Represents an UpdateCellInfoRequest. */ - class UpdateCellInfoRequest implements IUpdateCellInfoRequest { + /** Represents a SetShardIsPrimaryServingRequest. */ + class SetShardIsPrimaryServingRequest implements ISetShardIsPrimaryServingRequest { /** - * Constructs a new UpdateCellInfoRequest. + * Constructs a new SetShardIsPrimaryServingRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateCellInfoRequest); + constructor(properties?: vtctldata.ISetShardIsPrimaryServingRequest); - /** UpdateCellInfoRequest name. */ - public name: string; + /** SetShardIsPrimaryServingRequest keyspace. */ + public keyspace: string; - /** UpdateCellInfoRequest cell_info. */ - public cell_info?: (topodata.ICellInfo|null); + /** SetShardIsPrimaryServingRequest shard. */ + public shard: string; + + /** SetShardIsPrimaryServingRequest is_serving. */ + public is_serving: boolean; /** - * Creates a new UpdateCellInfoRequest instance using the specified properties. + * Creates a new SetShardIsPrimaryServingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCellInfoRequest instance + * @returns SetShardIsPrimaryServingRequest instance */ - public static create(properties?: vtctldata.IUpdateCellInfoRequest): vtctldata.UpdateCellInfoRequest; + public static create(properties?: vtctldata.ISetShardIsPrimaryServingRequest): vtctldata.SetShardIsPrimaryServingRequest; /** - * Encodes the specified UpdateCellInfoRequest message. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. - * @param message UpdateCellInfoRequest message or plain object to encode + * Encodes the specified SetShardIsPrimaryServingRequest message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. + * @param message SetShardIsPrimaryServingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetShardIsPrimaryServingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. - * @param message UpdateCellInfoRequest message or plain object to encode + * Encodes the specified SetShardIsPrimaryServingRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. + * @param message SetShardIsPrimaryServingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetShardIsPrimaryServingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCellInfoRequest message from the specified reader or buffer. + * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCellInfoRequest + * @returns SetShardIsPrimaryServingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellInfoRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardIsPrimaryServingRequest; /** - * Decodes an UpdateCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCellInfoRequest + * @returns SetShardIsPrimaryServingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellInfoRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardIsPrimaryServingRequest; /** - * Verifies an UpdateCellInfoRequest message. + * Verifies a SetShardIsPrimaryServingRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardIsPrimaryServingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCellInfoRequest + * @returns SetShardIsPrimaryServingRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellInfoRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetShardIsPrimaryServingRequest; /** - * Creates a plain object from an UpdateCellInfoRequest message. Also converts values to other types if specified. - * @param message UpdateCellInfoRequest + * Creates a plain object from a SetShardIsPrimaryServingRequest message. Also converts values to other types if specified. + * @param message SetShardIsPrimaryServingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetShardIsPrimaryServingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCellInfoRequest to JSON. + * Converts this SetShardIsPrimaryServingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateCellInfoResponse. */ - interface IUpdateCellInfoResponse { - - /** UpdateCellInfoResponse name */ - name?: (string|null); + /** Properties of a SetShardIsPrimaryServingResponse. */ + interface ISetShardIsPrimaryServingResponse { - /** UpdateCellInfoResponse cell_info */ - cell_info?: (topodata.ICellInfo|null); + /** SetShardIsPrimaryServingResponse shard */ + shard?: (topodata.IShard|null); } - /** Represents an UpdateCellInfoResponse. */ - class UpdateCellInfoResponse implements IUpdateCellInfoResponse { + /** Represents a SetShardIsPrimaryServingResponse. */ + class SetShardIsPrimaryServingResponse implements ISetShardIsPrimaryServingResponse { /** - * Constructs a new UpdateCellInfoResponse. + * Constructs a new SetShardIsPrimaryServingResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateCellInfoResponse); - - /** UpdateCellInfoResponse name. */ - public name: string; + constructor(properties?: vtctldata.ISetShardIsPrimaryServingResponse); - /** UpdateCellInfoResponse cell_info. */ - public cell_info?: (topodata.ICellInfo|null); + /** SetShardIsPrimaryServingResponse shard. */ + public shard?: (topodata.IShard|null); /** - * Creates a new UpdateCellInfoResponse instance using the specified properties. + * Creates a new SetShardIsPrimaryServingResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCellInfoResponse instance + * @returns SetShardIsPrimaryServingResponse instance */ - public static create(properties?: vtctldata.IUpdateCellInfoResponse): vtctldata.UpdateCellInfoResponse; + public static create(properties?: vtctldata.ISetShardIsPrimaryServingResponse): vtctldata.SetShardIsPrimaryServingResponse; /** - * Encodes the specified UpdateCellInfoResponse message. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. - * @param message UpdateCellInfoResponse message or plain object to encode + * Encodes the specified SetShardIsPrimaryServingResponse message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. + * @param message SetShardIsPrimaryServingResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetShardIsPrimaryServingResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. - * @param message UpdateCellInfoResponse message or plain object to encode + * Encodes the specified SetShardIsPrimaryServingResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. + * @param message SetShardIsPrimaryServingResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetShardIsPrimaryServingResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCellInfoResponse message from the specified reader or buffer. + * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCellInfoResponse + * @returns SetShardIsPrimaryServingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellInfoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardIsPrimaryServingResponse; /** - * Decodes an UpdateCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCellInfoResponse + * @returns SetShardIsPrimaryServingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellInfoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardIsPrimaryServingResponse; /** - * Verifies an UpdateCellInfoResponse message. + * Verifies a SetShardIsPrimaryServingResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardIsPrimaryServingResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCellInfoResponse + * @returns SetShardIsPrimaryServingResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellInfoResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetShardIsPrimaryServingResponse; /** - * Creates a plain object from an UpdateCellInfoResponse message. Also converts values to other types if specified. - * @param message UpdateCellInfoResponse + * Creates a plain object from a SetShardIsPrimaryServingResponse message. Also converts values to other types if specified. + * @param message SetShardIsPrimaryServingResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetShardIsPrimaryServingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCellInfoResponse to JSON. + * Converts this SetShardIsPrimaryServingResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateCellsAliasRequest. */ - interface IUpdateCellsAliasRequest { + /** Properties of a SetShardTabletControlRequest. */ + interface ISetShardTabletControlRequest { - /** UpdateCellsAliasRequest name */ - name?: (string|null); + /** SetShardTabletControlRequest keyspace */ + keyspace?: (string|null); - /** UpdateCellsAliasRequest cells_alias */ - cells_alias?: (topodata.ICellsAlias|null); + /** SetShardTabletControlRequest shard */ + shard?: (string|null); + + /** SetShardTabletControlRequest tablet_type */ + tablet_type?: (topodata.TabletType|null); + + /** SetShardTabletControlRequest cells */ + cells?: (string[]|null); + + /** SetShardTabletControlRequest denied_tables */ + denied_tables?: (string[]|null); + + /** SetShardTabletControlRequest disable_query_service */ + disable_query_service?: (boolean|null); + + /** SetShardTabletControlRequest remove */ + remove?: (boolean|null); } - /** Represents an UpdateCellsAliasRequest. */ - class UpdateCellsAliasRequest implements IUpdateCellsAliasRequest { + /** Represents a SetShardTabletControlRequest. */ + class SetShardTabletControlRequest implements ISetShardTabletControlRequest { /** - * Constructs a new UpdateCellsAliasRequest. + * Constructs a new SetShardTabletControlRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateCellsAliasRequest); + constructor(properties?: vtctldata.ISetShardTabletControlRequest); - /** UpdateCellsAliasRequest name. */ - public name: string; + /** SetShardTabletControlRequest keyspace. */ + public keyspace: string; - /** UpdateCellsAliasRequest cells_alias. */ - public cells_alias?: (topodata.ICellsAlias|null); + /** SetShardTabletControlRequest shard. */ + public shard: string; + + /** SetShardTabletControlRequest tablet_type. */ + public tablet_type: topodata.TabletType; + + /** SetShardTabletControlRequest cells. */ + public cells: string[]; + + /** SetShardTabletControlRequest denied_tables. */ + public denied_tables: string[]; + + /** SetShardTabletControlRequest disable_query_service. */ + public disable_query_service: boolean; + + /** SetShardTabletControlRequest remove. */ + public remove: boolean; /** - * Creates a new UpdateCellsAliasRequest instance using the specified properties. + * Creates a new SetShardTabletControlRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCellsAliasRequest instance + * @returns SetShardTabletControlRequest instance */ - public static create(properties?: vtctldata.IUpdateCellsAliasRequest): vtctldata.UpdateCellsAliasRequest; + public static create(properties?: vtctldata.ISetShardTabletControlRequest): vtctldata.SetShardTabletControlRequest; /** - * Encodes the specified UpdateCellsAliasRequest message. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. - * @param message UpdateCellsAliasRequest message or plain object to encode + * Encodes the specified SetShardTabletControlRequest message. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. + * @param message SetShardTabletControlRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetShardTabletControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. - * @param message UpdateCellsAliasRequest message or plain object to encode + * Encodes the specified SetShardTabletControlRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. + * @param message SetShardTabletControlRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetShardTabletControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer. + * Decodes a SetShardTabletControlRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCellsAliasRequest + * @returns SetShardTabletControlRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellsAliasRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardTabletControlRequest; /** - * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a SetShardTabletControlRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCellsAliasRequest + * @returns SetShardTabletControlRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellsAliasRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardTabletControlRequest; /** - * Verifies an UpdateCellsAliasRequest message. + * Verifies a SetShardTabletControlRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardTabletControlRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCellsAliasRequest + * @returns SetShardTabletControlRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellsAliasRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetShardTabletControlRequest; /** - * Creates a plain object from an UpdateCellsAliasRequest message. Also converts values to other types if specified. - * @param message UpdateCellsAliasRequest + * Creates a plain object from a SetShardTabletControlRequest message. Also converts values to other types if specified. + * @param message SetShardTabletControlRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetShardTabletControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCellsAliasRequest to JSON. + * Converts this SetShardTabletControlRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateCellsAliasResponse. */ - interface IUpdateCellsAliasResponse { - - /** UpdateCellsAliasResponse name */ - name?: (string|null); + /** Properties of a SetShardTabletControlResponse. */ + interface ISetShardTabletControlResponse { - /** UpdateCellsAliasResponse cells_alias */ - cells_alias?: (topodata.ICellsAlias|null); + /** SetShardTabletControlResponse shard */ + shard?: (topodata.IShard|null); } - /** Represents an UpdateCellsAliasResponse. */ - class UpdateCellsAliasResponse implements IUpdateCellsAliasResponse { + /** Represents a SetShardTabletControlResponse. */ + class SetShardTabletControlResponse implements ISetShardTabletControlResponse { /** - * Constructs a new UpdateCellsAliasResponse. + * Constructs a new SetShardTabletControlResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IUpdateCellsAliasResponse); - - /** UpdateCellsAliasResponse name. */ - public name: string; + constructor(properties?: vtctldata.ISetShardTabletControlResponse); - /** UpdateCellsAliasResponse cells_alias. */ - public cells_alias?: (topodata.ICellsAlias|null); + /** SetShardTabletControlResponse shard. */ + public shard?: (topodata.IShard|null); /** - * Creates a new UpdateCellsAliasResponse instance using the specified properties. + * Creates a new SetShardTabletControlResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCellsAliasResponse instance + * @returns SetShardTabletControlResponse instance */ - public static create(properties?: vtctldata.IUpdateCellsAliasResponse): vtctldata.UpdateCellsAliasResponse; + public static create(properties?: vtctldata.ISetShardTabletControlResponse): vtctldata.SetShardTabletControlResponse; /** - * Encodes the specified UpdateCellsAliasResponse message. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. - * @param message UpdateCellsAliasResponse message or plain object to encode + * Encodes the specified SetShardTabletControlResponse message. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. + * @param message SetShardTabletControlResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IUpdateCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetShardTabletControlResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. - * @param message UpdateCellsAliasResponse message or plain object to encode + * Encodes the specified SetShardTabletControlResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. + * @param message SetShardTabletControlResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IUpdateCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetShardTabletControlResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer. + * Decodes a SetShardTabletControlResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCellsAliasResponse + * @returns SetShardTabletControlResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellsAliasResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetShardTabletControlResponse; /** - * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer, length delimited. + * Decodes a SetShardTabletControlResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCellsAliasResponse + * @returns SetShardTabletControlResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellsAliasResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetShardTabletControlResponse; /** - * Verifies an UpdateCellsAliasResponse message. + * Verifies a SetShardTabletControlResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateCellsAliasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardTabletControlResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCellsAliasResponse + * @returns SetShardTabletControlResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellsAliasResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetShardTabletControlResponse; /** - * Creates a plain object from an UpdateCellsAliasResponse message. Also converts values to other types if specified. - * @param message UpdateCellsAliasResponse + * Creates a plain object from a SetShardTabletControlResponse message. Also converts values to other types if specified. + * @param message SetShardTabletControlResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.UpdateCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetShardTabletControlResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCellsAliasResponse to JSON. + * Converts this SetShardTabletControlResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateRequest. */ - interface IValidateRequest { + /** Properties of a SetWritableRequest. */ + interface ISetWritableRequest { - /** ValidateRequest ping_tablets */ - ping_tablets?: (boolean|null); + /** SetWritableRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); + + /** SetWritableRequest writable */ + writable?: (boolean|null); } - /** Represents a ValidateRequest. */ - class ValidateRequest implements IValidateRequest { + /** Represents a SetWritableRequest. */ + class SetWritableRequest implements ISetWritableRequest { /** - * Constructs a new ValidateRequest. + * Constructs a new SetWritableRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateRequest); + constructor(properties?: vtctldata.ISetWritableRequest); - /** ValidateRequest ping_tablets. */ - public ping_tablets: boolean; + /** SetWritableRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + + /** SetWritableRequest writable. */ + public writable: boolean; /** - * Creates a new ValidateRequest instance using the specified properties. + * Creates a new SetWritableRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateRequest instance + * @returns SetWritableRequest instance */ - public static create(properties?: vtctldata.IValidateRequest): vtctldata.ValidateRequest; + public static create(properties?: vtctldata.ISetWritableRequest): vtctldata.SetWritableRequest; /** - * Encodes the specified ValidateRequest message. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. - * @param message ValidateRequest message or plain object to encode + * Encodes the specified SetWritableRequest message. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. + * @param message SetWritableRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetWritableRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. - * @param message ValidateRequest message or plain object to encode + * Encodes the specified SetWritableRequest message, length delimited. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. + * @param message SetWritableRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetWritableRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateRequest message from the specified reader or buffer. + * Decodes a SetWritableRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateRequest + * @returns SetWritableRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetWritableRequest; /** - * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. + * Decodes a SetWritableRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateRequest + * @returns SetWritableRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetWritableRequest; /** - * Verifies a ValidateRequest message. + * Verifies a SetWritableRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetWritableRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateRequest + * @returns SetWritableRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SetWritableRequest; /** - * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. - * @param message ValidateRequest + * Creates a plain object from a SetWritableRequest message. Also converts values to other types if specified. + * @param message SetWritableRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetWritableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateRequest to JSON. + * Converts this SetWritableRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateResponse. */ - interface IValidateResponse { - - /** ValidateResponse results */ - results?: (string[]|null); - - /** ValidateResponse results_by_keyspace */ - results_by_keyspace?: ({ [k: string]: vtctldata.IValidateKeyspaceResponse }|null); + /** Properties of a SetWritableResponse. */ + interface ISetWritableResponse { } - /** Represents a ValidateResponse. */ - class ValidateResponse implements IValidateResponse { + /** Represents a SetWritableResponse. */ + class SetWritableResponse implements ISetWritableResponse { /** - * Constructs a new ValidateResponse. + * Constructs a new SetWritableResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateResponse); - - /** ValidateResponse results. */ - public results: string[]; - - /** ValidateResponse results_by_keyspace. */ - public results_by_keyspace: { [k: string]: vtctldata.IValidateKeyspaceResponse }; + constructor(properties?: vtctldata.ISetWritableResponse); /** - * Creates a new ValidateResponse instance using the specified properties. + * Creates a new SetWritableResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateResponse instance + * @returns SetWritableResponse instance */ - public static create(properties?: vtctldata.IValidateResponse): vtctldata.ValidateResponse; + public static create(properties?: vtctldata.ISetWritableResponse): vtctldata.SetWritableResponse; /** - * Encodes the specified ValidateResponse message. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. - * @param message ValidateResponse message or plain object to encode + * Encodes the specified SetWritableResponse message. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. + * @param message SetWritableResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISetWritableResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. - * @param message ValidateResponse message or plain object to encode + * Encodes the specified SetWritableResponse message, length delimited. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. + * @param message SetWritableResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISetWritableResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateResponse message from the specified reader or buffer. + * Decodes a SetWritableResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateResponse + * @returns SetWritableResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SetWritableResponse; /** - * Decodes a ValidateResponse message from the specified reader or buffer, length delimited. + * Decodes a SetWritableResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateResponse + * @returns SetWritableResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SetWritableResponse; /** - * Verifies a ValidateResponse message. + * Verifies a SetWritableResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetWritableResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateResponse + * @returns SetWritableResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SetWritableResponse; /** - * Creates a plain object from a ValidateResponse message. Also converts values to other types if specified. - * @param message ValidateResponse + * Creates a plain object from a SetWritableResponse message. Also converts values to other types if specified. + * @param message SetWritableResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SetWritableResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateResponse to JSON. + * Converts this SetWritableResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateKeyspaceRequest. */ - interface IValidateKeyspaceRequest { + /** Properties of a ShardReplicationAddRequest. */ + interface IShardReplicationAddRequest { - /** ValidateKeyspaceRequest keyspace */ + /** ShardReplicationAddRequest keyspace */ keyspace?: (string|null); - /** ValidateKeyspaceRequest ping_tablets */ - ping_tablets?: (boolean|null); + /** ShardReplicationAddRequest shard */ + shard?: (string|null); + + /** ShardReplicationAddRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a ValidateKeyspaceRequest. */ - class ValidateKeyspaceRequest implements IValidateKeyspaceRequest { + /** Represents a ShardReplicationAddRequest. */ + class ShardReplicationAddRequest implements IShardReplicationAddRequest { /** - * Constructs a new ValidateKeyspaceRequest. + * Constructs a new ShardReplicationAddRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateKeyspaceRequest); + constructor(properties?: vtctldata.IShardReplicationAddRequest); - /** ValidateKeyspaceRequest keyspace. */ + /** ShardReplicationAddRequest keyspace. */ public keyspace: string; - /** ValidateKeyspaceRequest ping_tablets. */ - public ping_tablets: boolean; + /** ShardReplicationAddRequest shard. */ + public shard: string; + + /** ShardReplicationAddRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new ValidateKeyspaceRequest instance using the specified properties. + * Creates a new ShardReplicationAddRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateKeyspaceRequest instance + * @returns ShardReplicationAddRequest instance */ - public static create(properties?: vtctldata.IValidateKeyspaceRequest): vtctldata.ValidateKeyspaceRequest; + public static create(properties?: vtctldata.IShardReplicationAddRequest): vtctldata.ShardReplicationAddRequest; /** - * Encodes the specified ValidateKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. - * @param message ValidateKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationAddRequest message. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. + * @param message ShardReplicationAddRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. - * @param message ValidateKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationAddRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. + * @param message ShardReplicationAddRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer. + * Decodes a ShardReplicationAddRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateKeyspaceRequest + * @returns ShardReplicationAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationAddRequest; /** - * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationAddRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateKeyspaceRequest + * @returns ShardReplicationAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationAddRequest; /** - * Verifies a ValidateKeyspaceRequest message. + * Verifies a ShardReplicationAddRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationAddRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateKeyspaceRequest + * @returns ShardReplicationAddRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationAddRequest; /** - * Creates a plain object from a ValidateKeyspaceRequest message. Also converts values to other types if specified. - * @param message ValidateKeyspaceRequest + * Creates a plain object from a ShardReplicationAddRequest message. Also converts values to other types if specified. + * @param message ShardReplicationAddRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationAddRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateKeyspaceRequest to JSON. + * Converts this ShardReplicationAddRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateKeyspaceResponse. */ - interface IValidateKeyspaceResponse { - - /** ValidateKeyspaceResponse results */ - results?: (string[]|null); - - /** ValidateKeyspaceResponse results_by_shard */ - results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); + /** Properties of a ShardReplicationAddResponse. */ + interface IShardReplicationAddResponse { } - /** Represents a ValidateKeyspaceResponse. */ - class ValidateKeyspaceResponse implements IValidateKeyspaceResponse { + /** Represents a ShardReplicationAddResponse. */ + class ShardReplicationAddResponse implements IShardReplicationAddResponse { /** - * Constructs a new ValidateKeyspaceResponse. + * Constructs a new ShardReplicationAddResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateKeyspaceResponse); - - /** ValidateKeyspaceResponse results. */ - public results: string[]; - - /** ValidateKeyspaceResponse results_by_shard. */ - public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; + constructor(properties?: vtctldata.IShardReplicationAddResponse); /** - * Creates a new ValidateKeyspaceResponse instance using the specified properties. + * Creates a new ShardReplicationAddResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateKeyspaceResponse instance + * @returns ShardReplicationAddResponse instance */ - public static create(properties?: vtctldata.IValidateKeyspaceResponse): vtctldata.ValidateKeyspaceResponse; + public static create(properties?: vtctldata.IShardReplicationAddResponse): vtctldata.ShardReplicationAddResponse; /** - * Encodes the specified ValidateKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. - * @param message ValidateKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationAddResponse message. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. + * @param message ShardReplicationAddResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. - * @param message ValidateKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationAddResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. + * @param message ShardReplicationAddResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer. + * Decodes a ShardReplicationAddResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateKeyspaceResponse + * @returns ShardReplicationAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationAddResponse; /** - * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationAddResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateKeyspaceResponse + * @returns ShardReplicationAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationAddResponse; /** - * Verifies a ValidateKeyspaceResponse message. + * Verifies a ShardReplicationAddResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationAddResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateKeyspaceResponse + * @returns ShardReplicationAddResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationAddResponse; /** - * Creates a plain object from a ValidateKeyspaceResponse message. Also converts values to other types if specified. - * @param message ValidateKeyspaceResponse + * Creates a plain object from a ShardReplicationAddResponse message. Also converts values to other types if specified. + * @param message ShardReplicationAddResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationAddResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateKeyspaceResponse to JSON. + * Converts this ShardReplicationAddResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateSchemaKeyspaceRequest. */ - interface IValidateSchemaKeyspaceRequest { + /** Properties of a ShardReplicationFixRequest. */ + interface IShardReplicationFixRequest { - /** ValidateSchemaKeyspaceRequest keyspace */ + /** ShardReplicationFixRequest keyspace */ keyspace?: (string|null); - /** ValidateSchemaKeyspaceRequest exclude_tables */ - exclude_tables?: (string[]|null); - - /** ValidateSchemaKeyspaceRequest include_views */ - include_views?: (boolean|null); - - /** ValidateSchemaKeyspaceRequest skip_no_primary */ - skip_no_primary?: (boolean|null); + /** ShardReplicationFixRequest shard */ + shard?: (string|null); - /** ValidateSchemaKeyspaceRequest include_vschema */ - include_vschema?: (boolean|null); + /** ShardReplicationFixRequest cell */ + cell?: (string|null); } - /** Represents a ValidateSchemaKeyspaceRequest. */ - class ValidateSchemaKeyspaceRequest implements IValidateSchemaKeyspaceRequest { + /** Represents a ShardReplicationFixRequest. */ + class ShardReplicationFixRequest implements IShardReplicationFixRequest { /** - * Constructs a new ValidateSchemaKeyspaceRequest. + * Constructs a new ShardReplicationFixRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateSchemaKeyspaceRequest); + constructor(properties?: vtctldata.IShardReplicationFixRequest); - /** ValidateSchemaKeyspaceRequest keyspace. */ + /** ShardReplicationFixRequest keyspace. */ public keyspace: string; - /** ValidateSchemaKeyspaceRequest exclude_tables. */ - public exclude_tables: string[]; - - /** ValidateSchemaKeyspaceRequest include_views. */ - public include_views: boolean; - - /** ValidateSchemaKeyspaceRequest skip_no_primary. */ - public skip_no_primary: boolean; + /** ShardReplicationFixRequest shard. */ + public shard: string; - /** ValidateSchemaKeyspaceRequest include_vschema. */ - public include_vschema: boolean; + /** ShardReplicationFixRequest cell. */ + public cell: string; /** - * Creates a new ValidateSchemaKeyspaceRequest instance using the specified properties. + * Creates a new ShardReplicationFixRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateSchemaKeyspaceRequest instance + * @returns ShardReplicationFixRequest instance */ - public static create(properties?: vtctldata.IValidateSchemaKeyspaceRequest): vtctldata.ValidateSchemaKeyspaceRequest; + public static create(properties?: vtctldata.IShardReplicationFixRequest): vtctldata.ShardReplicationFixRequest; /** - * Encodes the specified ValidateSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. - * @param message ValidateSchemaKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationFixRequest message. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. + * @param message ShardReplicationFixRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationFixRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. - * @param message ValidateSchemaKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationFixRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. + * @param message ShardReplicationFixRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationFixRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer. + * Decodes a ShardReplicationFixRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateSchemaKeyspaceRequest + * @returns ShardReplicationFixRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateSchemaKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationFixRequest; /** - * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationFixRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateSchemaKeyspaceRequest + * @returns ShardReplicationFixRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateSchemaKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationFixRequest; /** - * Verifies a ValidateSchemaKeyspaceRequest message. + * Verifies a ShardReplicationFixRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationFixRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateSchemaKeyspaceRequest + * @returns ShardReplicationFixRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateSchemaKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationFixRequest; /** - * Creates a plain object from a ValidateSchemaKeyspaceRequest message. Also converts values to other types if specified. - * @param message ValidateSchemaKeyspaceRequest + * Creates a plain object from a ShardReplicationFixRequest message. Also converts values to other types if specified. + * @param message ShardReplicationFixRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateSchemaKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationFixRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateSchemaKeyspaceRequest to JSON. + * Converts this ShardReplicationFixRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateSchemaKeyspaceResponse. */ - interface IValidateSchemaKeyspaceResponse { - - /** ValidateSchemaKeyspaceResponse results */ - results?: (string[]|null); + /** Properties of a ShardReplicationFixResponse. */ + interface IShardReplicationFixResponse { - /** ValidateSchemaKeyspaceResponse results_by_shard */ - results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); + /** ShardReplicationFixResponse error */ + error?: (topodata.IShardReplicationError|null); } - /** Represents a ValidateSchemaKeyspaceResponse. */ - class ValidateSchemaKeyspaceResponse implements IValidateSchemaKeyspaceResponse { + /** Represents a ShardReplicationFixResponse. */ + class ShardReplicationFixResponse implements IShardReplicationFixResponse { /** - * Constructs a new ValidateSchemaKeyspaceResponse. + * Constructs a new ShardReplicationFixResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateSchemaKeyspaceResponse); - - /** ValidateSchemaKeyspaceResponse results. */ - public results: string[]; + constructor(properties?: vtctldata.IShardReplicationFixResponse); - /** ValidateSchemaKeyspaceResponse results_by_shard. */ - public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; + /** ShardReplicationFixResponse error. */ + public error?: (topodata.IShardReplicationError|null); /** - * Creates a new ValidateSchemaKeyspaceResponse instance using the specified properties. + * Creates a new ShardReplicationFixResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateSchemaKeyspaceResponse instance + * @returns ShardReplicationFixResponse instance */ - public static create(properties?: vtctldata.IValidateSchemaKeyspaceResponse): vtctldata.ValidateSchemaKeyspaceResponse; + public static create(properties?: vtctldata.IShardReplicationFixResponse): vtctldata.ShardReplicationFixResponse; /** - * Encodes the specified ValidateSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. - * @param message ValidateSchemaKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationFixResponse message. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. + * @param message ShardReplicationFixResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationFixResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. - * @param message ValidateSchemaKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationFixResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. + * @param message ShardReplicationFixResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationFixResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer. + * Decodes a ShardReplicationFixResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateSchemaKeyspaceResponse + * @returns ShardReplicationFixResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateSchemaKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationFixResponse; /** - * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationFixResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateSchemaKeyspaceResponse + * @returns ShardReplicationFixResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateSchemaKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationFixResponse; /** - * Verifies a ValidateSchemaKeyspaceResponse message. + * Verifies a ShardReplicationFixResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationFixResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateSchemaKeyspaceResponse + * @returns ShardReplicationFixResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateSchemaKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationFixResponse; /** - * Creates a plain object from a ValidateSchemaKeyspaceResponse message. Also converts values to other types if specified. - * @param message ValidateSchemaKeyspaceResponse + * Creates a plain object from a ShardReplicationFixResponse message. Also converts values to other types if specified. + * @param message ShardReplicationFixResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateSchemaKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationFixResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateSchemaKeyspaceResponse to JSON. + * Converts this ShardReplicationFixResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateShardRequest. */ - interface IValidateShardRequest { + /** Properties of a ShardReplicationPositionsRequest. */ + interface IShardReplicationPositionsRequest { - /** ValidateShardRequest keyspace */ + /** ShardReplicationPositionsRequest keyspace */ keyspace?: (string|null); - /** ValidateShardRequest shard */ + /** ShardReplicationPositionsRequest shard */ shard?: (string|null); - - /** ValidateShardRequest ping_tablets */ - ping_tablets?: (boolean|null); } - /** Represents a ValidateShardRequest. */ - class ValidateShardRequest implements IValidateShardRequest { + /** Represents a ShardReplicationPositionsRequest. */ + class ShardReplicationPositionsRequest implements IShardReplicationPositionsRequest { /** - * Constructs a new ValidateShardRequest. + * Constructs a new ShardReplicationPositionsRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateShardRequest); + constructor(properties?: vtctldata.IShardReplicationPositionsRequest); - /** ValidateShardRequest keyspace. */ + /** ShardReplicationPositionsRequest keyspace. */ public keyspace: string; - /** ValidateShardRequest shard. */ + /** ShardReplicationPositionsRequest shard. */ public shard: string; - /** ValidateShardRequest ping_tablets. */ - public ping_tablets: boolean; - /** - * Creates a new ValidateShardRequest instance using the specified properties. + * Creates a new ShardReplicationPositionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateShardRequest instance + * @returns ShardReplicationPositionsRequest instance */ - public static create(properties?: vtctldata.IValidateShardRequest): vtctldata.ValidateShardRequest; + public static create(properties?: vtctldata.IShardReplicationPositionsRequest): vtctldata.ShardReplicationPositionsRequest; /** - * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. - * @param message ValidateShardRequest message or plain object to encode + * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. + * @param message ShardReplicationPositionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. - * @param message ValidateShardRequest message or plain object to encode + * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. + * @param message ShardReplicationPositionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateShardRequest message from the specified reader or buffer. + * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateShardRequest + * @returns ShardReplicationPositionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsRequest; /** - * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateShardRequest + * @returns ShardReplicationPositionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsRequest; /** - * Verifies a ValidateShardRequest message. + * Verifies a ShardReplicationPositionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateShardRequest + * @returns ShardReplicationPositionsRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsRequest; /** - * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. - * @param message ValidateShardRequest + * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. + * @param message ShardReplicationPositionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationPositionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateShardRequest to JSON. + * Converts this ShardReplicationPositionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateShardResponse. */ - interface IValidateShardResponse { + /** Properties of a ShardReplicationPositionsResponse. */ + interface IShardReplicationPositionsResponse { - /** ValidateShardResponse results */ - results?: (string[]|null); + /** ShardReplicationPositionsResponse replication_statuses */ + replication_statuses?: ({ [k: string]: replicationdata.IStatus }|null); + + /** ShardReplicationPositionsResponse tablet_map */ + tablet_map?: ({ [k: string]: topodata.ITablet }|null); } - /** Represents a ValidateShardResponse. */ - class ValidateShardResponse implements IValidateShardResponse { + /** Represents a ShardReplicationPositionsResponse. */ + class ShardReplicationPositionsResponse implements IShardReplicationPositionsResponse { /** - * Constructs a new ValidateShardResponse. + * Constructs a new ShardReplicationPositionsResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateShardResponse); + constructor(properties?: vtctldata.IShardReplicationPositionsResponse); - /** ValidateShardResponse results. */ - public results: string[]; + /** ShardReplicationPositionsResponse replication_statuses. */ + public replication_statuses: { [k: string]: replicationdata.IStatus }; + + /** ShardReplicationPositionsResponse tablet_map. */ + public tablet_map: { [k: string]: topodata.ITablet }; /** - * Creates a new ValidateShardResponse instance using the specified properties. + * Creates a new ShardReplicationPositionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateShardResponse instance + * @returns ShardReplicationPositionsResponse instance */ - public static create(properties?: vtctldata.IValidateShardResponse): vtctldata.ValidateShardResponse; + public static create(properties?: vtctldata.IShardReplicationPositionsResponse): vtctldata.ShardReplicationPositionsResponse; /** - * Encodes the specified ValidateShardResponse message. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. - * @param message ValidateShardResponse message or plain object to encode + * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. + * @param message ShardReplicationPositionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. - * @param message ValidateShardResponse message or plain object to encode + * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. + * @param message ShardReplicationPositionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateShardResponse message from the specified reader or buffer. + * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateShardResponse + * @returns ShardReplicationPositionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsResponse; /** - * Decodes a ValidateShardResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateShardResponse + * @returns ShardReplicationPositionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsResponse; /** - * Verifies a ValidateShardResponse message. + * Verifies a ShardReplicationPositionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateShardResponse + * @returns ShardReplicationPositionsResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsResponse; /** - * Creates a plain object from a ValidateShardResponse message. Also converts values to other types if specified. - * @param message ValidateShardResponse + * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. + * @param message ShardReplicationPositionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationPositionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateShardResponse to JSON. + * Converts this ShardReplicationPositionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVersionKeyspaceRequest. */ - interface IValidateVersionKeyspaceRequest { + /** Properties of a ShardReplicationRemoveRequest. */ + interface IShardReplicationRemoveRequest { - /** ValidateVersionKeyspaceRequest keyspace */ + /** ShardReplicationRemoveRequest keyspace */ keyspace?: (string|null); + + /** ShardReplicationRemoveRequest shard */ + shard?: (string|null); + + /** ShardReplicationRemoveRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a ValidateVersionKeyspaceRequest. */ - class ValidateVersionKeyspaceRequest implements IValidateVersionKeyspaceRequest { + /** Represents a ShardReplicationRemoveRequest. */ + class ShardReplicationRemoveRequest implements IShardReplicationRemoveRequest { /** - * Constructs a new ValidateVersionKeyspaceRequest. + * Constructs a new ShardReplicationRemoveRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVersionKeyspaceRequest); + constructor(properties?: vtctldata.IShardReplicationRemoveRequest); - /** ValidateVersionKeyspaceRequest keyspace. */ + /** ShardReplicationRemoveRequest keyspace. */ public keyspace: string; + /** ShardReplicationRemoveRequest shard. */ + public shard: string; + + /** ShardReplicationRemoveRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); + /** - * Creates a new ValidateVersionKeyspaceRequest instance using the specified properties. + * Creates a new ShardReplicationRemoveRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVersionKeyspaceRequest instance + * @returns ShardReplicationRemoveRequest instance */ - public static create(properties?: vtctldata.IValidateVersionKeyspaceRequest): vtctldata.ValidateVersionKeyspaceRequest; + public static create(properties?: vtctldata.IShardReplicationRemoveRequest): vtctldata.ShardReplicationRemoveRequest; /** - * Encodes the specified ValidateVersionKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. - * @param message ValidateVersionKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationRemoveRequest message. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. + * @param message ShardReplicationRemoveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVersionKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationRemoveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVersionKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. - * @param message ValidateVersionKeyspaceRequest message or plain object to encode + * Encodes the specified ShardReplicationRemoveRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. + * @param message ShardReplicationRemoveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVersionKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationRemoveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer. + * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVersionKeyspaceRequest + * @returns ShardReplicationRemoveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionKeyspaceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationRemoveRequest; /** - * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVersionKeyspaceRequest + * @returns ShardReplicationRemoveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionKeyspaceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationRemoveRequest; /** - * Verifies a ValidateVersionKeyspaceRequest message. + * Verifies a ShardReplicationRemoveRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVersionKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationRemoveRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVersionKeyspaceRequest + * @returns ShardReplicationRemoveRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionKeyspaceRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationRemoveRequest; /** - * Creates a plain object from a ValidateVersionKeyspaceRequest message. Also converts values to other types if specified. - * @param message ValidateVersionKeyspaceRequest + * Creates a plain object from a ShardReplicationRemoveRequest message. Also converts values to other types if specified. + * @param message ShardReplicationRemoveRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVersionKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationRemoveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVersionKeyspaceRequest to JSON. + * Converts this ShardReplicationRemoveRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVersionKeyspaceResponse. */ - interface IValidateVersionKeyspaceResponse { - - /** ValidateVersionKeyspaceResponse results */ - results?: (string[]|null); - - /** ValidateVersionKeyspaceResponse results_by_shard */ - results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); + /** Properties of a ShardReplicationRemoveResponse. */ + interface IShardReplicationRemoveResponse { } - /** Represents a ValidateVersionKeyspaceResponse. */ - class ValidateVersionKeyspaceResponse implements IValidateVersionKeyspaceResponse { + /** Represents a ShardReplicationRemoveResponse. */ + class ShardReplicationRemoveResponse implements IShardReplicationRemoveResponse { /** - * Constructs a new ValidateVersionKeyspaceResponse. + * Constructs a new ShardReplicationRemoveResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVersionKeyspaceResponse); - - /** ValidateVersionKeyspaceResponse results. */ - public results: string[]; - - /** ValidateVersionKeyspaceResponse results_by_shard. */ - public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; + constructor(properties?: vtctldata.IShardReplicationRemoveResponse); /** - * Creates a new ValidateVersionKeyspaceResponse instance using the specified properties. + * Creates a new ShardReplicationRemoveResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVersionKeyspaceResponse instance + * @returns ShardReplicationRemoveResponse instance */ - public static create(properties?: vtctldata.IValidateVersionKeyspaceResponse): vtctldata.ValidateVersionKeyspaceResponse; + public static create(properties?: vtctldata.IShardReplicationRemoveResponse): vtctldata.ShardReplicationRemoveResponse; /** - * Encodes the specified ValidateVersionKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. - * @param message ValidateVersionKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationRemoveResponse message. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. + * @param message ShardReplicationRemoveResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVersionKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IShardReplicationRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVersionKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. - * @param message ValidateVersionKeyspaceResponse message or plain object to encode + * Encodes the specified ShardReplicationRemoveResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. + * @param message ShardReplicationRemoveResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVersionKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IShardReplicationRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer. + * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVersionKeyspaceResponse + * @returns ShardReplicationRemoveResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionKeyspaceResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationRemoveResponse; /** - * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVersionKeyspaceResponse + * @returns ShardReplicationRemoveResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionKeyspaceResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationRemoveResponse; /** - * Verifies a ValidateVersionKeyspaceResponse message. + * Verifies a ShardReplicationRemoveResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVersionKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationRemoveResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVersionKeyspaceResponse + * @returns ShardReplicationRemoveResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionKeyspaceResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationRemoveResponse; /** - * Creates a plain object from a ValidateVersionKeyspaceResponse message. Also converts values to other types if specified. - * @param message ValidateVersionKeyspaceResponse + * Creates a plain object from a ShardReplicationRemoveResponse message. Also converts values to other types if specified. + * @param message ShardReplicationRemoveResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVersionKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ShardReplicationRemoveResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVersionKeyspaceResponse to JSON. + * Converts this ShardReplicationRemoveResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVersionShardRequest. */ - interface IValidateVersionShardRequest { + /** Properties of a SleepTabletRequest. */ + interface ISleepTabletRequest { - /** ValidateVersionShardRequest keyspace */ - keyspace?: (string|null); + /** SleepTabletRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); - /** ValidateVersionShardRequest shard */ - shard?: (string|null); + /** SleepTabletRequest duration */ + duration?: (vttime.IDuration|null); } - /** Represents a ValidateVersionShardRequest. */ - class ValidateVersionShardRequest implements IValidateVersionShardRequest { + /** Represents a SleepTabletRequest. */ + class SleepTabletRequest implements ISleepTabletRequest { /** - * Constructs a new ValidateVersionShardRequest. + * Constructs a new SleepTabletRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVersionShardRequest); + constructor(properties?: vtctldata.ISleepTabletRequest); - /** ValidateVersionShardRequest keyspace. */ - public keyspace: string; + /** SleepTabletRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); - /** ValidateVersionShardRequest shard. */ - public shard: string; + /** SleepTabletRequest duration. */ + public duration?: (vttime.IDuration|null); /** - * Creates a new ValidateVersionShardRequest instance using the specified properties. + * Creates a new SleepTabletRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVersionShardRequest instance + * @returns SleepTabletRequest instance */ - public static create(properties?: vtctldata.IValidateVersionShardRequest): vtctldata.ValidateVersionShardRequest; + public static create(properties?: vtctldata.ISleepTabletRequest): vtctldata.SleepTabletRequest; /** - * Encodes the specified ValidateVersionShardRequest message. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. - * @param message ValidateVersionShardRequest message or plain object to encode + * Encodes the specified SleepTabletRequest message. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. + * @param message SleepTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVersionShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISleepTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVersionShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. - * @param message ValidateVersionShardRequest message or plain object to encode + * Encodes the specified SleepTabletRequest message, length delimited. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. + * @param message SleepTabletRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVersionShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISleepTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVersionShardRequest message from the specified reader or buffer. + * Decodes a SleepTabletRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVersionShardRequest + * @returns SleepTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionShardRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SleepTabletRequest; /** - * Decodes a ValidateVersionShardRequest message from the specified reader or buffer, length delimited. + * Decodes a SleepTabletRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVersionShardRequest + * @returns SleepTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionShardRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SleepTabletRequest; /** - * Verifies a ValidateVersionShardRequest message. + * Verifies a SleepTabletRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVersionShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SleepTabletRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVersionShardRequest + * @returns SleepTabletRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionShardRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SleepTabletRequest; /** - * Creates a plain object from a ValidateVersionShardRequest message. Also converts values to other types if specified. - * @param message ValidateVersionShardRequest + * Creates a plain object from a SleepTabletRequest message. Also converts values to other types if specified. + * @param message SleepTabletRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVersionShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SleepTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVersionShardRequest to JSON. + * Converts this SleepTabletRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVersionShardResponse. */ - interface IValidateVersionShardResponse { - - /** ValidateVersionShardResponse results */ - results?: (string[]|null); + /** Properties of a SleepTabletResponse. */ + interface ISleepTabletResponse { } - /** Represents a ValidateVersionShardResponse. */ - class ValidateVersionShardResponse implements IValidateVersionShardResponse { + /** Represents a SleepTabletResponse. */ + class SleepTabletResponse implements ISleepTabletResponse { /** - * Constructs a new ValidateVersionShardResponse. + * Constructs a new SleepTabletResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVersionShardResponse); - - /** ValidateVersionShardResponse results. */ - public results: string[]; + constructor(properties?: vtctldata.ISleepTabletResponse); /** - * Creates a new ValidateVersionShardResponse instance using the specified properties. + * Creates a new SleepTabletResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVersionShardResponse instance + * @returns SleepTabletResponse instance */ - public static create(properties?: vtctldata.IValidateVersionShardResponse): vtctldata.ValidateVersionShardResponse; + public static create(properties?: vtctldata.ISleepTabletResponse): vtctldata.SleepTabletResponse; /** - * Encodes the specified ValidateVersionShardResponse message. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. - * @param message ValidateVersionShardResponse message or plain object to encode + * Encodes the specified SleepTabletResponse message. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. + * @param message SleepTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVersionShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISleepTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVersionShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. - * @param message ValidateVersionShardResponse message or plain object to encode + * Encodes the specified SleepTabletResponse message, length delimited. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. + * @param message SleepTabletResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVersionShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISleepTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVersionShardResponse message from the specified reader or buffer. + * Decodes a SleepTabletResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVersionShardResponse + * @returns SleepTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionShardResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SleepTabletResponse; /** - * Decodes a ValidateVersionShardResponse message from the specified reader or buffer, length delimited. + * Decodes a SleepTabletResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVersionShardResponse + * @returns SleepTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionShardResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SleepTabletResponse; /** - * Verifies a ValidateVersionShardResponse message. + * Verifies a SleepTabletResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVersionShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SleepTabletResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVersionShardResponse + * @returns SleepTabletResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionShardResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SleepTabletResponse; /** - * Creates a plain object from a ValidateVersionShardResponse message. Also converts values to other types if specified. - * @param message ValidateVersionShardResponse + * Creates a plain object from a SleepTabletResponse message. Also converts values to other types if specified. + * @param message SleepTabletResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVersionShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SleepTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVersionShardResponse to JSON. + * Converts this SleepTabletResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVSchemaRequest. */ - interface IValidateVSchemaRequest { + /** Properties of a SourceShardAddRequest. */ + interface ISourceShardAddRequest { - /** ValidateVSchemaRequest keyspace */ + /** SourceShardAddRequest keyspace */ keyspace?: (string|null); - /** ValidateVSchemaRequest shards */ - shards?: (string[]|null); + /** SourceShardAddRequest shard */ + shard?: (string|null); - /** ValidateVSchemaRequest exclude_tables */ - exclude_tables?: (string[]|null); + /** SourceShardAddRequest uid */ + uid?: (number|null); - /** ValidateVSchemaRequest include_views */ - include_views?: (boolean|null); + /** SourceShardAddRequest source_keyspace */ + source_keyspace?: (string|null); + + /** SourceShardAddRequest source_shard */ + source_shard?: (string|null); + + /** SourceShardAddRequest key_range */ + key_range?: (topodata.IKeyRange|null); + + /** SourceShardAddRequest tables */ + tables?: (string[]|null); } - /** Represents a ValidateVSchemaRequest. */ - class ValidateVSchemaRequest implements IValidateVSchemaRequest { + /** Represents a SourceShardAddRequest. */ + class SourceShardAddRequest implements ISourceShardAddRequest { /** - * Constructs a new ValidateVSchemaRequest. + * Constructs a new SourceShardAddRequest. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVSchemaRequest); + constructor(properties?: vtctldata.ISourceShardAddRequest); - /** ValidateVSchemaRequest keyspace. */ + /** SourceShardAddRequest keyspace. */ public keyspace: string; - /** ValidateVSchemaRequest shards. */ - public shards: string[]; + /** SourceShardAddRequest shard. */ + public shard: string; - /** ValidateVSchemaRequest exclude_tables. */ - public exclude_tables: string[]; + /** SourceShardAddRequest uid. */ + public uid: number; - /** ValidateVSchemaRequest include_views. */ - public include_views: boolean; + /** SourceShardAddRequest source_keyspace. */ + public source_keyspace: string; + + /** SourceShardAddRequest source_shard. */ + public source_shard: string; + + /** SourceShardAddRequest key_range. */ + public key_range?: (topodata.IKeyRange|null); + + /** SourceShardAddRequest tables. */ + public tables: string[]; /** - * Creates a new ValidateVSchemaRequest instance using the specified properties. + * Creates a new SourceShardAddRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVSchemaRequest instance + * @returns SourceShardAddRequest instance */ - public static create(properties?: vtctldata.IValidateVSchemaRequest): vtctldata.ValidateVSchemaRequest; + public static create(properties?: vtctldata.ISourceShardAddRequest): vtctldata.SourceShardAddRequest; /** - * Encodes the specified ValidateVSchemaRequest message. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. - * @param message ValidateVSchemaRequest message or plain object to encode + * Encodes the specified SourceShardAddRequest message. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. + * @param message SourceShardAddRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISourceShardAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. - * @param message ValidateVSchemaRequest message or plain object to encode + * Encodes the specified SourceShardAddRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. + * @param message SourceShardAddRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISourceShardAddRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVSchemaRequest message from the specified reader or buffer. + * Decodes a SourceShardAddRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVSchemaRequest + * @returns SourceShardAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVSchemaRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardAddRequest; /** - * Decodes a ValidateVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a SourceShardAddRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVSchemaRequest + * @returns SourceShardAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVSchemaRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardAddRequest; /** - * Verifies a ValidateVSchemaRequest message. + * Verifies a SourceShardAddRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardAddRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVSchemaRequest + * @returns SourceShardAddRequest */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVSchemaRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardAddRequest; /** - * Creates a plain object from a ValidateVSchemaRequest message. Also converts values to other types if specified. - * @param message ValidateVSchemaRequest + * Creates a plain object from a SourceShardAddRequest message. Also converts values to other types if specified. + * @param message SourceShardAddRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SourceShardAddRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVSchemaRequest to JSON. + * Converts this SourceShardAddRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidateVSchemaResponse. */ - interface IValidateVSchemaResponse { - - /** ValidateVSchemaResponse results */ - results?: (string[]|null); + /** Properties of a SourceShardAddResponse. */ + interface ISourceShardAddResponse { - /** ValidateVSchemaResponse results_by_shard */ - results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); + /** SourceShardAddResponse shard */ + shard?: (topodata.IShard|null); } - /** Represents a ValidateVSchemaResponse. */ - class ValidateVSchemaResponse implements IValidateVSchemaResponse { + /** Represents a SourceShardAddResponse. */ + class SourceShardAddResponse implements ISourceShardAddResponse { /** - * Constructs a new ValidateVSchemaResponse. + * Constructs a new SourceShardAddResponse. * @param [properties] Properties to set */ - constructor(properties?: vtctldata.IValidateVSchemaResponse); - - /** ValidateVSchemaResponse results. */ - public results: string[]; + constructor(properties?: vtctldata.ISourceShardAddResponse); - /** ValidateVSchemaResponse results_by_shard. */ - public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; + /** SourceShardAddResponse shard. */ + public shard?: (topodata.IShard|null); /** - * Creates a new ValidateVSchemaResponse instance using the specified properties. + * Creates a new SourceShardAddResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateVSchemaResponse instance + * @returns SourceShardAddResponse instance */ - public static create(properties?: vtctldata.IValidateVSchemaResponse): vtctldata.ValidateVSchemaResponse; + public static create(properties?: vtctldata.ISourceShardAddResponse): vtctldata.SourceShardAddResponse; /** - * Encodes the specified ValidateVSchemaResponse message. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. - * @param message ValidateVSchemaResponse message or plain object to encode + * Encodes the specified SourceShardAddResponse message. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * @param message SourceShardAddResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: vtctldata.IValidateVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISourceShardAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. - * @param message ValidateVSchemaResponse message or plain object to encode + * Encodes the specified SourceShardAddResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * @param message SourceShardAddResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: vtctldata.IValidateVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISourceShardAddResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateVSchemaResponse message from the specified reader or buffer. + * Decodes a SourceShardAddResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateVSchemaResponse + * @returns SourceShardAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVSchemaResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardAddResponse; /** - * Decodes a ValidateVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a SourceShardAddResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateVSchemaResponse + * @returns SourceShardAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVSchemaResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardAddResponse; /** - * Verifies a ValidateVSchemaResponse message. + * Verifies a SourceShardAddResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardAddResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateVSchemaResponse + * @returns SourceShardAddResponse */ - public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVSchemaResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardAddResponse; /** - * Creates a plain object from a ValidateVSchemaResponse message. Also converts values to other types if specified. - * @param message ValidateVSchemaResponse + * Creates a plain object from a SourceShardAddResponse message. Also converts values to other types if specified. + * @param message SourceShardAddResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: vtctldata.ValidateVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SourceShardAddResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateVSchemaResponse to JSON. + * Converts this SourceShardAddResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } -} - -/** Namespace binlogdata. */ -export namespace binlogdata { - /** Properties of a Charset. */ - interface ICharset { + /** Properties of a SourceShardDeleteRequest. */ + interface ISourceShardDeleteRequest { - /** Charset client */ - client?: (number|null); + /** SourceShardDeleteRequest keyspace */ + keyspace?: (string|null); - /** Charset conn */ - conn?: (number|null); + /** SourceShardDeleteRequest shard */ + shard?: (string|null); - /** Charset server */ - server?: (number|null); + /** SourceShardDeleteRequest uid */ + uid?: (number|null); } - /** Represents a Charset. */ - class Charset implements ICharset { + /** Represents a SourceShardDeleteRequest. */ + class SourceShardDeleteRequest implements ISourceShardDeleteRequest { /** - * Constructs a new Charset. + * Constructs a new SourceShardDeleteRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.ICharset); - - /** Charset client. */ - public client: number; + constructor(properties?: vtctldata.ISourceShardDeleteRequest); - /** Charset conn. */ - public conn: number; + /** SourceShardDeleteRequest keyspace. */ + public keyspace: string; - /** Charset server. */ - public server: number; + /** SourceShardDeleteRequest shard. */ + public shard: string; + + /** SourceShardDeleteRequest uid. */ + public uid: number; /** - * Creates a new Charset instance using the specified properties. + * Creates a new SourceShardDeleteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Charset instance + * @returns SourceShardDeleteRequest instance */ - public static create(properties?: binlogdata.ICharset): binlogdata.Charset; + public static create(properties?: vtctldata.ISourceShardDeleteRequest): vtctldata.SourceShardDeleteRequest; /** - * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @param message Charset message or plain object to encode + * Encodes the specified SourceShardDeleteRequest message. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. + * @param message SourceShardDeleteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISourceShardDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @param message Charset message or plain object to encode + * Encodes the specified SourceShardDeleteRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. + * @param message SourceShardDeleteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISourceShardDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Charset message from the specified reader or buffer. + * Decodes a SourceShardDeleteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Charset + * @returns SourceShardDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Charset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardDeleteRequest; /** - * Decodes a Charset message from the specified reader or buffer, length delimited. + * Decodes a SourceShardDeleteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Charset + * @returns SourceShardDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Charset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardDeleteRequest; /** - * Verifies a Charset message. + * Verifies a SourceShardDeleteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Charset message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardDeleteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Charset + * @returns SourceShardDeleteRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.Charset; + public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardDeleteRequest; /** - * Creates a plain object from a Charset message. Also converts values to other types if specified. - * @param message Charset + * Creates a plain object from a SourceShardDeleteRequest message. Also converts values to other types if specified. + * @param message SourceShardDeleteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.Charset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SourceShardDeleteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Charset to JSON. + * Converts this SourceShardDeleteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BinlogTransaction. */ - interface IBinlogTransaction { - - /** BinlogTransaction statements */ - statements?: (binlogdata.BinlogTransaction.IStatement[]|null); + /** Properties of a SourceShardDeleteResponse. */ + interface ISourceShardDeleteResponse { - /** BinlogTransaction event_token */ - event_token?: (query.IEventToken|null); + /** SourceShardDeleteResponse shard */ + shard?: (topodata.IShard|null); } - /** Represents a BinlogTransaction. */ - class BinlogTransaction implements IBinlogTransaction { + /** Represents a SourceShardDeleteResponse. */ + class SourceShardDeleteResponse implements ISourceShardDeleteResponse { /** - * Constructs a new BinlogTransaction. + * Constructs a new SourceShardDeleteResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IBinlogTransaction); - - /** BinlogTransaction statements. */ - public statements: binlogdata.BinlogTransaction.IStatement[]; + constructor(properties?: vtctldata.ISourceShardDeleteResponse); - /** BinlogTransaction event_token. */ - public event_token?: (query.IEventToken|null); + /** SourceShardDeleteResponse shard. */ + public shard?: (topodata.IShard|null); /** - * Creates a new BinlogTransaction instance using the specified properties. + * Creates a new SourceShardDeleteResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BinlogTransaction instance + * @returns SourceShardDeleteResponse instance */ - public static create(properties?: binlogdata.IBinlogTransaction): binlogdata.BinlogTransaction; + public static create(properties?: vtctldata.ISourceShardDeleteResponse): vtctldata.SourceShardDeleteResponse; /** - * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @param message BinlogTransaction message or plain object to encode + * Encodes the specified SourceShardDeleteResponse message. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. + * @param message SourceShardDeleteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ISourceShardDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @param message BinlogTransaction message or plain object to encode + * Encodes the specified SourceShardDeleteResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. + * @param message SourceShardDeleteResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ISourceShardDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BinlogTransaction message from the specified reader or buffer. + * Decodes a SourceShardDeleteResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BinlogTransaction + * @returns SourceShardDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.SourceShardDeleteResponse; /** - * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. + * Decodes a SourceShardDeleteResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BinlogTransaction + * @returns SourceShardDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.SourceShardDeleteResponse; /** - * Verifies a BinlogTransaction message. + * Verifies a SourceShardDeleteResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardDeleteResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BinlogTransaction + * @returns SourceShardDeleteResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction; + public static fromObject(object: { [k: string]: any }): vtctldata.SourceShardDeleteResponse; /** - * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. - * @param message BinlogTransaction + * Creates a plain object from a SourceShardDeleteResponse message. Also converts values to other types if specified. + * @param message SourceShardDeleteResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.BinlogTransaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.SourceShardDeleteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BinlogTransaction to JSON. + * Converts this SourceShardDeleteResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BinlogTransaction { - - /** Properties of a Statement. */ - interface IStatement { - - /** Statement category */ - category?: (binlogdata.BinlogTransaction.Statement.Category|null); - - /** Statement charset */ - charset?: (binlogdata.ICharset|null); - - /** Statement sql */ - sql?: (Uint8Array|null); - } - - /** Represents a Statement. */ - class Statement implements IStatement { - - /** - * Constructs a new Statement. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.BinlogTransaction.IStatement); - - /** Statement category. */ - public category: binlogdata.BinlogTransaction.Statement.Category; - - /** Statement charset. */ - public charset?: (binlogdata.ICharset|null); - - /** Statement sql. */ - public sql: Uint8Array; - - /** - * Creates a new Statement instance using the specified properties. - * @param [properties] Properties to set - * @returns Statement instance - */ - public static create(properties?: binlogdata.BinlogTransaction.IStatement): binlogdata.BinlogTransaction.Statement; - - /** - * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction.Statement; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction.Statement; - - /** - * Verifies a Statement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Statement - */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction.Statement; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @param message Statement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.BinlogTransaction.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Statement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Statement { - - /** Category enum. */ - enum Category { - BL_UNRECOGNIZED = 0, - BL_BEGIN = 1, - BL_COMMIT = 2, - BL_ROLLBACK = 3, - BL_DML_DEPRECATED = 4, - BL_DDL = 5, - BL_SET = 6, - BL_INSERT = 7, - BL_UPDATE = 8, - BL_DELETE = 9 - } - } - } - - /** Properties of a StreamKeyRangeRequest. */ - interface IStreamKeyRangeRequest { - - /** StreamKeyRangeRequest position */ - position?: (string|null); - - /** StreamKeyRangeRequest key_range */ - key_range?: (topodata.IKeyRange|null); + /** Properties of a StartReplicationRequest. */ + interface IStartReplicationRequest { - /** StreamKeyRangeRequest charset */ - charset?: (binlogdata.ICharset|null); + /** StartReplicationRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a StreamKeyRangeRequest. */ - class StreamKeyRangeRequest implements IStreamKeyRangeRequest { + /** Represents a StartReplicationRequest. */ + class StartReplicationRequest implements IStartReplicationRequest { /** - * Constructs a new StreamKeyRangeRequest. + * Constructs a new StartReplicationRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IStreamKeyRangeRequest); - - /** StreamKeyRangeRequest position. */ - public position: string; - - /** StreamKeyRangeRequest key_range. */ - public key_range?: (topodata.IKeyRange|null); + constructor(properties?: vtctldata.IStartReplicationRequest); - /** StreamKeyRangeRequest charset. */ - public charset?: (binlogdata.ICharset|null); + /** StartReplicationRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new StreamKeyRangeRequest instance using the specified properties. + * Creates a new StartReplicationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamKeyRangeRequest instance + * @returns StartReplicationRequest instance */ - public static create(properties?: binlogdata.IStreamKeyRangeRequest): binlogdata.StreamKeyRangeRequest; + public static create(properties?: vtctldata.IStartReplicationRequest): vtctldata.StartReplicationRequest; /** - * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @param message StreamKeyRangeRequest message or plain object to encode + * Encodes the specified StartReplicationRequest message. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. + * @param message StartReplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @param message StreamKeyRangeRequest message or plain object to encode + * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. + * @param message StartReplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. + * Decodes a StartReplicationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamKeyRangeRequest + * @returns StartReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StartReplicationRequest; /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. + * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamKeyRangeRequest + * @returns StartReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StartReplicationRequest; /** - * Verifies a StreamKeyRangeRequest message. + * Verifies a StartReplicationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamKeyRangeRequest + * @returns StartReplicationRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.StartReplicationRequest; /** - * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. - * @param message StreamKeyRangeRequest + * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. + * @param message StartReplicationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.StreamKeyRangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.StartReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamKeyRangeRequest to JSON. + * Converts this StartReplicationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamKeyRangeResponse. */ - interface IStreamKeyRangeResponse { - - /** StreamKeyRangeResponse binlog_transaction */ - binlog_transaction?: (binlogdata.IBinlogTransaction|null); + /** Properties of a StartReplicationResponse. */ + interface IStartReplicationResponse { } - /** Represents a StreamKeyRangeResponse. */ - class StreamKeyRangeResponse implements IStreamKeyRangeResponse { + /** Represents a StartReplicationResponse. */ + class StartReplicationResponse implements IStartReplicationResponse { /** - * Constructs a new StreamKeyRangeResponse. + * Constructs a new StartReplicationResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IStreamKeyRangeResponse); - - /** StreamKeyRangeResponse binlog_transaction. */ - public binlog_transaction?: (binlogdata.IBinlogTransaction|null); + constructor(properties?: vtctldata.IStartReplicationResponse); /** - * Creates a new StreamKeyRangeResponse instance using the specified properties. + * Creates a new StartReplicationResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StreamKeyRangeResponse instance + * @returns StartReplicationResponse instance */ - public static create(properties?: binlogdata.IStreamKeyRangeResponse): binlogdata.StreamKeyRangeResponse; + public static create(properties?: vtctldata.IStartReplicationResponse): vtctldata.StartReplicationResponse; /** - * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @param message StreamKeyRangeResponse message or plain object to encode + * Encodes the specified StartReplicationResponse message. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. + * @param message StartReplicationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @param message StreamKeyRangeResponse message or plain object to encode + * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. + * @param message StartReplicationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. + * Decodes a StartReplicationResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamKeyRangeResponse + * @returns StartReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StartReplicationResponse; /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. + * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamKeyRangeResponse + * @returns StartReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StartReplicationResponse; /** - * Verifies a StreamKeyRangeResponse message. + * Verifies a StartReplicationResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamKeyRangeResponse + * @returns StartReplicationResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.StartReplicationResponse; /** - * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. - * @param message StreamKeyRangeResponse + * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. + * @param message StartReplicationResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.StreamKeyRangeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.StartReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamKeyRangeResponse to JSON. + * Converts this StartReplicationResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamTablesRequest. */ - interface IStreamTablesRequest { - - /** StreamTablesRequest position */ - position?: (string|null); - - /** StreamTablesRequest tables */ - tables?: (string[]|null); + /** Properties of a StopReplicationRequest. */ + interface IStopReplicationRequest { - /** StreamTablesRequest charset */ - charset?: (binlogdata.ICharset|null); + /** StopReplicationRequest tablet_alias */ + tablet_alias?: (topodata.ITabletAlias|null); } - /** Represents a StreamTablesRequest. */ - class StreamTablesRequest implements IStreamTablesRequest { + /** Represents a StopReplicationRequest. */ + class StopReplicationRequest implements IStopReplicationRequest { /** - * Constructs a new StreamTablesRequest. + * Constructs a new StopReplicationRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IStreamTablesRequest); - - /** StreamTablesRequest position. */ - public position: string; - - /** StreamTablesRequest tables. */ - public tables: string[]; + constructor(properties?: vtctldata.IStopReplicationRequest); - /** StreamTablesRequest charset. */ - public charset?: (binlogdata.ICharset|null); + /** StopReplicationRequest tablet_alias. */ + public tablet_alias?: (topodata.ITabletAlias|null); /** - * Creates a new StreamTablesRequest instance using the specified properties. + * Creates a new StopReplicationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamTablesRequest instance + * @returns StopReplicationRequest instance */ - public static create(properties?: binlogdata.IStreamTablesRequest): binlogdata.StreamTablesRequest; + public static create(properties?: vtctldata.IStopReplicationRequest): vtctldata.StopReplicationRequest; /** - * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @param message StreamTablesRequest message or plain object to encode + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @param message StreamTablesRequest message or plain object to encode + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamTablesRequest message from the specified reader or buffer. + * Decodes a StopReplicationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamTablesRequest + * @returns StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StopReplicationRequest; /** - * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamTablesRequest + * @returns StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StopReplicationRequest; /** - * Verifies a StreamTablesRequest message. + * Verifies a StopReplicationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamTablesRequest + * @returns StopReplicationRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.StopReplicationRequest; /** - * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. - * @param message StreamTablesRequest + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * @param message StopReplicationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.StreamTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamTablesRequest to JSON. + * Converts this StopReplicationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamTablesResponse. */ - interface IStreamTablesResponse { - - /** StreamTablesResponse binlog_transaction */ - binlog_transaction?: (binlogdata.IBinlogTransaction|null); + /** Properties of a StopReplicationResponse. */ + interface IStopReplicationResponse { } - /** Represents a StreamTablesResponse. */ - class StreamTablesResponse implements IStreamTablesResponse { + /** Represents a StopReplicationResponse. */ + class StopReplicationResponse implements IStopReplicationResponse { /** - * Constructs a new StreamTablesResponse. + * Constructs a new StopReplicationResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IStreamTablesResponse); - - /** StreamTablesResponse binlog_transaction. */ - public binlog_transaction?: (binlogdata.IBinlogTransaction|null); + constructor(properties?: vtctldata.IStopReplicationResponse); /** - * Creates a new StreamTablesResponse instance using the specified properties. + * Creates a new StopReplicationResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StreamTablesResponse instance + * @returns StopReplicationResponse instance */ - public static create(properties?: binlogdata.IStreamTablesResponse): binlogdata.StreamTablesResponse; + public static create(properties?: vtctldata.IStopReplicationResponse): vtctldata.StopReplicationResponse; /** - * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @param message StreamTablesResponse message or plain object to encode + * Encodes the specified StopReplicationResponse message. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. + * @param message StopReplicationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @param message StreamTablesResponse message or plain object to encode + * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. + * @param message StopReplicationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamTablesResponse message from the specified reader or buffer. + * Decodes a StopReplicationResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamTablesResponse + * @returns StopReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.StopReplicationResponse; /** - * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamTablesResponse + * @returns StopReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.StopReplicationResponse; /** - * Verifies a StreamTablesResponse message. + * Verifies a StopReplicationResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamTablesResponse + * @returns StopReplicationResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.StopReplicationResponse; /** - * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. - * @param message StreamTablesResponse + * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. + * @param message StopReplicationResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.StreamTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.StopReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamTablesResponse to JSON. + * Converts this StopReplicationResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CharsetConversion. */ - interface ICharsetConversion { - - /** CharsetConversion from_charset */ - from_charset?: (string|null); + /** Properties of a TabletExternallyReparentedRequest. */ + interface ITabletExternallyReparentedRequest { - /** CharsetConversion to_charset */ - to_charset?: (string|null); + /** TabletExternallyReparentedRequest tablet */ + tablet?: (topodata.ITabletAlias|null); } - /** Represents a CharsetConversion. */ - class CharsetConversion implements ICharsetConversion { + /** Represents a TabletExternallyReparentedRequest. */ + class TabletExternallyReparentedRequest implements ITabletExternallyReparentedRequest { /** - * Constructs a new CharsetConversion. + * Constructs a new TabletExternallyReparentedRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.ICharsetConversion); - - /** CharsetConversion from_charset. */ - public from_charset: string; + constructor(properties?: vtctldata.ITabletExternallyReparentedRequest); - /** CharsetConversion to_charset. */ - public to_charset: string; + /** TabletExternallyReparentedRequest tablet. */ + public tablet?: (topodata.ITabletAlias|null); /** - * Creates a new CharsetConversion instance using the specified properties. + * Creates a new TabletExternallyReparentedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CharsetConversion instance + * @returns TabletExternallyReparentedRequest instance */ - public static create(properties?: binlogdata.ICharsetConversion): binlogdata.CharsetConversion; + public static create(properties?: vtctldata.ITabletExternallyReparentedRequest): vtctldata.TabletExternallyReparentedRequest; /** - * Encodes the specified CharsetConversion message. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. - * @param message CharsetConversion message or plain object to encode + * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * @param message TabletExternallyReparentedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.ICharsetConversion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CharsetConversion message, length delimited. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. - * @param message CharsetConversion message or plain object to encode + * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * @param message TabletExternallyReparentedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.ICharsetConversion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CharsetConversion message from the specified reader or buffer. + * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CharsetConversion + * @returns TabletExternallyReparentedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.CharsetConversion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedRequest; /** - * Decodes a CharsetConversion message from the specified reader or buffer, length delimited. + * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CharsetConversion + * @returns TabletExternallyReparentedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.CharsetConversion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedRequest; /** - * Verifies a CharsetConversion message. + * Verifies a TabletExternallyReparentedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CharsetConversion message from a plain object. Also converts values to their respective internal types. + * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CharsetConversion + * @returns TabletExternallyReparentedRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.CharsetConversion; + public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedRequest; /** - * Creates a plain object from a CharsetConversion message. Also converts values to other types if specified. - * @param message CharsetConversion + * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. + * @param message TabletExternallyReparentedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.CharsetConversion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.TabletExternallyReparentedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CharsetConversion to JSON. + * Converts this TabletExternallyReparentedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Rule. */ - interface IRule { - - /** Rule match */ - match?: (string|null); - - /** Rule filter */ - filter?: (string|null); - - /** Rule convert_enum_to_text */ - convert_enum_to_text?: ({ [k: string]: string }|null); - - /** Rule convert_charset */ - convert_charset?: ({ [k: string]: binlogdata.ICharsetConversion }|null); + /** Properties of a TabletExternallyReparentedResponse. */ + interface ITabletExternallyReparentedResponse { - /** Rule source_unique_key_columns */ - source_unique_key_columns?: (string|null); + /** TabletExternallyReparentedResponse keyspace */ + keyspace?: (string|null); - /** Rule target_unique_key_columns */ - target_unique_key_columns?: (string|null); + /** TabletExternallyReparentedResponse shard */ + shard?: (string|null); - /** Rule source_unique_key_target_columns */ - source_unique_key_target_columns?: (string|null); + /** TabletExternallyReparentedResponse new_primary */ + new_primary?: (topodata.ITabletAlias|null); - /** Rule convert_int_to_enum */ - convert_int_to_enum?: ({ [k: string]: boolean }|null); + /** TabletExternallyReparentedResponse old_primary */ + old_primary?: (topodata.ITabletAlias|null); } - /** Represents a Rule. */ - class Rule implements IRule { + /** Represents a TabletExternallyReparentedResponse. */ + class TabletExternallyReparentedResponse implements ITabletExternallyReparentedResponse { /** - * Constructs a new Rule. + * Constructs a new TabletExternallyReparentedResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IRule); - - /** Rule match. */ - public match: string; - - /** Rule filter. */ - public filter: string; - - /** Rule convert_enum_to_text. */ - public convert_enum_to_text: { [k: string]: string }; - - /** Rule convert_charset. */ - public convert_charset: { [k: string]: binlogdata.ICharsetConversion }; + constructor(properties?: vtctldata.ITabletExternallyReparentedResponse); - /** Rule source_unique_key_columns. */ - public source_unique_key_columns: string; + /** TabletExternallyReparentedResponse keyspace. */ + public keyspace: string; - /** Rule target_unique_key_columns. */ - public target_unique_key_columns: string; + /** TabletExternallyReparentedResponse shard. */ + public shard: string; - /** Rule source_unique_key_target_columns. */ - public source_unique_key_target_columns: string; + /** TabletExternallyReparentedResponse new_primary. */ + public new_primary?: (topodata.ITabletAlias|null); - /** Rule convert_int_to_enum. */ - public convert_int_to_enum: { [k: string]: boolean }; + /** TabletExternallyReparentedResponse old_primary. */ + public old_primary?: (topodata.ITabletAlias|null); /** - * Creates a new Rule instance using the specified properties. + * Creates a new TabletExternallyReparentedResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Rule instance + * @returns TabletExternallyReparentedResponse instance */ - public static create(properties?: binlogdata.IRule): binlogdata.Rule; + public static create(properties?: vtctldata.ITabletExternallyReparentedResponse): vtctldata.TabletExternallyReparentedResponse; /** - * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode + * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. + * @param message TabletExternallyReparentedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode + * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. + * @param message TabletExternallyReparentedResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Rule message from the specified reader or buffer. + * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Rule + * @returns TabletExternallyReparentedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Rule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedResponse; /** - * Decodes a Rule message from the specified reader or buffer, length delimited. + * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Rule + * @returns TabletExternallyReparentedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Rule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedResponse; /** - * Verifies a Rule message. + * Verifies a TabletExternallyReparentedResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Rule + * @returns TabletExternallyReparentedResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.Rule; + public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedResponse; /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule + * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. + * @param message TabletExternallyReparentedResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.TabletExternallyReparentedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Rule to JSON. + * Converts this TabletExternallyReparentedResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Filter. */ - interface IFilter { - - /** Filter rules */ - rules?: (binlogdata.IRule[]|null); - - /** Filter field_event_mode */ - field_event_mode?: (binlogdata.Filter.FieldEventMode|null); + /** Properties of an UpdateCellInfoRequest. */ + interface IUpdateCellInfoRequest { - /** Filter workflow_type */ - workflow_type?: (number|Long|null); + /** UpdateCellInfoRequest name */ + name?: (string|null); - /** Filter workflow_name */ - workflow_name?: (string|null); + /** UpdateCellInfoRequest cell_info */ + cell_info?: (topodata.ICellInfo|null); } - /** Represents a Filter. */ - class Filter implements IFilter { + /** Represents an UpdateCellInfoRequest. */ + class UpdateCellInfoRequest implements IUpdateCellInfoRequest { /** - * Constructs a new Filter. + * Constructs a new UpdateCellInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IFilter); - - /** Filter rules. */ - public rules: binlogdata.IRule[]; - - /** Filter field_event_mode. */ - public field_event_mode: binlogdata.Filter.FieldEventMode; + constructor(properties?: vtctldata.IUpdateCellInfoRequest); - /** Filter workflow_type. */ - public workflow_type: (number|Long); + /** UpdateCellInfoRequest name. */ + public name: string; - /** Filter workflow_name. */ - public workflow_name: string; + /** UpdateCellInfoRequest cell_info. */ + public cell_info?: (topodata.ICellInfo|null); /** - * Creates a new Filter instance using the specified properties. + * Creates a new UpdateCellInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Filter instance + * @returns UpdateCellInfoRequest instance */ - public static create(properties?: binlogdata.IFilter): binlogdata.Filter; + public static create(properties?: vtctldata.IUpdateCellInfoRequest): vtctldata.UpdateCellInfoRequest; /** - * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode + * Encodes the specified UpdateCellInfoRequest message. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * @param message UpdateCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode + * Encodes the specified UpdateCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * @param message UpdateCellInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Filter message from the specified reader or buffer. + * Decodes an UpdateCellInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Filter + * @returns UpdateCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Filter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellInfoRequest; /** - * Decodes a Filter message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Filter + * @returns UpdateCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Filter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellInfoRequest; /** - * Verifies a Filter message. + * Verifies an UpdateCellInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Filter + * @returns UpdateCellInfoRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.Filter; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellInfoRequest; /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter + * Creates a plain object from an UpdateCellInfoRequest message. Also converts values to other types if specified. + * @param message UpdateCellInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Filter to JSON. + * Converts this UpdateCellInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Filter { - - /** FieldEventMode enum. */ - enum FieldEventMode { - ERR_ON_MISMATCH = 0, - BEST_EFFORT = 1 - } - } - - /** OnDDLAction enum. */ - enum OnDDLAction { - IGNORE = 0, - STOP = 1, - EXEC = 2, - EXEC_IGNORE = 3 - } - - /** VReplicationWorkflowType enum. */ - enum VReplicationWorkflowType { - Materialize = 0, - MoveTables = 1, - CreateLookupIndex = 2, - Migrate = 3, - Reshard = 4, - OnlineDDL = 5 - } - - /** VReplicationWorkflowSubType enum. */ - enum VReplicationWorkflowSubType { - None = 0, - Partial = 1 - } - - /** Properties of a BinlogSource. */ - interface IBinlogSource { - - /** BinlogSource keyspace */ - keyspace?: (string|null); - - /** BinlogSource shard */ - shard?: (string|null); - - /** BinlogSource tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** BinlogSource key_range */ - key_range?: (topodata.IKeyRange|null); - - /** BinlogSource tables */ - tables?: (string[]|null); - - /** BinlogSource filter */ - filter?: (binlogdata.IFilter|null); - - /** BinlogSource on_ddl */ - on_ddl?: (binlogdata.OnDDLAction|null); - - /** BinlogSource external_mysql */ - external_mysql?: (string|null); - - /** BinlogSource stop_after_copy */ - stop_after_copy?: (boolean|null); - - /** BinlogSource external_cluster */ - external_cluster?: (string|null); + /** Properties of an UpdateCellInfoResponse. */ + interface IUpdateCellInfoResponse { - /** BinlogSource source_time_zone */ - source_time_zone?: (string|null); + /** UpdateCellInfoResponse name */ + name?: (string|null); - /** BinlogSource target_time_zone */ - target_time_zone?: (string|null); + /** UpdateCellInfoResponse cell_info */ + cell_info?: (topodata.ICellInfo|null); } - /** Represents a BinlogSource. */ - class BinlogSource implements IBinlogSource { + /** Represents an UpdateCellInfoResponse. */ + class UpdateCellInfoResponse implements IUpdateCellInfoResponse { /** - * Constructs a new BinlogSource. + * Constructs a new UpdateCellInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IBinlogSource); - - /** BinlogSource keyspace. */ - public keyspace: string; - - /** BinlogSource shard. */ - public shard: string; - - /** BinlogSource tablet_type. */ - public tablet_type: topodata.TabletType; - - /** BinlogSource key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** BinlogSource tables. */ - public tables: string[]; - - /** BinlogSource filter. */ - public filter?: (binlogdata.IFilter|null); - - /** BinlogSource on_ddl. */ - public on_ddl: binlogdata.OnDDLAction; - - /** BinlogSource external_mysql. */ - public external_mysql: string; - - /** BinlogSource stop_after_copy. */ - public stop_after_copy: boolean; - - /** BinlogSource external_cluster. */ - public external_cluster: string; + constructor(properties?: vtctldata.IUpdateCellInfoResponse); - /** BinlogSource source_time_zone. */ - public source_time_zone: string; + /** UpdateCellInfoResponse name. */ + public name: string; - /** BinlogSource target_time_zone. */ - public target_time_zone: string; + /** UpdateCellInfoResponse cell_info. */ + public cell_info?: (topodata.ICellInfo|null); /** - * Creates a new BinlogSource instance using the specified properties. + * Creates a new UpdateCellInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BinlogSource instance + * @returns UpdateCellInfoResponse instance */ - public static create(properties?: binlogdata.IBinlogSource): binlogdata.BinlogSource; + public static create(properties?: vtctldata.IUpdateCellInfoResponse): vtctldata.UpdateCellInfoResponse; /** - * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @param message BinlogSource message or plain object to encode + * Encodes the specified UpdateCellInfoResponse message. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. + * @param message UpdateCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @param message BinlogSource message or plain object to encode + * Encodes the specified UpdateCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. + * @param message UpdateCellInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BinlogSource message from the specified reader or buffer. + * Decodes an UpdateCellInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BinlogSource + * @returns UpdateCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellInfoResponse; /** - * Decodes a BinlogSource message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BinlogSource + * @returns UpdateCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellInfoResponse; /** - * Verifies a BinlogSource message. + * Verifies an UpdateCellInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BinlogSource + * @returns UpdateCellInfoResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogSource; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellInfoResponse; /** - * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. - * @param message BinlogSource + * Creates a plain object from an UpdateCellInfoResponse message. Also converts values to other types if specified. + * @param message UpdateCellInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.BinlogSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BinlogSource to JSON. + * Converts this UpdateCellInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** VEventType enum. */ - enum VEventType { - UNKNOWN = 0, - GTID = 1, - BEGIN = 2, - COMMIT = 3, - ROLLBACK = 4, - DDL = 5, - INSERT = 6, - REPLACE = 7, - UPDATE = 8, - DELETE = 9, - SET = 10, - OTHER = 11, - ROW = 12, - FIELD = 13, - HEARTBEAT = 14, - VGTID = 15, - JOURNAL = 16, - VERSION = 17, - LASTPK = 18, - SAVEPOINT = 19, - COPY_COMPLETED = 20 - } - - /** Properties of a RowChange. */ - interface IRowChange { + /** Properties of an UpdateCellsAliasRequest. */ + interface IUpdateCellsAliasRequest { - /** RowChange before */ - before?: (query.IRow|null); + /** UpdateCellsAliasRequest name */ + name?: (string|null); - /** RowChange after */ - after?: (query.IRow|null); + /** UpdateCellsAliasRequest cells_alias */ + cells_alias?: (topodata.ICellsAlias|null); } - /** Represents a RowChange. */ - class RowChange implements IRowChange { + /** Represents an UpdateCellsAliasRequest. */ + class UpdateCellsAliasRequest implements IUpdateCellsAliasRequest { /** - * Constructs a new RowChange. + * Constructs a new UpdateCellsAliasRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IRowChange); + constructor(properties?: vtctldata.IUpdateCellsAliasRequest); - /** RowChange before. */ - public before?: (query.IRow|null); + /** UpdateCellsAliasRequest name. */ + public name: string; - /** RowChange after. */ - public after?: (query.IRow|null); + /** UpdateCellsAliasRequest cells_alias. */ + public cells_alias?: (topodata.ICellsAlias|null); /** - * Creates a new RowChange instance using the specified properties. + * Creates a new UpdateCellsAliasRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RowChange instance + * @returns UpdateCellsAliasRequest instance */ - public static create(properties?: binlogdata.IRowChange): binlogdata.RowChange; + public static create(properties?: vtctldata.IUpdateCellsAliasRequest): vtctldata.UpdateCellsAliasRequest; /** - * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @param message RowChange message or plain object to encode + * Encodes the specified UpdateCellsAliasRequest message. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. + * @param message UpdateCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @param message RowChange message or plain object to encode + * Encodes the specified UpdateCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. + * @param message UpdateCellsAliasRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateCellsAliasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RowChange message from the specified reader or buffer. + * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RowChange + * @returns UpdateCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowChange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellsAliasRequest; /** - * Decodes a RowChange message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RowChange + * @returns UpdateCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowChange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellsAliasRequest; /** - * Verifies a RowChange message. + * Verifies an UpdateCellsAliasRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RowChange message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RowChange + * @returns UpdateCellsAliasRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.RowChange; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellsAliasRequest; /** - * Creates a plain object from a RowChange message. Also converts values to other types if specified. - * @param message RowChange + * Creates a plain object from an UpdateCellsAliasRequest message. Also converts values to other types if specified. + * @param message UpdateCellsAliasRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.RowChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateCellsAliasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RowChange to JSON. + * Converts this UpdateCellsAliasRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RowEvent. */ - interface IRowEvent { - - /** RowEvent table_name */ - table_name?: (string|null); - - /** RowEvent row_changes */ - row_changes?: (binlogdata.IRowChange[]|null); + /** Properties of an UpdateCellsAliasResponse. */ + interface IUpdateCellsAliasResponse { - /** RowEvent keyspace */ - keyspace?: (string|null); + /** UpdateCellsAliasResponse name */ + name?: (string|null); - /** RowEvent shard */ - shard?: (string|null); + /** UpdateCellsAliasResponse cells_alias */ + cells_alias?: (topodata.ICellsAlias|null); } - /** Represents a RowEvent. */ - class RowEvent implements IRowEvent { + /** Represents an UpdateCellsAliasResponse. */ + class UpdateCellsAliasResponse implements IUpdateCellsAliasResponse { /** - * Constructs a new RowEvent. + * Constructs a new UpdateCellsAliasResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IRowEvent); - - /** RowEvent table_name. */ - public table_name: string; - - /** RowEvent row_changes. */ - public row_changes: binlogdata.IRowChange[]; + constructor(properties?: vtctldata.IUpdateCellsAliasResponse); - /** RowEvent keyspace. */ - public keyspace: string; + /** UpdateCellsAliasResponse name. */ + public name: string; - /** RowEvent shard. */ - public shard: string; + /** UpdateCellsAliasResponse cells_alias. */ + public cells_alias?: (topodata.ICellsAlias|null); /** - * Creates a new RowEvent instance using the specified properties. + * Creates a new UpdateCellsAliasResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RowEvent instance + * @returns UpdateCellsAliasResponse instance */ - public static create(properties?: binlogdata.IRowEvent): binlogdata.RowEvent; + public static create(properties?: vtctldata.IUpdateCellsAliasResponse): vtctldata.UpdateCellsAliasResponse; /** - * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @param message RowEvent message or plain object to encode + * Encodes the specified UpdateCellsAliasResponse message. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. + * @param message UpdateCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IUpdateCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @param message RowEvent message or plain object to encode + * Encodes the specified UpdateCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. + * @param message UpdateCellsAliasResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IUpdateCellsAliasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RowEvent message from the specified reader or buffer. + * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RowEvent + * @returns UpdateCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.UpdateCellsAliasResponse; /** - * Decodes a RowEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RowEvent + * @returns UpdateCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.UpdateCellsAliasResponse; /** - * Verifies a RowEvent message. + * Verifies an UpdateCellsAliasResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RowEvent + * @returns UpdateCellsAliasResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.RowEvent; + public static fromObject(object: { [k: string]: any }): vtctldata.UpdateCellsAliasResponse; /** - * Creates a plain object from a RowEvent message. Also converts values to other types if specified. - * @param message RowEvent + * Creates a plain object from an UpdateCellsAliasResponse message. Also converts values to other types if specified. + * @param message UpdateCellsAliasResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.RowEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.UpdateCellsAliasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RowEvent to JSON. + * Converts this UpdateCellsAliasResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldEvent. */ - interface IFieldEvent { - - /** FieldEvent table_name */ - table_name?: (string|null); - - /** FieldEvent fields */ - fields?: (query.IField[]|null); - - /** FieldEvent keyspace */ - keyspace?: (string|null); + /** Properties of a ValidateRequest. */ + interface IValidateRequest { - /** FieldEvent shard */ - shard?: (string|null); + /** ValidateRequest ping_tablets */ + ping_tablets?: (boolean|null); } - /** Represents a FieldEvent. */ - class FieldEvent implements IFieldEvent { + /** Represents a ValidateRequest. */ + class ValidateRequest implements IValidateRequest { /** - * Constructs a new FieldEvent. + * Constructs a new ValidateRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IFieldEvent); - - /** FieldEvent table_name. */ - public table_name: string; - - /** FieldEvent fields. */ - public fields: query.IField[]; - - /** FieldEvent keyspace. */ - public keyspace: string; + constructor(properties?: vtctldata.IValidateRequest); - /** FieldEvent shard. */ - public shard: string; + /** ValidateRequest ping_tablets. */ + public ping_tablets: boolean; /** - * Creates a new FieldEvent instance using the specified properties. + * Creates a new ValidateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FieldEvent instance + * @returns ValidateRequest instance */ - public static create(properties?: binlogdata.IFieldEvent): binlogdata.FieldEvent; + public static create(properties?: vtctldata.IValidateRequest): vtctldata.ValidateRequest; /** - * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @param message FieldEvent message or plain object to encode + * Encodes the specified ValidateRequest message. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. + * @param message ValidateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @param message FieldEvent message or plain object to encode + * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. + * @param message ValidateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldEvent message from the specified reader or buffer. + * Decodes a ValidateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldEvent + * @returns ValidateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.FieldEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateRequest; /** - * Decodes a FieldEvent message from the specified reader or buffer, length delimited. + * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldEvent + * @returns ValidateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.FieldEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateRequest; /** - * Verifies a FieldEvent message. + * Verifies a ValidateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldEvent + * @returns ValidateRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.FieldEvent; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateRequest; /** - * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. - * @param message FieldEvent + * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. + * @param message ValidateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.FieldEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldEvent to JSON. + * Converts this ValidateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardGtid. */ - interface IShardGtid { - - /** ShardGtid keyspace */ - keyspace?: (string|null); - - /** ShardGtid shard */ - shard?: (string|null); + /** Properties of a ValidateResponse. */ + interface IValidateResponse { - /** ShardGtid gtid */ - gtid?: (string|null); + /** ValidateResponse results */ + results?: (string[]|null); - /** ShardGtid table_p_ks */ - table_p_ks?: (binlogdata.ITableLastPK[]|null); + /** ValidateResponse results_by_keyspace */ + results_by_keyspace?: ({ [k: string]: vtctldata.IValidateKeyspaceResponse }|null); } - /** Represents a ShardGtid. */ - class ShardGtid implements IShardGtid { + /** Represents a ValidateResponse. */ + class ValidateResponse implements IValidateResponse { /** - * Constructs a new ShardGtid. + * Constructs a new ValidateResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IShardGtid); - - /** ShardGtid keyspace. */ - public keyspace: string; - - /** ShardGtid shard. */ - public shard: string; + constructor(properties?: vtctldata.IValidateResponse); - /** ShardGtid gtid. */ - public gtid: string; + /** ValidateResponse results. */ + public results: string[]; - /** ShardGtid table_p_ks. */ - public table_p_ks: binlogdata.ITableLastPK[]; + /** ValidateResponse results_by_keyspace. */ + public results_by_keyspace: { [k: string]: vtctldata.IValidateKeyspaceResponse }; /** - * Creates a new ShardGtid instance using the specified properties. + * Creates a new ValidateResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ShardGtid instance + * @returns ValidateResponse instance */ - public static create(properties?: binlogdata.IShardGtid): binlogdata.ShardGtid; + public static create(properties?: vtctldata.IValidateResponse): vtctldata.ValidateResponse; /** - * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @param message ShardGtid message or plain object to encode + * Encodes the specified ValidateResponse message. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. + * @param message ValidateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @param message ShardGtid message or plain object to encode + * Encodes the specified ValidateResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. + * @param message ValidateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardGtid message from the specified reader or buffer. + * Decodes a ValidateResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardGtid + * @returns ValidateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.ShardGtid; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateResponse; /** - * Decodes a ShardGtid message from the specified reader or buffer, length delimited. + * Decodes a ValidateResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardGtid + * @returns ValidateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.ShardGtid; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateResponse; /** - * Verifies a ShardGtid message. + * Verifies a ValidateResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardGtid + * @returns ValidateResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.ShardGtid; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateResponse; /** - * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. - * @param message ShardGtid + * Creates a plain object from a ValidateResponse message. Also converts values to other types if specified. + * @param message ValidateResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.ShardGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardGtid to JSON. + * Converts this ValidateResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VGtid. */ - interface IVGtid { + /** Properties of a ValidateKeyspaceRequest. */ + interface IValidateKeyspaceRequest { - /** VGtid shard_gtids */ - shard_gtids?: (binlogdata.IShardGtid[]|null); + /** ValidateKeyspaceRequest keyspace */ + keyspace?: (string|null); + + /** ValidateKeyspaceRequest ping_tablets */ + ping_tablets?: (boolean|null); } - /** Represents a VGtid. */ - class VGtid implements IVGtid { + /** Represents a ValidateKeyspaceRequest. */ + class ValidateKeyspaceRequest implements IValidateKeyspaceRequest { /** - * Constructs a new VGtid. + * Constructs a new ValidateKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVGtid); + constructor(properties?: vtctldata.IValidateKeyspaceRequest); - /** VGtid shard_gtids. */ - public shard_gtids: binlogdata.IShardGtid[]; + /** ValidateKeyspaceRequest keyspace. */ + public keyspace: string; + + /** ValidateKeyspaceRequest ping_tablets. */ + public ping_tablets: boolean; /** - * Creates a new VGtid instance using the specified properties. + * Creates a new ValidateKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VGtid instance + * @returns ValidateKeyspaceRequest instance */ - public static create(properties?: binlogdata.IVGtid): binlogdata.VGtid; + public static create(properties?: vtctldata.IValidateKeyspaceRequest): vtctldata.ValidateKeyspaceRequest; /** - * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @param message VGtid message or plain object to encode + * Encodes the specified ValidateKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. + * @param message ValidateKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @param message VGtid message or plain object to encode + * Encodes the specified ValidateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. + * @param message ValidateKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VGtid message from the specified reader or buffer. + * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VGtid + * @returns ValidateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VGtid; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateKeyspaceRequest; /** - * Decodes a VGtid message from the specified reader or buffer, length delimited. + * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VGtid + * @returns ValidateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VGtid; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateKeyspaceRequest; /** - * Verifies a VGtid message. + * Verifies a ValidateKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VGtid message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VGtid + * @returns ValidateKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.VGtid; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateKeyspaceRequest; /** - * Creates a plain object from a VGtid message. Also converts values to other types if specified. - * @param message VGtid + * Creates a plain object from a ValidateKeyspaceRequest message. Also converts values to other types if specified. + * @param message ValidateKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VGtid to JSON. + * Converts this ValidateKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a KeyspaceShard. */ - interface IKeyspaceShard { + /** Properties of a ValidateKeyspaceResponse. */ + interface IValidateKeyspaceResponse { - /** KeyspaceShard keyspace */ - keyspace?: (string|null); + /** ValidateKeyspaceResponse results */ + results?: (string[]|null); - /** KeyspaceShard shard */ - shard?: (string|null); + /** ValidateKeyspaceResponse results_by_shard */ + results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); } - /** Represents a KeyspaceShard. */ - class KeyspaceShard implements IKeyspaceShard { + /** Represents a ValidateKeyspaceResponse. */ + class ValidateKeyspaceResponse implements IValidateKeyspaceResponse { /** - * Constructs a new KeyspaceShard. + * Constructs a new ValidateKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IKeyspaceShard); + constructor(properties?: vtctldata.IValidateKeyspaceResponse); - /** KeyspaceShard keyspace. */ - public keyspace: string; + /** ValidateKeyspaceResponse results. */ + public results: string[]; - /** KeyspaceShard shard. */ - public shard: string; + /** ValidateKeyspaceResponse results_by_shard. */ + public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; /** - * Creates a new KeyspaceShard instance using the specified properties. + * Creates a new ValidateKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns KeyspaceShard instance + * @returns ValidateKeyspaceResponse instance */ - public static create(properties?: binlogdata.IKeyspaceShard): binlogdata.KeyspaceShard; + public static create(properties?: vtctldata.IValidateKeyspaceResponse): vtctldata.ValidateKeyspaceResponse; /** - * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @param message KeyspaceShard message or plain object to encode + * Encodes the specified ValidateKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. + * @param message ValidateKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @param message KeyspaceShard message or plain object to encode + * Encodes the specified ValidateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. + * @param message ValidateKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KeyspaceShard message from the specified reader or buffer. + * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KeyspaceShard + * @returns ValidateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.KeyspaceShard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateKeyspaceResponse; /** - * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. + * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KeyspaceShard + * @returns ValidateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.KeyspaceShard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateKeyspaceResponse; /** - * Verifies a KeyspaceShard message. + * Verifies a ValidateKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KeyspaceShard + * @returns ValidateKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.KeyspaceShard; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateKeyspaceResponse; /** - * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. - * @param message KeyspaceShard + * Creates a plain object from a ValidateKeyspaceResponse message. Also converts values to other types if specified. + * @param message ValidateKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.KeyspaceShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KeyspaceShard to JSON. + * Converts this ValidateKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** MigrationType enum. */ - enum MigrationType { - TABLES = 0, - SHARDS = 1 - } - - /** Properties of a Journal. */ - interface IJournal { - - /** Journal id */ - id?: (number|Long|null); - - /** Journal migration_type */ - migration_type?: (binlogdata.MigrationType|null); + /** Properties of a ValidateSchemaKeyspaceRequest. */ + interface IValidateSchemaKeyspaceRequest { - /** Journal tables */ - tables?: (string[]|null); + /** ValidateSchemaKeyspaceRequest keyspace */ + keyspace?: (string|null); - /** Journal local_position */ - local_position?: (string|null); + /** ValidateSchemaKeyspaceRequest exclude_tables */ + exclude_tables?: (string[]|null); - /** Journal shard_gtids */ - shard_gtids?: (binlogdata.IShardGtid[]|null); + /** ValidateSchemaKeyspaceRequest include_views */ + include_views?: (boolean|null); - /** Journal participants */ - participants?: (binlogdata.IKeyspaceShard[]|null); + /** ValidateSchemaKeyspaceRequest skip_no_primary */ + skip_no_primary?: (boolean|null); - /** Journal source_workflows */ - source_workflows?: (string[]|null); + /** ValidateSchemaKeyspaceRequest include_vschema */ + include_vschema?: (boolean|null); } - /** Represents a Journal. */ - class Journal implements IJournal { + /** Represents a ValidateSchemaKeyspaceRequest. */ + class ValidateSchemaKeyspaceRequest implements IValidateSchemaKeyspaceRequest { /** - * Constructs a new Journal. + * Constructs a new ValidateSchemaKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IJournal); - - /** Journal id. */ - public id: (number|Long); - - /** Journal migration_type. */ - public migration_type: binlogdata.MigrationType; - - /** Journal tables. */ - public tables: string[]; + constructor(properties?: vtctldata.IValidateSchemaKeyspaceRequest); - /** Journal local_position. */ - public local_position: string; + /** ValidateSchemaKeyspaceRequest keyspace. */ + public keyspace: string; - /** Journal shard_gtids. */ - public shard_gtids: binlogdata.IShardGtid[]; + /** ValidateSchemaKeyspaceRequest exclude_tables. */ + public exclude_tables: string[]; - /** Journal participants. */ - public participants: binlogdata.IKeyspaceShard[]; + /** ValidateSchemaKeyspaceRequest include_views. */ + public include_views: boolean; - /** Journal source_workflows. */ - public source_workflows: string[]; + /** ValidateSchemaKeyspaceRequest skip_no_primary. */ + public skip_no_primary: boolean; + + /** ValidateSchemaKeyspaceRequest include_vschema. */ + public include_vschema: boolean; /** - * Creates a new Journal instance using the specified properties. + * Creates a new ValidateSchemaKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Journal instance + * @returns ValidateSchemaKeyspaceRequest instance */ - public static create(properties?: binlogdata.IJournal): binlogdata.Journal; + public static create(properties?: vtctldata.IValidateSchemaKeyspaceRequest): vtctldata.ValidateSchemaKeyspaceRequest; /** - * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @param message Journal message or plain object to encode + * Encodes the specified ValidateSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * @param message ValidateSchemaKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @param message Journal message or plain object to encode + * Encodes the specified ValidateSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * @param message ValidateSchemaKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateSchemaKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Journal message from the specified reader or buffer. + * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Journal + * @returns ValidateSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Journal; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateSchemaKeyspaceRequest; /** - * Decodes a Journal message from the specified reader or buffer, length delimited. + * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Journal + * @returns ValidateSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Journal; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateSchemaKeyspaceRequest; /** - * Verifies a Journal message. + * Verifies a ValidateSchemaKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Journal message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Journal + * @returns ValidateSchemaKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.Journal; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateSchemaKeyspaceRequest; /** - * Creates a plain object from a Journal message. Also converts values to other types if specified. - * @param message Journal + * Creates a plain object from a ValidateSchemaKeyspaceRequest message. Also converts values to other types if specified. + * @param message ValidateSchemaKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.Journal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateSchemaKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Journal to JSON. + * Converts this ValidateSchemaKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VEvent. */ - interface IVEvent { - - /** VEvent type */ - type?: (binlogdata.VEventType|null); - - /** VEvent timestamp */ - timestamp?: (number|Long|null); - - /** VEvent gtid */ - gtid?: (string|null); - - /** VEvent statement */ - statement?: (string|null); - - /** VEvent row_event */ - row_event?: (binlogdata.IRowEvent|null); - - /** VEvent field_event */ - field_event?: (binlogdata.IFieldEvent|null); - - /** VEvent vgtid */ - vgtid?: (binlogdata.IVGtid|null); - - /** VEvent journal */ - journal?: (binlogdata.IJournal|null); - - /** VEvent dml */ - dml?: (string|null); - - /** VEvent current_time */ - current_time?: (number|Long|null); - - /** VEvent last_p_k_event */ - last_p_k_event?: (binlogdata.ILastPKEvent|null); - - /** VEvent keyspace */ - keyspace?: (string|null); + /** Properties of a ValidateSchemaKeyspaceResponse. */ + interface IValidateSchemaKeyspaceResponse { - /** VEvent shard */ - shard?: (string|null); + /** ValidateSchemaKeyspaceResponse results */ + results?: (string[]|null); - /** VEvent throttled */ - throttled?: (boolean|null); + /** ValidateSchemaKeyspaceResponse results_by_shard */ + results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); } - /** Represents a VEvent. */ - class VEvent implements IVEvent { + /** Represents a ValidateSchemaKeyspaceResponse. */ + class ValidateSchemaKeyspaceResponse implements IValidateSchemaKeyspaceResponse { /** - * Constructs a new VEvent. + * Constructs a new ValidateSchemaKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVEvent); - - /** VEvent type. */ - public type: binlogdata.VEventType; - - /** VEvent timestamp. */ - public timestamp: (number|Long); - - /** VEvent gtid. */ - public gtid: string; - - /** VEvent statement. */ - public statement: string; - - /** VEvent row_event. */ - public row_event?: (binlogdata.IRowEvent|null); - - /** VEvent field_event. */ - public field_event?: (binlogdata.IFieldEvent|null); - - /** VEvent vgtid. */ - public vgtid?: (binlogdata.IVGtid|null); - - /** VEvent journal. */ - public journal?: (binlogdata.IJournal|null); - - /** VEvent dml. */ - public dml: string; - - /** VEvent current_time. */ - public current_time: (number|Long); - - /** VEvent last_p_k_event. */ - public last_p_k_event?: (binlogdata.ILastPKEvent|null); - - /** VEvent keyspace. */ - public keyspace: string; + constructor(properties?: vtctldata.IValidateSchemaKeyspaceResponse); - /** VEvent shard. */ - public shard: string; + /** ValidateSchemaKeyspaceResponse results. */ + public results: string[]; - /** VEvent throttled. */ - public throttled: boolean; + /** ValidateSchemaKeyspaceResponse results_by_shard. */ + public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; /** - * Creates a new VEvent instance using the specified properties. + * Creates a new ValidateSchemaKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VEvent instance + * @returns ValidateSchemaKeyspaceResponse instance */ - public static create(properties?: binlogdata.IVEvent): binlogdata.VEvent; + public static create(properties?: vtctldata.IValidateSchemaKeyspaceResponse): vtctldata.ValidateSchemaKeyspaceResponse; /** - * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @param message VEvent message or plain object to encode + * Encodes the specified ValidateSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. + * @param message ValidateSchemaKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @param message VEvent message or plain object to encode + * Encodes the specified ValidateSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. + * @param message ValidateSchemaKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateSchemaKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VEvent message from the specified reader or buffer. + * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VEvent + * @returns ValidateSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateSchemaKeyspaceResponse; /** - * Decodes a VEvent message from the specified reader or buffer, length delimited. + * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VEvent + * @returns ValidateSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateSchemaKeyspaceResponse; /** - * Verifies a VEvent message. + * Verifies a ValidateSchemaKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VEvent + * @returns ValidateSchemaKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.VEvent; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateSchemaKeyspaceResponse; /** - * Creates a plain object from a VEvent message. Also converts values to other types if specified. - * @param message VEvent + * Creates a plain object from a ValidateSchemaKeyspaceResponse message. Also converts values to other types if specified. + * @param message ValidateSchemaKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateSchemaKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VEvent to JSON. + * Converts this ValidateSchemaKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MinimalTable. */ - interface IMinimalTable { + /** Properties of a ValidateShardRequest. */ + interface IValidateShardRequest { - /** MinimalTable name */ - name?: (string|null); + /** ValidateShardRequest keyspace */ + keyspace?: (string|null); - /** MinimalTable fields */ - fields?: (query.IField[]|null); + /** ValidateShardRequest shard */ + shard?: (string|null); - /** MinimalTable p_k_columns */ - p_k_columns?: ((number|Long)[]|null); + /** ValidateShardRequest ping_tablets */ + ping_tablets?: (boolean|null); } - /** Represents a MinimalTable. */ - class MinimalTable implements IMinimalTable { + /** Represents a ValidateShardRequest. */ + class ValidateShardRequest implements IValidateShardRequest { /** - * Constructs a new MinimalTable. + * Constructs a new ValidateShardRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IMinimalTable); + constructor(properties?: vtctldata.IValidateShardRequest); - /** MinimalTable name. */ - public name: string; + /** ValidateShardRequest keyspace. */ + public keyspace: string; - /** MinimalTable fields. */ - public fields: query.IField[]; + /** ValidateShardRequest shard. */ + public shard: string; - /** MinimalTable p_k_columns. */ - public p_k_columns: (number|Long)[]; + /** ValidateShardRequest ping_tablets. */ + public ping_tablets: boolean; /** - * Creates a new MinimalTable instance using the specified properties. + * Creates a new ValidateShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MinimalTable instance + * @returns ValidateShardRequest instance */ - public static create(properties?: binlogdata.IMinimalTable): binlogdata.MinimalTable; + public static create(properties?: vtctldata.IValidateShardRequest): vtctldata.ValidateShardRequest; /** - * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @param message MinimalTable message or plain object to encode + * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. + * @param message ValidateShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @param message MinimalTable message or plain object to encode + * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. + * @param message ValidateShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MinimalTable message from the specified reader or buffer. + * Decodes a ValidateShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MinimalTable + * @returns ValidateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalTable; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateShardRequest; /** - * Decodes a MinimalTable message from the specified reader or buffer, length delimited. + * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MinimalTable + * @returns ValidateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalTable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateShardRequest; /** - * Verifies a MinimalTable message. + * Verifies a ValidateShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MinimalTable + * @returns ValidateShardRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.MinimalTable; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateShardRequest; /** - * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. - * @param message MinimalTable + * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. + * @param message ValidateShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.MinimalTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MinimalTable to JSON. + * Converts this ValidateShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MinimalSchema. */ - interface IMinimalSchema { + /** Properties of a ValidateShardResponse. */ + interface IValidateShardResponse { - /** MinimalSchema tables */ - tables?: (binlogdata.IMinimalTable[]|null); + /** ValidateShardResponse results */ + results?: (string[]|null); } - /** Represents a MinimalSchema. */ - class MinimalSchema implements IMinimalSchema { + /** Represents a ValidateShardResponse. */ + class ValidateShardResponse implements IValidateShardResponse { /** - * Constructs a new MinimalSchema. + * Constructs a new ValidateShardResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IMinimalSchema); + constructor(properties?: vtctldata.IValidateShardResponse); - /** MinimalSchema tables. */ - public tables: binlogdata.IMinimalTable[]; + /** ValidateShardResponse results. */ + public results: string[]; /** - * Creates a new MinimalSchema instance using the specified properties. + * Creates a new ValidateShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MinimalSchema instance + * @returns ValidateShardResponse instance */ - public static create(properties?: binlogdata.IMinimalSchema): binlogdata.MinimalSchema; + public static create(properties?: vtctldata.IValidateShardResponse): vtctldata.ValidateShardResponse; /** - * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @param message MinimalSchema message or plain object to encode + * Encodes the specified ValidateShardResponse message. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. + * @param message ValidateShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @param message MinimalSchema message or plain object to encode + * Encodes the specified ValidateShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. + * @param message ValidateShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MinimalSchema message from the specified reader or buffer. + * Decodes a ValidateShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MinimalSchema + * @returns ValidateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalSchema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateShardResponse; /** - * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. + * Decodes a ValidateShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MinimalSchema + * @returns ValidateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalSchema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateShardResponse; /** - * Verifies a MinimalSchema message. + * Verifies a ValidateShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MinimalSchema + * @returns ValidateShardResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.MinimalSchema; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateShardResponse; /** - * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. - * @param message MinimalSchema + * Creates a plain object from a ValidateShardResponse message. Also converts values to other types if specified. + * @param message ValidateShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.MinimalSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MinimalSchema to JSON. + * Converts this ValidateShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamRequest. */ - interface IVStreamRequest { - - /** VStreamRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRequest target */ - target?: (query.ITarget|null); - - /** VStreamRequest position */ - position?: (string|null); - - /** VStreamRequest filter */ - filter?: (binlogdata.IFilter|null); + /** Properties of a ValidateVersionKeyspaceRequest. */ + interface IValidateVersionKeyspaceRequest { - /** VStreamRequest table_last_p_ks */ - table_last_p_ks?: (binlogdata.ITableLastPK[]|null); + /** ValidateVersionKeyspaceRequest keyspace */ + keyspace?: (string|null); } - /** Represents a VStreamRequest. */ - class VStreamRequest implements IVStreamRequest { + /** Represents a ValidateVersionKeyspaceRequest. */ + class ValidateVersionKeyspaceRequest implements IValidateVersionKeyspaceRequest { /** - * Constructs a new VStreamRequest. + * Constructs a new ValidateVersionKeyspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamRequest); - - /** VStreamRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRequest target. */ - public target?: (query.ITarget|null); - - /** VStreamRequest position. */ - public position: string; - - /** VStreamRequest filter. */ - public filter?: (binlogdata.IFilter|null); + constructor(properties?: vtctldata.IValidateVersionKeyspaceRequest); - /** VStreamRequest table_last_p_ks. */ - public table_last_p_ks: binlogdata.ITableLastPK[]; + /** ValidateVersionKeyspaceRequest keyspace. */ + public keyspace: string; /** - * Creates a new VStreamRequest instance using the specified properties. + * Creates a new ValidateVersionKeyspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamRequest instance + * @returns ValidateVersionKeyspaceRequest instance */ - public static create(properties?: binlogdata.IVStreamRequest): binlogdata.VStreamRequest; + public static create(properties?: vtctldata.IValidateVersionKeyspaceRequest): vtctldata.ValidateVersionKeyspaceRequest; /** - * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @param message VStreamRequest message or plain object to encode + * Encodes the specified ValidateVersionKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. + * @param message ValidateVersionKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVersionKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @param message VStreamRequest message or plain object to encode + * Encodes the specified ValidateVersionKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. + * @param message ValidateVersionKeyspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVersionKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamRequest message from the specified reader or buffer. + * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamRequest + * @returns ValidateVersionKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionKeyspaceRequest; /** - * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamRequest + * @returns ValidateVersionKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionKeyspaceRequest; /** - * Verifies a VStreamRequest message. + * Verifies a ValidateVersionKeyspaceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamRequest + * @returns ValidateVersionKeyspaceRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionKeyspaceRequest; /** - * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. - * @param message VStreamRequest + * Creates a plain object from a ValidateVersionKeyspaceRequest message. Also converts values to other types if specified. + * @param message ValidateVersionKeyspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVersionKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamRequest to JSON. + * Converts this ValidateVersionKeyspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamResponse. */ - interface IVStreamResponse { + /** Properties of a ValidateVersionKeyspaceResponse. */ + interface IValidateVersionKeyspaceResponse { - /** VStreamResponse events */ - events?: (binlogdata.IVEvent[]|null); + /** ValidateVersionKeyspaceResponse results */ + results?: (string[]|null); + + /** ValidateVersionKeyspaceResponse results_by_shard */ + results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); } - /** Represents a VStreamResponse. */ - class VStreamResponse implements IVStreamResponse { + /** Represents a ValidateVersionKeyspaceResponse. */ + class ValidateVersionKeyspaceResponse implements IValidateVersionKeyspaceResponse { /** - * Constructs a new VStreamResponse. + * Constructs a new ValidateVersionKeyspaceResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamResponse); + constructor(properties?: vtctldata.IValidateVersionKeyspaceResponse); - /** VStreamResponse events. */ - public events: binlogdata.IVEvent[]; + /** ValidateVersionKeyspaceResponse results. */ + public results: string[]; + + /** ValidateVersionKeyspaceResponse results_by_shard. */ + public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; /** - * Creates a new VStreamResponse instance using the specified properties. + * Creates a new ValidateVersionKeyspaceResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamResponse instance + * @returns ValidateVersionKeyspaceResponse instance */ - public static create(properties?: binlogdata.IVStreamResponse): binlogdata.VStreamResponse; + public static create(properties?: vtctldata.IValidateVersionKeyspaceResponse): vtctldata.ValidateVersionKeyspaceResponse; /** - * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @param message VStreamResponse message or plain object to encode + * Encodes the specified ValidateVersionKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. + * @param message ValidateVersionKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVersionKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @param message VStreamResponse message or plain object to encode + * Encodes the specified ValidateVersionKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. + * @param message ValidateVersionKeyspaceResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVersionKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamResponse message from the specified reader or buffer. + * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamResponse + * @returns ValidateVersionKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionKeyspaceResponse; /** - * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamResponse + * @returns ValidateVersionKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionKeyspaceResponse; /** - * Verifies a VStreamResponse message. + * Verifies a ValidateVersionKeyspaceResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamResponse + * @returns ValidateVersionKeyspaceResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionKeyspaceResponse; /** - * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. - * @param message VStreamResponse + * Creates a plain object from a ValidateVersionKeyspaceResponse message. Also converts values to other types if specified. + * @param message ValidateVersionKeyspaceResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVersionKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamResponse to JSON. + * Converts this ValidateVersionKeyspaceResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamRowsRequest. */ - interface IVStreamRowsRequest { - - /** VStreamRowsRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRowsRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRowsRequest target */ - target?: (query.ITarget|null); + /** Properties of a ValidateVersionShardRequest. */ + interface IValidateVersionShardRequest { - /** VStreamRowsRequest query */ - query?: (string|null); + /** ValidateVersionShardRequest keyspace */ + keyspace?: (string|null); - /** VStreamRowsRequest lastpk */ - lastpk?: (query.IQueryResult|null); + /** ValidateVersionShardRequest shard */ + shard?: (string|null); } - /** Represents a VStreamRowsRequest. */ - class VStreamRowsRequest implements IVStreamRowsRequest { + /** Represents a ValidateVersionShardRequest. */ + class ValidateVersionShardRequest implements IValidateVersionShardRequest { /** - * Constructs a new VStreamRowsRequest. + * Constructs a new ValidateVersionShardRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamRowsRequest); - - /** VStreamRowsRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRowsRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRowsRequest target. */ - public target?: (query.ITarget|null); + constructor(properties?: vtctldata.IValidateVersionShardRequest); - /** VStreamRowsRequest query. */ - public query: string; + /** ValidateVersionShardRequest keyspace. */ + public keyspace: string; - /** VStreamRowsRequest lastpk. */ - public lastpk?: (query.IQueryResult|null); + /** ValidateVersionShardRequest shard. */ + public shard: string; /** - * Creates a new VStreamRowsRequest instance using the specified properties. + * Creates a new ValidateVersionShardRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamRowsRequest instance + * @returns ValidateVersionShardRequest instance */ - public static create(properties?: binlogdata.IVStreamRowsRequest): binlogdata.VStreamRowsRequest; + public static create(properties?: vtctldata.IValidateVersionShardRequest): vtctldata.ValidateVersionShardRequest; /** - * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @param message VStreamRowsRequest message or plain object to encode + * Encodes the specified ValidateVersionShardRequest message. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. + * @param message ValidateVersionShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVersionShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @param message VStreamRowsRequest message or plain object to encode + * Encodes the specified ValidateVersionShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. + * @param message ValidateVersionShardRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVersionShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer. + * Decodes a ValidateVersionShardRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamRowsRequest + * @returns ValidateVersionShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionShardRequest; /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionShardRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamRowsRequest + * @returns ValidateVersionShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionShardRequest; /** - * Verifies a VStreamRowsRequest message. + * Verifies a ValidateVersionShardRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionShardRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamRowsRequest + * @returns ValidateVersionShardRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionShardRequest; /** - * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. - * @param message VStreamRowsRequest + * Creates a plain object from a ValidateVersionShardRequest message. Also converts values to other types if specified. + * @param message ValidateVersionShardRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVersionShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamRowsRequest to JSON. + * Converts this ValidateVersionShardRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamRowsResponse. */ - interface IVStreamRowsResponse { - - /** VStreamRowsResponse fields */ - fields?: (query.IField[]|null); - - /** VStreamRowsResponse pkfields */ - pkfields?: (query.IField[]|null); - - /** VStreamRowsResponse gtid */ - gtid?: (string|null); - - /** VStreamRowsResponse rows */ - rows?: (query.IRow[]|null); - - /** VStreamRowsResponse lastpk */ - lastpk?: (query.IRow|null); - - /** VStreamRowsResponse throttled */ - throttled?: (boolean|null); + /** Properties of a ValidateVersionShardResponse. */ + interface IValidateVersionShardResponse { - /** VStreamRowsResponse heartbeat */ - heartbeat?: (boolean|null); + /** ValidateVersionShardResponse results */ + results?: (string[]|null); } - /** Represents a VStreamRowsResponse. */ - class VStreamRowsResponse implements IVStreamRowsResponse { + /** Represents a ValidateVersionShardResponse. */ + class ValidateVersionShardResponse implements IValidateVersionShardResponse { /** - * Constructs a new VStreamRowsResponse. + * Constructs a new ValidateVersionShardResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamRowsResponse); - - /** VStreamRowsResponse fields. */ - public fields: query.IField[]; - - /** VStreamRowsResponse pkfields. */ - public pkfields: query.IField[]; - - /** VStreamRowsResponse gtid. */ - public gtid: string; - - /** VStreamRowsResponse rows. */ - public rows: query.IRow[]; - - /** VStreamRowsResponse lastpk. */ - public lastpk?: (query.IRow|null); - - /** VStreamRowsResponse throttled. */ - public throttled: boolean; + constructor(properties?: vtctldata.IValidateVersionShardResponse); - /** VStreamRowsResponse heartbeat. */ - public heartbeat: boolean; + /** ValidateVersionShardResponse results. */ + public results: string[]; /** - * Creates a new VStreamRowsResponse instance using the specified properties. + * Creates a new ValidateVersionShardResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamRowsResponse instance + * @returns ValidateVersionShardResponse instance */ - public static create(properties?: binlogdata.IVStreamRowsResponse): binlogdata.VStreamRowsResponse; + public static create(properties?: vtctldata.IValidateVersionShardResponse): vtctldata.ValidateVersionShardResponse; /** - * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @param message VStreamRowsResponse message or plain object to encode + * Encodes the specified ValidateVersionShardResponse message. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. + * @param message ValidateVersionShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVersionShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @param message VStreamRowsResponse message or plain object to encode + * Encodes the specified ValidateVersionShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. + * @param message ValidateVersionShardResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVersionShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer. + * Decodes a ValidateVersionShardResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamRowsResponse + * @returns ValidateVersionShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVersionShardResponse; /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionShardResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamRowsResponse + * @returns ValidateVersionShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVersionShardResponse; /** - * Verifies a VStreamRowsResponse message. + * Verifies a ValidateVersionShardResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionShardResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamRowsResponse + * @returns ValidateVersionShardResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVersionShardResponse; /** - * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. - * @param message VStreamRowsResponse + * Creates a plain object from a ValidateVersionShardResponse message. Also converts values to other types if specified. + * @param message ValidateVersionShardResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVersionShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamRowsResponse to JSON. + * Converts this ValidateVersionShardResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LastPKEvent. */ - interface ILastPKEvent { + /** Properties of a ValidateVSchemaRequest. */ + interface IValidateVSchemaRequest { - /** LastPKEvent table_last_p_k */ - table_last_p_k?: (binlogdata.ITableLastPK|null); + /** ValidateVSchemaRequest keyspace */ + keyspace?: (string|null); - /** LastPKEvent completed */ - completed?: (boolean|null); + /** ValidateVSchemaRequest shards */ + shards?: (string[]|null); + + /** ValidateVSchemaRequest exclude_tables */ + exclude_tables?: (string[]|null); + + /** ValidateVSchemaRequest include_views */ + include_views?: (boolean|null); } - /** Represents a LastPKEvent. */ - class LastPKEvent implements ILastPKEvent { + /** Represents a ValidateVSchemaRequest. */ + class ValidateVSchemaRequest implements IValidateVSchemaRequest { /** - * Constructs a new LastPKEvent. + * Constructs a new ValidateVSchemaRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.ILastPKEvent); + constructor(properties?: vtctldata.IValidateVSchemaRequest); - /** LastPKEvent table_last_p_k. */ - public table_last_p_k?: (binlogdata.ITableLastPK|null); + /** ValidateVSchemaRequest keyspace. */ + public keyspace: string; - /** LastPKEvent completed. */ - public completed: boolean; + /** ValidateVSchemaRequest shards. */ + public shards: string[]; + + /** ValidateVSchemaRequest exclude_tables. */ + public exclude_tables: string[]; + + /** ValidateVSchemaRequest include_views. */ + public include_views: boolean; /** - * Creates a new LastPKEvent instance using the specified properties. + * Creates a new ValidateVSchemaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LastPKEvent instance + * @returns ValidateVSchemaRequest instance */ - public static create(properties?: binlogdata.ILastPKEvent): binlogdata.LastPKEvent; + public static create(properties?: vtctldata.IValidateVSchemaRequest): vtctldata.ValidateVSchemaRequest; /** - * Encodes the specified LastPKEvent message. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. - * @param message LastPKEvent message or plain object to encode + * Encodes the specified ValidateVSchemaRequest message. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. + * @param message ValidateVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LastPKEvent message, length delimited. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. - * @param message LastPKEvent message or plain object to encode + * Encodes the specified ValidateVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. + * @param message ValidateVSchemaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LastPKEvent message from the specified reader or buffer. + * Decodes a ValidateVSchemaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LastPKEvent + * @returns ValidateVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.LastPKEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVSchemaRequest; /** - * Decodes a LastPKEvent message from the specified reader or buffer, length delimited. + * Decodes a ValidateVSchemaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LastPKEvent + * @returns ValidateVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.LastPKEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVSchemaRequest; /** - * Verifies a LastPKEvent message. + * Verifies a ValidateVSchemaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LastPKEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LastPKEvent + * @returns ValidateVSchemaRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.LastPKEvent; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVSchemaRequest; /** - * Creates a plain object from a LastPKEvent message. Also converts values to other types if specified. - * @param message LastPKEvent + * Creates a plain object from a ValidateVSchemaRequest message. Also converts values to other types if specified. + * @param message ValidateVSchemaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.LastPKEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LastPKEvent to JSON. + * Converts this ValidateVSchemaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TableLastPK. */ - interface ITableLastPK { + /** Properties of a ValidateVSchemaResponse. */ + interface IValidateVSchemaResponse { - /** TableLastPK table_name */ - table_name?: (string|null); + /** ValidateVSchemaResponse results */ + results?: (string[]|null); - /** TableLastPK lastpk */ - lastpk?: (query.IQueryResult|null); + /** ValidateVSchemaResponse results_by_shard */ + results_by_shard?: ({ [k: string]: vtctldata.IValidateShardResponse }|null); } - /** Represents a TableLastPK. */ - class TableLastPK implements ITableLastPK { + /** Represents a ValidateVSchemaResponse. */ + class ValidateVSchemaResponse implements IValidateVSchemaResponse { /** - * Constructs a new TableLastPK. + * Constructs a new ValidateVSchemaResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.ITableLastPK); + constructor(properties?: vtctldata.IValidateVSchemaResponse); - /** TableLastPK table_name. */ - public table_name: string; + /** ValidateVSchemaResponse results. */ + public results: string[]; - /** TableLastPK lastpk. */ - public lastpk?: (query.IQueryResult|null); + /** ValidateVSchemaResponse results_by_shard. */ + public results_by_shard: { [k: string]: vtctldata.IValidateShardResponse }; /** - * Creates a new TableLastPK instance using the specified properties. + * Creates a new ValidateVSchemaResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TableLastPK instance + * @returns ValidateVSchemaResponse instance */ - public static create(properties?: binlogdata.ITableLastPK): binlogdata.TableLastPK; + public static create(properties?: vtctldata.IValidateVSchemaResponse): vtctldata.ValidateVSchemaResponse; /** - * Encodes the specified TableLastPK message. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. - * @param message TableLastPK message or plain object to encode + * Encodes the specified ValidateVSchemaResponse message. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. + * @param message ValidateVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IValidateVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TableLastPK message, length delimited. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. - * @param message TableLastPK message or plain object to encode + * Encodes the specified ValidateVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. + * @param message ValidateVSchemaResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IValidateVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TableLastPK message from the specified reader or buffer. + * Decodes a ValidateVSchemaResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TableLastPK + * @returns ValidateVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.TableLastPK; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ValidateVSchemaResponse; /** - * Decodes a TableLastPK message from the specified reader or buffer, length delimited. + * Decodes a ValidateVSchemaResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TableLastPK + * @returns ValidateVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.TableLastPK; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ValidateVSchemaResponse; /** - * Verifies a TableLastPK message. + * Verifies a ValidateVSchemaResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TableLastPK message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TableLastPK + * @returns ValidateVSchemaResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.TableLastPK; + public static fromObject(object: { [k: string]: any }): vtctldata.ValidateVSchemaResponse; /** - * Creates a plain object from a TableLastPK message. Also converts values to other types if specified. - * @param message TableLastPK + * Creates a plain object from a ValidateVSchemaResponse message. Also converts values to other types if specified. + * @param message ValidateVSchemaResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.TableLastPK, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.ValidateVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TableLastPK to JSON. + * Converts this ValidateVSchemaResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamResultsRequest. */ - interface IVStreamResultsRequest { - - /** VStreamResultsRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamResultsRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); + /** Properties of a WorkflowUpdateRequest. */ + interface IWorkflowUpdateRequest { - /** VStreamResultsRequest target */ - target?: (query.ITarget|null); + /** WorkflowUpdateRequest keyspace */ + keyspace?: (string|null); - /** VStreamResultsRequest query */ - query?: (string|null); + /** WorkflowUpdateRequest tablet_request */ + tablet_request?: (tabletmanagerdata.IUpdateVRWorkflowRequest|null); } - /** Represents a VStreamResultsRequest. */ - class VStreamResultsRequest implements IVStreamResultsRequest { + /** Represents a WorkflowUpdateRequest. */ + class WorkflowUpdateRequest implements IWorkflowUpdateRequest { /** - * Constructs a new VStreamResultsRequest. + * Constructs a new WorkflowUpdateRequest. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamResultsRequest); - - /** VStreamResultsRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamResultsRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); + constructor(properties?: vtctldata.IWorkflowUpdateRequest); - /** VStreamResultsRequest target. */ - public target?: (query.ITarget|null); + /** WorkflowUpdateRequest keyspace. */ + public keyspace: string; - /** VStreamResultsRequest query. */ - public query: string; + /** WorkflowUpdateRequest tablet_request. */ + public tablet_request?: (tabletmanagerdata.IUpdateVRWorkflowRequest|null); /** - * Creates a new VStreamResultsRequest instance using the specified properties. + * Creates a new WorkflowUpdateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamResultsRequest instance + * @returns WorkflowUpdateRequest instance */ - public static create(properties?: binlogdata.IVStreamResultsRequest): binlogdata.VStreamResultsRequest; + public static create(properties?: vtctldata.IWorkflowUpdateRequest): vtctldata.WorkflowUpdateRequest; /** - * Encodes the specified VStreamResultsRequest message. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. - * @param message VStreamResultsRequest message or plain object to encode + * Encodes the specified WorkflowUpdateRequest message. Does not implicitly {@link vtctldata.WorkflowUpdateRequest.verify|verify} messages. + * @param message WorkflowUpdateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IWorkflowUpdateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamResultsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. - * @param message VStreamResultsRequest message or plain object to encode + * Encodes the specified WorkflowUpdateRequest message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateRequest.verify|verify} messages. + * @param message WorkflowUpdateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IWorkflowUpdateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamResultsRequest message from the specified reader or buffer. + * Decodes a WorkflowUpdateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamResultsRequest + * @returns WorkflowUpdateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResultsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.WorkflowUpdateRequest; /** - * Decodes a VStreamResultsRequest message from the specified reader or buffer, length delimited. + * Decodes a WorkflowUpdateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamResultsRequest + * @returns WorkflowUpdateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResultsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.WorkflowUpdateRequest; /** - * Verifies a VStreamResultsRequest message. + * Verifies a WorkflowUpdateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamResultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WorkflowUpdateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamResultsRequest + * @returns WorkflowUpdateRequest */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResultsRequest; + public static fromObject(object: { [k: string]: any }): vtctldata.WorkflowUpdateRequest; /** - * Creates a plain object from a VStreamResultsRequest message. Also converts values to other types if specified. - * @param message VStreamResultsRequest + * Creates a plain object from a WorkflowUpdateRequest message. Also converts values to other types if specified. + * @param message WorkflowUpdateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.WorkflowUpdateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamResultsRequest to JSON. + * Converts this WorkflowUpdateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VStreamResultsResponse. */ - interface IVStreamResultsResponse { - - /** VStreamResultsResponse fields */ - fields?: (query.IField[]|null); + /** Properties of a WorkflowUpdateResponse. */ + interface IWorkflowUpdateResponse { - /** VStreamResultsResponse gtid */ - gtid?: (string|null); + /** WorkflowUpdateResponse summary */ + summary?: (string|null); - /** VStreamResultsResponse rows */ - rows?: (query.IRow[]|null); + /** WorkflowUpdateResponse details */ + details?: (vtctldata.WorkflowUpdateResponse.ITabletInfo[]|null); } - /** Represents a VStreamResultsResponse. */ - class VStreamResultsResponse implements IVStreamResultsResponse { + /** Represents a WorkflowUpdateResponse. */ + class WorkflowUpdateResponse implements IWorkflowUpdateResponse { /** - * Constructs a new VStreamResultsResponse. + * Constructs a new WorkflowUpdateResponse. * @param [properties] Properties to set */ - constructor(properties?: binlogdata.IVStreamResultsResponse); - - /** VStreamResultsResponse fields. */ - public fields: query.IField[]; + constructor(properties?: vtctldata.IWorkflowUpdateResponse); - /** VStreamResultsResponse gtid. */ - public gtid: string; + /** WorkflowUpdateResponse summary. */ + public summary: string; - /** VStreamResultsResponse rows. */ - public rows: query.IRow[]; + /** WorkflowUpdateResponse details. */ + public details: vtctldata.WorkflowUpdateResponse.ITabletInfo[]; /** - * Creates a new VStreamResultsResponse instance using the specified properties. + * Creates a new WorkflowUpdateResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VStreamResultsResponse instance + * @returns WorkflowUpdateResponse instance */ - public static create(properties?: binlogdata.IVStreamResultsResponse): binlogdata.VStreamResultsResponse; + public static create(properties?: vtctldata.IWorkflowUpdateResponse): vtctldata.WorkflowUpdateResponse; /** - * Encodes the specified VStreamResultsResponse message. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. - * @param message VStreamResultsResponse message or plain object to encode + * Encodes the specified WorkflowUpdateResponse message. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.verify|verify} messages. + * @param message WorkflowUpdateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: binlogdata.IVStreamResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtctldata.IWorkflowUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VStreamResultsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. - * @param message VStreamResultsResponse message or plain object to encode + * Encodes the specified WorkflowUpdateResponse message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.verify|verify} messages. + * @param message WorkflowUpdateResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: binlogdata.IVStreamResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtctldata.IWorkflowUpdateResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VStreamResultsResponse message from the specified reader or buffer. + * Decodes a WorkflowUpdateResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VStreamResultsResponse + * @returns WorkflowUpdateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResultsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.WorkflowUpdateResponse; /** - * Decodes a VStreamResultsResponse message from the specified reader or buffer, length delimited. + * Decodes a WorkflowUpdateResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VStreamResultsResponse + * @returns WorkflowUpdateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResultsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.WorkflowUpdateResponse; /** - * Verifies a VStreamResultsResponse message. + * Verifies a WorkflowUpdateResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VStreamResultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WorkflowUpdateResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VStreamResultsResponse + * @returns WorkflowUpdateResponse */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResultsResponse; + public static fromObject(object: { [k: string]: any }): vtctldata.WorkflowUpdateResponse; /** - * Creates a plain object from a VStreamResultsResponse message. Also converts values to other types if specified. - * @param message VStreamResultsResponse + * Creates a plain object from a WorkflowUpdateResponse message. Also converts values to other types if specified. + * @param message WorkflowUpdateResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: binlogdata.VStreamResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtctldata.WorkflowUpdateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VStreamResultsResponse to JSON. + * Converts this WorkflowUpdateResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace WorkflowUpdateResponse { + + /** Properties of a TabletInfo. */ + interface ITabletInfo { + + /** TabletInfo tablet */ + tablet?: (string|null); + + /** TabletInfo changed */ + changed?: (boolean|null); + } + + /** Represents a TabletInfo. */ + class TabletInfo implements ITabletInfo { + + /** + * Constructs a new TabletInfo. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.WorkflowUpdateResponse.ITabletInfo); + + /** TabletInfo tablet. */ + public tablet: string; + + /** TabletInfo changed. */ + public changed: boolean; + + /** + * Creates a new TabletInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TabletInfo instance + */ + public static create(properties?: vtctldata.WorkflowUpdateResponse.ITabletInfo): vtctldata.WorkflowUpdateResponse.TabletInfo; + + /** + * Encodes the specified TabletInfo message. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.TabletInfo.verify|verify} messages. + * @param message TabletInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.WorkflowUpdateResponse.ITabletInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TabletInfo message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.TabletInfo.verify|verify} messages. + * @param message TabletInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.WorkflowUpdateResponse.ITabletInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TabletInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TabletInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.WorkflowUpdateResponse.TabletInfo; + + /** + * Decodes a TabletInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TabletInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.WorkflowUpdateResponse.TabletInfo; + + /** + * Verifies a TabletInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TabletInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TabletInfo + */ + public static fromObject(object: { [k: string]: any }): vtctldata.WorkflowUpdateResponse.TabletInfo; + + /** + * Creates a plain object from a TabletInfo message. Also converts values to other types if specified. + * @param message TabletInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.WorkflowUpdateResponse.TabletInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TabletInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 8192e1b05d0..33ba9011878 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -30102,7 +30102,7 @@ $root.topodata = (function() { if (!writer) writer = $Writer.create(); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.uid); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) @@ -30147,7 +30147,7 @@ $root.topodata = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uid = reader.uint32(); + message.uid = reader.int32(); break; case 2: message.keyspace = reader.string(); @@ -30235,7 +30235,7 @@ $root.topodata = (function() { return object; var message = new $root.topodata.Shard.SourceShard(); if (object.uid != null) - message.uid = object.uid >>> 0; + message.uid = object.uid | 0; if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) @@ -47883,7 +47883,7 @@ $root.tabletmanagerdata = (function() { * Properties of a VReplicationWaitForPosRequest. * @memberof tabletmanagerdata * @interface IVReplicationWaitForPosRequest - * @property {number|Long|null} [id] VReplicationWaitForPosRequest id + * @property {number|null} [id] VReplicationWaitForPosRequest id * @property {string|null} [position] VReplicationWaitForPosRequest position */ @@ -47904,11 +47904,11 @@ $root.tabletmanagerdata = (function() { /** * VReplicationWaitForPosRequest id. - * @member {number|Long} id + * @member {number} id * @memberof tabletmanagerdata.VReplicationWaitForPosRequest * @instance */ - VReplicationWaitForPosRequest.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VReplicationWaitForPosRequest.prototype.id = 0; /** * VReplicationWaitForPosRequest position. @@ -47943,7 +47943,7 @@ $root.tabletmanagerdata = (function() { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.position != null && Object.hasOwnProperty.call(message, "position")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.position); return writer; @@ -47981,7 +47981,7 @@ $root.tabletmanagerdata = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.int64(); + message.id = reader.int32(); break; case 2: message.position = reader.string(); @@ -48022,8 +48022,8 @@ $root.tabletmanagerdata = (function() { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; + if (!$util.isInteger(message.id)) + return "id: integer expected"; if (message.position != null && message.hasOwnProperty("position")) if (!$util.isString(message.position)) return "position: string expected"; @@ -48043,14 +48043,7 @@ $root.tabletmanagerdata = (function() { return object; var message = new $root.tabletmanagerdata.VReplicationWaitForPosRequest(); if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + message.id = object.id | 0; if (object.position != null) message.position = String(object.position); return message; @@ -48070,18 +48063,11 @@ $root.tabletmanagerdata = (function() { options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; + object.id = 0; object.position = ""; } if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + object.id = message.id; if (message.position != null && message.hasOwnProperty("position")) object.position = message.position; return object; @@ -53632,430 +53618,6 @@ $root.tabletmanagerdata = (function() { return RestoreFromBackupResponse; })(); - tabletmanagerdata.VExecRequest = (function() { - - /** - * Properties of a VExecRequest. - * @memberof tabletmanagerdata - * @interface IVExecRequest - * @property {string|null} [query] VExecRequest query - * @property {string|null} [workflow] VExecRequest workflow - * @property {string|null} [keyspace] VExecRequest keyspace - */ - - /** - * Constructs a new VExecRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a VExecRequest. - * @implements IVExecRequest - * @constructor - * @param {tabletmanagerdata.IVExecRequest=} [properties] Properties to set - */ - function VExecRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VExecRequest query. - * @member {string} query - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.query = ""; - - /** - * VExecRequest workflow. - * @member {string} workflow - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.workflow = ""; - - /** - * VExecRequest keyspace. - * @member {string} keyspace - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.keyspace = ""; - - /** - * Creates a new VExecRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.VExecRequest} VExecRequest instance - */ - VExecRequest.create = function create(properties) { - return new VExecRequest(properties); - }; - - /** - * Encodes the specified VExecRequest message. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest} message VExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.workflow); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified VExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest} message VExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VExecRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VExecRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.string(); - break; - case 2: - message.workflow = reader.string(); - break; - case 3: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VExecRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VExecRequest message. - * @function verify - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VExecRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.workflow != null && message.hasOwnProperty("workflow")) - if (!$util.isString(message.workflow)) - return "workflow: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a VExecRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - */ - VExecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VExecRequest) - return object; - var message = new $root.tabletmanagerdata.VExecRequest(); - if (object.query != null) - message.query = String(object.query); - if (object.workflow != null) - message.workflow = String(object.workflow); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a VExecRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.VExecRequest} message VExecRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VExecRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.query = ""; - object.workflow = ""; - object.keyspace = ""; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = message.workflow; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this VExecRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VExecRequest - * @instance - * @returns {Object.} JSON object - */ - VExecRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VExecRequest; - })(); - - tabletmanagerdata.VExecResponse = (function() { - - /** - * Properties of a VExecResponse. - * @memberof tabletmanagerdata - * @interface IVExecResponse - * @property {query.IQueryResult|null} [result] VExecResponse result - */ - - /** - * Constructs a new VExecResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a VExecResponse. - * @implements IVExecResponse - * @constructor - * @param {tabletmanagerdata.IVExecResponse=} [properties] Properties to set - */ - function VExecResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VExecResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.VExecResponse - * @instance - */ - VExecResponse.prototype.result = null; - - /** - * Creates a new VExecResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.VExecResponse} VExecResponse instance - */ - VExecResponse.create = function create(properties) { - return new VExecResponse(properties); - }; - - /** - * Encodes the specified VExecResponse message. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse} message VExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse} message VExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VExecResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VExecResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VExecResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VExecResponse message. - * @function verify - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VExecResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a VExecResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - */ - VExecResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VExecResponse) - return object; - var message = new $root.tabletmanagerdata.VExecResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.VExecResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a VExecResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.VExecResponse} message VExecResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VExecResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this VExecResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VExecResponse - * @instance - * @returns {Object.} JSON object - */ - VExecResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VExecResponse; - })(); - tabletmanagerdata.VDiffRequest = (function() { /** @@ -55697,39 +55259,29 @@ $root.tabletmanagerdata = (function() { return VDiffOptions; })(); - return tabletmanagerdata; -})(); - -$root.query = (function() { - - /** - * Namespace query. - * @exports query - * @namespace - */ - var query = {}; - - query.Target = (function() { + tabletmanagerdata.UpdateVRWorkflowRequest = (function() { /** - * Properties of a Target. - * @memberof query - * @interface ITarget - * @property {string|null} [keyspace] Target keyspace - * @property {string|null} [shard] Target shard - * @property {topodata.TabletType|null} [tablet_type] Target tablet_type - * @property {string|null} [cell] Target cell + * Properties of an UpdateVRWorkflowRequest. + * @memberof tabletmanagerdata + * @interface IUpdateVRWorkflowRequest + * @property {string|null} [workflow] UpdateVRWorkflowRequest workflow + * @property {Array.|null} [cells] UpdateVRWorkflowRequest cells + * @property {Array.|null} [tablet_types] UpdateVRWorkflowRequest tablet_types + * @property {binlogdata.OnDDLAction|null} [on_ddl] UpdateVRWorkflowRequest on_ddl */ /** - * Constructs a new Target. - * @memberof query - * @classdesc Represents a Target. - * @implements ITarget + * Constructs a new UpdateVRWorkflowRequest. + * @memberof tabletmanagerdata + * @classdesc Represents an UpdateVRWorkflowRequest. + * @implements IUpdateVRWorkflowRequest * @constructor - * @param {query.ITarget=} [properties] Properties to set + * @param {tabletmanagerdata.IUpdateVRWorkflowRequest=} [properties] Properties to set */ - function Target(properties) { + function UpdateVRWorkflowRequest(properties) { + this.cells = []; + this.tablet_types = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55737,114 +55289,120 @@ $root.query = (function() { } /** - * Target keyspace. - * @member {string} keyspace - * @memberof query.Target + * UpdateVRWorkflowRequest workflow. + * @member {string} workflow + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @instance */ - Target.prototype.keyspace = ""; + UpdateVRWorkflowRequest.prototype.workflow = ""; /** - * Target shard. - * @member {string} shard - * @memberof query.Target + * UpdateVRWorkflowRequest cells. + * @member {Array.} cells + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @instance */ - Target.prototype.shard = ""; + UpdateVRWorkflowRequest.prototype.cells = $util.emptyArray; /** - * Target tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof query.Target + * UpdateVRWorkflowRequest tablet_types. + * @member {Array.} tablet_types + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @instance */ - Target.prototype.tablet_type = 0; + UpdateVRWorkflowRequest.prototype.tablet_types = $util.emptyArray; /** - * Target cell. - * @member {string} cell - * @memberof query.Target + * UpdateVRWorkflowRequest on_ddl. + * @member {binlogdata.OnDDLAction} on_ddl + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @instance */ - Target.prototype.cell = ""; + UpdateVRWorkflowRequest.prototype.on_ddl = 0; /** - * Creates a new Target instance using the specified properties. + * Creates a new UpdateVRWorkflowRequest instance using the specified properties. * @function create - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static - * @param {query.ITarget=} [properties] Properties to set - * @returns {query.Target} Target instance + * @param {tabletmanagerdata.IUpdateVRWorkflowRequest=} [properties] Properties to set + * @returns {tabletmanagerdata.UpdateVRWorkflowRequest} UpdateVRWorkflowRequest instance */ - Target.create = function create(properties) { - return new Target(properties); + UpdateVRWorkflowRequest.create = function create(properties) { + return new UpdateVRWorkflowRequest(properties); }; /** - * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. + * Encodes the specified UpdateVRWorkflowRequest message. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowRequest.verify|verify} messages. * @function encode - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static - * @param {query.ITarget} message Target message or plain object to encode + * @param {tabletmanagerdata.IUpdateVRWorkflowRequest} message UpdateVRWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encode = function encode(message, writer) { + UpdateVRWorkflowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cell); + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workflow); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.tablet_types != null && message.tablet_types.length) + for (var i = 0; i < message.tablet_types.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tablet_types[i]); + if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.on_ddl); return writer; }; /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. + * Encodes the specified UpdateVRWorkflowRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static - * @param {query.ITarget} message Target message or plain object to encode + * @param {tabletmanagerdata.IUpdateVRWorkflowRequest} message UpdateVRWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encodeDelimited = function encodeDelimited(message, writer) { + UpdateVRWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Target message from the specified reader or buffer. + * Decodes an UpdateVRWorkflowRequest message from the specified reader or buffer. * @function decode - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.Target} Target + * @returns {tabletmanagerdata.UpdateVRWorkflowRequest} UpdateVRWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decode = function decode(reader, length) { + UpdateVRWorkflowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Target(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UpdateVRWorkflowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.workflow = reader.string(); break; case 2: - message.shard = reader.string(); + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; case 3: - message.tablet_type = reader.int32(); + if (!(message.tablet_types && message.tablet_types.length)) + message.tablet_types = []; + message.tablet_types.push(reader.string()); break; case 4: - message.cell = reader.string(); + message.on_ddl = reader.int32(); break; default: reader.skipType(tag & 7); @@ -55855,192 +55413,181 @@ $root.query = (function() { }; /** - * Decodes a Target message from the specified reader or buffer, length delimited. + * Decodes an UpdateVRWorkflowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Target} Target + * @returns {tabletmanagerdata.UpdateVRWorkflowRequest} UpdateVRWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decodeDelimited = function decodeDelimited(reader) { + UpdateVRWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Target message. + * Verifies an UpdateVRWorkflowRequest message. * @function verify - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Target.verify = function verify(message) { + UpdateVRWorkflowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { + if (message.workflow != null && message.hasOwnProperty("workflow")) + if (!$util.isString(message.workflow)) + return "workflow: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) { + if (!Array.isArray(message.tablet_types)) + return "tablet_types: array expected"; + for (var i = 0; i < message.tablet_types.length; ++i) + if (!$util.isString(message.tablet_types[i])) + return "tablet_types: string[] expected"; + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + switch (message.on_ddl) { default: - return "tablet_type: enum value expected"; + return "on_ddl: enum value expected"; case 0: case 1: - case 1: case 2: case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: break; } - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; return null; }; /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVRWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static * @param {Object.} object Plain object - * @returns {query.Target} Target + * @returns {tabletmanagerdata.UpdateVRWorkflowRequest} UpdateVRWorkflowRequest */ - Target.fromObject = function fromObject(object) { - if (object instanceof $root.query.Target) + UpdateVRWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.tabletmanagerdata.UpdateVRWorkflowRequest) return object; - var message = new $root.query.Target(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - switch (object.tablet_type) { - case "UNKNOWN": + var message = new $root.tabletmanagerdata.UpdateVRWorkflowRequest(); + if (object.workflow != null) + message.workflow = String(object.workflow); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".tabletmanagerdata.UpdateVRWorkflowRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.tablet_types) { + if (!Array.isArray(object.tablet_types)) + throw TypeError(".tabletmanagerdata.UpdateVRWorkflowRequest.tablet_types: array expected"); + message.tablet_types = []; + for (var i = 0; i < object.tablet_types.length; ++i) + message.tablet_types[i] = String(object.tablet_types[i]); + } + switch (object.on_ddl) { + case "IGNORE": case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; + message.on_ddl = 0; break; - case "MASTER": + case "STOP": case 1: - message.tablet_type = 1; + message.on_ddl = 1; break; - case "REPLICA": + case "EXEC": case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; + message.on_ddl = 2; break; - case "BATCH": + case "EXEC_IGNORE": case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; + message.on_ddl = 3; break; } - if (object.cell != null) - message.cell = String(object.cell); return message; }; /** - * Creates a plain object from a Target message. Also converts values to other types if specified. + * Creates a plain object from an UpdateVRWorkflowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @static - * @param {query.Target} message Target + * @param {tabletmanagerdata.UpdateVRWorkflowRequest} message UpdateVRWorkflowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Target.toObject = function toObject(message, options) { + UpdateVRWorkflowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.cells = []; + object.tablet_types = []; + } if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.cell = ""; + object.workflow = ""; + object.on_ddl = options.enums === String ? "IGNORE" : 0; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (message.workflow != null && message.hasOwnProperty("workflow")) + object.workflow = message.workflow; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.tablet_types && message.tablet_types.length) { + object.tablet_types = []; + for (var j = 0; j < message.tablet_types.length; ++j) + object.tablet_types[j] = message.tablet_types[j]; + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + object.on_ddl = options.enums === String ? $root.binlogdata.OnDDLAction[message.on_ddl] : message.on_ddl; return object; }; /** - * Converts this Target to JSON. + * Converts this UpdateVRWorkflowRequest to JSON. * @function toJSON - * @memberof query.Target + * @memberof tabletmanagerdata.UpdateVRWorkflowRequest * @instance * @returns {Object.} JSON object */ - Target.prototype.toJSON = function toJSON() { + UpdateVRWorkflowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Target; + return UpdateVRWorkflowRequest; })(); - query.VTGateCallerID = (function() { + tabletmanagerdata.UpdateVRWorkflowResponse = (function() { /** - * Properties of a VTGateCallerID. - * @memberof query - * @interface IVTGateCallerID - * @property {string|null} [username] VTGateCallerID username - * @property {Array.|null} [groups] VTGateCallerID groups + * Properties of an UpdateVRWorkflowResponse. + * @memberof tabletmanagerdata + * @interface IUpdateVRWorkflowResponse + * @property {query.IQueryResult|null} [result] UpdateVRWorkflowResponse result */ /** - * Constructs a new VTGateCallerID. - * @memberof query - * @classdesc Represents a VTGateCallerID. - * @implements IVTGateCallerID + * Constructs a new UpdateVRWorkflowResponse. + * @memberof tabletmanagerdata + * @classdesc Represents an UpdateVRWorkflowResponse. + * @implements IUpdateVRWorkflowResponse * @constructor - * @param {query.IVTGateCallerID=} [properties] Properties to set + * @param {tabletmanagerdata.IUpdateVRWorkflowResponse=} [properties] Properties to set */ - function VTGateCallerID(properties) { - this.groups = []; + function UpdateVRWorkflowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56048,91 +55595,75 @@ $root.query = (function() { } /** - * VTGateCallerID username. - * @member {string} username - * @memberof query.VTGateCallerID - * @instance - */ - VTGateCallerID.prototype.username = ""; - - /** - * VTGateCallerID groups. - * @member {Array.} groups - * @memberof query.VTGateCallerID + * UpdateVRWorkflowResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @instance */ - VTGateCallerID.prototype.groups = $util.emptyArray; + UpdateVRWorkflowResponse.prototype.result = null; /** - * Creates a new VTGateCallerID instance using the specified properties. + * Creates a new UpdateVRWorkflowResponse instance using the specified properties. * @function create - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static - * @param {query.IVTGateCallerID=} [properties] Properties to set - * @returns {query.VTGateCallerID} VTGateCallerID instance + * @param {tabletmanagerdata.IUpdateVRWorkflowResponse=} [properties] Properties to set + * @returns {tabletmanagerdata.UpdateVRWorkflowResponse} UpdateVRWorkflowResponse instance */ - VTGateCallerID.create = function create(properties) { - return new VTGateCallerID(properties); + UpdateVRWorkflowResponse.create = function create(properties) { + return new UpdateVRWorkflowResponse(properties); }; /** - * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. + * Encodes the specified UpdateVRWorkflowResponse message. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowResponse.verify|verify} messages. * @function encode - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static - * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode + * @param {tabletmanagerdata.IUpdateVRWorkflowResponse} message UpdateVRWorkflowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VTGateCallerID.encode = function encode(message, writer) { + UpdateVRWorkflowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.groups != null && message.groups.length) - for (var i = 0; i < message.groups.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.groups[i]); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. + * Encodes the specified UpdateVRWorkflowResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UpdateVRWorkflowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static - * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode + * @param {tabletmanagerdata.IUpdateVRWorkflowResponse} message UpdateVRWorkflowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VTGateCallerID.encodeDelimited = function encodeDelimited(message, writer) { + UpdateVRWorkflowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VTGateCallerID message from the specified reader or buffer. + * Decodes an UpdateVRWorkflowResponse message from the specified reader or buffer. * @function decode - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.VTGateCallerID} VTGateCallerID + * @returns {tabletmanagerdata.UpdateVRWorkflowResponse} UpdateVRWorkflowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VTGateCallerID.decode = function decode(reader, length) { + UpdateVRWorkflowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.VTGateCallerID(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UpdateVRWorkflowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.username = reader.string(); - break; - case 2: - if (!(message.groups && message.groups.length)) - message.groups = []; - message.groups.push(reader.string()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -56143,130 +55674,126 @@ $root.query = (function() { }; /** - * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. + * Decodes an UpdateVRWorkflowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.VTGateCallerID} VTGateCallerID + * @returns {tabletmanagerdata.UpdateVRWorkflowResponse} UpdateVRWorkflowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VTGateCallerID.decodeDelimited = function decodeDelimited(reader) { + UpdateVRWorkflowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VTGateCallerID message. + * Verifies an UpdateVRWorkflowResponse message. * @function verify - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VTGateCallerID.verify = function verify(message) { + UpdateVRWorkflowResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.groups != null && message.hasOwnProperty("groups")) { - if (!Array.isArray(message.groups)) - return "groups: array expected"; - for (var i = 0; i < message.groups.length; ++i) - if (!$util.isString(message.groups[i])) - return "groups: string[] expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; } return null; }; /** - * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVRWorkflowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static * @param {Object.} object Plain object - * @returns {query.VTGateCallerID} VTGateCallerID + * @returns {tabletmanagerdata.UpdateVRWorkflowResponse} UpdateVRWorkflowResponse */ - VTGateCallerID.fromObject = function fromObject(object) { - if (object instanceof $root.query.VTGateCallerID) + UpdateVRWorkflowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.tabletmanagerdata.UpdateVRWorkflowResponse) return object; - var message = new $root.query.VTGateCallerID(); - if (object.username != null) - message.username = String(object.username); - if (object.groups) { - if (!Array.isArray(object.groups)) - throw TypeError(".query.VTGateCallerID.groups: array expected"); - message.groups = []; - for (var i = 0; i < object.groups.length; ++i) - message.groups[i] = String(object.groups[i]); + var message = new $root.tabletmanagerdata.UpdateVRWorkflowResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".tabletmanagerdata.UpdateVRWorkflowResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. + * Creates a plain object from an UpdateVRWorkflowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @static - * @param {query.VTGateCallerID} message VTGateCallerID + * @param {tabletmanagerdata.UpdateVRWorkflowResponse} message UpdateVRWorkflowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VTGateCallerID.toObject = function toObject(message, options) { + UpdateVRWorkflowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groups = []; if (options.defaults) - object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.groups && message.groups.length) { - object.groups = []; - for (var j = 0; j < message.groups.length; ++j) - object.groups[j] = message.groups[j]; - } + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this VTGateCallerID to JSON. + * Converts this UpdateVRWorkflowResponse to JSON. * @function toJSON - * @memberof query.VTGateCallerID + * @memberof tabletmanagerdata.UpdateVRWorkflowResponse * @instance * @returns {Object.} JSON object */ - VTGateCallerID.prototype.toJSON = function toJSON() { + UpdateVRWorkflowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VTGateCallerID; + return UpdateVRWorkflowResponse; })(); - query.EventToken = (function() { + return tabletmanagerdata; +})(); + +$root.binlogdata = (function() { + + /** + * Namespace binlogdata. + * @exports binlogdata + * @namespace + */ + var binlogdata = {}; + + binlogdata.Charset = (function() { /** - * Properties of an EventToken. - * @memberof query - * @interface IEventToken - * @property {number|Long|null} [timestamp] EventToken timestamp - * @property {string|null} [shard] EventToken shard - * @property {string|null} [position] EventToken position + * Properties of a Charset. + * @memberof binlogdata + * @interface ICharset + * @property {number|null} [client] Charset client + * @property {number|null} [conn] Charset conn + * @property {number|null} [server] Charset server */ /** - * Constructs a new EventToken. - * @memberof query - * @classdesc Represents an EventToken. - * @implements IEventToken + * Constructs a new Charset. + * @memberof binlogdata + * @classdesc Represents a Charset. + * @implements ICharset * @constructor - * @param {query.IEventToken=} [properties] Properties to set + * @param {binlogdata.ICharset=} [properties] Properties to set */ - function EventToken(properties) { + function Charset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56274,101 +55801,101 @@ $root.query = (function() { } /** - * EventToken timestamp. - * @member {number|Long} timestamp - * @memberof query.EventToken + * Charset client. + * @member {number} client + * @memberof binlogdata.Charset * @instance */ - EventToken.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Charset.prototype.client = 0; /** - * EventToken shard. - * @member {string} shard - * @memberof query.EventToken + * Charset conn. + * @member {number} conn + * @memberof binlogdata.Charset * @instance */ - EventToken.prototype.shard = ""; + Charset.prototype.conn = 0; /** - * EventToken position. - * @member {string} position - * @memberof query.EventToken + * Charset server. + * @member {number} server + * @memberof binlogdata.Charset * @instance */ - EventToken.prototype.position = ""; + Charset.prototype.server = 0; /** - * Creates a new EventToken instance using the specified properties. + * Creates a new Charset instance using the specified properties. * @function create - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static - * @param {query.IEventToken=} [properties] Properties to set - * @returns {query.EventToken} EventToken instance + * @param {binlogdata.ICharset=} [properties] Properties to set + * @returns {binlogdata.Charset} Charset instance */ - EventToken.create = function create(properties) { - return new EventToken(properties); + Charset.create = function create(properties) { + return new Charset(properties); }; /** - * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. + * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. * @function encode - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static - * @param {query.IEventToken} message EventToken message or plain object to encode + * @param {binlogdata.ICharset} message Charset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventToken.encode = function encode(message, writer) { + Charset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.position); + if (message.client != null && Object.hasOwnProperty.call(message, "client")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.client); + if (message.conn != null && Object.hasOwnProperty.call(message, "conn")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.conn); + if (message.server != null && Object.hasOwnProperty.call(message, "server")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.server); return writer; }; /** - * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. + * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. * @function encodeDelimited - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static - * @param {query.IEventToken} message EventToken message or plain object to encode + * @param {binlogdata.ICharset} message Charset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventToken.encodeDelimited = function encodeDelimited(message, writer) { + Charset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventToken message from the specified reader or buffer. + * Decodes a Charset message from the specified reader or buffer. * @function decode - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.EventToken} EventToken + * @returns {binlogdata.Charset} Charset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventToken.decode = function decode(reader, length) { + Charset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.EventToken(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Charset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timestamp = reader.int64(); + message.client = reader.int32(); break; case 2: - message.shard = reader.string(); + message.conn = reader.int32(); break; case 3: - message.position = reader.string(); + message.server = reader.int32(); break; default: reader.skipType(tag & 7); @@ -56379,293 +55906,126 @@ $root.query = (function() { }; /** - * Decodes an EventToken message from the specified reader or buffer, length delimited. + * Decodes a Charset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.EventToken} EventToken + * @returns {binlogdata.Charset} Charset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventToken.decodeDelimited = function decodeDelimited(reader) { + Charset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventToken message. + * Verifies a Charset message. * @function verify - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventToken.verify = function verify(message) { + Charset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; + if (message.client != null && message.hasOwnProperty("client")) + if (!$util.isInteger(message.client)) + return "client: integer expected"; + if (message.conn != null && message.hasOwnProperty("conn")) + if (!$util.isInteger(message.conn)) + return "conn: integer expected"; + if (message.server != null && message.hasOwnProperty("server")) + if (!$util.isInteger(message.server)) + return "server: integer expected"; return null; }; /** - * Creates an EventToken message from a plain object. Also converts values to their respective internal types. + * Creates a Charset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static * @param {Object.} object Plain object - * @returns {query.EventToken} EventToken + * @returns {binlogdata.Charset} Charset */ - EventToken.fromObject = function fromObject(object) { - if (object instanceof $root.query.EventToken) + Charset.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.Charset) return object; - var message = new $root.query.EventToken(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - if (object.shard != null) - message.shard = String(object.shard); - if (object.position != null) - message.position = String(object.position); + var message = new $root.binlogdata.Charset(); + if (object.client != null) + message.client = object.client | 0; + if (object.conn != null) + message.conn = object.conn | 0; + if (object.server != null) + message.server = object.server | 0; return message; }; /** - * Creates a plain object from an EventToken message. Also converts values to other types if specified. + * Creates a plain object from a Charset message. Also converts values to other types if specified. * @function toObject - * @memberof query.EventToken + * @memberof binlogdata.Charset * @static - * @param {query.EventToken} message EventToken + * @param {binlogdata.Charset} message Charset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventToken.toObject = function toObject(message, options) { + Charset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.shard = ""; - object.position = ""; + object.client = 0; + object.conn = 0; + object.server = 0; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; + if (message.client != null && message.hasOwnProperty("client")) + object.client = message.client; + if (message.conn != null && message.hasOwnProperty("conn")) + object.conn = message.conn; + if (message.server != null && message.hasOwnProperty("server")) + object.server = message.server; return object; }; /** - * Converts this EventToken to JSON. + * Converts this Charset to JSON. * @function toJSON - * @memberof query.EventToken + * @memberof binlogdata.Charset * @instance * @returns {Object.} JSON object */ - EventToken.prototype.toJSON = function toJSON() { + Charset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EventToken; - })(); - - /** - * MySqlFlag enum. - * @name query.MySqlFlag - * @enum {number} - * @property {number} EMPTY=0 EMPTY value - * @property {number} NOT_NULL_FLAG=1 NOT_NULL_FLAG value - * @property {number} PRI_KEY_FLAG=2 PRI_KEY_FLAG value - * @property {number} UNIQUE_KEY_FLAG=4 UNIQUE_KEY_FLAG value - * @property {number} MULTIPLE_KEY_FLAG=8 MULTIPLE_KEY_FLAG value - * @property {number} BLOB_FLAG=16 BLOB_FLAG value - * @property {number} UNSIGNED_FLAG=32 UNSIGNED_FLAG value - * @property {number} ZEROFILL_FLAG=64 ZEROFILL_FLAG value - * @property {number} BINARY_FLAG=128 BINARY_FLAG value - * @property {number} ENUM_FLAG=256 ENUM_FLAG value - * @property {number} AUTO_INCREMENT_FLAG=512 AUTO_INCREMENT_FLAG value - * @property {number} TIMESTAMP_FLAG=1024 TIMESTAMP_FLAG value - * @property {number} SET_FLAG=2048 SET_FLAG value - * @property {number} NO_DEFAULT_VALUE_FLAG=4096 NO_DEFAULT_VALUE_FLAG value - * @property {number} ON_UPDATE_NOW_FLAG=8192 ON_UPDATE_NOW_FLAG value - * @property {number} NUM_FLAG=32768 NUM_FLAG value - * @property {number} PART_KEY_FLAG=16384 PART_KEY_FLAG value - * @property {number} GROUP_FLAG=32768 GROUP_FLAG value - * @property {number} UNIQUE_FLAG=65536 UNIQUE_FLAG value - * @property {number} BINCMP_FLAG=131072 BINCMP_FLAG value - */ - query.MySqlFlag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EMPTY"] = 0; - values[valuesById[1] = "NOT_NULL_FLAG"] = 1; - values[valuesById[2] = "PRI_KEY_FLAG"] = 2; - values[valuesById[4] = "UNIQUE_KEY_FLAG"] = 4; - values[valuesById[8] = "MULTIPLE_KEY_FLAG"] = 8; - values[valuesById[16] = "BLOB_FLAG"] = 16; - values[valuesById[32] = "UNSIGNED_FLAG"] = 32; - values[valuesById[64] = "ZEROFILL_FLAG"] = 64; - values[valuesById[128] = "BINARY_FLAG"] = 128; - values[valuesById[256] = "ENUM_FLAG"] = 256; - values[valuesById[512] = "AUTO_INCREMENT_FLAG"] = 512; - values[valuesById[1024] = "TIMESTAMP_FLAG"] = 1024; - values[valuesById[2048] = "SET_FLAG"] = 2048; - values[valuesById[4096] = "NO_DEFAULT_VALUE_FLAG"] = 4096; - values[valuesById[8192] = "ON_UPDATE_NOW_FLAG"] = 8192; - values[valuesById[32768] = "NUM_FLAG"] = 32768; - values[valuesById[16384] = "PART_KEY_FLAG"] = 16384; - values["GROUP_FLAG"] = 32768; - values[valuesById[65536] = "UNIQUE_FLAG"] = 65536; - values[valuesById[131072] = "BINCMP_FLAG"] = 131072; - return values; - })(); - - /** - * Flag enum. - * @name query.Flag - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} ISINTEGRAL=256 ISINTEGRAL value - * @property {number} ISUNSIGNED=512 ISUNSIGNED value - * @property {number} ISFLOAT=1024 ISFLOAT value - * @property {number} ISQUOTED=2048 ISQUOTED value - * @property {number} ISTEXT=4096 ISTEXT value - * @property {number} ISBINARY=8192 ISBINARY value - */ - query.Flag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[256] = "ISINTEGRAL"] = 256; - values[valuesById[512] = "ISUNSIGNED"] = 512; - values[valuesById[1024] = "ISFLOAT"] = 1024; - values[valuesById[2048] = "ISQUOTED"] = 2048; - values[valuesById[4096] = "ISTEXT"] = 4096; - values[valuesById[8192] = "ISBINARY"] = 8192; - return values; - })(); - - /** - * Type enum. - * @name query.Type - * @enum {number} - * @property {number} NULL_TYPE=0 NULL_TYPE value - * @property {number} INT8=257 INT8 value - * @property {number} UINT8=770 UINT8 value - * @property {number} INT16=259 INT16 value - * @property {number} UINT16=772 UINT16 value - * @property {number} INT24=261 INT24 value - * @property {number} UINT24=774 UINT24 value - * @property {number} INT32=263 INT32 value - * @property {number} UINT32=776 UINT32 value - * @property {number} INT64=265 INT64 value - * @property {number} UINT64=778 UINT64 value - * @property {number} FLOAT32=1035 FLOAT32 value - * @property {number} FLOAT64=1036 FLOAT64 value - * @property {number} TIMESTAMP=2061 TIMESTAMP value - * @property {number} DATE=2062 DATE value - * @property {number} TIME=2063 TIME value - * @property {number} DATETIME=2064 DATETIME value - * @property {number} YEAR=785 YEAR value - * @property {number} DECIMAL=18 DECIMAL value - * @property {number} TEXT=6163 TEXT value - * @property {number} BLOB=10260 BLOB value - * @property {number} VARCHAR=6165 VARCHAR value - * @property {number} VARBINARY=10262 VARBINARY value - * @property {number} CHAR=6167 CHAR value - * @property {number} BINARY=10264 BINARY value - * @property {number} BIT=2073 BIT value - * @property {number} ENUM=2074 ENUM value - * @property {number} SET=2075 SET value - * @property {number} TUPLE=28 TUPLE value - * @property {number} GEOMETRY=2077 GEOMETRY value - * @property {number} JSON=2078 JSON value - * @property {number} EXPRESSION=31 EXPRESSION value - * @property {number} HEXNUM=4128 HEXNUM value - * @property {number} HEXVAL=4129 HEXVAL value - * @property {number} BITNUM=4130 BITNUM value - */ - query.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_TYPE"] = 0; - values[valuesById[257] = "INT8"] = 257; - values[valuesById[770] = "UINT8"] = 770; - values[valuesById[259] = "INT16"] = 259; - values[valuesById[772] = "UINT16"] = 772; - values[valuesById[261] = "INT24"] = 261; - values[valuesById[774] = "UINT24"] = 774; - values[valuesById[263] = "INT32"] = 263; - values[valuesById[776] = "UINT32"] = 776; - values[valuesById[265] = "INT64"] = 265; - values[valuesById[778] = "UINT64"] = 778; - values[valuesById[1035] = "FLOAT32"] = 1035; - values[valuesById[1036] = "FLOAT64"] = 1036; - values[valuesById[2061] = "TIMESTAMP"] = 2061; - values[valuesById[2062] = "DATE"] = 2062; - values[valuesById[2063] = "TIME"] = 2063; - values[valuesById[2064] = "DATETIME"] = 2064; - values[valuesById[785] = "YEAR"] = 785; - values[valuesById[18] = "DECIMAL"] = 18; - values[valuesById[6163] = "TEXT"] = 6163; - values[valuesById[10260] = "BLOB"] = 10260; - values[valuesById[6165] = "VARCHAR"] = 6165; - values[valuesById[10262] = "VARBINARY"] = 10262; - values[valuesById[6167] = "CHAR"] = 6167; - values[valuesById[10264] = "BINARY"] = 10264; - values[valuesById[2073] = "BIT"] = 2073; - values[valuesById[2074] = "ENUM"] = 2074; - values[valuesById[2075] = "SET"] = 2075; - values[valuesById[28] = "TUPLE"] = 28; - values[valuesById[2077] = "GEOMETRY"] = 2077; - values[valuesById[2078] = "JSON"] = 2078; - values[valuesById[31] = "EXPRESSION"] = 31; - values[valuesById[4128] = "HEXNUM"] = 4128; - values[valuesById[4129] = "HEXVAL"] = 4129; - values[valuesById[4130] = "BITNUM"] = 4130; - return values; + return Charset; })(); - query.Value = (function() { + binlogdata.BinlogTransaction = (function() { /** - * Properties of a Value. - * @memberof query - * @interface IValue - * @property {query.Type|null} [type] Value type - * @property {Uint8Array|null} [value] Value value + * Properties of a BinlogTransaction. + * @memberof binlogdata + * @interface IBinlogTransaction + * @property {Array.|null} [statements] BinlogTransaction statements + * @property {query.IEventToken|null} [event_token] BinlogTransaction event_token */ /** - * Constructs a new Value. - * @memberof query - * @classdesc Represents a Value. - * @implements IValue + * Constructs a new BinlogTransaction. + * @memberof binlogdata + * @classdesc Represents a BinlogTransaction. + * @implements IBinlogTransaction * @constructor - * @param {query.IValue=} [properties] Properties to set + * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set */ - function Value(properties) { + function BinlogTransaction(properties) { + this.statements = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56673,88 +56033,91 @@ $root.query = (function() { } /** - * Value type. - * @member {query.Type} type - * @memberof query.Value + * BinlogTransaction statements. + * @member {Array.} statements + * @memberof binlogdata.BinlogTransaction * @instance */ - Value.prototype.type = 0; + BinlogTransaction.prototype.statements = $util.emptyArray; /** - * Value value. - * @member {Uint8Array} value - * @memberof query.Value + * BinlogTransaction event_token. + * @member {query.IEventToken|null|undefined} event_token + * @memberof binlogdata.BinlogTransaction * @instance */ - Value.prototype.value = $util.newBuffer([]); + BinlogTransaction.prototype.event_token = null; /** - * Creates a new Value instance using the specified properties. + * Creates a new BinlogTransaction instance using the specified properties. * @function create - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static - * @param {query.IValue=} [properties] Properties to set - * @returns {query.Value} Value instance + * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set + * @returns {binlogdata.BinlogTransaction} BinlogTransaction instance */ - Value.create = function create(properties) { - return new Value(properties); + BinlogTransaction.create = function create(properties) { + return new BinlogTransaction(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. + * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. * @function encode - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static - * @param {query.IValue} message Value message or plain object to encode + * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + BinlogTransaction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.statements != null && message.statements.length) + for (var i = 0; i < message.statements.length; ++i) + $root.binlogdata.BinlogTransaction.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) + $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. + * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. * @function encodeDelimited - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static - * @param {query.IValue} message Value message or plain object to encode + * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + BinlogTransaction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a BinlogTransaction message from the specified reader or buffer. * @function decode - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.Value} Value + * @returns {binlogdata.BinlogTransaction} BinlogTransaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + BinlogTransaction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); + if (!(message.statements && message.statements.length)) + message.statements = []; + message.statements.push($root.binlogdata.BinlogTransaction.Statement.decode(reader, reader.uint32())); break; - case 2: - message.value = reader.bytes(); + case 4: + message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -56765,306 +56128,469 @@ $root.query = (function() { }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Value} Value + * @returns {binlogdata.BinlogTransaction} BinlogTransaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + BinlogTransaction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies a BinlogTransaction message. * @function verify - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + BinlogTransaction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - case 4128: - case 4129: - case 4130: - break; + if (message.statements != null && message.hasOwnProperty("statements")) { + if (!Array.isArray(message.statements)) + return "statements: array expected"; + for (var i = 0; i < message.statements.length; ++i) { + var error = $root.binlogdata.BinlogTransaction.Statement.verify(message.statements[i]); + if (error) + return "statements." + error; } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + } + if (message.event_token != null && message.hasOwnProperty("event_token")) { + var error = $root.query.EventToken.verify(message.event_token); + if (error) + return "event_token." + error; + } return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static * @param {Object.} object Plain object - * @returns {query.Value} Value + * @returns {binlogdata.BinlogTransaction} BinlogTransaction */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.query.Value) + BinlogTransaction.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.BinlogTransaction) return object; - var message = new $root.query.Value(); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - case "HEXNUM": - case 4128: - message.type = 4128; - break; - case "HEXVAL": - case 4129: - message.type = 4129; - break; - case "BITNUM": - case 4130: - message.type = 4130; - break; + var message = new $root.binlogdata.BinlogTransaction(); + if (object.statements) { + if (!Array.isArray(object.statements)) + throw TypeError(".binlogdata.BinlogTransaction.statements: array expected"); + message.statements = []; + for (var i = 0; i < object.statements.length; ++i) { + if (typeof object.statements[i] !== "object") + throw TypeError(".binlogdata.BinlogTransaction.statements: object expected"); + message.statements[i] = $root.binlogdata.BinlogTransaction.Statement.fromObject(object.statements[i]); + } + } + if (object.event_token != null) { + if (typeof object.event_token !== "object") + throw TypeError(".binlogdata.BinlogTransaction.event_token: object expected"); + message.event_token = $root.query.EventToken.fromObject(object.event_token); } - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. * @function toObject - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @static - * @param {query.Value} message Value + * @param {binlogdata.BinlogTransaction} message BinlogTransaction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + BinlogTransaction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "NULL_TYPE" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (options.arrays || options.defaults) + object.statements = []; + if (options.defaults) + object.event_token = null; + if (message.statements && message.statements.length) { + object.statements = []; + for (var j = 0; j < message.statements.length; ++j) + object.statements[j] = $root.binlogdata.BinlogTransaction.Statement.toObject(message.statements[j], options); } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.event_token != null && message.hasOwnProperty("event_token")) + object.event_token = $root.query.EventToken.toObject(message.event_token, options); return object; }; /** - * Converts this Value to JSON. + * Converts this BinlogTransaction to JSON. * @function toJSON - * @memberof query.Value + * @memberof binlogdata.BinlogTransaction * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + BinlogTransaction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; + BinlogTransaction.Statement = (function() { + + /** + * Properties of a Statement. + * @memberof binlogdata.BinlogTransaction + * @interface IStatement + * @property {binlogdata.BinlogTransaction.Statement.Category|null} [category] Statement category + * @property {binlogdata.ICharset|null} [charset] Statement charset + * @property {Uint8Array|null} [sql] Statement sql + */ + + /** + * Constructs a new Statement. + * @memberof binlogdata.BinlogTransaction + * @classdesc Represents a Statement. + * @implements IStatement + * @constructor + * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set + */ + function Statement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Statement category. + * @member {binlogdata.BinlogTransaction.Statement.Category} category + * @memberof binlogdata.BinlogTransaction.Statement + * @instance + */ + Statement.prototype.category = 0; + + /** + * Statement charset. + * @member {binlogdata.ICharset|null|undefined} charset + * @memberof binlogdata.BinlogTransaction.Statement + * @instance + */ + Statement.prototype.charset = null; + + /** + * Statement sql. + * @member {Uint8Array} sql + * @memberof binlogdata.BinlogTransaction.Statement + * @instance + */ + Statement.prototype.sql = $util.newBuffer([]); + + /** + * Creates a new Statement instance using the specified properties. + * @function create + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set + * @returns {binlogdata.BinlogTransaction.Statement} Statement instance + */ + Statement.create = function create(properties) { + return new Statement(properties); + }; + + /** + * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. + * @function encode + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) + $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.sql); + return writer; + }; + + /** + * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. + * @function encodeDelimited + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Statement message from the specified reader or buffer. + * @function decode + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {binlogdata.BinlogTransaction.Statement} Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction.Statement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.category = reader.int32(); + break; + case 2: + message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); + break; + case 3: + message.sql = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Statement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {binlogdata.BinlogTransaction.Statement} Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Statement message. + * @function verify + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Statement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.charset != null && message.hasOwnProperty("charset")) { + var error = $root.binlogdata.Charset.verify(message.charset); + if (error) + return "charset." + error; + } + if (message.sql != null && message.hasOwnProperty("sql")) + if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) + return "sql: buffer expected"; + return null; + }; + + /** + * Creates a Statement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {Object.} object Plain object + * @returns {binlogdata.BinlogTransaction.Statement} Statement + */ + Statement.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.BinlogTransaction.Statement) + return object; + var message = new $root.binlogdata.BinlogTransaction.Statement(); + switch (object.category) { + case "BL_UNRECOGNIZED": + case 0: + message.category = 0; + break; + case "BL_BEGIN": + case 1: + message.category = 1; + break; + case "BL_COMMIT": + case 2: + message.category = 2; + break; + case "BL_ROLLBACK": + case 3: + message.category = 3; + break; + case "BL_DML_DEPRECATED": + case 4: + message.category = 4; + break; + case "BL_DDL": + case 5: + message.category = 5; + break; + case "BL_SET": + case 6: + message.category = 6; + break; + case "BL_INSERT": + case 7: + message.category = 7; + break; + case "BL_UPDATE": + case 8: + message.category = 8; + break; + case "BL_DELETE": + case 9: + message.category = 9; + break; + } + if (object.charset != null) { + if (typeof object.charset !== "object") + throw TypeError(".binlogdata.BinlogTransaction.Statement.charset: object expected"); + message.charset = $root.binlogdata.Charset.fromObject(object.charset); + } + if (object.sql != null) + if (typeof object.sql === "string") + $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); + else if (object.sql.length) + message.sql = object.sql; + return message; + }; + + /** + * Creates a plain object from a Statement message. Also converts values to other types if specified. + * @function toObject + * @memberof binlogdata.BinlogTransaction.Statement + * @static + * @param {binlogdata.BinlogTransaction.Statement} message Statement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Statement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = options.enums === String ? "BL_UNRECOGNIZED" : 0; + object.charset = null; + if (options.bytes === String) + object.sql = ""; + else { + object.sql = []; + if (options.bytes !== Array) + object.sql = $util.newBuffer(object.sql); + } + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.binlogdata.BinlogTransaction.Statement.Category[message.category] : message.category; + if (message.charset != null && message.hasOwnProperty("charset")) + object.charset = $root.binlogdata.Charset.toObject(message.charset, options); + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; + return object; + }; + + /** + * Converts this Statement to JSON. + * @function toJSON + * @memberof binlogdata.BinlogTransaction.Statement + * @instance + * @returns {Object.} JSON object + */ + Statement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Category enum. + * @name binlogdata.BinlogTransaction.Statement.Category + * @enum {number} + * @property {number} BL_UNRECOGNIZED=0 BL_UNRECOGNIZED value + * @property {number} BL_BEGIN=1 BL_BEGIN value + * @property {number} BL_COMMIT=2 BL_COMMIT value + * @property {number} BL_ROLLBACK=3 BL_ROLLBACK value + * @property {number} BL_DML_DEPRECATED=4 BL_DML_DEPRECATED value + * @property {number} BL_DDL=5 BL_DDL value + * @property {number} BL_SET=6 BL_SET value + * @property {number} BL_INSERT=7 BL_INSERT value + * @property {number} BL_UPDATE=8 BL_UPDATE value + * @property {number} BL_DELETE=9 BL_DELETE value + */ + Statement.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BL_UNRECOGNIZED"] = 0; + values[valuesById[1] = "BL_BEGIN"] = 1; + values[valuesById[2] = "BL_COMMIT"] = 2; + values[valuesById[3] = "BL_ROLLBACK"] = 3; + values[valuesById[4] = "BL_DML_DEPRECATED"] = 4; + values[valuesById[5] = "BL_DDL"] = 5; + values[valuesById[6] = "BL_SET"] = 6; + values[valuesById[7] = "BL_INSERT"] = 7; + values[valuesById[8] = "BL_UPDATE"] = 8; + values[valuesById[9] = "BL_DELETE"] = 9; + return values; + })(); + + return Statement; + })(); + + return BinlogTransaction; })(); - query.BindVariable = (function() { + binlogdata.StreamKeyRangeRequest = (function() { /** - * Properties of a BindVariable. - * @memberof query - * @interface IBindVariable - * @property {query.Type|null} [type] BindVariable type - * @property {Uint8Array|null} [value] BindVariable value - * @property {Array.|null} [values] BindVariable values + * Properties of a StreamKeyRangeRequest. + * @memberof binlogdata + * @interface IStreamKeyRangeRequest + * @property {string|null} [position] StreamKeyRangeRequest position + * @property {topodata.IKeyRange|null} [key_range] StreamKeyRangeRequest key_range + * @property {binlogdata.ICharset|null} [charset] StreamKeyRangeRequest charset */ /** - * Constructs a new BindVariable. - * @memberof query - * @classdesc Represents a BindVariable. - * @implements IBindVariable + * Constructs a new StreamKeyRangeRequest. + * @memberof binlogdata + * @classdesc Represents a StreamKeyRangeRequest. + * @implements IStreamKeyRangeRequest * @constructor - * @param {query.IBindVariable=} [properties] Properties to set + * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set */ - function BindVariable(properties) { - this.values = []; + function StreamKeyRangeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57072,104 +56598,101 @@ $root.query = (function() { } /** - * BindVariable type. - * @member {query.Type} type - * @memberof query.BindVariable + * StreamKeyRangeRequest position. + * @member {string} position + * @memberof binlogdata.StreamKeyRangeRequest * @instance */ - BindVariable.prototype.type = 0; + StreamKeyRangeRequest.prototype.position = ""; /** - * BindVariable value. - * @member {Uint8Array} value - * @memberof query.BindVariable + * StreamKeyRangeRequest key_range. + * @member {topodata.IKeyRange|null|undefined} key_range + * @memberof binlogdata.StreamKeyRangeRequest * @instance */ - BindVariable.prototype.value = $util.newBuffer([]); + StreamKeyRangeRequest.prototype.key_range = null; /** - * BindVariable values. - * @member {Array.} values - * @memberof query.BindVariable + * StreamKeyRangeRequest charset. + * @member {binlogdata.ICharset|null|undefined} charset + * @memberof binlogdata.StreamKeyRangeRequest * @instance */ - BindVariable.prototype.values = $util.emptyArray; + StreamKeyRangeRequest.prototype.charset = null; /** - * Creates a new BindVariable instance using the specified properties. + * Creates a new StreamKeyRangeRequest instance using the specified properties. * @function create - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static - * @param {query.IBindVariable=} [properties] Properties to set - * @returns {query.BindVariable} BindVariable instance + * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set + * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest instance */ - BindVariable.create = function create(properties) { - return new BindVariable(properties); + StreamKeyRangeRequest.create = function create(properties) { + return new StreamKeyRangeRequest(properties); }; /** - * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. + * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. * @function encode - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static - * @param {query.IBindVariable} message BindVariable message or plain object to encode + * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindVariable.encode = function encode(message, writer) { + StreamKeyRangeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.query.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) + $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. + * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static - * @param {query.IBindVariable} message BindVariable message or plain object to encode + * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindVariable.encodeDelimited = function encodeDelimited(message, writer) { + StreamKeyRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindVariable message from the specified reader or buffer. + * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. * @function decode - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BindVariable} BindVariable + * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindVariable.decode = function decode(reader, length) { + StreamKeyRangeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BindVariable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); + message.position = reader.string(); break; case 2: - message.value = reader.bytes(); + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); break; case 3: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.query.Value.decode(reader, reader.uint32())); + message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -57180,331 +56703,134 @@ $root.query = (function() { }; /** - * Decodes a BindVariable message from the specified reader or buffer, length delimited. + * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BindVariable} BindVariable + * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindVariable.decodeDelimited = function decodeDelimited(reader) { + StreamKeyRangeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindVariable message. + * Verifies a StreamKeyRangeRequest message. * @function verify - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindVariable.verify = function verify(message) { + StreamKeyRangeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - case 4128: - case 4129: - case 4130: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.query.Value.verify(message.values[i]); - if (error) - return "values." + error; - } + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.key_range != null && message.hasOwnProperty("key_range")) { + var error = $root.topodata.KeyRange.verify(message.key_range); + if (error) + return "key_range." + error; + } + if (message.charset != null && message.hasOwnProperty("charset")) { + var error = $root.binlogdata.Charset.verify(message.charset); + if (error) + return "charset." + error; } return null; }; /** - * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. + * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static * @param {Object.} object Plain object - * @returns {query.BindVariable} BindVariable + * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest */ - BindVariable.fromObject = function fromObject(object) { - if (object instanceof $root.query.BindVariable) + StreamKeyRangeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.StreamKeyRangeRequest) return object; - var message = new $root.query.BindVariable(); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - case "HEXNUM": - case 4128: - message.type = 4128; - break; - case "HEXVAL": - case 4129: - message.type = 4129; - break; - case "BITNUM": - case 4130: - message.type = 4130; - break; + var message = new $root.binlogdata.StreamKeyRangeRequest(); + if (object.position != null) + message.position = String(object.position); + if (object.key_range != null) { + if (typeof object.key_range !== "object") + throw TypeError(".binlogdata.StreamKeyRangeRequest.key_range: object expected"); + message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".query.BindVariable.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".query.BindVariable.values: object expected"); - message.values[i] = $root.query.Value.fromObject(object.values[i]); - } + if (object.charset != null) { + if (typeof object.charset !== "object") + throw TypeError(".binlogdata.StreamKeyRangeRequest.charset: object expected"); + message.charset = $root.binlogdata.Charset.fromObject(object.charset); } return message; }; /** - * Creates a plain object from a BindVariable message. Also converts values to other types if specified. + * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @static - * @param {query.BindVariable} message BindVariable + * @param {binlogdata.StreamKeyRangeRequest} message StreamKeyRangeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindVariable.toObject = function toObject(message, options) { + StreamKeyRangeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; if (options.defaults) { - object.type = options.enums === String ? "NULL_TYPE" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.query.Value.toObject(message.values[j], options); + object.position = ""; + object.key_range = null; + object.charset = null; } + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.key_range != null && message.hasOwnProperty("key_range")) + object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); + if (message.charset != null && message.hasOwnProperty("charset")) + object.charset = $root.binlogdata.Charset.toObject(message.charset, options); return object; }; /** - * Converts this BindVariable to JSON. + * Converts this StreamKeyRangeRequest to JSON. * @function toJSON - * @memberof query.BindVariable + * @memberof binlogdata.StreamKeyRangeRequest * @instance * @returns {Object.} JSON object */ - BindVariable.prototype.toJSON = function toJSON() { + StreamKeyRangeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BindVariable; + return StreamKeyRangeRequest; })(); - query.BoundQuery = (function() { + binlogdata.StreamKeyRangeResponse = (function() { /** - * Properties of a BoundQuery. - * @memberof query - * @interface IBoundQuery - * @property {string|null} [sql] BoundQuery sql - * @property {Object.|null} [bind_variables] BoundQuery bind_variables + * Properties of a StreamKeyRangeResponse. + * @memberof binlogdata + * @interface IStreamKeyRangeResponse + * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamKeyRangeResponse binlog_transaction */ /** - * Constructs a new BoundQuery. - * @memberof query - * @classdesc Represents a BoundQuery. - * @implements IBoundQuery + * Constructs a new StreamKeyRangeResponse. + * @memberof binlogdata + * @classdesc Represents a StreamKeyRangeResponse. + * @implements IStreamKeyRangeResponse * @constructor - * @param {query.IBoundQuery=} [properties] Properties to set + * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set */ - function BoundQuery(properties) { - this.bind_variables = {}; + function StreamKeyRangeResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57512,110 +56838,75 @@ $root.query = (function() { } /** - * BoundQuery sql. - * @member {string} sql - * @memberof query.BoundQuery - * @instance - */ - BoundQuery.prototype.sql = ""; - - /** - * BoundQuery bind_variables. - * @member {Object.} bind_variables - * @memberof query.BoundQuery + * StreamKeyRangeResponse binlog_transaction. + * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction + * @memberof binlogdata.StreamKeyRangeResponse * @instance */ - BoundQuery.prototype.bind_variables = $util.emptyObject; + StreamKeyRangeResponse.prototype.binlog_transaction = null; /** - * Creates a new BoundQuery instance using the specified properties. + * Creates a new StreamKeyRangeResponse instance using the specified properties. * @function create - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static - * @param {query.IBoundQuery=} [properties] Properties to set - * @returns {query.BoundQuery} BoundQuery instance + * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set + * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse instance */ - BoundQuery.create = function create(properties) { - return new BoundQuery(properties); + StreamKeyRangeResponse.create = function create(properties) { + return new StreamKeyRangeResponse(properties); }; /** - * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. + * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. * @function encode - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static - * @param {query.IBoundQuery} message BoundQuery message or plain object to encode + * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundQuery.encode = function encode(message, writer) { + StreamKeyRangeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sql); - if (message.bind_variables != null && Object.hasOwnProperty.call(message, "bind_variables")) - for (var keys = Object.keys(message.bind_variables), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.query.BindVariable.encode(message.bind_variables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) + $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. + * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static - * @param {query.IBoundQuery} message BoundQuery message or plain object to encode + * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundQuery.encodeDelimited = function encodeDelimited(message, writer) { + StreamKeyRangeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundQuery message from the specified reader or buffer. + * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. * @function decode - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BoundQuery} BoundQuery + * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundQuery.decode = function decode(reader, length) { + StreamKeyRangeResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BoundQuery(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sql = reader.string(); - break; - case 2: - if (message.bind_variables === $util.emptyObject) - message.bind_variables = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.query.BindVariable.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.bind_variables[key] = value; + message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -57626,145 +56917,115 @@ $root.query = (function() { }; /** - * Decodes a BoundQuery message from the specified reader or buffer, length delimited. + * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BoundQuery} BoundQuery + * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundQuery.decodeDelimited = function decodeDelimited(reader) { + StreamKeyRangeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundQuery message. + * Verifies a StreamKeyRangeResponse message. * @function verify - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundQuery.verify = function verify(message) { + StreamKeyRangeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; - if (message.bind_variables != null && message.hasOwnProperty("bind_variables")) { - if (!$util.isObject(message.bind_variables)) - return "bind_variables: object expected"; - var key = Object.keys(message.bind_variables); - for (var i = 0; i < key.length; ++i) { - var error = $root.query.BindVariable.verify(message.bind_variables[key[i]]); - if (error) - return "bind_variables." + error; - } + if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { + var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); + if (error) + return "binlog_transaction." + error; } return null; }; /** - * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. + * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static * @param {Object.} object Plain object - * @returns {query.BoundQuery} BoundQuery + * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse */ - BoundQuery.fromObject = function fromObject(object) { - if (object instanceof $root.query.BoundQuery) + StreamKeyRangeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.StreamKeyRangeResponse) return object; - var message = new $root.query.BoundQuery(); - if (object.sql != null) - message.sql = String(object.sql); - if (object.bind_variables) { - if (typeof object.bind_variables !== "object") - throw TypeError(".query.BoundQuery.bind_variables: object expected"); - message.bind_variables = {}; - for (var keys = Object.keys(object.bind_variables), i = 0; i < keys.length; ++i) { - if (typeof object.bind_variables[keys[i]] !== "object") - throw TypeError(".query.BoundQuery.bind_variables: object expected"); - message.bind_variables[keys[i]] = $root.query.BindVariable.fromObject(object.bind_variables[keys[i]]); - } + var message = new $root.binlogdata.StreamKeyRangeResponse(); + if (object.binlog_transaction != null) { + if (typeof object.binlog_transaction !== "object") + throw TypeError(".binlogdata.StreamKeyRangeResponse.binlog_transaction: object expected"); + message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); } return message; }; /** - * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. + * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @static - * @param {query.BoundQuery} message BoundQuery + * @param {binlogdata.StreamKeyRangeResponse} message StreamKeyRangeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundQuery.toObject = function toObject(message, options) { + StreamKeyRangeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.bind_variables = {}; if (options.defaults) - object.sql = ""; - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; - var keys2; - if (message.bind_variables && (keys2 = Object.keys(message.bind_variables)).length) { - object.bind_variables = {}; - for (var j = 0; j < keys2.length; ++j) - object.bind_variables[keys2[j]] = $root.query.BindVariable.toObject(message.bind_variables[keys2[j]], options); - } + object.binlog_transaction = null; + if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) + object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); return object; }; /** - * Converts this BoundQuery to JSON. + * Converts this StreamKeyRangeResponse to JSON. * @function toJSON - * @memberof query.BoundQuery + * @memberof binlogdata.StreamKeyRangeResponse * @instance * @returns {Object.} JSON object */ - BoundQuery.prototype.toJSON = function toJSON() { + StreamKeyRangeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BoundQuery; + return StreamKeyRangeResponse; })(); - query.ExecuteOptions = (function() { + binlogdata.StreamTablesRequest = (function() { /** - * Properties of an ExecuteOptions. - * @memberof query - * @interface IExecuteOptions - * @property {query.ExecuteOptions.IncludedFields|null} [included_fields] ExecuteOptions included_fields - * @property {boolean|null} [client_found_rows] ExecuteOptions client_found_rows - * @property {query.ExecuteOptions.Workload|null} [workload] ExecuteOptions workload - * @property {number|Long|null} [sql_select_limit] ExecuteOptions sql_select_limit - * @property {query.ExecuteOptions.TransactionIsolation|null} [transaction_isolation] ExecuteOptions transaction_isolation - * @property {boolean|null} [skip_query_plan_cache] ExecuteOptions skip_query_plan_cache - * @property {query.ExecuteOptions.PlannerVersion|null} [planner_version] ExecuteOptions planner_version - * @property {boolean|null} [has_created_temp_tables] ExecuteOptions has_created_temp_tables - * @property {query.ExecuteOptions.Consolidator|null} [consolidator] ExecuteOptions consolidator - * @property {Array.|null} [transaction_access_mode] ExecuteOptions transaction_access_mode + * Properties of a StreamTablesRequest. + * @memberof binlogdata + * @interface IStreamTablesRequest + * @property {string|null} [position] StreamTablesRequest position + * @property {Array.|null} [tables] StreamTablesRequest tables + * @property {binlogdata.ICharset|null} [charset] StreamTablesRequest charset */ /** - * Constructs a new ExecuteOptions. - * @memberof query - * @classdesc Represents an ExecuteOptions. - * @implements IExecuteOptions + * Constructs a new StreamTablesRequest. + * @memberof binlogdata + * @classdesc Represents a StreamTablesRequest. + * @implements IStreamTablesRequest * @constructor - * @param {query.IExecuteOptions=} [properties] Properties to set + * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set */ - function ExecuteOptions(properties) { - this.transaction_access_mode = []; + function StreamTablesRequest(properties) { + this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57772,203 +57033,326 @@ $root.query = (function() { } /** - * ExecuteOptions included_fields. - * @member {query.ExecuteOptions.IncludedFields} included_fields - * @memberof query.ExecuteOptions + * StreamTablesRequest position. + * @member {string} position + * @memberof binlogdata.StreamTablesRequest * @instance */ - ExecuteOptions.prototype.included_fields = 0; + StreamTablesRequest.prototype.position = ""; /** - * ExecuteOptions client_found_rows. - * @member {boolean} client_found_rows - * @memberof query.ExecuteOptions + * StreamTablesRequest tables. + * @member {Array.} tables + * @memberof binlogdata.StreamTablesRequest * @instance */ - ExecuteOptions.prototype.client_found_rows = false; + StreamTablesRequest.prototype.tables = $util.emptyArray; /** - * ExecuteOptions workload. - * @member {query.ExecuteOptions.Workload} workload - * @memberof query.ExecuteOptions + * StreamTablesRequest charset. + * @member {binlogdata.ICharset|null|undefined} charset + * @memberof binlogdata.StreamTablesRequest * @instance */ - ExecuteOptions.prototype.workload = 0; + StreamTablesRequest.prototype.charset = null; /** - * ExecuteOptions sql_select_limit. - * @member {number|Long} sql_select_limit - * @memberof query.ExecuteOptions - * @instance + * Creates a new StreamTablesRequest instance using the specified properties. + * @function create + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set + * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest instance */ - ExecuteOptions.prototype.sql_select_limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StreamTablesRequest.create = function create(properties) { + return new StreamTablesRequest(properties); + }; /** - * ExecuteOptions transaction_isolation. - * @member {query.ExecuteOptions.TransactionIsolation} transaction_isolation - * @memberof query.ExecuteOptions - * @instance + * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * @function encode + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ExecuteOptions.prototype.transaction_isolation = 0; + StreamTablesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); + if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) + $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * ExecuteOptions skip_query_plan_cache. - * @member {boolean} skip_query_plan_cache - * @memberof query.ExecuteOptions - * @instance + * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ExecuteOptions.prototype.skip_query_plan_cache = false; + StreamTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ExecuteOptions planner_version. - * @member {query.ExecuteOptions.PlannerVersion} planner_version - * @memberof query.ExecuteOptions - * @instance + * Decodes a StreamTablesRequest message from the specified reader or buffer. + * @function decode + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteOptions.prototype.planner_version = 0; + StreamTablesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.position = reader.string(); + break; + case 2: + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + case 3: + message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ExecuteOptions has_created_temp_tables. - * @member {boolean} has_created_temp_tables - * @memberof query.ExecuteOptions - * @instance + * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteOptions.prototype.has_created_temp_tables = false; + StreamTablesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ExecuteOptions consolidator. - * @member {query.ExecuteOptions.Consolidator} consolidator - * @memberof query.ExecuteOptions + * Verifies a StreamTablesRequest message. + * @function verify + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamTablesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; + } + if (message.charset != null && message.hasOwnProperty("charset")) { + var error = $root.binlogdata.Charset.verify(message.charset); + if (error) + return "charset." + error; + } + return null; + }; + + /** + * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {Object.} object Plain object + * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + */ + StreamTablesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.StreamTablesRequest) + return object; + var message = new $root.binlogdata.StreamTablesRequest(); + if (object.position != null) + message.position = String(object.position); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".binlogdata.StreamTablesRequest.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); + } + if (object.charset != null) { + if (typeof object.charset !== "object") + throw TypeError(".binlogdata.StreamTablesRequest.charset: object expected"); + message.charset = $root.binlogdata.Charset.fromObject(object.charset); + } + return message; + }; + + /** + * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof binlogdata.StreamTablesRequest + * @static + * @param {binlogdata.StreamTablesRequest} message StreamTablesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamTablesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tables = []; + if (options.defaults) { + object.position = ""; + object.charset = null; + } + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } + if (message.charset != null && message.hasOwnProperty("charset")) + object.charset = $root.binlogdata.Charset.toObject(message.charset, options); + return object; + }; + + /** + * Converts this StreamTablesRequest to JSON. + * @function toJSON + * @memberof binlogdata.StreamTablesRequest * @instance + * @returns {Object.} JSON object */ - ExecuteOptions.prototype.consolidator = 0; + StreamTablesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StreamTablesRequest; + })(); + + binlogdata.StreamTablesResponse = (function() { /** - * ExecuteOptions transaction_access_mode. - * @member {Array.} transaction_access_mode - * @memberof query.ExecuteOptions + * Properties of a StreamTablesResponse. + * @memberof binlogdata + * @interface IStreamTablesResponse + * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamTablesResponse binlog_transaction + */ + + /** + * Constructs a new StreamTablesResponse. + * @memberof binlogdata + * @classdesc Represents a StreamTablesResponse. + * @implements IStreamTablesResponse + * @constructor + * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set + */ + function StreamTablesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamTablesResponse binlog_transaction. + * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction + * @memberof binlogdata.StreamTablesResponse * @instance */ - ExecuteOptions.prototype.transaction_access_mode = $util.emptyArray; + StreamTablesResponse.prototype.binlog_transaction = null; /** - * Creates a new ExecuteOptions instance using the specified properties. + * Creates a new StreamTablesResponse instance using the specified properties. * @function create - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static - * @param {query.IExecuteOptions=} [properties] Properties to set - * @returns {query.ExecuteOptions} ExecuteOptions instance + * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set + * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse instance */ - ExecuteOptions.create = function create(properties) { - return new ExecuteOptions(properties); + StreamTablesResponse.create = function create(properties) { + return new StreamTablesResponse(properties); }; /** - * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. + * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. * @function encode - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static - * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode + * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteOptions.encode = function encode(message, writer) { + StreamTablesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.included_fields != null && Object.hasOwnProperty.call(message, "included_fields")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.included_fields); - if (message.client_found_rows != null && Object.hasOwnProperty.call(message, "client_found_rows")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_found_rows); - if (message.workload != null && Object.hasOwnProperty.call(message, "workload")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.workload); - if (message.sql_select_limit != null && Object.hasOwnProperty.call(message, "sql_select_limit")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.sql_select_limit); - if (message.transaction_isolation != null && Object.hasOwnProperty.call(message, "transaction_isolation")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.transaction_isolation); - if (message.skip_query_plan_cache != null && Object.hasOwnProperty.call(message, "skip_query_plan_cache")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.skip_query_plan_cache); - if (message.planner_version != null && Object.hasOwnProperty.call(message, "planner_version")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.planner_version); - if (message.has_created_temp_tables != null && Object.hasOwnProperty.call(message, "has_created_temp_tables")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.has_created_temp_tables); - if (message.consolidator != null && Object.hasOwnProperty.call(message, "consolidator")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.consolidator); - if (message.transaction_access_mode != null && message.transaction_access_mode.length) { - writer.uint32(/* id 14, wireType 2 =*/114).fork(); - for (var i = 0; i < message.transaction_access_mode.length; ++i) - writer.int32(message.transaction_access_mode[i]); - writer.ldelim(); - } + if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) + $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. + * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static - * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode + * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteOptions.encodeDelimited = function encodeDelimited(message, writer) { + StreamTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteOptions message from the specified reader or buffer. + * Decodes a StreamTablesResponse message from the specified reader or buffer. * @function decode - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteOptions} ExecuteOptions + * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteOptions.decode = function decode(reader, length) { + StreamTablesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.included_fields = reader.int32(); - break; - case 5: - message.client_found_rows = reader.bool(); - break; - case 6: - message.workload = reader.int32(); - break; - case 8: - message.sql_select_limit = reader.int64(); - break; - case 9: - message.transaction_isolation = reader.int32(); - break; - case 10: - message.skip_query_plan_cache = reader.bool(); - break; - case 11: - message.planner_version = reader.int32(); - break; - case 12: - message.has_created_temp_tables = reader.bool(); - break; - case 13: - message.consolidator = reader.int32(); - break; - case 14: - if (!(message.transaction_access_mode && message.transaction_access_mode.length)) - message.transaction_access_mode = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.transaction_access_mode.push(reader.int32()); - } else - message.transaction_access_mode.push(reader.int32()); + case 1: + message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -57979,493 +57363,113 @@ $root.query = (function() { }; /** - * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. + * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteOptions} ExecuteOptions + * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteOptions.decodeDelimited = function decodeDelimited(reader) { + StreamTablesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteOptions message. + * Verifies a StreamTablesResponse message. * @function verify - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteOptions.verify = function verify(message) { + StreamTablesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.included_fields != null && message.hasOwnProperty("included_fields")) - switch (message.included_fields) { - default: - return "included_fields: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) - if (typeof message.client_found_rows !== "boolean") - return "client_found_rows: boolean expected"; - if (message.workload != null && message.hasOwnProperty("workload")) - switch (message.workload) { - default: - return "workload: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) - if (!$util.isInteger(message.sql_select_limit) && !(message.sql_select_limit && $util.isInteger(message.sql_select_limit.low) && $util.isInteger(message.sql_select_limit.high))) - return "sql_select_limit: integer|Long expected"; - if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) - switch (message.transaction_isolation) { - default: - return "transaction_isolation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) - if (typeof message.skip_query_plan_cache !== "boolean") - return "skip_query_plan_cache: boolean expected"; - if (message.planner_version != null && message.hasOwnProperty("planner_version")) - switch (message.planner_version) { - default: - return "planner_version: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) - if (typeof message.has_created_temp_tables !== "boolean") - return "has_created_temp_tables: boolean expected"; - if (message.consolidator != null && message.hasOwnProperty("consolidator")) - switch (message.consolidator) { - default: - return "consolidator: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.transaction_access_mode != null && message.hasOwnProperty("transaction_access_mode")) { - if (!Array.isArray(message.transaction_access_mode)) - return "transaction_access_mode: array expected"; - for (var i = 0; i < message.transaction_access_mode.length; ++i) - switch (message.transaction_access_mode[i]) { - default: - return "transaction_access_mode: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } + if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { + var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); + if (error) + return "binlog_transaction." + error; } return null; }; /** - * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. + * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static * @param {Object.} object Plain object - * @returns {query.ExecuteOptions} ExecuteOptions + * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse */ - ExecuteOptions.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteOptions) + StreamTablesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.StreamTablesResponse) return object; - var message = new $root.query.ExecuteOptions(); - switch (object.included_fields) { - case "TYPE_AND_NAME": - case 0: - message.included_fields = 0; - break; - case "TYPE_ONLY": - case 1: - message.included_fields = 1; - break; - case "ALL": - case 2: - message.included_fields = 2; - break; - } - if (object.client_found_rows != null) - message.client_found_rows = Boolean(object.client_found_rows); - switch (object.workload) { - case "UNSPECIFIED": - case 0: - message.workload = 0; - break; - case "OLTP": - case 1: - message.workload = 1; - break; - case "OLAP": - case 2: - message.workload = 2; - break; - case "DBA": - case 3: - message.workload = 3; - break; - } - if (object.sql_select_limit != null) - if ($util.Long) - (message.sql_select_limit = $util.Long.fromValue(object.sql_select_limit)).unsigned = false; - else if (typeof object.sql_select_limit === "string") - message.sql_select_limit = parseInt(object.sql_select_limit, 10); - else if (typeof object.sql_select_limit === "number") - message.sql_select_limit = object.sql_select_limit; - else if (typeof object.sql_select_limit === "object") - message.sql_select_limit = new $util.LongBits(object.sql_select_limit.low >>> 0, object.sql_select_limit.high >>> 0).toNumber(); - switch (object.transaction_isolation) { - case "DEFAULT": - case 0: - message.transaction_isolation = 0; - break; - case "REPEATABLE_READ": - case 1: - message.transaction_isolation = 1; - break; - case "READ_COMMITTED": - case 2: - message.transaction_isolation = 2; - break; - case "READ_UNCOMMITTED": - case 3: - message.transaction_isolation = 3; - break; - case "SERIALIZABLE": - case 4: - message.transaction_isolation = 4; - break; - case "CONSISTENT_SNAPSHOT_READ_ONLY": - case 5: - message.transaction_isolation = 5; - break; - case "AUTOCOMMIT": - case 6: - message.transaction_isolation = 6; - break; - } - if (object.skip_query_plan_cache != null) - message.skip_query_plan_cache = Boolean(object.skip_query_plan_cache); - switch (object.planner_version) { - case "DEFAULT_PLANNER": - case 0: - message.planner_version = 0; - break; - case "V3": - case 1: - message.planner_version = 1; - break; - case "Gen4": - case 2: - message.planner_version = 2; - break; - case "Gen4Greedy": - case 3: - message.planner_version = 3; - break; - case "Gen4Left2Right": - case 4: - message.planner_version = 4; - break; - case "Gen4WithFallback": - case 5: - message.planner_version = 5; - break; - case "Gen4CompareV3": - case 6: - message.planner_version = 6; - break; - } - if (object.has_created_temp_tables != null) - message.has_created_temp_tables = Boolean(object.has_created_temp_tables); - switch (object.consolidator) { - case "CONSOLIDATOR_UNSPECIFIED": - case 0: - message.consolidator = 0; - break; - case "CONSOLIDATOR_DISABLED": - case 1: - message.consolidator = 1; - break; - case "CONSOLIDATOR_ENABLED": - case 2: - message.consolidator = 2; - break; - case "CONSOLIDATOR_ENABLED_REPLICAS": - case 3: - message.consolidator = 3; - break; - } - if (object.transaction_access_mode) { - if (!Array.isArray(object.transaction_access_mode)) - throw TypeError(".query.ExecuteOptions.transaction_access_mode: array expected"); - message.transaction_access_mode = []; - for (var i = 0; i < object.transaction_access_mode.length; ++i) - switch (object.transaction_access_mode[i]) { - default: - case "CONSISTENT_SNAPSHOT": - case 0: - message.transaction_access_mode[i] = 0; - break; - case "READ_WRITE": - case 1: - message.transaction_access_mode[i] = 1; - break; - case "READ_ONLY": - case 2: - message.transaction_access_mode[i] = 2; - break; - } + var message = new $root.binlogdata.StreamTablesResponse(); + if (object.binlog_transaction != null) { + if (typeof object.binlog_transaction !== "object") + throw TypeError(".binlogdata.StreamTablesResponse.binlog_transaction: object expected"); + message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); } return message; }; /** - * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. + * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @static - * @param {query.ExecuteOptions} message ExecuteOptions + * @param {binlogdata.StreamTablesResponse} message StreamTablesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteOptions.toObject = function toObject(message, options) { + StreamTablesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.transaction_access_mode = []; - if (options.defaults) { - object.included_fields = options.enums === String ? "TYPE_AND_NAME" : 0; - object.client_found_rows = false; - object.workload = options.enums === String ? "UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sql_select_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sql_select_limit = options.longs === String ? "0" : 0; - object.transaction_isolation = options.enums === String ? "DEFAULT" : 0; - object.skip_query_plan_cache = false; - object.planner_version = options.enums === String ? "DEFAULT_PLANNER" : 0; - object.has_created_temp_tables = false; - object.consolidator = options.enums === String ? "CONSOLIDATOR_UNSPECIFIED" : 0; - } - if (message.included_fields != null && message.hasOwnProperty("included_fields")) - object.included_fields = options.enums === String ? $root.query.ExecuteOptions.IncludedFields[message.included_fields] : message.included_fields; - if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) - object.client_found_rows = message.client_found_rows; - if (message.workload != null && message.hasOwnProperty("workload")) - object.workload = options.enums === String ? $root.query.ExecuteOptions.Workload[message.workload] : message.workload; - if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) - if (typeof message.sql_select_limit === "number") - object.sql_select_limit = options.longs === String ? String(message.sql_select_limit) : message.sql_select_limit; - else - object.sql_select_limit = options.longs === String ? $util.Long.prototype.toString.call(message.sql_select_limit) : options.longs === Number ? new $util.LongBits(message.sql_select_limit.low >>> 0, message.sql_select_limit.high >>> 0).toNumber() : message.sql_select_limit; - if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) - object.transaction_isolation = options.enums === String ? $root.query.ExecuteOptions.TransactionIsolation[message.transaction_isolation] : message.transaction_isolation; - if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) - object.skip_query_plan_cache = message.skip_query_plan_cache; - if (message.planner_version != null && message.hasOwnProperty("planner_version")) - object.planner_version = options.enums === String ? $root.query.ExecuteOptions.PlannerVersion[message.planner_version] : message.planner_version; - if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) - object.has_created_temp_tables = message.has_created_temp_tables; - if (message.consolidator != null && message.hasOwnProperty("consolidator")) - object.consolidator = options.enums === String ? $root.query.ExecuteOptions.Consolidator[message.consolidator] : message.consolidator; - if (message.transaction_access_mode && message.transaction_access_mode.length) { - object.transaction_access_mode = []; - for (var j = 0; j < message.transaction_access_mode.length; ++j) - object.transaction_access_mode[j] = options.enums === String ? $root.query.ExecuteOptions.TransactionAccessMode[message.transaction_access_mode[j]] : message.transaction_access_mode[j]; - } + if (options.defaults) + object.binlog_transaction = null; + if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) + object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); return object; }; /** - * Converts this ExecuteOptions to JSON. + * Converts this StreamTablesResponse to JSON. * @function toJSON - * @memberof query.ExecuteOptions + * @memberof binlogdata.StreamTablesResponse * @instance * @returns {Object.} JSON object */ - ExecuteOptions.prototype.toJSON = function toJSON() { + StreamTablesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * IncludedFields enum. - * @name query.ExecuteOptions.IncludedFields - * @enum {number} - * @property {number} TYPE_AND_NAME=0 TYPE_AND_NAME value - * @property {number} TYPE_ONLY=1 TYPE_ONLY value - * @property {number} ALL=2 ALL value - */ - ExecuteOptions.IncludedFields = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_AND_NAME"] = 0; - values[valuesById[1] = "TYPE_ONLY"] = 1; - values[valuesById[2] = "ALL"] = 2; - return values; - })(); - - /** - * Workload enum. - * @name query.ExecuteOptions.Workload - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} OLTP=1 OLTP value - * @property {number} OLAP=2 OLAP value - * @property {number} DBA=3 DBA value - */ - ExecuteOptions.Workload = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "OLTP"] = 1; - values[valuesById[2] = "OLAP"] = 2; - values[valuesById[3] = "DBA"] = 3; - return values; - })(); - - /** - * TransactionIsolation enum. - * @name query.ExecuteOptions.TransactionIsolation - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} REPEATABLE_READ=1 REPEATABLE_READ value - * @property {number} READ_COMMITTED=2 READ_COMMITTED value - * @property {number} READ_UNCOMMITTED=3 READ_UNCOMMITTED value - * @property {number} SERIALIZABLE=4 SERIALIZABLE value - * @property {number} CONSISTENT_SNAPSHOT_READ_ONLY=5 CONSISTENT_SNAPSHOT_READ_ONLY value - * @property {number} AUTOCOMMIT=6 AUTOCOMMIT value - */ - ExecuteOptions.TransactionIsolation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "REPEATABLE_READ"] = 1; - values[valuesById[2] = "READ_COMMITTED"] = 2; - values[valuesById[3] = "READ_UNCOMMITTED"] = 3; - values[valuesById[4] = "SERIALIZABLE"] = 4; - values[valuesById[5] = "CONSISTENT_SNAPSHOT_READ_ONLY"] = 5; - values[valuesById[6] = "AUTOCOMMIT"] = 6; - return values; - })(); - - /** - * PlannerVersion enum. - * @name query.ExecuteOptions.PlannerVersion - * @enum {number} - * @property {number} DEFAULT_PLANNER=0 DEFAULT_PLANNER value - * @property {number} V3=1 V3 value - * @property {number} Gen4=2 Gen4 value - * @property {number} Gen4Greedy=3 Gen4Greedy value - * @property {number} Gen4Left2Right=4 Gen4Left2Right value - * @property {number} Gen4WithFallback=5 Gen4WithFallback value - * @property {number} Gen4CompareV3=6 Gen4CompareV3 value - */ - ExecuteOptions.PlannerVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT_PLANNER"] = 0; - values[valuesById[1] = "V3"] = 1; - values[valuesById[2] = "Gen4"] = 2; - values[valuesById[3] = "Gen4Greedy"] = 3; - values[valuesById[4] = "Gen4Left2Right"] = 4; - values[valuesById[5] = "Gen4WithFallback"] = 5; - values[valuesById[6] = "Gen4CompareV3"] = 6; - return values; - })(); - - /** - * Consolidator enum. - * @name query.ExecuteOptions.Consolidator - * @enum {number} - * @property {number} CONSOLIDATOR_UNSPECIFIED=0 CONSOLIDATOR_UNSPECIFIED value - * @property {number} CONSOLIDATOR_DISABLED=1 CONSOLIDATOR_DISABLED value - * @property {number} CONSOLIDATOR_ENABLED=2 CONSOLIDATOR_ENABLED value - * @property {number} CONSOLIDATOR_ENABLED_REPLICAS=3 CONSOLIDATOR_ENABLED_REPLICAS value - */ - ExecuteOptions.Consolidator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONSOLIDATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONSOLIDATOR_DISABLED"] = 1; - values[valuesById[2] = "CONSOLIDATOR_ENABLED"] = 2; - values[valuesById[3] = "CONSOLIDATOR_ENABLED_REPLICAS"] = 3; - return values; - })(); - - /** - * TransactionAccessMode enum. - * @name query.ExecuteOptions.TransactionAccessMode - * @enum {number} - * @property {number} CONSISTENT_SNAPSHOT=0 CONSISTENT_SNAPSHOT value - * @property {number} READ_WRITE=1 READ_WRITE value - * @property {number} READ_ONLY=2 READ_ONLY value - */ - ExecuteOptions.TransactionAccessMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONSISTENT_SNAPSHOT"] = 0; - values[valuesById[1] = "READ_WRITE"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - return values; - })(); - - return ExecuteOptions; + return StreamTablesResponse; })(); - query.Field = (function() { + binlogdata.CharsetConversion = (function() { /** - * Properties of a Field. - * @memberof query - * @interface IField - * @property {string|null} [name] Field name - * @property {query.Type|null} [type] Field type - * @property {string|null} [table] Field table - * @property {string|null} [org_table] Field org_table - * @property {string|null} [database] Field database - * @property {string|null} [org_name] Field org_name - * @property {number|null} [column_length] Field column_length - * @property {number|null} [charset] Field charset - * @property {number|null} [decimals] Field decimals - * @property {number|null} [flags] Field flags - * @property {string|null} [column_type] Field column_type + * Properties of a CharsetConversion. + * @memberof binlogdata + * @interface ICharsetConversion + * @property {string|null} [from_charset] CharsetConversion from_charset + * @property {string|null} [to_charset] CharsetConversion to_charset */ /** - * Constructs a new Field. - * @memberof query - * @classdesc Represents a Field. - * @implements IField + * Constructs a new CharsetConversion. + * @memberof binlogdata + * @classdesc Represents a CharsetConversion. + * @implements ICharsetConversion * @constructor - * @param {query.IField=} [properties] Properties to set + * @param {binlogdata.ICharsetConversion=} [properties] Properties to set */ - function Field(properties) { + function CharsetConversion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58473,205 +57477,88 @@ $root.query = (function() { } /** - * Field name. - * @member {string} name - * @memberof query.Field - * @instance - */ - Field.prototype.name = ""; - - /** - * Field type. - * @member {query.Type} type - * @memberof query.Field - * @instance - */ - Field.prototype.type = 0; - - /** - * Field table. - * @member {string} table - * @memberof query.Field - * @instance - */ - Field.prototype.table = ""; - - /** - * Field org_table. - * @member {string} org_table - * @memberof query.Field - * @instance - */ - Field.prototype.org_table = ""; - - /** - * Field database. - * @member {string} database - * @memberof query.Field - * @instance - */ - Field.prototype.database = ""; - - /** - * Field org_name. - * @member {string} org_name - * @memberof query.Field - * @instance - */ - Field.prototype.org_name = ""; - - /** - * Field column_length. - * @member {number} column_length - * @memberof query.Field - * @instance - */ - Field.prototype.column_length = 0; - - /** - * Field charset. - * @member {number} charset - * @memberof query.Field - * @instance - */ - Field.prototype.charset = 0; - - /** - * Field decimals. - * @member {number} decimals - * @memberof query.Field - * @instance - */ - Field.prototype.decimals = 0; - - /** - * Field flags. - * @member {number} flags - * @memberof query.Field + * CharsetConversion from_charset. + * @member {string} from_charset + * @memberof binlogdata.CharsetConversion * @instance */ - Field.prototype.flags = 0; + CharsetConversion.prototype.from_charset = ""; /** - * Field column_type. - * @member {string} column_type - * @memberof query.Field + * CharsetConversion to_charset. + * @member {string} to_charset + * @memberof binlogdata.CharsetConversion * @instance */ - Field.prototype.column_type = ""; + CharsetConversion.prototype.to_charset = ""; /** - * Creates a new Field instance using the specified properties. + * Creates a new CharsetConversion instance using the specified properties. * @function create - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static - * @param {query.IField=} [properties] Properties to set - * @returns {query.Field} Field instance + * @param {binlogdata.ICharsetConversion=} [properties] Properties to set + * @returns {binlogdata.CharsetConversion} CharsetConversion instance */ - Field.create = function create(properties) { - return new Field(properties); + CharsetConversion.create = function create(properties) { + return new CharsetConversion(properties); }; /** - * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. + * Encodes the specified CharsetConversion message. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. * @function encode - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static - * @param {query.IField} message Field message or plain object to encode + * @param {binlogdata.ICharsetConversion} message CharsetConversion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Field.encode = function encode(message, writer) { + CharsetConversion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.table); - if (message.org_table != null && Object.hasOwnProperty.call(message, "org_table")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.org_table); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); - if (message.org_name != null && Object.hasOwnProperty.call(message, "org_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.org_name); - if (message.column_length != null && Object.hasOwnProperty.call(message, "column_length")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.column_length); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.charset); - if (message.decimals != null && Object.hasOwnProperty.call(message, "decimals")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.decimals); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.flags); - if (message.column_type != null && Object.hasOwnProperty.call(message, "column_type")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.column_type); + if (message.from_charset != null && Object.hasOwnProperty.call(message, "from_charset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_charset); + if (message.to_charset != null && Object.hasOwnProperty.call(message, "to_charset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_charset); return writer; }; /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. + * Encodes the specified CharsetConversion message, length delimited. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. * @function encodeDelimited - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static - * @param {query.IField} message Field message or plain object to encode + * @param {binlogdata.ICharsetConversion} message CharsetConversion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Field.encodeDelimited = function encodeDelimited(message, writer) { + CharsetConversion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Field message from the specified reader or buffer. + * Decodes a CharsetConversion message from the specified reader or buffer. * @function decode - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.Field} Field + * @returns {binlogdata.CharsetConversion} CharsetConversion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Field.decode = function decode(reader, length) { + CharsetConversion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Field(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.CharsetConversion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.from_charset = reader.string(); break; case 2: - message.type = reader.int32(); - break; - case 3: - message.table = reader.string(); - break; - case 4: - message.org_table = reader.string(); - break; - case 5: - message.database = reader.string(); - break; - case 6: - message.org_name = reader.string(); - break; - case 7: - message.column_length = reader.uint32(); - break; - case 8: - message.charset = reader.uint32(); - break; - case 9: - message.decimals = reader.uint32(); - break; - case 10: - message.flags = reader.uint32(); - break; - case 11: - message.column_type = reader.string(); + message.to_charset = reader.string(); break; default: reader.skipType(tag & 7); @@ -58682,368 +57569,126 @@ $root.query = (function() { }; /** - * Decodes a Field message from the specified reader or buffer, length delimited. + * Decodes a CharsetConversion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Field} Field + * @returns {binlogdata.CharsetConversion} CharsetConversion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Field.decodeDelimited = function decodeDelimited(reader) { + CharsetConversion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Field message. + * Verifies a CharsetConversion message. * @function verify - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Field.verify = function verify(message) { + CharsetConversion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - case 4128: - case 4129: - case 4130: - break; - } - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.org_table != null && message.hasOwnProperty("org_table")) - if (!$util.isString(message.org_table)) - return "org_table: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.org_name != null && message.hasOwnProperty("org_name")) - if (!$util.isString(message.org_name)) - return "org_name: string expected"; - if (message.column_length != null && message.hasOwnProperty("column_length")) - if (!$util.isInteger(message.column_length)) - return "column_length: integer expected"; - if (message.charset != null && message.hasOwnProperty("charset")) - if (!$util.isInteger(message.charset)) - return "charset: integer expected"; - if (message.decimals != null && message.hasOwnProperty("decimals")) - if (!$util.isInteger(message.decimals)) - return "decimals: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - if (message.column_type != null && message.hasOwnProperty("column_type")) - if (!$util.isString(message.column_type)) - return "column_type: string expected"; + if (message.from_charset != null && message.hasOwnProperty("from_charset")) + if (!$util.isString(message.from_charset)) + return "from_charset: string expected"; + if (message.to_charset != null && message.hasOwnProperty("to_charset")) + if (!$util.isString(message.to_charset)) + return "to_charset: string expected"; return null; }; /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. + * Creates a CharsetConversion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static * @param {Object.} object Plain object - * @returns {query.Field} Field + * @returns {binlogdata.CharsetConversion} CharsetConversion */ - Field.fromObject = function fromObject(object) { - if (object instanceof $root.query.Field) + CharsetConversion.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.CharsetConversion) return object; - var message = new $root.query.Field(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - case "HEXNUM": - case 4128: - message.type = 4128; - break; - case "HEXVAL": - case 4129: - message.type = 4129; - break; - case "BITNUM": - case 4130: - message.type = 4130; - break; - } - if (object.table != null) - message.table = String(object.table); - if (object.org_table != null) - message.org_table = String(object.org_table); - if (object.database != null) - message.database = String(object.database); - if (object.org_name != null) - message.org_name = String(object.org_name); - if (object.column_length != null) - message.column_length = object.column_length >>> 0; - if (object.charset != null) - message.charset = object.charset >>> 0; - if (object.decimals != null) - message.decimals = object.decimals >>> 0; - if (object.flags != null) - message.flags = object.flags >>> 0; - if (object.column_type != null) - message.column_type = String(object.column_type); + var message = new $root.binlogdata.CharsetConversion(); + if (object.from_charset != null) + message.from_charset = String(object.from_charset); + if (object.to_charset != null) + message.to_charset = String(object.to_charset); return message; }; /** - * Creates a plain object from a Field message. Also converts values to other types if specified. + * Creates a plain object from a CharsetConversion message. Also converts values to other types if specified. * @function toObject - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @static - * @param {query.Field} message Field + * @param {binlogdata.CharsetConversion} message CharsetConversion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Field.toObject = function toObject(message, options) { + CharsetConversion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "NULL_TYPE" : 0; - object.table = ""; - object.org_table = ""; - object.database = ""; - object.org_name = ""; - object.column_length = 0; - object.charset = 0; - object.decimals = 0; - object.flags = 0; - object.column_type = ""; + object.from_charset = ""; + object.to_charset = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.org_table != null && message.hasOwnProperty("org_table")) - object.org_table = message.org_table; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.org_name != null && message.hasOwnProperty("org_name")) - object.org_name = message.org_name; - if (message.column_length != null && message.hasOwnProperty("column_length")) - object.column_length = message.column_length; - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = message.charset; - if (message.decimals != null && message.hasOwnProperty("decimals")) - object.decimals = message.decimals; - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - if (message.column_type != null && message.hasOwnProperty("column_type")) - object.column_type = message.column_type; + if (message.from_charset != null && message.hasOwnProperty("from_charset")) + object.from_charset = message.from_charset; + if (message.to_charset != null && message.hasOwnProperty("to_charset")) + object.to_charset = message.to_charset; return object; }; /** - * Converts this Field to JSON. + * Converts this CharsetConversion to JSON. * @function toJSON - * @memberof query.Field + * @memberof binlogdata.CharsetConversion * @instance * @returns {Object.} JSON object */ - Field.prototype.toJSON = function toJSON() { + CharsetConversion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Field; + return CharsetConversion; })(); - query.Row = (function() { + binlogdata.Rule = (function() { /** - * Properties of a Row. - * @memberof query - * @interface IRow - * @property {Array.|null} [lengths] Row lengths - * @property {Uint8Array|null} [values] Row values + * Properties of a Rule. + * @memberof binlogdata + * @interface IRule + * @property {string|null} [match] Rule match + * @property {string|null} [filter] Rule filter + * @property {Object.|null} [convert_enum_to_text] Rule convert_enum_to_text + * @property {Object.|null} [convert_charset] Rule convert_charset + * @property {string|null} [source_unique_key_columns] Rule source_unique_key_columns + * @property {string|null} [target_unique_key_columns] Rule target_unique_key_columns + * @property {string|null} [source_unique_key_target_columns] Rule source_unique_key_target_columns + * @property {Object.|null} [convert_int_to_enum] Rule convert_int_to_enum */ /** - * Constructs a new Row. - * @memberof query - * @classdesc Represents a Row. - * @implements IRow + * Constructs a new Rule. + * @memberof binlogdata + * @classdesc Represents a Rule. + * @implements IRule * @constructor - * @param {query.IRow=} [properties] Properties to set + * @param {binlogdata.IRule=} [properties] Properties to set */ - function Row(properties) { - this.lengths = []; + function Rule(properties) { + this.convert_enum_to_text = {}; + this.convert_charset = {}; + this.convert_int_to_enum = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59051,99 +57696,228 @@ $root.query = (function() { } /** - * Row lengths. - * @member {Array.} lengths - * @memberof query.Row + * Rule match. + * @member {string} match + * @memberof binlogdata.Rule * @instance */ - Row.prototype.lengths = $util.emptyArray; + Rule.prototype.match = ""; /** - * Row values. - * @member {Uint8Array} values - * @memberof query.Row + * Rule filter. + * @member {string} filter + * @memberof binlogdata.Rule * @instance */ - Row.prototype.values = $util.newBuffer([]); + Rule.prototype.filter = ""; /** - * Creates a new Row instance using the specified properties. + * Rule convert_enum_to_text. + * @member {Object.} convert_enum_to_text + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.convert_enum_to_text = $util.emptyObject; + + /** + * Rule convert_charset. + * @member {Object.} convert_charset + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.convert_charset = $util.emptyObject; + + /** + * Rule source_unique_key_columns. + * @member {string} source_unique_key_columns + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.source_unique_key_columns = ""; + + /** + * Rule target_unique_key_columns. + * @member {string} target_unique_key_columns + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.target_unique_key_columns = ""; + + /** + * Rule source_unique_key_target_columns. + * @member {string} source_unique_key_target_columns + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.source_unique_key_target_columns = ""; + + /** + * Rule convert_int_to_enum. + * @member {Object.} convert_int_to_enum + * @memberof binlogdata.Rule + * @instance + */ + Rule.prototype.convert_int_to_enum = $util.emptyObject; + + /** + * Creates a new Rule instance using the specified properties. * @function create - * @memberof query.Row + * @memberof binlogdata.Rule * @static - * @param {query.IRow=} [properties] Properties to set - * @returns {query.Row} Row instance + * @param {binlogdata.IRule=} [properties] Properties to set + * @returns {binlogdata.Rule} Rule instance */ - Row.create = function create(properties) { - return new Row(properties); + Rule.create = function create(properties) { + return new Rule(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. + * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. * @function encode - * @memberof query.Row + * @memberof binlogdata.Rule * @static - * @param {query.IRow} message Row message or plain object to encode + * @param {binlogdata.IRule} message Rule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + Rule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lengths != null && message.lengths.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.lengths.length; ++i) - writer.sint64(message.lengths[i]); - writer.ldelim(); - } - if (message.values != null && Object.hasOwnProperty.call(message, "values")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.values); + if (message.match != null && Object.hasOwnProperty.call(message, "match")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.match); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.convert_enum_to_text != null && Object.hasOwnProperty.call(message, "convert_enum_to_text")) + for (var keys = Object.keys(message.convert_enum_to_text), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.convert_enum_to_text[keys[i]]).ldelim(); + if (message.convert_charset != null && Object.hasOwnProperty.call(message, "convert_charset")) + for (var keys = Object.keys(message.convert_charset), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.binlogdata.CharsetConversion.encode(message.convert_charset[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.source_unique_key_columns != null && Object.hasOwnProperty.call(message, "source_unique_key_columns")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_unique_key_columns); + if (message.target_unique_key_columns != null && Object.hasOwnProperty.call(message, "target_unique_key_columns")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.target_unique_key_columns); + if (message.source_unique_key_target_columns != null && Object.hasOwnProperty.call(message, "source_unique_key_target_columns")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.source_unique_key_target_columns); + if (message.convert_int_to_enum != null && Object.hasOwnProperty.call(message, "convert_int_to_enum")) + for (var keys = Object.keys(message.convert_int_to_enum), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).bool(message.convert_int_to_enum[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. + * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. * @function encodeDelimited - * @memberof query.Row + * @memberof binlogdata.Rule * @static - * @param {query.IRow} message Row message or plain object to encode + * @param {binlogdata.IRule} message Rule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + Rule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a Rule message from the specified reader or buffer. * @function decode - * @memberof query.Row + * @memberof binlogdata.Rule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.Row} Row + * @returns {binlogdata.Rule} Rule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decode = function decode(reader, length) { + Rule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Rule(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.lengths && message.lengths.length)) - message.lengths = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.lengths.push(reader.sint64()); - } else - message.lengths.push(reader.sint64()); + message.match = reader.string(); break; case 2: - message.values = reader.bytes(); + message.filter = reader.string(); + break; + case 3: + if (message.convert_enum_to_text === $util.emptyObject) + message.convert_enum_to_text = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.convert_enum_to_text[key] = value; + break; + case 4: + if (message.convert_charset === $util.emptyObject) + message.convert_charset = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.binlogdata.CharsetConversion.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.convert_charset[key] = value; + break; + case 5: + message.source_unique_key_columns = reader.string(); + break; + case 6: + message.target_unique_key_columns = reader.string(); + break; + case 7: + message.source_unique_key_target_columns = reader.string(); + break; + case 8: + if (message.convert_int_to_enum === $util.emptyObject) + message.convert_int_to_enum = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = false; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.bool(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.convert_int_to_enum[key] = value; break; default: reader.skipType(tag & 7); @@ -59154,154 +57928,215 @@ $root.query = (function() { }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a Rule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.Row + * @memberof binlogdata.Rule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Row} Row + * @returns {binlogdata.Rule} Rule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decodeDelimited = function decodeDelimited(reader) { + Rule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a Rule message. * @function verify - * @memberof query.Row + * @memberof binlogdata.Rule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Row.verify = function verify(message) { + Rule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lengths != null && message.hasOwnProperty("lengths")) { - if (!Array.isArray(message.lengths)) - return "lengths: array expected"; - for (var i = 0; i < message.lengths.length; ++i) - if (!$util.isInteger(message.lengths[i]) && !(message.lengths[i] && $util.isInteger(message.lengths[i].low) && $util.isInteger(message.lengths[i].high))) - return "lengths: integer|Long[] expected"; + if (message.match != null && message.hasOwnProperty("match")) + if (!$util.isString(message.match)) + return "match: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.convert_enum_to_text != null && message.hasOwnProperty("convert_enum_to_text")) { + if (!$util.isObject(message.convert_enum_to_text)) + return "convert_enum_to_text: object expected"; + var key = Object.keys(message.convert_enum_to_text); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.convert_enum_to_text[key[i]])) + return "convert_enum_to_text: string{k:string} expected"; + } + if (message.convert_charset != null && message.hasOwnProperty("convert_charset")) { + if (!$util.isObject(message.convert_charset)) + return "convert_charset: object expected"; + var key = Object.keys(message.convert_charset); + for (var i = 0; i < key.length; ++i) { + var error = $root.binlogdata.CharsetConversion.verify(message.convert_charset[key[i]]); + if (error) + return "convert_charset." + error; + } + } + if (message.source_unique_key_columns != null && message.hasOwnProperty("source_unique_key_columns")) + if (!$util.isString(message.source_unique_key_columns)) + return "source_unique_key_columns: string expected"; + if (message.target_unique_key_columns != null && message.hasOwnProperty("target_unique_key_columns")) + if (!$util.isString(message.target_unique_key_columns)) + return "target_unique_key_columns: string expected"; + if (message.source_unique_key_target_columns != null && message.hasOwnProperty("source_unique_key_target_columns")) + if (!$util.isString(message.source_unique_key_target_columns)) + return "source_unique_key_target_columns: string expected"; + if (message.convert_int_to_enum != null && message.hasOwnProperty("convert_int_to_enum")) { + if (!$util.isObject(message.convert_int_to_enum)) + return "convert_int_to_enum: object expected"; + var key = Object.keys(message.convert_int_to_enum); + for (var i = 0; i < key.length; ++i) + if (typeof message.convert_int_to_enum[key[i]] !== "boolean") + return "convert_int_to_enum: boolean{k:string} expected"; } - if (message.values != null && message.hasOwnProperty("values")) - if (!(message.values && typeof message.values.length === "number" || $util.isString(message.values))) - return "values: buffer expected"; return null; }; /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a Rule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.Row + * @memberof binlogdata.Rule * @static * @param {Object.} object Plain object - * @returns {query.Row} Row + * @returns {binlogdata.Rule} Rule */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.query.Row) + Rule.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.Rule) return object; - var message = new $root.query.Row(); - if (object.lengths) { - if (!Array.isArray(object.lengths)) - throw TypeError(".query.Row.lengths: array expected"); - message.lengths = []; - for (var i = 0; i < object.lengths.length; ++i) - if ($util.Long) - (message.lengths[i] = $util.Long.fromValue(object.lengths[i])).unsigned = false; - else if (typeof object.lengths[i] === "string") - message.lengths[i] = parseInt(object.lengths[i], 10); - else if (typeof object.lengths[i] === "number") - message.lengths[i] = object.lengths[i]; - else if (typeof object.lengths[i] === "object") - message.lengths[i] = new $util.LongBits(object.lengths[i].low >>> 0, object.lengths[i].high >>> 0).toNumber(); + var message = new $root.binlogdata.Rule(); + if (object.match != null) + message.match = String(object.match); + if (object.filter != null) + message.filter = String(object.filter); + if (object.convert_enum_to_text) { + if (typeof object.convert_enum_to_text !== "object") + throw TypeError(".binlogdata.Rule.convert_enum_to_text: object expected"); + message.convert_enum_to_text = {}; + for (var keys = Object.keys(object.convert_enum_to_text), i = 0; i < keys.length; ++i) + message.convert_enum_to_text[keys[i]] = String(object.convert_enum_to_text[keys[i]]); + } + if (object.convert_charset) { + if (typeof object.convert_charset !== "object") + throw TypeError(".binlogdata.Rule.convert_charset: object expected"); + message.convert_charset = {}; + for (var keys = Object.keys(object.convert_charset), i = 0; i < keys.length; ++i) { + if (typeof object.convert_charset[keys[i]] !== "object") + throw TypeError(".binlogdata.Rule.convert_charset: object expected"); + message.convert_charset[keys[i]] = $root.binlogdata.CharsetConversion.fromObject(object.convert_charset[keys[i]]); + } + } + if (object.source_unique_key_columns != null) + message.source_unique_key_columns = String(object.source_unique_key_columns); + if (object.target_unique_key_columns != null) + message.target_unique_key_columns = String(object.target_unique_key_columns); + if (object.source_unique_key_target_columns != null) + message.source_unique_key_target_columns = String(object.source_unique_key_target_columns); + if (object.convert_int_to_enum) { + if (typeof object.convert_int_to_enum !== "object") + throw TypeError(".binlogdata.Rule.convert_int_to_enum: object expected"); + message.convert_int_to_enum = {}; + for (var keys = Object.keys(object.convert_int_to_enum), i = 0; i < keys.length; ++i) + message.convert_int_to_enum[keys[i]] = Boolean(object.convert_int_to_enum[keys[i]]); } - if (object.values != null) - if (typeof object.values === "string") - $util.base64.decode(object.values, message.values = $util.newBuffer($util.base64.length(object.values)), 0); - else if (object.values.length) - message.values = object.values; return message; }; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. + * Creates a plain object from a Rule message. Also converts values to other types if specified. * @function toObject - * @memberof query.Row + * @memberof binlogdata.Rule * @static - * @param {query.Row} message Row + * @param {binlogdata.Rule} message Rule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + Rule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.lengths = []; - if (options.defaults) - if (options.bytes === String) - object.values = ""; - else { - object.values = []; - if (options.bytes !== Array) - object.values = $util.newBuffer(object.values); - } - if (message.lengths && message.lengths.length) { - object.lengths = []; - for (var j = 0; j < message.lengths.length; ++j) - if (typeof message.lengths[j] === "number") - object.lengths[j] = options.longs === String ? String(message.lengths[j]) : message.lengths[j]; - else - object.lengths[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lengths[j]) : options.longs === Number ? new $util.LongBits(message.lengths[j].low >>> 0, message.lengths[j].high >>> 0).toNumber() : message.lengths[j]; + if (options.objects || options.defaults) { + object.convert_enum_to_text = {}; + object.convert_charset = {}; + object.convert_int_to_enum = {}; + } + if (options.defaults) { + object.match = ""; + object.filter = ""; + object.source_unique_key_columns = ""; + object.target_unique_key_columns = ""; + object.source_unique_key_target_columns = ""; + } + if (message.match != null && message.hasOwnProperty("match")) + object.match = message.match; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + var keys2; + if (message.convert_enum_to_text && (keys2 = Object.keys(message.convert_enum_to_text)).length) { + object.convert_enum_to_text = {}; + for (var j = 0; j < keys2.length; ++j) + object.convert_enum_to_text[keys2[j]] = message.convert_enum_to_text[keys2[j]]; + } + if (message.convert_charset && (keys2 = Object.keys(message.convert_charset)).length) { + object.convert_charset = {}; + for (var j = 0; j < keys2.length; ++j) + object.convert_charset[keys2[j]] = $root.binlogdata.CharsetConversion.toObject(message.convert_charset[keys2[j]], options); + } + if (message.source_unique_key_columns != null && message.hasOwnProperty("source_unique_key_columns")) + object.source_unique_key_columns = message.source_unique_key_columns; + if (message.target_unique_key_columns != null && message.hasOwnProperty("target_unique_key_columns")) + object.target_unique_key_columns = message.target_unique_key_columns; + if (message.source_unique_key_target_columns != null && message.hasOwnProperty("source_unique_key_target_columns")) + object.source_unique_key_target_columns = message.source_unique_key_target_columns; + if (message.convert_int_to_enum && (keys2 = Object.keys(message.convert_int_to_enum)).length) { + object.convert_int_to_enum = {}; + for (var j = 0; j < keys2.length; ++j) + object.convert_int_to_enum[keys2[j]] = message.convert_int_to_enum[keys2[j]]; } - if (message.values != null && message.hasOwnProperty("values")) - object.values = options.bytes === String ? $util.base64.encode(message.values, 0, message.values.length) : options.bytes === Array ? Array.prototype.slice.call(message.values) : message.values; return object; }; /** - * Converts this Row to JSON. + * Converts this Rule to JSON. * @function toJSON - * @memberof query.Row + * @memberof binlogdata.Rule * @instance * @returns {Object.} JSON object */ - Row.prototype.toJSON = function toJSON() { + Rule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Row; + return Rule; })(); - query.QueryResult = (function() { + binlogdata.Filter = (function() { /** - * Properties of a QueryResult. - * @memberof query - * @interface IQueryResult - * @property {Array.|null} [fields] QueryResult fields - * @property {number|Long|null} [rows_affected] QueryResult rows_affected - * @property {number|Long|null} [insert_id] QueryResult insert_id - * @property {Array.|null} [rows] QueryResult rows - * @property {string|null} [info] QueryResult info - * @property {string|null} [session_state_changes] QueryResult session_state_changes + * Properties of a Filter. + * @memberof binlogdata + * @interface IFilter + * @property {Array.|null} [rules] Filter rules + * @property {binlogdata.Filter.FieldEventMode|null} [field_event_mode] Filter field_event_mode + * @property {number|Long|null} [workflow_type] Filter workflow_type + * @property {string|null} [workflow_name] Filter workflow_name */ /** - * Constructs a new QueryResult. - * @memberof query - * @classdesc Represents a QueryResult. - * @implements IQueryResult + * Constructs a new Filter. + * @memberof binlogdata + * @classdesc Represents a Filter. + * @implements IFilter * @constructor - * @param {query.IQueryResult=} [properties] Properties to set + * @param {binlogdata.IFilter=} [properties] Properties to set */ - function QueryResult(properties) { - this.fields = []; - this.rows = []; + function Filter(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59309,146 +58144,117 @@ $root.query = (function() { } /** - * QueryResult fields. - * @member {Array.} fields - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.fields = $util.emptyArray; - - /** - * QueryResult rows_affected. - * @member {number|Long} rows_affected - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.rows_affected = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryResult insert_id. - * @member {number|Long} insert_id - * @memberof query.QueryResult + * Filter rules. + * @member {Array.} rules + * @memberof binlogdata.Filter * @instance */ - QueryResult.prototype.insert_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Filter.prototype.rules = $util.emptyArray; /** - * QueryResult rows. - * @member {Array.} rows - * @memberof query.QueryResult + * Filter field_event_mode. + * @member {binlogdata.Filter.FieldEventMode} field_event_mode + * @memberof binlogdata.Filter * @instance */ - QueryResult.prototype.rows = $util.emptyArray; + Filter.prototype.field_event_mode = 0; /** - * QueryResult info. - * @member {string} info - * @memberof query.QueryResult + * Filter workflow_type. + * @member {number|Long} workflow_type + * @memberof binlogdata.Filter * @instance */ - QueryResult.prototype.info = ""; + Filter.prototype.workflow_type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * QueryResult session_state_changes. - * @member {string} session_state_changes - * @memberof query.QueryResult + * Filter workflow_name. + * @member {string} workflow_name + * @memberof binlogdata.Filter * @instance */ - QueryResult.prototype.session_state_changes = ""; + Filter.prototype.workflow_name = ""; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new Filter instance using the specified properties. * @function create - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static - * @param {query.IQueryResult=} [properties] Properties to set - * @returns {query.QueryResult} QueryResult instance + * @param {binlogdata.IFilter=} [properties] Properties to set + * @returns {binlogdata.Filter} Filter instance */ - QueryResult.create = function create(properties) { - return new QueryResult(properties); + Filter.create = function create(properties) { + return new Filter(properties); }; /** - * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. + * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. * @function encode - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static - * @param {query.IQueryResult} message QueryResult message or plain object to encode + * @param {binlogdata.IFilter} message Filter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encode = function encode(message, writer) { + Filter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rows_affected != null && Object.hasOwnProperty.call(message, "rows_affected")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected); - if (message.insert_id != null && Object.hasOwnProperty.call(message, "insert_id")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.insert_id); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.info); - if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.session_state_changes); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.binlogdata.Rule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.field_event_mode != null && Object.hasOwnProperty.call(message, "field_event_mode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.field_event_mode); + if (message.workflow_type != null && Object.hasOwnProperty.call(message, "workflow_type")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.workflow_type); + if (message.workflow_name != null && Object.hasOwnProperty.call(message, "workflow_name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.workflow_name); return writer; }; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. + * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. * @function encodeDelimited - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static - * @param {query.IQueryResult} message QueryResult message or plain object to encode + * @param {binlogdata.IFilter} message Filter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { + Filter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a Filter message from the specified reader or buffer. * @function decode - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.QueryResult} QueryResult + * @returns {binlogdata.Filter} Filter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decode = function decode(reader, length) { + Filter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Filter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.binlogdata.Rule.decode(reader, reader.uint32())); break; case 2: - message.rows_affected = reader.uint64(); + message.field_event_mode = reader.int32(); break; case 3: - message.insert_id = reader.uint64(); + message.workflow_type = reader.int64(); break; case 4: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.query.Row.decode(reader, reader.uint32())); - break; - case 6: - message.info = reader.string(); - break; - case 7: - message.session_state_changes = reader.string(); + message.workflow_name = reader.string(); break; default: reader.skipType(tag & 7); @@ -59459,213 +58265,257 @@ $root.query = (function() { }; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a Filter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.QueryResult} QueryResult + * @returns {binlogdata.Filter} Filter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decodeDelimited = function decodeDelimited(reader) { + Filter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryResult message. + * Verifies a Filter message. * @function verify - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryResult.verify = function verify(message) { + Filter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.binlogdata.Rule.verify(message.rules[i]); if (error) - return "fields." + error; + return "rules." + error; } } - if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) - if (!$util.isInteger(message.rows_affected) && !(message.rows_affected && $util.isInteger(message.rows_affected.low) && $util.isInteger(message.rows_affected.high))) - return "rows_affected: integer|Long expected"; - if (message.insert_id != null && message.hasOwnProperty("insert_id")) - if (!$util.isInteger(message.insert_id) && !(message.insert_id && $util.isInteger(message.insert_id.low) && $util.isInteger(message.insert_id.high))) - return "insert_id: integer|Long expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.query.Row.verify(message.rows[i]); - if (error) - return "rows." + error; + if (message.field_event_mode != null && message.hasOwnProperty("field_event_mode")) + switch (message.field_event_mode) { + default: + return "field_event_mode: enum value expected"; + case 0: + case 1: + break; } - } - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - if (!$util.isString(message.session_state_changes)) - return "session_state_changes: string expected"; + if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) + if (!$util.isInteger(message.workflow_type) && !(message.workflow_type && $util.isInteger(message.workflow_type.low) && $util.isInteger(message.workflow_type.high))) + return "workflow_type: integer|Long expected"; + if (message.workflow_name != null && message.hasOwnProperty("workflow_name")) + if (!$util.isString(message.workflow_name)) + return "workflow_name: string expected"; return null; }; /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. + * Creates a Filter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static * @param {Object.} object Plain object - * @returns {query.QueryResult} QueryResult + * @returns {binlogdata.Filter} Filter */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.query.QueryResult) + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.Filter) return object; - var message = new $root.query.QueryResult(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".query.QueryResult.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".query.QueryResult.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + var message = new $root.binlogdata.Filter(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".binlogdata.Filter.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".binlogdata.Filter.rules: object expected"); + message.rules[i] = $root.binlogdata.Rule.fromObject(object.rules[i]); } } - if (object.rows_affected != null) - if ($util.Long) - (message.rows_affected = $util.Long.fromValue(object.rows_affected)).unsigned = true; - else if (typeof object.rows_affected === "string") - message.rows_affected = parseInt(object.rows_affected, 10); - else if (typeof object.rows_affected === "number") - message.rows_affected = object.rows_affected; - else if (typeof object.rows_affected === "object") - message.rows_affected = new $util.LongBits(object.rows_affected.low >>> 0, object.rows_affected.high >>> 0).toNumber(true); - if (object.insert_id != null) - if ($util.Long) - (message.insert_id = $util.Long.fromValue(object.insert_id)).unsigned = true; - else if (typeof object.insert_id === "string") - message.insert_id = parseInt(object.insert_id, 10); - else if (typeof object.insert_id === "number") - message.insert_id = object.insert_id; - else if (typeof object.insert_id === "object") - message.insert_id = new $util.LongBits(object.insert_id.low >>> 0, object.insert_id.high >>> 0).toNumber(true); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".query.QueryResult.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".query.QueryResult.rows: object expected"); - message.rows[i] = $root.query.Row.fromObject(object.rows[i]); - } + switch (object.field_event_mode) { + case "ERR_ON_MISMATCH": + case 0: + message.field_event_mode = 0; + break; + case "BEST_EFFORT": + case 1: + message.field_event_mode = 1; + break; } - if (object.info != null) - message.info = String(object.info); - if (object.session_state_changes != null) - message.session_state_changes = String(object.session_state_changes); + if (object.workflow_type != null) + if ($util.Long) + (message.workflow_type = $util.Long.fromValue(object.workflow_type)).unsigned = false; + else if (typeof object.workflow_type === "string") + message.workflow_type = parseInt(object.workflow_type, 10); + else if (typeof object.workflow_type === "number") + message.workflow_type = object.workflow_type; + else if (typeof object.workflow_type === "object") + message.workflow_type = new $util.LongBits(object.workflow_type.low >>> 0, object.workflow_type.high >>> 0).toNumber(); + if (object.workflow_name != null) + message.workflow_name = String(object.workflow_name); return message; }; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * Creates a plain object from a Filter message. Also converts values to other types if specified. * @function toObject - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @static - * @param {query.QueryResult} message QueryResult + * @param {binlogdata.Filter} message Filter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryResult.toObject = function toObject(message, options) { + Filter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.rows = []; - } + if (options.arrays || options.defaults) + object.rules = []; if (options.defaults) { + object.field_event_mode = options.enums === String ? "ERR_ON_MISMATCH" : 0; if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.rows_affected = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rows_affected = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.insert_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, false); + object.workflow_type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.insert_id = options.longs === String ? "0" : 0; - object.info = ""; - object.session_state_changes = ""; + object.workflow_type = options.longs === String ? "0" : 0; + object.workflow_name = ""; } - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.binlogdata.Rule.toObject(message.rules[j], options); } - if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) - if (typeof message.rows_affected === "number") - object.rows_affected = options.longs === String ? String(message.rows_affected) : message.rows_affected; - else - object.rows_affected = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected) : options.longs === Number ? new $util.LongBits(message.rows_affected.low >>> 0, message.rows_affected.high >>> 0).toNumber(true) : message.rows_affected; - if (message.insert_id != null && message.hasOwnProperty("insert_id")) - if (typeof message.insert_id === "number") - object.insert_id = options.longs === String ? String(message.insert_id) : message.insert_id; + if (message.field_event_mode != null && message.hasOwnProperty("field_event_mode")) + object.field_event_mode = options.enums === String ? $root.binlogdata.Filter.FieldEventMode[message.field_event_mode] : message.field_event_mode; + if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) + if (typeof message.workflow_type === "number") + object.workflow_type = options.longs === String ? String(message.workflow_type) : message.workflow_type; else - object.insert_id = options.longs === String ? $util.Long.prototype.toString.call(message.insert_id) : options.longs === Number ? new $util.LongBits(message.insert_id.low >>> 0, message.insert_id.high >>> 0).toNumber(true) : message.insert_id; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.query.Row.toObject(message.rows[j], options); - } - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - object.session_state_changes = message.session_state_changes; + object.workflow_type = options.longs === String ? $util.Long.prototype.toString.call(message.workflow_type) : options.longs === Number ? new $util.LongBits(message.workflow_type.low >>> 0, message.workflow_type.high >>> 0).toNumber() : message.workflow_type; + if (message.workflow_name != null && message.hasOwnProperty("workflow_name")) + object.workflow_name = message.workflow_name; return object; }; /** - * Converts this QueryResult to JSON. + * Converts this Filter to JSON. * @function toJSON - * @memberof query.QueryResult + * @memberof binlogdata.Filter * @instance * @returns {Object.} JSON object */ - QueryResult.prototype.toJSON = function toJSON() { + Filter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryResult; + /** + * FieldEventMode enum. + * @name binlogdata.Filter.FieldEventMode + * @enum {number} + * @property {number} ERR_ON_MISMATCH=0 ERR_ON_MISMATCH value + * @property {number} BEST_EFFORT=1 BEST_EFFORT value + */ + Filter.FieldEventMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERR_ON_MISMATCH"] = 0; + values[valuesById[1] = "BEST_EFFORT"] = 1; + return values; + })(); + + return Filter; })(); - query.QueryWarning = (function() { + /** + * OnDDLAction enum. + * @name binlogdata.OnDDLAction + * @enum {number} + * @property {number} IGNORE=0 IGNORE value + * @property {number} STOP=1 STOP value + * @property {number} EXEC=2 EXEC value + * @property {number} EXEC_IGNORE=3 EXEC_IGNORE value + */ + binlogdata.OnDDLAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IGNORE"] = 0; + values[valuesById[1] = "STOP"] = 1; + values[valuesById[2] = "EXEC"] = 2; + values[valuesById[3] = "EXEC_IGNORE"] = 3; + return values; + })(); + + /** + * VReplicationWorkflowType enum. + * @name binlogdata.VReplicationWorkflowType + * @enum {number} + * @property {number} Materialize=0 Materialize value + * @property {number} MoveTables=1 MoveTables value + * @property {number} CreateLookupIndex=2 CreateLookupIndex value + * @property {number} Migrate=3 Migrate value + * @property {number} Reshard=4 Reshard value + * @property {number} OnlineDDL=5 OnlineDDL value + */ + binlogdata.VReplicationWorkflowType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "Materialize"] = 0; + values[valuesById[1] = "MoveTables"] = 1; + values[valuesById[2] = "CreateLookupIndex"] = 2; + values[valuesById[3] = "Migrate"] = 3; + values[valuesById[4] = "Reshard"] = 4; + values[valuesById[5] = "OnlineDDL"] = 5; + return values; + })(); + + /** + * VReplicationWorkflowSubType enum. + * @name binlogdata.VReplicationWorkflowSubType + * @enum {number} + * @property {number} None=0 None value + * @property {number} Partial=1 Partial value + */ + binlogdata.VReplicationWorkflowSubType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "None"] = 0; + values[valuesById[1] = "Partial"] = 1; + return values; + })(); + + binlogdata.BinlogSource = (function() { /** - * Properties of a QueryWarning. - * @memberof query - * @interface IQueryWarning - * @property {number|null} [code] QueryWarning code - * @property {string|null} [message] QueryWarning message + * Properties of a BinlogSource. + * @memberof binlogdata + * @interface IBinlogSource + * @property {string|null} [keyspace] BinlogSource keyspace + * @property {string|null} [shard] BinlogSource shard + * @property {topodata.TabletType|null} [tablet_type] BinlogSource tablet_type + * @property {topodata.IKeyRange|null} [key_range] BinlogSource key_range + * @property {Array.|null} [tables] BinlogSource tables + * @property {binlogdata.IFilter|null} [filter] BinlogSource filter + * @property {binlogdata.OnDDLAction|null} [on_ddl] BinlogSource on_ddl + * @property {string|null} [external_mysql] BinlogSource external_mysql + * @property {boolean|null} [stop_after_copy] BinlogSource stop_after_copy + * @property {string|null} [external_cluster] BinlogSource external_cluster + * @property {string|null} [source_time_zone] BinlogSource source_time_zone + * @property {string|null} [target_time_zone] BinlogSource target_time_zone */ /** - * Constructs a new QueryWarning. - * @memberof query - * @classdesc Represents a QueryWarning. - * @implements IQueryWarning + * Constructs a new BinlogSource. + * @memberof binlogdata + * @classdesc Represents a BinlogSource. + * @implements IBinlogSource * @constructor - * @param {query.IQueryWarning=} [properties] Properties to set + * @param {binlogdata.IBinlogSource=} [properties] Properties to set */ - function QueryWarning(properties) { + function BinlogSource(properties) { + this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59673,88 +58523,221 @@ $root.query = (function() { } /** - * QueryWarning code. - * @member {number} code - * @memberof query.QueryWarning + * BinlogSource keyspace. + * @member {string} keyspace + * @memberof binlogdata.BinlogSource * @instance */ - QueryWarning.prototype.code = 0; + BinlogSource.prototype.keyspace = ""; /** - * QueryWarning message. - * @member {string} message - * @memberof query.QueryWarning + * BinlogSource shard. + * @member {string} shard + * @memberof binlogdata.BinlogSource * @instance */ - QueryWarning.prototype.message = ""; + BinlogSource.prototype.shard = ""; /** - * Creates a new QueryWarning instance using the specified properties. + * BinlogSource tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.tablet_type = 0; + + /** + * BinlogSource key_range. + * @member {topodata.IKeyRange|null|undefined} key_range + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.key_range = null; + + /** + * BinlogSource tables. + * @member {Array.} tables + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.tables = $util.emptyArray; + + /** + * BinlogSource filter. + * @member {binlogdata.IFilter|null|undefined} filter + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.filter = null; + + /** + * BinlogSource on_ddl. + * @member {binlogdata.OnDDLAction} on_ddl + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.on_ddl = 0; + + /** + * BinlogSource external_mysql. + * @member {string} external_mysql + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.external_mysql = ""; + + /** + * BinlogSource stop_after_copy. + * @member {boolean} stop_after_copy + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.stop_after_copy = false; + + /** + * BinlogSource external_cluster. + * @member {string} external_cluster + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.external_cluster = ""; + + /** + * BinlogSource source_time_zone. + * @member {string} source_time_zone + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.source_time_zone = ""; + + /** + * BinlogSource target_time_zone. + * @member {string} target_time_zone + * @memberof binlogdata.BinlogSource + * @instance + */ + BinlogSource.prototype.target_time_zone = ""; + + /** + * Creates a new BinlogSource instance using the specified properties. * @function create - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static - * @param {query.IQueryWarning=} [properties] Properties to set - * @returns {query.QueryWarning} QueryWarning instance + * @param {binlogdata.IBinlogSource=} [properties] Properties to set + * @returns {binlogdata.BinlogSource} BinlogSource instance */ - QueryWarning.create = function create(properties) { - return new QueryWarning(properties); + BinlogSource.create = function create(properties) { + return new BinlogSource(properties); }; /** - * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. + * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. * @function encode - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static - * @param {query.IQueryWarning} message QueryWarning message or plain object to encode + * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryWarning.encode = function encode(message, writer) { + BinlogSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tables[i]); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.on_ddl); + if (message.external_mysql != null && Object.hasOwnProperty.call(message, "external_mysql")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_mysql); + if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.stop_after_copy); + if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.external_cluster); + if (message.source_time_zone != null && Object.hasOwnProperty.call(message, "source_time_zone")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.source_time_zone); + if (message.target_time_zone != null && Object.hasOwnProperty.call(message, "target_time_zone")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_time_zone); return writer; }; /** - * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. + * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. * @function encodeDelimited - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static - * @param {query.IQueryWarning} message QueryWarning message or plain object to encode + * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryWarning.encodeDelimited = function encodeDelimited(message, writer) { + BinlogSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryWarning message from the specified reader or buffer. + * Decodes a BinlogSource message from the specified reader or buffer. * @function decode - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.QueryWarning} QueryWarning + * @returns {binlogdata.BinlogSource} BinlogSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryWarning.decode = function decode(reader, length) { + BinlogSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryWarning(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.code = reader.uint32(); + message.keyspace = reader.string(); break; case 2: - message.message = reader.string(); + message.shard = reader.string(); + break; + case 3: + message.tablet_type = reader.int32(); + break; + case 4: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + case 6: + message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); + break; + case 7: + message.on_ddl = reader.int32(); + break; + case 8: + message.external_mysql = reader.string(); + break; + case 9: + message.stop_after_copy = reader.bool(); + break; + case 10: + message.external_cluster = reader.string(); + break; + case 11: + message.source_time_zone = reader.string(); + break; + case 12: + message.target_time_zone = reader.string(); break; default: reader.skipType(tag & 7); @@ -59765,118 +58748,353 @@ $root.query = (function() { }; /** - * Decodes a QueryWarning message from the specified reader or buffer, length delimited. + * Decodes a BinlogSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.QueryWarning} QueryWarning + * @returns {binlogdata.BinlogSource} BinlogSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryWarning.decodeDelimited = function decodeDelimited(reader) { + BinlogSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryWarning message. + * Verifies a BinlogSource message. * @function verify - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryWarning.verify = function verify(message) { + BinlogSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.QueryWarning - * @static - * @param {Object.} object Plain object - * @returns {query.QueryWarning} QueryWarning - */ - QueryWarning.fromObject = function fromObject(object) { - if (object instanceof $root.query.QueryWarning) - return object; - var message = new $root.query.QueryWarning(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. - * @function toObject - * @memberof query.QueryWarning - * @static - * @param {query.QueryWarning} message QueryWarning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryWarning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.key_range != null && message.hasOwnProperty("key_range")) { + var error = $root.topodata.KeyRange.verify(message.key_range); + if (error) + return "key_range." + error; + } + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.binlogdata.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + switch (message.on_ddl) { + default: + return "on_ddl: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) + if (!$util.isString(message.external_mysql)) + return "external_mysql: string expected"; + if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) + if (typeof message.stop_after_copy !== "boolean") + return "stop_after_copy: boolean expected"; + if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) + if (!$util.isString(message.external_cluster)) + return "external_cluster: string expected"; + if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) + if (!$util.isString(message.source_time_zone)) + return "source_time_zone: string expected"; + if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) + if (!$util.isString(message.target_time_zone)) + return "target_time_zone: string expected"; + return null; + }; + + /** + * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof binlogdata.BinlogSource + * @static + * @param {Object.} object Plain object + * @returns {binlogdata.BinlogSource} BinlogSource + */ + BinlogSource.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.BinlogSource) + return object; + var message = new $root.binlogdata.BinlogSource(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + switch (object.tablet_type) { + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; + } + if (object.key_range != null) { + if (typeof object.key_range !== "object") + throw TypeError(".binlogdata.BinlogSource.key_range: object expected"); + message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); + } + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".binlogdata.BinlogSource.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".binlogdata.BinlogSource.filter: object expected"); + message.filter = $root.binlogdata.Filter.fromObject(object.filter); + } + switch (object.on_ddl) { + case "IGNORE": + case 0: + message.on_ddl = 0; + break; + case "STOP": + case 1: + message.on_ddl = 1; + break; + case "EXEC": + case 2: + message.on_ddl = 2; + break; + case "EXEC_IGNORE": + case 3: + message.on_ddl = 3; + break; + } + if (object.external_mysql != null) + message.external_mysql = String(object.external_mysql); + if (object.stop_after_copy != null) + message.stop_after_copy = Boolean(object.stop_after_copy); + if (object.external_cluster != null) + message.external_cluster = String(object.external_cluster); + if (object.source_time_zone != null) + message.source_time_zone = String(object.source_time_zone); + if (object.target_time_zone != null) + message.target_time_zone = String(object.target_time_zone); + return message; + }; + + /** + * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. + * @function toObject + * @memberof binlogdata.BinlogSource + * @static + * @param {binlogdata.BinlogSource} message BinlogSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinlogSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tables = []; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.key_range = null; + object.filter = null; + object.on_ddl = options.enums === String ? "IGNORE" : 0; + object.external_mysql = ""; + object.stop_after_copy = false; + object.external_cluster = ""; + object.source_time_zone = ""; + object.target_time_zone = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.key_range != null && message.hasOwnProperty("key_range")) + object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.binlogdata.Filter.toObject(message.filter, options); + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + object.on_ddl = options.enums === String ? $root.binlogdata.OnDDLAction[message.on_ddl] : message.on_ddl; + if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) + object.external_mysql = message.external_mysql; + if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) + object.stop_after_copy = message.stop_after_copy; + if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) + object.external_cluster = message.external_cluster; + if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) + object.source_time_zone = message.source_time_zone; + if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) + object.target_time_zone = message.target_time_zone; return object; }; /** - * Converts this QueryWarning to JSON. + * Converts this BinlogSource to JSON. * @function toJSON - * @memberof query.QueryWarning + * @memberof binlogdata.BinlogSource * @instance * @returns {Object.} JSON object */ - QueryWarning.prototype.toJSON = function toJSON() { + BinlogSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryWarning; + return BinlogSource; })(); - query.StreamEvent = (function() { + /** + * VEventType enum. + * @name binlogdata.VEventType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} GTID=1 GTID value + * @property {number} BEGIN=2 BEGIN value + * @property {number} COMMIT=3 COMMIT value + * @property {number} ROLLBACK=4 ROLLBACK value + * @property {number} DDL=5 DDL value + * @property {number} INSERT=6 INSERT value + * @property {number} REPLACE=7 REPLACE value + * @property {number} UPDATE=8 UPDATE value + * @property {number} DELETE=9 DELETE value + * @property {number} SET=10 SET value + * @property {number} OTHER=11 OTHER value + * @property {number} ROW=12 ROW value + * @property {number} FIELD=13 FIELD value + * @property {number} HEARTBEAT=14 HEARTBEAT value + * @property {number} VGTID=15 VGTID value + * @property {number} JOURNAL=16 JOURNAL value + * @property {number} VERSION=17 VERSION value + * @property {number} LASTPK=18 LASTPK value + * @property {number} SAVEPOINT=19 SAVEPOINT value + * @property {number} COPY_COMPLETED=20 COPY_COMPLETED value + */ + binlogdata.VEventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "GTID"] = 1; + values[valuesById[2] = "BEGIN"] = 2; + values[valuesById[3] = "COMMIT"] = 3; + values[valuesById[4] = "ROLLBACK"] = 4; + values[valuesById[5] = "DDL"] = 5; + values[valuesById[6] = "INSERT"] = 6; + values[valuesById[7] = "REPLACE"] = 7; + values[valuesById[8] = "UPDATE"] = 8; + values[valuesById[9] = "DELETE"] = 9; + values[valuesById[10] = "SET"] = 10; + values[valuesById[11] = "OTHER"] = 11; + values[valuesById[12] = "ROW"] = 12; + values[valuesById[13] = "FIELD"] = 13; + values[valuesById[14] = "HEARTBEAT"] = 14; + values[valuesById[15] = "VGTID"] = 15; + values[valuesById[16] = "JOURNAL"] = 16; + values[valuesById[17] = "VERSION"] = 17; + values[valuesById[18] = "LASTPK"] = 18; + values[valuesById[19] = "SAVEPOINT"] = 19; + values[valuesById[20] = "COPY_COMPLETED"] = 20; + return values; + })(); + + binlogdata.RowChange = (function() { /** - * Properties of a StreamEvent. - * @memberof query - * @interface IStreamEvent - * @property {Array.|null} [statements] StreamEvent statements - * @property {query.IEventToken|null} [event_token] StreamEvent event_token + * Properties of a RowChange. + * @memberof binlogdata + * @interface IRowChange + * @property {query.IRow|null} [before] RowChange before + * @property {query.IRow|null} [after] RowChange after */ /** - * Constructs a new StreamEvent. - * @memberof query - * @classdesc Represents a StreamEvent. - * @implements IStreamEvent + * Constructs a new RowChange. + * @memberof binlogdata + * @classdesc Represents a RowChange. + * @implements IRowChange * @constructor - * @param {query.IStreamEvent=} [properties] Properties to set + * @param {binlogdata.IRowChange=} [properties] Properties to set */ - function StreamEvent(properties) { - this.statements = []; + function RowChange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59884,91 +59102,88 @@ $root.query = (function() { } /** - * StreamEvent statements. - * @member {Array.} statements - * @memberof query.StreamEvent + * RowChange before. + * @member {query.IRow|null|undefined} before + * @memberof binlogdata.RowChange * @instance */ - StreamEvent.prototype.statements = $util.emptyArray; + RowChange.prototype.before = null; /** - * StreamEvent event_token. - * @member {query.IEventToken|null|undefined} event_token - * @memberof query.StreamEvent + * RowChange after. + * @member {query.IRow|null|undefined} after + * @memberof binlogdata.RowChange * @instance */ - StreamEvent.prototype.event_token = null; + RowChange.prototype.after = null; /** - * Creates a new StreamEvent instance using the specified properties. + * Creates a new RowChange instance using the specified properties. * @function create - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static - * @param {query.IStreamEvent=} [properties] Properties to set - * @returns {query.StreamEvent} StreamEvent instance + * @param {binlogdata.IRowChange=} [properties] Properties to set + * @returns {binlogdata.RowChange} RowChange instance */ - StreamEvent.create = function create(properties) { - return new StreamEvent(properties); + RowChange.create = function create(properties) { + return new RowChange(properties); }; /** - * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. + * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. * @function encode - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static - * @param {query.IStreamEvent} message StreamEvent message or plain object to encode + * @param {binlogdata.IRowChange} message RowChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamEvent.encode = function encode(message, writer) { + RowChange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.statements != null && message.statements.length) - for (var i = 0; i < message.statements.length; ++i) - $root.query.StreamEvent.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) - $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.query.Row.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.query.Row.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. + * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. * @function encodeDelimited - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static - * @param {query.IStreamEvent} message StreamEvent message or plain object to encode + * @param {binlogdata.IRowChange} message RowChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamEvent.encodeDelimited = function encodeDelimited(message, writer) { + RowChange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamEvent message from the specified reader or buffer. + * Decodes a RowChange message from the specified reader or buffer. * @function decode - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StreamEvent} StreamEvent + * @returns {binlogdata.RowChange} RowChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamEvent.decode = function decode(reader, length) { + RowChange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowChange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.statements && message.statements.length)) - message.statements = []; - message.statements.push($root.query.StreamEvent.Statement.decode(reader, reader.uint32())); + message.before = $root.query.Row.decode(reader, reader.uint32()); break; case 2: - message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); + message.after = $root.query.Row.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -59979,507 +59194,130 @@ $root.query = (function() { }; /** - * Decodes a StreamEvent message from the specified reader or buffer, length delimited. + * Decodes a RowChange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamEvent} StreamEvent + * @returns {binlogdata.RowChange} RowChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamEvent.decodeDelimited = function decodeDelimited(reader) { + RowChange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamEvent message. + * Verifies a RowChange message. * @function verify - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamEvent.verify = function verify(message) { + RowChange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.statements != null && message.hasOwnProperty("statements")) { - if (!Array.isArray(message.statements)) - return "statements: array expected"; - for (var i = 0; i < message.statements.length; ++i) { - var error = $root.query.StreamEvent.Statement.verify(message.statements[i]); - if (error) - return "statements." + error; - } + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.query.Row.verify(message.before); + if (error) + return "before." + error; } - if (message.event_token != null && message.hasOwnProperty("event_token")) { - var error = $root.query.EventToken.verify(message.event_token); + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.query.Row.verify(message.after); if (error) - return "event_token." + error; + return "after." + error; } return null; }; /** - * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. + * Creates a RowChange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static * @param {Object.} object Plain object - * @returns {query.StreamEvent} StreamEvent + * @returns {binlogdata.RowChange} RowChange */ - StreamEvent.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamEvent) + RowChange.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.RowChange) return object; - var message = new $root.query.StreamEvent(); - if (object.statements) { - if (!Array.isArray(object.statements)) - throw TypeError(".query.StreamEvent.statements: array expected"); - message.statements = []; - for (var i = 0; i < object.statements.length; ++i) { - if (typeof object.statements[i] !== "object") - throw TypeError(".query.StreamEvent.statements: object expected"); - message.statements[i] = $root.query.StreamEvent.Statement.fromObject(object.statements[i]); - } + var message = new $root.binlogdata.RowChange(); + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".binlogdata.RowChange.before: object expected"); + message.before = $root.query.Row.fromObject(object.before); } - if (object.event_token != null) { - if (typeof object.event_token !== "object") - throw TypeError(".query.StreamEvent.event_token: object expected"); - message.event_token = $root.query.EventToken.fromObject(object.event_token); + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".binlogdata.RowChange.after: object expected"); + message.after = $root.query.Row.fromObject(object.after); } return message; }; /** - * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. + * Creates a plain object from a RowChange message. Also converts values to other types if specified. * @function toObject - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @static - * @param {query.StreamEvent} message StreamEvent + * @param {binlogdata.RowChange} message RowChange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamEvent.toObject = function toObject(message, options) { + RowChange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.statements = []; - if (options.defaults) - object.event_token = null; - if (message.statements && message.statements.length) { - object.statements = []; - for (var j = 0; j < message.statements.length; ++j) - object.statements[j] = $root.query.StreamEvent.Statement.toObject(message.statements[j], options); + if (options.defaults) { + object.before = null; + object.after = null; } - if (message.event_token != null && message.hasOwnProperty("event_token")) - object.event_token = $root.query.EventToken.toObject(message.event_token, options); + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.query.Row.toObject(message.before, options); + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.query.Row.toObject(message.after, options); return object; }; /** - * Converts this StreamEvent to JSON. + * Converts this RowChange to JSON. * @function toJSON - * @memberof query.StreamEvent + * @memberof binlogdata.RowChange * @instance * @returns {Object.} JSON object */ - StreamEvent.prototype.toJSON = function toJSON() { + RowChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - StreamEvent.Statement = (function() { + return RowChange; + })(); - /** - * Properties of a Statement. - * @memberof query.StreamEvent - * @interface IStatement - * @property {query.StreamEvent.Statement.Category|null} [category] Statement category - * @property {string|null} [table_name] Statement table_name - * @property {Array.|null} [primary_key_fields] Statement primary_key_fields - * @property {Array.|null} [primary_key_values] Statement primary_key_values - * @property {Uint8Array|null} [sql] Statement sql - */ - - /** - * Constructs a new Statement. - * @memberof query.StreamEvent - * @classdesc Represents a Statement. - * @implements IStatement - * @constructor - * @param {query.StreamEvent.IStatement=} [properties] Properties to set - */ - function Statement(properties) { - this.primary_key_fields = []; - this.primary_key_values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Statement category. - * @member {query.StreamEvent.Statement.Category} category - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.category = 0; - - /** - * Statement table_name. - * @member {string} table_name - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.table_name = ""; - - /** - * Statement primary_key_fields. - * @member {Array.} primary_key_fields - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.primary_key_fields = $util.emptyArray; - - /** - * Statement primary_key_values. - * @member {Array.} primary_key_values - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.primary_key_values = $util.emptyArray; - - /** - * Statement sql. - * @member {Uint8Array} sql - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.sql = $util.newBuffer([]); - - /** - * Creates a new Statement instance using the specified properties. - * @function create - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement=} [properties] Properties to set - * @returns {query.StreamEvent.Statement} Statement instance - */ - Statement.create = function create(properties) { - return new Statement(properties); - }; - - /** - * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @function encode - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table_name); - if (message.primary_key_fields != null && message.primary_key_fields.length) - for (var i = 0; i < message.primary_key_fields.length; ++i) - $root.query.Field.encode(message.primary_key_fields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.primary_key_values != null && message.primary_key_values.length) - for (var i = 0; i < message.primary_key_values.length; ++i) - $root.query.Row.encode(message.primary_key_values[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sql); - return writer; - }; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @function decode - * @memberof query.StreamEvent.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamEvent.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent.Statement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32(); - break; - case 2: - message.table_name = reader.string(); - break; - case 3: - if (!(message.primary_key_fields && message.primary_key_fields.length)) - message.primary_key_fields = []; - message.primary_key_fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.primary_key_values && message.primary_key_values.length)) - message.primary_key_values = []; - message.primary_key_values.push($root.query.Row.decode(reader, reader.uint32())); - break; - case 5: - message.sql = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamEvent.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamEvent.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Statement message. - * @function verify - * @memberof query.StreamEvent.Statement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Statement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.primary_key_fields != null && message.hasOwnProperty("primary_key_fields")) { - if (!Array.isArray(message.primary_key_fields)) - return "primary_key_fields: array expected"; - for (var i = 0; i < message.primary_key_fields.length; ++i) { - var error = $root.query.Field.verify(message.primary_key_fields[i]); - if (error) - return "primary_key_fields." + error; - } - } - if (message.primary_key_values != null && message.hasOwnProperty("primary_key_values")) { - if (!Array.isArray(message.primary_key_values)) - return "primary_key_values: array expected"; - for (var i = 0; i < message.primary_key_values.length; ++i) { - var error = $root.query.Row.verify(message.primary_key_values[i]); - if (error) - return "primary_key_values." + error; - } - } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) - return "sql: buffer expected"; - return null; - }; - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamEvent.Statement - * @static - * @param {Object.} object Plain object - * @returns {query.StreamEvent.Statement} Statement - */ - Statement.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamEvent.Statement) - return object; - var message = new $root.query.StreamEvent.Statement(); - switch (object.category) { - case "Error": - case 0: - message.category = 0; - break; - case "DML": - case 1: - message.category = 1; - break; - case "DDL": - case 2: - message.category = 2; - break; - } - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.primary_key_fields) { - if (!Array.isArray(object.primary_key_fields)) - throw TypeError(".query.StreamEvent.Statement.primary_key_fields: array expected"); - message.primary_key_fields = []; - for (var i = 0; i < object.primary_key_fields.length; ++i) { - if (typeof object.primary_key_fields[i] !== "object") - throw TypeError(".query.StreamEvent.Statement.primary_key_fields: object expected"); - message.primary_key_fields[i] = $root.query.Field.fromObject(object.primary_key_fields[i]); - } - } - if (object.primary_key_values) { - if (!Array.isArray(object.primary_key_values)) - throw TypeError(".query.StreamEvent.Statement.primary_key_values: array expected"); - message.primary_key_values = []; - for (var i = 0; i < object.primary_key_values.length; ++i) { - if (typeof object.primary_key_values[i] !== "object") - throw TypeError(".query.StreamEvent.Statement.primary_key_values: object expected"); - message.primary_key_values[i] = $root.query.Row.fromObject(object.primary_key_values[i]); - } - } - if (object.sql != null) - if (typeof object.sql === "string") - $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); - else if (object.sql.length) - message.sql = object.sql; - return message; - }; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.Statement} message Statement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Statement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.primary_key_fields = []; - object.primary_key_values = []; - } - if (options.defaults) { - object.category = options.enums === String ? "Error" : 0; - object.table_name = ""; - if (options.bytes === String) - object.sql = ""; - else { - object.sql = []; - if (options.bytes !== Array) - object.sql = $util.newBuffer(object.sql); - } - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.query.StreamEvent.Statement.Category[message.category] : message.category; - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.primary_key_fields && message.primary_key_fields.length) { - object.primary_key_fields = []; - for (var j = 0; j < message.primary_key_fields.length; ++j) - object.primary_key_fields[j] = $root.query.Field.toObject(message.primary_key_fields[j], options); - } - if (message.primary_key_values && message.primary_key_values.length) { - object.primary_key_values = []; - for (var j = 0; j < message.primary_key_values.length; ++j) - object.primary_key_values[j] = $root.query.Row.toObject(message.primary_key_values[j], options); - } - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; - return object; - }; - - /** - * Converts this Statement to JSON. - * @function toJSON - * @memberof query.StreamEvent.Statement - * @instance - * @returns {Object.} JSON object - */ - Statement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Category enum. - * @name query.StreamEvent.Statement.Category - * @enum {number} - * @property {number} Error=0 Error value - * @property {number} DML=1 DML value - * @property {number} DDL=2 DDL value - */ - Statement.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "Error"] = 0; - values[valuesById[1] = "DML"] = 1; - values[valuesById[2] = "DDL"] = 2; - return values; - })(); - - return Statement; - })(); - - return StreamEvent; - })(); - - query.ExecuteRequest = (function() { + binlogdata.RowEvent = (function() { /** - * Properties of an ExecuteRequest. - * @memberof query - * @interface IExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ExecuteRequest target - * @property {query.IBoundQuery|null} [query] ExecuteRequest query - * @property {number|Long|null} [transaction_id] ExecuteRequest transaction_id - * @property {query.IExecuteOptions|null} [options] ExecuteRequest options - * @property {number|Long|null} [reserved_id] ExecuteRequest reserved_id + * Properties of a RowEvent. + * @memberof binlogdata + * @interface IRowEvent + * @property {string|null} [table_name] RowEvent table_name + * @property {Array.|null} [row_changes] RowEvent row_changes + * @property {string|null} [keyspace] RowEvent keyspace + * @property {string|null} [shard] RowEvent shard */ /** - * Constructs a new ExecuteRequest. - * @memberof query - * @classdesc Represents an ExecuteRequest. - * @implements IExecuteRequest + * Constructs a new RowEvent. + * @memberof binlogdata + * @classdesc Represents a RowEvent. + * @implements IRowEvent * @constructor - * @param {query.IExecuteRequest=} [properties] Properties to set + * @param {binlogdata.IRowEvent=} [properties] Properties to set */ - function ExecuteRequest(properties) { + function RowEvent(properties) { + this.row_changes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60487,153 +59325,117 @@ $root.query = (function() { } /** - * ExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.effective_caller_id = null; - - /** - * ExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.target = null; - - /** - * ExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ExecuteRequest + * RowEvent table_name. + * @member {string} table_name + * @memberof binlogdata.RowEvent * @instance */ - ExecuteRequest.prototype.query = null; + RowEvent.prototype.table_name = ""; /** - * ExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ExecuteRequest + * RowEvent row_changes. + * @member {Array.} row_changes + * @memberof binlogdata.RowEvent * @instance */ - ExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RowEvent.prototype.row_changes = $util.emptyArray; /** - * ExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ExecuteRequest + * RowEvent keyspace. + * @member {string} keyspace + * @memberof binlogdata.RowEvent * @instance */ - ExecuteRequest.prototype.options = null; + RowEvent.prototype.keyspace = ""; /** - * ExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ExecuteRequest + * RowEvent shard. + * @member {string} shard + * @memberof binlogdata.RowEvent * @instance */ - ExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RowEvent.prototype.shard = ""; /** - * Creates a new ExecuteRequest instance using the specified properties. + * Creates a new RowEvent instance using the specified properties. * @function create - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static - * @param {query.IExecuteRequest=} [properties] Properties to set - * @returns {query.ExecuteRequest} ExecuteRequest instance + * @param {binlogdata.IRowEvent=} [properties] Properties to set + * @returns {binlogdata.RowEvent} RowEvent instance */ - ExecuteRequest.create = function create(properties) { - return new ExecuteRequest(properties); + RowEvent.create = function create(properties) { + return new RowEvent(properties); }; /** - * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. + * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. * @function encode - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static - * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode + * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteRequest.encode = function encode(message, writer) { + RowEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); + if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); + if (message.row_changes != null && message.row_changes.length) + for (var i = 0; i < message.row_changes.length; ++i) + $root.binlogdata.RowChange.encode(message.row_changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.shard); return writer; }; /** - * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. + * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. * @function encodeDelimited - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static - * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode + * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + RowEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteRequest message from the specified reader or buffer. + * Decodes a RowEvent message from the specified reader or buffer. * @function decode - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteRequest} ExecuteRequest + * @returns {binlogdata.RowEvent} RowEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteRequest.decode = function decode(reader, length) { + RowEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.table_name = reader.string(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + if (!(message.row_changes && message.row_changes.length)) + message.row_changes = []; + message.row_changes.push($root.binlogdata.RowChange.decode(reader, reader.uint32())); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.transaction_id = reader.int64(); - break; - case 6: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 7: - message.reserved_id = reader.int64(); + message.shard = reader.string(); break; default: reader.skipType(tag & 7); @@ -60644,209 +59446,154 @@ $root.query = (function() { }; /** - * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a RowEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteRequest} ExecuteRequest + * @returns {binlogdata.RowEvent} RowEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + RowEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteRequest message. + * Verifies a RowEvent message. * @function verify - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteRequest.verify = function verify(message) { + RowEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; + if (message.table_name != null && message.hasOwnProperty("table_name")) + if (!$util.isString(message.table_name)) + return "table_name: string expected"; + if (message.row_changes != null && message.hasOwnProperty("row_changes")) { + if (!Array.isArray(message.row_changes)) + return "row_changes: array expected"; + for (var i = 0; i < message.row_changes.length; ++i) { + var error = $root.binlogdata.RowChange.verify(message.row_changes[i]); + if (error) + return "row_changes." + error; + } } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; return null; }; /** - * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static * @param {Object.} object Plain object - * @returns {query.ExecuteRequest} ExecuteRequest + * @returns {binlogdata.RowEvent} RowEvent */ - ExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteRequest) + RowEvent.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.RowEvent) return object; - var message = new $root.query.ExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); + var message = new $root.binlogdata.RowEvent(); + if (object.table_name != null) + message.table_name = String(object.table_name); + if (object.row_changes) { + if (!Array.isArray(object.row_changes)) + throw TypeError(".binlogdata.RowEvent.row_changes: array expected"); + message.row_changes = []; + for (var i = 0; i < object.row_changes.length; ++i) { + if (typeof object.row_changes[i] !== "object") + throw TypeError(".binlogdata.RowEvent.row_changes: object expected"); + message.row_changes[i] = $root.binlogdata.RowChange.fromObject(object.row_changes[i]); + } } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); return message; }; /** - * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a RowEvent message. Also converts values to other types if specified. * @function toObject - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @static - * @param {query.ExecuteRequest} message ExecuteRequest + * @param {binlogdata.RowEvent} message RowEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteRequest.toObject = function toObject(message, options) { + RowEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.row_changes = []; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; + object.table_name = ""; + object.keyspace = ""; + object.shard = ""; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.table_name != null && message.hasOwnProperty("table_name")) + object.table_name = message.table_name; + if (message.row_changes && message.row_changes.length) { + object.row_changes = []; + for (var j = 0; j < message.row_changes.length; ++j) + object.row_changes[j] = $root.binlogdata.RowChange.toObject(message.row_changes[j], options); + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; return object; }; /** - * Converts this ExecuteRequest to JSON. + * Converts this RowEvent to JSON. * @function toJSON - * @memberof query.ExecuteRequest + * @memberof binlogdata.RowEvent * @instance * @returns {Object.} JSON object */ - ExecuteRequest.prototype.toJSON = function toJSON() { + RowEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteRequest; + return RowEvent; })(); - query.ExecuteResponse = (function() { + binlogdata.FieldEvent = (function() { /** - * Properties of an ExecuteResponse. - * @memberof query - * @interface IExecuteResponse - * @property {query.IQueryResult|null} [result] ExecuteResponse result + * Properties of a FieldEvent. + * @memberof binlogdata + * @interface IFieldEvent + * @property {string|null} [table_name] FieldEvent table_name + * @property {Array.|null} [fields] FieldEvent fields + * @property {string|null} [keyspace] FieldEvent keyspace + * @property {string|null} [shard] FieldEvent shard */ /** - * Constructs a new ExecuteResponse. - * @memberof query - * @classdesc Represents an ExecuteResponse. - * @implements IExecuteResponse + * Constructs a new FieldEvent. + * @memberof binlogdata + * @classdesc Represents a FieldEvent. + * @implements IFieldEvent * @constructor - * @param {query.IExecuteResponse=} [properties] Properties to set + * @param {binlogdata.IFieldEvent=} [properties] Properties to set */ - function ExecuteResponse(properties) { + function FieldEvent(properties) { + this.fields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60854,75 +59601,117 @@ $root.query = (function() { } /** - * ExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ExecuteResponse + * FieldEvent table_name. + * @member {string} table_name + * @memberof binlogdata.FieldEvent * @instance */ - ExecuteResponse.prototype.result = null; + FieldEvent.prototype.table_name = ""; /** - * Creates a new ExecuteResponse instance using the specified properties. + * FieldEvent fields. + * @member {Array.} fields + * @memberof binlogdata.FieldEvent + * @instance + */ + FieldEvent.prototype.fields = $util.emptyArray; + + /** + * FieldEvent keyspace. + * @member {string} keyspace + * @memberof binlogdata.FieldEvent + * @instance + */ + FieldEvent.prototype.keyspace = ""; + + /** + * FieldEvent shard. + * @member {string} shard + * @memberof binlogdata.FieldEvent + * @instance + */ + FieldEvent.prototype.shard = ""; + + /** + * Creates a new FieldEvent instance using the specified properties. * @function create - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static - * @param {query.IExecuteResponse=} [properties] Properties to set - * @returns {query.ExecuteResponse} ExecuteResponse instance + * @param {binlogdata.IFieldEvent=} [properties] Properties to set + * @returns {binlogdata.FieldEvent} FieldEvent instance */ - ExecuteResponse.create = function create(properties) { - return new ExecuteResponse(properties); + FieldEvent.create = function create(properties) { + return new FieldEvent(properties); }; /** - * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. + * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. * @function encode - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static - * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode + * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteResponse.encode = function encode(message, writer) { + FieldEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.shard); return writer; }; /** - * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. + * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. * @function encodeDelimited - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static - * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode + * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + FieldEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteResponse message from the specified reader or buffer. + * Decodes a FieldEvent message from the specified reader or buffer. * @function decode - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteResponse} ExecuteResponse + * @returns {binlogdata.FieldEvent} FieldEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteResponse.decode = function decode(reader, length) { + FieldEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.FieldEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.table_name = reader.string(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.query.Field.decode(reader, reader.uint32())); + break; + case 3: + message.keyspace = reader.string(); + break; + case 4: + message.shard = reader.string(); break; default: reader.skipType(tag & 7); @@ -60933,113 +59722,154 @@ $root.query = (function() { }; /** - * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a FieldEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteResponse} ExecuteResponse + * @returns {binlogdata.FieldEvent} FieldEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + FieldEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteResponse message. + * Verifies a FieldEvent message. * @function verify - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteResponse.verify = function verify(message) { + FieldEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; + if (message.table_name != null && message.hasOwnProperty("table_name")) + if (!$util.isString(message.table_name)) + return "table_name: string expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.query.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; return null; }; /** - * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static * @param {Object.} object Plain object - * @returns {query.ExecuteResponse} ExecuteResponse + * @returns {binlogdata.FieldEvent} FieldEvent */ - ExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteResponse) + FieldEvent.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.FieldEvent) return object; - var message = new $root.query.ExecuteResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.binlogdata.FieldEvent(); + if (object.table_name != null) + message.table_name = String(object.table_name); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".binlogdata.FieldEvent.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".binlogdata.FieldEvent.fields: object expected"); + message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + } } + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); return message; }; /** - * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. * @function toObject - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @static - * @param {query.ExecuteResponse} message ExecuteResponse + * @param {binlogdata.FieldEvent} message FieldEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteResponse.toObject = function toObject(message, options) { + FieldEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.table_name = ""; + object.keyspace = ""; + object.shard = ""; + } + if (message.table_name != null && message.hasOwnProperty("table_name")) + object.table_name = message.table_name; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; return object; }; /** - * Converts this ExecuteResponse to JSON. + * Converts this FieldEvent to JSON. * @function toJSON - * @memberof query.ExecuteResponse + * @memberof binlogdata.FieldEvent * @instance * @returns {Object.} JSON object */ - ExecuteResponse.prototype.toJSON = function toJSON() { + FieldEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteResponse; + return FieldEvent; })(); - query.ResultWithError = (function() { + binlogdata.ShardGtid = (function() { /** - * Properties of a ResultWithError. - * @memberof query - * @interface IResultWithError - * @property {vtrpc.IRPCError|null} [error] ResultWithError error - * @property {query.IQueryResult|null} [result] ResultWithError result + * Properties of a ShardGtid. + * @memberof binlogdata + * @interface IShardGtid + * @property {string|null} [keyspace] ShardGtid keyspace + * @property {string|null} [shard] ShardGtid shard + * @property {string|null} [gtid] ShardGtid gtid + * @property {Array.|null} [table_p_ks] ShardGtid table_p_ks */ /** - * Constructs a new ResultWithError. - * @memberof query - * @classdesc Represents a ResultWithError. - * @implements IResultWithError + * Constructs a new ShardGtid. + * @memberof binlogdata + * @classdesc Represents a ShardGtid. + * @implements IShardGtid * @constructor - * @param {query.IResultWithError=} [properties] Properties to set + * @param {binlogdata.IShardGtid=} [properties] Properties to set */ - function ResultWithError(properties) { + function ShardGtid(properties) { + this.table_p_ks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61047,88 +59877,117 @@ $root.query = (function() { } /** - * ResultWithError error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ResultWithError + * ShardGtid keyspace. + * @member {string} keyspace + * @memberof binlogdata.ShardGtid * @instance */ - ResultWithError.prototype.error = null; + ShardGtid.prototype.keyspace = ""; /** - * ResultWithError result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ResultWithError + * ShardGtid shard. + * @member {string} shard + * @memberof binlogdata.ShardGtid * @instance */ - ResultWithError.prototype.result = null; + ShardGtid.prototype.shard = ""; /** - * Creates a new ResultWithError instance using the specified properties. + * ShardGtid gtid. + * @member {string} gtid + * @memberof binlogdata.ShardGtid + * @instance + */ + ShardGtid.prototype.gtid = ""; + + /** + * ShardGtid table_p_ks. + * @member {Array.} table_p_ks + * @memberof binlogdata.ShardGtid + * @instance + */ + ShardGtid.prototype.table_p_ks = $util.emptyArray; + + /** + * Creates a new ShardGtid instance using the specified properties. * @function create - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static - * @param {query.IResultWithError=} [properties] Properties to set - * @returns {query.ResultWithError} ResultWithError instance + * @param {binlogdata.IShardGtid=} [properties] Properties to set + * @returns {binlogdata.ShardGtid} ShardGtid instance */ - ResultWithError.create = function create(properties) { - return new ResultWithError(properties); + ShardGtid.create = function create(properties) { + return new ShardGtid(properties); }; /** - * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. + * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. * @function encode - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static - * @param {query.IResultWithError} message ResultWithError message or plain object to encode + * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultWithError.encode = function encode(message, writer) { + ShardGtid.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); + if (message.table_p_ks != null && message.table_p_ks.length) + for (var i = 0; i < message.table_p_ks.length; ++i) + $root.binlogdata.TableLastPK.encode(message.table_p_ks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. + * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. * @function encodeDelimited - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static - * @param {query.IResultWithError} message ResultWithError message or plain object to encode + * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultWithError.encodeDelimited = function encodeDelimited(message, writer) { + ShardGtid.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResultWithError message from the specified reader or buffer. + * Decodes a ShardGtid message from the specified reader or buffer. * @function decode - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ResultWithError} ResultWithError + * @returns {binlogdata.ShardGtid} ShardGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultWithError.decode = function decode(reader, length) { + ShardGtid.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ResultWithError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.ShardGtid(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.shard = reader.string(); + break; + case 3: + message.gtid = reader.string(); + break; + case 4: + if (!(message.table_p_ks && message.table_p_ks.length)) + message.table_p_ks = []; + message.table_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -61139,132 +59998,151 @@ $root.query = (function() { }; /** - * Decodes a ResultWithError message from the specified reader or buffer, length delimited. + * Decodes a ShardGtid message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ResultWithError} ResultWithError + * @returns {binlogdata.ShardGtid} ShardGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultWithError.decodeDelimited = function decodeDelimited(reader) { + ShardGtid.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResultWithError message. + * Verifies a ShardGtid message. * @function verify - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResultWithError.verify = function verify(message) { + ShardGtid.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.gtid != null && message.hasOwnProperty("gtid")) + if (!$util.isString(message.gtid)) + return "gtid: string expected"; + if (message.table_p_ks != null && message.hasOwnProperty("table_p_ks")) { + if (!Array.isArray(message.table_p_ks)) + return "table_p_ks: array expected"; + for (var i = 0; i < message.table_p_ks.length; ++i) { + var error = $root.binlogdata.TableLastPK.verify(message.table_p_ks[i]); + if (error) + return "table_p_ks." + error; + } } return null; }; /** - * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. + * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static * @param {Object.} object Plain object - * @returns {query.ResultWithError} ResultWithError + * @returns {binlogdata.ShardGtid} ShardGtid */ - ResultWithError.fromObject = function fromObject(object) { - if (object instanceof $root.query.ResultWithError) + ShardGtid.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.ShardGtid) return object; - var message = new $root.query.ResultWithError(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ResultWithError.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ResultWithError.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.binlogdata.ShardGtid(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.gtid != null) + message.gtid = String(object.gtid); + if (object.table_p_ks) { + if (!Array.isArray(object.table_p_ks)) + throw TypeError(".binlogdata.ShardGtid.table_p_ks: array expected"); + message.table_p_ks = []; + for (var i = 0; i < object.table_p_ks.length; ++i) { + if (typeof object.table_p_ks[i] !== "object") + throw TypeError(".binlogdata.ShardGtid.table_p_ks: object expected"); + message.table_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_p_ks[i]); + } } return message; }; /** - * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. + * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. * @function toObject - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @static - * @param {query.ResultWithError} message ResultWithError + * @param {binlogdata.ShardGtid} message ShardGtid * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResultWithError.toObject = function toObject(message, options) { + ShardGtid.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.table_p_ks = []; if (options.defaults) { - object.error = null; - object.result = null; + object.keyspace = ""; + object.shard = ""; + object.gtid = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.gtid != null && message.hasOwnProperty("gtid")) + object.gtid = message.gtid; + if (message.table_p_ks && message.table_p_ks.length) { + object.table_p_ks = []; + for (var j = 0; j < message.table_p_ks.length; ++j) + object.table_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_p_ks[j], options); } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this ResultWithError to JSON. + * Converts this ShardGtid to JSON. * @function toJSON - * @memberof query.ResultWithError + * @memberof binlogdata.ShardGtid * @instance * @returns {Object.} JSON object */ - ResultWithError.prototype.toJSON = function toJSON() { + ShardGtid.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResultWithError; + return ShardGtid; })(); - query.StreamExecuteRequest = (function() { + binlogdata.VGtid = (function() { /** - * Properties of a StreamExecuteRequest. - * @memberof query - * @interface IStreamExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] StreamExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] StreamExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] StreamExecuteRequest target - * @property {query.IBoundQuery|null} [query] StreamExecuteRequest query - * @property {query.IExecuteOptions|null} [options] StreamExecuteRequest options - * @property {number|Long|null} [transaction_id] StreamExecuteRequest transaction_id - * @property {number|Long|null} [reserved_id] StreamExecuteRequest reserved_id + * Properties of a VGtid. + * @memberof binlogdata + * @interface IVGtid + * @property {Array.|null} [shard_gtids] VGtid shard_gtids */ /** - * Constructs a new StreamExecuteRequest. - * @memberof query - * @classdesc Represents a StreamExecuteRequest. - * @implements IStreamExecuteRequest + * Constructs a new VGtid. + * @memberof binlogdata + * @classdesc Represents a VGtid. + * @implements IVGtid * @constructor - * @param {query.IStreamExecuteRequest=} [properties] Properties to set + * @param {binlogdata.IVGtid=} [properties] Properties to set */ - function StreamExecuteRequest(properties) { + function VGtid(properties) { + this.shard_gtids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61272,153 +60150,78 @@ $root.query = (function() { } /** - * StreamExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.effective_caller_id = null; - - /** - * StreamExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.immediate_caller_id = null; - - /** - * StreamExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.target = null; - - /** - * StreamExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.query = null; - - /** - * StreamExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.options = null; - - /** - * StreamExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StreamExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.StreamExecuteRequest + * VGtid shard_gtids. + * @member {Array.} shard_gtids + * @memberof binlogdata.VGtid * @instance */ - StreamExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VGtid.prototype.shard_gtids = $util.emptyArray; /** - * Creates a new StreamExecuteRequest instance using the specified properties. + * Creates a new VGtid instance using the specified properties. * @function create - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static - * @param {query.IStreamExecuteRequest=} [properties] Properties to set - * @returns {query.StreamExecuteRequest} StreamExecuteRequest instance + * @param {binlogdata.IVGtid=} [properties] Properties to set + * @returns {binlogdata.VGtid} VGtid instance */ - StreamExecuteRequest.create = function create(properties) { - return new StreamExecuteRequest(properties); + VGtid.create = function create(properties) { + return new VGtid(properties); }; /** - * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. + * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. * @function encode - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static - * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode + * @param {binlogdata.IVGtid} message VGtid message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamExecuteRequest.encode = function encode(message, writer) { + VGtid.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); + if (message.shard_gtids != null && message.shard_gtids.length) + for (var i = 0; i < message.shard_gtids.length; ++i) + $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. + * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. * @function encodeDelimited - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static - * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode + * @param {binlogdata.IVGtid} message VGtid message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + VGtid.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer. + * Decodes a VGtid message from the specified reader or buffer. * @function decode - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StreamExecuteRequest} StreamExecuteRequest + * @returns {binlogdata.VGtid} VGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamExecuteRequest.decode = function decode(reader, length) { + VGtid.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VGtid(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - message.transaction_id = reader.int64(); - break; - case 7: - message.reserved_id = reader.int64(); + if (!(message.shard_gtids && message.shard_gtids.length)) + message.shard_gtids = []; + message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -61429,209 +60232,125 @@ $root.query = (function() { }; /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a VGtid message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamExecuteRequest} StreamExecuteRequest + * @returns {binlogdata.VGtid} VGtid * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + VGtid.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamExecuteRequest message. + * Verifies a VGtid message. * @function verify - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamExecuteRequest.verify = function verify(message) { + VGtid.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; + if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { + if (!Array.isArray(message.shard_gtids)) + return "shard_gtids: array expected"; + for (var i = 0; i < message.shard_gtids.length; ++i) { + var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); + if (error) + return "shard_gtids." + error; + } } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; return null; }; /** - * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VGtid message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static * @param {Object.} object Plain object - * @returns {query.StreamExecuteRequest} StreamExecuteRequest + * @returns {binlogdata.VGtid} VGtid */ - StreamExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamExecuteRequest) + VGtid.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VGtid) return object; - var message = new $root.query.StreamExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.StreamExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.StreamExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StreamExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.StreamExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.StreamExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); + var message = new $root.binlogdata.VGtid(); + if (object.shard_gtids) { + if (!Array.isArray(object.shard_gtids)) + throw TypeError(".binlogdata.VGtid.shard_gtids: array expected"); + message.shard_gtids = []; + for (var i = 0; i < object.shard_gtids.length; ++i) { + if (typeof object.shard_gtids[i] !== "object") + throw TypeError(".binlogdata.VGtid.shard_gtids: object expected"); + message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); + } } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a VGtid message. Also converts values to other types if specified. * @function toObject - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @static - * @param {query.StreamExecuteRequest} message StreamExecuteRequest + * @param {binlogdata.VGtid} message VGtid * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamExecuteRequest.toObject = function toObject(message, options) { + VGtid.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.shard_gtids = []; + if (message.shard_gtids && message.shard_gtids.length) { + object.shard_gtids = []; + for (var j = 0; j < message.shard_gtids.length; ++j) + object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; return object; }; /** - * Converts this StreamExecuteRequest to JSON. + * Converts this VGtid to JSON. * @function toJSON - * @memberof query.StreamExecuteRequest + * @memberof binlogdata.VGtid * @instance * @returns {Object.} JSON object */ - StreamExecuteRequest.prototype.toJSON = function toJSON() { + VGtid.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamExecuteRequest; + return VGtid; })(); - query.StreamExecuteResponse = (function() { + binlogdata.KeyspaceShard = (function() { /** - * Properties of a StreamExecuteResponse. - * @memberof query - * @interface IStreamExecuteResponse - * @property {query.IQueryResult|null} [result] StreamExecuteResponse result + * Properties of a KeyspaceShard. + * @memberof binlogdata + * @interface IKeyspaceShard + * @property {string|null} [keyspace] KeyspaceShard keyspace + * @property {string|null} [shard] KeyspaceShard shard */ /** - * Constructs a new StreamExecuteResponse. - * @memberof query - * @classdesc Represents a StreamExecuteResponse. - * @implements IStreamExecuteResponse + * Constructs a new KeyspaceShard. + * @memberof binlogdata + * @classdesc Represents a KeyspaceShard. + * @implements IKeyspaceShard * @constructor - * @param {query.IStreamExecuteResponse=} [properties] Properties to set + * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set */ - function StreamExecuteResponse(properties) { + function KeyspaceShard(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61639,75 +60358,88 @@ $root.query = (function() { } /** - * StreamExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.StreamExecuteResponse + * KeyspaceShard keyspace. + * @member {string} keyspace + * @memberof binlogdata.KeyspaceShard * @instance */ - StreamExecuteResponse.prototype.result = null; + KeyspaceShard.prototype.keyspace = ""; /** - * Creates a new StreamExecuteResponse instance using the specified properties. - * @function create - * @memberof query.StreamExecuteResponse - * @static - * @param {query.IStreamExecuteResponse=} [properties] Properties to set - * @returns {query.StreamExecuteResponse} StreamExecuteResponse instance - */ - StreamExecuteResponse.create = function create(properties) { - return new StreamExecuteResponse(properties); + * KeyspaceShard shard. + * @member {string} shard + * @memberof binlogdata.KeyspaceShard + * @instance + */ + KeyspaceShard.prototype.shard = ""; + + /** + * Creates a new KeyspaceShard instance using the specified properties. + * @function create + * @memberof binlogdata.KeyspaceShard + * @static + * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set + * @returns {binlogdata.KeyspaceShard} KeyspaceShard instance + */ + KeyspaceShard.create = function create(properties) { + return new KeyspaceShard(properties); }; /** - * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. + * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. * @function encode - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static - * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode + * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamExecuteResponse.encode = function encode(message, writer) { + KeyspaceShard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); return writer; }; /** - * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. + * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. * @function encodeDelimited - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static - * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode + * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + KeyspaceShard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer. + * Decodes a KeyspaceShard message from the specified reader or buffer. * @function decode - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StreamExecuteResponse} StreamExecuteResponse + * @returns {binlogdata.KeyspaceShard} KeyspaceShard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamExecuteResponse.decode = function decode(reader, length) { + KeyspaceShard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.KeyspaceShard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); break; default: reader.skipType(tag & 7); @@ -61718,115 +60450,140 @@ $root.query = (function() { }; /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamExecuteResponse} StreamExecuteResponse + * @returns {binlogdata.KeyspaceShard} KeyspaceShard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + KeyspaceShard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamExecuteResponse message. + * Verifies a KeyspaceShard message. * @function verify - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamExecuteResponse.verify = function verify(message) { + KeyspaceShard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; return null; }; /** - * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static * @param {Object.} object Plain object - * @returns {query.StreamExecuteResponse} StreamExecuteResponse + * @returns {binlogdata.KeyspaceShard} KeyspaceShard */ - StreamExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamExecuteResponse) + KeyspaceShard.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.KeyspaceShard) return object; - var message = new $root.query.StreamExecuteResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.StreamExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } + var message = new $root.binlogdata.KeyspaceShard(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); return message; }; /** - * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. * @function toObject - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @static - * @param {query.StreamExecuteResponse} message StreamExecuteResponse + * @param {binlogdata.KeyspaceShard} message KeyspaceShard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamExecuteResponse.toObject = function toObject(message, options) { + KeyspaceShard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; return object; }; /** - * Converts this StreamExecuteResponse to JSON. + * Converts this KeyspaceShard to JSON. * @function toJSON - * @memberof query.StreamExecuteResponse + * @memberof binlogdata.KeyspaceShard * @instance * @returns {Object.} JSON object */ - StreamExecuteResponse.prototype.toJSON = function toJSON() { + KeyspaceShard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamExecuteResponse; + return KeyspaceShard; })(); - query.BeginRequest = (function() { + /** + * MigrationType enum. + * @name binlogdata.MigrationType + * @enum {number} + * @property {number} TABLES=0 TABLES value + * @property {number} SHARDS=1 SHARDS value + */ + binlogdata.MigrationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLES"] = 0; + values[valuesById[1] = "SHARDS"] = 1; + return values; + })(); + + binlogdata.Journal = (function() { /** - * Properties of a BeginRequest. - * @memberof query - * @interface IBeginRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginRequest target - * @property {query.IExecuteOptions|null} [options] BeginRequest options + * Properties of a Journal. + * @memberof binlogdata + * @interface IJournal + * @property {number|Long|null} [id] Journal id + * @property {binlogdata.MigrationType|null} [migration_type] Journal migration_type + * @property {Array.|null} [tables] Journal tables + * @property {string|null} [local_position] Journal local_position + * @property {Array.|null} [shard_gtids] Journal shard_gtids + * @property {Array.|null} [participants] Journal participants + * @property {Array.|null} [source_workflows] Journal source_workflows */ /** - * Constructs a new BeginRequest. - * @memberof query - * @classdesc Represents a BeginRequest. - * @implements IBeginRequest + * Constructs a new Journal. + * @memberof binlogdata + * @classdesc Represents a Journal. + * @implements IJournal * @constructor - * @param {query.IBeginRequest=} [properties] Properties to set + * @param {binlogdata.IJournal=} [properties] Properties to set */ - function BeginRequest(properties) { + function Journal(properties) { + this.tables = []; + this.shard_gtids = []; + this.participants = []; + this.source_workflows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61834,114 +60591,165 @@ $root.query = (function() { } /** - * BeginRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginRequest + * Journal id. + * @member {number|Long} id + * @memberof binlogdata.Journal * @instance */ - BeginRequest.prototype.effective_caller_id = null; + Journal.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BeginRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginRequest + * Journal migration_type. + * @member {binlogdata.MigrationType} migration_type + * @memberof binlogdata.Journal * @instance */ - BeginRequest.prototype.immediate_caller_id = null; + Journal.prototype.migration_type = 0; /** - * BeginRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginRequest + * Journal tables. + * @member {Array.} tables + * @memberof binlogdata.Journal * @instance */ - BeginRequest.prototype.target = null; + Journal.prototype.tables = $util.emptyArray; /** - * BeginRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginRequest + * Journal local_position. + * @member {string} local_position + * @memberof binlogdata.Journal * @instance */ - BeginRequest.prototype.options = null; + Journal.prototype.local_position = ""; /** - * Creates a new BeginRequest instance using the specified properties. + * Journal shard_gtids. + * @member {Array.} shard_gtids + * @memberof binlogdata.Journal + * @instance + */ + Journal.prototype.shard_gtids = $util.emptyArray; + + /** + * Journal participants. + * @member {Array.} participants + * @memberof binlogdata.Journal + * @instance + */ + Journal.prototype.participants = $util.emptyArray; + + /** + * Journal source_workflows. + * @member {Array.} source_workflows + * @memberof binlogdata.Journal + * @instance + */ + Journal.prototype.source_workflows = $util.emptyArray; + + /** + * Creates a new Journal instance using the specified properties. * @function create - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static - * @param {query.IBeginRequest=} [properties] Properties to set - * @returns {query.BeginRequest} BeginRequest instance + * @param {binlogdata.IJournal=} [properties] Properties to set + * @returns {binlogdata.Journal} Journal instance */ - BeginRequest.create = function create(properties) { - return new BeginRequest(properties); + Journal.create = function create(properties) { + return new Journal(properties); }; /** - * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. + * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. * @function encode - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static - * @param {query.IBeginRequest} message BeginRequest message or plain object to encode + * @param {binlogdata.IJournal} message Journal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginRequest.encode = function encode(message, writer) { + Journal.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); + if (message.migration_type != null && Object.hasOwnProperty.call(message, "migration_type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.migration_type); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tables[i]); + if (message.local_position != null && Object.hasOwnProperty.call(message, "local_position")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.local_position); + if (message.shard_gtids != null && message.shard_gtids.length) + for (var i = 0; i < message.shard_gtids.length; ++i) + $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + $root.binlogdata.KeyspaceShard.encode(message.participants[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.source_workflows != null && message.source_workflows.length) + for (var i = 0; i < message.source_workflows.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.source_workflows[i]); return writer; }; /** - * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. + * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. * @function encodeDelimited - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static - * @param {query.IBeginRequest} message BeginRequest message or plain object to encode + * @param {binlogdata.IJournal} message Journal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginRequest.encodeDelimited = function encodeDelimited(message, writer) { + Journal.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BeginRequest message from the specified reader or buffer. + * Decodes a Journal message from the specified reader or buffer. * @function decode - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BeginRequest} BeginRequest + * @returns {binlogdata.Journal} Journal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginRequest.decode = function decode(reader, length) { + Journal.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Journal(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.id = reader.int64(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + message.migration_type = reader.int32(); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); break; case 4: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + message.local_position = reader.string(); + break; + case 5: + if (!(message.shard_gtids && message.shard_gtids.length)) + message.shard_gtids = []; + message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.binlogdata.KeyspaceShard.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.source_workflows && message.source_workflows.length)) + message.source_workflows = []; + message.source_workflows.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -61952,154 +60760,256 @@ $root.query = (function() { }; /** - * Decodes a BeginRequest message from the specified reader or buffer, length delimited. + * Decodes a Journal message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginRequest} BeginRequest + * @returns {binlogdata.Journal} Journal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginRequest.decodeDelimited = function decodeDelimited(reader) { + Journal.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BeginRequest message. + * Verifies a Journal message. * @function verify - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BeginRequest.verify = function verify(message) { + Journal.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.migration_type != null && message.hasOwnProperty("migration_type")) + switch (message.migration_type) { + default: + return "migration_type: enum value expected"; + case 0: + case 1: + break; + } + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; + if (message.local_position != null && message.hasOwnProperty("local_position")) + if (!$util.isString(message.local_position)) + return "local_position: string expected"; + if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { + if (!Array.isArray(message.shard_gtids)) + return "shard_gtids: array expected"; + for (var i = 0; i < message.shard_gtids.length; ++i) { + var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); + if (error) + return "shard_gtids." + error; + } } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) { + var error = $root.binlogdata.KeyspaceShard.verify(message.participants[i]); + if (error) + return "participants." + error; + } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; + if (message.source_workflows != null && message.hasOwnProperty("source_workflows")) { + if (!Array.isArray(message.source_workflows)) + return "source_workflows: array expected"; + for (var i = 0; i < message.source_workflows.length; ++i) + if (!$util.isString(message.source_workflows[i])) + return "source_workflows: string[] expected"; } return null; }; /** - * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Journal message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static * @param {Object.} object Plain object - * @returns {query.BeginRequest} BeginRequest + * @returns {binlogdata.Journal} Journal */ - BeginRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginRequest) + Journal.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.Journal) return object; - var message = new $root.query.BeginRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + var message = new $root.binlogdata.Journal(); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + switch (object.migration_type) { + case "TABLES": + case 0: + message.migration_type = 0; + break; + case "SHARDS": + case 1: + message.migration_type = 1; + break; } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".binlogdata.Journal.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + if (object.local_position != null) + message.local_position = String(object.local_position); + if (object.shard_gtids) { + if (!Array.isArray(object.shard_gtids)) + throw TypeError(".binlogdata.Journal.shard_gtids: array expected"); + message.shard_gtids = []; + for (var i = 0; i < object.shard_gtids.length; ++i) { + if (typeof object.shard_gtids[i] !== "object") + throw TypeError(".binlogdata.Journal.shard_gtids: object expected"); + message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); + } } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".binlogdata.Journal.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) { + if (typeof object.participants[i] !== "object") + throw TypeError(".binlogdata.Journal.participants: object expected"); + message.participants[i] = $root.binlogdata.KeyspaceShard.fromObject(object.participants[i]); + } + } + if (object.source_workflows) { + if (!Array.isArray(object.source_workflows)) + throw TypeError(".binlogdata.Journal.source_workflows: array expected"); + message.source_workflows = []; + for (var i = 0; i < object.source_workflows.length; ++i) + message.source_workflows[i] = String(object.source_workflows[i]); } return message; }; /** - * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. + * Creates a plain object from a Journal message. Also converts values to other types if specified. * @function toObject - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @static - * @param {query.BeginRequest} message BeginRequest + * @param {binlogdata.Journal} message Journal * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginRequest.toObject = function toObject(message, options) { + Journal.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.tables = []; + object.shard_gtids = []; + object.participants = []; + object.source_workflows = []; + } if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + object.migration_type = options.enums === String ? "TABLES" : 0; + object.local_position = ""; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this BeginRequest to JSON. + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.migration_type != null && message.hasOwnProperty("migration_type")) + object.migration_type = options.enums === String ? $root.binlogdata.MigrationType[message.migration_type] : message.migration_type; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } + if (message.local_position != null && message.hasOwnProperty("local_position")) + object.local_position = message.local_position; + if (message.shard_gtids && message.shard_gtids.length) { + object.shard_gtids = []; + for (var j = 0; j < message.shard_gtids.length; ++j) + object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); + } + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = $root.binlogdata.KeyspaceShard.toObject(message.participants[j], options); + } + if (message.source_workflows && message.source_workflows.length) { + object.source_workflows = []; + for (var j = 0; j < message.source_workflows.length; ++j) + object.source_workflows[j] = message.source_workflows[j]; + } + return object; + }; + + /** + * Converts this Journal to JSON. * @function toJSON - * @memberof query.BeginRequest + * @memberof binlogdata.Journal * @instance * @returns {Object.} JSON object */ - BeginRequest.prototype.toJSON = function toJSON() { + Journal.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginRequest; + return Journal; })(); - query.BeginResponse = (function() { + binlogdata.VEvent = (function() { /** - * Properties of a BeginResponse. - * @memberof query - * @interface IBeginResponse - * @property {number|Long|null} [transaction_id] BeginResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginResponse tablet_alias - * @property {string|null} [session_state_changes] BeginResponse session_state_changes + * Properties of a VEvent. + * @memberof binlogdata + * @interface IVEvent + * @property {binlogdata.VEventType|null} [type] VEvent type + * @property {number|Long|null} [timestamp] VEvent timestamp + * @property {string|null} [gtid] VEvent gtid + * @property {string|null} [statement] VEvent statement + * @property {binlogdata.IRowEvent|null} [row_event] VEvent row_event + * @property {binlogdata.IFieldEvent|null} [field_event] VEvent field_event + * @property {binlogdata.IVGtid|null} [vgtid] VEvent vgtid + * @property {binlogdata.IJournal|null} [journal] VEvent journal + * @property {string|null} [dml] VEvent dml + * @property {number|Long|null} [current_time] VEvent current_time + * @property {binlogdata.ILastPKEvent|null} [last_p_k_event] VEvent last_p_k_event + * @property {string|null} [keyspace] VEvent keyspace + * @property {string|null} [shard] VEvent shard + * @property {boolean|null} [throttled] VEvent throttled */ /** - * Constructs a new BeginResponse. - * @memberof query - * @classdesc Represents a BeginResponse. - * @implements IBeginResponse + * Constructs a new VEvent. + * @memberof binlogdata + * @classdesc Represents a VEvent. + * @implements IVEvent * @constructor - * @param {query.IBeginResponse=} [properties] Properties to set + * @param {binlogdata.IVEvent=} [properties] Properties to set */ - function BeginResponse(properties) { + function VEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62107,366 +61017,244 @@ $root.query = (function() { } /** - * BeginResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginResponse + * VEvent type. + * @member {binlogdata.VEventType} type + * @memberof binlogdata.VEvent * @instance */ - BeginResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VEvent.prototype.type = 0; /** - * BeginResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginResponse + * VEvent timestamp. + * @member {number|Long} timestamp + * @memberof binlogdata.VEvent * @instance */ - BeginResponse.prototype.tablet_alias = null; + VEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BeginResponse session_state_changes. - * @member {string} session_state_changes - * @memberof query.BeginResponse + * VEvent gtid. + * @member {string} gtid + * @memberof binlogdata.VEvent * @instance */ - BeginResponse.prototype.session_state_changes = ""; - - /** - * Creates a new BeginResponse instance using the specified properties. - * @function create - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse=} [properties] Properties to set - * @returns {query.BeginResponse} BeginResponse instance - */ - BeginResponse.create = function create(properties) { - return new BeginResponse(properties); - }; - - /** - * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @function encode - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse} message BeginResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.session_state_changes); - return writer; - }; - - /** - * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse} message BeginResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginResponse message from the specified reader or buffer. - * @function decode - * @memberof query.BeginResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginResponse} BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.transaction_id = reader.int64(); - break; - case 2: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 3: - message.session_state_changes = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + VEvent.prototype.gtid = ""; /** - * Decodes a BeginResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginResponse} BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * VEvent statement. + * @member {string} statement + * @memberof binlogdata.VEvent + * @instance */ - BeginResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + VEvent.prototype.statement = ""; /** - * Verifies a BeginResponse message. - * @function verify - * @memberof query.BeginResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * VEvent row_event. + * @member {binlogdata.IRowEvent|null|undefined} row_event + * @memberof binlogdata.VEvent + * @instance */ - BeginResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - if (!$util.isString(message.session_state_changes)) - return "session_state_changes: string expected"; - return null; - }; + VEvent.prototype.row_event = null; /** - * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginResponse - * @static - * @param {Object.} object Plain object - * @returns {query.BeginResponse} BeginResponse + * VEvent field_event. + * @member {binlogdata.IFieldEvent|null|undefined} field_event + * @memberof binlogdata.VEvent + * @instance */ - BeginResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginResponse) - return object; - var message = new $root.query.BeginResponse(); - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.session_state_changes != null) - message.session_state_changes = String(object.session_state_changes); - return message; - }; + VEvent.prototype.field_event = null; /** - * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginResponse - * @static - * @param {query.BeginResponse} message BeginResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * VEvent vgtid. + * @member {binlogdata.IVGtid|null|undefined} vgtid + * @memberof binlogdata.VEvent + * @instance */ - BeginResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - object.session_state_changes = ""; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - object.session_state_changes = message.session_state_changes; - return object; - }; + VEvent.prototype.vgtid = null; /** - * Converts this BeginResponse to JSON. - * @function toJSON - * @memberof query.BeginResponse + * VEvent journal. + * @member {binlogdata.IJournal|null|undefined} journal + * @memberof binlogdata.VEvent * @instance - * @returns {Object.} JSON object */ - BeginResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginResponse; - })(); - - query.CommitRequest = (function() { + VEvent.prototype.journal = null; /** - * Properties of a CommitRequest. - * @memberof query - * @interface ICommitRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitRequest immediate_caller_id - * @property {query.ITarget|null} [target] CommitRequest target - * @property {number|Long|null} [transaction_id] CommitRequest transaction_id + * VEvent dml. + * @member {string} dml + * @memberof binlogdata.VEvent + * @instance */ + VEvent.prototype.dml = ""; /** - * Constructs a new CommitRequest. - * @memberof query - * @classdesc Represents a CommitRequest. - * @implements ICommitRequest - * @constructor - * @param {query.ICommitRequest=} [properties] Properties to set + * VEvent current_time. + * @member {number|Long} current_time + * @memberof binlogdata.VEvent + * @instance */ - function CommitRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + VEvent.prototype.current_time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CommitRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CommitRequest + * VEvent last_p_k_event. + * @member {binlogdata.ILastPKEvent|null|undefined} last_p_k_event + * @memberof binlogdata.VEvent * @instance */ - CommitRequest.prototype.effective_caller_id = null; + VEvent.prototype.last_p_k_event = null; /** - * CommitRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CommitRequest + * VEvent keyspace. + * @member {string} keyspace + * @memberof binlogdata.VEvent * @instance */ - CommitRequest.prototype.immediate_caller_id = null; + VEvent.prototype.keyspace = ""; /** - * CommitRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CommitRequest + * VEvent shard. + * @member {string} shard + * @memberof binlogdata.VEvent * @instance */ - CommitRequest.prototype.target = null; + VEvent.prototype.shard = ""; /** - * CommitRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.CommitRequest + * VEvent throttled. + * @member {boolean} throttled + * @memberof binlogdata.VEvent * @instance */ - CommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VEvent.prototype.throttled = false; /** - * Creates a new CommitRequest instance using the specified properties. + * Creates a new VEvent instance using the specified properties. * @function create - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static - * @param {query.ICommitRequest=} [properties] Properties to set - * @returns {query.CommitRequest} CommitRequest instance + * @param {binlogdata.IVEvent=} [properties] Properties to set + * @returns {binlogdata.VEvent} VEvent instance */ - CommitRequest.create = function create(properties) { - return new CommitRequest(properties); + VEvent.create = function create(properties) { + return new VEvent(properties); }; /** - * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. + * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. * @function encode - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static - * @param {query.ICommitRequest} message CommitRequest message or plain object to encode + * @param {binlogdata.IVEvent} message VEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitRequest.encode = function encode(message, writer) { + VEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); + if (message.statement != null && Object.hasOwnProperty.call(message, "statement")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.statement); + if (message.row_event != null && Object.hasOwnProperty.call(message, "row_event")) + $root.binlogdata.RowEvent.encode(message.row_event, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.field_event != null && Object.hasOwnProperty.call(message, "field_event")) + $root.binlogdata.FieldEvent.encode(message.field_event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.vgtid != null && Object.hasOwnProperty.call(message, "vgtid")) + $root.binlogdata.VGtid.encode(message.vgtid, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.journal != null && Object.hasOwnProperty.call(message, "journal")) + $root.binlogdata.Journal.encode(message.journal, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dml != null && Object.hasOwnProperty.call(message, "dml")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dml); + if (message.current_time != null && Object.hasOwnProperty.call(message, "current_time")) + writer.uint32(/* id 20, wireType 0 =*/160).int64(message.current_time); + if (message.last_p_k_event != null && Object.hasOwnProperty.call(message, "last_p_k_event")) + $root.binlogdata.LastPKEvent.encode(message.last_p_k_event, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.shard); + if (message.throttled != null && Object.hasOwnProperty.call(message, "throttled")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.throttled); return writer; }; /** - * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. + * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. * @function encodeDelimited - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static - * @param {query.ICommitRequest} message CommitRequest message or plain object to encode + * @param {binlogdata.IVEvent} message VEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitRequest.encodeDelimited = function encodeDelimited(message, writer) { + VEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommitRequest message from the specified reader or buffer. + * Decodes a VEvent message from the specified reader or buffer. * @function decode - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CommitRequest} CommitRequest + * @returns {binlogdata.VEvent} VEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitRequest.decode = function decode(reader, length) { + VEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.type = reader.int32(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + message.timestamp = reader.int64(); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); + message.gtid = reader.string(); break; case 4: - message.transaction_id = reader.int64(); + message.statement = reader.string(); + break; + case 5: + message.row_event = $root.binlogdata.RowEvent.decode(reader, reader.uint32()); + break; + case 6: + message.field_event = $root.binlogdata.FieldEvent.decode(reader, reader.uint32()); + break; + case 7: + message.vgtid = $root.binlogdata.VGtid.decode(reader, reader.uint32()); + break; + case 8: + message.journal = $root.binlogdata.Journal.decode(reader, reader.uint32()); + break; + case 9: + message.dml = reader.string(); + break; + case 20: + message.current_time = reader.int64(); + break; + case 21: + message.last_p_k_event = $root.binlogdata.LastPKEvent.decode(reader, reader.uint32()); + break; + case 22: + message.keyspace = reader.string(); + break; + case 23: + message.shard = reader.string(); + break; + case 24: + message.throttled = reader.bool(); break; default: reader.skipType(tag & 7); @@ -62477,161 +61265,377 @@ $root.query = (function() { }; /** - * Decodes a CommitRequest message from the specified reader or buffer, length delimited. + * Decodes a VEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitRequest} CommitRequest + * @returns {binlogdata.VEvent} VEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitRequest.decodeDelimited = function decodeDelimited(reader) { + VEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommitRequest message. + * Verifies a VEvent message. * @function verify - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommitRequest.verify = function verify(message) { + VEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + break; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + if (message.gtid != null && message.hasOwnProperty("gtid")) + if (!$util.isString(message.gtid)) + return "gtid: string expected"; + if (message.statement != null && message.hasOwnProperty("statement")) + if (!$util.isString(message.statement)) + return "statement: string expected"; + if (message.row_event != null && message.hasOwnProperty("row_event")) { + var error = $root.binlogdata.RowEvent.verify(message.row_event); if (error) - return "target." + error; + return "row_event." + error; } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; + if (message.field_event != null && message.hasOwnProperty("field_event")) { + var error = $root.binlogdata.FieldEvent.verify(message.field_event); + if (error) + return "field_event." + error; + } + if (message.vgtid != null && message.hasOwnProperty("vgtid")) { + var error = $root.binlogdata.VGtid.verify(message.vgtid); + if (error) + return "vgtid." + error; + } + if (message.journal != null && message.hasOwnProperty("journal")) { + var error = $root.binlogdata.Journal.verify(message.journal); + if (error) + return "journal." + error; + } + if (message.dml != null && message.hasOwnProperty("dml")) + if (!$util.isString(message.dml)) + return "dml: string expected"; + if (message.current_time != null && message.hasOwnProperty("current_time")) + if (!$util.isInteger(message.current_time) && !(message.current_time && $util.isInteger(message.current_time.low) && $util.isInteger(message.current_time.high))) + return "current_time: integer|Long expected"; + if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) { + var error = $root.binlogdata.LastPKEvent.verify(message.last_p_k_event); + if (error) + return "last_p_k_event." + error; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.throttled != null && message.hasOwnProperty("throttled")) + if (typeof message.throttled !== "boolean") + return "throttled: boolean expected"; return null; }; /** - * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static * @param {Object.} object Plain object - * @returns {query.CommitRequest} CommitRequest + * @returns {binlogdata.VEvent} VEvent */ - CommitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitRequest) + VEvent.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VEvent) return object; - var message = new $root.query.CommitRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CommitRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + var message = new $root.binlogdata.VEvent(); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "GTID": + case 1: + message.type = 1; + break; + case "BEGIN": + case 2: + message.type = 2; + break; + case "COMMIT": + case 3: + message.type = 3; + break; + case "ROLLBACK": + case 4: + message.type = 4; + break; + case "DDL": + case 5: + message.type = 5; + break; + case "INSERT": + case 6: + message.type = 6; + break; + case "REPLACE": + case 7: + message.type = 7; + break; + case "UPDATE": + case 8: + message.type = 8; + break; + case "DELETE": + case 9: + message.type = 9; + break; + case "SET": + case 10: + message.type = 10; + break; + case "OTHER": + case 11: + message.type = 11; + break; + case "ROW": + case 12: + message.type = 12; + break; + case "FIELD": + case 13: + message.type = 13; + break; + case "HEARTBEAT": + case 14: + message.type = 14; + break; + case "VGTID": + case 15: + message.type = 15; + break; + case "JOURNAL": + case 16: + message.type = 16; + break; + case "VERSION": + case 17: + message.type = 17; + break; + case "LASTPK": + case 18: + message.type = 18; + break; + case "SAVEPOINT": + case 19: + message.type = 19; + break; + case "COPY_COMPLETED": + case 20: + message.type = 20; + break; } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CommitRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + if (object.gtid != null) + message.gtid = String(object.gtid); + if (object.statement != null) + message.statement = String(object.statement); + if (object.row_event != null) { + if (typeof object.row_event !== "object") + throw TypeError(".binlogdata.VEvent.row_event: object expected"); + message.row_event = $root.binlogdata.RowEvent.fromObject(object.row_event); } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CommitRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + if (object.field_event != null) { + if (typeof object.field_event !== "object") + throw TypeError(".binlogdata.VEvent.field_event: object expected"); + message.field_event = $root.binlogdata.FieldEvent.fromObject(object.field_event); } - if (object.transaction_id != null) + if (object.vgtid != null) { + if (typeof object.vgtid !== "object") + throw TypeError(".binlogdata.VEvent.vgtid: object expected"); + message.vgtid = $root.binlogdata.VGtid.fromObject(object.vgtid); + } + if (object.journal != null) { + if (typeof object.journal !== "object") + throw TypeError(".binlogdata.VEvent.journal: object expected"); + message.journal = $root.binlogdata.Journal.fromObject(object.journal); + } + if (object.dml != null) + message.dml = String(object.dml); + if (object.current_time != null) if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + (message.current_time = $util.Long.fromValue(object.current_time)).unsigned = false; + else if (typeof object.current_time === "string") + message.current_time = parseInt(object.current_time, 10); + else if (typeof object.current_time === "number") + message.current_time = object.current_time; + else if (typeof object.current_time === "object") + message.current_time = new $util.LongBits(object.current_time.low >>> 0, object.current_time.high >>> 0).toNumber(); + if (object.last_p_k_event != null) { + if (typeof object.last_p_k_event !== "object") + throw TypeError(".binlogdata.VEvent.last_p_k_event: object expected"); + message.last_p_k_event = $root.binlogdata.LastPKEvent.fromObject(object.last_p_k_event); + } + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.throttled != null) + message.throttled = Boolean(object.throttled); return message; }; /** - * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. + * Creates a plain object from a VEvent message. Also converts values to other types if specified. * @function toObject - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @static - * @param {query.CommitRequest} message CommitRequest + * @param {binlogdata.VEvent} message VEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitRequest.toObject = function toObject(message, options) { + VEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; + object.type = options.enums === String ? "UNKNOWN" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.transaction_id = options.longs === String ? "0" : 0; + object.timestamp = options.longs === String ? "0" : 0; + object.gtid = ""; + object.statement = ""; + object.row_event = null; + object.field_event = null; + object.vgtid = null; + object.journal = null; + object.dml = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.current_time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.current_time = options.longs === String ? "0" : 0; + object.last_p_k_event = null; + object.keyspace = ""; + object.shard = ""; + object.throttled = false; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.binlogdata.VEventType[message.type] : message.type; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.gtid != null && message.hasOwnProperty("gtid")) + object.gtid = message.gtid; + if (message.statement != null && message.hasOwnProperty("statement")) + object.statement = message.statement; + if (message.row_event != null && message.hasOwnProperty("row_event")) + object.row_event = $root.binlogdata.RowEvent.toObject(message.row_event, options); + if (message.field_event != null && message.hasOwnProperty("field_event")) + object.field_event = $root.binlogdata.FieldEvent.toObject(message.field_event, options); + if (message.vgtid != null && message.hasOwnProperty("vgtid")) + object.vgtid = $root.binlogdata.VGtid.toObject(message.vgtid, options); + if (message.journal != null && message.hasOwnProperty("journal")) + object.journal = $root.binlogdata.Journal.toObject(message.journal, options); + if (message.dml != null && message.hasOwnProperty("dml")) + object.dml = message.dml; + if (message.current_time != null && message.hasOwnProperty("current_time")) + if (typeof message.current_time === "number") + object.current_time = options.longs === String ? String(message.current_time) : message.current_time; + else + object.current_time = options.longs === String ? $util.Long.prototype.toString.call(message.current_time) : options.longs === Number ? new $util.LongBits(message.current_time.low >>> 0, message.current_time.high >>> 0).toNumber() : message.current_time; + if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) + object.last_p_k_event = $root.binlogdata.LastPKEvent.toObject(message.last_p_k_event, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.throttled != null && message.hasOwnProperty("throttled")) + object.throttled = message.throttled; return object; }; /** - * Converts this CommitRequest to JSON. + * Converts this VEvent to JSON. * @function toJSON - * @memberof query.CommitRequest + * @memberof binlogdata.VEvent * @instance * @returns {Object.} JSON object */ - CommitRequest.prototype.toJSON = function toJSON() { + VEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitRequest; + return VEvent; })(); - query.CommitResponse = (function() { + binlogdata.MinimalTable = (function() { /** - * Properties of a CommitResponse. - * @memberof query - * @interface ICommitResponse - * @property {number|Long|null} [reserved_id] CommitResponse reserved_id + * Properties of a MinimalTable. + * @memberof binlogdata + * @interface IMinimalTable + * @property {string|null} [name] MinimalTable name + * @property {Array.|null} [fields] MinimalTable fields + * @property {Array.|null} [p_k_columns] MinimalTable p_k_columns */ /** - * Constructs a new CommitResponse. - * @memberof query - * @classdesc Represents a CommitResponse. - * @implements ICommitResponse + * Constructs a new MinimalTable. + * @memberof binlogdata + * @classdesc Represents a MinimalTable. + * @implements IMinimalTable * @constructor - * @param {query.ICommitResponse=} [properties] Properties to set + * @param {binlogdata.IMinimalTable=} [properties] Properties to set */ - function CommitResponse(properties) { + function MinimalTable(properties) { + this.fields = []; + this.p_k_columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62639,75 +61643,115 @@ $root.query = (function() { } /** - * CommitResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.CommitResponse + * MinimalTable name. + * @member {string} name + * @memberof binlogdata.MinimalTable * @instance */ - CommitResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MinimalTable.prototype.name = ""; /** - * Creates a new CommitResponse instance using the specified properties. + * MinimalTable fields. + * @member {Array.} fields + * @memberof binlogdata.MinimalTable + * @instance + */ + MinimalTable.prototype.fields = $util.emptyArray; + + /** + * MinimalTable p_k_columns. + * @member {Array.} p_k_columns + * @memberof binlogdata.MinimalTable + * @instance + */ + MinimalTable.prototype.p_k_columns = $util.emptyArray; + + /** + * Creates a new MinimalTable instance using the specified properties. * @function create - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static - * @param {query.ICommitResponse=} [properties] Properties to set - * @returns {query.CommitResponse} CommitResponse instance + * @param {binlogdata.IMinimalTable=} [properties] Properties to set + * @returns {binlogdata.MinimalTable} MinimalTable instance */ - CommitResponse.create = function create(properties) { - return new CommitResponse(properties); + MinimalTable.create = function create(properties) { + return new MinimalTable(properties); }; /** - * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. * @function encode - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static - * @param {query.ICommitResponse} message CommitResponse message or plain object to encode + * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitResponse.encode = function encode(message, writer) { + MinimalTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.p_k_columns != null && message.p_k_columns.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.p_k_columns.length; ++i) + writer.int64(message.p_k_columns[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. * @function encodeDelimited - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static - * @param {query.ICommitResponse} message CommitResponse message or plain object to encode + * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitResponse.encodeDelimited = function encodeDelimited(message, writer) { + MinimalTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommitResponse message from the specified reader or buffer. + * Decodes a MinimalTable message from the specified reader or buffer. * @function decode - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CommitResponse} CommitResponse + * @returns {binlogdata.MinimalTable} MinimalTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitResponse.decode = function decode(reader, length) { + MinimalTable.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalTable(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.reserved_id = reader.int64(); + message.name = reader.string(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.query.Field.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.p_k_columns && message.p_k_columns.length)) + message.p_k_columns = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.p_k_columns.push(reader.int64()); + } else + message.p_k_columns.push(reader.int64()); break; default: reader.skipType(tag & 7); @@ -62718,124 +61762,165 @@ $root.query = (function() { }; /** - * Decodes a CommitResponse message from the specified reader or buffer, length delimited. + * Decodes a MinimalTable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitResponse} CommitResponse + * @returns {binlogdata.MinimalTable} MinimalTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitResponse.decodeDelimited = function decodeDelimited(reader) { + MinimalTable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommitResponse message. + * Verifies a MinimalTable message. * @function verify - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommitResponse.verify = function verify(message) { + MinimalTable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.query.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.p_k_columns != null && message.hasOwnProperty("p_k_columns")) { + if (!Array.isArray(message.p_k_columns)) + return "p_k_columns: array expected"; + for (var i = 0; i < message.p_k_columns.length; ++i) + if (!$util.isInteger(message.p_k_columns[i]) && !(message.p_k_columns[i] && $util.isInteger(message.p_k_columns[i].low) && $util.isInteger(message.p_k_columns[i].high))) + return "p_k_columns: integer|Long[] expected"; + } return null; }; /** - * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @static * @param {Object.} object Plain object - * @returns {query.CommitResponse} CommitResponse + * @returns {binlogdata.MinimalTable} MinimalTable */ - CommitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitResponse) + MinimalTable.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.MinimalTable) return object; - var message = new $root.query.CommitResponse(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CommitResponse - * @static - * @param {query.CommitResponse} message CommitResponse + var message = new $root.binlogdata.MinimalTable(); + if (object.name != null) + message.name = String(object.name); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".binlogdata.MinimalTable.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".binlogdata.MinimalTable.fields: object expected"); + message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + } + } + if (object.p_k_columns) { + if (!Array.isArray(object.p_k_columns)) + throw TypeError(".binlogdata.MinimalTable.p_k_columns: array expected"); + message.p_k_columns = []; + for (var i = 0; i < object.p_k_columns.length; ++i) + if ($util.Long) + (message.p_k_columns[i] = $util.Long.fromValue(object.p_k_columns[i])).unsigned = false; + else if (typeof object.p_k_columns[i] === "string") + message.p_k_columns[i] = parseInt(object.p_k_columns[i], 10); + else if (typeof object.p_k_columns[i] === "number") + message.p_k_columns[i] = object.p_k_columns[i]; + else if (typeof object.p_k_columns[i] === "object") + message.p_k_columns[i] = new $util.LongBits(object.p_k_columns[i].low >>> 0, object.p_k_columns[i].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. + * @function toObject + * @memberof binlogdata.MinimalTable + * @static + * @param {binlogdata.MinimalTable} message MinimalTable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitResponse.toObject = function toObject(message, options) { + MinimalTable.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.p_k_columns = []; + } if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + } + if (message.p_k_columns && message.p_k_columns.length) { + object.p_k_columns = []; + for (var j = 0; j < message.p_k_columns.length; ++j) + if (typeof message.p_k_columns[j] === "number") + object.p_k_columns[j] = options.longs === String ? String(message.p_k_columns[j]) : message.p_k_columns[j]; + else + object.p_k_columns[j] = options.longs === String ? $util.Long.prototype.toString.call(message.p_k_columns[j]) : options.longs === Number ? new $util.LongBits(message.p_k_columns[j].low >>> 0, message.p_k_columns[j].high >>> 0).toNumber() : message.p_k_columns[j]; + } return object; }; /** - * Converts this CommitResponse to JSON. + * Converts this MinimalTable to JSON. * @function toJSON - * @memberof query.CommitResponse + * @memberof binlogdata.MinimalTable * @instance * @returns {Object.} JSON object */ - CommitResponse.prototype.toJSON = function toJSON() { + MinimalTable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitResponse; + return MinimalTable; })(); - query.RollbackRequest = (function() { + binlogdata.MinimalSchema = (function() { /** - * Properties of a RollbackRequest. - * @memberof query - * @interface IRollbackRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackRequest immediate_caller_id - * @property {query.ITarget|null} [target] RollbackRequest target - * @property {number|Long|null} [transaction_id] RollbackRequest transaction_id + * Properties of a MinimalSchema. + * @memberof binlogdata + * @interface IMinimalSchema + * @property {Array.|null} [tables] MinimalSchema tables */ /** - * Constructs a new RollbackRequest. - * @memberof query - * @classdesc Represents a RollbackRequest. - * @implements IRollbackRequest + * Constructs a new MinimalSchema. + * @memberof binlogdata + * @classdesc Represents a MinimalSchema. + * @implements IMinimalSchema * @constructor - * @param {query.IRollbackRequest=} [properties] Properties to set + * @param {binlogdata.IMinimalSchema=} [properties] Properties to set */ - function RollbackRequest(properties) { + function MinimalSchema(properties) { + this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62843,114 +61928,78 @@ $root.query = (function() { } /** - * RollbackRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.effective_caller_id = null; - - /** - * RollbackRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.immediate_caller_id = null; - - /** - * RollbackRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.target = null; - - /** - * RollbackRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.RollbackRequest + * MinimalSchema tables. + * @member {Array.} tables + * @memberof binlogdata.MinimalSchema * @instance */ - RollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MinimalSchema.prototype.tables = $util.emptyArray; /** - * Creates a new RollbackRequest instance using the specified properties. + * Creates a new MinimalSchema instance using the specified properties. * @function create - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static - * @param {query.IRollbackRequest=} [properties] Properties to set - * @returns {query.RollbackRequest} RollbackRequest instance + * @param {binlogdata.IMinimalSchema=} [properties] Properties to set + * @returns {binlogdata.MinimalSchema} MinimalSchema instance */ - RollbackRequest.create = function create(properties) { - return new RollbackRequest(properties); + MinimalSchema.create = function create(properties) { + return new MinimalSchema(properties); }; /** - * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. + * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. * @function encode - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static - * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode + * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackRequest.encode = function encode(message, writer) { + MinimalSchema.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + $root.binlogdata.MinimalTable.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. + * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. * @function encodeDelimited - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static - * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode + * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { + MinimalSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RollbackRequest message from the specified reader or buffer. + * Decodes a MinimalSchema message from the specified reader or buffer. * @function decode - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackRequest} RollbackRequest + * @returns {binlogdata.MinimalSchema} MinimalSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackRequest.decode = function decode(reader, length) { + MinimalSchema.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalSchema(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push($root.binlogdata.MinimalTable.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -62961,161 +62010,130 @@ $root.query = (function() { }; /** - * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. + * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackRequest} RollbackRequest + * @returns {binlogdata.MinimalSchema} MinimalSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackRequest.decodeDelimited = function decodeDelimited(reader) { + MinimalSchema.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RollbackRequest message. + * Verifies a MinimalSchema message. * @function verify - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RollbackRequest.verify = function verify(message) { + MinimalSchema.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) { + var error = $root.binlogdata.MinimalTable.verify(message.tables[i]); + if (error) + return "tables." + error; + } } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; return null; }; /** - * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static * @param {Object.} object Plain object - * @returns {query.RollbackRequest} RollbackRequest + * @returns {binlogdata.MinimalSchema} MinimalSchema */ - RollbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackRequest) + MinimalSchema.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.MinimalSchema) return object; - var message = new $root.query.RollbackRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.RollbackRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.RollbackRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.RollbackRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.binlogdata.MinimalSchema(); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".binlogdata.MinimalSchema.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) { + if (typeof object.tables[i] !== "object") + throw TypeError(".binlogdata.MinimalSchema.tables: object expected"); + message.tables[i] = $root.binlogdata.MinimalTable.fromObject(object.tables[i]); + } } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. + * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. * @function toObject - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @static - * @param {query.RollbackRequest} message RollbackRequest + * @param {binlogdata.MinimalSchema} message MinimalSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RollbackRequest.toObject = function toObject(message, options) { + MinimalSchema.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.tables = []; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = $root.binlogdata.MinimalTable.toObject(message.tables[j], options); } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; return object; }; /** - * Converts this RollbackRequest to JSON. + * Converts this MinimalSchema to JSON. * @function toJSON - * @memberof query.RollbackRequest + * @memberof binlogdata.MinimalSchema * @instance * @returns {Object.} JSON object */ - RollbackRequest.prototype.toJSON = function toJSON() { + MinimalSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RollbackRequest; + return MinimalSchema; })(); - query.RollbackResponse = (function() { + binlogdata.VStreamRequest = (function() { /** - * Properties of a RollbackResponse. - * @memberof query - * @interface IRollbackResponse - * @property {number|Long|null} [reserved_id] RollbackResponse reserved_id + * Properties of a VStreamRequest. + * @memberof binlogdata + * @interface IVStreamRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRequest immediate_caller_id + * @property {query.ITarget|null} [target] VStreamRequest target + * @property {string|null} [position] VStreamRequest position + * @property {binlogdata.IFilter|null} [filter] VStreamRequest filter + * @property {Array.|null} [table_last_p_ks] VStreamRequest table_last_p_ks */ /** - * Constructs a new RollbackResponse. - * @memberof query - * @classdesc Represents a RollbackResponse. - * @implements IRollbackResponse + * Constructs a new VStreamRequest. + * @memberof binlogdata + * @classdesc Represents a VStreamRequest. + * @implements IVStreamRequest * @constructor - * @param {query.IRollbackResponse=} [properties] Properties to set + * @param {binlogdata.IVStreamRequest=} [properties] Properties to set */ - function RollbackResponse(properties) { + function VStreamRequest(properties) { + this.table_last_p_ks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63123,75 +62141,143 @@ $root.query = (function() { } /** - * RollbackResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.RollbackResponse + * VStreamRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof binlogdata.VStreamRequest * @instance */ - RollbackResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VStreamRequest.prototype.effective_caller_id = null; /** - * Creates a new RollbackResponse instance using the specified properties. + * VStreamRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof binlogdata.VStreamRequest + * @instance + */ + VStreamRequest.prototype.immediate_caller_id = null; + + /** + * VStreamRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof binlogdata.VStreamRequest + * @instance + */ + VStreamRequest.prototype.target = null; + + /** + * VStreamRequest position. + * @member {string} position + * @memberof binlogdata.VStreamRequest + * @instance + */ + VStreamRequest.prototype.position = ""; + + /** + * VStreamRequest filter. + * @member {binlogdata.IFilter|null|undefined} filter + * @memberof binlogdata.VStreamRequest + * @instance + */ + VStreamRequest.prototype.filter = null; + + /** + * VStreamRequest table_last_p_ks. + * @member {Array.} table_last_p_ks + * @memberof binlogdata.VStreamRequest + * @instance + */ + VStreamRequest.prototype.table_last_p_ks = $util.emptyArray; + + /** + * Creates a new VStreamRequest instance using the specified properties. * @function create - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static - * @param {query.IRollbackResponse=} [properties] Properties to set - * @returns {query.RollbackResponse} RollbackResponse instance + * @param {binlogdata.IVStreamRequest=} [properties] Properties to set + * @returns {binlogdata.VStreamRequest} VStreamRequest instance */ - RollbackResponse.create = function create(properties) { - return new RollbackResponse(properties); + VStreamRequest.create = function create(properties) { + return new VStreamRequest(properties); }; /** - * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. + * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. * @function encode - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static - * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode + * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackResponse.encode = function encode(message, writer) { + VStreamRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.position); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.table_last_p_ks != null && message.table_last_p_ks.length) + for (var i = 0; i < message.table_last_p_ks.length; ++i) + $root.binlogdata.TableLastPK.encode(message.table_last_p_ks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. + * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static - * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode + * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { + VStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RollbackResponse message from the specified reader or buffer. + * Decodes a VStreamRequest message from the specified reader or buffer. * @function decode - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackResponse} RollbackResponse + * @returns {binlogdata.VStreamRequest} VStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackResponse.decode = function decode(reader, length) { + VStreamRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.reserved_id = reader.int64(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.position = reader.string(); + break; + case 5: + message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.table_last_p_ks && message.table_last_p_ks.length)) + message.table_last_p_ks = []; + message.table_last_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -63202,125 +62288,187 @@ $root.query = (function() { }; /** - * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackResponse} RollbackResponse + * @returns {binlogdata.VStreamRequest} VStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackResponse.decodeDelimited = function decodeDelimited(reader) { + VStreamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RollbackResponse message. + * Verifies a VStreamRequest message. * @function verify - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RollbackResponse.verify = function verify(message) { + VStreamRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - return null; - }; - - /** - * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RollbackResponse - * @static - * @param {Object.} object Plain object - * @returns {query.RollbackResponse} RollbackResponse - */ - RollbackResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackResponse) - return object; - var message = new $root.query.RollbackResponse(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.binlogdata.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.table_last_p_ks != null && message.hasOwnProperty("table_last_p_ks")) { + if (!Array.isArray(message.table_last_p_ks)) + return "table_last_p_ks: array expected"; + for (var i = 0; i < message.table_last_p_ks.length; ++i) { + var error = $root.binlogdata.TableLastPK.verify(message.table_last_p_ks[i]); + if (error) + return "table_last_p_ks." + error; + } + } + return null; }; /** - * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. + * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof binlogdata.VStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {binlogdata.VStreamRequest} VStreamRequest + */ + VStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamRequest) + return object; + var message = new $root.binlogdata.VStreamRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".binlogdata.VStreamRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".binlogdata.VStreamRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".binlogdata.VStreamRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.position != null) + message.position = String(object.position); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".binlogdata.VStreamRequest.filter: object expected"); + message.filter = $root.binlogdata.Filter.fromObject(object.filter); + } + if (object.table_last_p_ks) { + if (!Array.isArray(object.table_last_p_ks)) + throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: array expected"); + message.table_last_p_ks = []; + for (var i = 0; i < object.table_last_p_ks.length; ++i) { + if (typeof object.table_last_p_ks[i] !== "object") + throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: object expected"); + message.table_last_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_last_p_ks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @static - * @param {query.RollbackResponse} message RollbackResponse + * @param {binlogdata.VStreamRequest} message VStreamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RollbackResponse.toObject = function toObject(message, options) { + VStreamRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (options.arrays || options.defaults) + object.table_last_p_ks = []; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.position = ""; + object.filter = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.binlogdata.Filter.toObject(message.filter, options); + if (message.table_last_p_ks && message.table_last_p_ks.length) { + object.table_last_p_ks = []; + for (var j = 0; j < message.table_last_p_ks.length; ++j) + object.table_last_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_last_p_ks[j], options); + } return object; }; /** - * Converts this RollbackResponse to JSON. + * Converts this VStreamRequest to JSON. * @function toJSON - * @memberof query.RollbackResponse + * @memberof binlogdata.VStreamRequest * @instance * @returns {Object.} JSON object */ - RollbackResponse.prototype.toJSON = function toJSON() { + VStreamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RollbackResponse; + return VStreamRequest; })(); - query.PrepareRequest = (function() { + binlogdata.VStreamResponse = (function() { /** - * Properties of a PrepareRequest. - * @memberof query - * @interface IPrepareRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] PrepareRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] PrepareRequest immediate_caller_id - * @property {query.ITarget|null} [target] PrepareRequest target - * @property {number|Long|null} [transaction_id] PrepareRequest transaction_id - * @property {string|null} [dtid] PrepareRequest dtid + * Properties of a VStreamResponse. + * @memberof binlogdata + * @interface IVStreamResponse + * @property {Array.|null} [events] VStreamResponse events */ /** - * Constructs a new PrepareRequest. - * @memberof query - * @classdesc Represents a PrepareRequest. - * @implements IPrepareRequest + * Constructs a new VStreamResponse. + * @memberof binlogdata + * @classdesc Represents a VStreamResponse. + * @implements IVStreamResponse * @constructor - * @param {query.IPrepareRequest=} [properties] Properties to set + * @param {binlogdata.IVStreamResponse=} [properties] Properties to set */ - function PrepareRequest(properties) { + function VStreamResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63328,127 +62476,78 @@ $root.query = (function() { } /** - * PrepareRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.effective_caller_id = null; - - /** - * PrepareRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.immediate_caller_id = null; - - /** - * PrepareRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.target = null; - - /** - * PrepareRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PrepareRequest dtid. - * @member {string} dtid - * @memberof query.PrepareRequest + * VStreamResponse events. + * @member {Array.} events + * @memberof binlogdata.VStreamResponse * @instance */ - PrepareRequest.prototype.dtid = ""; + VStreamResponse.prototype.events = $util.emptyArray; /** - * Creates a new PrepareRequest instance using the specified properties. + * Creates a new VStreamResponse instance using the specified properties. * @function create - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static - * @param {query.IPrepareRequest=} [properties] Properties to set - * @returns {query.PrepareRequest} PrepareRequest instance + * @param {binlogdata.IVStreamResponse=} [properties] Properties to set + * @returns {binlogdata.VStreamResponse} VStreamResponse instance */ - PrepareRequest.create = function create(properties) { - return new PrepareRequest(properties); + VStreamResponse.create = function create(properties) { + return new VStreamResponse(properties); }; /** - * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. + * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. * @function encode - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static - * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode + * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareRequest.encode = function encode(message, writer) { + VStreamResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.binlogdata.VEvent.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. + * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static - * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode + * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareRequest.encodeDelimited = function encodeDelimited(message, writer) { + VStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrepareRequest message from the specified reader or buffer. + * Decodes a VStreamResponse message from the specified reader or buffer. * @function decode - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.PrepareRequest} PrepareRequest + * @returns {binlogdata.VStreamResponse} VStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrepareRequest.decode = function decode(reader, length) { + VStreamResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.binlogdata.VEvent.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -63459,168 +62558,128 @@ $root.query = (function() { }; /** - * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.PrepareRequest} PrepareRequest + * @returns {binlogdata.VStreamResponse} VStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrepareRequest.decodeDelimited = function decodeDelimited(reader) { + VStreamResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrepareRequest message. + * Verifies a VStreamResponse message. * @function verify - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrepareRequest.verify = function verify(message) { + VStreamResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.binlogdata.VEvent.verify(message.events[i]); + if (error) + return "events." + error; + } } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; return null; }; /** - * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static * @param {Object.} object Plain object - * @returns {query.PrepareRequest} PrepareRequest + * @returns {binlogdata.VStreamResponse} VStreamResponse */ - PrepareRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.PrepareRequest) + VStreamResponse.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamResponse) return object; - var message = new $root.query.PrepareRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.PrepareRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.PrepareRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.PrepareRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.binlogdata.VStreamResponse(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".binlogdata.VStreamResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".binlogdata.VStreamResponse.events: object expected"); + message.events[i] = $root.binlogdata.VEvent.fromObject(object.events[i]); + } } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. + * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @static - * @param {query.PrepareRequest} message PrepareRequest + * @param {binlogdata.VStreamResponse} message VStreamResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrepareRequest.toObject = function toObject(message, options) { + VStreamResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.binlogdata.VEvent.toObject(message.events[j], options); } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; return object; }; /** - * Converts this PrepareRequest to JSON. + * Converts this VStreamResponse to JSON. * @function toJSON - * @memberof query.PrepareRequest + * @memberof binlogdata.VStreamResponse * @instance * @returns {Object.} JSON object */ - PrepareRequest.prototype.toJSON = function toJSON() { + VStreamResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PrepareRequest; + return VStreamResponse; })(); - query.PrepareResponse = (function() { + binlogdata.VStreamRowsRequest = (function() { /** - * Properties of a PrepareResponse. - * @memberof query - * @interface IPrepareResponse + * Properties of a VStreamRowsRequest. + * @memberof binlogdata + * @interface IVStreamRowsRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRowsRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRowsRequest immediate_caller_id + * @property {query.ITarget|null} [target] VStreamRowsRequest target + * @property {string|null} [query] VStreamRowsRequest query + * @property {query.IQueryResult|null} [lastpk] VStreamRowsRequest lastpk */ /** - * Constructs a new PrepareResponse. - * @memberof query - * @classdesc Represents a PrepareResponse. - * @implements IPrepareResponse + * Constructs a new VStreamRowsRequest. + * @memberof binlogdata + * @classdesc Represents a VStreamRowsRequest. + * @implements IVStreamRowsRequest * @constructor - * @param {query.IPrepareResponse=} [properties] Properties to set + * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set */ - function PrepareResponse(properties) { + function VStreamRowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63628,64 +62687,129 @@ $root.query = (function() { } /** - * Creates a new PrepareResponse instance using the specified properties. + * VStreamRowsRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof binlogdata.VStreamRowsRequest + * @instance + */ + VStreamRowsRequest.prototype.effective_caller_id = null; + + /** + * VStreamRowsRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof binlogdata.VStreamRowsRequest + * @instance + */ + VStreamRowsRequest.prototype.immediate_caller_id = null; + + /** + * VStreamRowsRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof binlogdata.VStreamRowsRequest + * @instance + */ + VStreamRowsRequest.prototype.target = null; + + /** + * VStreamRowsRequest query. + * @member {string} query + * @memberof binlogdata.VStreamRowsRequest + * @instance + */ + VStreamRowsRequest.prototype.query = ""; + + /** + * VStreamRowsRequest lastpk. + * @member {query.IQueryResult|null|undefined} lastpk + * @memberof binlogdata.VStreamRowsRequest + * @instance + */ + VStreamRowsRequest.prototype.lastpk = null; + + /** + * Creates a new VStreamRowsRequest instance using the specified properties. * @function create - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static - * @param {query.IPrepareResponse=} [properties] Properties to set - * @returns {query.PrepareResponse} PrepareResponse instance + * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set + * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest instance */ - PrepareResponse.create = function create(properties) { - return new PrepareResponse(properties); + VStreamRowsRequest.create = function create(properties) { + return new VStreamRowsRequest(properties); }; /** - * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. + * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. * @function encode - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static - * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode + * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareResponse.encode = function encode(message, writer) { + VStreamRowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); + if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) + $root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. + * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static - * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode + * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareResponse.encodeDelimited = function encodeDelimited(message, writer) { + VStreamRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrepareResponse message from the specified reader or buffer. + * Decodes a VStreamRowsRequest message from the specified reader or buffer. * @function decode - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.PrepareResponse} PrepareResponse + * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrepareResponse.decode = function decode(reader, length) { + VStreamRowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - default: + case 1: + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = reader.string(); + break; + case 5: + message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32()); + break; + default: reader.skipType(tag & 7); break; } @@ -63694,97 +62818,169 @@ $root.query = (function() { }; /** - * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.PrepareResponse} PrepareResponse + * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrepareResponse.decodeDelimited = function decodeDelimited(reader) { + VStreamRowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrepareResponse message. + * Verifies a VStreamRowsRequest message. * @function verify - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrepareResponse.verify = function verify(message) { + VStreamRowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.lastpk != null && message.hasOwnProperty("lastpk")) { + var error = $root.query.QueryResult.verify(message.lastpk); + if (error) + return "lastpk." + error; + } return null; }; /** - * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static * @param {Object.} object Plain object - * @returns {query.PrepareResponse} PrepareResponse + * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest */ - PrepareResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.PrepareResponse) + VStreamRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamRowsRequest) return object; - return new $root.query.PrepareResponse(); + var message = new $root.binlogdata.VStreamRowsRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".binlogdata.VStreamRowsRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".binlogdata.VStreamRowsRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".binlogdata.VStreamRowsRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) + message.query = String(object.query); + if (object.lastpk != null) { + if (typeof object.lastpk !== "object") + throw TypeError(".binlogdata.VStreamRowsRequest.lastpk: object expected"); + message.lastpk = $root.query.QueryResult.fromObject(object.lastpk); + } + return message; }; /** - * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. + * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @static - * @param {query.PrepareResponse} message PrepareResponse + * @param {binlogdata.VStreamRowsRequest} message VStreamRowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrepareResponse.toObject = function toObject() { - return {}; + VStreamRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = ""; + object.lastpk = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.lastpk != null && message.hasOwnProperty("lastpk")) + object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options); + return object; }; /** - * Converts this PrepareResponse to JSON. + * Converts this VStreamRowsRequest to JSON. * @function toJSON - * @memberof query.PrepareResponse + * @memberof binlogdata.VStreamRowsRequest * @instance * @returns {Object.} JSON object */ - PrepareResponse.prototype.toJSON = function toJSON() { + VStreamRowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PrepareResponse; + return VStreamRowsRequest; })(); - query.CommitPreparedRequest = (function() { + binlogdata.VStreamRowsResponse = (function() { /** - * Properties of a CommitPreparedRequest. - * @memberof query - * @interface ICommitPreparedRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitPreparedRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitPreparedRequest immediate_caller_id - * @property {query.ITarget|null} [target] CommitPreparedRequest target - * @property {string|null} [dtid] CommitPreparedRequest dtid + * Properties of a VStreamRowsResponse. + * @memberof binlogdata + * @interface IVStreamRowsResponse + * @property {Array.|null} [fields] VStreamRowsResponse fields + * @property {Array.|null} [pkfields] VStreamRowsResponse pkfields + * @property {string|null} [gtid] VStreamRowsResponse gtid + * @property {Array.|null} [rows] VStreamRowsResponse rows + * @property {query.IRow|null} [lastpk] VStreamRowsResponse lastpk + * @property {boolean|null} [throttled] VStreamRowsResponse throttled + * @property {boolean|null} [heartbeat] VStreamRowsResponse heartbeat */ /** - * Constructs a new CommitPreparedRequest. - * @memberof query - * @classdesc Represents a CommitPreparedRequest. - * @implements ICommitPreparedRequest + * Constructs a new VStreamRowsResponse. + * @memberof binlogdata + * @classdesc Represents a VStreamRowsResponse. + * @implements IVStreamRowsResponse * @constructor - * @param {query.ICommitPreparedRequest=} [properties] Properties to set + * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set */ - function CommitPreparedRequest(properties) { + function VStreamRowsResponse(properties) { + this.fields = []; + this.pkfields = []; + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63792,114 +62988,162 @@ $root.query = (function() { } /** - * CommitPreparedRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CommitPreparedRequest + * VStreamRowsResponse fields. + * @member {Array.} fields + * @memberof binlogdata.VStreamRowsResponse * @instance */ - CommitPreparedRequest.prototype.effective_caller_id = null; + VStreamRowsResponse.prototype.fields = $util.emptyArray; /** - * CommitPreparedRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CommitPreparedRequest + * VStreamRowsResponse pkfields. + * @member {Array.} pkfields + * @memberof binlogdata.VStreamRowsResponse * @instance */ - CommitPreparedRequest.prototype.immediate_caller_id = null; + VStreamRowsResponse.prototype.pkfields = $util.emptyArray; /** - * CommitPreparedRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CommitPreparedRequest + * VStreamRowsResponse gtid. + * @member {string} gtid + * @memberof binlogdata.VStreamRowsResponse * @instance */ - CommitPreparedRequest.prototype.target = null; + VStreamRowsResponse.prototype.gtid = ""; /** - * CommitPreparedRequest dtid. - * @member {string} dtid - * @memberof query.CommitPreparedRequest + * VStreamRowsResponse rows. + * @member {Array.} rows + * @memberof binlogdata.VStreamRowsResponse * @instance */ - CommitPreparedRequest.prototype.dtid = ""; + VStreamRowsResponse.prototype.rows = $util.emptyArray; /** - * Creates a new CommitPreparedRequest instance using the specified properties. + * VStreamRowsResponse lastpk. + * @member {query.IRow|null|undefined} lastpk + * @memberof binlogdata.VStreamRowsResponse + * @instance + */ + VStreamRowsResponse.prototype.lastpk = null; + + /** + * VStreamRowsResponse throttled. + * @member {boolean} throttled + * @memberof binlogdata.VStreamRowsResponse + * @instance + */ + VStreamRowsResponse.prototype.throttled = false; + + /** + * VStreamRowsResponse heartbeat. + * @member {boolean} heartbeat + * @memberof binlogdata.VStreamRowsResponse + * @instance + */ + VStreamRowsResponse.prototype.heartbeat = false; + + /** + * Creates a new VStreamRowsResponse instance using the specified properties. * @function create - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static - * @param {query.ICommitPreparedRequest=} [properties] Properties to set - * @returns {query.CommitPreparedRequest} CommitPreparedRequest instance + * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set + * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse instance */ - CommitPreparedRequest.create = function create(properties) { - return new CommitPreparedRequest(properties); + VStreamRowsResponse.create = function create(properties) { + return new VStreamRowsResponse(properties); }; /** - * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. + * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. * @function encode - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static - * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode + * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitPreparedRequest.encode = function encode(message, writer) { + VStreamRowsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pkfields != null && message.pkfields.length) + for (var i = 0; i < message.pkfields.length; ++i) + $root.query.Field.encode(message.pkfields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) + $root.query.Row.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.throttled != null && Object.hasOwnProperty.call(message, "throttled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.throttled); + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.heartbeat); return writer; }; /** - * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. + * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static - * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode + * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { + VStreamRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer. + * Decodes a VStreamRowsResponse message from the specified reader or buffer. * @function decode - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CommitPreparedRequest} CommitPreparedRequest + * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitPreparedRequest.decode = function decode(reader, length) { + VStreamRowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.query.Field.decode(reader, reader.uint32())); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + if (!(message.pkfields && message.pkfields.length)) + message.pkfields = []; + message.pkfields.push($root.query.Field.decode(reader, reader.uint32())); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); + message.gtid = reader.string(); break; case 4: - message.dtid = reader.string(); + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.query.Row.decode(reader, reader.uint32())); + break; + case 5: + message.lastpk = $root.query.Row.decode(reader, reader.uint32()); + break; + case 6: + message.throttled = reader.bool(); + break; + case 7: + message.heartbeat = reader.bool(); break; default: reader.skipType(tag & 7); @@ -63910,146 +63154,215 @@ $root.query = (function() { }; /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitPreparedRequest} CommitPreparedRequest + * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitPreparedRequest.decodeDelimited = function decodeDelimited(reader) { + VStreamRowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommitPreparedRequest message. + * Verifies a VStreamRowsResponse message. * @function verify - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommitPreparedRequest.verify = function verify(message) { + VStreamRowsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.query.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; + if (message.pkfields != null && message.hasOwnProperty("pkfields")) { + if (!Array.isArray(message.pkfields)) + return "pkfields: array expected"; + for (var i = 0; i < message.pkfields.length; ++i) { + var error = $root.query.Field.verify(message.pkfields[i]); + if (error) + return "pkfields." + error; + } } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); + if (message.gtid != null && message.hasOwnProperty("gtid")) + if (!$util.isString(message.gtid)) + return "gtid: string expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.query.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.lastpk != null && message.hasOwnProperty("lastpk")) { + var error = $root.query.Row.verify(message.lastpk); if (error) - return "target." + error; + return "lastpk." + error; } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; + if (message.throttled != null && message.hasOwnProperty("throttled")) + if (typeof message.throttled !== "boolean") + return "throttled: boolean expected"; + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) + if (typeof message.heartbeat !== "boolean") + return "heartbeat: boolean expected"; return null; }; /** - * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static * @param {Object.} object Plain object - * @returns {query.CommitPreparedRequest} CommitPreparedRequest + * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse */ - CommitPreparedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitPreparedRequest) + VStreamRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamRowsResponse) return object; - var message = new $root.query.CommitPreparedRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CommitPreparedRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + var message = new $root.binlogdata.VStreamRowsResponse(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".binlogdata.VStreamRowsResponse.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".binlogdata.VStreamRowsResponse.fields: object expected"); + message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + } } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CommitPreparedRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + if (object.pkfields) { + if (!Array.isArray(object.pkfields)) + throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: array expected"); + message.pkfields = []; + for (var i = 0; i < object.pkfields.length; ++i) { + if (typeof object.pkfields[i] !== "object") + throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: object expected"); + message.pkfields[i] = $root.query.Field.fromObject(object.pkfields[i]); + } } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CommitPreparedRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + if (object.gtid != null) + message.gtid = String(object.gtid); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".binlogdata.VStreamRowsResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".binlogdata.VStreamRowsResponse.rows: object expected"); + message.rows[i] = $root.query.Row.fromObject(object.rows[i]); + } } - if (object.dtid != null) - message.dtid = String(object.dtid); + if (object.lastpk != null) { + if (typeof object.lastpk !== "object") + throw TypeError(".binlogdata.VStreamRowsResponse.lastpk: object expected"); + message.lastpk = $root.query.Row.fromObject(object.lastpk); + } + if (object.throttled != null) + message.throttled = Boolean(object.throttled); + if (object.heartbeat != null) + message.heartbeat = Boolean(object.heartbeat); return message; }; /** - * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. + * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @static - * @param {query.CommitPreparedRequest} message CommitPreparedRequest + * @param {binlogdata.VStreamRowsResponse} message VStreamRowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitPreparedRequest.toObject = function toObject(message, options) { + VStreamRowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.pkfields = []; + object.rows = []; + } if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; + object.gtid = ""; + object.lastpk = null; + object.throttled = false; + object.heartbeat = false; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + } + if (message.pkfields && message.pkfields.length) { + object.pkfields = []; + for (var j = 0; j < message.pkfields.length; ++j) + object.pkfields[j] = $root.query.Field.toObject(message.pkfields[j], options); + } + if (message.gtid != null && message.hasOwnProperty("gtid")) + object.gtid = message.gtid; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.query.Row.toObject(message.rows[j], options); + } + if (message.lastpk != null && message.hasOwnProperty("lastpk")) + object.lastpk = $root.query.Row.toObject(message.lastpk, options); + if (message.throttled != null && message.hasOwnProperty("throttled")) + object.throttled = message.throttled; + if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) + object.heartbeat = message.heartbeat; return object; }; /** - * Converts this CommitPreparedRequest to JSON. + * Converts this VStreamRowsResponse to JSON. * @function toJSON - * @memberof query.CommitPreparedRequest + * @memberof binlogdata.VStreamRowsResponse * @instance * @returns {Object.} JSON object */ - CommitPreparedRequest.prototype.toJSON = function toJSON() { + VStreamRowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitPreparedRequest; + return VStreamRowsResponse; })(); - query.CommitPreparedResponse = (function() { + binlogdata.LastPKEvent = (function() { /** - * Properties of a CommitPreparedResponse. - * @memberof query - * @interface ICommitPreparedResponse + * Properties of a LastPKEvent. + * @memberof binlogdata + * @interface ILastPKEvent + * @property {binlogdata.ITableLastPK|null} [table_last_p_k] LastPKEvent table_last_p_k + * @property {boolean|null} [completed] LastPKEvent completed */ /** - * Constructs a new CommitPreparedResponse. - * @memberof query - * @classdesc Represents a CommitPreparedResponse. - * @implements ICommitPreparedResponse + * Constructs a new LastPKEvent. + * @memberof binlogdata + * @classdesc Represents a LastPKEvent. + * @implements ILastPKEvent * @constructor - * @param {query.ICommitPreparedResponse=} [properties] Properties to set + * @param {binlogdata.ILastPKEvent=} [properties] Properties to set */ - function CommitPreparedResponse(properties) { + function LastPKEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64057,63 +63370,89 @@ $root.query = (function() { } /** - * Creates a new CommitPreparedResponse instance using the specified properties. + * LastPKEvent table_last_p_k. + * @member {binlogdata.ITableLastPK|null|undefined} table_last_p_k + * @memberof binlogdata.LastPKEvent + * @instance + */ + LastPKEvent.prototype.table_last_p_k = null; + + /** + * LastPKEvent completed. + * @member {boolean} completed + * @memberof binlogdata.LastPKEvent + * @instance + */ + LastPKEvent.prototype.completed = false; + + /** + * Creates a new LastPKEvent instance using the specified properties. * @function create - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static - * @param {query.ICommitPreparedResponse=} [properties] Properties to set - * @returns {query.CommitPreparedResponse} CommitPreparedResponse instance + * @param {binlogdata.ILastPKEvent=} [properties] Properties to set + * @returns {binlogdata.LastPKEvent} LastPKEvent instance */ - CommitPreparedResponse.create = function create(properties) { - return new CommitPreparedResponse(properties); + LastPKEvent.create = function create(properties) { + return new LastPKEvent(properties); }; /** - * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. + * Encodes the specified LastPKEvent message. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. * @function encode - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static - * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode + * @param {binlogdata.ILastPKEvent} message LastPKEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitPreparedResponse.encode = function encode(message, writer) { + LastPKEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.table_last_p_k != null && Object.hasOwnProperty.call(message, "table_last_p_k")) + $root.binlogdata.TableLastPK.encode(message.table_last_p_k, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.completed != null && Object.hasOwnProperty.call(message, "completed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.completed); return writer; }; /** - * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. + * Encodes the specified LastPKEvent message, length delimited. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. * @function encodeDelimited - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static - * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode + * @param {binlogdata.ILastPKEvent} message LastPKEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommitPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { + LastPKEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer. + * Decodes a LastPKEvent message from the specified reader or buffer. * @function decode - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CommitPreparedResponse} CommitPreparedResponse + * @returns {binlogdata.LastPKEvent} LastPKEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitPreparedResponse.decode = function decode(reader, length) { + LastPKEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.LastPKEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.table_last_p_k = $root.binlogdata.TableLastPK.decode(reader, reader.uint32()); + break; + case 2: + message.completed = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -64123,98 +63462,122 @@ $root.query = (function() { }; /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. + * Decodes a LastPKEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitPreparedResponse} CommitPreparedResponse + * @returns {binlogdata.LastPKEvent} LastPKEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommitPreparedResponse.decodeDelimited = function decodeDelimited(reader) { + LastPKEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommitPreparedResponse message. + * Verifies a LastPKEvent message. * @function verify - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommitPreparedResponse.verify = function verify(message) { + LastPKEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.table_last_p_k != null && message.hasOwnProperty("table_last_p_k")) { + var error = $root.binlogdata.TableLastPK.verify(message.table_last_p_k); + if (error) + return "table_last_p_k." + error; + } + if (message.completed != null && message.hasOwnProperty("completed")) + if (typeof message.completed !== "boolean") + return "completed: boolean expected"; return null; }; /** - * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LastPKEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static * @param {Object.} object Plain object - * @returns {query.CommitPreparedResponse} CommitPreparedResponse + * @returns {binlogdata.LastPKEvent} LastPKEvent */ - CommitPreparedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitPreparedResponse) + LastPKEvent.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.LastPKEvent) return object; - return new $root.query.CommitPreparedResponse(); + var message = new $root.binlogdata.LastPKEvent(); + if (object.table_last_p_k != null) { + if (typeof object.table_last_p_k !== "object") + throw TypeError(".binlogdata.LastPKEvent.table_last_p_k: object expected"); + message.table_last_p_k = $root.binlogdata.TableLastPK.fromObject(object.table_last_p_k); + } + if (object.completed != null) + message.completed = Boolean(object.completed); + return message; }; /** - * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. + * Creates a plain object from a LastPKEvent message. Also converts values to other types if specified. * @function toObject - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @static - * @param {query.CommitPreparedResponse} message CommitPreparedResponse + * @param {binlogdata.LastPKEvent} message LastPKEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitPreparedResponse.toObject = function toObject() { - return {}; + LastPKEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table_last_p_k = null; + object.completed = false; + } + if (message.table_last_p_k != null && message.hasOwnProperty("table_last_p_k")) + object.table_last_p_k = $root.binlogdata.TableLastPK.toObject(message.table_last_p_k, options); + if (message.completed != null && message.hasOwnProperty("completed")) + object.completed = message.completed; + return object; }; /** - * Converts this CommitPreparedResponse to JSON. + * Converts this LastPKEvent to JSON. * @function toJSON - * @memberof query.CommitPreparedResponse + * @memberof binlogdata.LastPKEvent * @instance * @returns {Object.} JSON object */ - CommitPreparedResponse.prototype.toJSON = function toJSON() { + LastPKEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitPreparedResponse; + return LastPKEvent; })(); - query.RollbackPreparedRequest = (function() { + binlogdata.TableLastPK = (function() { /** - * Properties of a RollbackPreparedRequest. - * @memberof query - * @interface IRollbackPreparedRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackPreparedRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackPreparedRequest immediate_caller_id - * @property {query.ITarget|null} [target] RollbackPreparedRequest target - * @property {number|Long|null} [transaction_id] RollbackPreparedRequest transaction_id - * @property {string|null} [dtid] RollbackPreparedRequest dtid + * Properties of a TableLastPK. + * @memberof binlogdata + * @interface ITableLastPK + * @property {string|null} [table_name] TableLastPK table_name + * @property {query.IQueryResult|null} [lastpk] TableLastPK lastpk */ /** - * Constructs a new RollbackPreparedRequest. - * @memberof query - * @classdesc Represents a RollbackPreparedRequest. - * @implements IRollbackPreparedRequest + * Constructs a new TableLastPK. + * @memberof binlogdata + * @classdesc Represents a TableLastPK. + * @implements ITableLastPK * @constructor - * @param {query.IRollbackPreparedRequest=} [properties] Properties to set + * @param {binlogdata.ITableLastPK=} [properties] Properties to set */ - function RollbackPreparedRequest(properties) { + function TableLastPK(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64222,127 +63585,88 @@ $root.query = (function() { } /** - * RollbackPreparedRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.effective_caller_id = null; - - /** - * RollbackPreparedRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.immediate_caller_id = null; - - /** - * RollbackPreparedRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.target = null; - - /** - * RollbackPreparedRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.RollbackPreparedRequest + * TableLastPK table_name. + * @member {string} table_name + * @memberof binlogdata.TableLastPK * @instance */ - RollbackPreparedRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TableLastPK.prototype.table_name = ""; /** - * RollbackPreparedRequest dtid. - * @member {string} dtid - * @memberof query.RollbackPreparedRequest + * TableLastPK lastpk. + * @member {query.IQueryResult|null|undefined} lastpk + * @memberof binlogdata.TableLastPK * @instance */ - RollbackPreparedRequest.prototype.dtid = ""; + TableLastPK.prototype.lastpk = null; /** - * Creates a new RollbackPreparedRequest instance using the specified properties. + * Creates a new TableLastPK instance using the specified properties. * @function create - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static - * @param {query.IRollbackPreparedRequest=} [properties] Properties to set - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest instance + * @param {binlogdata.ITableLastPK=} [properties] Properties to set + * @returns {binlogdata.TableLastPK} TableLastPK instance */ - RollbackPreparedRequest.create = function create(properties) { - return new RollbackPreparedRequest(properties); + TableLastPK.create = function create(properties) { + return new TableLastPK(properties); }; /** - * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. + * Encodes the specified TableLastPK message. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. * @function encode - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static - * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode + * @param {binlogdata.ITableLastPK} message TableLastPK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackPreparedRequest.encode = function encode(message, writer) { + TableLastPK.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); + if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); + if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) + $root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. + * Encodes the specified TableLastPK message, length delimited. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. * @function encodeDelimited - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static - * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode + * @param {binlogdata.ITableLastPK} message TableLastPK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { + TableLastPK.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer. + * Decodes a TableLastPK message from the specified reader or buffer. * @function decode - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest + * @returns {binlogdata.TableLastPK} TableLastPK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackPreparedRequest.decode = function decode(reader, length) { + TableLastPK.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.TableLastPK(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + message.table_name = reader.string(); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); + message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -64353,168 +63677,124 @@ $root.query = (function() { }; /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. + * Decodes a TableLastPK message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest + * @returns {binlogdata.TableLastPK} TableLastPK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackPreparedRequest.decodeDelimited = function decodeDelimited(reader) { + TableLastPK.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RollbackPreparedRequest message. + * Verifies a TableLastPK message. * @function verify - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RollbackPreparedRequest.verify = function verify(message) { + TableLastPK.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); + if (message.table_name != null && message.hasOwnProperty("table_name")) + if (!$util.isString(message.table_name)) + return "table_name: string expected"; + if (message.lastpk != null && message.hasOwnProperty("lastpk")) { + var error = $root.query.QueryResult.verify(message.lastpk); if (error) - return "target." + error; + return "lastpk." + error; } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; return null; }; /** - * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TableLastPK message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static * @param {Object.} object Plain object - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest + * @returns {binlogdata.TableLastPK} TableLastPK */ - RollbackPreparedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackPreparedRequest) + TableLastPK.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.TableLastPK) return object; - var message = new $root.query.RollbackPreparedRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.RollbackPreparedRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.RollbackPreparedRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.RollbackPreparedRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.binlogdata.TableLastPK(); + if (object.table_name != null) + message.table_name = String(object.table_name); + if (object.lastpk != null) { + if (typeof object.lastpk !== "object") + throw TypeError(".binlogdata.TableLastPK.lastpk: object expected"); + message.lastpk = $root.query.QueryResult.fromObject(object.lastpk); } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. + * Creates a plain object from a TableLastPK message. Also converts values to other types if specified. * @function toObject - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @static - * @param {query.RollbackPreparedRequest} message RollbackPreparedRequest + * @param {binlogdata.TableLastPK} message TableLastPK * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RollbackPreparedRequest.toObject = function toObject(message, options) { + TableLastPK.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; + object.table_name = ""; + object.lastpk = null; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; + if (message.table_name != null && message.hasOwnProperty("table_name")) + object.table_name = message.table_name; + if (message.lastpk != null && message.hasOwnProperty("lastpk")) + object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options); return object; }; /** - * Converts this RollbackPreparedRequest to JSON. + * Converts this TableLastPK to JSON. * @function toJSON - * @memberof query.RollbackPreparedRequest + * @memberof binlogdata.TableLastPK * @instance * @returns {Object.} JSON object */ - RollbackPreparedRequest.prototype.toJSON = function toJSON() { + TableLastPK.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RollbackPreparedRequest; + return TableLastPK; })(); - query.RollbackPreparedResponse = (function() { + binlogdata.VStreamResultsRequest = (function() { /** - * Properties of a RollbackPreparedResponse. - * @memberof query - * @interface IRollbackPreparedResponse + * Properties of a VStreamResultsRequest. + * @memberof binlogdata + * @interface IVStreamResultsRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamResultsRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamResultsRequest immediate_caller_id + * @property {query.ITarget|null} [target] VStreamResultsRequest target + * @property {string|null} [query] VStreamResultsRequest query */ /** - * Constructs a new RollbackPreparedResponse. - * @memberof query - * @classdesc Represents a RollbackPreparedResponse. - * @implements IRollbackPreparedResponse + * Constructs a new VStreamResultsRequest. + * @memberof binlogdata + * @classdesc Represents a VStreamResultsRequest. + * @implements IVStreamResultsRequest * @constructor - * @param {query.IRollbackPreparedResponse=} [properties] Properties to set + * @param {binlogdata.IVStreamResultsRequest=} [properties] Properties to set */ - function RollbackPreparedResponse(properties) { + function VStreamResultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64522,63 +63802,115 @@ $root.query = (function() { } /** - * Creates a new RollbackPreparedResponse instance using the specified properties. + * VStreamResultsRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof binlogdata.VStreamResultsRequest + * @instance + */ + VStreamResultsRequest.prototype.effective_caller_id = null; + + /** + * VStreamResultsRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof binlogdata.VStreamResultsRequest + * @instance + */ + VStreamResultsRequest.prototype.immediate_caller_id = null; + + /** + * VStreamResultsRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof binlogdata.VStreamResultsRequest + * @instance + */ + VStreamResultsRequest.prototype.target = null; + + /** + * VStreamResultsRequest query. + * @member {string} query + * @memberof binlogdata.VStreamResultsRequest + * @instance + */ + VStreamResultsRequest.prototype.query = ""; + + /** + * Creates a new VStreamResultsRequest instance using the specified properties. * @function create - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static - * @param {query.IRollbackPreparedResponse=} [properties] Properties to set - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse instance + * @param {binlogdata.IVStreamResultsRequest=} [properties] Properties to set + * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest instance */ - RollbackPreparedResponse.create = function create(properties) { - return new RollbackPreparedResponse(properties); + VStreamResultsRequest.create = function create(properties) { + return new VStreamResultsRequest(properties); }; /** - * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. + * Encodes the specified VStreamResultsRequest message. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. * @function encode - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static - * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode + * @param {binlogdata.IVStreamResultsRequest} message VStreamResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackPreparedResponse.encode = function encode(message, writer) { + VStreamResultsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); return writer; }; /** - * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. + * Encodes the specified VStreamResultsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static - * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode + * @param {binlogdata.IVStreamResultsRequest} message VStreamResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RollbackPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { + VStreamResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer. + * Decodes a VStreamResultsRequest message from the specified reader or buffer. * @function decode - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse + * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackPreparedResponse.decode = function decode(reader, length) { + VStreamResultsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -64588,99 +63920,151 @@ $root.query = (function() { }; /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. + * Decodes a VStreamResultsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse + * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RollbackPreparedResponse.decodeDelimited = function decodeDelimited(reader) { + VStreamResultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RollbackPreparedResponse message. + * Verifies a VStreamResultsRequest message. * @function verify - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RollbackPreparedResponse.verify = function verify(message) { + VStreamResultsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; return null; }; /** - * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResultsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static * @param {Object.} object Plain object - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse + * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest */ - RollbackPreparedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackPreparedResponse) + VStreamResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamResultsRequest) return object; - return new $root.query.RollbackPreparedResponse(); + var message = new $root.binlogdata.VStreamResultsRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".binlogdata.VStreamResultsRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".binlogdata.VStreamResultsRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".binlogdata.VStreamResultsRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) + message.query = String(object.query); + return message; }; /** - * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. + * Creates a plain object from a VStreamResultsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @static - * @param {query.RollbackPreparedResponse} message RollbackPreparedResponse + * @param {binlogdata.VStreamResultsRequest} message VStreamResultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RollbackPreparedResponse.toObject = function toObject() { - return {}; + VStreamResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = ""; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + return object; }; /** - * Converts this RollbackPreparedResponse to JSON. + * Converts this VStreamResultsRequest to JSON. * @function toJSON - * @memberof query.RollbackPreparedResponse + * @memberof binlogdata.VStreamResultsRequest * @instance * @returns {Object.} JSON object */ - RollbackPreparedResponse.prototype.toJSON = function toJSON() { + VStreamResultsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RollbackPreparedResponse; + return VStreamResultsRequest; })(); - query.CreateTransactionRequest = (function() { + binlogdata.VStreamResultsResponse = (function() { /** - * Properties of a CreateTransactionRequest. - * @memberof query - * @interface ICreateTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CreateTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CreateTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] CreateTransactionRequest target - * @property {string|null} [dtid] CreateTransactionRequest dtid - * @property {Array.|null} [participants] CreateTransactionRequest participants + * Properties of a VStreamResultsResponse. + * @memberof binlogdata + * @interface IVStreamResultsResponse + * @property {Array.|null} [fields] VStreamResultsResponse fields + * @property {string|null} [gtid] VStreamResultsResponse gtid + * @property {Array.|null} [rows] VStreamResultsResponse rows */ /** - * Constructs a new CreateTransactionRequest. - * @memberof query - * @classdesc Represents a CreateTransactionRequest. - * @implements ICreateTransactionRequest + * Constructs a new VStreamResultsResponse. + * @memberof binlogdata + * @classdesc Represents a VStreamResultsResponse. + * @implements IVStreamResultsResponse * @constructor - * @param {query.ICreateTransactionRequest=} [properties] Properties to set + * @param {binlogdata.IVStreamResultsResponse=} [properties] Properties to set */ - function CreateTransactionRequest(properties) { - this.participants = []; + function VStreamResultsResponse(properties) { + this.fields = []; + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64688,130 +64072,107 @@ $root.query = (function() { } /** - * CreateTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.effective_caller_id = null; - - /** - * CreateTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.immediate_caller_id = null; - - /** - * CreateTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CreateTransactionRequest + * VStreamResultsResponse fields. + * @member {Array.} fields + * @memberof binlogdata.VStreamResultsResponse * @instance */ - CreateTransactionRequest.prototype.target = null; + VStreamResultsResponse.prototype.fields = $util.emptyArray; /** - * CreateTransactionRequest dtid. - * @member {string} dtid - * @memberof query.CreateTransactionRequest + * VStreamResultsResponse gtid. + * @member {string} gtid + * @memberof binlogdata.VStreamResultsResponse * @instance */ - CreateTransactionRequest.prototype.dtid = ""; + VStreamResultsResponse.prototype.gtid = ""; /** - * CreateTransactionRequest participants. - * @member {Array.} participants - * @memberof query.CreateTransactionRequest + * VStreamResultsResponse rows. + * @member {Array.} rows + * @memberof binlogdata.VStreamResultsResponse * @instance */ - CreateTransactionRequest.prototype.participants = $util.emptyArray; + VStreamResultsResponse.prototype.rows = $util.emptyArray; /** - * Creates a new CreateTransactionRequest instance using the specified properties. + * Creates a new VStreamResultsResponse instance using the specified properties. * @function create - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static - * @param {query.ICreateTransactionRequest=} [properties] Properties to set - * @returns {query.CreateTransactionRequest} CreateTransactionRequest instance + * @param {binlogdata.IVStreamResultsResponse=} [properties] Properties to set + * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse instance */ - CreateTransactionRequest.create = function create(properties) { - return new CreateTransactionRequest(properties); + VStreamResultsResponse.create = function create(properties) { + return new VStreamResultsResponse(properties); }; /** - * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. + * Encodes the specified VStreamResultsResponse message. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. * @function encode - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static - * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode + * @param {binlogdata.IVStreamResultsResponse} message VStreamResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransactionRequest.encode = function encode(message, writer) { + VStreamResultsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.query.Target.encode(message.participants[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. + * Encodes the specified VStreamResultsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static - * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode + * @param {binlogdata.IVStreamResultsResponse} message VStreamResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { + VStreamResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer. + * Decodes a VStreamResultsResponse message from the specified reader or buffer. * @function decode - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CreateTransactionRequest} CreateTransactionRequest + * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransactionRequest.decode = function decode(reader, length) { + VStreamResultsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.query.Field.decode(reader, reader.uint32())); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); + message.gtid = reader.string(); break; case 4: - message.dtid = reader.string(); - break; - case 5: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.query.Target.decode(reader, reader.uint32())); + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.query.Row.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -64822,172 +64183,175 @@ $root.query = (function() { }; /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes a VStreamResultsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CreateTransactionRequest} CreateTransactionRequest + * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransactionRequest.decodeDelimited = function decodeDelimited(reader) { + VStreamResultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTransactionRequest message. + * Verifies a VStreamResultsResponse message. * @function verify - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTransactionRequest.verify = function verify(message) { + VStreamResultsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.query.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.query.Target.verify(message.participants[i]); + if (message.gtid != null && message.hasOwnProperty("gtid")) + if (!$util.isString(message.gtid)) + return "gtid: string expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.query.Row.verify(message.rows[i]); if (error) - return "participants." + error; + return "rows." + error; } } return null; }; /** - * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VStreamResultsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static * @param {Object.} object Plain object - * @returns {query.CreateTransactionRequest} CreateTransactionRequest + * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse */ - CreateTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CreateTransactionRequest) + VStreamResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.binlogdata.VStreamResultsResponse) return object; - var message = new $root.query.CreateTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CreateTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CreateTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CreateTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.binlogdata.VStreamResultsResponse(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".binlogdata.VStreamResultsResponse.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".binlogdata.VStreamResultsResponse.fields: object expected"); + message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + } } - if (object.dtid != null) - message.dtid = String(object.dtid); - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".query.CreateTransactionRequest.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".query.CreateTransactionRequest.participants: object expected"); - message.participants[i] = $root.query.Target.fromObject(object.participants[i]); + if (object.gtid != null) + message.gtid = String(object.gtid); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".binlogdata.VStreamResultsResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".binlogdata.VStreamResultsResponse.rows: object expected"); + message.rows[i] = $root.query.Row.fromObject(object.rows[i]); } } return message; }; /** - * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. + * Creates a plain object from a VStreamResultsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @static - * @param {query.CreateTransactionRequest} message CreateTransactionRequest + * @param {binlogdata.VStreamResultsResponse} message VStreamResultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTransactionRequest.toObject = function toObject(message, options) { + VStreamResultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.participants = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; + if (options.arrays || options.defaults) { + object.fields = []; + object.rows = []; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.query.Target.toObject(message.participants[j], options); + if (options.defaults) + object.gtid = ""; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + } + if (message.gtid != null && message.hasOwnProperty("gtid")) + object.gtid = message.gtid; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.query.Row.toObject(message.rows[j], options); } return object; }; /** - * Converts this CreateTransactionRequest to JSON. + * Converts this VStreamResultsResponse to JSON. * @function toJSON - * @memberof query.CreateTransactionRequest + * @memberof binlogdata.VStreamResultsResponse * @instance * @returns {Object.} JSON object */ - CreateTransactionRequest.prototype.toJSON = function toJSON() { + VStreamResultsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTransactionRequest; + return VStreamResultsResponse; })(); - query.CreateTransactionResponse = (function() { + return binlogdata; +})(); + +$root.vtrpc = (function() { + + /** + * Namespace vtrpc. + * @exports vtrpc + * @namespace + */ + var vtrpc = {}; + + vtrpc.CallerID = (function() { /** - * Properties of a CreateTransactionResponse. - * @memberof query - * @interface ICreateTransactionResponse + * Properties of a CallerID. + * @memberof vtrpc + * @interface ICallerID + * @property {string|null} [principal] CallerID principal + * @property {string|null} [component] CallerID component + * @property {string|null} [subcomponent] CallerID subcomponent + * @property {Array.|null} [groups] CallerID groups */ /** - * Constructs a new CreateTransactionResponse. - * @memberof query - * @classdesc Represents a CreateTransactionResponse. - * @implements ICreateTransactionResponse + * Constructs a new CallerID. + * @memberof vtrpc + * @classdesc Represents a CallerID. + * @implements ICallerID * @constructor - * @param {query.ICreateTransactionResponse=} [properties] Properties to set + * @param {vtrpc.ICallerID=} [properties] Properties to set */ - function CreateTransactionResponse(properties) { + function CallerID(properties) { + this.groups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64995,63 +64359,118 @@ $root.query = (function() { } /** - * Creates a new CreateTransactionResponse instance using the specified properties. + * CallerID principal. + * @member {string} principal + * @memberof vtrpc.CallerID + * @instance + */ + CallerID.prototype.principal = ""; + + /** + * CallerID component. + * @member {string} component + * @memberof vtrpc.CallerID + * @instance + */ + CallerID.prototype.component = ""; + + /** + * CallerID subcomponent. + * @member {string} subcomponent + * @memberof vtrpc.CallerID + * @instance + */ + CallerID.prototype.subcomponent = ""; + + /** + * CallerID groups. + * @member {Array.} groups + * @memberof vtrpc.CallerID + * @instance + */ + CallerID.prototype.groups = $util.emptyArray; + + /** + * Creates a new CallerID instance using the specified properties. * @function create - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static - * @param {query.ICreateTransactionResponse=} [properties] Properties to set - * @returns {query.CreateTransactionResponse} CreateTransactionResponse instance + * @param {vtrpc.ICallerID=} [properties] Properties to set + * @returns {vtrpc.CallerID} CallerID instance */ - CreateTransactionResponse.create = function create(properties) { - return new CreateTransactionResponse(properties); + CallerID.create = function create(properties) { + return new CallerID(properties); }; /** - * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. + * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. * @function encode - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static - * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode + * @param {vtrpc.ICallerID} message CallerID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransactionResponse.encode = function encode(message, writer) { + CallerID.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.principal); + if (message.component != null && Object.hasOwnProperty.call(message, "component")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.component); + if (message.subcomponent != null && Object.hasOwnProperty.call(message, "subcomponent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcomponent); + if (message.groups != null && message.groups.length) + for (var i = 0; i < message.groups.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.groups[i]); return writer; }; /** - * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. + * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. * @function encodeDelimited - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static - * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode + * @param {vtrpc.ICallerID} message CallerID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { + CallerID.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer. + * Decodes a CallerID message from the specified reader or buffer. * @function decode - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.CreateTransactionResponse} CreateTransactionResponse + * @returns {vtrpc.CallerID} CallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransactionResponse.decode = function decode(reader, length) { + CallerID.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.CallerID(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.principal = reader.string(); + break; + case 2: + message.component = reader.string(); + break; + case 3: + message.subcomponent = reader.string(); + break; + case 4: + if (!(message.groups && message.groups.length)) + message.groups = []; + message.groups.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -65061,98 +64480,194 @@ $root.query = (function() { }; /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. + * Decodes a CallerID message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CreateTransactionResponse} CreateTransactionResponse + * @returns {vtrpc.CallerID} CallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransactionResponse.decodeDelimited = function decodeDelimited(reader) { + CallerID.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTransactionResponse message. + * Verifies a CallerID message. * @function verify - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTransactionResponse.verify = function verify(message) { + CallerID.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; + if (message.component != null && message.hasOwnProperty("component")) + if (!$util.isString(message.component)) + return "component: string expected"; + if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) + if (!$util.isString(message.subcomponent)) + return "subcomponent: string expected"; + if (message.groups != null && message.hasOwnProperty("groups")) { + if (!Array.isArray(message.groups)) + return "groups: array expected"; + for (var i = 0; i < message.groups.length; ++i) + if (!$util.isString(message.groups[i])) + return "groups: string[] expected"; + } return null; }; /** - * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CallerID message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static * @param {Object.} object Plain object - * @returns {query.CreateTransactionResponse} CreateTransactionResponse + * @returns {vtrpc.CallerID} CallerID */ - CreateTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CreateTransactionResponse) + CallerID.fromObject = function fromObject(object) { + if (object instanceof $root.vtrpc.CallerID) return object; - return new $root.query.CreateTransactionResponse(); + var message = new $root.vtrpc.CallerID(); + if (object.principal != null) + message.principal = String(object.principal); + if (object.component != null) + message.component = String(object.component); + if (object.subcomponent != null) + message.subcomponent = String(object.subcomponent); + if (object.groups) { + if (!Array.isArray(object.groups)) + throw TypeError(".vtrpc.CallerID.groups: array expected"); + message.groups = []; + for (var i = 0; i < object.groups.length; ++i) + message.groups[i] = String(object.groups[i]); + } + return message; }; /** - * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. + * Creates a plain object from a CallerID message. Also converts values to other types if specified. * @function toObject - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @static - * @param {query.CreateTransactionResponse} message CreateTransactionResponse + * @param {vtrpc.CallerID} message CallerID * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTransactionResponse.toObject = function toObject() { - return {}; + CallerID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groups = []; + if (options.defaults) { + object.principal = ""; + object.component = ""; + object.subcomponent = ""; + } + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; + if (message.component != null && message.hasOwnProperty("component")) + object.component = message.component; + if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) + object.subcomponent = message.subcomponent; + if (message.groups && message.groups.length) { + object.groups = []; + for (var j = 0; j < message.groups.length; ++j) + object.groups[j] = message.groups[j]; + } + return object; }; /** - * Converts this CreateTransactionResponse to JSON. + * Converts this CallerID to JSON. * @function toJSON - * @memberof query.CreateTransactionResponse + * @memberof vtrpc.CallerID * @instance * @returns {Object.} JSON object */ - CreateTransactionResponse.prototype.toJSON = function toJSON() { + CallerID.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTransactionResponse; + return CallerID; })(); - query.StartCommitRequest = (function() { + /** + * Code enum. + * @name vtrpc.Code + * @enum {number} + * @property {number} OK=0 OK value + * @property {number} CANCELED=1 CANCELED value + * @property {number} UNKNOWN=2 UNKNOWN value + * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value + * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value + * @property {number} NOT_FOUND=5 NOT_FOUND value + * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value + * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value + * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value + * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value + * @property {number} ABORTED=10 ABORTED value + * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value + * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value + * @property {number} INTERNAL=13 INTERNAL value + * @property {number} UNAVAILABLE=14 UNAVAILABLE value + * @property {number} DATA_LOSS=15 DATA_LOSS value + * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value + * @property {number} CLUSTER_EVENT=17 CLUSTER_EVENT value + * @property {number} READ_ONLY=18 READ_ONLY value + */ + vtrpc.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OK"] = 0; + values[valuesById[1] = "CANCELED"] = 1; + values[valuesById[2] = "UNKNOWN"] = 2; + values[valuesById[3] = "INVALID_ARGUMENT"] = 3; + values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; + values[valuesById[5] = "NOT_FOUND"] = 5; + values[valuesById[6] = "ALREADY_EXISTS"] = 6; + values[valuesById[7] = "PERMISSION_DENIED"] = 7; + values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; + values[valuesById[9] = "FAILED_PRECONDITION"] = 9; + values[valuesById[10] = "ABORTED"] = 10; + values[valuesById[11] = "OUT_OF_RANGE"] = 11; + values[valuesById[12] = "UNIMPLEMENTED"] = 12; + values[valuesById[13] = "INTERNAL"] = 13; + values[valuesById[14] = "UNAVAILABLE"] = 14; + values[valuesById[15] = "DATA_LOSS"] = 15; + values[valuesById[16] = "UNAUTHENTICATED"] = 16; + values[valuesById[17] = "CLUSTER_EVENT"] = 17; + values[valuesById[18] = "READ_ONLY"] = 18; + return values; + })(); + + vtrpc.RPCError = (function() { /** - * Properties of a StartCommitRequest. - * @memberof query - * @interface IStartCommitRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] StartCommitRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] StartCommitRequest immediate_caller_id - * @property {query.ITarget|null} [target] StartCommitRequest target - * @property {number|Long|null} [transaction_id] StartCommitRequest transaction_id - * @property {string|null} [dtid] StartCommitRequest dtid + * Properties of a RPCError. + * @memberof vtrpc + * @interface IRPCError + * @property {string|null} [message] RPCError message + * @property {vtrpc.Code|null} [code] RPCError code */ /** - * Constructs a new StartCommitRequest. - * @memberof query - * @classdesc Represents a StartCommitRequest. - * @implements IStartCommitRequest + * Constructs a new RPCError. + * @memberof vtrpc + * @classdesc Represents a RPCError. + * @implements IRPCError * @constructor - * @param {query.IStartCommitRequest=} [properties] Properties to set + * @param {vtrpc.IRPCError=} [properties] Properties to set */ - function StartCommitRequest(properties) { + function RPCError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65160,127 +64675,88 @@ $root.query = (function() { } /** - * StartCommitRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.effective_caller_id = null; - - /** - * StartCommitRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.immediate_caller_id = null; - - /** - * StartCommitRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.target = null; - - /** - * StartCommitRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.StartCommitRequest + * RPCError message. + * @member {string} message + * @memberof vtrpc.RPCError * @instance */ - StartCommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RPCError.prototype.message = ""; /** - * StartCommitRequest dtid. - * @member {string} dtid - * @memberof query.StartCommitRequest + * RPCError code. + * @member {vtrpc.Code} code + * @memberof vtrpc.RPCError * @instance */ - StartCommitRequest.prototype.dtid = ""; + RPCError.prototype.code = 0; /** - * Creates a new StartCommitRequest instance using the specified properties. + * Creates a new RPCError instance using the specified properties. * @function create - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static - * @param {query.IStartCommitRequest=} [properties] Properties to set - * @returns {query.StartCommitRequest} StartCommitRequest instance + * @param {vtrpc.IRPCError=} [properties] Properties to set + * @returns {vtrpc.RPCError} RPCError instance */ - StartCommitRequest.create = function create(properties) { - return new StartCommitRequest(properties); + RPCError.create = function create(properties) { + return new RPCError(properties); }; /** - * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. + * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. * @function encode - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static - * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode + * @param {vtrpc.IRPCError} message RPCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartCommitRequest.encode = function encode(message, writer) { + RPCError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.code); return writer; }; /** - * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. + * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. * @function encodeDelimited - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static - * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode + * @param {vtrpc.IRPCError} message RPCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartCommitRequest.encodeDelimited = function encodeDelimited(message, writer) { + RPCError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartCommitRequest message from the specified reader or buffer. + * Decodes a RPCError message from the specified reader or buffer. * @function decode - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StartCommitRequest} StartCommitRequest + * @returns {vtrpc.RPCError} RPCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartCommitRequest.decode = function decode(reader, length) { + RPCError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.RPCError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + message.message = reader.string(); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); + message.code = reader.int32(); break; default: reader.skipType(tag & 7); @@ -65291,168 +64767,229 @@ $root.query = (function() { }; /** - * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. + * Decodes a RPCError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StartCommitRequest} StartCommitRequest + * @returns {vtrpc.RPCError} RPCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartCommitRequest.decodeDelimited = function decodeDelimited(reader) { + RPCError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartCommitRequest message. + * Verifies a RPCError message. * @function verify - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartCommitRequest.verify = function verify(message) { + RPCError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } return null; }; /** - * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RPCError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static * @param {Object.} object Plain object - * @returns {query.StartCommitRequest} StartCommitRequest + * @returns {vtrpc.RPCError} RPCError */ - StartCommitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StartCommitRequest) + RPCError.fromObject = function fromObject(object) { + if (object instanceof $root.vtrpc.RPCError) return object; - var message = new $root.query.StartCommitRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.StartCommitRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.StartCommitRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StartCommitRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.vtrpc.RPCError(); + if (object.message != null) + message.message = String(object.message); + switch (object.code) { + case "OK": + case 0: + message.code = 0; + break; + case "CANCELED": + case 1: + message.code = 1; + break; + case "UNKNOWN": + case 2: + message.code = 2; + break; + case "INVALID_ARGUMENT": + case 3: + message.code = 3; + break; + case "DEADLINE_EXCEEDED": + case 4: + message.code = 4; + break; + case "NOT_FOUND": + case 5: + message.code = 5; + break; + case "ALREADY_EXISTS": + case 6: + message.code = 6; + break; + case "PERMISSION_DENIED": + case 7: + message.code = 7; + break; + case "RESOURCE_EXHAUSTED": + case 8: + message.code = 8; + break; + case "FAILED_PRECONDITION": + case 9: + message.code = 9; + break; + case "ABORTED": + case 10: + message.code = 10; + break; + case "OUT_OF_RANGE": + case 11: + message.code = 11; + break; + case "UNIMPLEMENTED": + case 12: + message.code = 12; + break; + case "INTERNAL": + case 13: + message.code = 13; + break; + case "UNAVAILABLE": + case 14: + message.code = 14; + break; + case "DATA_LOSS": + case 15: + message.code = 15; + break; + case "UNAUTHENTICATED": + case 16: + message.code = 16; + break; + case "CLUSTER_EVENT": + case 17: + message.code = 17; + break; + case "READ_ONLY": + case 18: + message.code = 18; + break; } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. + * Creates a plain object from a RPCError message. Also converts values to other types if specified. * @function toObject - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @static - * @param {query.StartCommitRequest} message StartCommitRequest + * @param {vtrpc.RPCError} message RPCError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartCommitRequest.toObject = function toObject(message, options) { + RPCError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; + object.message = ""; + object.code = options.enums === String ? "OK" : 0; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.vtrpc.Code[message.code] : message.code; return object; }; /** - * Converts this StartCommitRequest to JSON. + * Converts this RPCError to JSON. * @function toJSON - * @memberof query.StartCommitRequest + * @memberof vtrpc.RPCError * @instance * @returns {Object.} JSON object */ - StartCommitRequest.prototype.toJSON = function toJSON() { + RPCError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StartCommitRequest; + return RPCError; })(); - query.StartCommitResponse = (function() { + return vtrpc; +})(); + +$root.query = (function() { + + /** + * Namespace query. + * @exports query + * @namespace + */ + var query = {}; + + query.Target = (function() { /** - * Properties of a StartCommitResponse. + * Properties of a Target. * @memberof query - * @interface IStartCommitResponse + * @interface ITarget + * @property {string|null} [keyspace] Target keyspace + * @property {string|null} [shard] Target shard + * @property {topodata.TabletType|null} [tablet_type] Target tablet_type + * @property {string|null} [cell] Target cell */ /** - * Constructs a new StartCommitResponse. + * Constructs a new Target. * @memberof query - * @classdesc Represents a StartCommitResponse. - * @implements IStartCommitResponse + * @classdesc Represents a Target. + * @implements ITarget * @constructor - * @param {query.IStartCommitResponse=} [properties] Properties to set + * @param {query.ITarget=} [properties] Properties to set */ - function StartCommitResponse(properties) { + function Target(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65460,63 +64997,115 @@ $root.query = (function() { } /** - * Creates a new StartCommitResponse instance using the specified properties. + * Target keyspace. + * @member {string} keyspace + * @memberof query.Target + * @instance + */ + Target.prototype.keyspace = ""; + + /** + * Target shard. + * @member {string} shard + * @memberof query.Target + * @instance + */ + Target.prototype.shard = ""; + + /** + * Target tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof query.Target + * @instance + */ + Target.prototype.tablet_type = 0; + + /** + * Target cell. + * @member {string} cell + * @memberof query.Target + * @instance + */ + Target.prototype.cell = ""; + + /** + * Creates a new Target instance using the specified properties. * @function create - * @memberof query.StartCommitResponse + * @memberof query.Target * @static - * @param {query.IStartCommitResponse=} [properties] Properties to set - * @returns {query.StartCommitResponse} StartCommitResponse instance + * @param {query.ITarget=} [properties] Properties to set + * @returns {query.Target} Target instance */ - StartCommitResponse.create = function create(properties) { - return new StartCommitResponse(properties); + Target.create = function create(properties) { + return new Target(properties); }; /** - * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. + * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. * @function encode - * @memberof query.StartCommitResponse + * @memberof query.Target * @static - * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode + * @param {query.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartCommitResponse.encode = function encode(message, writer) { + Target.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cell); return writer; }; /** - * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. + * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. * @function encodeDelimited - * @memberof query.StartCommitResponse + * @memberof query.Target * @static - * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode + * @param {query.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartCommitResponse.encodeDelimited = function encodeDelimited(message, writer) { + Target.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartCommitResponse message from the specified reader or buffer. + * Decodes a Target message from the specified reader or buffer. * @function decode - * @memberof query.StartCommitResponse + * @memberof query.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StartCommitResponse} StartCommitResponse + * @returns {query.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartCommitResponse.decode = function decode(reader, length) { + Target.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Target(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.tablet_type = reader.int32(); + break; + case 4: + message.cell = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -65526,98 +65115,192 @@ $root.query = (function() { }; /** - * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. + * Decodes a Target message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StartCommitResponse + * @memberof query.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StartCommitResponse} StartCommitResponse + * @returns {query.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartCommitResponse.decodeDelimited = function decodeDelimited(reader) { + Target.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartCommitResponse message. + * Verifies a Target message. * @function verify - * @memberof query.StartCommitResponse + * @memberof query.Target * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartCommitResponse.verify = function verify(message) { + Target.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Target message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StartCommitResponse + * @memberof query.Target * @static * @param {Object.} object Plain object - * @returns {query.StartCommitResponse} StartCommitResponse + * @returns {query.Target} Target */ - StartCommitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StartCommitResponse) + Target.fromObject = function fromObject(object) { + if (object instanceof $root.query.Target) return object; - return new $root.query.StartCommitResponse(); + var message = new $root.query.Target(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + switch (object.tablet_type) { + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; + } + if (object.cell != null) + message.cell = String(object.cell); + return message; }; /** - * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. + * Creates a plain object from a Target message. Also converts values to other types if specified. * @function toObject - * @memberof query.StartCommitResponse + * @memberof query.Target * @static - * @param {query.StartCommitResponse} message StartCommitResponse + * @param {query.Target} message Target * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartCommitResponse.toObject = function toObject() { - return {}; + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.cell = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + return object; }; /** - * Converts this StartCommitResponse to JSON. + * Converts this Target to JSON. * @function toJSON - * @memberof query.StartCommitResponse + * @memberof query.Target * @instance * @returns {Object.} JSON object */ - StartCommitResponse.prototype.toJSON = function toJSON() { + Target.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StartCommitResponse; + return Target; })(); - query.SetRollbackRequest = (function() { + query.VTGateCallerID = (function() { /** - * Properties of a SetRollbackRequest. + * Properties of a VTGateCallerID. * @memberof query - * @interface ISetRollbackRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] SetRollbackRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] SetRollbackRequest immediate_caller_id - * @property {query.ITarget|null} [target] SetRollbackRequest target - * @property {number|Long|null} [transaction_id] SetRollbackRequest transaction_id - * @property {string|null} [dtid] SetRollbackRequest dtid + * @interface IVTGateCallerID + * @property {string|null} [username] VTGateCallerID username + * @property {Array.|null} [groups] VTGateCallerID groups */ /** - * Constructs a new SetRollbackRequest. + * Constructs a new VTGateCallerID. * @memberof query - * @classdesc Represents a SetRollbackRequest. - * @implements ISetRollbackRequest + * @classdesc Represents a VTGateCallerID. + * @implements IVTGateCallerID * @constructor - * @param {query.ISetRollbackRequest=} [properties] Properties to set + * @param {query.IVTGateCallerID=} [properties] Properties to set */ - function SetRollbackRequest(properties) { + function VTGateCallerID(properties) { + this.groups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65625,127 +65308,91 @@ $root.query = (function() { } /** - * SetRollbackRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.effective_caller_id = null; - - /** - * SetRollbackRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.immediate_caller_id = null; - - /** - * SetRollbackRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.target = null; - - /** - * SetRollbackRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.SetRollbackRequest + * VTGateCallerID username. + * @member {string} username + * @memberof query.VTGateCallerID * @instance */ - SetRollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VTGateCallerID.prototype.username = ""; /** - * SetRollbackRequest dtid. - * @member {string} dtid - * @memberof query.SetRollbackRequest + * VTGateCallerID groups. + * @member {Array.} groups + * @memberof query.VTGateCallerID * @instance */ - SetRollbackRequest.prototype.dtid = ""; + VTGateCallerID.prototype.groups = $util.emptyArray; /** - * Creates a new SetRollbackRequest instance using the specified properties. + * Creates a new VTGateCallerID instance using the specified properties. * @function create - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static - * @param {query.ISetRollbackRequest=} [properties] Properties to set - * @returns {query.SetRollbackRequest} SetRollbackRequest instance + * @param {query.IVTGateCallerID=} [properties] Properties to set + * @returns {query.VTGateCallerID} VTGateCallerID instance */ - SetRollbackRequest.create = function create(properties) { - return new SetRollbackRequest(properties); + VTGateCallerID.create = function create(properties) { + return new VTGateCallerID(properties); }; /** - * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. + * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. * @function encode - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static - * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode + * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetRollbackRequest.encode = function encode(message, writer) { + VTGateCallerID.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.groups != null && message.groups.length) + for (var i = 0; i < message.groups.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.groups[i]); return writer; }; /** - * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. + * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. * @function encodeDelimited - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static - * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode + * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetRollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { + VTGateCallerID.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetRollbackRequest message from the specified reader or buffer. + * Decodes a VTGateCallerID message from the specified reader or buffer. * @function decode - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.SetRollbackRequest} SetRollbackRequest + * @returns {query.VTGateCallerID} VTGateCallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetRollbackRequest.decode = function decode(reader, length) { + VTGateCallerID.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.VTGateCallerID(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.username = reader.string(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); + if (!(message.groups && message.groups.length)) + message.groups = []; + message.groups.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -65756,168 +65403,130 @@ $root.query = (function() { }; /** - * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. + * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.SetRollbackRequest} SetRollbackRequest + * @returns {query.VTGateCallerID} VTGateCallerID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetRollbackRequest.decodeDelimited = function decodeDelimited(reader) { + VTGateCallerID.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetRollbackRequest message. + * Verifies a VTGateCallerID message. * @function verify - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetRollbackRequest.verify = function verify(message) { + VTGateCallerID.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.groups != null && message.hasOwnProperty("groups")) { + if (!Array.isArray(message.groups)) + return "groups: array expected"; + for (var i = 0; i < message.groups.length; ++i) + if (!$util.isString(message.groups[i])) + return "groups: string[] expected"; } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; return null; }; /** - * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static * @param {Object.} object Plain object - * @returns {query.SetRollbackRequest} SetRollbackRequest + * @returns {query.VTGateCallerID} VTGateCallerID */ - SetRollbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.SetRollbackRequest) + VTGateCallerID.fromObject = function fromObject(object) { + if (object instanceof $root.query.VTGateCallerID) return object; - var message = new $root.query.SetRollbackRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.SetRollbackRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.SetRollbackRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.SetRollbackRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.query.VTGateCallerID(); + if (object.username != null) + message.username = String(object.username); + if (object.groups) { + if (!Array.isArray(object.groups)) + throw TypeError(".query.VTGateCallerID.groups: array expected"); + message.groups = []; + for (var i = 0; i < object.groups.length; ++i) + message.groups[i] = String(object.groups[i]); } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. + * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. * @function toObject - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @static - * @param {query.SetRollbackRequest} message SetRollbackRequest + * @param {query.VTGateCallerID} message VTGateCallerID * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetRollbackRequest.toObject = function toObject(message, options) { + VTGateCallerID.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; + if (options.arrays || options.defaults) + object.groups = []; + if (options.defaults) + object.username = ""; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.groups && message.groups.length) { + object.groups = []; + for (var j = 0; j < message.groups.length; ++j) + object.groups[j] = message.groups[j]; + } return object; }; /** - * Converts this SetRollbackRequest to JSON. + * Converts this VTGateCallerID to JSON. * @function toJSON - * @memberof query.SetRollbackRequest + * @memberof query.VTGateCallerID * @instance * @returns {Object.} JSON object */ - SetRollbackRequest.prototype.toJSON = function toJSON() { + VTGateCallerID.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetRollbackRequest; + return VTGateCallerID; })(); - query.SetRollbackResponse = (function() { + query.EventToken = (function() { /** - * Properties of a SetRollbackResponse. + * Properties of an EventToken. * @memberof query - * @interface ISetRollbackResponse + * @interface IEventToken + * @property {number|Long|null} [timestamp] EventToken timestamp + * @property {string|null} [shard] EventToken shard + * @property {string|null} [position] EventToken position */ /** - * Constructs a new SetRollbackResponse. + * Constructs a new EventToken. * @memberof query - * @classdesc Represents a SetRollbackResponse. - * @implements ISetRollbackResponse + * @classdesc Represents an EventToken. + * @implements IEventToken * @constructor - * @param {query.ISetRollbackResponse=} [properties] Properties to set + * @param {query.IEventToken=} [properties] Properties to set */ - function SetRollbackResponse(properties) { + function EventToken(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65925,63 +65534,102 @@ $root.query = (function() { } /** - * Creates a new SetRollbackResponse instance using the specified properties. + * EventToken timestamp. + * @member {number|Long} timestamp + * @memberof query.EventToken + * @instance + */ + EventToken.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * EventToken shard. + * @member {string} shard + * @memberof query.EventToken + * @instance + */ + EventToken.prototype.shard = ""; + + /** + * EventToken position. + * @member {string} position + * @memberof query.EventToken + * @instance + */ + EventToken.prototype.position = ""; + + /** + * Creates a new EventToken instance using the specified properties. * @function create - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static - * @param {query.ISetRollbackResponse=} [properties] Properties to set - * @returns {query.SetRollbackResponse} SetRollbackResponse instance + * @param {query.IEventToken=} [properties] Properties to set + * @returns {query.EventToken} EventToken instance */ - SetRollbackResponse.create = function create(properties) { - return new SetRollbackResponse(properties); + EventToken.create = function create(properties) { + return new EventToken(properties); }; /** - * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. * @function encode - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static - * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode + * @param {query.IEventToken} message EventToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetRollbackResponse.encode = function encode(message, writer) { + EventToken.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.position); return writer; }; /** - * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. * @function encodeDelimited - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static - * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode + * @param {query.IEventToken} message EventToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetRollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { + EventToken.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetRollbackResponse message from the specified reader or buffer. + * Decodes an EventToken message from the specified reader or buffer. * @function decode - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.SetRollbackResponse} SetRollbackResponse + * @returns {query.EventToken} EventToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetRollbackResponse.decode = function decode(reader, length) { + EventToken.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.EventToken(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.timestamp = reader.int64(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.position = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -65991,97 +65639,293 @@ $root.query = (function() { }; /** - * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. + * Decodes an EventToken message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.SetRollbackResponse} SetRollbackResponse + * @returns {query.EventToken} EventToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetRollbackResponse.decodeDelimited = function decodeDelimited(reader) { + EventToken.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetRollbackResponse message. + * Verifies an EventToken message. * @function verify - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetRollbackResponse.verify = function verify(message) { + EventToken.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; return null; }; /** - * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EventToken message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static * @param {Object.} object Plain object - * @returns {query.SetRollbackResponse} SetRollbackResponse + * @returns {query.EventToken} EventToken */ - SetRollbackResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.SetRollbackResponse) + EventToken.fromObject = function fromObject(object) { + if (object instanceof $root.query.EventToken) return object; - return new $root.query.SetRollbackResponse(); + var message = new $root.query.EventToken(); + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + if (object.shard != null) + message.shard = String(object.shard); + if (object.position != null) + message.position = String(object.position); + return message; }; /** - * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. + * Creates a plain object from an EventToken message. Also converts values to other types if specified. * @function toObject - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @static - * @param {query.SetRollbackResponse} message SetRollbackResponse + * @param {query.EventToken} message EventToken * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetRollbackResponse.toObject = function toObject() { - return {}; + EventToken.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + object.shard = ""; + object.position = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + return object; }; /** - * Converts this SetRollbackResponse to JSON. + * Converts this EventToken to JSON. * @function toJSON - * @memberof query.SetRollbackResponse + * @memberof query.EventToken * @instance * @returns {Object.} JSON object */ - SetRollbackResponse.prototype.toJSON = function toJSON() { + EventToken.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetRollbackResponse; + return EventToken; })(); - query.ConcludeTransactionRequest = (function() { + /** + * MySqlFlag enum. + * @name query.MySqlFlag + * @enum {number} + * @property {number} EMPTY=0 EMPTY value + * @property {number} NOT_NULL_FLAG=1 NOT_NULL_FLAG value + * @property {number} PRI_KEY_FLAG=2 PRI_KEY_FLAG value + * @property {number} UNIQUE_KEY_FLAG=4 UNIQUE_KEY_FLAG value + * @property {number} MULTIPLE_KEY_FLAG=8 MULTIPLE_KEY_FLAG value + * @property {number} BLOB_FLAG=16 BLOB_FLAG value + * @property {number} UNSIGNED_FLAG=32 UNSIGNED_FLAG value + * @property {number} ZEROFILL_FLAG=64 ZEROFILL_FLAG value + * @property {number} BINARY_FLAG=128 BINARY_FLAG value + * @property {number} ENUM_FLAG=256 ENUM_FLAG value + * @property {number} AUTO_INCREMENT_FLAG=512 AUTO_INCREMENT_FLAG value + * @property {number} TIMESTAMP_FLAG=1024 TIMESTAMP_FLAG value + * @property {number} SET_FLAG=2048 SET_FLAG value + * @property {number} NO_DEFAULT_VALUE_FLAG=4096 NO_DEFAULT_VALUE_FLAG value + * @property {number} ON_UPDATE_NOW_FLAG=8192 ON_UPDATE_NOW_FLAG value + * @property {number} NUM_FLAG=32768 NUM_FLAG value + * @property {number} PART_KEY_FLAG=16384 PART_KEY_FLAG value + * @property {number} GROUP_FLAG=32768 GROUP_FLAG value + * @property {number} UNIQUE_FLAG=65536 UNIQUE_FLAG value + * @property {number} BINCMP_FLAG=131072 BINCMP_FLAG value + */ + query.MySqlFlag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EMPTY"] = 0; + values[valuesById[1] = "NOT_NULL_FLAG"] = 1; + values[valuesById[2] = "PRI_KEY_FLAG"] = 2; + values[valuesById[4] = "UNIQUE_KEY_FLAG"] = 4; + values[valuesById[8] = "MULTIPLE_KEY_FLAG"] = 8; + values[valuesById[16] = "BLOB_FLAG"] = 16; + values[valuesById[32] = "UNSIGNED_FLAG"] = 32; + values[valuesById[64] = "ZEROFILL_FLAG"] = 64; + values[valuesById[128] = "BINARY_FLAG"] = 128; + values[valuesById[256] = "ENUM_FLAG"] = 256; + values[valuesById[512] = "AUTO_INCREMENT_FLAG"] = 512; + values[valuesById[1024] = "TIMESTAMP_FLAG"] = 1024; + values[valuesById[2048] = "SET_FLAG"] = 2048; + values[valuesById[4096] = "NO_DEFAULT_VALUE_FLAG"] = 4096; + values[valuesById[8192] = "ON_UPDATE_NOW_FLAG"] = 8192; + values[valuesById[32768] = "NUM_FLAG"] = 32768; + values[valuesById[16384] = "PART_KEY_FLAG"] = 16384; + values["GROUP_FLAG"] = 32768; + values[valuesById[65536] = "UNIQUE_FLAG"] = 65536; + values[valuesById[131072] = "BINCMP_FLAG"] = 131072; + return values; + })(); + + /** + * Flag enum. + * @name query.Flag + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} ISINTEGRAL=256 ISINTEGRAL value + * @property {number} ISUNSIGNED=512 ISUNSIGNED value + * @property {number} ISFLOAT=1024 ISFLOAT value + * @property {number} ISQUOTED=2048 ISQUOTED value + * @property {number} ISTEXT=4096 ISTEXT value + * @property {number} ISBINARY=8192 ISBINARY value + */ + query.Flag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[256] = "ISINTEGRAL"] = 256; + values[valuesById[512] = "ISUNSIGNED"] = 512; + values[valuesById[1024] = "ISFLOAT"] = 1024; + values[valuesById[2048] = "ISQUOTED"] = 2048; + values[valuesById[4096] = "ISTEXT"] = 4096; + values[valuesById[8192] = "ISBINARY"] = 8192; + return values; + })(); + + /** + * Type enum. + * @name query.Type + * @enum {number} + * @property {number} NULL_TYPE=0 NULL_TYPE value + * @property {number} INT8=257 INT8 value + * @property {number} UINT8=770 UINT8 value + * @property {number} INT16=259 INT16 value + * @property {number} UINT16=772 UINT16 value + * @property {number} INT24=261 INT24 value + * @property {number} UINT24=774 UINT24 value + * @property {number} INT32=263 INT32 value + * @property {number} UINT32=776 UINT32 value + * @property {number} INT64=265 INT64 value + * @property {number} UINT64=778 UINT64 value + * @property {number} FLOAT32=1035 FLOAT32 value + * @property {number} FLOAT64=1036 FLOAT64 value + * @property {number} TIMESTAMP=2061 TIMESTAMP value + * @property {number} DATE=2062 DATE value + * @property {number} TIME=2063 TIME value + * @property {number} DATETIME=2064 DATETIME value + * @property {number} YEAR=785 YEAR value + * @property {number} DECIMAL=18 DECIMAL value + * @property {number} TEXT=6163 TEXT value + * @property {number} BLOB=10260 BLOB value + * @property {number} VARCHAR=6165 VARCHAR value + * @property {number} VARBINARY=10262 VARBINARY value + * @property {number} CHAR=6167 CHAR value + * @property {number} BINARY=10264 BINARY value + * @property {number} BIT=2073 BIT value + * @property {number} ENUM=2074 ENUM value + * @property {number} SET=2075 SET value + * @property {number} TUPLE=28 TUPLE value + * @property {number} GEOMETRY=2077 GEOMETRY value + * @property {number} JSON=2078 JSON value + * @property {number} EXPRESSION=31 EXPRESSION value + * @property {number} HEXNUM=4128 HEXNUM value + * @property {number} HEXVAL=4129 HEXVAL value + * @property {number} BITNUM=4130 BITNUM value + */ + query.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_TYPE"] = 0; + values[valuesById[257] = "INT8"] = 257; + values[valuesById[770] = "UINT8"] = 770; + values[valuesById[259] = "INT16"] = 259; + values[valuesById[772] = "UINT16"] = 772; + values[valuesById[261] = "INT24"] = 261; + values[valuesById[774] = "UINT24"] = 774; + values[valuesById[263] = "INT32"] = 263; + values[valuesById[776] = "UINT32"] = 776; + values[valuesById[265] = "INT64"] = 265; + values[valuesById[778] = "UINT64"] = 778; + values[valuesById[1035] = "FLOAT32"] = 1035; + values[valuesById[1036] = "FLOAT64"] = 1036; + values[valuesById[2061] = "TIMESTAMP"] = 2061; + values[valuesById[2062] = "DATE"] = 2062; + values[valuesById[2063] = "TIME"] = 2063; + values[valuesById[2064] = "DATETIME"] = 2064; + values[valuesById[785] = "YEAR"] = 785; + values[valuesById[18] = "DECIMAL"] = 18; + values[valuesById[6163] = "TEXT"] = 6163; + values[valuesById[10260] = "BLOB"] = 10260; + values[valuesById[6165] = "VARCHAR"] = 6165; + values[valuesById[10262] = "VARBINARY"] = 10262; + values[valuesById[6167] = "CHAR"] = 6167; + values[valuesById[10264] = "BINARY"] = 10264; + values[valuesById[2073] = "BIT"] = 2073; + values[valuesById[2074] = "ENUM"] = 2074; + values[valuesById[2075] = "SET"] = 2075; + values[valuesById[28] = "TUPLE"] = 28; + values[valuesById[2077] = "GEOMETRY"] = 2077; + values[valuesById[2078] = "JSON"] = 2078; + values[valuesById[31] = "EXPRESSION"] = 31; + values[valuesById[4128] = "HEXNUM"] = 4128; + values[valuesById[4129] = "HEXVAL"] = 4129; + values[valuesById[4130] = "BITNUM"] = 4130; + return values; + })(); + + query.Value = (function() { /** - * Properties of a ConcludeTransactionRequest. + * Properties of a Value. * @memberof query - * @interface IConcludeTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ConcludeTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ConcludeTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] ConcludeTransactionRequest target - * @property {string|null} [dtid] ConcludeTransactionRequest dtid + * @interface IValue + * @property {query.Type|null} [type] Value type + * @property {Uint8Array|null} [value] Value value */ /** - * Constructs a new ConcludeTransactionRequest. + * Constructs a new Value. * @memberof query - * @classdesc Represents a ConcludeTransactionRequest. - * @implements IConcludeTransactionRequest + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {query.IConcludeTransactionRequest=} [properties] Properties to set + * @param {query.IValue=} [properties] Properties to set */ - function ConcludeTransactionRequest(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66089,114 +65933,88 @@ $root.query = (function() { } /** - * ConcludeTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.effective_caller_id = null; - - /** - * ConcludeTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.immediate_caller_id = null; - - /** - * ConcludeTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ConcludeTransactionRequest + * Value type. + * @member {query.Type} type + * @memberof query.Value * @instance */ - ConcludeTransactionRequest.prototype.target = null; + Value.prototype.type = 0; /** - * ConcludeTransactionRequest dtid. - * @member {string} dtid - * @memberof query.ConcludeTransactionRequest + * Value value. + * @member {Uint8Array} value + * @memberof query.Value * @instance */ - ConcludeTransactionRequest.prototype.dtid = ""; + Value.prototype.value = $util.newBuffer([]); /** - * Creates a new ConcludeTransactionRequest instance using the specified properties. + * Creates a new Value instance using the specified properties. * @function create - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static - * @param {query.IConcludeTransactionRequest=} [properties] Properties to set - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest instance + * @param {query.IValue=} [properties] Properties to set + * @returns {query.Value} Value instance */ - ConcludeTransactionRequest.create = function create(properties) { - return new ConcludeTransactionRequest(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. * @function encode - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static - * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode + * @param {query.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConcludeTransactionRequest.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. * @function encodeDelimited - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static - * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode + * @param {query.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConcludeTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest + * @returns {query.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConcludeTransactionRequest.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.type = reader.int32(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -66207,146 +66025,306 @@ $root.query = (function() { }; /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest + * @returns {query.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConcludeTransactionRequest.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConcludeTransactionRequest message. + * Verifies a Value message. * @function verify - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConcludeTransactionRequest.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 257: + case 770: + case 259: + case 772: + case 261: + case 774: + case 263: + case 776: + case 265: + case 778: + case 1035: + case 1036: + case 2061: + case 2062: + case 2063: + case 2064: + case 785: + case 18: + case 6163: + case 10260: + case 6165: + case 10262: + case 6167: + case 10264: + case 2073: + case 2074: + case 2075: + case 28: + case 2077: + case 2078: + case 31: + case 4128: + case 4129: + case 4130: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static * @param {Object.} object Plain object - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest + * @returns {query.Value} Value */ - ConcludeTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ConcludeTransactionRequest) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.query.Value) return object; - var message = new $root.query.ConcludeTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ConcludeTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ConcludeTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ConcludeTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.query.Value(); + switch (object.type) { + case "NULL_TYPE": + case 0: + message.type = 0; + break; + case "INT8": + case 257: + message.type = 257; + break; + case "UINT8": + case 770: + message.type = 770; + break; + case "INT16": + case 259: + message.type = 259; + break; + case "UINT16": + case 772: + message.type = 772; + break; + case "INT24": + case 261: + message.type = 261; + break; + case "UINT24": + case 774: + message.type = 774; + break; + case "INT32": + case 263: + message.type = 263; + break; + case "UINT32": + case 776: + message.type = 776; + break; + case "INT64": + case 265: + message.type = 265; + break; + case "UINT64": + case 778: + message.type = 778; + break; + case "FLOAT32": + case 1035: + message.type = 1035; + break; + case "FLOAT64": + case 1036: + message.type = 1036; + break; + case "TIMESTAMP": + case 2061: + message.type = 2061; + break; + case "DATE": + case 2062: + message.type = 2062; + break; + case "TIME": + case 2063: + message.type = 2063; + break; + case "DATETIME": + case 2064: + message.type = 2064; + break; + case "YEAR": + case 785: + message.type = 785; + break; + case "DECIMAL": + case 18: + message.type = 18; + break; + case "TEXT": + case 6163: + message.type = 6163; + break; + case "BLOB": + case 10260: + message.type = 10260; + break; + case "VARCHAR": + case 6165: + message.type = 6165; + break; + case "VARBINARY": + case 10262: + message.type = 10262; + break; + case "CHAR": + case 6167: + message.type = 6167; + break; + case "BINARY": + case 10264: + message.type = 10264; + break; + case "BIT": + case 2073: + message.type = 2073; + break; + case "ENUM": + case 2074: + message.type = 2074; + break; + case "SET": + case 2075: + message.type = 2075; + break; + case "TUPLE": + case 28: + message.type = 28; + break; + case "GEOMETRY": + case 2077: + message.type = 2077; + break; + case "JSON": + case 2078: + message.type = 2078; + break; + case "EXPRESSION": + case 31: + message.type = 31; + break; + case "HEXNUM": + case 4128: + message.type = 4128; + break; + case "HEXVAL": + case 4129: + message.type = 4129; + break; + case "BITNUM": + case 4130: + message.type = 4130; + break; } - if (object.dtid != null) - message.dtid = String(object.dtid); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @static - * @param {query.ConcludeTransactionRequest} message ConcludeTransactionRequest + * @param {query.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConcludeTransactionRequest.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; + object.type = options.enums === String ? "NULL_TYPE" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.query.Type[message.type] : message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this ConcludeTransactionRequest to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof query.ConcludeTransactionRequest + * @memberof query.Value * @instance * @returns {Object.} JSON object */ - ConcludeTransactionRequest.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ConcludeTransactionRequest; + return Value; })(); - query.ConcludeTransactionResponse = (function() { + query.BindVariable = (function() { /** - * Properties of a ConcludeTransactionResponse. + * Properties of a BindVariable. * @memberof query - * @interface IConcludeTransactionResponse + * @interface IBindVariable + * @property {query.Type|null} [type] BindVariable type + * @property {Uint8Array|null} [value] BindVariable value + * @property {Array.|null} [values] BindVariable values */ /** - * Constructs a new ConcludeTransactionResponse. + * Constructs a new BindVariable. * @memberof query - * @classdesc Represents a ConcludeTransactionResponse. - * @implements IConcludeTransactionResponse + * @classdesc Represents a BindVariable. + * @implements IBindVariable * @constructor - * @param {query.IConcludeTransactionResponse=} [properties] Properties to set + * @param {query.IBindVariable=} [properties] Properties to set */ - function ConcludeTransactionResponse(properties) { + function BindVariable(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66354,63 +66332,105 @@ $root.query = (function() { } /** - * Creates a new ConcludeTransactionResponse instance using the specified properties. + * BindVariable type. + * @member {query.Type} type + * @memberof query.BindVariable + * @instance + */ + BindVariable.prototype.type = 0; + + /** + * BindVariable value. + * @member {Uint8Array} value + * @memberof query.BindVariable + * @instance + */ + BindVariable.prototype.value = $util.newBuffer([]); + + /** + * BindVariable values. + * @member {Array.} values + * @memberof query.BindVariable + * @instance + */ + BindVariable.prototype.values = $util.emptyArray; + + /** + * Creates a new BindVariable instance using the specified properties. * @function create - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static - * @param {query.IConcludeTransactionResponse=} [properties] Properties to set - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse instance + * @param {query.IBindVariable=} [properties] Properties to set + * @returns {query.BindVariable} BindVariable instance */ - ConcludeTransactionResponse.create = function create(properties) { - return new ConcludeTransactionResponse(properties); + BindVariable.create = function create(properties) { + return new BindVariable(properties); }; /** - * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. + * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. * @function encode - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static - * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode + * @param {query.IBindVariable} message BindVariable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConcludeTransactionResponse.encode = function encode(message, writer) { + BindVariable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.query.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. + * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. * @function encodeDelimited - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static - * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode + * @param {query.IBindVariable} message BindVariable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConcludeTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { + BindVariable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. + * Decodes a BindVariable message from the specified reader or buffer. * @function decode - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse + * @returns {query.BindVariable} BindVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConcludeTransactionResponse.decode = function decode(reader, length) { + BindVariable.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BindVariable(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.query.Value.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -66420,212 +66440,442 @@ $root.query = (function() { }; /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. + * Decodes a BindVariable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse + * @returns {query.BindVariable} BindVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConcludeTransactionResponse.decodeDelimited = function decodeDelimited(reader) { + BindVariable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConcludeTransactionResponse message. + * Verifies a BindVariable message. * @function verify - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConcludeTransactionResponse.verify = function verify(message) { + BindVariable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 257: + case 770: + case 259: + case 772: + case 261: + case 774: + case 263: + case 776: + case 265: + case 778: + case 1035: + case 1036: + case 2061: + case 2062: + case 2063: + case 2064: + case 785: + case 18: + case 6163: + case 10260: + case 6165: + case 10262: + case 6167: + case 10264: + case 2073: + case 2074: + case 2075: + case 28: + case 2077: + case 2078: + case 31: + case 4128: + case 4129: + case 4130: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.query.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ConcludeTransactionResponse + * @memberof query.BindVariable * @static * @param {Object.} object Plain object - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse + * @returns {query.BindVariable} BindVariable */ - ConcludeTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ConcludeTransactionResponse) + BindVariable.fromObject = function fromObject(object) { + if (object instanceof $root.query.BindVariable) return object; - return new $root.query.ConcludeTransactionResponse(); - }; - - /** - * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ConcludeTransactionResponse - * @static - * @param {query.ConcludeTransactionResponse} message ConcludeTransactionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcludeTransactionResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ConcludeTransactionResponse to JSON. - * @function toJSON - * @memberof query.ConcludeTransactionResponse - * @instance - * @returns {Object.} JSON object - */ - ConcludeTransactionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConcludeTransactionResponse; - })(); - - query.ReadTransactionRequest = (function() { - - /** - * Properties of a ReadTransactionRequest. - * @memberof query - * @interface IReadTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReadTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReadTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReadTransactionRequest target - * @property {string|null} [dtid] ReadTransactionRequest dtid - */ - - /** - * Constructs a new ReadTransactionRequest. - * @memberof query - * @classdesc Represents a ReadTransactionRequest. - * @implements IReadTransactionRequest - * @constructor - * @param {query.IReadTransactionRequest=} [properties] Properties to set - */ - function ReadTransactionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.effective_caller_id = null; - - /** - * ReadTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.immediate_caller_id = null; - + var message = new $root.query.BindVariable(); + switch (object.type) { + case "NULL_TYPE": + case 0: + message.type = 0; + break; + case "INT8": + case 257: + message.type = 257; + break; + case "UINT8": + case 770: + message.type = 770; + break; + case "INT16": + case 259: + message.type = 259; + break; + case "UINT16": + case 772: + message.type = 772; + break; + case "INT24": + case 261: + message.type = 261; + break; + case "UINT24": + case 774: + message.type = 774; + break; + case "INT32": + case 263: + message.type = 263; + break; + case "UINT32": + case 776: + message.type = 776; + break; + case "INT64": + case 265: + message.type = 265; + break; + case "UINT64": + case 778: + message.type = 778; + break; + case "FLOAT32": + case 1035: + message.type = 1035; + break; + case "FLOAT64": + case 1036: + message.type = 1036; + break; + case "TIMESTAMP": + case 2061: + message.type = 2061; + break; + case "DATE": + case 2062: + message.type = 2062; + break; + case "TIME": + case 2063: + message.type = 2063; + break; + case "DATETIME": + case 2064: + message.type = 2064; + break; + case "YEAR": + case 785: + message.type = 785; + break; + case "DECIMAL": + case 18: + message.type = 18; + break; + case "TEXT": + case 6163: + message.type = 6163; + break; + case "BLOB": + case 10260: + message.type = 10260; + break; + case "VARCHAR": + case 6165: + message.type = 6165; + break; + case "VARBINARY": + case 10262: + message.type = 10262; + break; + case "CHAR": + case 6167: + message.type = 6167; + break; + case "BINARY": + case 10264: + message.type = 10264; + break; + case "BIT": + case 2073: + message.type = 2073; + break; + case "ENUM": + case 2074: + message.type = 2074; + break; + case "SET": + case 2075: + message.type = 2075; + break; + case "TUPLE": + case 28: + message.type = 28; + break; + case "GEOMETRY": + case 2077: + message.type = 2077; + break; + case "JSON": + case 2078: + message.type = 2078; + break; + case "EXPRESSION": + case 31: + message.type = 31; + break; + case "HEXNUM": + case 4128: + message.type = 4128; + break; + case "HEXVAL": + case 4129: + message.type = 4129; + break; + case "BITNUM": + case 4130: + message.type = 4130; + break; + } + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".query.BindVariable.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".query.BindVariable.values: object expected"); + message.values[i] = $root.query.Value.fromObject(object.values[i]); + } + } + return message; + }; + /** - * ReadTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReadTransactionRequest + * Creates a plain object from a BindVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof query.BindVariable + * @static + * @param {query.BindVariable} message BindVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.type = options.enums === String ? "NULL_TYPE" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.query.Type[message.type] : message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.query.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this BindVariable to JSON. + * @function toJSON + * @memberof query.BindVariable * @instance + * @returns {Object.} JSON object */ - ReadTransactionRequest.prototype.target = null; + BindVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BindVariable; + })(); + + query.BoundQuery = (function() { /** - * ReadTransactionRequest dtid. - * @member {string} dtid - * @memberof query.ReadTransactionRequest + * Properties of a BoundQuery. + * @memberof query + * @interface IBoundQuery + * @property {string|null} [sql] BoundQuery sql + * @property {Object.|null} [bind_variables] BoundQuery bind_variables + */ + + /** + * Constructs a new BoundQuery. + * @memberof query + * @classdesc Represents a BoundQuery. + * @implements IBoundQuery + * @constructor + * @param {query.IBoundQuery=} [properties] Properties to set + */ + function BoundQuery(properties) { + this.bind_variables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoundQuery sql. + * @member {string} sql + * @memberof query.BoundQuery * @instance */ - ReadTransactionRequest.prototype.dtid = ""; + BoundQuery.prototype.sql = ""; /** - * Creates a new ReadTransactionRequest instance using the specified properties. + * BoundQuery bind_variables. + * @member {Object.} bind_variables + * @memberof query.BoundQuery + * @instance + */ + BoundQuery.prototype.bind_variables = $util.emptyObject; + + /** + * Creates a new BoundQuery instance using the specified properties. * @function create - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static - * @param {query.IReadTransactionRequest=} [properties] Properties to set - * @returns {query.ReadTransactionRequest} ReadTransactionRequest instance + * @param {query.IBoundQuery=} [properties] Properties to set + * @returns {query.BoundQuery} BoundQuery instance */ - ReadTransactionRequest.create = function create(properties) { - return new ReadTransactionRequest(properties); + BoundQuery.create = function create(properties) { + return new BoundQuery(properties); }; /** - * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. + * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. * @function encode - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static - * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode + * @param {query.IBoundQuery} message BoundQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadTransactionRequest.encode = function encode(message, writer) { + BoundQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sql); + if (message.bind_variables != null && Object.hasOwnProperty.call(message, "bind_variables")) + for (var keys = Object.keys(message.bind_variables), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.query.BindVariable.encode(message.bind_variables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. + * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static - * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode + * @param {query.IBoundQuery} message BoundQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { + BoundQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer. + * Decodes a BoundQuery message from the specified reader or buffer. * @function decode - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReadTransactionRequest} ReadTransactionRequest + * @returns {query.BoundQuery} BoundQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReadTransactionRequest.decode = function decode(reader, length) { + BoundQuery.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BoundQuery(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.sql = reader.string(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); + if (message.bind_variables === $util.emptyObject) + message.bind_variables = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.query.BindVariable.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.bind_variables[key] = value; break; default: reader.skipType(tag & 7); @@ -66636,147 +66886,146 @@ $root.query = (function() { }; /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. + * Decodes a BoundQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReadTransactionRequest} ReadTransactionRequest + * @returns {query.BoundQuery} BoundQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReadTransactionRequest.decodeDelimited = function decodeDelimited(reader) { + BoundQuery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadTransactionRequest message. + * Verifies a BoundQuery message. * @function verify - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReadTransactionRequest.verify = function verify(message) { + BoundQuery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; + if (message.sql != null && message.hasOwnProperty("sql")) + if (!$util.isString(message.sql)) + return "sql: string expected"; + if (message.bind_variables != null && message.hasOwnProperty("bind_variables")) { + if (!$util.isObject(message.bind_variables)) + return "bind_variables: object expected"; + var key = Object.keys(message.bind_variables); + for (var i = 0; i < key.length; ++i) { + var error = $root.query.BindVariable.verify(message.bind_variables[key[i]]); + if (error) + return "bind_variables." + error; + } } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; return null; }; /** - * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static * @param {Object.} object Plain object - * @returns {query.ReadTransactionRequest} ReadTransactionRequest + * @returns {query.BoundQuery} BoundQuery */ - ReadTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReadTransactionRequest) + BoundQuery.fromObject = function fromObject(object) { + if (object instanceof $root.query.BoundQuery) return object; - var message = new $root.query.ReadTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReadTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReadTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReadTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.query.BoundQuery(); + if (object.sql != null) + message.sql = String(object.sql); + if (object.bind_variables) { + if (typeof object.bind_variables !== "object") + throw TypeError(".query.BoundQuery.bind_variables: object expected"); + message.bind_variables = {}; + for (var keys = Object.keys(object.bind_variables), i = 0; i < keys.length; ++i) { + if (typeof object.bind_variables[keys[i]] !== "object") + throw TypeError(".query.BoundQuery.bind_variables: object expected"); + message.bind_variables[keys[i]] = $root.query.BindVariable.fromObject(object.bind_variables[keys[i]]); + } } - if (object.dtid != null) - message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. + * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @static - * @param {query.ReadTransactionRequest} message ReadTransactionRequest + * @param {query.BoundQuery} message BoundQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadTransactionRequest.toObject = function toObject(message, options) { + BoundQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; + if (options.objects || options.defaults) + object.bind_variables = {}; + if (options.defaults) + object.sql = ""; + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = message.sql; + var keys2; + if (message.bind_variables && (keys2 = Object.keys(message.bind_variables)).length) { + object.bind_variables = {}; + for (var j = 0; j < keys2.length; ++j) + object.bind_variables[keys2[j]] = $root.query.BindVariable.toObject(message.bind_variables[keys2[j]], options); } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; return object; }; /** - * Converts this ReadTransactionRequest to JSON. + * Converts this BoundQuery to JSON. * @function toJSON - * @memberof query.ReadTransactionRequest + * @memberof query.BoundQuery * @instance * @returns {Object.} JSON object */ - ReadTransactionRequest.prototype.toJSON = function toJSON() { + BoundQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReadTransactionRequest; + return BoundQuery; })(); - query.ReadTransactionResponse = (function() { + query.ExecuteOptions = (function() { /** - * Properties of a ReadTransactionResponse. + * Properties of an ExecuteOptions. * @memberof query - * @interface IReadTransactionResponse - * @property {query.ITransactionMetadata|null} [metadata] ReadTransactionResponse metadata + * @interface IExecuteOptions + * @property {query.ExecuteOptions.IncludedFields|null} [included_fields] ExecuteOptions included_fields + * @property {boolean|null} [client_found_rows] ExecuteOptions client_found_rows + * @property {query.ExecuteOptions.Workload|null} [workload] ExecuteOptions workload + * @property {number|Long|null} [sql_select_limit] ExecuteOptions sql_select_limit + * @property {query.ExecuteOptions.TransactionIsolation|null} [transaction_isolation] ExecuteOptions transaction_isolation + * @property {boolean|null} [skip_query_plan_cache] ExecuteOptions skip_query_plan_cache + * @property {query.ExecuteOptions.PlannerVersion|null} [planner_version] ExecuteOptions planner_version + * @property {boolean|null} [has_created_temp_tables] ExecuteOptions has_created_temp_tables + * @property {query.ExecuteOptions.Consolidator|null} [consolidator] ExecuteOptions consolidator + * @property {Array.|null} [transaction_access_mode] ExecuteOptions transaction_access_mode + * @property {string|null} [WorkloadName] ExecuteOptions WorkloadName */ /** - * Constructs a new ReadTransactionResponse. + * Constructs a new ExecuteOptions. * @memberof query - * @classdesc Represents a ReadTransactionResponse. - * @implements IReadTransactionResponse + * @classdesc Represents an ExecuteOptions. + * @implements IExecuteOptions * @constructor - * @param {query.IReadTransactionResponse=} [properties] Properties to set + * @param {query.IExecuteOptions=} [properties] Properties to set */ - function ReadTransactionResponse(properties) { + function ExecuteOptions(properties) { + this.transaction_access_mode = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66784,355 +67033,216 @@ $root.query = (function() { } /** - * ReadTransactionResponse metadata. - * @member {query.ITransactionMetadata|null|undefined} metadata - * @memberof query.ReadTransactionResponse + * ExecuteOptions included_fields. + * @member {query.ExecuteOptions.IncludedFields} included_fields + * @memberof query.ExecuteOptions * @instance */ - ReadTransactionResponse.prototype.metadata = null; + ExecuteOptions.prototype.included_fields = 0; /** - * Creates a new ReadTransactionResponse instance using the specified properties. - * @function create - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse=} [properties] Properties to set - * @returns {query.ReadTransactionResponse} ReadTransactionResponse instance + * ExecuteOptions client_found_rows. + * @member {boolean} client_found_rows + * @memberof query.ExecuteOptions + * @instance */ - ReadTransactionResponse.create = function create(properties) { - return new ReadTransactionResponse(properties); - }; + ExecuteOptions.prototype.client_found_rows = false; /** - * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @function encode - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.query.TransactionMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ReadTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = $root.query.TransactionMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReadTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadTransactionResponse message. - * @function verify - * @memberof query.ReadTransactionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadTransactionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.query.TransactionMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReadTransactionResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - */ - ReadTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReadTransactionResponse) - return object; - var message = new $root.query.ReadTransactionResponse(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".query.ReadTransactionResponse.metadata: object expected"); - message.metadata = $root.query.TransactionMetadata.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReadTransactionResponse - * @static - * @param {query.ReadTransactionResponse} message ReadTransactionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadTransactionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.query.TransactionMetadata.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this ReadTransactionResponse to JSON. - * @function toJSON - * @memberof query.ReadTransactionResponse + * ExecuteOptions workload. + * @member {query.ExecuteOptions.Workload} workload + * @memberof query.ExecuteOptions * @instance - * @returns {Object.} JSON object - */ - ReadTransactionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReadTransactionResponse; - })(); - - query.BeginExecuteRequest = (function() { - - /** - * Properties of a BeginExecuteRequest. - * @memberof query - * @interface IBeginExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginExecuteRequest target - * @property {query.IBoundQuery|null} [query] BeginExecuteRequest query - * @property {query.IExecuteOptions|null} [options] BeginExecuteRequest options - * @property {number|Long|null} [reserved_id] BeginExecuteRequest reserved_id - * @property {Array.|null} [pre_queries] BeginExecuteRequest pre_queries */ + ExecuteOptions.prototype.workload = 0; /** - * Constructs a new BeginExecuteRequest. - * @memberof query - * @classdesc Represents a BeginExecuteRequest. - * @implements IBeginExecuteRequest - * @constructor - * @param {query.IBeginExecuteRequest=} [properties] Properties to set + * ExecuteOptions sql_select_limit. + * @member {number|Long} sql_select_limit + * @memberof query.ExecuteOptions + * @instance */ - function BeginExecuteRequest(properties) { - this.pre_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ExecuteOptions.prototype.sql_select_limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BeginExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginExecuteRequest + * ExecuteOptions transaction_isolation. + * @member {query.ExecuteOptions.TransactionIsolation} transaction_isolation + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.effective_caller_id = null; + ExecuteOptions.prototype.transaction_isolation = 0; /** - * BeginExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginExecuteRequest + * ExecuteOptions skip_query_plan_cache. + * @member {boolean} skip_query_plan_cache + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.immediate_caller_id = null; + ExecuteOptions.prototype.skip_query_plan_cache = false; /** - * BeginExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginExecuteRequest + * ExecuteOptions planner_version. + * @member {query.ExecuteOptions.PlannerVersion} planner_version + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.target = null; + ExecuteOptions.prototype.planner_version = 0; /** - * BeginExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.BeginExecuteRequest + * ExecuteOptions has_created_temp_tables. + * @member {boolean} has_created_temp_tables + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.query = null; + ExecuteOptions.prototype.has_created_temp_tables = false; /** - * BeginExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginExecuteRequest + * ExecuteOptions consolidator. + * @member {query.ExecuteOptions.Consolidator} consolidator + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.options = null; + ExecuteOptions.prototype.consolidator = 0; /** - * BeginExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.BeginExecuteRequest + * ExecuteOptions transaction_access_mode. + * @member {Array.} transaction_access_mode + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExecuteOptions.prototype.transaction_access_mode = $util.emptyArray; /** - * BeginExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.BeginExecuteRequest + * ExecuteOptions WorkloadName. + * @member {string} WorkloadName + * @memberof query.ExecuteOptions * @instance */ - BeginExecuteRequest.prototype.pre_queries = $util.emptyArray; + ExecuteOptions.prototype.WorkloadName = ""; /** - * Creates a new BeginExecuteRequest instance using the specified properties. + * Creates a new ExecuteOptions instance using the specified properties. * @function create - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static - * @param {query.IBeginExecuteRequest=} [properties] Properties to set - * @returns {query.BeginExecuteRequest} BeginExecuteRequest instance + * @param {query.IExecuteOptions=} [properties] Properties to set + * @returns {query.ExecuteOptions} ExecuteOptions instance */ - BeginExecuteRequest.create = function create(properties) { - return new BeginExecuteRequest(properties); + ExecuteOptions.create = function create(properties) { + return new ExecuteOptions(properties); }; /** - * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. + * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. * @function encode - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static - * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode + * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginExecuteRequest.encode = function encode(message, writer) { + ExecuteOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.reserved_id); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); + if (message.included_fields != null && Object.hasOwnProperty.call(message, "included_fields")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.included_fields); + if (message.client_found_rows != null && Object.hasOwnProperty.call(message, "client_found_rows")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_found_rows); + if (message.workload != null && Object.hasOwnProperty.call(message, "workload")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.workload); + if (message.sql_select_limit != null && Object.hasOwnProperty.call(message, "sql_select_limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.sql_select_limit); + if (message.transaction_isolation != null && Object.hasOwnProperty.call(message, "transaction_isolation")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.transaction_isolation); + if (message.skip_query_plan_cache != null && Object.hasOwnProperty.call(message, "skip_query_plan_cache")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.skip_query_plan_cache); + if (message.planner_version != null && Object.hasOwnProperty.call(message, "planner_version")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.planner_version); + if (message.has_created_temp_tables != null && Object.hasOwnProperty.call(message, "has_created_temp_tables")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.has_created_temp_tables); + if (message.consolidator != null && Object.hasOwnProperty.call(message, "consolidator")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.consolidator); + if (message.transaction_access_mode != null && message.transaction_access_mode.length) { + writer.uint32(/* id 14, wireType 2 =*/114).fork(); + for (var i = 0; i < message.transaction_access_mode.length; ++i) + writer.int32(message.transaction_access_mode[i]); + writer.ldelim(); + } + if (message.WorkloadName != null && Object.hasOwnProperty.call(message, "WorkloadName")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.WorkloadName); return writer; }; /** - * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. + * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. * @function encodeDelimited - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static - * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode + * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer. + * Decodes an ExecuteOptions message from the specified reader or buffer. * @function decode - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteRequest} BeginExecuteRequest + * @returns {query.ExecuteOptions} ExecuteOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginExecuteRequest.decode = function decode(reader, length) { + ExecuteOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + message.included_fields = reader.int32(); break; case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + message.client_found_rows = reader.bool(); break; case 6: - message.reserved_id = reader.int64(); + message.workload = reader.int32(); break; - case 7: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); + case 8: + message.sql_select_limit = reader.int64(); + break; + case 9: + message.transaction_isolation = reader.int32(); + break; + case 10: + message.skip_query_plan_cache = reader.bool(); + break; + case 11: + message.planner_version = reader.int32(); + break; + case 12: + message.has_created_temp_tables = reader.bool(); + break; + case 13: + message.consolidator = reader.int32(); + break; + case 14: + if (!(message.transaction_access_mode && message.transaction_access_mode.length)) + message.transaction_access_mode = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.transaction_access_mode.push(reader.int32()); + } else + message.transaction_access_mode.push(reader.int32()); + break; + case 15: + message.WorkloadName = reader.string(); break; default: reader.skipType(tag & 7); @@ -67143,212 +67253,501 @@ $root.query = (function() { }; /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteRequest} BeginExecuteRequest + * @returns {query.ExecuteOptions} ExecuteOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BeginExecuteRequest message. + * Verifies an ExecuteOptions message. * @function verify - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BeginExecuteRequest.verify = function verify(message) { + ExecuteOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; + if (message.included_fields != null && message.hasOwnProperty("included_fields")) + switch (message.included_fields) { + default: + return "included_fields: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) + if (typeof message.client_found_rows !== "boolean") + return "client_found_rows: boolean expected"; + if (message.workload != null && message.hasOwnProperty("workload")) + switch (message.workload) { + default: + return "workload: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) + if (!$util.isInteger(message.sql_select_limit) && !(message.sql_select_limit && $util.isInteger(message.sql_select_limit.low) && $util.isInteger(message.sql_select_limit.high))) + return "sql_select_limit: integer|Long expected"; + if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) + switch (message.transaction_isolation) { + default: + return "transaction_isolation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) + if (typeof message.skip_query_plan_cache !== "boolean") + return "skip_query_plan_cache: boolean expected"; + if (message.planner_version != null && message.hasOwnProperty("planner_version")) + switch (message.planner_version) { + default: + return "planner_version: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) + if (typeof message.has_created_temp_tables !== "boolean") + return "has_created_temp_tables: boolean expected"; + if (message.consolidator != null && message.hasOwnProperty("consolidator")) + switch (message.consolidator) { + default: + return "consolidator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.transaction_access_mode != null && message.hasOwnProperty("transaction_access_mode")) { + if (!Array.isArray(message.transaction_access_mode)) + return "transaction_access_mode: array expected"; + for (var i = 0; i < message.transaction_access_mode.length; ++i) + switch (message.transaction_access_mode[i]) { + default: + return "transaction_access_mode: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } + if (message.WorkloadName != null && message.hasOwnProperty("WorkloadName")) + if (!$util.isString(message.WorkloadName)) + return "WorkloadName: string expected"; return null; }; /** - * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static * @param {Object.} object Plain object - * @returns {query.BeginExecuteRequest} BeginExecuteRequest + * @returns {query.ExecuteOptions} ExecuteOptions */ - BeginExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteRequest) + ExecuteOptions.fromObject = function fromObject(object) { + if (object instanceof $root.query.ExecuteOptions) return object; - var message = new $root.query.BeginExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + var message = new $root.query.ExecuteOptions(); + switch (object.included_fields) { + case "TYPE_AND_NAME": + case 0: + message.included_fields = 0; + break; + case "TYPE_ONLY": + case 1: + message.included_fields = 1; + break; + case "ALL": + case 2: + message.included_fields = 2; + break; } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + if (object.client_found_rows != null) + message.client_found_rows = Boolean(object.client_found_rows); + switch (object.workload) { + case "UNSPECIFIED": + case 0: + message.workload = 0; + break; + case "OLTP": + case 1: + message.workload = 1; + break; + case "OLAP": + case 2: + message.workload = 2; + break; + case "DBA": + case 3: + message.workload = 3; + break; } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + if (object.sql_select_limit != null) + if ($util.Long) + (message.sql_select_limit = $util.Long.fromValue(object.sql_select_limit)).unsigned = false; + else if (typeof object.sql_select_limit === "string") + message.sql_select_limit = parseInt(object.sql_select_limit, 10); + else if (typeof object.sql_select_limit === "number") + message.sql_select_limit = object.sql_select_limit; + else if (typeof object.sql_select_limit === "object") + message.sql_select_limit = new $util.LongBits(object.sql_select_limit.low >>> 0, object.sql_select_limit.high >>> 0).toNumber(); + switch (object.transaction_isolation) { + case "DEFAULT": + case 0: + message.transaction_isolation = 0; + break; + case "REPEATABLE_READ": + case 1: + message.transaction_isolation = 1; + break; + case "READ_COMMITTED": + case 2: + message.transaction_isolation = 2; + break; + case "READ_UNCOMMITTED": + case 3: + message.transaction_isolation = 3; + break; + case "SERIALIZABLE": + case 4: + message.transaction_isolation = 4; + break; + case "CONSISTENT_SNAPSHOT_READ_ONLY": + case 5: + message.transaction_isolation = 5; + break; + case "AUTOCOMMIT": + case 6: + message.transaction_isolation = 6; + break; } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.BeginExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); + if (object.skip_query_plan_cache != null) + message.skip_query_plan_cache = Boolean(object.skip_query_plan_cache); + switch (object.planner_version) { + case "DEFAULT_PLANNER": + case 0: + message.planner_version = 0; + break; + case "V3": + case 1: + message.planner_version = 1; + break; + case "Gen4": + case 2: + message.planner_version = 2; + break; + case "Gen4Greedy": + case 3: + message.planner_version = 3; + break; + case "Gen4Left2Right": + case 4: + message.planner_version = 4; + break; + case "Gen4WithFallback": + case 5: + message.planner_version = 5; + break; + case "Gen4CompareV3": + case 6: + message.planner_version = 6; + break; } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); + if (object.has_created_temp_tables != null) + message.has_created_temp_tables = Boolean(object.has_created_temp_tables); + switch (object.consolidator) { + case "CONSOLIDATOR_UNSPECIFIED": + case 0: + message.consolidator = 0; + break; + case "CONSOLIDATOR_DISABLED": + case 1: + message.consolidator = 1; + break; + case "CONSOLIDATOR_ENABLED": + case 2: + message.consolidator = 2; + break; + case "CONSOLIDATOR_ENABLED_REPLICAS": + case 3: + message.consolidator = 3; + break; } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.BeginExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); + if (object.transaction_access_mode) { + if (!Array.isArray(object.transaction_access_mode)) + throw TypeError(".query.ExecuteOptions.transaction_access_mode: array expected"); + message.transaction_access_mode = []; + for (var i = 0; i < object.transaction_access_mode.length; ++i) + switch (object.transaction_access_mode[i]) { + default: + case "CONSISTENT_SNAPSHOT": + case 0: + message.transaction_access_mode[i] = 0; + break; + case "READ_WRITE": + case 1: + message.transaction_access_mode[i] = 1; + break; + case "READ_ONLY": + case 2: + message.transaction_access_mode[i] = 2; + break; + } } + if (object.WorkloadName != null) + message.WorkloadName = String(object.WorkloadName); return message; }; /** - * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. * @function toObject - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @static - * @param {query.BeginExecuteRequest} message BeginExecuteRequest + * @param {query.ExecuteOptions} message ExecuteOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginExecuteRequest.toObject = function toObject(message, options) { + ExecuteOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pre_queries = []; + object.transaction_access_mode = []; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; + object.included_fields = options.enums === String ? "TYPE_AND_NAME" : 0; + object.client_found_rows = false; + object.workload = options.enums === String ? "UNSPECIFIED" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.sql_select_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.reserved_id = options.longs === String ? "0" : 0; + object.sql_select_limit = options.longs === String ? "0" : 0; + object.transaction_isolation = options.enums === String ? "DEFAULT" : 0; + object.skip_query_plan_cache = false; + object.planner_version = options.enums === String ? "DEFAULT_PLANNER" : 0; + object.has_created_temp_tables = false; + object.consolidator = options.enums === String ? "CONSOLIDATOR_UNSPECIFIED" : 0; + object.WorkloadName = ""; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + if (message.included_fields != null && message.hasOwnProperty("included_fields")) + object.included_fields = options.enums === String ? $root.query.ExecuteOptions.IncludedFields[message.included_fields] : message.included_fields; + if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) + object.client_found_rows = message.client_found_rows; + if (message.workload != null && message.hasOwnProperty("workload")) + object.workload = options.enums === String ? $root.query.ExecuteOptions.Workload[message.workload] : message.workload; + if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) + if (typeof message.sql_select_limit === "number") + object.sql_select_limit = options.longs === String ? String(message.sql_select_limit) : message.sql_select_limit; else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; + object.sql_select_limit = options.longs === String ? $util.Long.prototype.toString.call(message.sql_select_limit) : options.longs === Number ? new $util.LongBits(message.sql_select_limit.low >>> 0, message.sql_select_limit.high >>> 0).toNumber() : message.sql_select_limit; + if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) + object.transaction_isolation = options.enums === String ? $root.query.ExecuteOptions.TransactionIsolation[message.transaction_isolation] : message.transaction_isolation; + if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) + object.skip_query_plan_cache = message.skip_query_plan_cache; + if (message.planner_version != null && message.hasOwnProperty("planner_version")) + object.planner_version = options.enums === String ? $root.query.ExecuteOptions.PlannerVersion[message.planner_version] : message.planner_version; + if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) + object.has_created_temp_tables = message.has_created_temp_tables; + if (message.consolidator != null && message.hasOwnProperty("consolidator")) + object.consolidator = options.enums === String ? $root.query.ExecuteOptions.Consolidator[message.consolidator] : message.consolidator; + if (message.transaction_access_mode && message.transaction_access_mode.length) { + object.transaction_access_mode = []; + for (var j = 0; j < message.transaction_access_mode.length; ++j) + object.transaction_access_mode[j] = options.enums === String ? $root.query.ExecuteOptions.TransactionAccessMode[message.transaction_access_mode[j]] : message.transaction_access_mode[j]; } + if (message.WorkloadName != null && message.hasOwnProperty("WorkloadName")) + object.WorkloadName = message.WorkloadName; return object; }; /** - * Converts this BeginExecuteRequest to JSON. + * Converts this ExecuteOptions to JSON. * @function toJSON - * @memberof query.BeginExecuteRequest + * @memberof query.ExecuteOptions * @instance * @returns {Object.} JSON object */ - BeginExecuteRequest.prototype.toJSON = function toJSON() { + ExecuteOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginExecuteRequest; + /** + * IncludedFields enum. + * @name query.ExecuteOptions.IncludedFields + * @enum {number} + * @property {number} TYPE_AND_NAME=0 TYPE_AND_NAME value + * @property {number} TYPE_ONLY=1 TYPE_ONLY value + * @property {number} ALL=2 ALL value + */ + ExecuteOptions.IncludedFields = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_AND_NAME"] = 0; + values[valuesById[1] = "TYPE_ONLY"] = 1; + values[valuesById[2] = "ALL"] = 2; + return values; + })(); + + /** + * Workload enum. + * @name query.ExecuteOptions.Workload + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} OLTP=1 OLTP value + * @property {number} OLAP=2 OLAP value + * @property {number} DBA=3 DBA value + */ + ExecuteOptions.Workload = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "OLTP"] = 1; + values[valuesById[2] = "OLAP"] = 2; + values[valuesById[3] = "DBA"] = 3; + return values; + })(); + + /** + * TransactionIsolation enum. + * @name query.ExecuteOptions.TransactionIsolation + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} REPEATABLE_READ=1 REPEATABLE_READ value + * @property {number} READ_COMMITTED=2 READ_COMMITTED value + * @property {number} READ_UNCOMMITTED=3 READ_UNCOMMITTED value + * @property {number} SERIALIZABLE=4 SERIALIZABLE value + * @property {number} CONSISTENT_SNAPSHOT_READ_ONLY=5 CONSISTENT_SNAPSHOT_READ_ONLY value + * @property {number} AUTOCOMMIT=6 AUTOCOMMIT value + */ + ExecuteOptions.TransactionIsolation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "REPEATABLE_READ"] = 1; + values[valuesById[2] = "READ_COMMITTED"] = 2; + values[valuesById[3] = "READ_UNCOMMITTED"] = 3; + values[valuesById[4] = "SERIALIZABLE"] = 4; + values[valuesById[5] = "CONSISTENT_SNAPSHOT_READ_ONLY"] = 5; + values[valuesById[6] = "AUTOCOMMIT"] = 6; + return values; + })(); + + /** + * PlannerVersion enum. + * @name query.ExecuteOptions.PlannerVersion + * @enum {number} + * @property {number} DEFAULT_PLANNER=0 DEFAULT_PLANNER value + * @property {number} V3=1 V3 value + * @property {number} Gen4=2 Gen4 value + * @property {number} Gen4Greedy=3 Gen4Greedy value + * @property {number} Gen4Left2Right=4 Gen4Left2Right value + * @property {number} Gen4WithFallback=5 Gen4WithFallback value + * @property {number} Gen4CompareV3=6 Gen4CompareV3 value + */ + ExecuteOptions.PlannerVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_PLANNER"] = 0; + values[valuesById[1] = "V3"] = 1; + values[valuesById[2] = "Gen4"] = 2; + values[valuesById[3] = "Gen4Greedy"] = 3; + values[valuesById[4] = "Gen4Left2Right"] = 4; + values[valuesById[5] = "Gen4WithFallback"] = 5; + values[valuesById[6] = "Gen4CompareV3"] = 6; + return values; + })(); + + /** + * Consolidator enum. + * @name query.ExecuteOptions.Consolidator + * @enum {number} + * @property {number} CONSOLIDATOR_UNSPECIFIED=0 CONSOLIDATOR_UNSPECIFIED value + * @property {number} CONSOLIDATOR_DISABLED=1 CONSOLIDATOR_DISABLED value + * @property {number} CONSOLIDATOR_ENABLED=2 CONSOLIDATOR_ENABLED value + * @property {number} CONSOLIDATOR_ENABLED_REPLICAS=3 CONSOLIDATOR_ENABLED_REPLICAS value + */ + ExecuteOptions.Consolidator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONSOLIDATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSOLIDATOR_DISABLED"] = 1; + values[valuesById[2] = "CONSOLIDATOR_ENABLED"] = 2; + values[valuesById[3] = "CONSOLIDATOR_ENABLED_REPLICAS"] = 3; + return values; + })(); + + /** + * TransactionAccessMode enum. + * @name query.ExecuteOptions.TransactionAccessMode + * @enum {number} + * @property {number} CONSISTENT_SNAPSHOT=0 CONSISTENT_SNAPSHOT value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + */ + ExecuteOptions.TransactionAccessMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONSISTENT_SNAPSHOT"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + return values; + })(); + + return ExecuteOptions; })(); - query.BeginExecuteResponse = (function() { + query.Field = (function() { /** - * Properties of a BeginExecuteResponse. + * Properties of a Field. * @memberof query - * @interface IBeginExecuteResponse - * @property {vtrpc.IRPCError|null} [error] BeginExecuteResponse error - * @property {query.IQueryResult|null} [result] BeginExecuteResponse result - * @property {number|Long|null} [transaction_id] BeginExecuteResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginExecuteResponse tablet_alias - * @property {string|null} [session_state_changes] BeginExecuteResponse session_state_changes + * @interface IField + * @property {string|null} [name] Field name + * @property {query.Type|null} [type] Field type + * @property {string|null} [table] Field table + * @property {string|null} [org_table] Field org_table + * @property {string|null} [database] Field database + * @property {string|null} [org_name] Field org_name + * @property {number|null} [column_length] Field column_length + * @property {number|null} [charset] Field charset + * @property {number|null} [decimals] Field decimals + * @property {number|null} [flags] Field flags + * @property {string|null} [column_type] Field column_type */ /** - * Constructs a new BeginExecuteResponse. + * Constructs a new Field. * @memberof query - * @classdesc Represents a BeginExecuteResponse. - * @implements IBeginExecuteResponse + * @classdesc Represents a Field. + * @implements IField * @constructor - * @param {query.IBeginExecuteResponse=} [properties] Properties to set + * @param {query.IField=} [properties] Properties to set */ - function BeginExecuteResponse(properties) { + function Field(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67356,127 +67755,205 @@ $root.query = (function() { } /** - * BeginExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.BeginExecuteResponse + * Field name. + * @member {string} name + * @memberof query.Field * @instance */ - BeginExecuteResponse.prototype.error = null; + Field.prototype.name = ""; /** - * BeginExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.BeginExecuteResponse + * Field type. + * @member {query.Type} type + * @memberof query.Field * @instance */ - BeginExecuteResponse.prototype.result = null; + Field.prototype.type = 0; /** - * BeginExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginExecuteResponse + * Field table. + * @member {string} table + * @memberof query.Field * @instance */ - BeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Field.prototype.table = ""; /** - * BeginExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginExecuteResponse + * Field org_table. + * @member {string} org_table + * @memberof query.Field * @instance */ - BeginExecuteResponse.prototype.tablet_alias = null; + Field.prototype.org_table = ""; /** - * BeginExecuteResponse session_state_changes. - * @member {string} session_state_changes - * @memberof query.BeginExecuteResponse + * Field database. + * @member {string} database + * @memberof query.Field * @instance */ - BeginExecuteResponse.prototype.session_state_changes = ""; + Field.prototype.database = ""; /** - * Creates a new BeginExecuteResponse instance using the specified properties. + * Field org_name. + * @member {string} org_name + * @memberof query.Field + * @instance + */ + Field.prototype.org_name = ""; + + /** + * Field column_length. + * @member {number} column_length + * @memberof query.Field + * @instance + */ + Field.prototype.column_length = 0; + + /** + * Field charset. + * @member {number} charset + * @memberof query.Field + * @instance + */ + Field.prototype.charset = 0; + + /** + * Field decimals. + * @member {number} decimals + * @memberof query.Field + * @instance + */ + Field.prototype.decimals = 0; + + /** + * Field flags. + * @member {number} flags + * @memberof query.Field + * @instance + */ + Field.prototype.flags = 0; + + /** + * Field column_type. + * @member {string} column_type + * @memberof query.Field + * @instance + */ + Field.prototype.column_type = ""; + + /** + * Creates a new Field instance using the specified properties. * @function create - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static - * @param {query.IBeginExecuteResponse=} [properties] Properties to set - * @returns {query.BeginExecuteResponse} BeginExecuteResponse instance + * @param {query.IField=} [properties] Properties to set + * @returns {query.Field} Field instance */ - BeginExecuteResponse.create = function create(properties) { - return new BeginExecuteResponse(properties); + Field.create = function create(properties) { + return new Field(properties); }; /** - * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. + * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. * @function encode - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static - * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode + * @param {query.IField} message Field message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginExecuteResponse.encode = function encode(message, writer) { + Field.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.session_state_changes); - return writer; - }; - - /** - * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginExecuteResponse - * @static - * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.table); + if (message.org_table != null && Object.hasOwnProperty.call(message, "org_table")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.org_table); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); + if (message.org_name != null && Object.hasOwnProperty.call(message, "org_name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.org_name); + if (message.column_length != null && Object.hasOwnProperty.call(message, "column_length")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.column_length); + if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.charset); + if (message.decimals != null && Object.hasOwnProperty.call(message, "decimals")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.decimals); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.flags); + if (message.column_type != null && Object.hasOwnProperty.call(message, "column_type")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.column_type); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof query.Field + * @static + * @param {query.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer. + * Decodes a Field message from the specified reader or buffer. * @function decode - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteResponse} BeginExecuteResponse + * @returns {query.Field} Field * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginExecuteResponse.decode = function decode(reader, length) { + Field.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Field(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.type = reader.int32(); break; case 3: - message.transaction_id = reader.int64(); + message.table = reader.string(); break; case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.org_table = reader.string(); break; case 5: - message.session_state_changes = reader.string(); + message.database = reader.string(); + break; + case 6: + message.org_name = reader.string(); + break; + case 7: + message.column_length = reader.uint32(); + break; + case 8: + message.charset = reader.uint32(); + break; + case 9: + message.decimals = reader.uint32(); + break; + case 10: + message.flags = reader.uint32(); + break; + case 11: + message.column_type = reader.string(); break; default: reader.skipType(tag & 7); @@ -67487,176 +67964,368 @@ $root.query = (function() { }; /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a Field message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteResponse} BeginExecuteResponse + * @returns {query.Field} Field * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + Field.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BeginExecuteResponse message. + * Verifies a Field message. * @function verify - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BeginExecuteResponse.verify = function verify(message) { + Field.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - if (!$util.isString(message.session_state_changes)) - return "session_state_changes: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 257: + case 770: + case 259: + case 772: + case 261: + case 774: + case 263: + case 776: + case 265: + case 778: + case 1035: + case 1036: + case 2061: + case 2062: + case 2063: + case 2064: + case 785: + case 18: + case 6163: + case 10260: + case 6165: + case 10262: + case 6167: + case 10264: + case 2073: + case 2074: + case 2075: + case 28: + case 2077: + case 2078: + case 31: + case 4128: + case 4129: + case 4130: + break; + } + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.org_table != null && message.hasOwnProperty("org_table")) + if (!$util.isString(message.org_table)) + return "org_table: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.org_name != null && message.hasOwnProperty("org_name")) + if (!$util.isString(message.org_name)) + return "org_name: string expected"; + if (message.column_length != null && message.hasOwnProperty("column_length")) + if (!$util.isInteger(message.column_length)) + return "column_length: integer expected"; + if (message.charset != null && message.hasOwnProperty("charset")) + if (!$util.isInteger(message.charset)) + return "charset: integer expected"; + if (message.decimals != null && message.hasOwnProperty("decimals")) + if (!$util.isInteger(message.decimals)) + return "decimals: integer expected"; + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.column_type != null && message.hasOwnProperty("column_type")) + if (!$util.isString(message.column_type)) + return "column_type: string expected"; return null; }; /** - * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Field message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static * @param {Object.} object Plain object - * @returns {query.BeginExecuteResponse} BeginExecuteResponse + * @returns {query.Field} Field */ - BeginExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteResponse) + Field.fromObject = function fromObject(object) { + if (object instanceof $root.query.Field) return object; - var message = new $root.query.BeginExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.BeginExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.BeginExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.query.Field(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "NULL_TYPE": + case 0: + message.type = 0; + break; + case "INT8": + case 257: + message.type = 257; + break; + case "UINT8": + case 770: + message.type = 770; + break; + case "INT16": + case 259: + message.type = 259; + break; + case "UINT16": + case 772: + message.type = 772; + break; + case "INT24": + case 261: + message.type = 261; + break; + case "UINT24": + case 774: + message.type = 774; + break; + case "INT32": + case 263: + message.type = 263; + break; + case "UINT32": + case 776: + message.type = 776; + break; + case "INT64": + case 265: + message.type = 265; + break; + case "UINT64": + case 778: + message.type = 778; + break; + case "FLOAT32": + case 1035: + message.type = 1035; + break; + case "FLOAT64": + case 1036: + message.type = 1036; + break; + case "TIMESTAMP": + case 2061: + message.type = 2061; + break; + case "DATE": + case 2062: + message.type = 2062; + break; + case "TIME": + case 2063: + message.type = 2063; + break; + case "DATETIME": + case 2064: + message.type = 2064; + break; + case "YEAR": + case 785: + message.type = 785; + break; + case "DECIMAL": + case 18: + message.type = 18; + break; + case "TEXT": + case 6163: + message.type = 6163; + break; + case "BLOB": + case 10260: + message.type = 10260; + break; + case "VARCHAR": + case 6165: + message.type = 6165; + break; + case "VARBINARY": + case 10262: + message.type = 10262; + break; + case "CHAR": + case 6167: + message.type = 6167; + break; + case "BINARY": + case 10264: + message.type = 10264; + break; + case "BIT": + case 2073: + message.type = 2073; + break; + case "ENUM": + case 2074: + message.type = 2074; + break; + case "SET": + case 2075: + message.type = 2075; + break; + case "TUPLE": + case 28: + message.type = 28; + break; + case "GEOMETRY": + case 2077: + message.type = 2077; + break; + case "JSON": + case 2078: + message.type = 2078; + break; + case "EXPRESSION": + case 31: + message.type = 31; + break; + case "HEXNUM": + case 4128: + message.type = 4128; + break; + case "HEXVAL": + case 4129: + message.type = 4129; + break; + case "BITNUM": + case 4130: + message.type = 4130; + break; } - if (object.session_state_changes != null) - message.session_state_changes = String(object.session_state_changes); + if (object.table != null) + message.table = String(object.table); + if (object.org_table != null) + message.org_table = String(object.org_table); + if (object.database != null) + message.database = String(object.database); + if (object.org_name != null) + message.org_name = String(object.org_name); + if (object.column_length != null) + message.column_length = object.column_length >>> 0; + if (object.charset != null) + message.charset = object.charset >>> 0; + if (object.decimals != null) + message.decimals = object.decimals >>> 0; + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.column_type != null) + message.column_type = String(object.column_type); return message; }; /** - * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a Field message. Also converts values to other types if specified. * @function toObject - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @static - * @param {query.BeginExecuteResponse} message BeginExecuteResponse + * @param {query.Field} message Field * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginExecuteResponse.toObject = function toObject(message, options) { + Field.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - object.session_state_changes = ""; + object.name = ""; + object.type = options.enums === String ? "NULL_TYPE" : 0; + object.table = ""; + object.org_table = ""; + object.database = ""; + object.org_name = ""; + object.column_length = 0; + object.charset = 0; + object.decimals = 0; + object.flags = 0; + object.column_type = ""; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - object.session_state_changes = message.session_state_changes; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.query.Type[message.type] : message.type; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.org_table != null && message.hasOwnProperty("org_table")) + object.org_table = message.org_table; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.org_name != null && message.hasOwnProperty("org_name")) + object.org_name = message.org_name; + if (message.column_length != null && message.hasOwnProperty("column_length")) + object.column_length = message.column_length; + if (message.charset != null && message.hasOwnProperty("charset")) + object.charset = message.charset; + if (message.decimals != null && message.hasOwnProperty("decimals")) + object.decimals = message.decimals; + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.column_type != null && message.hasOwnProperty("column_type")) + object.column_type = message.column_type; return object; }; /** - * Converts this BeginExecuteResponse to JSON. + * Converts this Field to JSON. * @function toJSON - * @memberof query.BeginExecuteResponse + * @memberof query.Field * @instance * @returns {Object.} JSON object */ - BeginExecuteResponse.prototype.toJSON = function toJSON() { + Field.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginExecuteResponse; + return Field; })(); - query.BeginStreamExecuteRequest = (function() { + query.Row = (function() { /** - * Properties of a BeginStreamExecuteRequest. + * Properties of a Row. * @memberof query - * @interface IBeginStreamExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginStreamExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginStreamExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginStreamExecuteRequest target - * @property {query.IBoundQuery|null} [query] BeginStreamExecuteRequest query - * @property {query.IExecuteOptions|null} [options] BeginStreamExecuteRequest options - * @property {Array.|null} [pre_queries] BeginStreamExecuteRequest pre_queries - * @property {number|Long|null} [reserved_id] BeginStreamExecuteRequest reserved_id + * @interface IRow + * @property {Array.|null} [lengths] Row lengths + * @property {Uint8Array|null} [values] Row values */ /** - * Constructs a new BeginStreamExecuteRequest. + * Constructs a new Row. * @memberof query - * @classdesc Represents a BeginStreamExecuteRequest. - * @implements IBeginStreamExecuteRequest + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {query.IBeginStreamExecuteRequest=} [properties] Properties to set + * @param {query.IRow=} [properties] Properties to set */ - function BeginStreamExecuteRequest(properties) { - this.pre_queries = []; + function Row(properties) { + this.lengths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67664,156 +68333,99 @@ $root.query = (function() { } /** - * BeginStreamExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginStreamExecuteRequest + * Row lengths. + * @member {Array.} lengths + * @memberof query.Row * @instance */ - BeginStreamExecuteRequest.prototype.effective_caller_id = null; + Row.prototype.lengths = $util.emptyArray; /** - * BeginStreamExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginStreamExecuteRequest + * Row values. + * @member {Uint8Array} values + * @memberof query.Row * @instance */ - BeginStreamExecuteRequest.prototype.immediate_caller_id = null; + Row.prototype.values = $util.newBuffer([]); /** - * BeginStreamExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginStreamExecuteRequest - * @instance + * Creates a new Row instance using the specified properties. + * @function create + * @memberof query.Row + * @static + * @param {query.IRow=} [properties] Properties to set + * @returns {query.Row} Row instance */ - BeginStreamExecuteRequest.prototype.target = null; + Row.create = function create(properties) { + return new Row(properties); + }; /** - * BeginStreamExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.BeginStreamExecuteRequest - * @instance - */ - BeginStreamExecuteRequest.prototype.query = null; - - /** - * BeginStreamExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginStreamExecuteRequest - * @instance - */ - BeginStreamExecuteRequest.prototype.options = null; - - /** - * BeginStreamExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.BeginStreamExecuteRequest - * @instance - */ - BeginStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; - - /** - * BeginStreamExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.BeginStreamExecuteRequest - * @instance - */ - BeginStreamExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new BeginStreamExecuteRequest instance using the specified properties. - * @function create - * @memberof query.BeginStreamExecuteRequest - * @static - * @param {query.IBeginStreamExecuteRequest=} [properties] Properties to set - * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest instance - */ - BeginStreamExecuteRequest.create = function create(properties) { - return new BeginStreamExecuteRequest(properties); - }; - - /** - * Encodes the specified BeginStreamExecuteRequest message. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. * @function encode - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static - * @param {query.IBeginStreamExecuteRequest} message BeginStreamExecuteRequest message or plain object to encode + * @param {query.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginStreamExecuteRequest.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); + if (message.lengths != null && message.lengths.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.lengths.length; ++i) + writer.sint64(message.lengths[i]); + writer.ldelim(); + } + if (message.values != null && Object.hasOwnProperty.call(message, "values")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.values); return writer; }; /** - * Encodes the specified BeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. * @function encodeDelimited - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static - * @param {query.IBeginStreamExecuteRequest} message BeginStreamExecuteRequest message or plain object to encode + * @param {query.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest + * @returns {query.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginStreamExecuteRequest.decode = function decode(reader, length) { + Row.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginStreamExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Row(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + if (!(message.lengths && message.lengths.length)) + message.lengths = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.lengths.push(reader.sint64()); + } else + message.lengths.push(reader.sint64()); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - case 7: - message.reserved_id = reader.int64(); + message.values = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -67824,212 +68436,154 @@ $root.query = (function() { }; /** - * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest + * @returns {query.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BeginStreamExecuteRequest message. + * Verifies a Row message. * @function verify - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BeginStreamExecuteRequest.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; + if (message.lengths != null && message.hasOwnProperty("lengths")) { + if (!Array.isArray(message.lengths)) + return "lengths: array expected"; + for (var i = 0; i < message.lengths.length; ++i) + if (!$util.isInteger(message.lengths[i]) && !(message.lengths[i] && $util.isInteger(message.lengths[i].low) && $util.isInteger(message.lengths[i].high))) + return "lengths: integer|Long[] expected"; } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; + if (message.values != null && message.hasOwnProperty("values")) + if (!(message.values && typeof message.values.length === "number" || $util.isString(message.values))) + return "values: buffer expected"; return null; }; /** - * Creates a BeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static * @param {Object.} object Plain object - * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest + * @returns {query.Row} Row */ - BeginStreamExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginStreamExecuteRequest) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.query.Row) return object; - var message = new $root.query.BeginStreamExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginStreamExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginStreamExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginStreamExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.BeginStreamExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginStreamExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.BeginStreamExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); + var message = new $root.query.Row(); + if (object.lengths) { + if (!Array.isArray(object.lengths)) + throw TypeError(".query.Row.lengths: array expected"); + message.lengths = []; + for (var i = 0; i < object.lengths.length; ++i) + if ($util.Long) + (message.lengths[i] = $util.Long.fromValue(object.lengths[i])).unsigned = false; + else if (typeof object.lengths[i] === "string") + message.lengths[i] = parseInt(object.lengths[i], 10); + else if (typeof object.lengths[i] === "number") + message.lengths[i] = object.lengths[i]; + else if (typeof object.lengths[i] === "object") + message.lengths[i] = new $util.LongBits(object.lengths[i].low >>> 0, object.lengths[i].high >>> 0).toNumber(); } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.values != null) + if (typeof object.values === "string") + $util.base64.decode(object.values, message.values = $util.newBuffer($util.base64.length(object.values)), 0); + else if (object.values.length) + message.values = object.values; return message; }; /** - * Creates a plain object from a BeginStreamExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a Row message. Also converts values to other types if specified. * @function toObject - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @static - * @param {query.BeginStreamExecuteRequest} message BeginStreamExecuteRequest + * @param {query.Row} message Row * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginStreamExecuteRequest.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pre_queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; + object.lengths = []; + if (options.defaults) + if (options.bytes === String) + object.values = ""; + else { + object.values = []; + if (options.bytes !== Array) + object.values = $util.newBuffer(object.values); + } + if (message.lengths && message.lengths.length) { + object.lengths = []; + for (var j = 0; j < message.lengths.length; ++j) + if (typeof message.lengths[j] === "number") + object.lengths[j] = options.longs === String ? String(message.lengths[j]) : message.lengths[j]; + else + object.lengths[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lengths[j]) : options.longs === Number ? new $util.LongBits(message.lengths[j].low >>> 0, message.lengths[j].high >>> 0).toNumber() : message.lengths[j]; } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.values != null && message.hasOwnProperty("values")) + object.values = options.bytes === String ? $util.base64.encode(message.values, 0, message.values.length) : options.bytes === Array ? Array.prototype.slice.call(message.values) : message.values; return object; }; /** - * Converts this BeginStreamExecuteRequest to JSON. + * Converts this Row to JSON. * @function toJSON - * @memberof query.BeginStreamExecuteRequest + * @memberof query.Row * @instance * @returns {Object.} JSON object */ - BeginStreamExecuteRequest.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginStreamExecuteRequest; + return Row; })(); - query.BeginStreamExecuteResponse = (function() { + query.QueryResult = (function() { /** - * Properties of a BeginStreamExecuteResponse. + * Properties of a QueryResult. * @memberof query - * @interface IBeginStreamExecuteResponse - * @property {vtrpc.IRPCError|null} [error] BeginStreamExecuteResponse error - * @property {query.IQueryResult|null} [result] BeginStreamExecuteResponse result - * @property {number|Long|null} [transaction_id] BeginStreamExecuteResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginStreamExecuteResponse tablet_alias - * @property {string|null} [session_state_changes] BeginStreamExecuteResponse session_state_changes + * @interface IQueryResult + * @property {Array.|null} [fields] QueryResult fields + * @property {number|Long|null} [rows_affected] QueryResult rows_affected + * @property {number|Long|null} [insert_id] QueryResult insert_id + * @property {Array.|null} [rows] QueryResult rows + * @property {string|null} [info] QueryResult info + * @property {string|null} [session_state_changes] QueryResult session_state_changes */ /** - * Constructs a new BeginStreamExecuteResponse. + * Constructs a new QueryResult. * @memberof query - * @classdesc Represents a BeginStreamExecuteResponse. - * @implements IBeginStreamExecuteResponse + * @classdesc Represents a QueryResult. + * @implements IQueryResult * @constructor - * @param {query.IBeginStreamExecuteResponse=} [properties] Properties to set + * @param {query.IQueryResult=} [properties] Properties to set */ - function BeginStreamExecuteResponse(properties) { + function QueryResult(properties) { + this.fields = []; + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68037,126 +68591,145 @@ $root.query = (function() { } /** - * BeginStreamExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.BeginStreamExecuteResponse + * QueryResult fields. + * @member {Array.} fields + * @memberof query.QueryResult * @instance */ - BeginStreamExecuteResponse.prototype.error = null; + QueryResult.prototype.fields = $util.emptyArray; /** - * BeginStreamExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.BeginStreamExecuteResponse + * QueryResult rows_affected. + * @member {number|Long} rows_affected + * @memberof query.QueryResult * @instance */ - BeginStreamExecuteResponse.prototype.result = null; + QueryResult.prototype.rows_affected = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * BeginStreamExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginStreamExecuteResponse + * QueryResult insert_id. + * @member {number|Long} insert_id + * @memberof query.QueryResult * @instance */ - BeginStreamExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + QueryResult.prototype.insert_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * BeginStreamExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginStreamExecuteResponse + * QueryResult rows. + * @member {Array.} rows + * @memberof query.QueryResult * @instance */ - BeginStreamExecuteResponse.prototype.tablet_alias = null; + QueryResult.prototype.rows = $util.emptyArray; /** - * BeginStreamExecuteResponse session_state_changes. + * QueryResult info. + * @member {string} info + * @memberof query.QueryResult + * @instance + */ + QueryResult.prototype.info = ""; + + /** + * QueryResult session_state_changes. * @member {string} session_state_changes - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @instance */ - BeginStreamExecuteResponse.prototype.session_state_changes = ""; + QueryResult.prototype.session_state_changes = ""; /** - * Creates a new BeginStreamExecuteResponse instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @function create - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static - * @param {query.IBeginStreamExecuteResponse=} [properties] Properties to set - * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse instance + * @param {query.IQueryResult=} [properties] Properties to set + * @returns {query.QueryResult} QueryResult instance */ - BeginStreamExecuteResponse.create = function create(properties) { - return new BeginStreamExecuteResponse(properties); + QueryResult.create = function create(properties) { + return new QueryResult(properties); }; /** - * Encodes the specified BeginStreamExecuteResponse message. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. + * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. * @function encode - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static - * @param {query.IBeginStreamExecuteResponse} message BeginStreamExecuteResponse message or plain object to encode + * @param {query.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginStreamExecuteResponse.encode = function encode(message, writer) { + QueryResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows_affected != null && Object.hasOwnProperty.call(message, "rows_affected")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected); + if (message.insert_id != null && Object.hasOwnProperty.call(message, "insert_id")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.insert_id); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.info); if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.session_state_changes); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.session_state_changes); return writer; }; /** - * Encodes the specified BeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. * @function encodeDelimited - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static - * @param {query.IBeginStreamExecuteResponse} message BeginStreamExecuteResponse message or plain object to encode + * @param {query.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BeginStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + QueryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @function decode - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse + * @returns {query.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginStreamExecuteResponse.decode = function decode(reader, length) { + QueryResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginStreamExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.query.Field.decode(reader, reader.uint32())); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.rows_affected = reader.uint64(); break; case 3: - message.transaction_id = reader.int64(); + message.insert_id = reader.uint64(); break; case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.query.Row.decode(reader, reader.uint32())); break; - case 5: + case 6: + message.info = reader.string(); + break; + case 7: message.session_state_changes = reader.string(); break; default: @@ -68168,50 +68741,59 @@ $root.query = (function() { }; /** - * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a QueryResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse + * @returns {query.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BeginStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + QueryResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BeginStreamExecuteResponse message. + * Verifies a QueryResult message. * @function verify - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BeginStreamExecuteResponse.verify = function verify(message) { + QueryResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.query.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; + if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) + if (!$util.isInteger(message.rows_affected) && !(message.rows_affected && $util.isInteger(message.rows_affected.low) && $util.isInteger(message.rows_affected.high))) + return "rows_affected: integer|Long expected"; + if (message.insert_id != null && message.hasOwnProperty("insert_id")) + if (!$util.isInteger(message.insert_id) && !(message.insert_id && $util.isInteger(message.insert_id.low) && $util.isInteger(message.insert_id.high))) + return "insert_id: integer|Long expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.query.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } } + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) if (!$util.isString(message.session_state_changes)) return "session_state_changes: string expected"; @@ -68219,121 +68801,153 @@ $root.query = (function() { }; /** - * Creates a BeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static * @param {Object.} object Plain object - * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse + * @returns {query.QueryResult} QueryResult */ - BeginStreamExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginStreamExecuteResponse) + QueryResult.fromObject = function fromObject(object) { + if (object instanceof $root.query.QueryResult) return object; - var message = new $root.query.BeginStreamExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.BeginStreamExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.BeginStreamExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.query.QueryResult(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".query.QueryResult.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".query.QueryResult.fields: object expected"); + message.fields[i] = $root.query.Field.fromObject(object.fields[i]); + } } - if (object.transaction_id != null) + if (object.rows_affected != null) if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginStreamExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + (message.rows_affected = $util.Long.fromValue(object.rows_affected)).unsigned = true; + else if (typeof object.rows_affected === "string") + message.rows_affected = parseInt(object.rows_affected, 10); + else if (typeof object.rows_affected === "number") + message.rows_affected = object.rows_affected; + else if (typeof object.rows_affected === "object") + message.rows_affected = new $util.LongBits(object.rows_affected.low >>> 0, object.rows_affected.high >>> 0).toNumber(true); + if (object.insert_id != null) + if ($util.Long) + (message.insert_id = $util.Long.fromValue(object.insert_id)).unsigned = true; + else if (typeof object.insert_id === "string") + message.insert_id = parseInt(object.insert_id, 10); + else if (typeof object.insert_id === "number") + message.insert_id = object.insert_id; + else if (typeof object.insert_id === "object") + message.insert_id = new $util.LongBits(object.insert_id.low >>> 0, object.insert_id.high >>> 0).toNumber(true); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".query.QueryResult.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".query.QueryResult.rows: object expected"); + message.rows[i] = $root.query.Row.fromObject(object.rows[i]); + } } + if (object.info != null) + message.info = String(object.info); if (object.session_state_changes != null) message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a BeginStreamExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a QueryResult message. Also converts values to other types if specified. * @function toObject - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @static - * @param {query.BeginStreamExecuteResponse} message BeginStreamExecuteResponse + * @param {query.QueryResult} message QueryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginStreamExecuteResponse.toObject = function toObject(message, options) { + QueryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.rows = []; + } if (options.defaults) { - object.error = null; - object.result = null; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.rows_affected = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; + object.rows_affected = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.insert_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.insert_id = options.longs === String ? "0" : 0; + object.info = ""; object.session_state_changes = ""; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + } + if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) + if (typeof message.rows_affected === "number") + object.rows_affected = options.longs === String ? String(message.rows_affected) : message.rows_affected; else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.rows_affected = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected) : options.longs === Number ? new $util.LongBits(message.rows_affected.low >>> 0, message.rows_affected.high >>> 0).toNumber(true) : message.rows_affected; + if (message.insert_id != null && message.hasOwnProperty("insert_id")) + if (typeof message.insert_id === "number") + object.insert_id = options.longs === String ? String(message.insert_id) : message.insert_id; + else + object.insert_id = options.longs === String ? $util.Long.prototype.toString.call(message.insert_id) : options.longs === Number ? new $util.LongBits(message.insert_id.low >>> 0, message.insert_id.high >>> 0).toNumber(true) : message.insert_id; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.query.Row.toObject(message.rows[j], options); + } + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this BeginStreamExecuteResponse to JSON. + * Converts this QueryResult to JSON. * @function toJSON - * @memberof query.BeginStreamExecuteResponse + * @memberof query.QueryResult * @instance * @returns {Object.} JSON object */ - BeginStreamExecuteResponse.prototype.toJSON = function toJSON() { + QueryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginStreamExecuteResponse; + return QueryResult; })(); - query.MessageStreamRequest = (function() { + query.QueryWarning = (function() { /** - * Properties of a MessageStreamRequest. + * Properties of a QueryWarning. * @memberof query - * @interface IMessageStreamRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageStreamRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageStreamRequest immediate_caller_id - * @property {query.ITarget|null} [target] MessageStreamRequest target - * @property {string|null} [name] MessageStreamRequest name + * @interface IQueryWarning + * @property {number|null} [code] QueryWarning code + * @property {string|null} [message] QueryWarning message */ /** - * Constructs a new MessageStreamRequest. + * Constructs a new QueryWarning. * @memberof query - * @classdesc Represents a MessageStreamRequest. - * @implements IMessageStreamRequest + * @classdesc Represents a QueryWarning. + * @implements IQueryWarning * @constructor - * @param {query.IMessageStreamRequest=} [properties] Properties to set + * @param {query.IQueryWarning=} [properties] Properties to set */ - function MessageStreamRequest(properties) { + function QueryWarning(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68341,114 +68955,88 @@ $root.query = (function() { } /** - * MessageStreamRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.effective_caller_id = null; - - /** - * MessageStreamRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.immediate_caller_id = null; - - /** - * MessageStreamRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.MessageStreamRequest + * QueryWarning code. + * @member {number} code + * @memberof query.QueryWarning * @instance */ - MessageStreamRequest.prototype.target = null; + QueryWarning.prototype.code = 0; /** - * MessageStreamRequest name. - * @member {string} name - * @memberof query.MessageStreamRequest + * QueryWarning message. + * @member {string} message + * @memberof query.QueryWarning * @instance */ - MessageStreamRequest.prototype.name = ""; + QueryWarning.prototype.message = ""; /** - * Creates a new MessageStreamRequest instance using the specified properties. + * Creates a new QueryWarning instance using the specified properties. * @function create - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static - * @param {query.IMessageStreamRequest=} [properties] Properties to set - * @returns {query.MessageStreamRequest} MessageStreamRequest instance + * @param {query.IQueryWarning=} [properties] Properties to set + * @returns {query.QueryWarning} QueryWarning instance */ - MessageStreamRequest.create = function create(properties) { - return new MessageStreamRequest(properties); + QueryWarning.create = function create(properties) { + return new QueryWarning(properties); }; /** - * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. + * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. * @function encode - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static - * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode + * @param {query.IQueryWarning} message QueryWarning message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageStreamRequest.encode = function encode(message, writer) { + QueryWarning.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); return writer; }; /** - * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. + * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. * @function encodeDelimited - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static - * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode + * @param {query.IQueryWarning} message QueryWarning message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + QueryWarning.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageStreamRequest message from the specified reader or buffer. + * Decodes a QueryWarning message from the specified reader or buffer. * @function decode - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.MessageStreamRequest} MessageStreamRequest + * @returns {query.QueryWarning} QueryWarning * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageStreamRequest.decode = function decode(reader, length) { + QueryWarning.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryWarning(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.code = reader.uint32(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.name = reader.string(); + message.message = reader.string(); break; default: reader.skipType(tag & 7); @@ -68459,147 +69047,118 @@ $root.query = (function() { }; /** - * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryWarning message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageStreamRequest} MessageStreamRequest + * @returns {query.QueryWarning} QueryWarning * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageStreamRequest.decodeDelimited = function decodeDelimited(reader) { + QueryWarning.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageStreamRequest message. + * Verifies a QueryWarning message. * @function verify - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageStreamRequest.verify = function verify(message) { + QueryWarning.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static * @param {Object.} object Plain object - * @returns {query.MessageStreamRequest} MessageStreamRequest + * @returns {query.QueryWarning} QueryWarning */ - MessageStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageStreamRequest) + QueryWarning.fromObject = function fromObject(object) { + if (object instanceof $root.query.QueryWarning) return object; - var message = new $root.query.MessageStreamRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.MessageStreamRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.MessageStreamRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.MessageStreamRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.name != null) - message.name = String(object.name); + var message = new $root.query.QueryWarning(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. + * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. * @function toObject - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @static - * @param {query.MessageStreamRequest} message MessageStreamRequest + * @param {query.QueryWarning} message QueryWarning * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageStreamRequest.toObject = function toObject(message, options) { + QueryWarning.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.name = ""; + object.code = 0; + object.message = ""; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this MessageStreamRequest to JSON. + * Converts this QueryWarning to JSON. * @function toJSON - * @memberof query.MessageStreamRequest + * @memberof query.QueryWarning * @instance * @returns {Object.} JSON object */ - MessageStreamRequest.prototype.toJSON = function toJSON() { + QueryWarning.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageStreamRequest; + return QueryWarning; })(); - query.MessageStreamResponse = (function() { + query.StreamEvent = (function() { /** - * Properties of a MessageStreamResponse. + * Properties of a StreamEvent. * @memberof query - * @interface IMessageStreamResponse - * @property {query.IQueryResult|null} [result] MessageStreamResponse result + * @interface IStreamEvent + * @property {Array.|null} [statements] StreamEvent statements + * @property {query.IEventToken|null} [event_token] StreamEvent event_token */ /** - * Constructs a new MessageStreamResponse. + * Constructs a new StreamEvent. * @memberof query - * @classdesc Represents a MessageStreamResponse. - * @implements IMessageStreamResponse + * @classdesc Represents a StreamEvent. + * @implements IStreamEvent * @constructor - * @param {query.IMessageStreamResponse=} [properties] Properties to set + * @param {query.IStreamEvent=} [properties] Properties to set */ - function MessageStreamResponse(properties) { + function StreamEvent(properties) { + this.statements = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68607,75 +69166,91 @@ $root.query = (function() { } /** - * MessageStreamResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.MessageStreamResponse + * StreamEvent statements. + * @member {Array.} statements + * @memberof query.StreamEvent * @instance */ - MessageStreamResponse.prototype.result = null; + StreamEvent.prototype.statements = $util.emptyArray; /** - * Creates a new MessageStreamResponse instance using the specified properties. + * StreamEvent event_token. + * @member {query.IEventToken|null|undefined} event_token + * @memberof query.StreamEvent + * @instance + */ + StreamEvent.prototype.event_token = null; + + /** + * Creates a new StreamEvent instance using the specified properties. * @function create - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static - * @param {query.IMessageStreamResponse=} [properties] Properties to set - * @returns {query.MessageStreamResponse} MessageStreamResponse instance + * @param {query.IStreamEvent=} [properties] Properties to set + * @returns {query.StreamEvent} StreamEvent instance */ - MessageStreamResponse.create = function create(properties) { - return new MessageStreamResponse(properties); + StreamEvent.create = function create(properties) { + return new StreamEvent(properties); }; /** - * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. + * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. * @function encode - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static - * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode + * @param {query.IStreamEvent} message StreamEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageStreamResponse.encode = function encode(message, writer) { + StreamEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.statements != null && message.statements.length) + for (var i = 0; i < message.statements.length; ++i) + $root.query.StreamEvent.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) + $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. + * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. * @function encodeDelimited - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static - * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode + * @param {query.IStreamEvent} message StreamEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { + StreamEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageStreamResponse message from the specified reader or buffer. + * Decodes a StreamEvent message from the specified reader or buffer. * @function decode - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.MessageStreamResponse} MessageStreamResponse + * @returns {query.StreamEvent} StreamEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageStreamResponse.decode = function decode(reader, length) { + StreamEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + if (!(message.statements && message.statements.length)) + message.statements = []; + message.statements.push($root.query.StreamEvent.Statement.decode(reader, reader.uint32())); + break; + case 2: + message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -68686,117 +69261,507 @@ $root.query = (function() { }; /** - * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageStreamResponse} MessageStreamResponse + * @returns {query.StreamEvent} StreamEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageStreamResponse.decodeDelimited = function decodeDelimited(reader) { + StreamEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageStreamResponse message. + * Verifies a StreamEvent message. * @function verify - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageStreamResponse.verify = function verify(message) { + StreamEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.statements != null && message.hasOwnProperty("statements")) { + if (!Array.isArray(message.statements)) + return "statements: array expected"; + for (var i = 0; i < message.statements.length; ++i) { + var error = $root.query.StreamEvent.Statement.verify(message.statements[i]); + if (error) + return "statements." + error; + } + } + if (message.event_token != null && message.hasOwnProperty("event_token")) { + var error = $root.query.EventToken.verify(message.event_token); if (error) - return "result." + error; + return "event_token." + error; } return null; }; /** - * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static * @param {Object.} object Plain object - * @returns {query.MessageStreamResponse} MessageStreamResponse + * @returns {query.StreamEvent} StreamEvent */ - MessageStreamResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageStreamResponse) + StreamEvent.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamEvent) return object; - var message = new $root.query.MessageStreamResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.MessageStreamResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.query.StreamEvent(); + if (object.statements) { + if (!Array.isArray(object.statements)) + throw TypeError(".query.StreamEvent.statements: array expected"); + message.statements = []; + for (var i = 0; i < object.statements.length; ++i) { + if (typeof object.statements[i] !== "object") + throw TypeError(".query.StreamEvent.statements: object expected"); + message.statements[i] = $root.query.StreamEvent.Statement.fromObject(object.statements[i]); + } + } + if (object.event_token != null) { + if (typeof object.event_token !== "object") + throw TypeError(".query.StreamEvent.event_token: object expected"); + message.event_token = $root.query.EventToken.fromObject(object.event_token); } return message; }; /** - * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. + * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. * @function toObject - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @static - * @param {query.MessageStreamResponse} message MessageStreamResponse + * @param {query.StreamEvent} message StreamEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageStreamResponse.toObject = function toObject(message, options) { + StreamEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.statements = []; if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + object.event_token = null; + if (message.statements && message.statements.length) { + object.statements = []; + for (var j = 0; j < message.statements.length; ++j) + object.statements[j] = $root.query.StreamEvent.Statement.toObject(message.statements[j], options); + } + if (message.event_token != null && message.hasOwnProperty("event_token")) + object.event_token = $root.query.EventToken.toObject(message.event_token, options); return object; }; /** - * Converts this MessageStreamResponse to JSON. + * Converts this StreamEvent to JSON. * @function toJSON - * @memberof query.MessageStreamResponse + * @memberof query.StreamEvent * @instance * @returns {Object.} JSON object */ - MessageStreamResponse.prototype.toJSON = function toJSON() { + StreamEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageStreamResponse; + StreamEvent.Statement = (function() { + + /** + * Properties of a Statement. + * @memberof query.StreamEvent + * @interface IStatement + * @property {query.StreamEvent.Statement.Category|null} [category] Statement category + * @property {string|null} [table_name] Statement table_name + * @property {Array.|null} [primary_key_fields] Statement primary_key_fields + * @property {Array.|null} [primary_key_values] Statement primary_key_values + * @property {Uint8Array|null} [sql] Statement sql + */ + + /** + * Constructs a new Statement. + * @memberof query.StreamEvent + * @classdesc Represents a Statement. + * @implements IStatement + * @constructor + * @param {query.StreamEvent.IStatement=} [properties] Properties to set + */ + function Statement(properties) { + this.primary_key_fields = []; + this.primary_key_values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Statement category. + * @member {query.StreamEvent.Statement.Category} category + * @memberof query.StreamEvent.Statement + * @instance + */ + Statement.prototype.category = 0; + + /** + * Statement table_name. + * @member {string} table_name + * @memberof query.StreamEvent.Statement + * @instance + */ + Statement.prototype.table_name = ""; + + /** + * Statement primary_key_fields. + * @member {Array.} primary_key_fields + * @memberof query.StreamEvent.Statement + * @instance + */ + Statement.prototype.primary_key_fields = $util.emptyArray; + + /** + * Statement primary_key_values. + * @member {Array.} primary_key_values + * @memberof query.StreamEvent.Statement + * @instance + */ + Statement.prototype.primary_key_values = $util.emptyArray; + + /** + * Statement sql. + * @member {Uint8Array} sql + * @memberof query.StreamEvent.Statement + * @instance + */ + Statement.prototype.sql = $util.newBuffer([]); + + /** + * Creates a new Statement instance using the specified properties. + * @function create + * @memberof query.StreamEvent.Statement + * @static + * @param {query.StreamEvent.IStatement=} [properties] Properties to set + * @returns {query.StreamEvent.Statement} Statement instance + */ + Statement.create = function create(properties) { + return new Statement(properties); + }; + + /** + * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. + * @function encode + * @memberof query.StreamEvent.Statement + * @static + * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table_name); + if (message.primary_key_fields != null && message.primary_key_fields.length) + for (var i = 0; i < message.primary_key_fields.length; ++i) + $root.query.Field.encode(message.primary_key_fields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.primary_key_values != null && message.primary_key_values.length) + for (var i = 0; i < message.primary_key_values.length; ++i) + $root.query.Row.encode(message.primary_key_values[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sql); + return writer; + }; + + /** + * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. + * @function encodeDelimited + * @memberof query.StreamEvent.Statement + * @static + * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Statement message from the specified reader or buffer. + * @function decode + * @memberof query.StreamEvent.Statement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.StreamEvent.Statement} Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent.Statement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.category = reader.int32(); + break; + case 2: + message.table_name = reader.string(); + break; + case 3: + if (!(message.primary_key_fields && message.primary_key_fields.length)) + message.primary_key_fields = []; + message.primary_key_fields.push($root.query.Field.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.primary_key_values && message.primary_key_values.length)) + message.primary_key_values = []; + message.primary_key_values.push($root.query.Row.decode(reader, reader.uint32())); + break; + case 5: + message.sql = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Statement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.StreamEvent.Statement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.StreamEvent.Statement} Statement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Statement message. + * @function verify + * @memberof query.StreamEvent.Statement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Statement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.table_name != null && message.hasOwnProperty("table_name")) + if (!$util.isString(message.table_name)) + return "table_name: string expected"; + if (message.primary_key_fields != null && message.hasOwnProperty("primary_key_fields")) { + if (!Array.isArray(message.primary_key_fields)) + return "primary_key_fields: array expected"; + for (var i = 0; i < message.primary_key_fields.length; ++i) { + var error = $root.query.Field.verify(message.primary_key_fields[i]); + if (error) + return "primary_key_fields." + error; + } + } + if (message.primary_key_values != null && message.hasOwnProperty("primary_key_values")) { + if (!Array.isArray(message.primary_key_values)) + return "primary_key_values: array expected"; + for (var i = 0; i < message.primary_key_values.length; ++i) { + var error = $root.query.Row.verify(message.primary_key_values[i]); + if (error) + return "primary_key_values." + error; + } + } + if (message.sql != null && message.hasOwnProperty("sql")) + if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) + return "sql: buffer expected"; + return null; + }; + + /** + * Creates a Statement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.StreamEvent.Statement + * @static + * @param {Object.} object Plain object + * @returns {query.StreamEvent.Statement} Statement + */ + Statement.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamEvent.Statement) + return object; + var message = new $root.query.StreamEvent.Statement(); + switch (object.category) { + case "Error": + case 0: + message.category = 0; + break; + case "DML": + case 1: + message.category = 1; + break; + case "DDL": + case 2: + message.category = 2; + break; + } + if (object.table_name != null) + message.table_name = String(object.table_name); + if (object.primary_key_fields) { + if (!Array.isArray(object.primary_key_fields)) + throw TypeError(".query.StreamEvent.Statement.primary_key_fields: array expected"); + message.primary_key_fields = []; + for (var i = 0; i < object.primary_key_fields.length; ++i) { + if (typeof object.primary_key_fields[i] !== "object") + throw TypeError(".query.StreamEvent.Statement.primary_key_fields: object expected"); + message.primary_key_fields[i] = $root.query.Field.fromObject(object.primary_key_fields[i]); + } + } + if (object.primary_key_values) { + if (!Array.isArray(object.primary_key_values)) + throw TypeError(".query.StreamEvent.Statement.primary_key_values: array expected"); + message.primary_key_values = []; + for (var i = 0; i < object.primary_key_values.length; ++i) { + if (typeof object.primary_key_values[i] !== "object") + throw TypeError(".query.StreamEvent.Statement.primary_key_values: object expected"); + message.primary_key_values[i] = $root.query.Row.fromObject(object.primary_key_values[i]); + } + } + if (object.sql != null) + if (typeof object.sql === "string") + $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); + else if (object.sql.length) + message.sql = object.sql; + return message; + }; + + /** + * Creates a plain object from a Statement message. Also converts values to other types if specified. + * @function toObject + * @memberof query.StreamEvent.Statement + * @static + * @param {query.StreamEvent.Statement} message Statement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Statement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.primary_key_fields = []; + object.primary_key_values = []; + } + if (options.defaults) { + object.category = options.enums === String ? "Error" : 0; + object.table_name = ""; + if (options.bytes === String) + object.sql = ""; + else { + object.sql = []; + if (options.bytes !== Array) + object.sql = $util.newBuffer(object.sql); + } + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.query.StreamEvent.Statement.Category[message.category] : message.category; + if (message.table_name != null && message.hasOwnProperty("table_name")) + object.table_name = message.table_name; + if (message.primary_key_fields && message.primary_key_fields.length) { + object.primary_key_fields = []; + for (var j = 0; j < message.primary_key_fields.length; ++j) + object.primary_key_fields[j] = $root.query.Field.toObject(message.primary_key_fields[j], options); + } + if (message.primary_key_values && message.primary_key_values.length) { + object.primary_key_values = []; + for (var j = 0; j < message.primary_key_values.length; ++j) + object.primary_key_values[j] = $root.query.Row.toObject(message.primary_key_values[j], options); + } + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; + return object; + }; + + /** + * Converts this Statement to JSON. + * @function toJSON + * @memberof query.StreamEvent.Statement + * @instance + * @returns {Object.} JSON object + */ + Statement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Category enum. + * @name query.StreamEvent.Statement.Category + * @enum {number} + * @property {number} Error=0 Error value + * @property {number} DML=1 DML value + * @property {number} DDL=2 DDL value + */ + Statement.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "Error"] = 0; + values[valuesById[1] = "DML"] = 1; + values[valuesById[2] = "DDL"] = 2; + return values; + })(); + + return Statement; + })(); + + return StreamEvent; })(); - query.MessageAckRequest = (function() { + query.ExecuteRequest = (function() { /** - * Properties of a MessageAckRequest. + * Properties of an ExecuteRequest. * @memberof query - * @interface IMessageAckRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageAckRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageAckRequest immediate_caller_id - * @property {query.ITarget|null} [target] MessageAckRequest target - * @property {string|null} [name] MessageAckRequest name - * @property {Array.|null} [ids] MessageAckRequest ids + * @interface IExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] ExecuteRequest target + * @property {query.IBoundQuery|null} [query] ExecuteRequest query + * @property {number|Long|null} [transaction_id] ExecuteRequest transaction_id + * @property {query.IExecuteOptions|null} [options] ExecuteRequest options + * @property {number|Long|null} [reserved_id] ExecuteRequest reserved_id */ /** - * Constructs a new MessageAckRequest. + * Constructs a new ExecuteRequest. * @memberof query - * @classdesc Represents a MessageAckRequest. - * @implements IMessageAckRequest + * @classdesc Represents an ExecuteRequest. + * @implements IExecuteRequest * @constructor - * @param {query.IMessageAckRequest=} [properties] Properties to set + * @param {query.IExecuteRequest=} [properties] Properties to set */ - function MessageAckRequest(properties) { - this.ids = []; + function ExecuteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68804,67 +69769,83 @@ $root.query = (function() { } /** - * MessageAckRequest effective_caller_id. + * ExecuteRequest effective_caller_id. * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @instance */ - MessageAckRequest.prototype.effective_caller_id = null; + ExecuteRequest.prototype.effective_caller_id = null; /** - * MessageAckRequest immediate_caller_id. + * ExecuteRequest immediate_caller_id. * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @instance */ - MessageAckRequest.prototype.immediate_caller_id = null; + ExecuteRequest.prototype.immediate_caller_id = null; /** - * MessageAckRequest target. + * ExecuteRequest target. * @member {query.ITarget|null|undefined} target - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @instance */ - MessageAckRequest.prototype.target = null; + ExecuteRequest.prototype.target = null; /** - * MessageAckRequest name. - * @member {string} name - * @memberof query.MessageAckRequest + * ExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.ExecuteRequest * @instance */ - MessageAckRequest.prototype.name = ""; + ExecuteRequest.prototype.query = null; /** - * MessageAckRequest ids. - * @member {Array.} ids - * @memberof query.MessageAckRequest + * ExecuteRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ExecuteRequest * @instance */ - MessageAckRequest.prototype.ids = $util.emptyArray; + ExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new MessageAckRequest instance using the specified properties. + * ExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.ExecuteRequest + * @instance + */ + ExecuteRequest.prototype.options = null; + + /** + * ExecuteRequest reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ExecuteRequest + * @instance + */ + ExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ExecuteRequest instance using the specified properties. * @function create - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static - * @param {query.IMessageAckRequest=} [properties] Properties to set - * @returns {query.MessageAckRequest} MessageAckRequest instance + * @param {query.IExecuteRequest=} [properties] Properties to set + * @returns {query.ExecuteRequest} ExecuteRequest instance */ - MessageAckRequest.create = function create(properties) { - return new MessageAckRequest(properties); + ExecuteRequest.create = function create(properties) { + return new ExecuteRequest(properties); }; /** - * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. + * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. * @function encode - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static - * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode + * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAckRequest.encode = function encode(message, writer) { + ExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) @@ -68873,42 +69854,45 @@ $root.query = (function() { $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.target != null && Object.hasOwnProperty.call(message, "target")) $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - if (message.ids != null && message.ids.length) - for (var i = 0; i < message.ids.length; ++i) - $root.query.Value.encode(message.ids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); return writer; }; /** - * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. + * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static - * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode + * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAckRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageAckRequest message from the specified reader or buffer. + * Decodes an ExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.MessageAckRequest} MessageAckRequest + * @returns {query.ExecuteRequest} ExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAckRequest.decode = function decode(reader, length) { + ExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -68922,12 +69906,16 @@ $root.query = (function() { message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.name = reader.string(); + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); break; case 5: - if (!(message.ids && message.ids.length)) - message.ids = []; - message.ids.push($root.query.Value.decode(reader, reader.uint32())); + message.transaction_id = reader.int64(); + break; + case 6: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 7: + message.reserved_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -68938,30 +69926,30 @@ $root.query = (function() { }; /** - * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageAckRequest} MessageAckRequest + * @returns {query.ExecuteRequest} ExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAckRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageAckRequest message. + * Verifies an ExecuteRequest message. * @function verify - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageAckRequest.verify = function verify(message) { + ExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { @@ -68979,83 +69967,112 @@ $root.query = (function() { if (error) return "target." + error; } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.ids != null && message.hasOwnProperty("ids")) { - if (!Array.isArray(message.ids)) - return "ids: array expected"; - for (var i = 0; i < message.ids.length; ++i) { - var error = $root.query.Value.verify(message.ids[i]); - if (error) - return "ids." + error; - } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; } + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; return null; }; /** - * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static * @param {Object.} object Plain object - * @returns {query.MessageAckRequest} MessageAckRequest + * @returns {query.ExecuteRequest} ExecuteRequest */ - MessageAckRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageAckRequest) + ExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ExecuteRequest) return object; - var message = new $root.query.MessageAckRequest(); + var message = new $root.query.ExecuteRequest(); if (object.effective_caller_id != null) { if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.MessageAckRequest.effective_caller_id: object expected"); + throw TypeError(".query.ExecuteRequest.effective_caller_id: object expected"); message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } if (object.immediate_caller_id != null) { if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.MessageAckRequest.immediate_caller_id: object expected"); + throw TypeError(".query.ExecuteRequest.immediate_caller_id: object expected"); message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } if (object.target != null) { if (typeof object.target !== "object") - throw TypeError(".query.MessageAckRequest.target: object expected"); + throw TypeError(".query.ExecuteRequest.target: object expected"); message.target = $root.query.Target.fromObject(object.target); } - if (object.name != null) - message.name = String(object.name); - if (object.ids) { - if (!Array.isArray(object.ids)) - throw TypeError(".query.MessageAckRequest.ids: array expected"); - message.ids = []; - for (var i = 0; i < object.ids.length; ++i) { - if (typeof object.ids[i] !== "object") - throw TypeError(".query.MessageAckRequest.ids: object expected"); - message.ids[i] = $root.query.Value.fromObject(object.ids[i]); - } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.ExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.ExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); } + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @static - * @param {query.MessageAckRequest} message MessageAckRequest + * @param {query.ExecuteRequest} message ExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageAckRequest.toObject = function toObject(message, options) { + ExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.ids = []; if (options.defaults) { object.effective_caller_id = null; object.immediate_caller_id = null; object.target = null; - object.name = ""; + object.query = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; } if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); @@ -69063,48 +70080,55 @@ $root.query = (function() { object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); if (message.target != null && message.hasOwnProperty("target")) object.target = $root.query.Target.toObject(message.target, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ids && message.ids.length) { - object.ids = []; - for (var j = 0; j < message.ids.length; ++j) - object.ids[j] = $root.query.Value.toObject(message.ids[j], options); - } + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; return object; }; /** - * Converts this MessageAckRequest to JSON. + * Converts this ExecuteRequest to JSON. * @function toJSON - * @memberof query.MessageAckRequest + * @memberof query.ExecuteRequest * @instance * @returns {Object.} JSON object */ - MessageAckRequest.prototype.toJSON = function toJSON() { + ExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageAckRequest; + return ExecuteRequest; })(); - query.MessageAckResponse = (function() { + query.ExecuteResponse = (function() { /** - * Properties of a MessageAckResponse. + * Properties of an ExecuteResponse. * @memberof query - * @interface IMessageAckResponse - * @property {query.IQueryResult|null} [result] MessageAckResponse result + * @interface IExecuteResponse + * @property {query.IQueryResult|null} [result] ExecuteResponse result */ /** - * Constructs a new MessageAckResponse. + * Constructs a new ExecuteResponse. * @memberof query - * @classdesc Represents a MessageAckResponse. - * @implements IMessageAckResponse + * @classdesc Represents an ExecuteResponse. + * @implements IExecuteResponse * @constructor - * @param {query.IMessageAckResponse=} [properties] Properties to set + * @param {query.IExecuteResponse=} [properties] Properties to set */ - function MessageAckResponse(properties) { + function ExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69112,35 +70136,35 @@ $root.query = (function() { } /** - * MessageAckResponse result. + * ExecuteResponse result. * @member {query.IQueryResult|null|undefined} result - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @instance */ - MessageAckResponse.prototype.result = null; + ExecuteResponse.prototype.result = null; /** - * Creates a new MessageAckResponse instance using the specified properties. + * Creates a new ExecuteResponse instance using the specified properties. * @function create - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static - * @param {query.IMessageAckResponse=} [properties] Properties to set - * @returns {query.MessageAckResponse} MessageAckResponse instance + * @param {query.IExecuteResponse=} [properties] Properties to set + * @returns {query.ExecuteResponse} ExecuteResponse instance */ - MessageAckResponse.create = function create(properties) { - return new MessageAckResponse(properties); + ExecuteResponse.create = function create(properties) { + return new ExecuteResponse(properties); }; /** - * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. + * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. * @function encode - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static - * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode + * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAckResponse.encode = function encode(message, writer) { + ExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.result != null && Object.hasOwnProperty.call(message, "result")) @@ -69149,33 +70173,33 @@ $root.query = (function() { }; /** - * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. + * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static - * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode + * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAckResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageAckResponse message from the specified reader or buffer. + * Decodes an ExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.MessageAckResponse} MessageAckResponse + * @returns {query.ExecuteResponse} ExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAckResponse.decode = function decode(reader, length) { + ExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -69191,30 +70215,30 @@ $root.query = (function() { }; /** - * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageAckResponse} MessageAckResponse + * @returns {query.ExecuteResponse} ExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAckResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageAckResponse message. + * Verifies an ExecuteResponse message. * @function verify - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageAckResponse.verify = function verify(message) { + ExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.result != null && message.hasOwnProperty("result")) { @@ -69226,35 +70250,35 @@ $root.query = (function() { }; /** - * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static * @param {Object.} object Plain object - * @returns {query.MessageAckResponse} MessageAckResponse + * @returns {query.ExecuteResponse} ExecuteResponse */ - MessageAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageAckResponse) + ExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ExecuteResponse) return object; - var message = new $root.query.MessageAckResponse(); + var message = new $root.query.ExecuteResponse(); if (object.result != null) { if (typeof object.result !== "object") - throw TypeError(".query.MessageAckResponse.result: object expected"); + throw TypeError(".query.ExecuteResponse.result: object expected"); message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @static - * @param {query.MessageAckResponse} message MessageAckResponse + * @param {query.ExecuteResponse} message ExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageAckResponse.toObject = function toObject(message, options) { + ExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -69266,44 +70290,38 @@ $root.query = (function() { }; /** - * Converts this MessageAckResponse to JSON. + * Converts this ExecuteResponse to JSON. * @function toJSON - * @memberof query.MessageAckResponse + * @memberof query.ExecuteResponse * @instance * @returns {Object.} JSON object */ - MessageAckResponse.prototype.toJSON = function toJSON() { + ExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageAckResponse; + return ExecuteResponse; })(); - query.ReserveExecuteRequest = (function() { + query.ResultWithError = (function() { /** - * Properties of a ReserveExecuteRequest. + * Properties of a ResultWithError. * @memberof query - * @interface IReserveExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveExecuteRequest query - * @property {number|Long|null} [transaction_id] ReserveExecuteRequest transaction_id - * @property {query.IExecuteOptions|null} [options] ReserveExecuteRequest options - * @property {Array.|null} [pre_queries] ReserveExecuteRequest pre_queries + * @interface IResultWithError + * @property {vtrpc.IRPCError|null} [error] ResultWithError error + * @property {query.IQueryResult|null} [result] ResultWithError result */ /** - * Constructs a new ReserveExecuteRequest. + * Constructs a new ResultWithError. * @memberof query - * @classdesc Represents a ReserveExecuteRequest. - * @implements IReserveExecuteRequest + * @classdesc Represents a ResultWithError. + * @implements IResultWithError * @constructor - * @param {query.IReserveExecuteRequest=} [properties] Properties to set + * @param {query.IResultWithError=} [properties] Properties to set */ - function ReserveExecuteRequest(properties) { - this.pre_queries = []; + function ResultWithError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69311,156 +70329,88 @@ $root.query = (function() { } /** - * ReserveExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.effective_caller_id = null; - - /** - * ReserveExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ReserveExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.target = null; - - /** - * ReserveExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.query = null; - - /** - * ReserveExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveExecuteRequest + * ResultWithError error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.ResultWithError * @instance */ - ReserveExecuteRequest.prototype.options = null; + ResultWithError.prototype.error = null; /** - * ReserveExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveExecuteRequest + * ResultWithError result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.ResultWithError * @instance */ - ReserveExecuteRequest.prototype.pre_queries = $util.emptyArray; + ResultWithError.prototype.result = null; /** - * Creates a new ReserveExecuteRequest instance using the specified properties. + * Creates a new ResultWithError instance using the specified properties. * @function create - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static - * @param {query.IReserveExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest instance + * @param {query.IResultWithError=} [properties] Properties to set + * @returns {query.ResultWithError} ResultWithError instance */ - ReserveExecuteRequest.create = function create(properties) { - return new ReserveExecuteRequest(properties); + ResultWithError.create = function create(properties) { + return new ResultWithError(properties); }; /** - * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. + * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. * @function encode - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static - * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode + * @param {query.IResultWithError} message ResultWithError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveExecuteRequest.encode = function encode(message, writer) { + ResultWithError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. + * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static - * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode + * @param {query.IResultWithError} message ResultWithError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + ResultWithError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer. + * Decodes a ResultWithError message from the specified reader or buffer. * @function decode - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest + * @returns {query.ResultWithError} ResultWithError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveExecuteRequest.decode = function decode(reader, length) { + ResultWithError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ResultWithError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.transaction_id = reader.int64(); - break; - case 6: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -69471,211 +70421,132 @@ $root.query = (function() { }; /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a ResultWithError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest + * @returns {query.ResultWithError} ResultWithError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + ResultWithError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveExecuteRequest message. + * Verifies a ResultWithError message. * @function verify - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveExecuteRequest.verify = function verify(message) { + ResultWithError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); if (error) - return "query." + error; + return "error." + error; } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; + return "result." + error; } return null; }; /** - * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static * @param {Object.} object Plain object - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest + * @returns {query.ResultWithError} ResultWithError */ - ReserveExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveExecuteRequest) + ResultWithError.fromObject = function fromObject(object) { + if (object instanceof $root.query.ResultWithError) return object; - var message = new $root.query.ReserveExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + var message = new $root.query.ResultWithError(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.ResultWithError.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReserveExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.ResultWithError.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @static - * @param {query.ReserveExecuteRequest} message ReserveExecuteRequest + * @param {query.ResultWithError} message ResultWithError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveExecuteRequest.toObject = function toObject(message, options) { + ResultWithError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.pre_queries = []; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; + object.error = null; + object.result = null; } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this ReserveExecuteRequest to JSON. + * Converts this ResultWithError to JSON. * @function toJSON - * @memberof query.ReserveExecuteRequest + * @memberof query.ResultWithError * @instance * @returns {Object.} JSON object */ - ReserveExecuteRequest.prototype.toJSON = function toJSON() { + ResultWithError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveExecuteRequest; + return ResultWithError; })(); - query.ReserveExecuteResponse = (function() { + query.StreamExecuteRequest = (function() { /** - * Properties of a ReserveExecuteResponse. + * Properties of a StreamExecuteRequest. * @memberof query - * @interface IReserveExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveExecuteResponse result - * @property {number|Long|null} [reserved_id] ReserveExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveExecuteResponse tablet_alias + * @interface IStreamExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] StreamExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] StreamExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] StreamExecuteRequest target + * @property {query.IBoundQuery|null} [query] StreamExecuteRequest query + * @property {query.IExecuteOptions|null} [options] StreamExecuteRequest options + * @property {number|Long|null} [transaction_id] StreamExecuteRequest transaction_id + * @property {number|Long|null} [reserved_id] StreamExecuteRequest reserved_id */ /** - * Constructs a new ReserveExecuteResponse. + * Constructs a new StreamExecuteRequest. * @memberof query - * @classdesc Represents a ReserveExecuteResponse. - * @implements IReserveExecuteResponse + * @classdesc Represents a StreamExecuteRequest. + * @implements IStreamExecuteRequest * @constructor - * @param {query.IReserveExecuteResponse=} [properties] Properties to set + * @param {query.IStreamExecuteRequest=} [properties] Properties to set */ - function ReserveExecuteResponse(properties) { + function StreamExecuteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69683,114 +70554,153 @@ $root.query = (function() { } /** - * ReserveExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveExecuteResponse + * StreamExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.StreamExecuteRequest * @instance */ - ReserveExecuteResponse.prototype.error = null; + StreamExecuteRequest.prototype.effective_caller_id = null; /** - * ReserveExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveExecuteResponse + * StreamExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.StreamExecuteRequest * @instance */ - ReserveExecuteResponse.prototype.result = null; + StreamExecuteRequest.prototype.immediate_caller_id = null; /** - * ReserveExecuteResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReserveExecuteResponse + * StreamExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.StreamExecuteRequest * @instance */ - ReserveExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StreamExecuteRequest.prototype.target = null; /** - * ReserveExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveExecuteResponse + * StreamExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.StreamExecuteRequest * @instance */ - ReserveExecuteResponse.prototype.tablet_alias = null; + StreamExecuteRequest.prototype.query = null; /** - * Creates a new ReserveExecuteResponse instance using the specified properties. + * StreamExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.StreamExecuteRequest + * @instance + */ + StreamExecuteRequest.prototype.options = null; + + /** + * StreamExecuteRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.StreamExecuteRequest + * @instance + */ + StreamExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StreamExecuteRequest reserved_id. + * @member {number|Long} reserved_id + * @memberof query.StreamExecuteRequest + * @instance + */ + StreamExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new StreamExecuteRequest instance using the specified properties. * @function create - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static - * @param {query.IReserveExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse instance + * @param {query.IStreamExecuteRequest=} [properties] Properties to set + * @returns {query.StreamExecuteRequest} StreamExecuteRequest instance */ - ReserveExecuteResponse.create = function create(properties) { - return new ReserveExecuteResponse(properties); + StreamExecuteRequest.create = function create(properties) { + return new StreamExecuteRequest(properties); }; /** - * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. + * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. * @function encode - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static - * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode + * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveExecuteResponse.encode = function encode(message, writer) { + StreamExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); return writer; }; /** - * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. + * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static - * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode + * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + StreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer. + * Decodes a StreamExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse + * @returns {query.StreamExecuteRequest} StreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveExecuteResponse.decode = function decode(reader, length) { + StreamExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.reserved_id = reader.int64(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 6: + message.transaction_id = reader.int64(); + break; + case 7: + message.reserved_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -69801,75 +70711,112 @@ $root.query = (function() { }; /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse + * @returns {query.StreamExecuteRequest} StreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + StreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveExecuteResponse message. + * Verifies a StreamExecuteRequest message. * @function verify - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveExecuteResponse.verify = function verify(message) { + StreamExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); if (error) - return "error." + error; + return "effective_caller_id." + error; } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); if (error) - return "result." + error; + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } return null; }; /** - * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static * @param {Object.} object Plain object - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse + * @returns {query.StreamExecuteRequest} StreamExecuteRequest */ - ReserveExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveExecuteResponse) + StreamExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamExecuteRequest) return object; - var message = new $root.query.ReserveExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); + var message = new $root.query.StreamExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.StreamExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.StreamExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.StreamExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.StreamExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.StreamExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); if (object.reserved_id != null) if ($util.Long) (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; @@ -69879,90 +70826,94 @@ $root.query = (function() { message.reserved_id = object.reserved_id; else if (typeof object.reserved_id === "object") message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } return message; }; /** - * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @static - * @param {query.ReserveExecuteResponse} message ReserveExecuteResponse + * @param {query.StreamExecuteRequest} message StreamExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveExecuteResponse.toObject = function toObject(message, options) { + StreamExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.error = null; - object.result = null; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) if (typeof message.reserved_id === "number") object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; else object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ReserveExecuteResponse to JSON. + * Converts this StreamExecuteRequest to JSON. * @function toJSON - * @memberof query.ReserveExecuteResponse + * @memberof query.StreamExecuteRequest * @instance * @returns {Object.} JSON object */ - ReserveExecuteResponse.prototype.toJSON = function toJSON() { + StreamExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveExecuteResponse; + return StreamExecuteRequest; })(); - query.ReserveStreamExecuteRequest = (function() { + query.StreamExecuteResponse = (function() { /** - * Properties of a ReserveStreamExecuteRequest. + * Properties of a StreamExecuteResponse. * @memberof query - * @interface IReserveStreamExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveStreamExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveStreamExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveStreamExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveStreamExecuteRequest query - * @property {query.IExecuteOptions|null} [options] ReserveStreamExecuteRequest options - * @property {number|Long|null} [transaction_id] ReserveStreamExecuteRequest transaction_id - * @property {Array.|null} [pre_queries] ReserveStreamExecuteRequest pre_queries + * @interface IStreamExecuteResponse + * @property {query.IQueryResult|null} [result] StreamExecuteResponse result */ /** - * Constructs a new ReserveStreamExecuteRequest. + * Constructs a new StreamExecuteResponse. * @memberof query - * @classdesc Represents a ReserveStreamExecuteRequest. - * @implements IReserveStreamExecuteRequest + * @classdesc Represents a StreamExecuteResponse. + * @implements IStreamExecuteResponse * @constructor - * @param {query.IReserveStreamExecuteRequest=} [properties] Properties to set + * @param {query.IStreamExecuteResponse=} [properties] Properties to set */ - function ReserveStreamExecuteRequest(properties) { - this.pre_queries = []; + function StreamExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69970,156 +70921,75 @@ $root.query = (function() { } /** - * ReserveStreamExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.effective_caller_id = null; - - /** - * ReserveStreamExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ReserveStreamExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.target = null; - - /** - * ReserveStreamExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.query = null; - - /** - * ReserveStreamExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.options = null; - - /** - * ReserveStreamExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveStreamExecuteRequest - * @instance - */ - ReserveStreamExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveStreamExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveStreamExecuteRequest + * StreamExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.StreamExecuteResponse * @instance */ - ReserveStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; + StreamExecuteResponse.prototype.result = null; /** - * Creates a new ReserveStreamExecuteRequest instance using the specified properties. + * Creates a new StreamExecuteResponse instance using the specified properties. * @function create - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static - * @param {query.IReserveStreamExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest instance + * @param {query.IStreamExecuteResponse=} [properties] Properties to set + * @returns {query.StreamExecuteResponse} StreamExecuteResponse instance */ - ReserveStreamExecuteRequest.create = function create(properties) { - return new ReserveStreamExecuteRequest(properties); + StreamExecuteResponse.create = function create(properties) { + return new StreamExecuteResponse(properties); }; /** - * Encodes the specified ReserveStreamExecuteRequest message. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. + * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. * @function encode - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static - * @param {query.IReserveStreamExecuteRequest} message ReserveStreamExecuteRequest message or plain object to encode + * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveStreamExecuteRequest.encode = function encode(message, writer) { + StreamExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); - return writer; + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; }; /** - * Encodes the specified ReserveStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. + * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static - * @param {query.IReserveStreamExecuteRequest} message ReserveStreamExecuteRequest message or plain object to encode + * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + StreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer. + * Decodes a StreamExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest + * @returns {query.StreamExecuteResponse} StreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveStreamExecuteRequest.decode = function decode(reader, length) { + StreamExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveStreamExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - message.transaction_id = reader.int64(); - break; - case 7: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -70130,211 +71000,115 @@ $root.query = (function() { }; /** - * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest + * @returns {query.StreamExecuteResponse} StreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + StreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveStreamExecuteRequest message. + * Verifies a StreamExecuteResponse message. * @function verify - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveStreamExecuteRequest.verify = function verify(message) { + StreamExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); if (error) - return "options." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; + return "result." + error; } return null; }; /** - * Creates a ReserveStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static * @param {Object.} object Plain object - * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest + * @returns {query.StreamExecuteResponse} StreamExecuteResponse */ - ReserveStreamExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveStreamExecuteRequest) + StreamExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamExecuteResponse) return object; - var message = new $root.query.ReserveStreamExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveStreamExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveStreamExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReserveStreamExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveStreamExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveStreamExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveStreamExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); + var message = new $root.query.StreamExecuteResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.StreamExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a ReserveStreamExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @static - * @param {query.ReserveStreamExecuteRequest} message ReserveStreamExecuteRequest + * @param {query.StreamExecuteResponse} message StreamExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveStreamExecuteRequest.toObject = function toObject(message, options) { + StreamExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.pre_queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this ReserveStreamExecuteRequest to JSON. + * Converts this StreamExecuteResponse to JSON. * @function toJSON - * @memberof query.ReserveStreamExecuteRequest + * @memberof query.StreamExecuteResponse * @instance * @returns {Object.} JSON object */ - ReserveStreamExecuteRequest.prototype.toJSON = function toJSON() { + StreamExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveStreamExecuteRequest; + return StreamExecuteResponse; })(); - query.ReserveStreamExecuteResponse = (function() { + query.BeginRequest = (function() { /** - * Properties of a ReserveStreamExecuteResponse. + * Properties of a BeginRequest. * @memberof query - * @interface IReserveStreamExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveStreamExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveStreamExecuteResponse result - * @property {number|Long|null} [reserved_id] ReserveStreamExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveStreamExecuteResponse tablet_alias + * @interface IBeginRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginRequest immediate_caller_id + * @property {query.ITarget|null} [target] BeginRequest target + * @property {query.IExecuteOptions|null} [options] BeginRequest options */ /** - * Constructs a new ReserveStreamExecuteResponse. + * Constructs a new BeginRequest. * @memberof query - * @classdesc Represents a ReserveStreamExecuteResponse. - * @implements IReserveStreamExecuteResponse + * @classdesc Represents a BeginRequest. + * @implements IBeginRequest * @constructor - * @param {query.IReserveStreamExecuteResponse=} [properties] Properties to set + * @param {query.IBeginRequest=} [properties] Properties to set */ - function ReserveStreamExecuteResponse(properties) { + function BeginRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70342,114 +71116,114 @@ $root.query = (function() { } /** - * ReserveStreamExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveStreamExecuteResponse + * BeginRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.BeginRequest * @instance */ - ReserveStreamExecuteResponse.prototype.error = null; + BeginRequest.prototype.effective_caller_id = null; /** - * ReserveStreamExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveStreamExecuteResponse + * BeginRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.BeginRequest * @instance */ - ReserveStreamExecuteResponse.prototype.result = null; + BeginRequest.prototype.immediate_caller_id = null; /** - * ReserveStreamExecuteResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReserveStreamExecuteResponse + * BeginRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.BeginRequest * @instance */ - ReserveStreamExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BeginRequest.prototype.target = null; /** - * ReserveStreamExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveStreamExecuteResponse + * BeginRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.BeginRequest * @instance */ - ReserveStreamExecuteResponse.prototype.tablet_alias = null; + BeginRequest.prototype.options = null; /** - * Creates a new ReserveStreamExecuteResponse instance using the specified properties. + * Creates a new BeginRequest instance using the specified properties. * @function create - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static - * @param {query.IReserveStreamExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse instance + * @param {query.IBeginRequest=} [properties] Properties to set + * @returns {query.BeginRequest} BeginRequest instance */ - ReserveStreamExecuteResponse.create = function create(properties) { - return new ReserveStreamExecuteResponse(properties); + BeginRequest.create = function create(properties) { + return new BeginRequest(properties); }; /** - * Encodes the specified ReserveStreamExecuteResponse message. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. + * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. * @function encode - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static - * @param {query.IReserveStreamExecuteResponse} message ReserveStreamExecuteResponse message or plain object to encode + * @param {query.IBeginRequest} message BeginRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveStreamExecuteResponse.encode = function encode(message, writer) { + BeginRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReserveStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. + * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static - * @param {query.IReserveStreamExecuteResponse} message ReserveStreamExecuteResponse message or plain object to encode + * @param {query.IBeginRequest} message BeginRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + BeginRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer. + * Decodes a BeginRequest message from the specified reader or buffer. * @function decode - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse + * @returns {query.BeginRequest} BeginRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveStreamExecuteResponse.decode = function decode(reader, length) { + BeginRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveStreamExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.reserved_id = reader.int64(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -70460,169 +71234,154 @@ $root.query = (function() { }; /** - * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a BeginRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse + * @returns {query.BeginRequest} BeginRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + BeginRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveStreamExecuteResponse message. + * Verifies a BeginRequest message. * @function verify - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveStreamExecuteResponse.verify = function verify(message) { + BeginRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); if (error) - return "error." + error; + return "effective_caller_id." + error; } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); if (error) - return "result." + error; + return "immediate_caller_id." + error; } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); if (error) - return "tablet_alias." + error; + return "target." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; } return null; }; /** - * Creates a ReserveStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static * @param {Object.} object Plain object - * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse + * @returns {query.BeginRequest} BeginRequest */ - ReserveStreamExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveStreamExecuteResponse) + BeginRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginRequest) return object; - var message = new $root.query.ReserveStreamExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveStreamExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); + var message = new $root.query.BeginRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.BeginRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveStreamExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.BeginRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveStreamExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.BeginRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.BeginRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a ReserveStreamExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @static - * @param {query.ReserveStreamExecuteResponse} message ReserveStreamExecuteResponse + * @param {query.BeginRequest} message BeginRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveStreamExecuteResponse.toObject = function toObject(message, options) { + BeginRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.options = null; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); return object; }; /** - * Converts this ReserveStreamExecuteResponse to JSON. + * Converts this BeginRequest to JSON. * @function toJSON - * @memberof query.ReserveStreamExecuteResponse + * @memberof query.BeginRequest * @instance * @returns {Object.} JSON object */ - ReserveStreamExecuteResponse.prototype.toJSON = function toJSON() { + BeginRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveStreamExecuteResponse; + return BeginRequest; })(); - query.ReserveBeginExecuteRequest = (function() { + query.BeginResponse = (function() { /** - * Properties of a ReserveBeginExecuteRequest. + * Properties of a BeginResponse. * @memberof query - * @interface IReserveBeginExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveBeginExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveBeginExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveBeginExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveBeginExecuteRequest query - * @property {query.IExecuteOptions|null} [options] ReserveBeginExecuteRequest options - * @property {Array.|null} [pre_queries] ReserveBeginExecuteRequest pre_queries - * @property {Array.|null} [post_begin_queries] ReserveBeginExecuteRequest post_begin_queries + * @interface IBeginResponse + * @property {number|Long|null} [transaction_id] BeginResponse transaction_id + * @property {topodata.ITabletAlias|null} [tablet_alias] BeginResponse tablet_alias + * @property {string|null} [session_state_changes] BeginResponse session_state_changes */ /** - * Constructs a new ReserveBeginExecuteRequest. + * Constructs a new BeginResponse. * @memberof query - * @classdesc Represents a ReserveBeginExecuteRequest. - * @implements IReserveBeginExecuteRequest + * @classdesc Represents a BeginResponse. + * @implements IBeginResponse * @constructor - * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set + * @param {query.IBeginResponse=} [properties] Properties to set */ - function ReserveBeginExecuteRequest(properties) { - this.pre_queries = []; - this.post_begin_queries = []; + function BeginResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70630,159 +71389,101 @@ $root.query = (function() { } /** - * ReserveBeginExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveBeginExecuteRequest + * BeginResponse transaction_id. + * @member {number|Long} transaction_id + * @memberof query.BeginResponse * @instance */ - ReserveBeginExecuteRequest.prototype.effective_caller_id = null; + BeginResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ReserveBeginExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveBeginExecuteRequest + * BeginResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.BeginResponse * @instance */ - ReserveBeginExecuteRequest.prototype.immediate_caller_id = null; + BeginResponse.prototype.tablet_alias = null; /** - * ReserveBeginExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveBeginExecuteRequest + * BeginResponse session_state_changes. + * @member {string} session_state_changes + * @memberof query.BeginResponse * @instance */ - ReserveBeginExecuteRequest.prototype.target = null; + BeginResponse.prototype.session_state_changes = ""; /** - * ReserveBeginExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.query = null; - - /** - * ReserveBeginExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.options = null; - - /** - * ReserveBeginExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.pre_queries = $util.emptyArray; - - /** - * ReserveBeginExecuteRequest post_begin_queries. - * @member {Array.} post_begin_queries - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.post_begin_queries = $util.emptyArray; - - /** - * Creates a new ReserveBeginExecuteRequest instance using the specified properties. + * Creates a new BeginResponse instance using the specified properties. * @function create - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static - * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest instance + * @param {query.IBeginResponse=} [properties] Properties to set + * @returns {query.BeginResponse} BeginResponse instance */ - ReserveBeginExecuteRequest.create = function create(properties) { - return new ReserveBeginExecuteRequest(properties); + BeginResponse.create = function create(properties) { + return new BeginResponse(properties); }; /** - * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. + * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. * @function encode - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static - * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode + * @param {query.IBeginResponse} message BeginResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginExecuteRequest.encode = function encode(message, writer) { + BeginResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); - if (message.post_begin_queries != null && message.post_begin_queries.length) - for (var i = 0; i < message.post_begin_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.post_begin_queries[i]); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transaction_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.session_state_changes); return writer; }; /** - * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. + * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static - * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode + * @param {query.IBeginResponse} message BeginResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + BeginResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. + * Decodes a BeginResponse message from the specified reader or buffer. * @function decode - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest + * @returns {query.BeginResponse} BeginResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginExecuteRequest.decode = function decode(reader, length) { + BeginResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.transaction_id = reader.int64(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - case 7: - if (!(message.post_begin_queries && message.post_begin_queries.length)) - message.post_begin_queries = []; - message.post_begin_queries.push(reader.string()); + message.session_state_changes = reader.string(); break; default: reader.skipType(tag & 7); @@ -70793,212 +71494,146 @@ $root.query = (function() { }; /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a BeginResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest + * @returns {query.BeginResponse} BeginResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + BeginResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveBeginExecuteRequest message. + * Verifies a BeginResponse message. * @function verify - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveBeginExecuteRequest.verify = function verify(message) { + BeginResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; - } - if (message.post_begin_queries != null && message.hasOwnProperty("post_begin_queries")) { - if (!Array.isArray(message.post_begin_queries)) - return "post_begin_queries: array expected"; - for (var i = 0; i < message.post_begin_queries.length; ++i) - if (!$util.isString(message.post_begin_queries[i])) - return "post_begin_queries: string[] expected"; + return "tablet_alias." + error; } + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + if (!$util.isString(message.session_state_changes)) + return "session_state_changes: string expected"; return null; }; /** - * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static * @param {Object.} object Plain object - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest + * @returns {query.BeginResponse} BeginResponse */ - ReserveBeginExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginExecuteRequest) + BeginResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginResponse) return object; - var message = new $root.query.ReserveBeginExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveBeginExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); - } - if (object.post_begin_queries) { - if (!Array.isArray(object.post_begin_queries)) - throw TypeError(".query.ReserveBeginExecuteRequest.post_begin_queries: array expected"); - message.post_begin_queries = []; - for (var i = 0; i < object.post_begin_queries.length; ++i) - message.post_begin_queries[i] = String(object.post_begin_queries[i]); + var message = new $root.query.BeginResponse(); + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.BeginResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.session_state_changes != null) + message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @static - * @param {query.ReserveBeginExecuteRequest} message ReserveBeginExecuteRequest + * @param {query.BeginResponse} message BeginResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveBeginExecuteRequest.toObject = function toObject(message, options) { + BeginResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pre_queries = []; - object.post_begin_queries = []; - } if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } - if (message.post_begin_queries && message.post_begin_queries.length) { - object.post_begin_queries = []; - for (var j = 0; j < message.post_begin_queries.length; ++j) - object.post_begin_queries[j] = message.post_begin_queries[j]; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; + object.session_state_changes = ""; } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this ReserveBeginExecuteRequest to JSON. + * Converts this BeginResponse to JSON. * @function toJSON - * @memberof query.ReserveBeginExecuteRequest + * @memberof query.BeginResponse * @instance * @returns {Object.} JSON object */ - ReserveBeginExecuteRequest.prototype.toJSON = function toJSON() { + BeginResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveBeginExecuteRequest; + return BeginResponse; })(); - query.ReserveBeginExecuteResponse = (function() { + query.CommitRequest = (function() { /** - * Properties of a ReserveBeginExecuteResponse. + * Properties of a CommitRequest. * @memberof query - * @interface IReserveBeginExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveBeginExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveBeginExecuteResponse result - * @property {number|Long|null} [transaction_id] ReserveBeginExecuteResponse transaction_id - * @property {number|Long|null} [reserved_id] ReserveBeginExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveBeginExecuteResponse tablet_alias - * @property {string|null} [session_state_changes] ReserveBeginExecuteResponse session_state_changes + * @interface ICommitRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitRequest immediate_caller_id + * @property {query.ITarget|null} [target] CommitRequest target + * @property {number|Long|null} [transaction_id] CommitRequest transaction_id */ /** - * Constructs a new ReserveBeginExecuteResponse. + * Constructs a new CommitRequest. * @memberof query - * @classdesc Represents a ReserveBeginExecuteResponse. - * @implements IReserveBeginExecuteResponse + * @classdesc Represents a CommitRequest. + * @implements ICommitRequest * @constructor - * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set + * @param {query.ICommitRequest=} [properties] Properties to set */ - function ReserveBeginExecuteResponse(properties) { + function CommitRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71006,140 +71641,114 @@ $root.query = (function() { } /** - * ReserveBeginExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.error = null; - - /** - * ReserveBeginExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.result = null; - - /** - * ReserveBeginExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveBeginExecuteResponse + * CommitRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.CommitRequest * @instance */ - ReserveBeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CommitRequest.prototype.effective_caller_id = null; /** - * ReserveBeginExecuteResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReserveBeginExecuteResponse + * CommitRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.CommitRequest * @instance */ - ReserveBeginExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CommitRequest.prototype.immediate_caller_id = null; /** - * ReserveBeginExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveBeginExecuteResponse + * CommitRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.CommitRequest * @instance */ - ReserveBeginExecuteResponse.prototype.tablet_alias = null; + CommitRequest.prototype.target = null; /** - * ReserveBeginExecuteResponse session_state_changes. - * @member {string} session_state_changes - * @memberof query.ReserveBeginExecuteResponse + * CommitRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.CommitRequest * @instance */ - ReserveBeginExecuteResponse.prototype.session_state_changes = ""; + CommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ReserveBeginExecuteResponse instance using the specified properties. + * Creates a new CommitRequest instance using the specified properties. * @function create - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static - * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse instance + * @param {query.ICommitRequest=} [properties] Properties to set + * @returns {query.CommitRequest} CommitRequest instance */ - ReserveBeginExecuteResponse.create = function create(properties) { - return new ReserveBeginExecuteResponse(properties); + CommitRequest.create = function create(properties) { + return new CommitRequest(properties); }; /** - * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. + * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. * @function encode - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static - * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode + * @param {query.ICommitRequest} message CommitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginExecuteResponse.encode = function encode(message, writer) { + CommitRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.session_state_changes); + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); return writer; }; /** - * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. + * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static - * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode + * @param {query.ICommitRequest} message CommitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + CommitRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. + * Decodes a CommitRequest message from the specified reader or buffer. * @function decode - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse + * @returns {query.CommitRequest} CommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginExecuteResponse.decode = function decode(reader, length) { + CommitRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.transaction_id = reader.int64(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.reserved_id = reader.int64(); - break; - case 5: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 6: - message.session_state_changes = reader.string(); + message.transaction_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -71150,80 +71759,79 @@ $root.query = (function() { }; /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a CommitRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse + * @returns {query.CommitRequest} CommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + CommitRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveBeginExecuteResponse message. + * Verifies a CommitRequest message. * @function verify - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveBeginExecuteResponse.verify = function verify(message) { + CommitRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); if (error) - return "error." + error; + return "effective_caller_id." + error; } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); if (error) - return "result." + error; + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; } if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) return "transaction_id: integer|Long expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - if (!$util.isString(message.session_state_changes)) - return "session_state_changes: string expected"; return null; }; /** - * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static * @param {Object.} object Plain object - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse + * @returns {query.CommitRequest} CommitRequest */ - ReserveBeginExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginExecuteResponse) + CommitRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.CommitRequest) return object; - var message = new $root.query.ReserveBeginExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); + var message = new $root.query.CommitRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.CommitRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.CommitRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.CommitRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); } if (object.transaction_id != null) if ($util.Long) @@ -71234,115 +71842,78 @@ $root.query = (function() { message.transaction_id = object.transaction_id; else if (typeof object.transaction_id === "object") message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.session_state_changes != null) - message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @static - * @param {query.ReserveBeginExecuteResponse} message ReserveBeginExecuteResponse + * @param {query.CommitRequest} message CommitRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveBeginExecuteResponse.toObject = function toObject(message, options) { + CommitRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.error = null; - object.result = null; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; if ($util.Long) { var long = new $util.Long(0, 0, false); object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.transaction_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - object.session_state_changes = ""; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) if (typeof message.transaction_id === "number") object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; else object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this ReserveBeginExecuteResponse to JSON. + * Converts this CommitRequest to JSON. * @function toJSON - * @memberof query.ReserveBeginExecuteResponse + * @memberof query.CommitRequest * @instance * @returns {Object.} JSON object */ - ReserveBeginExecuteResponse.prototype.toJSON = function toJSON() { + CommitRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveBeginExecuteResponse; + return CommitRequest; })(); - query.ReserveBeginStreamExecuteRequest = (function() { + query.CommitResponse = (function() { /** - * Properties of a ReserveBeginStreamExecuteRequest. + * Properties of a CommitResponse. * @memberof query - * @interface IReserveBeginStreamExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveBeginStreamExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveBeginStreamExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveBeginStreamExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveBeginStreamExecuteRequest query - * @property {query.IExecuteOptions|null} [options] ReserveBeginStreamExecuteRequest options - * @property {Array.|null} [pre_queries] ReserveBeginStreamExecuteRequest pre_queries - * @property {Array.|null} [post_begin_queries] ReserveBeginStreamExecuteRequest post_begin_queries + * @interface ICommitResponse + * @property {number|Long|null} [reserved_id] CommitResponse reserved_id */ /** - * Constructs a new ReserveBeginStreamExecuteRequest. + * Constructs a new CommitResponse. * @memberof query - * @classdesc Represents a ReserveBeginStreamExecuteRequest. - * @implements IReserveBeginStreamExecuteRequest + * @classdesc Represents a CommitResponse. + * @implements ICommitResponse * @constructor - * @param {query.IReserveBeginStreamExecuteRequest=} [properties] Properties to set + * @param {query.ICommitResponse=} [properties] Properties to set */ - function ReserveBeginStreamExecuteRequest(properties) { - this.pre_queries = []; - this.post_begin_queries = []; + function CommitResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71350,83 +71921,263 @@ $root.query = (function() { } /** - * ReserveBeginStreamExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveBeginStreamExecuteRequest + * CommitResponse reserved_id. + * @member {number|Long} reserved_id + * @memberof query.CommitResponse * @instance */ - ReserveBeginStreamExecuteRequest.prototype.effective_caller_id = null; + CommitResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ReserveBeginStreamExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveBeginStreamExecuteRequest - * @instance + * Creates a new CommitResponse instance using the specified properties. + * @function create + * @memberof query.CommitResponse + * @static + * @param {query.ICommitResponse=} [properties] Properties to set + * @returns {query.CommitResponse} CommitResponse instance */ - ReserveBeginStreamExecuteRequest.prototype.immediate_caller_id = null; + CommitResponse.create = function create(properties) { + return new CommitResponse(properties); + }; /** - * ReserveBeginStreamExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveBeginStreamExecuteRequest + * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * @function encode + * @memberof query.CommitResponse + * @static + * @param {query.ICommitResponse} message CommitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); + return writer; + }; + + /** + * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.CommitResponse + * @static + * @param {query.ICommitResponse} message CommitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitResponse message from the specified reader or buffer. + * @function decode + * @memberof query.CommitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.CommitResponse} CommitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reserved_id = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.CommitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.CommitResponse} CommitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitResponse message. + * @function verify + * @memberof query.CommitResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + return null; + }; + + /** + * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.CommitResponse + * @static + * @param {Object.} object Plain object + * @returns {query.CommitResponse} CommitResponse + */ + CommitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.CommitResponse) + return object; + var message = new $root.query.CommitResponse(); + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.CommitResponse + * @static + * @param {query.CommitResponse} message CommitResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + return object; + }; + + /** + * Converts this CommitResponse to JSON. + * @function toJSON + * @memberof query.CommitResponse * @instance + * @returns {Object.} JSON object */ - ReserveBeginStreamExecuteRequest.prototype.target = null; + CommitResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitResponse; + })(); + + query.RollbackRequest = (function() { /** - * ReserveBeginStreamExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveBeginStreamExecuteRequest + * Properties of a RollbackRequest. + * @memberof query + * @interface IRollbackRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackRequest immediate_caller_id + * @property {query.ITarget|null} [target] RollbackRequest target + * @property {number|Long|null} [transaction_id] RollbackRequest transaction_id + */ + + /** + * Constructs a new RollbackRequest. + * @memberof query + * @classdesc Represents a RollbackRequest. + * @implements IRollbackRequest + * @constructor + * @param {query.IRollbackRequest=} [properties] Properties to set + */ + function RollbackRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.RollbackRequest * @instance */ - ReserveBeginStreamExecuteRequest.prototype.query = null; + RollbackRequest.prototype.effective_caller_id = null; /** - * ReserveBeginStreamExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveBeginStreamExecuteRequest + * RollbackRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.RollbackRequest * @instance */ - ReserveBeginStreamExecuteRequest.prototype.options = null; + RollbackRequest.prototype.immediate_caller_id = null; /** - * ReserveBeginStreamExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveBeginStreamExecuteRequest + * RollbackRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.RollbackRequest * @instance */ - ReserveBeginStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; + RollbackRequest.prototype.target = null; /** - * ReserveBeginStreamExecuteRequest post_begin_queries. - * @member {Array.} post_begin_queries - * @memberof query.ReserveBeginStreamExecuteRequest + * RollbackRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.RollbackRequest * @instance */ - ReserveBeginStreamExecuteRequest.prototype.post_begin_queries = $util.emptyArray; + RollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ReserveBeginStreamExecuteRequest instance using the specified properties. + * Creates a new RollbackRequest instance using the specified properties. * @function create - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static - * @param {query.IReserveBeginStreamExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest instance + * @param {query.IRollbackRequest=} [properties] Properties to set + * @returns {query.RollbackRequest} RollbackRequest instance */ - ReserveBeginStreamExecuteRequest.create = function create(properties) { - return new ReserveBeginStreamExecuteRequest(properties); + RollbackRequest.create = function create(properties) { + return new RollbackRequest(properties); }; /** - * Encodes the specified ReserveBeginStreamExecuteRequest message. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. + * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. * @function encode - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static - * @param {query.IReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest message or plain object to encode + * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginStreamExecuteRequest.encode = function encode(message, writer) { + RollbackRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) @@ -71435,47 +72186,39 @@ $root.query = (function() { $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.target != null && Object.hasOwnProperty.call(message, "target")) $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); - if (message.post_begin_queries != null && message.post_begin_queries.length) - for (var i = 0; i < message.post_begin_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.post_begin_queries[i]); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); return writer; }; /** - * Encodes the specified ReserveBeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. + * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static - * @param {query.IReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest message or plain object to encode + * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + RollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer. + * Decodes a RollbackRequest message from the specified reader or buffer. * @function decode - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest + * @returns {query.RollbackRequest} RollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginStreamExecuteRequest.decode = function decode(reader, length) { + RollbackRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginStreamExecuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -71489,20 +72232,7 @@ $root.query = (function() { message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - case 7: - if (!(message.post_begin_queries && message.post_begin_queries.length)) - message.post_begin_queries = []; - message.post_begin_queries.push(reader.string()); + message.transaction_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -71513,30 +72243,30 @@ $root.query = (function() { }; /** - * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer, length delimited. + * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest + * @returns {query.RollbackRequest} RollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { + RollbackRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveBeginStreamExecuteRequest message. + * Verifies a RollbackRequest message. * @function verify - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveBeginStreamExecuteRequest.verify = function verify(message) { + RollbackRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { @@ -71554,110 +72284,73 @@ $root.query = (function() { if (error) return "target." + error; } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; - } - if (message.post_begin_queries != null && message.hasOwnProperty("post_begin_queries")) { - if (!Array.isArray(message.post_begin_queries)) - return "post_begin_queries: array expected"; - for (var i = 0; i < message.post_begin_queries.length; ++i) - if (!$util.isString(message.post_begin_queries[i])) - return "post_begin_queries: string[] expected"; - } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; return null; }; /** - * Creates a ReserveBeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static * @param {Object.} object Plain object - * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest + * @returns {query.RollbackRequest} RollbackRequest */ - ReserveBeginStreamExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginStreamExecuteRequest) + RollbackRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.RollbackRequest) return object; - var message = new $root.query.ReserveBeginStreamExecuteRequest(); + var message = new $root.query.RollbackRequest(); if (object.effective_caller_id != null) { if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteRequest.effective_caller_id: object expected"); + throw TypeError(".query.RollbackRequest.effective_caller_id: object expected"); message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } if (object.immediate_caller_id != null) { if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteRequest.immediate_caller_id: object expected"); + throw TypeError(".query.RollbackRequest.immediate_caller_id: object expected"); message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } if (object.target != null) { if (typeof object.target !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteRequest.target: object expected"); + throw TypeError(".query.RollbackRequest.target: object expected"); message.target = $root.query.Target.fromObject(object.target); } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveBeginStreamExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); - } - if (object.post_begin_queries) { - if (!Array.isArray(object.post_begin_queries)) - throw TypeError(".query.ReserveBeginStreamExecuteRequest.post_begin_queries: array expected"); - message.post_begin_queries = []; - for (var i = 0; i < object.post_begin_queries.length; ++i) - message.post_begin_queries[i] = String(object.post_begin_queries[i]); - } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a ReserveBeginStreamExecuteRequest message. Also converts values to other types if specified. + * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @static - * @param {query.ReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest + * @param {query.RollbackRequest} message RollbackRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveBeginStreamExecuteRequest.toObject = function toObject(message, options) { + RollbackRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pre_queries = []; - object.post_begin_queries = []; - } if (options.defaults) { object.effective_caller_id = null; object.immediate_caller_id = null; object.target = null; - object.query = null; - object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; } if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); @@ -71665,60 +72358,46 @@ $root.query = (function() { object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); if (message.target != null && message.hasOwnProperty("target")) object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } - if (message.post_begin_queries && message.post_begin_queries.length) { - object.post_begin_queries = []; - for (var j = 0; j < message.post_begin_queries.length; ++j) - object.post_begin_queries[j] = message.post_begin_queries[j]; - } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; return object; }; /** - * Converts this ReserveBeginStreamExecuteRequest to JSON. + * Converts this RollbackRequest to JSON. * @function toJSON - * @memberof query.ReserveBeginStreamExecuteRequest + * @memberof query.RollbackRequest * @instance * @returns {Object.} JSON object */ - ReserveBeginStreamExecuteRequest.prototype.toJSON = function toJSON() { + RollbackRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveBeginStreamExecuteRequest; + return RollbackRequest; })(); - query.ReserveBeginStreamExecuteResponse = (function() { + query.RollbackResponse = (function() { /** - * Properties of a ReserveBeginStreamExecuteResponse. + * Properties of a RollbackResponse. * @memberof query - * @interface IReserveBeginStreamExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveBeginStreamExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveBeginStreamExecuteResponse result - * @property {number|Long|null} [transaction_id] ReserveBeginStreamExecuteResponse transaction_id - * @property {number|Long|null} [reserved_id] ReserveBeginStreamExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveBeginStreamExecuteResponse tablet_alias - * @property {string|null} [session_state_changes] ReserveBeginStreamExecuteResponse session_state_changes + * @interface IRollbackResponse + * @property {number|Long|null} [reserved_id] RollbackResponse reserved_id */ /** - * Constructs a new ReserveBeginStreamExecuteResponse. + * Constructs a new RollbackResponse. * @memberof query - * @classdesc Represents a ReserveBeginStreamExecuteResponse. - * @implements IReserveBeginStreamExecuteResponse + * @classdesc Represents a RollbackResponse. + * @implements IRollbackResponse * @constructor - * @param {query.IReserveBeginStreamExecuteResponse=} [properties] Properties to set + * @param {query.IRollbackResponse=} [properties] Properties to set */ - function ReserveBeginStreamExecuteResponse(properties) { + function RollbackResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71726,141 +72405,76 @@ $root.query = (function() { } /** - * ReserveBeginStreamExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveBeginStreamExecuteResponse - * @instance - */ - ReserveBeginStreamExecuteResponse.prototype.error = null; - - /** - * ReserveBeginStreamExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveBeginStreamExecuteResponse - * @instance - */ - ReserveBeginStreamExecuteResponse.prototype.result = null; - - /** - * ReserveBeginStreamExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveBeginStreamExecuteResponse - * @instance - */ - ReserveBeginStreamExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveBeginStreamExecuteResponse reserved_id. + * RollbackResponse reserved_id. * @member {number|Long} reserved_id - * @memberof query.ReserveBeginStreamExecuteResponse - * @instance - */ - ReserveBeginStreamExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveBeginStreamExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveBeginStreamExecuteResponse - * @instance - */ - ReserveBeginStreamExecuteResponse.prototype.tablet_alias = null; - - /** - * ReserveBeginStreamExecuteResponse session_state_changes. - * @member {string} session_state_changes - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @instance */ - ReserveBeginStreamExecuteResponse.prototype.session_state_changes = ""; + RollbackResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ReserveBeginStreamExecuteResponse instance using the specified properties. + * Creates a new RollbackResponse instance using the specified properties. * @function create - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static - * @param {query.IReserveBeginStreamExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse instance + * @param {query.IRollbackResponse=} [properties] Properties to set + * @returns {query.RollbackResponse} RollbackResponse instance */ - ReserveBeginStreamExecuteResponse.create = function create(properties) { - return new ReserveBeginStreamExecuteResponse(properties); + RollbackResponse.create = function create(properties) { + return new RollbackResponse(properties); }; /** - * Encodes the specified ReserveBeginStreamExecuteResponse message. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. + * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. * @function encode - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static - * @param {query.IReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse message or plain object to encode + * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginStreamExecuteResponse.encode = function encode(message, writer) { + RollbackResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.session_state_changes); + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); return writer; }; /** - * Encodes the specified ReserveBeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. + * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static - * @param {query.IReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse message or plain object to encode + * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReserveBeginStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { + RollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer. + * Decodes a RollbackResponse message from the specified reader or buffer. * @function decode - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse + * @returns {query.RollbackResponse} RollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginStreamExecuteResponse.decode = function decode(reader, length) { + RollbackResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginStreamExecuteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - case 3: - message.transaction_id = reader.int64(); - break; - case 4: message.reserved_id = reader.int64(); break; - case 5: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 6: - message.session_state_changes = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -71870,90 +72484,50 @@ $root.query = (function() { }; /** - * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer, length delimited. + * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse + * @returns {query.RollbackResponse} RollbackResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReserveBeginStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { + RollbackResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReserveBeginStreamExecuteResponse message. + * Verifies a RollbackResponse message. * @function verify - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReserveBeginStreamExecuteResponse.verify = function verify(message) { + RollbackResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - if (!$util.isString(message.session_state_changes)) - return "session_state_changes: string expected"; return null; }; /** - * Creates a ReserveBeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static * @param {Object.} object Plain object - * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse + * @returns {query.RollbackResponse} RollbackResponse */ - ReserveBeginStreamExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginStreamExecuteResponse) + RollbackResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.RollbackResponse) return object; - var message = new $root.query.ReserveBeginStreamExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + var message = new $root.query.RollbackResponse(); if (object.reserved_id != null) if ($util.Long) (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; @@ -71963,102 +72537,72 @@ $root.query = (function() { message.reserved_id = object.reserved_id; else if (typeof object.reserved_id === "object") message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveBeginStreamExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.session_state_changes != null) - message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a ReserveBeginStreamExecuteResponse message. Also converts values to other types if specified. + * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @static - * @param {query.ReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse + * @param {query.RollbackResponse} message RollbackResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReserveBeginStreamExecuteResponse.toObject = function toObject(message, options) { + RollbackResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; + if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - object.session_state_changes = ""; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) if (typeof message.reserved_id === "number") object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; else object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) - object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this ReserveBeginStreamExecuteResponse to JSON. + * Converts this RollbackResponse to JSON. * @function toJSON - * @memberof query.ReserveBeginStreamExecuteResponse + * @memberof query.RollbackResponse * @instance * @returns {Object.} JSON object */ - ReserveBeginStreamExecuteResponse.prototype.toJSON = function toJSON() { + RollbackResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReserveBeginStreamExecuteResponse; + return RollbackResponse; })(); - query.ReleaseRequest = (function() { + query.PrepareRequest = (function() { /** - * Properties of a ReleaseRequest. + * Properties of a PrepareRequest. * @memberof query - * @interface IReleaseRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReleaseRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReleaseRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReleaseRequest target - * @property {number|Long|null} [transaction_id] ReleaseRequest transaction_id - * @property {number|Long|null} [reserved_id] ReleaseRequest reserved_id + * @interface IPrepareRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] PrepareRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] PrepareRequest immediate_caller_id + * @property {query.ITarget|null} [target] PrepareRequest target + * @property {number|Long|null} [transaction_id] PrepareRequest transaction_id + * @property {string|null} [dtid] PrepareRequest dtid */ /** - * Constructs a new ReleaseRequest. + * Constructs a new PrepareRequest. * @memberof query - * @classdesc Represents a ReleaseRequest. - * @implements IReleaseRequest + * @classdesc Represents a PrepareRequest. + * @implements IPrepareRequest * @constructor - * @param {query.IReleaseRequest=} [properties] Properties to set + * @param {query.IPrepareRequest=} [properties] Properties to set */ - function ReleaseRequest(properties) { + function PrepareRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72066,67 +72610,67 @@ $root.query = (function() { } /** - * ReleaseRequest effective_caller_id. + * PrepareRequest effective_caller_id. * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @instance */ - ReleaseRequest.prototype.effective_caller_id = null; + PrepareRequest.prototype.effective_caller_id = null; /** - * ReleaseRequest immediate_caller_id. + * PrepareRequest immediate_caller_id. * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @instance */ - ReleaseRequest.prototype.immediate_caller_id = null; + PrepareRequest.prototype.immediate_caller_id = null; /** - * ReleaseRequest target. + * PrepareRequest target. * @member {query.ITarget|null|undefined} target - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @instance */ - ReleaseRequest.prototype.target = null; + PrepareRequest.prototype.target = null; /** - * ReleaseRequest transaction_id. + * PrepareRequest transaction_id. * @member {number|Long} transaction_id - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @instance */ - ReleaseRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PrepareRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ReleaseRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReleaseRequest + * PrepareRequest dtid. + * @member {string} dtid + * @memberof query.PrepareRequest * @instance */ - ReleaseRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PrepareRequest.prototype.dtid = ""; /** - * Creates a new ReleaseRequest instance using the specified properties. + * Creates a new PrepareRequest instance using the specified properties. * @function create - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static - * @param {query.IReleaseRequest=} [properties] Properties to set - * @returns {query.ReleaseRequest} ReleaseRequest instance + * @param {query.IPrepareRequest=} [properties] Properties to set + * @returns {query.PrepareRequest} PrepareRequest instance */ - ReleaseRequest.create = function create(properties) { - return new ReleaseRequest(properties); + PrepareRequest.create = function create(properties) { + return new PrepareRequest(properties); }; /** - * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. + * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. * @function encode - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static - * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode + * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReleaseRequest.encode = function encode(message, writer) { + PrepareRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) @@ -72137,39 +72681,39 @@ $root.query = (function() { $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.reserved_id); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); return writer; }; /** - * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. + * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static - * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode + * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + PrepareRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReleaseRequest message from the specified reader or buffer. + * Decodes a PrepareRequest message from the specified reader or buffer. * @function decode - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReleaseRequest} ReleaseRequest + * @returns {query.PrepareRequest} PrepareRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReleaseRequest.decode = function decode(reader, length) { + PrepareRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -72186,7 +72730,7 @@ $root.query = (function() { message.transaction_id = reader.int64(); break; case 5: - message.reserved_id = reader.int64(); + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -72197,30 +72741,30 @@ $root.query = (function() { }; /** - * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReleaseRequest} ReleaseRequest + * @returns {query.PrepareRequest} PrepareRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + PrepareRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReleaseRequest message. + * Verifies a PrepareRequest message. * @function verify - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReleaseRequest.verify = function verify(message) { + PrepareRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { @@ -72241,37 +72785,37 @@ $root.query = (function() { if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) return "transaction_id: integer|Long expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; return null; }; /** - * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static * @param {Object.} object Plain object - * @returns {query.ReleaseRequest} ReleaseRequest + * @returns {query.PrepareRequest} PrepareRequest */ - ReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReleaseRequest) + PrepareRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.PrepareRequest) return object; - var message = new $root.query.ReleaseRequest(); + var message = new $root.query.PrepareRequest(); if (object.effective_caller_id != null) { if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReleaseRequest.effective_caller_id: object expected"); + throw TypeError(".query.PrepareRequest.effective_caller_id: object expected"); message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } if (object.immediate_caller_id != null) { if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReleaseRequest.immediate_caller_id: object expected"); + throw TypeError(".query.PrepareRequest.immediate_caller_id: object expected"); message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } if (object.target != null) { if (typeof object.target !== "object") - throw TypeError(".query.ReleaseRequest.target: object expected"); + throw TypeError(".query.PrepareRequest.target: object expected"); message.target = $root.query.Target.fromObject(object.target); } if (object.transaction_id != null) @@ -72283,28 +72827,21 @@ $root.query = (function() { message.transaction_id = object.transaction_id; else if (typeof object.transaction_id === "object") message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @static - * @param {query.ReleaseRequest} message ReleaseRequest + * @param {query.PrepareRequest} message PrepareRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReleaseRequest.toObject = function toObject(message, options) { + PrepareRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -72317,11 +72854,7 @@ $root.query = (function() { object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.transaction_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; + object.dtid = ""; } if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); @@ -72334,45 +72867,42 @@ $root.query = (function() { object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; else object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this ReleaseRequest to JSON. + * Converts this PrepareRequest to JSON. * @function toJSON - * @memberof query.ReleaseRequest + * @memberof query.PrepareRequest * @instance * @returns {Object.} JSON object */ - ReleaseRequest.prototype.toJSON = function toJSON() { + PrepareRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReleaseRequest; + return PrepareRequest; })(); - query.ReleaseResponse = (function() { + query.PrepareResponse = (function() { /** - * Properties of a ReleaseResponse. + * Properties of a PrepareResponse. * @memberof query - * @interface IReleaseResponse + * @interface IPrepareResponse */ /** - * Constructs a new ReleaseResponse. + * Constructs a new PrepareResponse. * @memberof query - * @classdesc Represents a ReleaseResponse. - * @implements IReleaseResponse + * @classdesc Represents a PrepareResponse. + * @implements IPrepareResponse * @constructor - * @param {query.IReleaseResponse=} [properties] Properties to set + * @param {query.IPrepareResponse=} [properties] Properties to set */ - function ReleaseResponse(properties) { + function PrepareResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72380,60 +72910,60 @@ $root.query = (function() { } /** - * Creates a new ReleaseResponse instance using the specified properties. + * Creates a new PrepareResponse instance using the specified properties. * @function create - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static - * @param {query.IReleaseResponse=} [properties] Properties to set - * @returns {query.ReleaseResponse} ReleaseResponse instance + * @param {query.IPrepareResponse=} [properties] Properties to set + * @returns {query.PrepareResponse} PrepareResponse instance */ - ReleaseResponse.create = function create(properties) { - return new ReleaseResponse(properties); + PrepareResponse.create = function create(properties) { + return new PrepareResponse(properties); }; /** - * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. * @function encode - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static - * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode + * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReleaseResponse.encode = function encode(message, writer) { + PrepareResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static - * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode + * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { + PrepareResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReleaseResponse message from the specified reader or buffer. + * Decodes a PrepareResponse message from the specified reader or buffer. * @function decode - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.ReleaseResponse} ReleaseResponse + * @returns {query.PrepareResponse} PrepareResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReleaseResponse.decode = function decode(reader, length) { + PrepareResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -72446,93 +72976,97 @@ $root.query = (function() { }; /** - * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. + * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReleaseResponse} ReleaseResponse + * @returns {query.PrepareResponse} PrepareResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReleaseResponse.decodeDelimited = function decodeDelimited(reader) { + PrepareResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReleaseResponse message. + * Verifies a PrepareResponse message. * @function verify - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReleaseResponse.verify = function verify(message) { + PrepareResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static * @param {Object.} object Plain object - * @returns {query.ReleaseResponse} ReleaseResponse + * @returns {query.PrepareResponse} PrepareResponse */ - ReleaseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReleaseResponse) + PrepareResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.PrepareResponse) return object; - return new $root.query.ReleaseResponse(); + return new $root.query.PrepareResponse(); }; /** - * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. + * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @static - * @param {query.ReleaseResponse} message ReleaseResponse + * @param {query.PrepareResponse} message PrepareResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReleaseResponse.toObject = function toObject() { + PrepareResponse.toObject = function toObject() { return {}; }; /** - * Converts this ReleaseResponse to JSON. + * Converts this PrepareResponse to JSON. * @function toJSON - * @memberof query.ReleaseResponse + * @memberof query.PrepareResponse * @instance * @returns {Object.} JSON object */ - ReleaseResponse.prototype.toJSON = function toJSON() { + PrepareResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReleaseResponse; + return PrepareResponse; })(); - query.StreamHealthRequest = (function() { + query.CommitPreparedRequest = (function() { /** - * Properties of a StreamHealthRequest. + * Properties of a CommitPreparedRequest. * @memberof query - * @interface IStreamHealthRequest + * @interface ICommitPreparedRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitPreparedRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitPreparedRequest immediate_caller_id + * @property {query.ITarget|null} [target] CommitPreparedRequest target + * @property {string|null} [dtid] CommitPreparedRequest dtid */ /** - * Constructs a new StreamHealthRequest. + * Constructs a new CommitPreparedRequest. * @memberof query - * @classdesc Represents a StreamHealthRequest. - * @implements IStreamHealthRequest + * @classdesc Represents a CommitPreparedRequest. + * @implements ICommitPreparedRequest * @constructor - * @param {query.IStreamHealthRequest=} [properties] Properties to set + * @param {query.ICommitPreparedRequest=} [properties] Properties to set */ - function StreamHealthRequest(properties) { + function CommitPreparedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72540,63 +73074,115 @@ $root.query = (function() { } /** - * Creates a new StreamHealthRequest instance using the specified properties. + * CommitPreparedRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.CommitPreparedRequest + * @instance + */ + CommitPreparedRequest.prototype.effective_caller_id = null; + + /** + * CommitPreparedRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.CommitPreparedRequest + * @instance + */ + CommitPreparedRequest.prototype.immediate_caller_id = null; + + /** + * CommitPreparedRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.CommitPreparedRequest + * @instance + */ + CommitPreparedRequest.prototype.target = null; + + /** + * CommitPreparedRequest dtid. + * @member {string} dtid + * @memberof query.CommitPreparedRequest + * @instance + */ + CommitPreparedRequest.prototype.dtid = ""; + + /** + * Creates a new CommitPreparedRequest instance using the specified properties. * @function create - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static - * @param {query.IStreamHealthRequest=} [properties] Properties to set - * @returns {query.StreamHealthRequest} StreamHealthRequest instance + * @param {query.ICommitPreparedRequest=} [properties] Properties to set + * @returns {query.CommitPreparedRequest} CommitPreparedRequest instance */ - StreamHealthRequest.create = function create(properties) { - return new StreamHealthRequest(properties); + CommitPreparedRequest.create = function create(properties) { + return new CommitPreparedRequest(properties); }; /** - * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. + * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. * @function encode - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static - * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode + * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamHealthRequest.encode = function encode(message, writer) { + CommitPreparedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); return writer; }; /** - * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. + * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static - * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode + * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamHealthRequest.encodeDelimited = function encodeDelimited(message, writer) { + CommitPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamHealthRequest message from the specified reader or buffer. + * Decodes a CommitPreparedRequest message from the specified reader or buffer. * @function decode - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StreamHealthRequest} StreamHealthRequest + * @returns {query.CommitPreparedRequest} CommitPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamHealthRequest.decode = function decode(reader, length) { + CommitPreparedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.dtid = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -72606,103 +73192,146 @@ $root.query = (function() { }; /** - * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. + * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamHealthRequest} StreamHealthRequest + * @returns {query.CommitPreparedRequest} CommitPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamHealthRequest.decodeDelimited = function decodeDelimited(reader) { + CommitPreparedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamHealthRequest message. + * Verifies a CommitPreparedRequest message. * @function verify - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamHealthRequest.verify = function verify(message) { + CommitPreparedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; return null; }; /** - * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static * @param {Object.} object Plain object - * @returns {query.StreamHealthRequest} StreamHealthRequest + * @returns {query.CommitPreparedRequest} CommitPreparedRequest */ - StreamHealthRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamHealthRequest) + CommitPreparedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.CommitPreparedRequest) return object; - return new $root.query.StreamHealthRequest(); + var message = new $root.query.CommitPreparedRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.CommitPreparedRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.CommitPreparedRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.CommitPreparedRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.dtid != null) + message.dtid = String(object.dtid); + return message; }; /** - * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. + * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @static - * @param {query.StreamHealthRequest} message StreamHealthRequest + * @param {query.CommitPreparedRequest} message CommitPreparedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamHealthRequest.toObject = function toObject() { - return {}; + CommitPreparedRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.dtid = ""; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; + return object; }; /** - * Converts this StreamHealthRequest to JSON. + * Converts this CommitPreparedRequest to JSON. * @function toJSON - * @memberof query.StreamHealthRequest + * @memberof query.CommitPreparedRequest * @instance * @returns {Object.} JSON object */ - StreamHealthRequest.prototype.toJSON = function toJSON() { + CommitPreparedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamHealthRequest; + return CommitPreparedRequest; })(); - query.RealtimeStats = (function() { + query.CommitPreparedResponse = (function() { /** - * Properties of a RealtimeStats. + * Properties of a CommitPreparedResponse. * @memberof query - * @interface IRealtimeStats - * @property {string|null} [health_error] RealtimeStats health_error - * @property {number|null} [replication_lag_seconds] RealtimeStats replication_lag_seconds - * @property {number|null} [binlog_players_count] RealtimeStats binlog_players_count - * @property {number|Long|null} [filtered_replication_lag_seconds] RealtimeStats filtered_replication_lag_seconds - * @property {number|null} [cpu_usage] RealtimeStats cpu_usage - * @property {number|null} [qps] RealtimeStats qps - * @property {Array.|null} [table_schema_changed] RealtimeStats table_schema_changed - * @property {Array.|null} [view_schema_changed] RealtimeStats view_schema_changed + * @interface ICommitPreparedResponse */ /** - * Constructs a new RealtimeStats. + * Constructs a new CommitPreparedResponse. * @memberof query - * @classdesc Represents a RealtimeStats. - * @implements IRealtimeStats + * @classdesc Represents a CommitPreparedResponse. + * @implements ICommitPreparedResponse * @constructor - * @param {query.IRealtimeStats=} [properties] Properties to set + * @param {query.ICommitPreparedResponse=} [properties] Properties to set */ - function RealtimeStats(properties) { - this.table_schema_changed = []; - this.view_schema_changed = []; + function CommitPreparedResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72710,173 +73339,63 @@ $root.query = (function() { } /** - * RealtimeStats health_error. - * @member {string} health_error - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.health_error = ""; - - /** - * RealtimeStats replication_lag_seconds. - * @member {number} replication_lag_seconds - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.replication_lag_seconds = 0; - - /** - * RealtimeStats binlog_players_count. - * @member {number} binlog_players_count - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.binlog_players_count = 0; - - /** - * RealtimeStats filtered_replication_lag_seconds. - * @member {number|Long} filtered_replication_lag_seconds - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.filtered_replication_lag_seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RealtimeStats cpu_usage. - * @member {number} cpu_usage - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.cpu_usage = 0; - - /** - * RealtimeStats qps. - * @member {number} qps - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.qps = 0; - - /** - * RealtimeStats table_schema_changed. - * @member {Array.} table_schema_changed - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.table_schema_changed = $util.emptyArray; - - /** - * RealtimeStats view_schema_changed. - * @member {Array.} view_schema_changed - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.view_schema_changed = $util.emptyArray; - - /** - * Creates a new RealtimeStats instance using the specified properties. + * Creates a new CommitPreparedResponse instance using the specified properties. * @function create - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static - * @param {query.IRealtimeStats=} [properties] Properties to set - * @returns {query.RealtimeStats} RealtimeStats instance + * @param {query.ICommitPreparedResponse=} [properties] Properties to set + * @returns {query.CommitPreparedResponse} CommitPreparedResponse instance */ - RealtimeStats.create = function create(properties) { - return new RealtimeStats(properties); + CommitPreparedResponse.create = function create(properties) { + return new CommitPreparedResponse(properties); }; /** - * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. + * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. * @function encode - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static - * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode + * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RealtimeStats.encode = function encode(message, writer) { + CommitPreparedResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.health_error != null && Object.hasOwnProperty.call(message, "health_error")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.health_error); - if (message.replication_lag_seconds != null && Object.hasOwnProperty.call(message, "replication_lag_seconds")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.replication_lag_seconds); - if (message.binlog_players_count != null && Object.hasOwnProperty.call(message, "binlog_players_count")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.binlog_players_count); - if (message.filtered_replication_lag_seconds != null && Object.hasOwnProperty.call(message, "filtered_replication_lag_seconds")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filtered_replication_lag_seconds); - if (message.cpu_usage != null && Object.hasOwnProperty.call(message, "cpu_usage")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.cpu_usage); - if (message.qps != null && Object.hasOwnProperty.call(message, "qps")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.qps); - if (message.table_schema_changed != null && message.table_schema_changed.length) - for (var i = 0; i < message.table_schema_changed.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.table_schema_changed[i]); - if (message.view_schema_changed != null && message.view_schema_changed.length) - for (var i = 0; i < message.view_schema_changed.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.view_schema_changed[i]); return writer; }; /** - * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. + * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static - * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode + * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RealtimeStats.encodeDelimited = function encodeDelimited(message, writer) { + CommitPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RealtimeStats message from the specified reader or buffer. + * Decodes a CommitPreparedResponse message from the specified reader or buffer. * @function decode - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.RealtimeStats} RealtimeStats + * @returns {query.CommitPreparedResponse} CommitPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RealtimeStats.decode = function decode(reader, length) { + CommitPreparedResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RealtimeStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.health_error = reader.string(); - break; - case 2: - message.replication_lag_seconds = reader.uint32(); - break; - case 3: - message.binlog_players_count = reader.int32(); - break; - case 4: - message.filtered_replication_lag_seconds = reader.int64(); - break; - case 5: - message.cpu_usage = reader.double(); - break; - case 6: - message.qps = reader.double(); - break; - case 7: - if (!(message.table_schema_changed && message.table_schema_changed.length)) - message.table_schema_changed = []; - message.table_schema_changed.push(reader.string()); - break; - case 8: - if (!(message.view_schema_changed && message.view_schema_changed.length)) - message.view_schema_changed = []; - message.view_schema_changed.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -72886,207 +73405,98 @@ $root.query = (function() { }; /** - * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. + * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RealtimeStats} RealtimeStats + * @returns {query.CommitPreparedResponse} CommitPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RealtimeStats.decodeDelimited = function decodeDelimited(reader) { + CommitPreparedResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RealtimeStats message. + * Verifies a CommitPreparedResponse message. * @function verify - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RealtimeStats.verify = function verify(message) { + CommitPreparedResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.health_error != null && message.hasOwnProperty("health_error")) - if (!$util.isString(message.health_error)) - return "health_error: string expected"; - if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) - if (!$util.isInteger(message.replication_lag_seconds)) - return "replication_lag_seconds: integer expected"; - if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) - if (!$util.isInteger(message.binlog_players_count)) - return "binlog_players_count: integer expected"; - if (message.filtered_replication_lag_seconds != null && message.hasOwnProperty("filtered_replication_lag_seconds")) - if (!$util.isInteger(message.filtered_replication_lag_seconds) && !(message.filtered_replication_lag_seconds && $util.isInteger(message.filtered_replication_lag_seconds.low) && $util.isInteger(message.filtered_replication_lag_seconds.high))) - return "filtered_replication_lag_seconds: integer|Long expected"; - if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) - if (typeof message.cpu_usage !== "number") - return "cpu_usage: number expected"; - if (message.qps != null && message.hasOwnProperty("qps")) - if (typeof message.qps !== "number") - return "qps: number expected"; - if (message.table_schema_changed != null && message.hasOwnProperty("table_schema_changed")) { - if (!Array.isArray(message.table_schema_changed)) - return "table_schema_changed: array expected"; - for (var i = 0; i < message.table_schema_changed.length; ++i) - if (!$util.isString(message.table_schema_changed[i])) - return "table_schema_changed: string[] expected"; - } - if (message.view_schema_changed != null && message.hasOwnProperty("view_schema_changed")) { - if (!Array.isArray(message.view_schema_changed)) - return "view_schema_changed: array expected"; - for (var i = 0; i < message.view_schema_changed.length; ++i) - if (!$util.isString(message.view_schema_changed[i])) - return "view_schema_changed: string[] expected"; - } return null; }; /** - * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. + * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static * @param {Object.} object Plain object - * @returns {query.RealtimeStats} RealtimeStats + * @returns {query.CommitPreparedResponse} CommitPreparedResponse */ - RealtimeStats.fromObject = function fromObject(object) { - if (object instanceof $root.query.RealtimeStats) + CommitPreparedResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.CommitPreparedResponse) return object; - var message = new $root.query.RealtimeStats(); - if (object.health_error != null) - message.health_error = String(object.health_error); - if (object.replication_lag_seconds != null) - message.replication_lag_seconds = object.replication_lag_seconds >>> 0; - if (object.binlog_players_count != null) - message.binlog_players_count = object.binlog_players_count | 0; - if (object.filtered_replication_lag_seconds != null) - if ($util.Long) - (message.filtered_replication_lag_seconds = $util.Long.fromValue(object.filtered_replication_lag_seconds)).unsigned = false; - else if (typeof object.filtered_replication_lag_seconds === "string") - message.filtered_replication_lag_seconds = parseInt(object.filtered_replication_lag_seconds, 10); - else if (typeof object.filtered_replication_lag_seconds === "number") - message.filtered_replication_lag_seconds = object.filtered_replication_lag_seconds; - else if (typeof object.filtered_replication_lag_seconds === "object") - message.filtered_replication_lag_seconds = new $util.LongBits(object.filtered_replication_lag_seconds.low >>> 0, object.filtered_replication_lag_seconds.high >>> 0).toNumber(); - if (object.cpu_usage != null) - message.cpu_usage = Number(object.cpu_usage); - if (object.qps != null) - message.qps = Number(object.qps); - if (object.table_schema_changed) { - if (!Array.isArray(object.table_schema_changed)) - throw TypeError(".query.RealtimeStats.table_schema_changed: array expected"); - message.table_schema_changed = []; - for (var i = 0; i < object.table_schema_changed.length; ++i) - message.table_schema_changed[i] = String(object.table_schema_changed[i]); - } - if (object.view_schema_changed) { - if (!Array.isArray(object.view_schema_changed)) - throw TypeError(".query.RealtimeStats.view_schema_changed: array expected"); - message.view_schema_changed = []; - for (var i = 0; i < object.view_schema_changed.length; ++i) - message.view_schema_changed[i] = String(object.view_schema_changed[i]); - } - return message; + return new $root.query.CommitPreparedResponse(); }; /** - * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. + * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @static - * @param {query.RealtimeStats} message RealtimeStats + * @param {query.CommitPreparedResponse} message CommitPreparedResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RealtimeStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.table_schema_changed = []; - object.view_schema_changed = []; - } - if (options.defaults) { - object.health_error = ""; - object.replication_lag_seconds = 0; - object.binlog_players_count = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.filtered_replication_lag_seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.filtered_replication_lag_seconds = options.longs === String ? "0" : 0; - object.cpu_usage = 0; - object.qps = 0; - } - if (message.health_error != null && message.hasOwnProperty("health_error")) - object.health_error = message.health_error; - if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) - object.replication_lag_seconds = message.replication_lag_seconds; - if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) - object.binlog_players_count = message.binlog_players_count; - if (message.filtered_replication_lag_seconds != null && message.hasOwnProperty("filtered_replication_lag_seconds")) - if (typeof message.filtered_replication_lag_seconds === "number") - object.filtered_replication_lag_seconds = options.longs === String ? String(message.filtered_replication_lag_seconds) : message.filtered_replication_lag_seconds; - else - object.filtered_replication_lag_seconds = options.longs === String ? $util.Long.prototype.toString.call(message.filtered_replication_lag_seconds) : options.longs === Number ? new $util.LongBits(message.filtered_replication_lag_seconds.low >>> 0, message.filtered_replication_lag_seconds.high >>> 0).toNumber() : message.filtered_replication_lag_seconds; - if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) - object.cpu_usage = options.json && !isFinite(message.cpu_usage) ? String(message.cpu_usage) : message.cpu_usage; - if (message.qps != null && message.hasOwnProperty("qps")) - object.qps = options.json && !isFinite(message.qps) ? String(message.qps) : message.qps; - if (message.table_schema_changed && message.table_schema_changed.length) { - object.table_schema_changed = []; - for (var j = 0; j < message.table_schema_changed.length; ++j) - object.table_schema_changed[j] = message.table_schema_changed[j]; - } - if (message.view_schema_changed && message.view_schema_changed.length) { - object.view_schema_changed = []; - for (var j = 0; j < message.view_schema_changed.length; ++j) - object.view_schema_changed[j] = message.view_schema_changed[j]; - } - return object; + CommitPreparedResponse.toObject = function toObject() { + return {}; }; /** - * Converts this RealtimeStats to JSON. + * Converts this CommitPreparedResponse to JSON. * @function toJSON - * @memberof query.RealtimeStats + * @memberof query.CommitPreparedResponse * @instance * @returns {Object.} JSON object */ - RealtimeStats.prototype.toJSON = function toJSON() { + CommitPreparedResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RealtimeStats; + return CommitPreparedResponse; })(); - query.AggregateStats = (function() { + query.RollbackPreparedRequest = (function() { /** - * Properties of an AggregateStats. + * Properties of a RollbackPreparedRequest. * @memberof query - * @interface IAggregateStats - * @property {number|null} [healthy_tablet_count] AggregateStats healthy_tablet_count - * @property {number|null} [unhealthy_tablet_count] AggregateStats unhealthy_tablet_count - * @property {number|null} [replication_lag_seconds_min] AggregateStats replication_lag_seconds_min - * @property {number|null} [replication_lag_seconds_max] AggregateStats replication_lag_seconds_max + * @interface IRollbackPreparedRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackPreparedRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackPreparedRequest immediate_caller_id + * @property {query.ITarget|null} [target] RollbackPreparedRequest target + * @property {number|Long|null} [transaction_id] RollbackPreparedRequest transaction_id + * @property {string|null} [dtid] RollbackPreparedRequest dtid */ /** - * Constructs a new AggregateStats. + * Constructs a new RollbackPreparedRequest. * @memberof query - * @classdesc Represents an AggregateStats. - * @implements IAggregateStats + * @classdesc Represents a RollbackPreparedRequest. + * @implements IRollbackPreparedRequest * @constructor - * @param {query.IAggregateStats=} [properties] Properties to set + * @param {query.IRollbackPreparedRequest=} [properties] Properties to set */ - function AggregateStats(properties) { + function RollbackPreparedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73094,114 +73504,127 @@ $root.query = (function() { } /** - * AggregateStats healthy_tablet_count. - * @member {number} healthy_tablet_count - * @memberof query.AggregateStats + * RollbackPreparedRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.RollbackPreparedRequest * @instance */ - AggregateStats.prototype.healthy_tablet_count = 0; + RollbackPreparedRequest.prototype.effective_caller_id = null; /** - * AggregateStats unhealthy_tablet_count. - * @member {number} unhealthy_tablet_count - * @memberof query.AggregateStats + * RollbackPreparedRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.RollbackPreparedRequest * @instance */ - AggregateStats.prototype.unhealthy_tablet_count = 0; + RollbackPreparedRequest.prototype.immediate_caller_id = null; /** - * AggregateStats replication_lag_seconds_min. - * @member {number} replication_lag_seconds_min - * @memberof query.AggregateStats + * RollbackPreparedRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.RollbackPreparedRequest * @instance */ - AggregateStats.prototype.replication_lag_seconds_min = 0; + RollbackPreparedRequest.prototype.target = null; /** - * AggregateStats replication_lag_seconds_max. - * @member {number} replication_lag_seconds_max - * @memberof query.AggregateStats + * RollbackPreparedRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.RollbackPreparedRequest * @instance */ - AggregateStats.prototype.replication_lag_seconds_max = 0; + RollbackPreparedRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new AggregateStats instance using the specified properties. + * RollbackPreparedRequest dtid. + * @member {string} dtid + * @memberof query.RollbackPreparedRequest + * @instance + */ + RollbackPreparedRequest.prototype.dtid = ""; + + /** + * Creates a new RollbackPreparedRequest instance using the specified properties. * @function create - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static - * @param {query.IAggregateStats=} [properties] Properties to set - * @returns {query.AggregateStats} AggregateStats instance + * @param {query.IRollbackPreparedRequest=} [properties] Properties to set + * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest instance */ - AggregateStats.create = function create(properties) { - return new AggregateStats(properties); + RollbackPreparedRequest.create = function create(properties) { + return new RollbackPreparedRequest(properties); }; /** - * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. * @function encode - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static - * @param {query.IAggregateStats} message AggregateStats message or plain object to encode + * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AggregateStats.encode = function encode(message, writer) { + RollbackPreparedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.healthy_tablet_count != null && Object.hasOwnProperty.call(message, "healthy_tablet_count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.healthy_tablet_count); - if (message.unhealthy_tablet_count != null && Object.hasOwnProperty.call(message, "unhealthy_tablet_count")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.unhealthy_tablet_count); - if (message.replication_lag_seconds_min != null && Object.hasOwnProperty.call(message, "replication_lag_seconds_min")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.replication_lag_seconds_min); - if (message.replication_lag_seconds_max != null && Object.hasOwnProperty.call(message, "replication_lag_seconds_max")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.replication_lag_seconds_max); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); return writer; }; /** - * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static - * @param {query.IAggregateStats} message AggregateStats message or plain object to encode + * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AggregateStats.encodeDelimited = function encodeDelimited(message, writer) { + RollbackPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AggregateStats message from the specified reader or buffer. + * Decodes a RollbackPreparedRequest message from the specified reader or buffer. * @function decode - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.AggregateStats} AggregateStats + * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AggregateStats.decode = function decode(reader, length) { + RollbackPreparedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.AggregateStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.healthy_tablet_count = reader.int32(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.unhealthy_tablet_count = reader.int32(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.replication_lag_seconds_min = reader.uint32(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.replication_lag_seconds_max = reader.uint32(); + message.transaction_id = reader.int64(); + break; + case 5: + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -73212,136 +73635,168 @@ $root.query = (function() { }; /** - * Decodes an AggregateStats message from the specified reader or buffer, length delimited. + * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.AggregateStats} AggregateStats + * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AggregateStats.decodeDelimited = function decodeDelimited(reader) { + RollbackPreparedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AggregateStats message. + * Verifies a RollbackPreparedRequest message. * @function verify - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AggregateStats.verify = function verify(message) { + RollbackPreparedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) - if (!$util.isInteger(message.healthy_tablet_count)) - return "healthy_tablet_count: integer expected"; - if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) - if (!$util.isInteger(message.unhealthy_tablet_count)) - return "unhealthy_tablet_count: integer expected"; - if (message.replication_lag_seconds_min != null && message.hasOwnProperty("replication_lag_seconds_min")) - if (!$util.isInteger(message.replication_lag_seconds_min)) - return "replication_lag_seconds_min: integer expected"; - if (message.replication_lag_seconds_max != null && message.hasOwnProperty("replication_lag_seconds_max")) - if (!$util.isInteger(message.replication_lag_seconds_max)) - return "replication_lag_seconds_max: integer expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; return null; }; /** - * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static * @param {Object.} object Plain object - * @returns {query.AggregateStats} AggregateStats + * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest */ - AggregateStats.fromObject = function fromObject(object) { - if (object instanceof $root.query.AggregateStats) + RollbackPreparedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.RollbackPreparedRequest) return object; - var message = new $root.query.AggregateStats(); - if (object.healthy_tablet_count != null) - message.healthy_tablet_count = object.healthy_tablet_count | 0; - if (object.unhealthy_tablet_count != null) - message.unhealthy_tablet_count = object.unhealthy_tablet_count | 0; - if (object.replication_lag_seconds_min != null) - message.replication_lag_seconds_min = object.replication_lag_seconds_min >>> 0; - if (object.replication_lag_seconds_max != null) - message.replication_lag_seconds_max = object.replication_lag_seconds_max >>> 0; + var message = new $root.query.RollbackPreparedRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.RollbackPreparedRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.RollbackPreparedRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.RollbackPreparedRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. + * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @static - * @param {query.AggregateStats} message AggregateStats + * @param {query.RollbackPreparedRequest} message RollbackPreparedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AggregateStats.toObject = function toObject(message, options) { + RollbackPreparedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.healthy_tablet_count = 0; - object.unhealthy_tablet_count = 0; - object.replication_lag_seconds_min = 0; - object.replication_lag_seconds_max = 0; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.dtid = ""; } - if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) - object.healthy_tablet_count = message.healthy_tablet_count; - if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) - object.unhealthy_tablet_count = message.unhealthy_tablet_count; - if (message.replication_lag_seconds_min != null && message.hasOwnProperty("replication_lag_seconds_min")) - object.replication_lag_seconds_min = message.replication_lag_seconds_min; - if (message.replication_lag_seconds_max != null && message.hasOwnProperty("replication_lag_seconds_max")) - object.replication_lag_seconds_max = message.replication_lag_seconds_max; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this AggregateStats to JSON. + * Converts this RollbackPreparedRequest to JSON. * @function toJSON - * @memberof query.AggregateStats + * @memberof query.RollbackPreparedRequest * @instance * @returns {Object.} JSON object */ - AggregateStats.prototype.toJSON = function toJSON() { + RollbackPreparedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AggregateStats; + return RollbackPreparedRequest; })(); - query.StreamHealthResponse = (function() { + query.RollbackPreparedResponse = (function() { /** - * Properties of a StreamHealthResponse. + * Properties of a RollbackPreparedResponse. * @memberof query - * @interface IStreamHealthResponse - * @property {query.ITarget|null} [target] StreamHealthResponse target - * @property {boolean|null} [serving] StreamHealthResponse serving - * @property {number|Long|null} [tablet_externally_reparented_timestamp] StreamHealthResponse tablet_externally_reparented_timestamp - * @property {query.IRealtimeStats|null} [realtime_stats] StreamHealthResponse realtime_stats - * @property {topodata.ITabletAlias|null} [tablet_alias] StreamHealthResponse tablet_alias + * @interface IRollbackPreparedResponse */ /** - * Constructs a new StreamHealthResponse. + * Constructs a new RollbackPreparedResponse. * @memberof query - * @classdesc Represents a StreamHealthResponse. - * @implements IStreamHealthResponse + * @classdesc Represents a RollbackPreparedResponse. + * @implements IRollbackPreparedResponse * @constructor - * @param {query.IStreamHealthResponse=} [properties] Properties to set + * @param {query.IRollbackPreparedResponse=} [properties] Properties to set */ - function StreamHealthResponse(properties) { + function RollbackPreparedResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73349,128 +73804,63 @@ $root.query = (function() { } /** - * StreamHealthResponse target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.target = null; - - /** - * StreamHealthResponse serving. - * @member {boolean} serving - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.serving = false; - - /** - * StreamHealthResponse tablet_externally_reparented_timestamp. - * @member {number|Long} tablet_externally_reparented_timestamp - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.tablet_externally_reparented_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StreamHealthResponse realtime_stats. - * @member {query.IRealtimeStats|null|undefined} realtime_stats - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.realtime_stats = null; - - /** - * StreamHealthResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.tablet_alias = null; - - /** - * Creates a new StreamHealthResponse instance using the specified properties. + * Creates a new RollbackPreparedResponse instance using the specified properties. * @function create - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static - * @param {query.IStreamHealthResponse=} [properties] Properties to set - * @returns {query.StreamHealthResponse} StreamHealthResponse instance + * @param {query.IRollbackPreparedResponse=} [properties] Properties to set + * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse instance */ - StreamHealthResponse.create = function create(properties) { - return new StreamHealthResponse(properties); + RollbackPreparedResponse.create = function create(properties) { + return new RollbackPreparedResponse(properties); }; /** - * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. * @function encode - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static - * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode + * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamHealthResponse.encode = function encode(message, writer) { + RollbackPreparedResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.serving != null && Object.hasOwnProperty.call(message, "serving")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.serving); - if (message.tablet_externally_reparented_timestamp != null && Object.hasOwnProperty.call(message, "tablet_externally_reparented_timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tablet_externally_reparented_timestamp); - if (message.realtime_stats != null && Object.hasOwnProperty.call(message, "realtime_stats")) - $root.query.RealtimeStats.encode(message.realtime_stats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static - * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode + * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamHealthResponse.encodeDelimited = function encodeDelimited(message, writer) { + RollbackPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamHealthResponse message from the specified reader or buffer. + * Decodes a RollbackPreparedResponse message from the specified reader or buffer. * @function decode - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.StreamHealthResponse} StreamHealthResponse + * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamHealthResponse.decode = function decode(reader, length) { + RollbackPreparedResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 2: - message.serving = reader.bool(); - break; - case 3: - message.tablet_externally_reparented_timestamp = reader.int64(); - break; - case 4: - message.realtime_stats = $root.query.RealtimeStats.decode(reader, reader.uint32()); - break; - case 5: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -73480,190 +73870,98 @@ $root.query = (function() { }; /** - * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. + * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamHealthResponse} StreamHealthResponse + * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamHealthResponse.decodeDelimited = function decodeDelimited(reader) { + RollbackPreparedResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamHealthResponse message. + * Verifies a RollbackPreparedResponse message. * @function verify - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamHealthResponse.verify = function verify(message) { + RollbackPreparedResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.serving != null && message.hasOwnProperty("serving")) - if (typeof message.serving !== "boolean") - return "serving: boolean expected"; - if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) - if (!$util.isInteger(message.tablet_externally_reparented_timestamp) && !(message.tablet_externally_reparented_timestamp && $util.isInteger(message.tablet_externally_reparented_timestamp.low) && $util.isInteger(message.tablet_externally_reparented_timestamp.high))) - return "tablet_externally_reparented_timestamp: integer|Long expected"; - if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) { - var error = $root.query.RealtimeStats.verify(message.realtime_stats); - if (error) - return "realtime_stats." + error; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } return null; }; /** - * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static * @param {Object.} object Plain object - * @returns {query.StreamHealthResponse} StreamHealthResponse + * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse */ - StreamHealthResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamHealthResponse) + RollbackPreparedResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.RollbackPreparedResponse) return object; - var message = new $root.query.StreamHealthResponse(); - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StreamHealthResponse.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.serving != null) - message.serving = Boolean(object.serving); - if (object.tablet_externally_reparented_timestamp != null) - if ($util.Long) - (message.tablet_externally_reparented_timestamp = $util.Long.fromValue(object.tablet_externally_reparented_timestamp)).unsigned = false; - else if (typeof object.tablet_externally_reparented_timestamp === "string") - message.tablet_externally_reparented_timestamp = parseInt(object.tablet_externally_reparented_timestamp, 10); - else if (typeof object.tablet_externally_reparented_timestamp === "number") - message.tablet_externally_reparented_timestamp = object.tablet_externally_reparented_timestamp; - else if (typeof object.tablet_externally_reparented_timestamp === "object") - message.tablet_externally_reparented_timestamp = new $util.LongBits(object.tablet_externally_reparented_timestamp.low >>> 0, object.tablet_externally_reparented_timestamp.high >>> 0).toNumber(); - if (object.realtime_stats != null) { - if (typeof object.realtime_stats !== "object") - throw TypeError(".query.StreamHealthResponse.realtime_stats: object expected"); - message.realtime_stats = $root.query.RealtimeStats.fromObject(object.realtime_stats); - } - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.StreamHealthResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; + return new $root.query.RollbackPreparedResponse(); }; /** - * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. + * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @static - * @param {query.StreamHealthResponse} message StreamHealthResponse + * @param {query.RollbackPreparedResponse} message RollbackPreparedResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamHealthResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = null; - object.serving = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.tablet_externally_reparented_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tablet_externally_reparented_timestamp = options.longs === String ? "0" : 0; - object.realtime_stats = null; - object.tablet_alias = null; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.serving != null && message.hasOwnProperty("serving")) - object.serving = message.serving; - if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) - if (typeof message.tablet_externally_reparented_timestamp === "number") - object.tablet_externally_reparented_timestamp = options.longs === String ? String(message.tablet_externally_reparented_timestamp) : message.tablet_externally_reparented_timestamp; - else - object.tablet_externally_reparented_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tablet_externally_reparented_timestamp) : options.longs === Number ? new $util.LongBits(message.tablet_externally_reparented_timestamp.low >>> 0, message.tablet_externally_reparented_timestamp.high >>> 0).toNumber() : message.tablet_externally_reparented_timestamp; - if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) - object.realtime_stats = $root.query.RealtimeStats.toObject(message.realtime_stats, options); - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; + RollbackPreparedResponse.toObject = function toObject() { + return {}; }; /** - * Converts this StreamHealthResponse to JSON. + * Converts this RollbackPreparedResponse to JSON. * @function toJSON - * @memberof query.StreamHealthResponse + * @memberof query.RollbackPreparedResponse * @instance * @returns {Object.} JSON object */ - StreamHealthResponse.prototype.toJSON = function toJSON() { + RollbackPreparedResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamHealthResponse; - })(); - - /** - * TransactionState enum. - * @name query.TransactionState - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} PREPARE=1 PREPARE value - * @property {number} COMMIT=2 COMMIT value - * @property {number} ROLLBACK=3 ROLLBACK value - */ - query.TransactionState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "PREPARE"] = 1; - values[valuesById[2] = "COMMIT"] = 2; - values[valuesById[3] = "ROLLBACK"] = 3; - return values; + return RollbackPreparedResponse; })(); - query.TransactionMetadata = (function() { + query.CreateTransactionRequest = (function() { /** - * Properties of a TransactionMetadata. + * Properties of a CreateTransactionRequest. * @memberof query - * @interface ITransactionMetadata - * @property {string|null} [dtid] TransactionMetadata dtid - * @property {query.TransactionState|null} [state] TransactionMetadata state - * @property {number|Long|null} [time_created] TransactionMetadata time_created - * @property {Array.|null} [participants] TransactionMetadata participants + * @interface ICreateTransactionRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] CreateTransactionRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] CreateTransactionRequest immediate_caller_id + * @property {query.ITarget|null} [target] CreateTransactionRequest target + * @property {string|null} [dtid] CreateTransactionRequest dtid + * @property {Array.|null} [participants] CreateTransactionRequest participants */ /** - * Constructs a new TransactionMetadata. + * Constructs a new CreateTransactionRequest. * @memberof query - * @classdesc Represents a TransactionMetadata. - * @implements ITransactionMetadata + * @classdesc Represents a CreateTransactionRequest. + * @implements ICreateTransactionRequest * @constructor - * @param {query.ITransactionMetadata=} [properties] Properties to set + * @param {query.ICreateTransactionRequest=} [properties] Properties to set */ - function TransactionMetadata(properties) { + function CreateTransactionRequest(properties) { this.participants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -73672,114 +73970,127 @@ $root.query = (function() { } /** - * TransactionMetadata dtid. - * @member {string} dtid - * @memberof query.TransactionMetadata + * CreateTransactionRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.CreateTransactionRequest * @instance */ - TransactionMetadata.prototype.dtid = ""; + CreateTransactionRequest.prototype.effective_caller_id = null; /** - * TransactionMetadata state. - * @member {query.TransactionState} state - * @memberof query.TransactionMetadata + * CreateTransactionRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.CreateTransactionRequest * @instance */ - TransactionMetadata.prototype.state = 0; + CreateTransactionRequest.prototype.immediate_caller_id = null; /** - * TransactionMetadata time_created. - * @member {number|Long} time_created - * @memberof query.TransactionMetadata + * CreateTransactionRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.CreateTransactionRequest * @instance */ - TransactionMetadata.prototype.time_created = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CreateTransactionRequest.prototype.target = null; /** - * TransactionMetadata participants. + * CreateTransactionRequest dtid. + * @member {string} dtid + * @memberof query.CreateTransactionRequest + * @instance + */ + CreateTransactionRequest.prototype.dtid = ""; + + /** + * CreateTransactionRequest participants. * @member {Array.} participants - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @instance */ - TransactionMetadata.prototype.participants = $util.emptyArray; + CreateTransactionRequest.prototype.participants = $util.emptyArray; /** - * Creates a new TransactionMetadata instance using the specified properties. + * Creates a new CreateTransactionRequest instance using the specified properties. * @function create - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static - * @param {query.ITransactionMetadata=} [properties] Properties to set - * @returns {query.TransactionMetadata} TransactionMetadata instance + * @param {query.ICreateTransactionRequest=} [properties] Properties to set + * @returns {query.CreateTransactionRequest} CreateTransactionRequest instance */ - TransactionMetadata.create = function create(properties) { - return new TransactionMetadata(properties); + CreateTransactionRequest.create = function create(properties) { + return new CreateTransactionRequest(properties); }; /** - * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. * @function encode - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static - * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode + * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionMetadata.encode = function encode(message, writer) { + CreateTransactionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dtid); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time_created); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); if (message.participants != null && message.participants.length) for (var i = 0; i < message.participants.length; ++i) - $root.query.Target.encode(message.participants[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.query.Target.encode(message.participants[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static - * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode + * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionMetadata message from the specified reader or buffer. + * Decodes a CreateTransactionRequest message from the specified reader or buffer. * @function decode - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.TransactionMetadata} TransactionMetadata + * @returns {query.CreateTransactionRequest} CreateTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionMetadata.decode = function decode(reader, length) { + CreateTransactionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.TransactionMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.dtid = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.state = reader.int32(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.time_created = reader.int64(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: + message.dtid = reader.string(); + break; + case 5: if (!(message.participants && message.participants.length)) message.participants = []; message.participants.push($root.query.Target.decode(reader, reader.uint32())); @@ -73793,48 +74104,50 @@ $root.query = (function() { }; /** - * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.TransactionMetadata} TransactionMetadata + * @returns {query.CreateTransactionRequest} CreateTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateTransactionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionMetadata message. + * Verifies a CreateTransactionRequest message. * @function verify - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionMetadata.verify = function verify(message) { + CreateTransactionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } if (message.dtid != null && message.hasOwnProperty("dtid")) if (!$util.isString(message.dtid)) return "dtid: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.time_created != null && message.hasOwnProperty("time_created")) - if (!$util.isInteger(message.time_created) && !(message.time_created && $util.isInteger(message.time_created.low) && $util.isInteger(message.time_created.high))) - return "time_created: integer|Long expected"; if (message.participants != null && message.hasOwnProperty("participants")) { if (!Array.isArray(message.participants)) return "participants: array expected"; @@ -73848,53 +74161,41 @@ $root.query = (function() { }; /** - * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static * @param {Object.} object Plain object - * @returns {query.TransactionMetadata} TransactionMetadata + * @returns {query.CreateTransactionRequest} CreateTransactionRequest */ - TransactionMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.query.TransactionMetadata) + CreateTransactionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.CreateTransactionRequest) return object; - var message = new $root.query.TransactionMetadata(); + var message = new $root.query.CreateTransactionRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.CreateTransactionRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.CreateTransactionRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.CreateTransactionRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } if (object.dtid != null) message.dtid = String(object.dtid); - switch (object.state) { - case "UNKNOWN": - case 0: - message.state = 0; - break; - case "PREPARE": - case 1: - message.state = 1; - break; - case "COMMIT": - case 2: - message.state = 2; - break; - case "ROLLBACK": - case 3: - message.state = 3; - break; - } - if (object.time_created != null) - if ($util.Long) - (message.time_created = $util.Long.fromValue(object.time_created)).unsigned = false; - else if (typeof object.time_created === "string") - message.time_created = parseInt(object.time_created, 10); - else if (typeof object.time_created === "number") - message.time_created = object.time_created; - else if (typeof object.time_created === "object") - message.time_created = new $util.LongBits(object.time_created.low >>> 0, object.time_created.high >>> 0).toNumber(); if (object.participants) { if (!Array.isArray(object.participants)) - throw TypeError(".query.TransactionMetadata.participants: array expected"); + throw TypeError(".query.CreateTransactionRequest.participants: array expected"); message.participants = []; for (var i = 0; i < object.participants.length; ++i) { if (typeof object.participants[i] !== "object") - throw TypeError(".query.TransactionMetadata.participants: object expected"); + throw TypeError(".query.CreateTransactionRequest.participants: object expected"); message.participants[i] = $root.query.Target.fromObject(object.participants[i]); } } @@ -73902,38 +74203,34 @@ $root.query = (function() { }; /** - * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @static - * @param {query.TransactionMetadata} message TransactionMetadata + * @param {query.CreateTransactionRequest} message CreateTransactionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionMetadata.toObject = function toObject(message, options) { + CreateTransactionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.participants = []; if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; object.dtid = ""; - object.state = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_created = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_created = options.longs === String ? "0" : 0; } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); if (message.dtid != null && message.hasOwnProperty("dtid")) object.dtid = message.dtid; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.query.TransactionState[message.state] : message.state; - if (message.time_created != null && message.hasOwnProperty("time_created")) - if (typeof message.time_created === "number") - object.time_created = options.longs === String ? String(message.time_created) : message.time_created; - else - object.time_created = options.longs === String ? $util.Long.prototype.toString.call(message.time_created) : options.longs === Number ? new $util.LongBits(message.time_created.low >>> 0, message.time_created.high >>> 0).toNumber() : message.time_created; if (message.participants && message.participants.length) { object.participants = []; for (var j = 0; j < message.participants.length; ++j) @@ -73943,56 +74240,36 @@ $root.query = (function() { }; /** - * Converts this TransactionMetadata to JSON. + * Converts this CreateTransactionRequest to JSON. * @function toJSON - * @memberof query.TransactionMetadata + * @memberof query.CreateTransactionRequest * @instance * @returns {Object.} JSON object */ - TransactionMetadata.prototype.toJSON = function toJSON() { + CreateTransactionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TransactionMetadata; - })(); - - /** - * SchemaTableType enum. - * @name query.SchemaTableType - * @enum {number} - * @property {number} VIEWS=0 VIEWS value - * @property {number} TABLES=1 TABLES value - * @property {number} ALL=2 ALL value - */ - query.SchemaTableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VIEWS"] = 0; - values[valuesById[1] = "TABLES"] = 1; - values[valuesById[2] = "ALL"] = 2; - return values; + return CreateTransactionRequest; })(); - query.GetSchemaRequest = (function() { + query.CreateTransactionResponse = (function() { /** - * Properties of a GetSchemaRequest. + * Properties of a CreateTransactionResponse. * @memberof query - * @interface IGetSchemaRequest - * @property {query.ITarget|null} [target] GetSchemaRequest target - * @property {query.SchemaTableType|null} [table_type] GetSchemaRequest table_type - * @property {Array.|null} [table_names] GetSchemaRequest table_names + * @interface ICreateTransactionResponse */ /** - * Constructs a new GetSchemaRequest. + * Constructs a new CreateTransactionResponse. * @memberof query - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest + * @classdesc Represents a CreateTransactionResponse. + * @implements ICreateTransactionResponse * @constructor - * @param {query.IGetSchemaRequest=} [properties] Properties to set + * @param {query.ICreateTransactionResponse=} [properties] Properties to set */ - function GetSchemaRequest(properties) { - this.table_names = []; + function CreateTransactionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74000,105 +74277,63 @@ $root.query = (function() { } /** - * GetSchemaRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.target = null; - - /** - * GetSchemaRequest table_type. - * @member {query.SchemaTableType} table_type - * @memberof query.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_type = 0; - - /** - * GetSchemaRequest table_names. - * @member {Array.} table_names - * @memberof query.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_names = $util.emptyArray; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. + * Creates a new CreateTransactionResponse instance using the specified properties. * @function create - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static - * @param {query.IGetSchemaRequest=} [properties] Properties to set - * @returns {query.GetSchemaRequest} GetSchemaRequest instance + * @param {query.ICreateTransactionResponse=} [properties] Properties to set + * @returns {query.CreateTransactionResponse} CreateTransactionResponse instance */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); + CreateTransactionResponse.create = function create(properties) { + return new CreateTransactionResponse(properties); }; /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. + * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. * @function encode - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static - * @param {query.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encode = function encode(message, writer) { + CreateTransactionResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.table_type != null && Object.hasOwnProperty.call(message, "table_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.table_type); - if (message.table_names != null && message.table_names.length) - for (var i = 0; i < message.table_names.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.table_names[i]); return writer; }; /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. + * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. * @function encodeDelimited - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static - * @param {query.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. + * Decodes a CreateTransactionResponse message from the specified reader or buffer. * @function decode - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.GetSchemaRequest} GetSchemaRequest + * @returns {query.CreateTransactionResponse} CreateTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaRequest.decode = function decode(reader, length) { + CreateTransactionResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.GetSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 2: - message.table_type = reader.int32(); - break; - case 3: - if (!(message.table_names && message.table_names.length)) - message.table_names = []; - message.table_names.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -74108,161 +74343,98 @@ $root.query = (function() { }; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.GetSchemaRequest} GetSchemaRequest + * @returns {query.CreateTransactionResponse} CreateTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTransactionResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaRequest message. + * Verifies a CreateTransactionResponse message. * @function verify - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaRequest.verify = function verify(message) { + CreateTransactionResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.table_type != null && message.hasOwnProperty("table_type")) - switch (message.table_type) { - default: - return "table_type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.table_names != null && message.hasOwnProperty("table_names")) { - if (!Array.isArray(message.table_names)) - return "table_names: array expected"; - for (var i = 0; i < message.table_names.length; ++i) - if (!$util.isString(message.table_names[i])) - return "table_names: string[] expected"; - } return null; }; /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static * @param {Object.} object Plain object - * @returns {query.GetSchemaRequest} GetSchemaRequest + * @returns {query.CreateTransactionResponse} CreateTransactionResponse */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.GetSchemaRequest) + CreateTransactionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.CreateTransactionResponse) return object; - var message = new $root.query.GetSchemaRequest(); - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.GetSchemaRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - switch (object.table_type) { - case "VIEWS": - case 0: - message.table_type = 0; - break; - case "TABLES": - case 1: - message.table_type = 1; - break; - case "ALL": - case 2: - message.table_type = 2; - break; - } - if (object.table_names) { - if (!Array.isArray(object.table_names)) - throw TypeError(".query.GetSchemaRequest.table_names: array expected"); - message.table_names = []; - for (var i = 0; i < object.table_names.length; ++i) - message.table_names[i] = String(object.table_names[i]); - } - return message; + return new $root.query.CreateTransactionResponse(); }; /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @static - * @param {query.GetSchemaRequest} message GetSchemaRequest + * @param {query.CreateTransactionResponse} message CreateTransactionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.table_names = []; - if (options.defaults) { - object.target = null; - object.table_type = options.enums === String ? "VIEWS" : 0; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.table_type != null && message.hasOwnProperty("table_type")) - object.table_type = options.enums === String ? $root.query.SchemaTableType[message.table_type] : message.table_type; - if (message.table_names && message.table_names.length) { - object.table_names = []; - for (var j = 0; j < message.table_names.length; ++j) - object.table_names[j] = message.table_names[j]; - } - return object; + CreateTransactionResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetSchemaRequest to JSON. + * Converts this CreateTransactionResponse to JSON. * @function toJSON - * @memberof query.GetSchemaRequest + * @memberof query.CreateTransactionResponse * @instance * @returns {Object.} JSON object */ - GetSchemaRequest.prototype.toJSON = function toJSON() { + CreateTransactionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSchemaRequest; + return CreateTransactionResponse; })(); - query.GetSchemaResponse = (function() { + query.StartCommitRequest = (function() { /** - * Properties of a GetSchemaResponse. + * Properties of a StartCommitRequest. * @memberof query - * @interface IGetSchemaResponse - * @property {Object.|null} [table_definition] GetSchemaResponse table_definition + * @interface IStartCommitRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] StartCommitRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] StartCommitRequest immediate_caller_id + * @property {query.ITarget|null} [target] StartCommitRequest target + * @property {number|Long|null} [transaction_id] StartCommitRequest transaction_id + * @property {string|null} [dtid] StartCommitRequest dtid */ /** - * Constructs a new GetSchemaResponse. + * Constructs a new StartCommitRequest. * @memberof query - * @classdesc Represents a GetSchemaResponse. - * @implements IGetSchemaResponse + * @classdesc Represents a StartCommitRequest. + * @implements IStartCommitRequest * @constructor - * @param {query.IGetSchemaResponse=} [properties] Properties to set + * @param {query.IStartCommitRequest=} [properties] Properties to set */ - function GetSchemaResponse(properties) { - this.table_definition = {}; + function StartCommitRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74270,95 +74442,127 @@ $root.query = (function() { } /** - * GetSchemaResponse table_definition. - * @member {Object.} table_definition - * @memberof query.GetSchemaResponse + * StartCommitRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.StartCommitRequest * @instance */ - GetSchemaResponse.prototype.table_definition = $util.emptyObject; + StartCommitRequest.prototype.effective_caller_id = null; /** - * Creates a new GetSchemaResponse instance using the specified properties. + * StartCommitRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.StartCommitRequest + * @instance + */ + StartCommitRequest.prototype.immediate_caller_id = null; + + /** + * StartCommitRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.StartCommitRequest + * @instance + */ + StartCommitRequest.prototype.target = null; + + /** + * StartCommitRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.StartCommitRequest + * @instance + */ + StartCommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StartCommitRequest dtid. + * @member {string} dtid + * @memberof query.StartCommitRequest + * @instance + */ + StartCommitRequest.prototype.dtid = ""; + + /** + * Creates a new StartCommitRequest instance using the specified properties. * @function create - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static - * @param {query.IGetSchemaResponse=} [properties] Properties to set - * @returns {query.GetSchemaResponse} GetSchemaResponse instance + * @param {query.IStartCommitRequest=} [properties] Properties to set + * @returns {query.StartCommitRequest} StartCommitRequest instance */ - GetSchemaResponse.create = function create(properties) { - return new GetSchemaResponse(properties); + StartCommitRequest.create = function create(properties) { + return new StartCommitRequest(properties); }; /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. + * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. * @function encode - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static - * @param {query.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encode = function encode(message, writer) { + StartCommitRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table_definition != null && Object.hasOwnProperty.call(message, "table_definition")) - for (var keys = Object.keys(message.table_definition), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.table_definition[keys[i]]).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); return writer; }; /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. + * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. * @function encodeDelimited - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static - * @param {query.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + StartCommitRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. + * Decodes a StartCommitRequest message from the specified reader or buffer. * @function decode - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {query.GetSchemaResponse} GetSchemaResponse + * @returns {query.StartCommitRequest} StartCommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decode = function decode(reader, length) { + StartCommitRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.GetSchemaResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; case 2: - if (message.table_definition === $util.emptyObject) - message.table_definition = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.table_definition[key] = value; + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.transaction_id = reader.int64(); + break; + case 5: + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -74369,137 +74573,168 @@ $root.query = (function() { }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.GetSchemaResponse} GetSchemaResponse + * @returns {query.StartCommitRequest} StartCommitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + StartCommitRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaResponse message. + * Verifies a StartCommitRequest message. * @function verify - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaResponse.verify = function verify(message) { + StartCommitRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table_definition != null && message.hasOwnProperty("table_definition")) { - if (!$util.isObject(message.table_definition)) - return "table_definition: object expected"; - var key = Object.keys(message.table_definition); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.table_definition[key[i]])) - return "table_definition: string{k:string} expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; return null; }; /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static * @param {Object.} object Plain object - * @returns {query.GetSchemaResponse} GetSchemaResponse + * @returns {query.StartCommitRequest} StartCommitRequest */ - GetSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.GetSchemaResponse) + StartCommitRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.StartCommitRequest) return object; - var message = new $root.query.GetSchemaResponse(); - if (object.table_definition) { - if (typeof object.table_definition !== "object") - throw TypeError(".query.GetSchemaResponse.table_definition: object expected"); - message.table_definition = {}; - for (var keys = Object.keys(object.table_definition), i = 0; i < keys.length; ++i) - message.table_definition[keys[i]] = String(object.table_definition[keys[i]]); + var message = new $root.query.StartCommitRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.StartCommitRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.StartCommitRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.StartCommitRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. * @function toObject - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @static - * @param {query.GetSchemaResponse} message GetSchemaResponse + * @param {query.StartCommitRequest} message StartCommitRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaResponse.toObject = function toObject(message, options) { + StartCommitRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.table_definition = {}; - var keys2; - if (message.table_definition && (keys2 = Object.keys(message.table_definition)).length) { - object.table_definition = {}; - for (var j = 0; j < keys2.length; ++j) - object.table_definition[keys2[j]] = message.table_definition[keys2[j]]; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.dtid = ""; } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this GetSchemaResponse to JSON. + * Converts this StartCommitRequest to JSON. * @function toJSON - * @memberof query.GetSchemaResponse + * @memberof query.StartCommitRequest * @instance * @returns {Object.} JSON object */ - GetSchemaResponse.prototype.toJSON = function toJSON() { + StartCommitRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSchemaResponse; + return StartCommitRequest; })(); - return query; -})(); - -$root.vtrpc = (function() { - - /** - * Namespace vtrpc. - * @exports vtrpc - * @namespace - */ - var vtrpc = {}; - - vtrpc.CallerID = (function() { + query.StartCommitResponse = (function() { /** - * Properties of a CallerID. - * @memberof vtrpc - * @interface ICallerID - * @property {string|null} [principal] CallerID principal - * @property {string|null} [component] CallerID component - * @property {string|null} [subcomponent] CallerID subcomponent - * @property {Array.|null} [groups] CallerID groups + * Properties of a StartCommitResponse. + * @memberof query + * @interface IStartCommitResponse */ /** - * Constructs a new CallerID. - * @memberof vtrpc - * @classdesc Represents a CallerID. - * @implements ICallerID + * Constructs a new StartCommitResponse. + * @memberof query + * @classdesc Represents a StartCommitResponse. + * @implements IStartCommitResponse * @constructor - * @param {vtrpc.ICallerID=} [properties] Properties to set + * @param {query.IStartCommitResponse=} [properties] Properties to set */ - function CallerID(properties) { - this.groups = []; + function StartCommitResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74507,118 +74742,63 @@ $root.vtrpc = (function() { } /** - * CallerID principal. - * @member {string} principal - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.principal = ""; - - /** - * CallerID component. - * @member {string} component - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.component = ""; - - /** - * CallerID subcomponent. - * @member {string} subcomponent - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.subcomponent = ""; - - /** - * CallerID groups. - * @member {Array.} groups - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.groups = $util.emptyArray; - - /** - * Creates a new CallerID instance using the specified properties. + * Creates a new StartCommitResponse instance using the specified properties. * @function create - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static - * @param {vtrpc.ICallerID=} [properties] Properties to set - * @returns {vtrpc.CallerID} CallerID instance + * @param {query.IStartCommitResponse=} [properties] Properties to set + * @returns {query.StartCommitResponse} StartCommitResponse instance */ - CallerID.create = function create(properties) { - return new CallerID(properties); + StartCommitResponse.create = function create(properties) { + return new StartCommitResponse(properties); }; /** - * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. + * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. * @function encode - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static - * @param {vtrpc.ICallerID} message CallerID message or plain object to encode + * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallerID.encode = function encode(message, writer) { + StartCommitResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.principal); - if (message.component != null && Object.hasOwnProperty.call(message, "component")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.component); - if (message.subcomponent != null && Object.hasOwnProperty.call(message, "subcomponent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcomponent); - if (message.groups != null && message.groups.length) - for (var i = 0; i < message.groups.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.groups[i]); return writer; }; /** - * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. + * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static - * @param {vtrpc.ICallerID} message CallerID message or plain object to encode + * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallerID.encodeDelimited = function encodeDelimited(message, writer) { + StartCommitResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CallerID message from the specified reader or buffer. + * Decodes a StartCommitResponse message from the specified reader or buffer. * @function decode - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtrpc.CallerID} CallerID + * @returns {query.StartCommitResponse} StartCommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CallerID.decode = function decode(reader, length) { + StartCommitResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.CallerID(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.principal = reader.string(); - break; - case 2: - message.component = reader.string(); - break; - case 3: - message.subcomponent = reader.string(); - break; - case 4: - if (!(message.groups && message.groups.length)) - message.groups = []; - message.groups.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -74628,194 +74808,98 @@ $root.vtrpc = (function() { }; /** - * Decodes a CallerID message from the specified reader or buffer, length delimited. + * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtrpc.CallerID} CallerID + * @returns {query.StartCommitResponse} StartCommitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CallerID.decodeDelimited = function decodeDelimited(reader) { + StartCommitResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CallerID message. + * Verifies a StartCommitResponse message. * @function verify - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CallerID.verify = function verify(message) { + StartCommitResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.principal != null && message.hasOwnProperty("principal")) - if (!$util.isString(message.principal)) - return "principal: string expected"; - if (message.component != null && message.hasOwnProperty("component")) - if (!$util.isString(message.component)) - return "component: string expected"; - if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) - if (!$util.isString(message.subcomponent)) - return "subcomponent: string expected"; - if (message.groups != null && message.hasOwnProperty("groups")) { - if (!Array.isArray(message.groups)) - return "groups: array expected"; - for (var i = 0; i < message.groups.length; ++i) - if (!$util.isString(message.groups[i])) - return "groups: string[] expected"; - } return null; }; /** - * Creates a CallerID message from a plain object. Also converts values to their respective internal types. + * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static * @param {Object.} object Plain object - * @returns {vtrpc.CallerID} CallerID + * @returns {query.StartCommitResponse} StartCommitResponse */ - CallerID.fromObject = function fromObject(object) { - if (object instanceof $root.vtrpc.CallerID) + StartCommitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.StartCommitResponse) return object; - var message = new $root.vtrpc.CallerID(); - if (object.principal != null) - message.principal = String(object.principal); - if (object.component != null) - message.component = String(object.component); - if (object.subcomponent != null) - message.subcomponent = String(object.subcomponent); - if (object.groups) { - if (!Array.isArray(object.groups)) - throw TypeError(".vtrpc.CallerID.groups: array expected"); - message.groups = []; - for (var i = 0; i < object.groups.length; ++i) - message.groups[i] = String(object.groups[i]); - } - return message; + return new $root.query.StartCommitResponse(); }; /** - * Creates a plain object from a CallerID message. Also converts values to other types if specified. + * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @static - * @param {vtrpc.CallerID} message CallerID + * @param {query.StartCommitResponse} message StartCommitResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CallerID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groups = []; - if (options.defaults) { - object.principal = ""; - object.component = ""; - object.subcomponent = ""; - } - if (message.principal != null && message.hasOwnProperty("principal")) - object.principal = message.principal; - if (message.component != null && message.hasOwnProperty("component")) - object.component = message.component; - if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) - object.subcomponent = message.subcomponent; - if (message.groups && message.groups.length) { - object.groups = []; - for (var j = 0; j < message.groups.length; ++j) - object.groups[j] = message.groups[j]; - } - return object; + StartCommitResponse.toObject = function toObject() { + return {}; }; /** - * Converts this CallerID to JSON. + * Converts this StartCommitResponse to JSON. * @function toJSON - * @memberof vtrpc.CallerID + * @memberof query.StartCommitResponse * @instance * @returns {Object.} JSON object */ - CallerID.prototype.toJSON = function toJSON() { + StartCommitResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CallerID; - })(); - - /** - * Code enum. - * @name vtrpc.Code - * @enum {number} - * @property {number} OK=0 OK value - * @property {number} CANCELED=1 CANCELED value - * @property {number} UNKNOWN=2 UNKNOWN value - * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value - * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value - * @property {number} NOT_FOUND=5 NOT_FOUND value - * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value - * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value - * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value - * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value - * @property {number} ABORTED=10 ABORTED value - * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value - * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value - * @property {number} INTERNAL=13 INTERNAL value - * @property {number} UNAVAILABLE=14 UNAVAILABLE value - * @property {number} DATA_LOSS=15 DATA_LOSS value - * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value - * @property {number} CLUSTER_EVENT=17 CLUSTER_EVENT value - * @property {number} READ_ONLY=18 READ_ONLY value - */ - vtrpc.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OK"] = 0; - values[valuesById[1] = "CANCELED"] = 1; - values[valuesById[2] = "UNKNOWN"] = 2; - values[valuesById[3] = "INVALID_ARGUMENT"] = 3; - values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; - values[valuesById[5] = "NOT_FOUND"] = 5; - values[valuesById[6] = "ALREADY_EXISTS"] = 6; - values[valuesById[7] = "PERMISSION_DENIED"] = 7; - values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; - values[valuesById[9] = "FAILED_PRECONDITION"] = 9; - values[valuesById[10] = "ABORTED"] = 10; - values[valuesById[11] = "OUT_OF_RANGE"] = 11; - values[valuesById[12] = "UNIMPLEMENTED"] = 12; - values[valuesById[13] = "INTERNAL"] = 13; - values[valuesById[14] = "UNAVAILABLE"] = 14; - values[valuesById[15] = "DATA_LOSS"] = 15; - values[valuesById[16] = "UNAUTHENTICATED"] = 16; - values[valuesById[17] = "CLUSTER_EVENT"] = 17; - values[valuesById[18] = "READ_ONLY"] = 18; - return values; + return StartCommitResponse; })(); - vtrpc.RPCError = (function() { + query.SetRollbackRequest = (function() { /** - * Properties of a RPCError. - * @memberof vtrpc - * @interface IRPCError - * @property {string|null} [message] RPCError message - * @property {vtrpc.Code|null} [code] RPCError code + * Properties of a SetRollbackRequest. + * @memberof query + * @interface ISetRollbackRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] SetRollbackRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] SetRollbackRequest immediate_caller_id + * @property {query.ITarget|null} [target] SetRollbackRequest target + * @property {number|Long|null} [transaction_id] SetRollbackRequest transaction_id + * @property {string|null} [dtid] SetRollbackRequest dtid */ /** - * Constructs a new RPCError. - * @memberof vtrpc - * @classdesc Represents a RPCError. - * @implements IRPCError + * Constructs a new SetRollbackRequest. + * @memberof query + * @classdesc Represents a SetRollbackRequest. + * @implements ISetRollbackRequest * @constructor - * @param {vtrpc.IRPCError=} [properties] Properties to set + * @param {query.ISetRollbackRequest=} [properties] Properties to set */ - function RPCError(properties) { + function SetRollbackRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74823,88 +74907,127 @@ $root.vtrpc = (function() { } /** - * RPCError message. - * @member {string} message - * @memberof vtrpc.RPCError + * SetRollbackRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.SetRollbackRequest * @instance */ - RPCError.prototype.message = ""; + SetRollbackRequest.prototype.effective_caller_id = null; /** - * RPCError code. - * @member {vtrpc.Code} code - * @memberof vtrpc.RPCError + * SetRollbackRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.SetRollbackRequest * @instance */ - RPCError.prototype.code = 0; + SetRollbackRequest.prototype.immediate_caller_id = null; /** - * Creates a new RPCError instance using the specified properties. + * SetRollbackRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.SetRollbackRequest + * @instance + */ + SetRollbackRequest.prototype.target = null; + + /** + * SetRollbackRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.SetRollbackRequest + * @instance + */ + SetRollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SetRollbackRequest dtid. + * @member {string} dtid + * @memberof query.SetRollbackRequest + * @instance + */ + SetRollbackRequest.prototype.dtid = ""; + + /** + * Creates a new SetRollbackRequest instance using the specified properties. * @function create - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static - * @param {vtrpc.IRPCError=} [properties] Properties to set - * @returns {vtrpc.RPCError} RPCError instance + * @param {query.ISetRollbackRequest=} [properties] Properties to set + * @returns {query.SetRollbackRequest} SetRollbackRequest instance */ - RPCError.create = function create(properties) { - return new RPCError(properties); + SetRollbackRequest.create = function create(properties) { + return new SetRollbackRequest(properties); }; /** - * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. + * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. * @function encode - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static - * @param {vtrpc.IRPCError} message RPCError message or plain object to encode + * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RPCError.encode = function encode(message, writer) { + SetRollbackRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.code); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); return writer; }; /** - * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. + * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static - * @param {vtrpc.IRPCError} message RPCError message or plain object to encode + * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RPCError.encodeDelimited = function encodeDelimited(message, writer) { + SetRollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RPCError message from the specified reader or buffer. + * Decodes a SetRollbackRequest message from the specified reader or buffer. * @function decode - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtrpc.RPCError} RPCError + * @returns {query.SetRollbackRequest} SetRollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RPCError.decode = function decode(reader, length) { + SetRollbackRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.RPCError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; case 2: - message.message = reader.string(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.code = reader.int32(); + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.transaction_id = reader.int64(); + break; + case 5: + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -74915,247 +75038,168 @@ $root.vtrpc = (function() { }; /** - * Decodes a RPCError message from the specified reader or buffer, length delimited. + * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtrpc.RPCError} RPCError + * @returns {query.SetRollbackRequest} SetRollbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RPCError.decodeDelimited = function decodeDelimited(reader) { + SetRollbackRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RPCError message. + * Verifies a SetRollbackRequest message. * @function verify - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RPCError.verify = function verify(message) { + SetRollbackRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; return null; }; /** - * Creates a RPCError message from a plain object. Also converts values to their respective internal types. + * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static * @param {Object.} object Plain object - * @returns {vtrpc.RPCError} RPCError + * @returns {query.SetRollbackRequest} SetRollbackRequest */ - RPCError.fromObject = function fromObject(object) { - if (object instanceof $root.vtrpc.RPCError) + SetRollbackRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.SetRollbackRequest) return object; - var message = new $root.vtrpc.RPCError(); - if (object.message != null) - message.message = String(object.message); - switch (object.code) { - case "OK": - case 0: - message.code = 0; - break; - case "CANCELED": - case 1: - message.code = 1; - break; - case "UNKNOWN": - case 2: - message.code = 2; - break; - case "INVALID_ARGUMENT": - case 3: - message.code = 3; - break; - case "DEADLINE_EXCEEDED": - case 4: - message.code = 4; - break; - case "NOT_FOUND": - case 5: - message.code = 5; - break; - case "ALREADY_EXISTS": - case 6: - message.code = 6; - break; - case "PERMISSION_DENIED": - case 7: - message.code = 7; - break; - case "RESOURCE_EXHAUSTED": - case 8: - message.code = 8; - break; - case "FAILED_PRECONDITION": - case 9: - message.code = 9; - break; - case "ABORTED": - case 10: - message.code = 10; - break; - case "OUT_OF_RANGE": - case 11: - message.code = 11; - break; - case "UNIMPLEMENTED": - case 12: - message.code = 12; - break; - case "INTERNAL": - case 13: - message.code = 13; - break; - case "UNAVAILABLE": - case 14: - message.code = 14; - break; - case "DATA_LOSS": - case 15: - message.code = 15; - break; - case "UNAUTHENTICATED": - case 16: - message.code = 16; - break; - case "CLUSTER_EVENT": - case 17: - message.code = 17; - break; - case "READ_ONLY": - case 18: - message.code = 18; - break; + var message = new $root.query.SetRollbackRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.SetRollbackRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.SetRollbackRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.SetRollbackRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a RPCError message. Also converts values to other types if specified. + * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @static - * @param {vtrpc.RPCError} message RPCError + * @param {query.SetRollbackRequest} message SetRollbackRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RPCError.toObject = function toObject(message, options) { + SetRollbackRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.message = ""; - object.code = options.enums === String ? "OK" : 0; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.dtid = ""; } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.vtrpc.Code[message.code] : message.code; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this RPCError to JSON. + * Converts this SetRollbackRequest to JSON. * @function toJSON - * @memberof vtrpc.RPCError + * @memberof query.SetRollbackRequest * @instance * @returns {Object.} JSON object */ - RPCError.prototype.toJSON = function toJSON() { + SetRollbackRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RPCError; + return SetRollbackRequest; })(); - return vtrpc; -})(); - -$root.replicationdata = (function() { - - /** - * Namespace replicationdata. - * @exports replicationdata - * @namespace - */ - var replicationdata = {}; - - replicationdata.Status = (function() { + query.SetRollbackResponse = (function() { /** - * Properties of a Status. - * @memberof replicationdata - * @interface IStatus - * @property {string|null} [position] Status position - * @property {number|null} [replication_lag_seconds] Status replication_lag_seconds - * @property {string|null} [source_host] Status source_host - * @property {number|null} [source_port] Status source_port - * @property {number|null} [connect_retry] Status connect_retry - * @property {string|null} [relay_log_position] Status relay_log_position - * @property {string|null} [file_position] Status file_position - * @property {string|null} [relay_log_source_binlog_equivalent_position] Status relay_log_source_binlog_equivalent_position - * @property {number|null} [source_server_id] Status source_server_id - * @property {string|null} [source_uuid] Status source_uuid - * @property {number|null} [io_state] Status io_state - * @property {string|null} [last_io_error] Status last_io_error - * @property {number|null} [sql_state] Status sql_state - * @property {string|null} [last_sql_error] Status last_sql_error - * @property {string|null} [relay_log_file_position] Status relay_log_file_position - * @property {string|null} [source_user] Status source_user - * @property {number|null} [sql_delay] Status sql_delay - * @property {boolean|null} [auto_position] Status auto_position - * @property {boolean|null} [using_gtid] Status using_gtid - * @property {boolean|null} [has_replication_filters] Status has_replication_filters - * @property {boolean|null} [ssl_allowed] Status ssl_allowed - * @property {boolean|null} [replication_lag_unknown] Status replication_lag_unknown + * Properties of a SetRollbackResponse. + * @memberof query + * @interface ISetRollbackResponse */ /** - * Constructs a new Status. - * @memberof replicationdata - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new SetRollbackResponse. + * @memberof query + * @classdesc Represents a SetRollbackResponse. + * @implements ISetRollbackResponse * @constructor - * @param {replicationdata.IStatus=} [properties] Properties to set + * @param {query.ISetRollbackResponse=} [properties] Properties to set */ - function Status(properties) { + function SetRollbackResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75163,348 +75207,278 @@ $root.replicationdata = (function() { } /** - * Status position. - * @member {string} position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.position = ""; - - /** - * Status replication_lag_seconds. - * @member {number} replication_lag_seconds - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.replication_lag_seconds = 0; - - /** - * Status source_host. - * @member {string} source_host - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.source_host = ""; - - /** - * Status source_port. - * @member {number} source_port - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.source_port = 0; - - /** - * Status connect_retry. - * @member {number} connect_retry - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.connect_retry = 0; - - /** - * Status relay_log_position. - * @member {string} relay_log_position - * @memberof replicationdata.Status - * @instance + * Creates a new SetRollbackResponse instance using the specified properties. + * @function create + * @memberof query.SetRollbackResponse + * @static + * @param {query.ISetRollbackResponse=} [properties] Properties to set + * @returns {query.SetRollbackResponse} SetRollbackResponse instance */ - Status.prototype.relay_log_position = ""; + SetRollbackResponse.create = function create(properties) { + return new SetRollbackResponse(properties); + }; /** - * Status file_position. - * @member {string} file_position - * @memberof replicationdata.Status - * @instance + * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * @function encode + * @memberof query.SetRollbackResponse + * @static + * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Status.prototype.file_position = ""; + SetRollbackResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Status relay_log_source_binlog_equivalent_position. - * @member {string} relay_log_source_binlog_equivalent_position - * @memberof replicationdata.Status - * @instance + * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.SetRollbackResponse + * @static + * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Status.prototype.relay_log_source_binlog_equivalent_position = ""; + SetRollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Status source_server_id. - * @member {number} source_server_id - * @memberof replicationdata.Status - * @instance + * Decodes a SetRollbackResponse message from the specified reader or buffer. + * @function decode + * @memberof query.SetRollbackResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.SetRollbackResponse} SetRollbackResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.prototype.source_server_id = 0; + SetRollbackResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Status source_uuid. - * @member {string} source_uuid - * @memberof replicationdata.Status - * @instance + * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.SetRollbackResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.SetRollbackResponse} SetRollbackResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.prototype.source_uuid = ""; + SetRollbackResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Status io_state. - * @member {number} io_state - * @memberof replicationdata.Status - * @instance + * Verifies a SetRollbackResponse message. + * @function verify + * @memberof query.SetRollbackResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Status.prototype.io_state = 0; + SetRollbackResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Status last_io_error. - * @member {string} last_io_error - * @memberof replicationdata.Status - * @instance + * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.SetRollbackResponse + * @static + * @param {Object.} object Plain object + * @returns {query.SetRollbackResponse} SetRollbackResponse */ - Status.prototype.last_io_error = ""; + SetRollbackResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.SetRollbackResponse) + return object; + return new $root.query.SetRollbackResponse(); + }; /** - * Status sql_state. - * @member {number} sql_state - * @memberof replicationdata.Status - * @instance + * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.SetRollbackResponse + * @static + * @param {query.SetRollbackResponse} message SetRollbackResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Status.prototype.sql_state = 0; + SetRollbackResponse.toObject = function toObject() { + return {}; + }; /** - * Status last_sql_error. - * @member {string} last_sql_error - * @memberof replicationdata.Status + * Converts this SetRollbackResponse to JSON. + * @function toJSON + * @memberof query.SetRollbackResponse * @instance + * @returns {Object.} JSON object */ - Status.prototype.last_sql_error = ""; + SetRollbackResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Status relay_log_file_position. - * @member {string} relay_log_file_position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.relay_log_file_position = ""; + return SetRollbackResponse; + })(); - /** - * Status source_user. - * @member {string} source_user - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.source_user = ""; + query.ConcludeTransactionRequest = (function() { /** - * Status sql_delay. - * @member {number} sql_delay - * @memberof replicationdata.Status - * @instance + * Properties of a ConcludeTransactionRequest. + * @memberof query + * @interface IConcludeTransactionRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ConcludeTransactionRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ConcludeTransactionRequest immediate_caller_id + * @property {query.ITarget|null} [target] ConcludeTransactionRequest target + * @property {string|null} [dtid] ConcludeTransactionRequest dtid */ - Status.prototype.sql_delay = 0; /** - * Status auto_position. - * @member {boolean} auto_position - * @memberof replicationdata.Status - * @instance + * Constructs a new ConcludeTransactionRequest. + * @memberof query + * @classdesc Represents a ConcludeTransactionRequest. + * @implements IConcludeTransactionRequest + * @constructor + * @param {query.IConcludeTransactionRequest=} [properties] Properties to set */ - Status.prototype.auto_position = false; + function ConcludeTransactionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Status using_gtid. - * @member {boolean} using_gtid - * @memberof replicationdata.Status + * ConcludeTransactionRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ConcludeTransactionRequest * @instance */ - Status.prototype.using_gtid = false; + ConcludeTransactionRequest.prototype.effective_caller_id = null; /** - * Status has_replication_filters. - * @member {boolean} has_replication_filters - * @memberof replicationdata.Status + * ConcludeTransactionRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ConcludeTransactionRequest * @instance */ - Status.prototype.has_replication_filters = false; + ConcludeTransactionRequest.prototype.immediate_caller_id = null; /** - * Status ssl_allowed. - * @member {boolean} ssl_allowed - * @memberof replicationdata.Status + * ConcludeTransactionRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ConcludeTransactionRequest * @instance */ - Status.prototype.ssl_allowed = false; + ConcludeTransactionRequest.prototype.target = null; /** - * Status replication_lag_unknown. - * @member {boolean} replication_lag_unknown - * @memberof replicationdata.Status + * ConcludeTransactionRequest dtid. + * @member {string} dtid + * @memberof query.ConcludeTransactionRequest * @instance */ - Status.prototype.replication_lag_unknown = false; + ConcludeTransactionRequest.prototype.dtid = ""; /** - * Creates a new Status instance using the specified properties. + * Creates a new ConcludeTransactionRequest instance using the specified properties. * @function create - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static - * @param {replicationdata.IStatus=} [properties] Properties to set - * @returns {replicationdata.Status} Status instance + * @param {query.IConcludeTransactionRequest=} [properties] Properties to set + * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest instance */ - Status.create = function create(properties) { - return new Status(properties); + ConcludeTransactionRequest.create = function create(properties) { + return new ConcludeTransactionRequest(properties); }; /** - * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. + * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. * @function encode - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static - * @param {replicationdata.IStatus} message Status message or plain object to encode + * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer) { + ConcludeTransactionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.replication_lag_seconds != null && Object.hasOwnProperty.call(message, "replication_lag_seconds")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.replication_lag_seconds); - if (message.source_host != null && Object.hasOwnProperty.call(message, "source_host")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_host); - if (message.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.source_port); - if (message.connect_retry != null && Object.hasOwnProperty.call(message, "connect_retry")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.connect_retry); - if (message.relay_log_position != null && Object.hasOwnProperty.call(message, "relay_log_position")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.relay_log_position); - if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.file_position); - if (message.relay_log_source_binlog_equivalent_position != null && Object.hasOwnProperty.call(message, "relay_log_source_binlog_equivalent_position")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.relay_log_source_binlog_equivalent_position); - if (message.source_server_id != null && Object.hasOwnProperty.call(message, "source_server_id")) - writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.source_server_id); - if (message.source_uuid != null && Object.hasOwnProperty.call(message, "source_uuid")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.source_uuid); - if (message.io_state != null && Object.hasOwnProperty.call(message, "io_state")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.io_state); - if (message.last_io_error != null && Object.hasOwnProperty.call(message, "last_io_error")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.last_io_error); - if (message.sql_state != null && Object.hasOwnProperty.call(message, "sql_state")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.sql_state); - if (message.last_sql_error != null && Object.hasOwnProperty.call(message, "last_sql_error")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.last_sql_error); - if (message.relay_log_file_position != null && Object.hasOwnProperty.call(message, "relay_log_file_position")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.relay_log_file_position); - if (message.source_user != null && Object.hasOwnProperty.call(message, "source_user")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.source_user); - if (message.sql_delay != null && Object.hasOwnProperty.call(message, "sql_delay")) - writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.sql_delay); - if (message.auto_position != null && Object.hasOwnProperty.call(message, "auto_position")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.auto_position); - if (message.using_gtid != null && Object.hasOwnProperty.call(message, "using_gtid")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.using_gtid); - if (message.has_replication_filters != null && Object.hasOwnProperty.call(message, "has_replication_filters")) - writer.uint32(/* id 22, wireType 0 =*/176).bool(message.has_replication_filters); - if (message.ssl_allowed != null && Object.hasOwnProperty.call(message, "ssl_allowed")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.ssl_allowed); - if (message.replication_lag_unknown != null && Object.hasOwnProperty.call(message, "replication_lag_unknown")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.replication_lag_unknown); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); return writer; }; /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. + * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static - * @param {replicationdata.IStatus} message Status message or plain object to encode + * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encodeDelimited = function encodeDelimited(message, writer) { + ConcludeTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Status message from the specified reader or buffer. + * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. * @function decode - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.Status} Status + * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.decode = function decode(reader, length) { + ConcludeTransactionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.Status(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.position = reader.string(); - break; - case 4: - message.replication_lag_seconds = reader.uint32(); - break; - case 5: - message.source_host = reader.string(); - break; - case 6: - message.source_port = reader.int32(); - break; - case 7: - message.connect_retry = reader.int32(); - break; - case 8: - message.relay_log_position = reader.string(); - break; - case 9: - message.file_position = reader.string(); - break; - case 10: - message.relay_log_source_binlog_equivalent_position = reader.string(); - break; - case 11: - message.source_server_id = reader.uint32(); - break; - case 12: - message.source_uuid = reader.string(); - break; - case 13: - message.io_state = reader.int32(); - break; - case 14: - message.last_io_error = reader.string(); - break; - case 15: - message.sql_state = reader.int32(); - break; - case 16: - message.last_sql_error = reader.string(); - break; - case 17: - message.relay_log_file_position = reader.string(); - break; - case 18: - message.source_user = reader.string(); - break; - case 19: - message.sql_delay = reader.uint32(); - break; - case 20: - message.auto_position = reader.bool(); - break; - case 21: - message.using_gtid = reader.bool(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; - case 22: - message.has_replication_filters = reader.bool(); + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; - case 23: - message.ssl_allowed = reader.bool(); + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); break; - case 24: - message.replication_lag_unknown = reader.bool(); + case 4: + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -75515,277 +75489,146 @@ $root.replicationdata = (function() { }; /** - * Decodes a Status message from the specified reader or buffer, length delimited. + * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.Status} Status + * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.decodeDelimited = function decodeDelimited(reader) { + ConcludeTransactionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Status message. + * Verifies a ConcludeTransactionRequest message. * @function verify - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Status.verify = function verify(message) { + ConcludeTransactionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) - if (!$util.isInteger(message.replication_lag_seconds)) - return "replication_lag_seconds: integer expected"; - if (message.source_host != null && message.hasOwnProperty("source_host")) - if (!$util.isString(message.source_host)) - return "source_host: string expected"; - if (message.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isInteger(message.source_port)) - return "source_port: integer expected"; - if (message.connect_retry != null && message.hasOwnProperty("connect_retry")) - if (!$util.isInteger(message.connect_retry)) - return "connect_retry: integer expected"; - if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) - if (!$util.isString(message.relay_log_position)) - return "relay_log_position: string expected"; - if (message.file_position != null && message.hasOwnProperty("file_position")) - if (!$util.isString(message.file_position)) - return "file_position: string expected"; - if (message.relay_log_source_binlog_equivalent_position != null && message.hasOwnProperty("relay_log_source_binlog_equivalent_position")) - if (!$util.isString(message.relay_log_source_binlog_equivalent_position)) - return "relay_log_source_binlog_equivalent_position: string expected"; - if (message.source_server_id != null && message.hasOwnProperty("source_server_id")) - if (!$util.isInteger(message.source_server_id)) - return "source_server_id: integer expected"; - if (message.source_uuid != null && message.hasOwnProperty("source_uuid")) - if (!$util.isString(message.source_uuid)) - return "source_uuid: string expected"; - if (message.io_state != null && message.hasOwnProperty("io_state")) - if (!$util.isInteger(message.io_state)) - return "io_state: integer expected"; - if (message.last_io_error != null && message.hasOwnProperty("last_io_error")) - if (!$util.isString(message.last_io_error)) - return "last_io_error: string expected"; - if (message.sql_state != null && message.hasOwnProperty("sql_state")) - if (!$util.isInteger(message.sql_state)) - return "sql_state: integer expected"; - if (message.last_sql_error != null && message.hasOwnProperty("last_sql_error")) - if (!$util.isString(message.last_sql_error)) - return "last_sql_error: string expected"; - if (message.relay_log_file_position != null && message.hasOwnProperty("relay_log_file_position")) - if (!$util.isString(message.relay_log_file_position)) - return "relay_log_file_position: string expected"; - if (message.source_user != null && message.hasOwnProperty("source_user")) - if (!$util.isString(message.source_user)) - return "source_user: string expected"; - if (message.sql_delay != null && message.hasOwnProperty("sql_delay")) - if (!$util.isInteger(message.sql_delay)) - return "sql_delay: integer expected"; - if (message.auto_position != null && message.hasOwnProperty("auto_position")) - if (typeof message.auto_position !== "boolean") - return "auto_position: boolean expected"; - if (message.using_gtid != null && message.hasOwnProperty("using_gtid")) - if (typeof message.using_gtid !== "boolean") - return "using_gtid: boolean expected"; - if (message.has_replication_filters != null && message.hasOwnProperty("has_replication_filters")) - if (typeof message.has_replication_filters !== "boolean") - return "has_replication_filters: boolean expected"; - if (message.ssl_allowed != null && message.hasOwnProperty("ssl_allowed")) - if (typeof message.ssl_allowed !== "boolean") - return "ssl_allowed: boolean expected"; - if (message.replication_lag_unknown != null && message.hasOwnProperty("replication_lag_unknown")) - if (typeof message.replication_lag_unknown !== "boolean") - return "replication_lag_unknown: boolean expected"; - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof replicationdata.Status - * @static - * @param {Object.} object Plain object - * @returns {replicationdata.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.Status) + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; + return null; + }; + + /** + * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ConcludeTransactionRequest + * @static + * @param {Object.} object Plain object + * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest + */ + ConcludeTransactionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ConcludeTransactionRequest) return object; - var message = new $root.replicationdata.Status(); - if (object.position != null) - message.position = String(object.position); - if (object.replication_lag_seconds != null) - message.replication_lag_seconds = object.replication_lag_seconds >>> 0; - if (object.source_host != null) - message.source_host = String(object.source_host); - if (object.source_port != null) - message.source_port = object.source_port | 0; - if (object.connect_retry != null) - message.connect_retry = object.connect_retry | 0; - if (object.relay_log_position != null) - message.relay_log_position = String(object.relay_log_position); - if (object.file_position != null) - message.file_position = String(object.file_position); - if (object.relay_log_source_binlog_equivalent_position != null) - message.relay_log_source_binlog_equivalent_position = String(object.relay_log_source_binlog_equivalent_position); - if (object.source_server_id != null) - message.source_server_id = object.source_server_id >>> 0; - if (object.source_uuid != null) - message.source_uuid = String(object.source_uuid); - if (object.io_state != null) - message.io_state = object.io_state | 0; - if (object.last_io_error != null) - message.last_io_error = String(object.last_io_error); - if (object.sql_state != null) - message.sql_state = object.sql_state | 0; - if (object.last_sql_error != null) - message.last_sql_error = String(object.last_sql_error); - if (object.relay_log_file_position != null) - message.relay_log_file_position = String(object.relay_log_file_position); - if (object.source_user != null) - message.source_user = String(object.source_user); - if (object.sql_delay != null) - message.sql_delay = object.sql_delay >>> 0; - if (object.auto_position != null) - message.auto_position = Boolean(object.auto_position); - if (object.using_gtid != null) - message.using_gtid = Boolean(object.using_gtid); - if (object.has_replication_filters != null) - message.has_replication_filters = Boolean(object.has_replication_filters); - if (object.ssl_allowed != null) - message.ssl_allowed = Boolean(object.ssl_allowed); - if (object.replication_lag_unknown != null) - message.replication_lag_unknown = Boolean(object.replication_lag_unknown); + var message = new $root.query.ConcludeTransactionRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ConcludeTransactionRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ConcludeTransactionRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ConcludeTransactionRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. + * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @static - * @param {replicationdata.Status} message Status + * @param {query.ConcludeTransactionRequest} message ConcludeTransactionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + ConcludeTransactionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.position = ""; - object.replication_lag_seconds = 0; - object.source_host = ""; - object.source_port = 0; - object.connect_retry = 0; - object.relay_log_position = ""; - object.file_position = ""; - object.relay_log_source_binlog_equivalent_position = ""; - object.source_server_id = 0; - object.source_uuid = ""; - object.io_state = 0; - object.last_io_error = ""; - object.sql_state = 0; - object.last_sql_error = ""; - object.relay_log_file_position = ""; - object.source_user = ""; - object.sql_delay = 0; - object.auto_position = false; - object.using_gtid = false; - object.has_replication_filters = false; - object.ssl_allowed = false; - object.replication_lag_unknown = false; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.dtid = ""; } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) - object.replication_lag_seconds = message.replication_lag_seconds; - if (message.source_host != null && message.hasOwnProperty("source_host")) - object.source_host = message.source_host; - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.connect_retry != null && message.hasOwnProperty("connect_retry")) - object.connect_retry = message.connect_retry; - if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) - object.relay_log_position = message.relay_log_position; - if (message.file_position != null && message.hasOwnProperty("file_position")) - object.file_position = message.file_position; - if (message.relay_log_source_binlog_equivalent_position != null && message.hasOwnProperty("relay_log_source_binlog_equivalent_position")) - object.relay_log_source_binlog_equivalent_position = message.relay_log_source_binlog_equivalent_position; - if (message.source_server_id != null && message.hasOwnProperty("source_server_id")) - object.source_server_id = message.source_server_id; - if (message.source_uuid != null && message.hasOwnProperty("source_uuid")) - object.source_uuid = message.source_uuid; - if (message.io_state != null && message.hasOwnProperty("io_state")) - object.io_state = message.io_state; - if (message.last_io_error != null && message.hasOwnProperty("last_io_error")) - object.last_io_error = message.last_io_error; - if (message.sql_state != null && message.hasOwnProperty("sql_state")) - object.sql_state = message.sql_state; - if (message.last_sql_error != null && message.hasOwnProperty("last_sql_error")) - object.last_sql_error = message.last_sql_error; - if (message.relay_log_file_position != null && message.hasOwnProperty("relay_log_file_position")) - object.relay_log_file_position = message.relay_log_file_position; - if (message.source_user != null && message.hasOwnProperty("source_user")) - object.source_user = message.source_user; - if (message.sql_delay != null && message.hasOwnProperty("sql_delay")) - object.sql_delay = message.sql_delay; - if (message.auto_position != null && message.hasOwnProperty("auto_position")) - object.auto_position = message.auto_position; - if (message.using_gtid != null && message.hasOwnProperty("using_gtid")) - object.using_gtid = message.using_gtid; - if (message.has_replication_filters != null && message.hasOwnProperty("has_replication_filters")) - object.has_replication_filters = message.has_replication_filters; - if (message.ssl_allowed != null && message.hasOwnProperty("ssl_allowed")) - object.ssl_allowed = message.ssl_allowed; - if (message.replication_lag_unknown != null && message.hasOwnProperty("replication_lag_unknown")) - object.replication_lag_unknown = message.replication_lag_unknown; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this Status to JSON. + * Converts this ConcludeTransactionRequest to JSON. * @function toJSON - * @memberof replicationdata.Status + * @memberof query.ConcludeTransactionRequest * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + ConcludeTransactionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Status; + return ConcludeTransactionRequest; })(); - replicationdata.StopReplicationStatus = (function() { + query.ConcludeTransactionResponse = (function() { /** - * Properties of a StopReplicationStatus. - * @memberof replicationdata - * @interface IStopReplicationStatus - * @property {replicationdata.IStatus|null} [before] StopReplicationStatus before - * @property {replicationdata.IStatus|null} [after] StopReplicationStatus after + * Properties of a ConcludeTransactionResponse. + * @memberof query + * @interface IConcludeTransactionResponse */ /** - * Constructs a new StopReplicationStatus. - * @memberof replicationdata - * @classdesc Represents a StopReplicationStatus. - * @implements IStopReplicationStatus + * Constructs a new ConcludeTransactionResponse. + * @memberof query + * @classdesc Represents a ConcludeTransactionResponse. + * @implements IConcludeTransactionResponse * @constructor - * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set + * @param {query.IConcludeTransactionResponse=} [properties] Properties to set */ - function StopReplicationStatus(properties) { + function ConcludeTransactionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75793,89 +75636,63 @@ $root.replicationdata = (function() { } /** - * StopReplicationStatus before. - * @member {replicationdata.IStatus|null|undefined} before - * @memberof replicationdata.StopReplicationStatus - * @instance - */ - StopReplicationStatus.prototype.before = null; - - /** - * StopReplicationStatus after. - * @member {replicationdata.IStatus|null|undefined} after - * @memberof replicationdata.StopReplicationStatus - * @instance - */ - StopReplicationStatus.prototype.after = null; - - /** - * Creates a new StopReplicationStatus instance using the specified properties. + * Creates a new ConcludeTransactionResponse instance using the specified properties. * @function create - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static - * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus instance + * @param {query.IConcludeTransactionResponse=} [properties] Properties to set + * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse instance */ - StopReplicationStatus.create = function create(properties) { - return new StopReplicationStatus(properties); + ConcludeTransactionResponse.create = function create(properties) { + return new ConcludeTransactionResponse(properties); }; /** - * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. + * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. * @function encode - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static - * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode + * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationStatus.encode = function encode(message, writer) { + ConcludeTransactionResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.replicationdata.Status.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.replicationdata.Status.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. + * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. * @function encodeDelimited - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static - * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode + * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationStatus.encodeDelimited = function encodeDelimited(message, writer) { + ConcludeTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopReplicationStatus message from the specified reader or buffer. + * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. * @function decode - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus + * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationStatus.decode = function decode(reader, length) { + ConcludeTransactionResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.StopReplicationStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.before = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - case 2: - message.after = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -75885,141 +75702,97 @@ $root.replicationdata = (function() { }; /** - * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. + * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus + * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationStatus.decodeDelimited = function decodeDelimited(reader) { + ConcludeTransactionResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopReplicationStatus message. + * Verifies a ConcludeTransactionResponse message. * @function verify - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopReplicationStatus.verify = function verify(message) { + ConcludeTransactionResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.replicationdata.Status.verify(message.before); - if (error) - return "before." + error; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.replicationdata.Status.verify(message.after); - if (error) - return "after." + error; - } return null; }; /** - * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. + * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static * @param {Object.} object Plain object - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus + * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse */ - StopReplicationStatus.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.StopReplicationStatus) + ConcludeTransactionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ConcludeTransactionResponse) return object; - var message = new $root.replicationdata.StopReplicationStatus(); - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".replicationdata.StopReplicationStatus.before: object expected"); - message.before = $root.replicationdata.Status.fromObject(object.before); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".replicationdata.StopReplicationStatus.after: object expected"); - message.after = $root.replicationdata.Status.fromObject(object.after); - } - return message; + return new $root.query.ConcludeTransactionResponse(); }; /** - * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. + * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @static - * @param {replicationdata.StopReplicationStatus} message StopReplicationStatus + * @param {query.ConcludeTransactionResponse} message ConcludeTransactionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopReplicationStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before = null; - object.after = null; - } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.replicationdata.Status.toObject(message.before, options); - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.replicationdata.Status.toObject(message.after, options); - return object; + ConcludeTransactionResponse.toObject = function toObject() { + return {}; }; /** - * Converts this StopReplicationStatus to JSON. + * Converts this ConcludeTransactionResponse to JSON. * @function toJSON - * @memberof replicationdata.StopReplicationStatus + * @memberof query.ConcludeTransactionResponse * @instance * @returns {Object.} JSON object */ - StopReplicationStatus.prototype.toJSON = function toJSON() { + ConcludeTransactionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StopReplicationStatus; - })(); - - /** - * StopReplicationMode enum. - * @name replicationdata.StopReplicationMode - * @enum {number} - * @property {number} IOANDSQLTHREAD=0 IOANDSQLTHREAD value - * @property {number} IOTHREADONLY=1 IOTHREADONLY value - */ - replicationdata.StopReplicationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IOANDSQLTHREAD"] = 0; - values[valuesById[1] = "IOTHREADONLY"] = 1; - return values; + return ConcludeTransactionResponse; })(); - replicationdata.PrimaryStatus = (function() { + query.ReadTransactionRequest = (function() { /** - * Properties of a PrimaryStatus. - * @memberof replicationdata - * @interface IPrimaryStatus - * @property {string|null} [position] PrimaryStatus position - * @property {string|null} [file_position] PrimaryStatus file_position + * Properties of a ReadTransactionRequest. + * @memberof query + * @interface IReadTransactionRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReadTransactionRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReadTransactionRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReadTransactionRequest target + * @property {string|null} [dtid] ReadTransactionRequest dtid */ /** - * Constructs a new PrimaryStatus. - * @memberof replicationdata - * @classdesc Represents a PrimaryStatus. - * @implements IPrimaryStatus + * Constructs a new ReadTransactionRequest. + * @memberof query + * @classdesc Represents a ReadTransactionRequest. + * @implements IReadTransactionRequest * @constructor - * @param {replicationdata.IPrimaryStatus=} [properties] Properties to set + * @param {query.IReadTransactionRequest=} [properties] Properties to set */ - function PrimaryStatus(properties) { + function ReadTransactionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76027,88 +75800,114 @@ $root.replicationdata = (function() { } /** - * PrimaryStatus position. - * @member {string} position - * @memberof replicationdata.PrimaryStatus + * ReadTransactionRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReadTransactionRequest * @instance */ - PrimaryStatus.prototype.position = ""; + ReadTransactionRequest.prototype.effective_caller_id = null; /** - * PrimaryStatus file_position. - * @member {string} file_position - * @memberof replicationdata.PrimaryStatus + * ReadTransactionRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReadTransactionRequest * @instance */ - PrimaryStatus.prototype.file_position = ""; + ReadTransactionRequest.prototype.immediate_caller_id = null; /** - * Creates a new PrimaryStatus instance using the specified properties. + * ReadTransactionRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReadTransactionRequest + * @instance + */ + ReadTransactionRequest.prototype.target = null; + + /** + * ReadTransactionRequest dtid. + * @member {string} dtid + * @memberof query.ReadTransactionRequest + * @instance + */ + ReadTransactionRequest.prototype.dtid = ""; + + /** + * Creates a new ReadTransactionRequest instance using the specified properties. * @function create - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static - * @param {replicationdata.IPrimaryStatus=} [properties] Properties to set - * @returns {replicationdata.PrimaryStatus} PrimaryStatus instance + * @param {query.IReadTransactionRequest=} [properties] Properties to set + * @returns {query.ReadTransactionRequest} ReadTransactionRequest instance */ - PrimaryStatus.create = function create(properties) { - return new PrimaryStatus(properties); + ReadTransactionRequest.create = function create(properties) { + return new ReadTransactionRequest(properties); }; /** - * Encodes the specified PrimaryStatus message. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. + * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. * @function encode - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static - * @param {replicationdata.IPrimaryStatus} message PrimaryStatus message or plain object to encode + * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrimaryStatus.encode = function encode(message, writer) { + ReadTransactionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.file_position); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); return writer; }; /** - * Encodes the specified PrimaryStatus message, length delimited. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. + * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static - * @param {replicationdata.IPrimaryStatus} message PrimaryStatus message or plain object to encode + * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrimaryStatus.encodeDelimited = function encodeDelimited(message, writer) { + ReadTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrimaryStatus message from the specified reader or buffer. + * Decodes a ReadTransactionRequest message from the specified reader or buffer. * @function decode - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.PrimaryStatus} PrimaryStatus + * @returns {query.ReadTransactionRequest} ReadTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrimaryStatus.decode = function decode(reader, length) { + ReadTransactionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.PrimaryStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.position = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.file_position = reader.string(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.dtid = reader.string(); break; default: reader.skipType(tag & 7); @@ -76119,135 +75918,147 @@ $root.replicationdata = (function() { }; /** - * Decodes a PrimaryStatus message from the specified reader or buffer, length delimited. + * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.PrimaryStatus} PrimaryStatus + * @returns {query.ReadTransactionRequest} ReadTransactionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrimaryStatus.decodeDelimited = function decodeDelimited(reader) { + ReadTransactionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrimaryStatus message. + * Verifies a ReadTransactionRequest message. * @function verify - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrimaryStatus.verify = function verify(message) { + ReadTransactionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.file_position != null && message.hasOwnProperty("file_position")) - if (!$util.isString(message.file_position)) - return "file_position: string expected"; - return null; - }; - - /** - * Creates a PrimaryStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof replicationdata.PrimaryStatus - * @static - * @param {Object.} object Plain object - * @returns {replicationdata.PrimaryStatus} PrimaryStatus + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; + return null; + }; + + /** + * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ReadTransactionRequest + * @static + * @param {Object.} object Plain object + * @returns {query.ReadTransactionRequest} ReadTransactionRequest */ - PrimaryStatus.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.PrimaryStatus) + ReadTransactionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReadTransactionRequest) return object; - var message = new $root.replicationdata.PrimaryStatus(); - if (object.position != null) - message.position = String(object.position); - if (object.file_position != null) - message.file_position = String(object.file_position); + var message = new $root.query.ReadTransactionRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReadTransactionRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReadTransactionRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReadTransactionRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.dtid != null) + message.dtid = String(object.dtid); return message; }; /** - * Creates a plain object from a PrimaryStatus message. Also converts values to other types if specified. + * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @static - * @param {replicationdata.PrimaryStatus} message PrimaryStatus + * @param {query.ReadTransactionRequest} message ReadTransactionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrimaryStatus.toObject = function toObject(message, options) { + ReadTransactionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.position = ""; - object.file_position = ""; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.dtid = ""; } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.file_position != null && message.hasOwnProperty("file_position")) - object.file_position = message.file_position; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; return object; }; /** - * Converts this PrimaryStatus to JSON. + * Converts this ReadTransactionRequest to JSON. * @function toJSON - * @memberof replicationdata.PrimaryStatus + * @memberof query.ReadTransactionRequest * @instance * @returns {Object.} JSON object */ - PrimaryStatus.prototype.toJSON = function toJSON() { + ReadTransactionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PrimaryStatus; + return ReadTransactionRequest; })(); - replicationdata.FullStatus = (function() { + query.ReadTransactionResponse = (function() { /** - * Properties of a FullStatus. - * @memberof replicationdata - * @interface IFullStatus - * @property {number|null} [server_id] FullStatus server_id - * @property {string|null} [server_uuid] FullStatus server_uuid - * @property {replicationdata.IStatus|null} [replication_status] FullStatus replication_status - * @property {replicationdata.IPrimaryStatus|null} [primary_status] FullStatus primary_status - * @property {string|null} [gtid_purged] FullStatus gtid_purged - * @property {string|null} [version] FullStatus version - * @property {string|null} [version_comment] FullStatus version_comment - * @property {boolean|null} [read_only] FullStatus read_only - * @property {string|null} [gtid_mode] FullStatus gtid_mode - * @property {string|null} [binlog_format] FullStatus binlog_format - * @property {string|null} [binlog_row_image] FullStatus binlog_row_image - * @property {boolean|null} [log_bin_enabled] FullStatus log_bin_enabled - * @property {boolean|null} [log_replica_updates] FullStatus log_replica_updates - * @property {boolean|null} [semi_sync_primary_enabled] FullStatus semi_sync_primary_enabled - * @property {boolean|null} [semi_sync_replica_enabled] FullStatus semi_sync_replica_enabled - * @property {boolean|null} [semi_sync_primary_status] FullStatus semi_sync_primary_status - * @property {boolean|null} [semi_sync_replica_status] FullStatus semi_sync_replica_status - * @property {number|null} [semi_sync_primary_clients] FullStatus semi_sync_primary_clients - * @property {number|Long|null} [semi_sync_primary_timeout] FullStatus semi_sync_primary_timeout - * @property {number|null} [semi_sync_wait_for_replica_count] FullStatus semi_sync_wait_for_replica_count + * Properties of a ReadTransactionResponse. + * @memberof query + * @interface IReadTransactionResponse + * @property {query.ITransactionMetadata|null} [metadata] ReadTransactionResponse metadata */ /** - * Constructs a new FullStatus. - * @memberof replicationdata - * @classdesc Represents a FullStatus. - * @implements IFullStatus + * Constructs a new ReadTransactionResponse. + * @memberof query + * @classdesc Represents a ReadTransactionResponse. + * @implements IReadTransactionResponse * @constructor - * @param {replicationdata.IFullStatus=} [properties] Properties to set + * @param {query.IReadTransactionResponse=} [properties] Properties to set */ - function FullStatus(properties) { + function ReadTransactionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76255,322 +76066,355 @@ $root.replicationdata = (function() { } /** - * FullStatus server_id. - * @member {number} server_id - * @memberof replicationdata.FullStatus + * ReadTransactionResponse metadata. + * @member {query.ITransactionMetadata|null|undefined} metadata + * @memberof query.ReadTransactionResponse * @instance */ - FullStatus.prototype.server_id = 0; + ReadTransactionResponse.prototype.metadata = null; /** - * FullStatus server_uuid. - * @member {string} server_uuid - * @memberof replicationdata.FullStatus - * @instance + * Creates a new ReadTransactionResponse instance using the specified properties. + * @function create + * @memberof query.ReadTransactionResponse + * @static + * @param {query.IReadTransactionResponse=} [properties] Properties to set + * @returns {query.ReadTransactionResponse} ReadTransactionResponse instance */ - FullStatus.prototype.server_uuid = ""; + ReadTransactionResponse.create = function create(properties) { + return new ReadTransactionResponse(properties); + }; /** - * FullStatus replication_status. - * @member {replicationdata.IStatus|null|undefined} replication_status - * @memberof replicationdata.FullStatus - * @instance + * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. + * @function encode + * @memberof query.ReadTransactionResponse + * @static + * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FullStatus.prototype.replication_status = null; + ReadTransactionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.query.TransactionMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * FullStatus primary_status. - * @member {replicationdata.IPrimaryStatus|null|undefined} primary_status - * @memberof replicationdata.FullStatus - * @instance + * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.ReadTransactionResponse + * @static + * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FullStatus.prototype.primary_status = null; + ReadTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * FullStatus gtid_purged. - * @member {string} gtid_purged - * @memberof replicationdata.FullStatus - * @instance + * Decodes a ReadTransactionResponse message from the specified reader or buffer. + * @function decode + * @memberof query.ReadTransactionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.ReadTransactionResponse} ReadTransactionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FullStatus.prototype.gtid_purged = ""; + ReadTransactionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metadata = $root.query.TransactionMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * FullStatus version. - * @member {string} version - * @memberof replicationdata.FullStatus - * @instance + * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.ReadTransactionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.ReadTransactionResponse} ReadTransactionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FullStatus.prototype.version = ""; + ReadTransactionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * FullStatus version_comment. - * @member {string} version_comment - * @memberof replicationdata.FullStatus - * @instance + * Verifies a ReadTransactionResponse message. + * @function verify + * @memberof query.ReadTransactionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FullStatus.prototype.version_comment = ""; + ReadTransactionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.query.TransactionMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; /** - * FullStatus read_only. - * @member {boolean} read_only - * @memberof replicationdata.FullStatus - * @instance + * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ReadTransactionResponse + * @static + * @param {Object.} object Plain object + * @returns {query.ReadTransactionResponse} ReadTransactionResponse */ - FullStatus.prototype.read_only = false; + ReadTransactionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReadTransactionResponse) + return object; + var message = new $root.query.ReadTransactionResponse(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".query.ReadTransactionResponse.metadata: object expected"); + message.metadata = $root.query.TransactionMetadata.fromObject(object.metadata); + } + return message; + }; /** - * FullStatus gtid_mode. - * @member {string} gtid_mode - * @memberof replicationdata.FullStatus - * @instance + * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.ReadTransactionResponse + * @static + * @param {query.ReadTransactionResponse} message ReadTransactionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FullStatus.prototype.gtid_mode = ""; + ReadTransactionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.query.TransactionMetadata.toObject(message.metadata, options); + return object; + }; /** - * FullStatus binlog_format. - * @member {string} binlog_format - * @memberof replicationdata.FullStatus + * Converts this ReadTransactionResponse to JSON. + * @function toJSON + * @memberof query.ReadTransactionResponse * @instance + * @returns {Object.} JSON object */ - FullStatus.prototype.binlog_format = ""; + ReadTransactionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FullStatus binlog_row_image. - * @member {string} binlog_row_image - * @memberof replicationdata.FullStatus - * @instance - */ - FullStatus.prototype.binlog_row_image = ""; + return ReadTransactionResponse; + })(); + + query.BeginExecuteRequest = (function() { /** - * FullStatus log_bin_enabled. - * @member {boolean} log_bin_enabled - * @memberof replicationdata.FullStatus - * @instance + * Properties of a BeginExecuteRequest. + * @memberof query + * @interface IBeginExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] BeginExecuteRequest target + * @property {query.IBoundQuery|null} [query] BeginExecuteRequest query + * @property {query.IExecuteOptions|null} [options] BeginExecuteRequest options + * @property {number|Long|null} [reserved_id] BeginExecuteRequest reserved_id + * @property {Array.|null} [pre_queries] BeginExecuteRequest pre_queries */ - FullStatus.prototype.log_bin_enabled = false; /** - * FullStatus log_replica_updates. - * @member {boolean} log_replica_updates - * @memberof replicationdata.FullStatus - * @instance + * Constructs a new BeginExecuteRequest. + * @memberof query + * @classdesc Represents a BeginExecuteRequest. + * @implements IBeginExecuteRequest + * @constructor + * @param {query.IBeginExecuteRequest=} [properties] Properties to set */ - FullStatus.prototype.log_replica_updates = false; + function BeginExecuteRequest(properties) { + this.pre_queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * FullStatus semi_sync_primary_enabled. - * @member {boolean} semi_sync_primary_enabled - * @memberof replicationdata.FullStatus + * BeginExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_primary_enabled = false; + BeginExecuteRequest.prototype.effective_caller_id = null; /** - * FullStatus semi_sync_replica_enabled. - * @member {boolean} semi_sync_replica_enabled - * @memberof replicationdata.FullStatus + * BeginExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_replica_enabled = false; + BeginExecuteRequest.prototype.immediate_caller_id = null; /** - * FullStatus semi_sync_primary_status. - * @member {boolean} semi_sync_primary_status - * @memberof replicationdata.FullStatus + * BeginExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_primary_status = false; + BeginExecuteRequest.prototype.target = null; /** - * FullStatus semi_sync_replica_status. - * @member {boolean} semi_sync_replica_status - * @memberof replicationdata.FullStatus + * BeginExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_replica_status = false; + BeginExecuteRequest.prototype.query = null; /** - * FullStatus semi_sync_primary_clients. - * @member {number} semi_sync_primary_clients - * @memberof replicationdata.FullStatus + * BeginExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_primary_clients = 0; + BeginExecuteRequest.prototype.options = null; /** - * FullStatus semi_sync_primary_timeout. - * @member {number|Long} semi_sync_primary_timeout - * @memberof replicationdata.FullStatus + * BeginExecuteRequest reserved_id. + * @member {number|Long} reserved_id + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_primary_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BeginExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FullStatus semi_sync_wait_for_replica_count. - * @member {number} semi_sync_wait_for_replica_count - * @memberof replicationdata.FullStatus + * BeginExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.BeginExecuteRequest * @instance */ - FullStatus.prototype.semi_sync_wait_for_replica_count = 0; + BeginExecuteRequest.prototype.pre_queries = $util.emptyArray; /** - * Creates a new FullStatus instance using the specified properties. + * Creates a new BeginExecuteRequest instance using the specified properties. * @function create - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static - * @param {replicationdata.IFullStatus=} [properties] Properties to set - * @returns {replicationdata.FullStatus} FullStatus instance + * @param {query.IBeginExecuteRequest=} [properties] Properties to set + * @returns {query.BeginExecuteRequest} BeginExecuteRequest instance */ - FullStatus.create = function create(properties) { - return new FullStatus(properties); + BeginExecuteRequest.create = function create(properties) { + return new BeginExecuteRequest(properties); }; /** - * Encodes the specified FullStatus message. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. + * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. * @function encode - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static - * @param {replicationdata.IFullStatus} message FullStatus message or plain object to encode + * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FullStatus.encode = function encode(message, writer) { + BeginExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.server_id != null && Object.hasOwnProperty.call(message, "server_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.server_id); - if (message.server_uuid != null && Object.hasOwnProperty.call(message, "server_uuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.server_uuid); - if (message.replication_status != null && Object.hasOwnProperty.call(message, "replication_status")) - $root.replicationdata.Status.encode(message.replication_status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.primary_status != null && Object.hasOwnProperty.call(message, "primary_status")) - $root.replicationdata.PrimaryStatus.encode(message.primary_status, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.gtid_purged != null && Object.hasOwnProperty.call(message, "gtid_purged")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gtid_purged); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); - if (message.version_comment != null && Object.hasOwnProperty.call(message, "version_comment")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.version_comment); - if (message.read_only != null && Object.hasOwnProperty.call(message, "read_only")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.read_only); - if (message.gtid_mode != null && Object.hasOwnProperty.call(message, "gtid_mode")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.gtid_mode); - if (message.binlog_format != null && Object.hasOwnProperty.call(message, "binlog_format")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.binlog_format); - if (message.binlog_row_image != null && Object.hasOwnProperty.call(message, "binlog_row_image")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.binlog_row_image); - if (message.log_bin_enabled != null && Object.hasOwnProperty.call(message, "log_bin_enabled")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.log_bin_enabled); - if (message.log_replica_updates != null && Object.hasOwnProperty.call(message, "log_replica_updates")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.log_replica_updates); - if (message.semi_sync_primary_enabled != null && Object.hasOwnProperty.call(message, "semi_sync_primary_enabled")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.semi_sync_primary_enabled); - if (message.semi_sync_replica_enabled != null && Object.hasOwnProperty.call(message, "semi_sync_replica_enabled")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.semi_sync_replica_enabled); - if (message.semi_sync_primary_status != null && Object.hasOwnProperty.call(message, "semi_sync_primary_status")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.semi_sync_primary_status); - if (message.semi_sync_replica_status != null && Object.hasOwnProperty.call(message, "semi_sync_replica_status")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.semi_sync_replica_status); - if (message.semi_sync_primary_clients != null && Object.hasOwnProperty.call(message, "semi_sync_primary_clients")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.semi_sync_primary_clients); - if (message.semi_sync_primary_timeout != null && Object.hasOwnProperty.call(message, "semi_sync_primary_timeout")) - writer.uint32(/* id 19, wireType 0 =*/152).uint64(message.semi_sync_primary_timeout); - if (message.semi_sync_wait_for_replica_count != null && Object.hasOwnProperty.call(message, "semi_sync_wait_for_replica_count")) - writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.semi_sync_wait_for_replica_count); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.reserved_id); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); return writer; }; /** - * Encodes the specified FullStatus message, length delimited. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. + * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static - * @param {replicationdata.IFullStatus} message FullStatus message or plain object to encode + * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FullStatus.encodeDelimited = function encodeDelimited(message, writer) { + BeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FullStatus message from the specified reader or buffer. + * Decodes a BeginExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.FullStatus} FullStatus + * @returns {query.BeginExecuteRequest} BeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FullStatus.decode = function decode(reader, length) { + BeginExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.FullStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.server_id = reader.uint32(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.server_uuid = reader.string(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.replication_status = $root.replicationdata.Status.decode(reader, reader.uint32()); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 4: - message.primary_status = $root.replicationdata.PrimaryStatus.decode(reader, reader.uint32()); + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); break; case 5: - message.gtid_purged = reader.string(); + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); break; case 6: - message.version = reader.string(); + message.reserved_id = reader.int64(); break; case 7: - message.version_comment = reader.string(); - break; - case 8: - message.read_only = reader.bool(); - break; - case 9: - message.gtid_mode = reader.string(); - break; - case 10: - message.binlog_format = reader.string(); - break; - case 11: - message.binlog_row_image = reader.string(); - break; - case 12: - message.log_bin_enabled = reader.bool(); - break; - case 13: - message.log_replica_updates = reader.bool(); - break; - case 14: - message.semi_sync_primary_enabled = reader.bool(); - break; - case 15: - message.semi_sync_replica_enabled = reader.bool(); - break; - case 16: - message.semi_sync_primary_status = reader.bool(); - break; - case 17: - message.semi_sync_replica_status = reader.bool(); - break; - case 18: - message.semi_sync_primary_clients = reader.uint32(); - break; - case 19: - message.semi_sync_primary_timeout = reader.uint64(); - break; - case 20: - message.semi_sync_wait_for_replica_count = reader.uint32(); + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -76581,297 +76425,212 @@ $root.replicationdata = (function() { }; /** - * Decodes a FullStatus message from the specified reader or buffer, length delimited. + * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.FullStatus} FullStatus + * @returns {query.BeginExecuteRequest} BeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FullStatus.decodeDelimited = function decodeDelimited(reader) { + BeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FullStatus message. + * Verifies a BeginExecuteRequest message. * @function verify - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FullStatus.verify = function verify(message) { + BeginExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.server_id != null && message.hasOwnProperty("server_id")) - if (!$util.isInteger(message.server_id)) - return "server_id: integer expected"; - if (message.server_uuid != null && message.hasOwnProperty("server_uuid")) - if (!$util.isString(message.server_uuid)) - return "server_uuid: string expected"; - if (message.replication_status != null && message.hasOwnProperty("replication_status")) { - var error = $root.replicationdata.Status.verify(message.replication_status); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); if (error) - return "replication_status." + error; + return "effective_caller_id." + error; } - if (message.primary_status != null && message.hasOwnProperty("primary_status")) { - var error = $root.replicationdata.PrimaryStatus.verify(message.primary_status); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); if (error) - return "primary_status." + error; + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; } - if (message.gtid_purged != null && message.hasOwnProperty("gtid_purged")) - if (!$util.isString(message.gtid_purged)) - return "gtid_purged: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.version_comment != null && message.hasOwnProperty("version_comment")) - if (!$util.isString(message.version_comment)) - return "version_comment: string expected"; - if (message.read_only != null && message.hasOwnProperty("read_only")) - if (typeof message.read_only !== "boolean") - return "read_only: boolean expected"; - if (message.gtid_mode != null && message.hasOwnProperty("gtid_mode")) - if (!$util.isString(message.gtid_mode)) - return "gtid_mode: string expected"; - if (message.binlog_format != null && message.hasOwnProperty("binlog_format")) - if (!$util.isString(message.binlog_format)) - return "binlog_format: string expected"; - if (message.binlog_row_image != null && message.hasOwnProperty("binlog_row_image")) - if (!$util.isString(message.binlog_row_image)) - return "binlog_row_image: string expected"; - if (message.log_bin_enabled != null && message.hasOwnProperty("log_bin_enabled")) - if (typeof message.log_bin_enabled !== "boolean") - return "log_bin_enabled: boolean expected"; - if (message.log_replica_updates != null && message.hasOwnProperty("log_replica_updates")) - if (typeof message.log_replica_updates !== "boolean") - return "log_replica_updates: boolean expected"; - if (message.semi_sync_primary_enabled != null && message.hasOwnProperty("semi_sync_primary_enabled")) - if (typeof message.semi_sync_primary_enabled !== "boolean") - return "semi_sync_primary_enabled: boolean expected"; - if (message.semi_sync_replica_enabled != null && message.hasOwnProperty("semi_sync_replica_enabled")) - if (typeof message.semi_sync_replica_enabled !== "boolean") - return "semi_sync_replica_enabled: boolean expected"; - if (message.semi_sync_primary_status != null && message.hasOwnProperty("semi_sync_primary_status")) - if (typeof message.semi_sync_primary_status !== "boolean") - return "semi_sync_primary_status: boolean expected"; - if (message.semi_sync_replica_status != null && message.hasOwnProperty("semi_sync_replica_status")) - if (typeof message.semi_sync_replica_status !== "boolean") - return "semi_sync_replica_status: boolean expected"; - if (message.semi_sync_primary_clients != null && message.hasOwnProperty("semi_sync_primary_clients")) - if (!$util.isInteger(message.semi_sync_primary_clients)) - return "semi_sync_primary_clients: integer expected"; - if (message.semi_sync_primary_timeout != null && message.hasOwnProperty("semi_sync_primary_timeout")) - if (!$util.isInteger(message.semi_sync_primary_timeout) && !(message.semi_sync_primary_timeout && $util.isInteger(message.semi_sync_primary_timeout.low) && $util.isInteger(message.semi_sync_primary_timeout.high))) - return "semi_sync_primary_timeout: integer|Long expected"; - if (message.semi_sync_wait_for_replica_count != null && message.hasOwnProperty("semi_sync_wait_for_replica_count")) - if (!$util.isInteger(message.semi_sync_wait_for_replica_count)) - return "semi_sync_wait_for_replica_count: integer expected"; return null; }; /** - * Creates a FullStatus message from a plain object. Also converts values to their respective internal types. + * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static * @param {Object.} object Plain object - * @returns {replicationdata.FullStatus} FullStatus + * @returns {query.BeginExecuteRequest} BeginExecuteRequest */ - FullStatus.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.FullStatus) + BeginExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginExecuteRequest) return object; - var message = new $root.replicationdata.FullStatus(); - if (object.server_id != null) - message.server_id = object.server_id >>> 0; - if (object.server_uuid != null) - message.server_uuid = String(object.server_uuid); - if (object.replication_status != null) { - if (typeof object.replication_status !== "object") - throw TypeError(".replicationdata.FullStatus.replication_status: object expected"); - message.replication_status = $root.replicationdata.Status.fromObject(object.replication_status); + var message = new $root.query.BeginExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.BeginExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } - if (object.primary_status != null) { - if (typeof object.primary_status !== "object") - throw TypeError(".replicationdata.FullStatus.primary_status: object expected"); - message.primary_status = $root.replicationdata.PrimaryStatus.fromObject(object.primary_status); + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.BeginExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } - if (object.gtid_purged != null) - message.gtid_purged = String(object.gtid_purged); - if (object.version != null) - message.version = String(object.version); - if (object.version_comment != null) - message.version_comment = String(object.version_comment); - if (object.read_only != null) - message.read_only = Boolean(object.read_only); - if (object.gtid_mode != null) - message.gtid_mode = String(object.gtid_mode); - if (object.binlog_format != null) - message.binlog_format = String(object.binlog_format); - if (object.binlog_row_image != null) - message.binlog_row_image = String(object.binlog_row_image); - if (object.log_bin_enabled != null) - message.log_bin_enabled = Boolean(object.log_bin_enabled); - if (object.log_replica_updates != null) - message.log_replica_updates = Boolean(object.log_replica_updates); - if (object.semi_sync_primary_enabled != null) - message.semi_sync_primary_enabled = Boolean(object.semi_sync_primary_enabled); - if (object.semi_sync_replica_enabled != null) - message.semi_sync_replica_enabled = Boolean(object.semi_sync_replica_enabled); - if (object.semi_sync_primary_status != null) - message.semi_sync_primary_status = Boolean(object.semi_sync_primary_status); - if (object.semi_sync_replica_status != null) - message.semi_sync_replica_status = Boolean(object.semi_sync_replica_status); - if (object.semi_sync_primary_clients != null) - message.semi_sync_primary_clients = object.semi_sync_primary_clients >>> 0; - if (object.semi_sync_primary_timeout != null) + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.BeginExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.BeginExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.BeginExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.reserved_id != null) if ($util.Long) - (message.semi_sync_primary_timeout = $util.Long.fromValue(object.semi_sync_primary_timeout)).unsigned = true; - else if (typeof object.semi_sync_primary_timeout === "string") - message.semi_sync_primary_timeout = parseInt(object.semi_sync_primary_timeout, 10); - else if (typeof object.semi_sync_primary_timeout === "number") - message.semi_sync_primary_timeout = object.semi_sync_primary_timeout; - else if (typeof object.semi_sync_primary_timeout === "object") - message.semi_sync_primary_timeout = new $util.LongBits(object.semi_sync_primary_timeout.low >>> 0, object.semi_sync_primary_timeout.high >>> 0).toNumber(true); - if (object.semi_sync_wait_for_replica_count != null) - message.semi_sync_wait_for_replica_count = object.semi_sync_wait_for_replica_count >>> 0; + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.BeginExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); + } return message; }; /** - * Creates a plain object from a FullStatus message. Also converts values to other types if specified. + * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @static - * @param {replicationdata.FullStatus} message FullStatus + * @param {query.BeginExecuteRequest} message BeginExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FullStatus.toObject = function toObject(message, options) { + BeginExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.pre_queries = []; if (options.defaults) { - object.server_id = 0; - object.server_uuid = ""; - object.replication_status = null; - object.primary_status = null; - object.gtid_purged = ""; - object.version = ""; - object.version_comment = ""; - object.read_only = false; - object.gtid_mode = ""; - object.binlog_format = ""; - object.binlog_row_image = ""; - object.log_bin_enabled = false; - object.log_replica_updates = false; - object.semi_sync_primary_enabled = false; - object.semi_sync_replica_enabled = false; - object.semi_sync_primary_status = false; - object.semi_sync_replica_status = false; - object.semi_sync_primary_clients = 0; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.semi_sync_primary_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.semi_sync_primary_timeout = options.longs === String ? "0" : 0; - object.semi_sync_wait_for_replica_count = 0; + object.reserved_id = options.longs === String ? "0" : 0; } - if (message.server_id != null && message.hasOwnProperty("server_id")) - object.server_id = message.server_id; - if (message.server_uuid != null && message.hasOwnProperty("server_uuid")) - object.server_uuid = message.server_uuid; - if (message.replication_status != null && message.hasOwnProperty("replication_status")) - object.replication_status = $root.replicationdata.Status.toObject(message.replication_status, options); - if (message.primary_status != null && message.hasOwnProperty("primary_status")) - object.primary_status = $root.replicationdata.PrimaryStatus.toObject(message.primary_status, options); - if (message.gtid_purged != null && message.hasOwnProperty("gtid_purged")) - object.gtid_purged = message.gtid_purged; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.version_comment != null && message.hasOwnProperty("version_comment")) - object.version_comment = message.version_comment; - if (message.read_only != null && message.hasOwnProperty("read_only")) - object.read_only = message.read_only; - if (message.gtid_mode != null && message.hasOwnProperty("gtid_mode")) - object.gtid_mode = message.gtid_mode; - if (message.binlog_format != null && message.hasOwnProperty("binlog_format")) - object.binlog_format = message.binlog_format; - if (message.binlog_row_image != null && message.hasOwnProperty("binlog_row_image")) - object.binlog_row_image = message.binlog_row_image; - if (message.log_bin_enabled != null && message.hasOwnProperty("log_bin_enabled")) - object.log_bin_enabled = message.log_bin_enabled; - if (message.log_replica_updates != null && message.hasOwnProperty("log_replica_updates")) - object.log_replica_updates = message.log_replica_updates; - if (message.semi_sync_primary_enabled != null && message.hasOwnProperty("semi_sync_primary_enabled")) - object.semi_sync_primary_enabled = message.semi_sync_primary_enabled; - if (message.semi_sync_replica_enabled != null && message.hasOwnProperty("semi_sync_replica_enabled")) - object.semi_sync_replica_enabled = message.semi_sync_replica_enabled; - if (message.semi_sync_primary_status != null && message.hasOwnProperty("semi_sync_primary_status")) - object.semi_sync_primary_status = message.semi_sync_primary_status; - if (message.semi_sync_replica_status != null && message.hasOwnProperty("semi_sync_replica_status")) - object.semi_sync_replica_status = message.semi_sync_replica_status; - if (message.semi_sync_primary_clients != null && message.hasOwnProperty("semi_sync_primary_clients")) - object.semi_sync_primary_clients = message.semi_sync_primary_clients; - if (message.semi_sync_primary_timeout != null && message.hasOwnProperty("semi_sync_primary_timeout")) - if (typeof message.semi_sync_primary_timeout === "number") - object.semi_sync_primary_timeout = options.longs === String ? String(message.semi_sync_primary_timeout) : message.semi_sync_primary_timeout; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; else - object.semi_sync_primary_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.semi_sync_primary_timeout) : options.longs === Number ? new $util.LongBits(message.semi_sync_primary_timeout.low >>> 0, message.semi_sync_primary_timeout.high >>> 0).toNumber(true) : message.semi_sync_primary_timeout; - if (message.semi_sync_wait_for_replica_count != null && message.hasOwnProperty("semi_sync_wait_for_replica_count")) - object.semi_sync_wait_for_replica_count = message.semi_sync_wait_for_replica_count; + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; + } return object; }; /** - * Converts this FullStatus to JSON. + * Converts this BeginExecuteRequest to JSON. * @function toJSON - * @memberof replicationdata.FullStatus + * @memberof query.BeginExecuteRequest * @instance * @returns {Object.} JSON object */ - FullStatus.prototype.toJSON = function toJSON() { + BeginExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FullStatus; + return BeginExecuteRequest; })(); - return replicationdata; -})(); - -$root.vschema = (function() { - - /** - * Namespace vschema. - * @exports vschema - * @namespace - */ - var vschema = {}; - - vschema.RoutingRules = (function() { + query.BeginExecuteResponse = (function() { /** - * Properties of a RoutingRules. - * @memberof vschema - * @interface IRoutingRules - * @property {Array.|null} [rules] RoutingRules rules + * Properties of a BeginExecuteResponse. + * @memberof query + * @interface IBeginExecuteResponse + * @property {vtrpc.IRPCError|null} [error] BeginExecuteResponse error + * @property {query.IQueryResult|null} [result] BeginExecuteResponse result + * @property {number|Long|null} [transaction_id] BeginExecuteResponse transaction_id + * @property {topodata.ITabletAlias|null} [tablet_alias] BeginExecuteResponse tablet_alias + * @property {string|null} [session_state_changes] BeginExecuteResponse session_state_changes */ /** - * Constructs a new RoutingRules. - * @memberof vschema - * @classdesc Represents a RoutingRules. - * @implements IRoutingRules + * Constructs a new BeginExecuteResponse. + * @memberof query + * @classdesc Represents a BeginExecuteResponse. + * @implements IBeginExecuteResponse * @constructor - * @param {vschema.IRoutingRules=} [properties] Properties to set + * @param {query.IBeginExecuteResponse=} [properties] Properties to set */ - function RoutingRules(properties) { - this.rules = []; + function BeginExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76879,78 +76638,127 @@ $root.vschema = (function() { } /** - * RoutingRules rules. - * @member {Array.} rules - * @memberof vschema.RoutingRules + * BeginExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.BeginExecuteResponse * @instance */ - RoutingRules.prototype.rules = $util.emptyArray; + BeginExecuteResponse.prototype.error = null; /** - * Creates a new RoutingRules instance using the specified properties. + * BeginExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.BeginExecuteResponse + * @instance + */ + BeginExecuteResponse.prototype.result = null; + + /** + * BeginExecuteResponse transaction_id. + * @member {number|Long} transaction_id + * @memberof query.BeginExecuteResponse + * @instance + */ + BeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BeginExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.BeginExecuteResponse + * @instance + */ + BeginExecuteResponse.prototype.tablet_alias = null; + + /** + * BeginExecuteResponse session_state_changes. + * @member {string} session_state_changes + * @memberof query.BeginExecuteResponse + * @instance + */ + BeginExecuteResponse.prototype.session_state_changes = ""; + + /** + * Creates a new BeginExecuteResponse instance using the specified properties. * @function create - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static - * @param {vschema.IRoutingRules=} [properties] Properties to set - * @returns {vschema.RoutingRules} RoutingRules instance + * @param {query.IBeginExecuteResponse=} [properties] Properties to set + * @returns {query.BeginExecuteResponse} BeginExecuteResponse instance */ - RoutingRules.create = function create(properties) { - return new RoutingRules(properties); + BeginExecuteResponse.create = function create(properties) { + return new BeginExecuteResponse(properties); }; /** - * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. + * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. * @function encode - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static - * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode + * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingRules.encode = function encode(message, writer) { + BeginExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.vschema.RoutingRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.session_state_changes); return writer; }; /** - * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. + * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static - * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode + * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingRules.encodeDelimited = function encodeDelimited(message, writer) { + BeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RoutingRules message from the specified reader or buffer. + * Decodes a BeginExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.RoutingRules} RoutingRules + * @returns {query.BeginExecuteResponse} BeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingRules.decode = function decode(reader, length) { + BeginExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRules(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.vschema.RoutingRule.decode(reader, reader.uint32())); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + break; + case 2: + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + break; + case 3: + message.transaction_id = reader.int64(); + break; + case 4: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 5: + message.session_state_changes = reader.string(); break; default: reader.skipType(tag & 7); @@ -76961,126 +76769,176 @@ $root.vschema = (function() { }; /** - * Decodes a RoutingRules message from the specified reader or buffer, length delimited. + * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.RoutingRules} RoutingRules + * @returns {query.BeginExecuteResponse} BeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingRules.decodeDelimited = function decodeDelimited(reader) { + BeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RoutingRules message. + * Verifies a BeginExecuteResponse message. * @function verify - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RoutingRules.verify = function verify(message) { + BeginExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.vschema.RoutingRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); + if (error) + return "error." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + if (!$util.isString(message.session_state_changes)) + return "session_state_changes: string expected"; return null; }; /** - * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. + * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static * @param {Object.} object Plain object - * @returns {vschema.RoutingRules} RoutingRules + * @returns {query.BeginExecuteResponse} BeginExecuteResponse */ - RoutingRules.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.RoutingRules) + BeginExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginExecuteResponse) return object; - var message = new $root.vschema.RoutingRules(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".vschema.RoutingRules.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".vschema.RoutingRules.rules: object expected"); - message.rules[i] = $root.vschema.RoutingRule.fromObject(object.rules[i]); - } + var message = new $root.query.BeginExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.BeginExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.BeginExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.BeginExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.session_state_changes != null) + message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. + * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @static - * @param {vschema.RoutingRules} message RoutingRules + * @param {query.BeginExecuteResponse} message BeginExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoutingRules.toObject = function toObject(message, options) { + BeginExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.vschema.RoutingRule.toObject(message.rules[j], options); + if (options.defaults) { + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; + object.session_state_changes = ""; } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this RoutingRules to JSON. + * Converts this BeginExecuteResponse to JSON. * @function toJSON - * @memberof vschema.RoutingRules + * @memberof query.BeginExecuteResponse * @instance * @returns {Object.} JSON object */ - RoutingRules.prototype.toJSON = function toJSON() { + BeginExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RoutingRules; + return BeginExecuteResponse; })(); - vschema.RoutingRule = (function() { + query.BeginStreamExecuteRequest = (function() { /** - * Properties of a RoutingRule. - * @memberof vschema - * @interface IRoutingRule - * @property {string|null} [from_table] RoutingRule from_table - * @property {Array.|null} [to_tables] RoutingRule to_tables + * Properties of a BeginStreamExecuteRequest. + * @memberof query + * @interface IBeginStreamExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginStreamExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginStreamExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] BeginStreamExecuteRequest target + * @property {query.IBoundQuery|null} [query] BeginStreamExecuteRequest query + * @property {query.IExecuteOptions|null} [options] BeginStreamExecuteRequest options + * @property {Array.|null} [pre_queries] BeginStreamExecuteRequest pre_queries + * @property {number|Long|null} [reserved_id] BeginStreamExecuteRequest reserved_id */ /** - * Constructs a new RoutingRule. - * @memberof vschema - * @classdesc Represents a RoutingRule. - * @implements IRoutingRule + * Constructs a new BeginStreamExecuteRequest. + * @memberof query + * @classdesc Represents a BeginStreamExecuteRequest. + * @implements IBeginStreamExecuteRequest * @constructor - * @param {vschema.IRoutingRule=} [properties] Properties to set + * @param {query.IBeginStreamExecuteRequest=} [properties] Properties to set */ - function RoutingRule(properties) { - this.to_tables = []; + function BeginStreamExecuteRequest(properties) { + this.pre_queries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77088,91 +76946,156 @@ $root.vschema = (function() { } /** - * RoutingRule from_table. - * @member {string} from_table - * @memberof vschema.RoutingRule + * BeginStreamExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.BeginStreamExecuteRequest * @instance */ - RoutingRule.prototype.from_table = ""; + BeginStreamExecuteRequest.prototype.effective_caller_id = null; /** - * RoutingRule to_tables. - * @member {Array.} to_tables - * @memberof vschema.RoutingRule + * BeginStreamExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.BeginStreamExecuteRequest * @instance */ - RoutingRule.prototype.to_tables = $util.emptyArray; + BeginStreamExecuteRequest.prototype.immediate_caller_id = null; /** - * Creates a new RoutingRule instance using the specified properties. + * BeginStreamExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.BeginStreamExecuteRequest + * @instance + */ + BeginStreamExecuteRequest.prototype.target = null; + + /** + * BeginStreamExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.BeginStreamExecuteRequest + * @instance + */ + BeginStreamExecuteRequest.prototype.query = null; + + /** + * BeginStreamExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.BeginStreamExecuteRequest + * @instance + */ + BeginStreamExecuteRequest.prototype.options = null; + + /** + * BeginStreamExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.BeginStreamExecuteRequest + * @instance + */ + BeginStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; + + /** + * BeginStreamExecuteRequest reserved_id. + * @member {number|Long} reserved_id + * @memberof query.BeginStreamExecuteRequest + * @instance + */ + BeginStreamExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BeginStreamExecuteRequest instance using the specified properties. * @function create - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static - * @param {vschema.IRoutingRule=} [properties] Properties to set - * @returns {vschema.RoutingRule} RoutingRule instance + * @param {query.IBeginStreamExecuteRequest=} [properties] Properties to set + * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest instance */ - RoutingRule.create = function create(properties) { - return new RoutingRule(properties); + BeginStreamExecuteRequest.create = function create(properties) { + return new BeginStreamExecuteRequest(properties); }; /** - * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. + * Encodes the specified BeginStreamExecuteRequest message. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. * @function encode - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static - * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode + * @param {query.IBeginStreamExecuteRequest} message BeginStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingRule.encode = function encode(message, writer) { + BeginStreamExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.from_table != null && Object.hasOwnProperty.call(message, "from_table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_table); - if (message.to_tables != null && message.to_tables.length) - for (var i = 0; i < message.to_tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_tables[i]); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); return writer; }; /** - * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. + * Encodes the specified BeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.BeginStreamExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static - * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode + * @param {query.IBeginStreamExecuteRequest} message BeginStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { + BeginStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RoutingRule message from the specified reader or buffer. + * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.RoutingRule} RoutingRule + * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingRule.decode = function decode(reader, length) { + BeginStreamExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginStreamExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.from_table = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - if (!(message.to_tables && message.to_tables.length)) - message.to_tables = []; - message.to_tables.push(reader.string()); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); + break; + case 7: + message.reserved_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -77183,133 +77106,212 @@ $root.vschema = (function() { }; /** - * Decodes a RoutingRule message from the specified reader or buffer, length delimited. + * Decodes a BeginStreamExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.RoutingRule} RoutingRule + * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingRule.decodeDelimited = function decodeDelimited(reader) { + BeginStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RoutingRule message. + * Verifies a BeginStreamExecuteRequest message. * @function verify - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RoutingRule.verify = function verify(message) { + BeginStreamExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.from_table != null && message.hasOwnProperty("from_table")) - if (!$util.isString(message.from_table)) - return "from_table: string expected"; - if (message.to_tables != null && message.hasOwnProperty("to_tables")) { - if (!Array.isArray(message.to_tables)) - return "to_tables: array expected"; - for (var i = 0; i < message.to_tables.length; ++i) - if (!$util.isString(message.to_tables[i])) - return "to_tables: string[] expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; } + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; return null; }; /** - * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. + * Creates a BeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static * @param {Object.} object Plain object - * @returns {vschema.RoutingRule} RoutingRule + * @returns {query.BeginStreamExecuteRequest} BeginStreamExecuteRequest */ - RoutingRule.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.RoutingRule) + BeginStreamExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginStreamExecuteRequest) return object; - var message = new $root.vschema.RoutingRule(); - if (object.from_table != null) - message.from_table = String(object.from_table); - if (object.to_tables) { - if (!Array.isArray(object.to_tables)) - throw TypeError(".vschema.RoutingRule.to_tables: array expected"); - message.to_tables = []; - for (var i = 0; i < object.to_tables.length; ++i) - message.to_tables[i] = String(object.to_tables[i]); + var message = new $root.query.BeginStreamExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.BeginStreamExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.BeginStreamExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.BeginStreamExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.BeginStreamExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.BeginStreamExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.BeginStreamExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); } + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. + * Creates a plain object from a BeginStreamExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @static - * @param {vschema.RoutingRule} message RoutingRule + * @param {query.BeginStreamExecuteRequest} message BeginStreamExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoutingRule.toObject = function toObject(message, options) { + BeginStreamExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.to_tables = []; - if (options.defaults) - object.from_table = ""; - if (message.from_table != null && message.hasOwnProperty("from_table")) - object.from_table = message.from_table; - if (message.to_tables && message.to_tables.length) { - object.to_tables = []; - for (var j = 0; j < message.to_tables.length; ++j) - object.to_tables[j] = message.to_tables[j]; + object.pre_queries = []; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; } + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; return object; }; /** - * Converts this RoutingRule to JSON. + * Converts this BeginStreamExecuteRequest to JSON. * @function toJSON - * @memberof vschema.RoutingRule + * @memberof query.BeginStreamExecuteRequest * @instance * @returns {Object.} JSON object */ - RoutingRule.prototype.toJSON = function toJSON() { + BeginStreamExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RoutingRule; + return BeginStreamExecuteRequest; })(); - vschema.Keyspace = (function() { + query.BeginStreamExecuteResponse = (function() { /** - * Properties of a Keyspace. - * @memberof vschema - * @interface IKeyspace - * @property {boolean|null} [sharded] Keyspace sharded - * @property {Object.|null} [vindexes] Keyspace vindexes - * @property {Object.|null} [tables] Keyspace tables - * @property {boolean|null} [require_explicit_routing] Keyspace require_explicit_routing + * Properties of a BeginStreamExecuteResponse. + * @memberof query + * @interface IBeginStreamExecuteResponse + * @property {vtrpc.IRPCError|null} [error] BeginStreamExecuteResponse error + * @property {query.IQueryResult|null} [result] BeginStreamExecuteResponse result + * @property {number|Long|null} [transaction_id] BeginStreamExecuteResponse transaction_id + * @property {topodata.ITabletAlias|null} [tablet_alias] BeginStreamExecuteResponse tablet_alias + * @property {string|null} [session_state_changes] BeginStreamExecuteResponse session_state_changes */ /** - * Constructs a new Keyspace. - * @memberof vschema - * @classdesc Represents a Keyspace. - * @implements IKeyspace + * Constructs a new BeginStreamExecuteResponse. + * @memberof query + * @classdesc Represents a BeginStreamExecuteResponse. + * @implements IBeginStreamExecuteResponse * @constructor - * @param {vschema.IKeyspace=} [properties] Properties to set + * @param {query.IBeginStreamExecuteResponse=} [properties] Properties to set */ - function Keyspace(properties) { - this.vindexes = {}; - this.tables = {}; + function BeginStreamExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77317,158 +77319,127 @@ $root.vschema = (function() { } /** - * Keyspace sharded. - * @member {boolean} sharded - * @memberof vschema.Keyspace + * BeginStreamExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.BeginStreamExecuteResponse * @instance */ - Keyspace.prototype.sharded = false; + BeginStreamExecuteResponse.prototype.error = null; /** - * Keyspace vindexes. - * @member {Object.} vindexes - * @memberof vschema.Keyspace + * BeginStreamExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.BeginStreamExecuteResponse * @instance */ - Keyspace.prototype.vindexes = $util.emptyObject; + BeginStreamExecuteResponse.prototype.result = null; /** - * Keyspace tables. - * @member {Object.} tables - * @memberof vschema.Keyspace + * BeginStreamExecuteResponse transaction_id. + * @member {number|Long} transaction_id + * @memberof query.BeginStreamExecuteResponse * @instance */ - Keyspace.prototype.tables = $util.emptyObject; + BeginStreamExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Keyspace require_explicit_routing. - * @member {boolean} require_explicit_routing - * @memberof vschema.Keyspace + * BeginStreamExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.BeginStreamExecuteResponse * @instance */ - Keyspace.prototype.require_explicit_routing = false; + BeginStreamExecuteResponse.prototype.tablet_alias = null; /** - * Creates a new Keyspace instance using the specified properties. + * BeginStreamExecuteResponse session_state_changes. + * @member {string} session_state_changes + * @memberof query.BeginStreamExecuteResponse + * @instance + */ + BeginStreamExecuteResponse.prototype.session_state_changes = ""; + + /** + * Creates a new BeginStreamExecuteResponse instance using the specified properties. * @function create - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static - * @param {vschema.IKeyspace=} [properties] Properties to set - * @returns {vschema.Keyspace} Keyspace instance + * @param {query.IBeginStreamExecuteResponse=} [properties] Properties to set + * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse instance */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); + BeginStreamExecuteResponse.create = function create(properties) { + return new BeginStreamExecuteResponse(properties); }; /** - * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. + * Encodes the specified BeginStreamExecuteResponse message. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. * @function encode - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static - * @param {vschema.IKeyspace} message Keyspace message or plain object to encode + * @param {query.IBeginStreamExecuteResponse} message BeginStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Keyspace.encode = function encode(message, writer) { + BeginStreamExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sharded != null && Object.hasOwnProperty.call(message, "sharded")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharded); - if (message.vindexes != null && Object.hasOwnProperty.call(message, "vindexes")) - for (var keys = Object.keys(message.vindexes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Vindex.encode(message.vindexes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) - for (var keys = Object.keys(message.tables), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Table.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.require_explicit_routing != null && Object.hasOwnProperty.call(message, "require_explicit_routing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.require_explicit_routing); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.session_state_changes); return writer; }; /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. + * Encodes the specified BeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.BeginStreamExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static - * @param {vschema.IKeyspace} message Keyspace message or plain object to encode + * @param {query.IBeginStreamExecuteResponse} message BeginStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { + BeginStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.Keyspace} Keyspace + * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Keyspace.decode = function decode(reader, length) { + BeginStreamExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Keyspace(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginStreamExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sharded = reader.bool(); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); break; case 2: - if (message.vindexes === $util.emptyObject) - message.vindexes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Vindex.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.vindexes[key] = value; + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; case 3: - if (message.tables === $util.emptyObject) - message.tables = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Table.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tables[key] = value; + message.transaction_id = reader.int64(); break; case 4: - message.require_explicit_routing = reader.bool(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 5: + message.session_state_changes = reader.string(); break; default: reader.skipType(tag & 7); @@ -77479,174 +77450,172 @@ $root.vschema = (function() { }; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a BeginStreamExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Keyspace} Keyspace + * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Keyspace.decodeDelimited = function decodeDelimited(reader) { + BeginStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Keyspace message. + * Verifies a BeginStreamExecuteResponse message. * @function verify - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Keyspace.verify = function verify(message) { + BeginStreamExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sharded != null && message.hasOwnProperty("sharded")) - if (typeof message.sharded !== "boolean") - return "sharded: boolean expected"; - if (message.vindexes != null && message.hasOwnProperty("vindexes")) { - if (!$util.isObject(message.vindexes)) - return "vindexes: object expected"; - var key = Object.keys(message.vindexes); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Vindex.verify(message.vindexes[key[i]]); - if (error) - return "vindexes." + error; - } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); + if (error) + return "error." + error; } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!$util.isObject(message.tables)) - return "tables: object expected"; - var key = Object.keys(message.tables); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Table.verify(message.tables[key[i]]); - if (error) - return "tables." + error; - } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; } - if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) - if (typeof message.require_explicit_routing !== "boolean") - return "require_explicit_routing: boolean expected"; + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + if (!$util.isString(message.session_state_changes)) + return "session_state_changes: string expected"; return null; }; /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. + * Creates a BeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static * @param {Object.} object Plain object - * @returns {vschema.Keyspace} Keyspace + * @returns {query.BeginStreamExecuteResponse} BeginStreamExecuteResponse */ - Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Keyspace) + BeginStreamExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.BeginStreamExecuteResponse) return object; - var message = new $root.vschema.Keyspace(); - if (object.sharded != null) - message.sharded = Boolean(object.sharded); - if (object.vindexes) { - if (typeof object.vindexes !== "object") - throw TypeError(".vschema.Keyspace.vindexes: object expected"); - message.vindexes = {}; - for (var keys = Object.keys(object.vindexes), i = 0; i < keys.length; ++i) { - if (typeof object.vindexes[keys[i]] !== "object") - throw TypeError(".vschema.Keyspace.vindexes: object expected"); - message.vindexes[keys[i]] = $root.vschema.Vindex.fromObject(object.vindexes[keys[i]]); - } + var message = new $root.query.BeginStreamExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.BeginStreamExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); } - if (object.tables) { - if (typeof object.tables !== "object") - throw TypeError(".vschema.Keyspace.tables: object expected"); - message.tables = {}; - for (var keys = Object.keys(object.tables), i = 0; i < keys.length; ++i) { - if (typeof object.tables[keys[i]] !== "object") - throw TypeError(".vschema.Keyspace.tables: object expected"); - message.tables[keys[i]] = $root.vschema.Table.fromObject(object.tables[keys[i]]); - } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.BeginStreamExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } - if (object.require_explicit_routing != null) - message.require_explicit_routing = Boolean(object.require_explicit_routing); + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.BeginStreamExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.session_state_changes != null) + message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. + * Creates a plain object from a BeginStreamExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @static - * @param {vschema.Keyspace} message Keyspace + * @param {query.BeginStreamExecuteResponse} message BeginStreamExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Keyspace.toObject = function toObject(message, options) { + BeginStreamExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.vindexes = {}; - object.tables = {}; - } if (options.defaults) { - object.sharded = false; - object.require_explicit_routing = false; - } - if (message.sharded != null && message.hasOwnProperty("sharded")) - object.sharded = message.sharded; - var keys2; - if (message.vindexes && (keys2 = Object.keys(message.vindexes)).length) { - object.vindexes = {}; - for (var j = 0; j < keys2.length; ++j) - object.vindexes[keys2[j]] = $root.vschema.Vindex.toObject(message.vindexes[keys2[j]], options); - } - if (message.tables && (keys2 = Object.keys(message.tables)).length) { - object.tables = {}; - for (var j = 0; j < keys2.length; ++j) - object.tables[keys2[j]] = $root.vschema.Table.toObject(message.tables[keys2[j]], options); + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; + object.session_state_changes = ""; } - if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) - object.require_explicit_routing = message.require_explicit_routing; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this Keyspace to JSON. + * Converts this BeginStreamExecuteResponse to JSON. * @function toJSON - * @memberof vschema.Keyspace + * @memberof query.BeginStreamExecuteResponse * @instance * @returns {Object.} JSON object */ - Keyspace.prototype.toJSON = function toJSON() { + BeginStreamExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Keyspace; + return BeginStreamExecuteResponse; })(); - vschema.Vindex = (function() { + query.MessageStreamRequest = (function() { /** - * Properties of a Vindex. - * @memberof vschema - * @interface IVindex - * @property {string|null} [type] Vindex type - * @property {Object.|null} [params] Vindex params - * @property {string|null} [owner] Vindex owner + * Properties of a MessageStreamRequest. + * @memberof query + * @interface IMessageStreamRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageStreamRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageStreamRequest immediate_caller_id + * @property {query.ITarget|null} [target] MessageStreamRequest target + * @property {string|null} [name] MessageStreamRequest name */ /** - * Constructs a new Vindex. - * @memberof vschema - * @classdesc Represents a Vindex. - * @implements IVindex + * Constructs a new MessageStreamRequest. + * @memberof query + * @classdesc Represents a MessageStreamRequest. + * @implements IMessageStreamRequest * @constructor - * @param {vschema.IVindex=} [properties] Properties to set + * @param {query.IMessageStreamRequest=} [properties] Properties to set */ - function Vindex(properties) { - this.params = {}; + function MessageStreamRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77654,121 +77623,114 @@ $root.vschema = (function() { } /** - * Vindex type. - * @member {string} type - * @memberof vschema.Vindex + * MessageStreamRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.MessageStreamRequest * @instance */ - Vindex.prototype.type = ""; + MessageStreamRequest.prototype.effective_caller_id = null; /** - * Vindex params. - * @member {Object.} params - * @memberof vschema.Vindex + * MessageStreamRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.MessageStreamRequest * @instance */ - Vindex.prototype.params = $util.emptyObject; + MessageStreamRequest.prototype.immediate_caller_id = null; /** - * Vindex owner. - * @member {string} owner - * @memberof vschema.Vindex + * MessageStreamRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.MessageStreamRequest * @instance */ - Vindex.prototype.owner = ""; + MessageStreamRequest.prototype.target = null; /** - * Creates a new Vindex instance using the specified properties. + * MessageStreamRequest name. + * @member {string} name + * @memberof query.MessageStreamRequest + * @instance + */ + MessageStreamRequest.prototype.name = ""; + + /** + * Creates a new MessageStreamRequest instance using the specified properties. * @function create - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static - * @param {vschema.IVindex=} [properties] Properties to set - * @returns {vschema.Vindex} Vindex instance + * @param {query.IMessageStreamRequest=} [properties] Properties to set + * @returns {query.MessageStreamRequest} MessageStreamRequest instance */ - Vindex.create = function create(properties) { - return new Vindex(properties); + MessageStreamRequest.create = function create(properties) { + return new MessageStreamRequest(properties); }; /** - * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. + * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. * @function encode - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static - * @param {vschema.IVindex} message Vindex message or plain object to encode + * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vindex.encode = function encode(message, writer) { + MessageStreamRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. + * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static - * @param {vschema.IVindex} message Vindex message or plain object to encode + * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vindex.encodeDelimited = function encodeDelimited(message, writer) { + MessageStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Vindex message from the specified reader or buffer. + * Decodes a MessageStreamRequest message from the specified reader or buffer. * @function decode - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.Vindex} Vindex + * @returns {query.MessageStreamRequest} MessageStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vindex.decode = function decode(reader, length) { + MessageStreamRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Vindex(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - if (message.params === $util.emptyObject) - message.params = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.params[key] = value; + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.owner = reader.string(); + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -77779,147 +77741,147 @@ $root.vschema = (function() { }; /** - * Decodes a Vindex message from the specified reader or buffer, length delimited. + * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Vindex} Vindex + * @returns {query.MessageStreamRequest} MessageStreamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vindex.decodeDelimited = function decodeDelimited(reader) { + MessageStreamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Vindex message. + * Verifies a MessageStreamRequest message. * @function verify - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Vindex.verify = function verify(message) { + MessageStreamRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Vindex message from a plain object. Also converts values to their respective internal types. + * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static * @param {Object.} object Plain object - * @returns {vschema.Vindex} Vindex + * @returns {query.MessageStreamRequest} MessageStreamRequest */ - Vindex.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Vindex) + MessageStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.MessageStreamRequest) return object; - var message = new $root.vschema.Vindex(); - if (object.type != null) - message.type = String(object.type); - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".vschema.Vindex.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); + var message = new $root.query.MessageStreamRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.MessageStreamRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); } - if (object.owner != null) - message.owner = String(object.owner); + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.MessageStreamRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.MessageStreamRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Vindex message. Also converts values to other types if specified. + * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @static - * @param {vschema.Vindex} message Vindex + * @param {query.MessageStreamRequest} message MessageStreamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Vindex.toObject = function toObject(message, options) { + MessageStreamRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.params = {}; if (options.defaults) { - object.type = ""; - object.owner = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.name = ""; } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Vindex to JSON. + * Converts this MessageStreamRequest to JSON. * @function toJSON - * @memberof vschema.Vindex + * @memberof query.MessageStreamRequest * @instance * @returns {Object.} JSON object */ - Vindex.prototype.toJSON = function toJSON() { + MessageStreamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Vindex; + return MessageStreamRequest; })(); - vschema.Table = (function() { + query.MessageStreamResponse = (function() { /** - * Properties of a Table. - * @memberof vschema - * @interface ITable - * @property {string|null} [type] Table type - * @property {Array.|null} [column_vindexes] Table column_vindexes - * @property {vschema.IAutoIncrement|null} [auto_increment] Table auto_increment - * @property {Array.|null} [columns] Table columns - * @property {string|null} [pinned] Table pinned - * @property {boolean|null} [column_list_authoritative] Table column_list_authoritative - * @property {string|null} [source] Table source + * Properties of a MessageStreamResponse. + * @memberof query + * @interface IMessageStreamResponse + * @property {query.IQueryResult|null} [result] MessageStreamResponse result */ /** - * Constructs a new Table. - * @memberof vschema - * @classdesc Represents a Table. - * @implements ITable + * Constructs a new MessageStreamResponse. + * @memberof query + * @classdesc Represents a MessageStreamResponse. + * @implements IMessageStreamResponse * @constructor - * @param {vschema.ITable=} [properties] Properties to set + * @param {query.IMessageStreamResponse=} [properties] Properties to set */ - function Table(properties) { - this.column_vindexes = []; - this.columns = []; + function MessageStreamResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77927,159 +77889,75 @@ $root.vschema = (function() { } /** - * Table type. - * @member {string} type - * @memberof vschema.Table - * @instance - */ - Table.prototype.type = ""; - - /** - * Table column_vindexes. - * @member {Array.} column_vindexes - * @memberof vschema.Table - * @instance - */ - Table.prototype.column_vindexes = $util.emptyArray; - - /** - * Table auto_increment. - * @member {vschema.IAutoIncrement|null|undefined} auto_increment - * @memberof vschema.Table - * @instance - */ - Table.prototype.auto_increment = null; - - /** - * Table columns. - * @member {Array.} columns - * @memberof vschema.Table - * @instance - */ - Table.prototype.columns = $util.emptyArray; - - /** - * Table pinned. - * @member {string} pinned - * @memberof vschema.Table - * @instance - */ - Table.prototype.pinned = ""; - - /** - * Table column_list_authoritative. - * @member {boolean} column_list_authoritative - * @memberof vschema.Table - * @instance - */ - Table.prototype.column_list_authoritative = false; - - /** - * Table source. - * @member {string} source - * @memberof vschema.Table + * MessageStreamResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.MessageStreamResponse * @instance */ - Table.prototype.source = ""; + MessageStreamResponse.prototype.result = null; /** - * Creates a new Table instance using the specified properties. + * Creates a new MessageStreamResponse instance using the specified properties. * @function create - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static - * @param {vschema.ITable=} [properties] Properties to set - * @returns {vschema.Table} Table instance + * @param {query.IMessageStreamResponse=} [properties] Properties to set + * @returns {query.MessageStreamResponse} MessageStreamResponse instance */ - Table.create = function create(properties) { - return new Table(properties); + MessageStreamResponse.create = function create(properties) { + return new MessageStreamResponse(properties); }; /** - * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. + * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. * @function encode - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static - * @param {vschema.ITable} message Table message or plain object to encode + * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Table.encode = function encode(message, writer) { + MessageStreamResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.column_vindexes != null && message.column_vindexes.length) - for (var i = 0; i < message.column_vindexes.length; ++i) - $root.vschema.ColumnVindex.encode(message.column_vindexes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.auto_increment != null && Object.hasOwnProperty.call(message, "auto_increment")) - $root.vschema.AutoIncrement.encode(message.auto_increment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.vschema.Column.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pinned); - if (message.column_list_authoritative != null && Object.hasOwnProperty.call(message, "column_list_authoritative")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.column_list_authoritative); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.source); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. + * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static - * @param {vschema.ITable} message Table message or plain object to encode + * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Table.encodeDelimited = function encodeDelimited(message, writer) { + MessageStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Table message from the specified reader or buffer. + * Decodes a MessageStreamResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.Table} Table + * @returns {query.MessageStreamResponse} MessageStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Table.decode = function decode(reader, length) { + MessageStreamResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Table(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.column_vindexes && message.column_vindexes.length)) - message.column_vindexes = []; - message.column_vindexes.push($root.vschema.ColumnVindex.decode(reader, reader.uint32())); - break; - case 3: - message.auto_increment = $root.vschema.AutoIncrement.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.vschema.Column.decode(reader, reader.uint32())); - break; - case 5: - message.pinned = reader.string(); - break; - case 6: - message.column_list_authoritative = reader.bool(); - break; - case 7: - message.source = reader.string(); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -78090,200 +77968,117 @@ $root.vschema = (function() { }; /** - * Decodes a Table message from the specified reader or buffer, length delimited. + * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Table} Table + * @returns {query.MessageStreamResponse} MessageStreamResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Table.decodeDelimited = function decodeDelimited(reader) { + MessageStreamResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Table message. + * Verifies a MessageStreamResponse message. * @function verify - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Table.verify = function verify(message) { + MessageStreamResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.column_vindexes != null && message.hasOwnProperty("column_vindexes")) { - if (!Array.isArray(message.column_vindexes)) - return "column_vindexes: array expected"; - for (var i = 0; i < message.column_vindexes.length; ++i) { - var error = $root.vschema.ColumnVindex.verify(message.column_vindexes[i]); - if (error) - return "column_vindexes." + error; - } - } - if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) { - var error = $root.vschema.AutoIncrement.verify(message.auto_increment); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); if (error) - return "auto_increment." + error; - } - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.vschema.Column.verify(message.columns[i]); - if (error) - return "columns." + error; - } + return "result." + error; } - if (message.pinned != null && message.hasOwnProperty("pinned")) - if (!$util.isString(message.pinned)) - return "pinned: string expected"; - if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) - if (typeof message.column_list_authoritative !== "boolean") - return "column_list_authoritative: boolean expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; return null; }; /** - * Creates a Table message from a plain object. Also converts values to their respective internal types. + * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static * @param {Object.} object Plain object - * @returns {vschema.Table} Table + * @returns {query.MessageStreamResponse} MessageStreamResponse */ - Table.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Table) + MessageStreamResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.MessageStreamResponse) return object; - var message = new $root.vschema.Table(); - if (object.type != null) - message.type = String(object.type); - if (object.column_vindexes) { - if (!Array.isArray(object.column_vindexes)) - throw TypeError(".vschema.Table.column_vindexes: array expected"); - message.column_vindexes = []; - for (var i = 0; i < object.column_vindexes.length; ++i) { - if (typeof object.column_vindexes[i] !== "object") - throw TypeError(".vschema.Table.column_vindexes: object expected"); - message.column_vindexes[i] = $root.vschema.ColumnVindex.fromObject(object.column_vindexes[i]); - } - } - if (object.auto_increment != null) { - if (typeof object.auto_increment !== "object") - throw TypeError(".vschema.Table.auto_increment: object expected"); - message.auto_increment = $root.vschema.AutoIncrement.fromObject(object.auto_increment); - } - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".vschema.Table.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".vschema.Table.columns: object expected"); - message.columns[i] = $root.vschema.Column.fromObject(object.columns[i]); - } + var message = new $root.query.MessageStreamResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.MessageStreamResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } - if (object.pinned != null) - message.pinned = String(object.pinned); - if (object.column_list_authoritative != null) - message.column_list_authoritative = Boolean(object.column_list_authoritative); - if (object.source != null) - message.source = String(object.source); return message; }; /** - * Creates a plain object from a Table message. Also converts values to other types if specified. + * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @static - * @param {vschema.Table} message Table + * @param {query.MessageStreamResponse} message MessageStreamResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Table.toObject = function toObject(message, options) { + MessageStreamResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.column_vindexes = []; - object.columns = []; - } - if (options.defaults) { - object.type = ""; - object.auto_increment = null; - object.pinned = ""; - object.column_list_authoritative = false; - object.source = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.column_vindexes && message.column_vindexes.length) { - object.column_vindexes = []; - for (var j = 0; j < message.column_vindexes.length; ++j) - object.column_vindexes[j] = $root.vschema.ColumnVindex.toObject(message.column_vindexes[j], options); - } - if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) - object.auto_increment = $root.vschema.AutoIncrement.toObject(message.auto_increment, options); - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.vschema.Column.toObject(message.columns[j], options); - } - if (message.pinned != null && message.hasOwnProperty("pinned")) - object.pinned = message.pinned; - if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) - object.column_list_authoritative = message.column_list_authoritative; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this Table to JSON. + * Converts this MessageStreamResponse to JSON. * @function toJSON - * @memberof vschema.Table + * @memberof query.MessageStreamResponse * @instance * @returns {Object.} JSON object */ - Table.prototype.toJSON = function toJSON() { + MessageStreamResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Table; + return MessageStreamResponse; })(); - vschema.ColumnVindex = (function() { + query.MessageAckRequest = (function() { /** - * Properties of a ColumnVindex. - * @memberof vschema - * @interface IColumnVindex - * @property {string|null} [column] ColumnVindex column - * @property {string|null} [name] ColumnVindex name - * @property {Array.|null} [columns] ColumnVindex columns + * Properties of a MessageAckRequest. + * @memberof query + * @interface IMessageAckRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageAckRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageAckRequest immediate_caller_id + * @property {query.ITarget|null} [target] MessageAckRequest target + * @property {string|null} [name] MessageAckRequest name + * @property {Array.|null} [ids] MessageAckRequest ids */ /** - * Constructs a new ColumnVindex. - * @memberof vschema - * @classdesc Represents a ColumnVindex. - * @implements IColumnVindex + * Constructs a new MessageAckRequest. + * @memberof query + * @classdesc Represents a MessageAckRequest. + * @implements IMessageAckRequest * @constructor - * @param {vschema.IColumnVindex=} [properties] Properties to set + * @param {query.IMessageAckRequest=} [properties] Properties to set */ - function ColumnVindex(properties) { - this.columns = []; + function MessageAckRequest(properties) { + this.ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78291,104 +78086,130 @@ $root.vschema = (function() { } /** - * ColumnVindex column. - * @member {string} column - * @memberof vschema.ColumnVindex + * MessageAckRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.MessageAckRequest * @instance */ - ColumnVindex.prototype.column = ""; + MessageAckRequest.prototype.effective_caller_id = null; /** - * ColumnVindex name. + * MessageAckRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.MessageAckRequest + * @instance + */ + MessageAckRequest.prototype.immediate_caller_id = null; + + /** + * MessageAckRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.MessageAckRequest + * @instance + */ + MessageAckRequest.prototype.target = null; + + /** + * MessageAckRequest name. * @member {string} name - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @instance */ - ColumnVindex.prototype.name = ""; + MessageAckRequest.prototype.name = ""; /** - * ColumnVindex columns. - * @member {Array.} columns - * @memberof vschema.ColumnVindex + * MessageAckRequest ids. + * @member {Array.} ids + * @memberof query.MessageAckRequest * @instance */ - ColumnVindex.prototype.columns = $util.emptyArray; + MessageAckRequest.prototype.ids = $util.emptyArray; /** - * Creates a new ColumnVindex instance using the specified properties. + * Creates a new MessageAckRequest instance using the specified properties. * @function create - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static - * @param {vschema.IColumnVindex=} [properties] Properties to set - * @returns {vschema.ColumnVindex} ColumnVindex instance + * @param {query.IMessageAckRequest=} [properties] Properties to set + * @returns {query.MessageAckRequest} MessageAckRequest instance */ - ColumnVindex.create = function create(properties) { - return new ColumnVindex(properties); + MessageAckRequest.create = function create(properties) { + return new MessageAckRequest(properties); }; /** - * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. + * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. * @function encode - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static - * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode + * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnVindex.encode = function encode(message, writer) { + MessageAckRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.columns[i]); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + $root.query.Value.encode(message.ids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. + * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static - * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode + * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnVindex.encodeDelimited = function encodeDelimited(message, writer) { + MessageAckRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnVindex message from the specified reader or buffer. + * Decodes a MessageAckRequest message from the specified reader or buffer. * @function decode - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.ColumnVindex} ColumnVindex + * @returns {query.MessageAckRequest} MessageAckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnVindex.decode = function decode(reader, length) { + MessageAckRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ColumnVindex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.column = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.name = reader.string(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push(reader.string()); + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.name = reader.string(); + break; + case 5: + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push($root.query.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -78399,138 +78220,173 @@ $root.vschema = (function() { }; /** - * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. + * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.ColumnVindex} ColumnVindex + * @returns {query.MessageAckRequest} MessageAckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnVindex.decodeDelimited = function decodeDelimited(reader) { + MessageAckRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ColumnVindex message. + * Verifies a MessageAckRequest message. * @function verify - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ColumnVindex.verify = function verify(message) { + MessageAckRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) - if (!$util.isString(message.columns[i])) - return "columns: string[] expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) { + var error = $root.query.Value.verify(message.ids[i]); + if (error) + return "ids." + error; + } } return null; }; /** - * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static * @param {Object.} object Plain object - * @returns {vschema.ColumnVindex} ColumnVindex + * @returns {query.MessageAckRequest} MessageAckRequest */ - ColumnVindex.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.ColumnVindex) + MessageAckRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.MessageAckRequest) return object; - var message = new $root.vschema.ColumnVindex(); - if (object.column != null) - message.column = String(object.column); + var message = new $root.query.MessageAckRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.MessageAckRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.MessageAckRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.MessageAckRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } if (object.name != null) message.name = String(object.name); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".vschema.ColumnVindex.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) - message.columns[i] = String(object.columns[i]); + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".query.MessageAckRequest.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) { + if (typeof object.ids[i] !== "object") + throw TypeError(".query.MessageAckRequest.ids: object expected"); + message.ids[i] = $root.query.Value.fromObject(object.ids[i]); + } } return message; }; /** - * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. + * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @static - * @param {vschema.ColumnVindex} message ColumnVindex + * @param {query.MessageAckRequest} message MessageAckRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnVindex.toObject = function toObject(message, options) { + MessageAckRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.columns = []; + object.ids = []; if (options.defaults) { - object.column = ""; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; object.name = ""; } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = message.columns[j]; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = $root.query.Value.toObject(message.ids[j], options); } return object; }; /** - * Converts this ColumnVindex to JSON. + * Converts this MessageAckRequest to JSON. * @function toJSON - * @memberof vschema.ColumnVindex + * @memberof query.MessageAckRequest * @instance * @returns {Object.} JSON object */ - ColumnVindex.prototype.toJSON = function toJSON() { + MessageAckRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ColumnVindex; + return MessageAckRequest; })(); - vschema.AutoIncrement = (function() { + query.MessageAckResponse = (function() { /** - * Properties of an AutoIncrement. - * @memberof vschema - * @interface IAutoIncrement - * @property {string|null} [column] AutoIncrement column - * @property {string|null} [sequence] AutoIncrement sequence + * Properties of a MessageAckResponse. + * @memberof query + * @interface IMessageAckResponse + * @property {query.IQueryResult|null} [result] MessageAckResponse result */ /** - * Constructs a new AutoIncrement. - * @memberof vschema - * @classdesc Represents an AutoIncrement. - * @implements IAutoIncrement + * Constructs a new MessageAckResponse. + * @memberof query + * @classdesc Represents a MessageAckResponse. + * @implements IMessageAckResponse * @constructor - * @param {vschema.IAutoIncrement=} [properties] Properties to set + * @param {query.IMessageAckResponse=} [properties] Properties to set */ - function AutoIncrement(properties) { + function MessageAckResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78538,88 +78394,75 @@ $root.vschema = (function() { } /** - * AutoIncrement column. - * @member {string} column - * @memberof vschema.AutoIncrement - * @instance - */ - AutoIncrement.prototype.column = ""; - - /** - * AutoIncrement sequence. - * @member {string} sequence - * @memberof vschema.AutoIncrement + * MessageAckResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.MessageAckResponse * @instance */ - AutoIncrement.prototype.sequence = ""; + MessageAckResponse.prototype.result = null; /** - * Creates a new AutoIncrement instance using the specified properties. + * Creates a new MessageAckResponse instance using the specified properties. * @function create - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static - * @param {vschema.IAutoIncrement=} [properties] Properties to set - * @returns {vschema.AutoIncrement} AutoIncrement instance + * @param {query.IMessageAckResponse=} [properties] Properties to set + * @returns {query.MessageAckResponse} MessageAckResponse instance */ - AutoIncrement.create = function create(properties) { - return new AutoIncrement(properties); + MessageAckResponse.create = function create(properties) { + return new MessageAckResponse(properties); }; /** - * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. + * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. * @function encode - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static - * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode + * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoIncrement.encode = function encode(message, writer) { + MessageAckResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sequence); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. + * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static - * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode + * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoIncrement.encodeDelimited = function encodeDelimited(message, writer) { + MessageAckResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutoIncrement message from the specified reader or buffer. + * Decodes a MessageAckResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.AutoIncrement} AutoIncrement + * @returns {query.MessageAckResponse} MessageAckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutoIncrement.decode = function decode(reader, length) { + MessageAckResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.AutoIncrement(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.column = reader.string(); - break; - case 2: - message.sequence = reader.string(); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -78630,117 +78473,119 @@ $root.vschema = (function() { }; /** - * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. + * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.AutoIncrement} AutoIncrement + * @returns {query.MessageAckResponse} MessageAckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutoIncrement.decodeDelimited = function decodeDelimited(reader) { + MessageAckResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutoIncrement message. + * Verifies a MessageAckResponse message. * @function verify - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutoIncrement.verify = function verify(message) { + MessageAckResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isString(message.sequence)) - return "sequence: string expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; + } return null; }; /** - * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static * @param {Object.} object Plain object - * @returns {vschema.AutoIncrement} AutoIncrement + * @returns {query.MessageAckResponse} MessageAckResponse */ - AutoIncrement.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.AutoIncrement) + MessageAckResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.MessageAckResponse) return object; - var message = new $root.vschema.AutoIncrement(); - if (object.column != null) - message.column = String(object.column); - if (object.sequence != null) - message.sequence = String(object.sequence); + var message = new $root.query.MessageAckResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.MessageAckResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); + } return message; }; /** - * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. + * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @static - * @param {vschema.AutoIncrement} message AutoIncrement + * @param {query.MessageAckResponse} message MessageAckResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutoIncrement.toObject = function toObject(message, options) { + MessageAckResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.column = ""; - object.sequence = ""; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.sequence != null && message.hasOwnProperty("sequence")) - object.sequence = message.sequence; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this AutoIncrement to JSON. + * Converts this MessageAckResponse to JSON. * @function toJSON - * @memberof vschema.AutoIncrement + * @memberof query.MessageAckResponse * @instance * @returns {Object.} JSON object */ - AutoIncrement.prototype.toJSON = function toJSON() { + MessageAckResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AutoIncrement; + return MessageAckResponse; })(); - vschema.Column = (function() { + query.ReserveExecuteRequest = (function() { /** - * Properties of a Column. - * @memberof vschema - * @interface IColumn - * @property {string|null} [name] Column name - * @property {query.Type|null} [type] Column type + * Properties of a ReserveExecuteRequest. + * @memberof query + * @interface IReserveExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReserveExecuteRequest target + * @property {query.IBoundQuery|null} [query] ReserveExecuteRequest query + * @property {number|Long|null} [transaction_id] ReserveExecuteRequest transaction_id + * @property {query.IExecuteOptions|null} [options] ReserveExecuteRequest options + * @property {Array.|null} [pre_queries] ReserveExecuteRequest pre_queries */ /** - * Constructs a new Column. - * @memberof vschema - * @classdesc Represents a Column. - * @implements IColumn + * Constructs a new ReserveExecuteRequest. + * @memberof query + * @classdesc Represents a ReserveExecuteRequest. + * @implements IReserveExecuteRequest * @constructor - * @param {vschema.IColumn=} [properties] Properties to set + * @param {query.IReserveExecuteRequest=} [properties] Properties to set */ - function Column(properties) { + function ReserveExecuteRequest(properties) { + this.pre_queries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78748,88 +78593,156 @@ $root.vschema = (function() { } /** - * Column name. - * @member {string} name - * @memberof vschema.Column + * ReserveExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReserveExecuteRequest * @instance */ - Column.prototype.name = ""; + ReserveExecuteRequest.prototype.effective_caller_id = null; /** - * Column type. - * @member {query.Type} type - * @memberof vschema.Column + * ReserveExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReserveExecuteRequest * @instance */ - Column.prototype.type = 0; + ReserveExecuteRequest.prototype.immediate_caller_id = null; /** - * Creates a new Column instance using the specified properties. + * ReserveExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReserveExecuteRequest + * @instance + */ + ReserveExecuteRequest.prototype.target = null; + + /** + * ReserveExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.ReserveExecuteRequest + * @instance + */ + ReserveExecuteRequest.prototype.query = null; + + /** + * ReserveExecuteRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ReserveExecuteRequest + * @instance + */ + ReserveExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReserveExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.ReserveExecuteRequest + * @instance + */ + ReserveExecuteRequest.prototype.options = null; + + /** + * ReserveExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.ReserveExecuteRequest + * @instance + */ + ReserveExecuteRequest.prototype.pre_queries = $util.emptyArray; + + /** + * Creates a new ReserveExecuteRequest instance using the specified properties. * @function create - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static - * @param {vschema.IColumn=} [properties] Properties to set - * @returns {vschema.Column} Column instance + * @param {query.IReserveExecuteRequest=} [properties] Properties to set + * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest instance */ - Column.create = function create(properties) { - return new Column(properties); + ReserveExecuteRequest.create = function create(properties) { + return new ReserveExecuteRequest(properties); }; /** - * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. + * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. * @function encode - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static - * @param {vschema.IColumn} message Column message or plain object to encode + * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encode = function encode(message, writer) { + ReserveExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); return writer; }; /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. + * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static - * @param {vschema.IColumn} message Column message or plain object to encode + * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encodeDelimited = function encodeDelimited(message, writer) { + ReserveExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Column message from the specified reader or buffer. + * Decodes a ReserveExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.Column} Column + * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decode = function decode(reader, length) { + ReserveExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Column(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.type = reader.int32(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.transaction_id = reader.int64(); + break; + case 6: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -78840,297 +78753,211 @@ $root.vschema = (function() { }; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Column} Column + * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decodeDelimited = function decodeDelimited(reader) { + ReserveExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Column message. + * Verifies a ReserveExecuteRequest message. * @function verify - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Column.verify = function verify(message) { + ReserveExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - case 4128: - case 4129: - case 4130: - break; - } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; + } return null; }; /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static * @param {Object.} object Plain object - * @returns {vschema.Column} Column + * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Column) + ReserveExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveExecuteRequest) return object; - var message = new $root.vschema.Column(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - case "HEXNUM": - case 4128: - message.type = 4128; - break; - case "HEXVAL": - case 4129: - message.type = 4129; - break; - case "BITNUM": - case 4130: - message.type = 4130; - break; + var message = new $root.query.ReserveExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReserveExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReserveExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReserveExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.ReserveExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.ReserveExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.ReserveExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); } return message; }; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. + * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @static - * @param {vschema.Column} message Column + * @param {query.ReserveExecuteRequest} message ReserveExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Column.toObject = function toObject(message, options) { + ReserveExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.pre_queries = []; if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "NULL_TYPE" : 0; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + object.options = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; return object; }; /** - * Converts this Column to JSON. + * Converts this ReserveExecuteRequest to JSON. * @function toJSON - * @memberof vschema.Column + * @memberof query.ReserveExecuteRequest * @instance * @returns {Object.} JSON object */ - Column.prototype.toJSON = function toJSON() { + ReserveExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Column; + return ReserveExecuteRequest; })(); - vschema.SrvVSchema = (function() { + query.ReserveExecuteResponse = (function() { /** - * Properties of a SrvVSchema. - * @memberof vschema - * @interface ISrvVSchema - * @property {Object.|null} [keyspaces] SrvVSchema keyspaces - * @property {vschema.IRoutingRules|null} [routing_rules] SrvVSchema routing_rules - * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] SrvVSchema shard_routing_rules + * Properties of a ReserveExecuteResponse. + * @memberof query + * @interface IReserveExecuteResponse + * @property {vtrpc.IRPCError|null} [error] ReserveExecuteResponse error + * @property {query.IQueryResult|null} [result] ReserveExecuteResponse result + * @property {number|Long|null} [reserved_id] ReserveExecuteResponse reserved_id + * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveExecuteResponse tablet_alias */ /** - * Constructs a new SrvVSchema. - * @memberof vschema - * @classdesc Represents a SrvVSchema. - * @implements ISrvVSchema + * Constructs a new ReserveExecuteResponse. + * @memberof query + * @classdesc Represents a ReserveExecuteResponse. + * @implements IReserveExecuteResponse * @constructor - * @param {vschema.ISrvVSchema=} [properties] Properties to set + * @param {query.IReserveExecuteResponse=} [properties] Properties to set */ - function SrvVSchema(properties) { - this.keyspaces = {}; + function ReserveExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79138,123 +78965,114 @@ $root.vschema = (function() { } /** - * SrvVSchema keyspaces. - * @member {Object.} keyspaces - * @memberof vschema.SrvVSchema + * ReserveExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.ReserveExecuteResponse * @instance */ - SrvVSchema.prototype.keyspaces = $util.emptyObject; + ReserveExecuteResponse.prototype.error = null; /** - * SrvVSchema routing_rules. - * @member {vschema.IRoutingRules|null|undefined} routing_rules - * @memberof vschema.SrvVSchema + * ReserveExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.ReserveExecuteResponse * @instance */ - SrvVSchema.prototype.routing_rules = null; + ReserveExecuteResponse.prototype.result = null; /** - * SrvVSchema shard_routing_rules. - * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules - * @memberof vschema.SrvVSchema + * ReserveExecuteResponse reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ReserveExecuteResponse * @instance */ - SrvVSchema.prototype.shard_routing_rules = null; + ReserveExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new SrvVSchema instance using the specified properties. + * ReserveExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.ReserveExecuteResponse + * @instance + */ + ReserveExecuteResponse.prototype.tablet_alias = null; + + /** + * Creates a new ReserveExecuteResponse instance using the specified properties. * @function create - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static - * @param {vschema.ISrvVSchema=} [properties] Properties to set - * @returns {vschema.SrvVSchema} SrvVSchema instance + * @param {query.IReserveExecuteResponse=} [properties] Properties to set + * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse instance */ - SrvVSchema.create = function create(properties) { - return new SrvVSchema(properties); + ReserveExecuteResponse.create = function create(properties) { + return new ReserveExecuteResponse(properties); }; /** - * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. + * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. * @function encode - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static - * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode + * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SrvVSchema.encode = function encode(message, writer) { + ReserveExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspaces != null && Object.hasOwnProperty.call(message, "keyspaces")) - for (var keys = Object.keys(message.keyspaces), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Keyspace.encode(message.keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) - $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) - $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reserved_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. + * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static - * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode + * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SrvVSchema.encodeDelimited = function encodeDelimited(message, writer) { + ReserveExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SrvVSchema message from the specified reader or buffer. + * Decodes a ReserveExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.SrvVSchema} SrvVSchema + * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SrvVSchema.decode = function decode(reader, length) { + ReserveExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.SrvVSchema(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.keyspaces === $util.emptyObject) - message.keyspaces = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.keyspaces[key] = value; + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); break; case 2: - message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; case 3: - message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); + message.reserved_id = reader.int64(); + break; + case 4: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -79265,155 +79083,168 @@ $root.vschema = (function() { }; /** - * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. + * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.SrvVSchema} SrvVSchema + * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SrvVSchema.decodeDelimited = function decodeDelimited(reader) { + ReserveExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SrvVSchema message. + * Verifies a ReserveExecuteResponse message. * @function verify - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SrvVSchema.verify = function verify(message) { + ReserveExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { - if (!$util.isObject(message.keyspaces)) - return "keyspaces: object expected"; - var key = Object.keys(message.keyspaces); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Keyspace.verify(message.keyspaces[key[i]]); - if (error) - return "keyspaces." + error; - } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); + if (error) + return "error." + error; } - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { - var error = $root.vschema.RoutingRules.verify(message.routing_rules); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); if (error) - return "routing_rules." + error; + return "result." + error; } - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { - var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); if (error) - return "shard_routing_rules." + error; + return "tablet_alias." + error; } return null; }; /** - * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static * @param {Object.} object Plain object - * @returns {vschema.SrvVSchema} SrvVSchema + * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse */ - SrvVSchema.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.SrvVSchema) + ReserveExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveExecuteResponse) return object; - var message = new $root.vschema.SrvVSchema(); - if (object.keyspaces) { - if (typeof object.keyspaces !== "object") - throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); - message.keyspaces = {}; - for (var keys = Object.keys(object.keyspaces), i = 0; i < keys.length; ++i) { - if (typeof object.keyspaces[keys[i]] !== "object") - throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); - message.keyspaces[keys[i]] = $root.vschema.Keyspace.fromObject(object.keyspaces[keys[i]]); - } + var message = new $root.query.ReserveExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.ReserveExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); } - if (object.routing_rules != null) { - if (typeof object.routing_rules !== "object") - throw TypeError(".vschema.SrvVSchema.routing_rules: object expected"); - message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.ReserveExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } - if (object.shard_routing_rules != null) { - if (typeof object.shard_routing_rules !== "object") - throw TypeError(".vschema.SrvVSchema.shard_routing_rules: object expected"); - message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.ReserveExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. + * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @static - * @param {vschema.SrvVSchema} message SrvVSchema + * @param {query.ReserveExecuteResponse} message ReserveExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SrvVSchema.toObject = function toObject(message, options) { + ReserveExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.keyspaces = {}; if (options.defaults) { - object.routing_rules = null; - object.shard_routing_rules = null; - } - var keys2; - if (message.keyspaces && (keys2 = Object.keys(message.keyspaces)).length) { - object.keyspaces = {}; - for (var j = 0; j < keys2.length; ++j) - object.keyspaces[keys2[j]] = $root.vschema.Keyspace.toObject(message.keyspaces[keys2[j]], options); + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; } - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) - object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) - object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this SrvVSchema to JSON. + * Converts this ReserveExecuteResponse to JSON. * @function toJSON - * @memberof vschema.SrvVSchema + * @memberof query.ReserveExecuteResponse * @instance * @returns {Object.} JSON object */ - SrvVSchema.prototype.toJSON = function toJSON() { + ReserveExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SrvVSchema; + return ReserveExecuteResponse; })(); - vschema.ShardRoutingRules = (function() { + query.ReserveStreamExecuteRequest = (function() { /** - * Properties of a ShardRoutingRules. - * @memberof vschema - * @interface IShardRoutingRules - * @property {Array.|null} [rules] ShardRoutingRules rules + * Properties of a ReserveStreamExecuteRequest. + * @memberof query + * @interface IReserveStreamExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveStreamExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveStreamExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReserveStreamExecuteRequest target + * @property {query.IBoundQuery|null} [query] ReserveStreamExecuteRequest query + * @property {query.IExecuteOptions|null} [options] ReserveStreamExecuteRequest options + * @property {number|Long|null} [transaction_id] ReserveStreamExecuteRequest transaction_id + * @property {Array.|null} [pre_queries] ReserveStreamExecuteRequest pre_queries */ /** - * Constructs a new ShardRoutingRules. - * @memberof vschema - * @classdesc Represents a ShardRoutingRules. - * @implements IShardRoutingRules + * Constructs a new ReserveStreamExecuteRequest. + * @memberof query + * @classdesc Represents a ReserveStreamExecuteRequest. + * @implements IReserveStreamExecuteRequest * @constructor - * @param {vschema.IShardRoutingRules=} [properties] Properties to set + * @param {query.IReserveStreamExecuteRequest=} [properties] Properties to set */ - function ShardRoutingRules(properties) { - this.rules = []; + function ReserveStreamExecuteRequest(properties) { + this.pre_queries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79421,78 +79252,156 @@ $root.vschema = (function() { } /** - * ShardRoutingRules rules. - * @member {Array.} rules - * @memberof vschema.ShardRoutingRules + * ReserveStreamExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReserveStreamExecuteRequest * @instance */ - ShardRoutingRules.prototype.rules = $util.emptyArray; + ReserveStreamExecuteRequest.prototype.effective_caller_id = null; /** - * Creates a new ShardRoutingRules instance using the specified properties. + * ReserveStreamExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.immediate_caller_id = null; + + /** + * ReserveStreamExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.target = null; + + /** + * ReserveStreamExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.query = null; + + /** + * ReserveStreamExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.options = null; + + /** + * ReserveStreamExecuteRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReserveStreamExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.ReserveStreamExecuteRequest + * @instance + */ + ReserveStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; + + /** + * Creates a new ReserveStreamExecuteRequest instance using the specified properties. * @function create - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static - * @param {vschema.IShardRoutingRules=} [properties] Properties to set - * @returns {vschema.ShardRoutingRules} ShardRoutingRules instance + * @param {query.IReserveStreamExecuteRequest=} [properties] Properties to set + * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest instance */ - ShardRoutingRules.create = function create(properties) { - return new ShardRoutingRules(properties); + ReserveStreamExecuteRequest.create = function create(properties) { + return new ReserveStreamExecuteRequest(properties); }; /** - * Encodes the specified ShardRoutingRules message. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. + * Encodes the specified ReserveStreamExecuteRequest message. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. * @function encode - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static - * @param {vschema.IShardRoutingRules} message ShardRoutingRules message or plain object to encode + * @param {query.IReserveStreamExecuteRequest} message ReserveStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardRoutingRules.encode = function encode(message, writer) { + ReserveStreamExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.vschema.ShardRoutingRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); return writer; }; /** - * Encodes the specified ShardRoutingRules message, length delimited. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. + * Encodes the specified ReserveStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static - * @param {vschema.IShardRoutingRules} message ShardRoutingRules message or plain object to encode + * @param {query.IReserveStreamExecuteRequest} message ReserveStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardRoutingRules.encodeDelimited = function encodeDelimited(message, writer) { + ReserveStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardRoutingRules message from the specified reader or buffer. + * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.ShardRoutingRules} ShardRoutingRules + * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardRoutingRules.decode = function decode(reader, length) { + ReserveStreamExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ShardRoutingRules(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveStreamExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.vschema.ShardRoutingRule.decode(reader, reader.uint32())); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + break; + case 2: + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 6: + message.transaction_id = reader.int64(); + break; + case 7: + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -79503,126 +79412,211 @@ $root.vschema = (function() { }; /** - * Decodes a ShardRoutingRules message from the specified reader or buffer, length delimited. + * Decodes a ReserveStreamExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.ShardRoutingRules} ShardRoutingRules + * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardRoutingRules.decodeDelimited = function decodeDelimited(reader) { + ReserveStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardRoutingRules message. + * Verifies a ReserveStreamExecuteRequest message. * @function verify - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardRoutingRules.verify = function verify(message) { + ReserveStreamExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.vschema.ShardRoutingRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; } return null; }; /** - * Creates a ShardRoutingRules message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static * @param {Object.} object Plain object - * @returns {vschema.ShardRoutingRules} ShardRoutingRules + * @returns {query.ReserveStreamExecuteRequest} ReserveStreamExecuteRequest */ - ShardRoutingRules.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.ShardRoutingRules) + ReserveStreamExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveStreamExecuteRequest) return object; - var message = new $root.vschema.ShardRoutingRules(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".vschema.ShardRoutingRules.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".vschema.ShardRoutingRules.rules: object expected"); - message.rules[i] = $root.vschema.ShardRoutingRule.fromObject(object.rules[i]); - } + var message = new $root.query.ReserveStreamExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReserveStreamExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReserveStreamExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReserveStreamExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.ReserveStreamExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.ReserveStreamExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.ReserveStreamExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); } return message; }; /** - * Creates a plain object from a ShardRoutingRules message. Also converts values to other types if specified. + * Creates a plain object from a ReserveStreamExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @static - * @param {vschema.ShardRoutingRules} message ShardRoutingRules + * @param {query.ReserveStreamExecuteRequest} message ReserveStreamExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardRoutingRules.toObject = function toObject(message, options) { + ReserveStreamExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.vschema.ShardRoutingRule.toObject(message.rules[j], options); + object.pre_queries = []; + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; } return object; }; /** - * Converts this ShardRoutingRules to JSON. + * Converts this ReserveStreamExecuteRequest to JSON. * @function toJSON - * @memberof vschema.ShardRoutingRules + * @memberof query.ReserveStreamExecuteRequest * @instance * @returns {Object.} JSON object */ - ShardRoutingRules.prototype.toJSON = function toJSON() { + ReserveStreamExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardRoutingRules; + return ReserveStreamExecuteRequest; })(); - vschema.ShardRoutingRule = (function() { + query.ReserveStreamExecuteResponse = (function() { /** - * Properties of a ShardRoutingRule. - * @memberof vschema - * @interface IShardRoutingRule - * @property {string|null} [from_keyspace] ShardRoutingRule from_keyspace - * @property {string|null} [to_keyspace] ShardRoutingRule to_keyspace - * @property {string|null} [shard] ShardRoutingRule shard + * Properties of a ReserveStreamExecuteResponse. + * @memberof query + * @interface IReserveStreamExecuteResponse + * @property {vtrpc.IRPCError|null} [error] ReserveStreamExecuteResponse error + * @property {query.IQueryResult|null} [result] ReserveStreamExecuteResponse result + * @property {number|Long|null} [reserved_id] ReserveStreamExecuteResponse reserved_id + * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveStreamExecuteResponse tablet_alias */ /** - * Constructs a new ShardRoutingRule. - * @memberof vschema - * @classdesc Represents a ShardRoutingRule. - * @implements IShardRoutingRule + * Constructs a new ReserveStreamExecuteResponse. + * @memberof query + * @classdesc Represents a ReserveStreamExecuteResponse. + * @implements IReserveStreamExecuteResponse * @constructor - * @param {vschema.IShardRoutingRule=} [properties] Properties to set + * @param {query.IReserveStreamExecuteResponse=} [properties] Properties to set */ - function ShardRoutingRule(properties) { + function ReserveStreamExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79630,101 +79624,114 @@ $root.vschema = (function() { } /** - * ShardRoutingRule from_keyspace. - * @member {string} from_keyspace - * @memberof vschema.ShardRoutingRule + * ReserveStreamExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.ReserveStreamExecuteResponse * @instance */ - ShardRoutingRule.prototype.from_keyspace = ""; + ReserveStreamExecuteResponse.prototype.error = null; /** - * ShardRoutingRule to_keyspace. - * @member {string} to_keyspace - * @memberof vschema.ShardRoutingRule + * ReserveStreamExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.ReserveStreamExecuteResponse * @instance */ - ShardRoutingRule.prototype.to_keyspace = ""; + ReserveStreamExecuteResponse.prototype.result = null; /** - * ShardRoutingRule shard. - * @member {string} shard - * @memberof vschema.ShardRoutingRule + * ReserveStreamExecuteResponse reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ReserveStreamExecuteResponse * @instance */ - ShardRoutingRule.prototype.shard = ""; + ReserveStreamExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ShardRoutingRule instance using the specified properties. + * ReserveStreamExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.ReserveStreamExecuteResponse + * @instance + */ + ReserveStreamExecuteResponse.prototype.tablet_alias = null; + + /** + * Creates a new ReserveStreamExecuteResponse instance using the specified properties. * @function create - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static - * @param {vschema.IShardRoutingRule=} [properties] Properties to set - * @returns {vschema.ShardRoutingRule} ShardRoutingRule instance + * @param {query.IReserveStreamExecuteResponse=} [properties] Properties to set + * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse instance */ - ShardRoutingRule.create = function create(properties) { - return new ShardRoutingRule(properties); + ReserveStreamExecuteResponse.create = function create(properties) { + return new ReserveStreamExecuteResponse(properties); }; /** - * Encodes the specified ShardRoutingRule message. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. + * Encodes the specified ReserveStreamExecuteResponse message. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. * @function encode - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static - * @param {vschema.IShardRoutingRule} message ShardRoutingRule message or plain object to encode + * @param {query.IReserveStreamExecuteResponse} message ReserveStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardRoutingRule.encode = function encode(message, writer) { + ReserveStreamExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.from_keyspace != null && Object.hasOwnProperty.call(message, "from_keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_keyspace); - if (message.to_keyspace != null && Object.hasOwnProperty.call(message, "to_keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reserved_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ShardRoutingRule message, length delimited. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. + * Encodes the specified ReserveStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveStreamExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static - * @param {vschema.IShardRoutingRule} message ShardRoutingRule message or plain object to encode + * @param {query.IReserveStreamExecuteResponse} message ReserveStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardRoutingRule.encodeDelimited = function encodeDelimited(message, writer) { + ReserveStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardRoutingRule message from the specified reader or buffer. + * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vschema.ShardRoutingRule} ShardRoutingRule + * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardRoutingRule.decode = function decode(reader, length) { + ReserveStreamExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ShardRoutingRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveStreamExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.from_keyspace = reader.string(); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); break; case 2: - message.to_keyspace = reader.string(); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; case 3: - message.shard = reader.string(); + message.reserved_id = reader.int64(); + break; + case 4: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -79735,138 +79742,169 @@ $root.vschema = (function() { }; /** - * Decodes a ShardRoutingRule message from the specified reader or buffer, length delimited. + * Decodes a ReserveStreamExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.ShardRoutingRule} ShardRoutingRule + * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardRoutingRule.decodeDelimited = function decodeDelimited(reader) { + ReserveStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardRoutingRule message. + * Verifies a ReserveStreamExecuteResponse message. * @function verify - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardRoutingRule.verify = function verify(message) { + ReserveStreamExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.from_keyspace != null && message.hasOwnProperty("from_keyspace")) - if (!$util.isString(message.from_keyspace)) - return "from_keyspace: string expected"; - if (message.to_keyspace != null && message.hasOwnProperty("to_keyspace")) - if (!$util.isString(message.to_keyspace)) - return "to_keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); + if (error) + return "error." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; + } + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a ShardRoutingRule message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static * @param {Object.} object Plain object - * @returns {vschema.ShardRoutingRule} ShardRoutingRule + * @returns {query.ReserveStreamExecuteResponse} ReserveStreamExecuteResponse */ - ShardRoutingRule.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.ShardRoutingRule) + ReserveStreamExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveStreamExecuteResponse) return object; - var message = new $root.vschema.ShardRoutingRule(); - if (object.from_keyspace != null) - message.from_keyspace = String(object.from_keyspace); - if (object.to_keyspace != null) - message.to_keyspace = String(object.to_keyspace); - if (object.shard != null) - message.shard = String(object.shard); + var message = new $root.query.ReserveStreamExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.ReserveStreamExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.ReserveStreamExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); + } + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.ReserveStreamExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } return message; }; /** - * Creates a plain object from a ShardRoutingRule message. Also converts values to other types if specified. + * Creates a plain object from a ReserveStreamExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @static - * @param {vschema.ShardRoutingRule} message ShardRoutingRule + * @param {query.ReserveStreamExecuteResponse} message ReserveStreamExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardRoutingRule.toObject = function toObject(message, options) { + ReserveStreamExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.from_keyspace = ""; - object.to_keyspace = ""; - object.shard = ""; + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; } - if (message.from_keyspace != null && message.hasOwnProperty("from_keyspace")) - object.from_keyspace = message.from_keyspace; - if (message.to_keyspace != null && message.hasOwnProperty("to_keyspace")) - object.to_keyspace = message.to_keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ShardRoutingRule to JSON. + * Converts this ReserveStreamExecuteResponse to JSON. * @function toJSON - * @memberof vschema.ShardRoutingRule + * @memberof query.ReserveStreamExecuteResponse * @instance * @returns {Object.} JSON object */ - ShardRoutingRule.prototype.toJSON = function toJSON() { + ReserveStreamExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardRoutingRule; + return ReserveStreamExecuteResponse; })(); - return vschema; -})(); - -$root.vtctldata = (function() { - - /** - * Namespace vtctldata. - * @exports vtctldata - * @namespace - */ - var vtctldata = {}; - - vtctldata.ExecuteVtctlCommandRequest = (function() { + query.ReserveBeginExecuteRequest = (function() { /** - * Properties of an ExecuteVtctlCommandRequest. - * @memberof vtctldata - * @interface IExecuteVtctlCommandRequest - * @property {Array.|null} [args] ExecuteVtctlCommandRequest args - * @property {number|Long|null} [action_timeout] ExecuteVtctlCommandRequest action_timeout + * Properties of a ReserveBeginExecuteRequest. + * @memberof query + * @interface IReserveBeginExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveBeginExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveBeginExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReserveBeginExecuteRequest target + * @property {query.IBoundQuery|null} [query] ReserveBeginExecuteRequest query + * @property {query.IExecuteOptions|null} [options] ReserveBeginExecuteRequest options + * @property {Array.|null} [pre_queries] ReserveBeginExecuteRequest pre_queries + * @property {Array.|null} [post_begin_queries] ReserveBeginExecuteRequest post_begin_queries */ /** - * Constructs a new ExecuteVtctlCommandRequest. - * @memberof vtctldata - * @classdesc Represents an ExecuteVtctlCommandRequest. - * @implements IExecuteVtctlCommandRequest + * Constructs a new ReserveBeginExecuteRequest. + * @memberof query + * @classdesc Represents a ReserveBeginExecuteRequest. + * @implements IReserveBeginExecuteRequest * @constructor - * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set + * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set */ - function ExecuteVtctlCommandRequest(properties) { - this.args = []; + function ReserveBeginExecuteRequest(properties) { + this.pre_queries = []; + this.post_begin_queries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79874,91 +79912,159 @@ $root.vtctldata = (function() { } /** - * ExecuteVtctlCommandRequest args. - * @member {Array.} args - * @memberof vtctldata.ExecuteVtctlCommandRequest + * ReserveBeginExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReserveBeginExecuteRequest * @instance */ - ExecuteVtctlCommandRequest.prototype.args = $util.emptyArray; + ReserveBeginExecuteRequest.prototype.effective_caller_id = null; /** - * ExecuteVtctlCommandRequest action_timeout. - * @member {number|Long} action_timeout - * @memberof vtctldata.ExecuteVtctlCommandRequest + * ReserveBeginExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReserveBeginExecuteRequest * @instance */ - ExecuteVtctlCommandRequest.prototype.action_timeout = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ReserveBeginExecuteRequest.prototype.immediate_caller_id = null; /** - * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. + * ReserveBeginExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReserveBeginExecuteRequest + * @instance + */ + ReserveBeginExecuteRequest.prototype.target = null; + + /** + * ReserveBeginExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.ReserveBeginExecuteRequest + * @instance + */ + ReserveBeginExecuteRequest.prototype.query = null; + + /** + * ReserveBeginExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.ReserveBeginExecuteRequest + * @instance + */ + ReserveBeginExecuteRequest.prototype.options = null; + + /** + * ReserveBeginExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.ReserveBeginExecuteRequest + * @instance + */ + ReserveBeginExecuteRequest.prototype.pre_queries = $util.emptyArray; + + /** + * ReserveBeginExecuteRequest post_begin_queries. + * @member {Array.} post_begin_queries + * @memberof query.ReserveBeginExecuteRequest + * @instance + */ + ReserveBeginExecuteRequest.prototype.post_begin_queries = $util.emptyArray; + + /** + * Creates a new ReserveBeginExecuteRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static - * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest instance + * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set + * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest instance */ - ExecuteVtctlCommandRequest.create = function create(properties) { - return new ExecuteVtctlCommandRequest(properties); + ReserveBeginExecuteRequest.create = function create(properties) { + return new ReserveBeginExecuteRequest(properties); }; /** - * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. + * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static - * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode + * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteVtctlCommandRequest.encode = function encode(message, writer) { + ReserveBeginExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.args[i]); - if (message.action_timeout != null && Object.hasOwnProperty.call(message, "action_timeout")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.action_timeout); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); + if (message.post_begin_queries != null && message.post_begin_queries.length) + for (var i = 0; i < message.post_begin_queries.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.post_begin_queries[i]); return writer; }; /** - * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. + * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static - * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode + * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteVtctlCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReserveBeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. + * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest + * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteVtctlCommandRequest.decode = function decode(reader, length) { + ReserveBeginExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.action_timeout = reader.int64(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); + break; + case 7: + if (!(message.post_begin_queries && message.post_begin_queries.length)) + message.post_begin_queries = []; + message.post_begin_queries.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -79969,142 +80075,212 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest + * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteVtctlCommandRequest.decodeDelimited = function decodeDelimited(reader) { + ReserveBeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteVtctlCommandRequest message. + * Verifies a ReserveBeginExecuteRequest message. * @function verify - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteVtctlCommandRequest.verify = function verify(message) { + ReserveBeginExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; + } + if (message.post_begin_queries != null && message.hasOwnProperty("post_begin_queries")) { + if (!Array.isArray(message.post_begin_queries)) + return "post_begin_queries: array expected"; + for (var i = 0; i < message.post_begin_queries.length; ++i) + if (!$util.isString(message.post_begin_queries[i])) + return "post_begin_queries: string[] expected"; } - if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) - if (!$util.isInteger(message.action_timeout) && !(message.action_timeout && $util.isInteger(message.action_timeout.low) && $util.isInteger(message.action_timeout.high))) - return "action_timeout: integer|Long expected"; return null; }; /** - * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest + * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest */ - ExecuteVtctlCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteVtctlCommandRequest) + ReserveBeginExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveBeginExecuteRequest) return object; - var message = new $root.vtctldata.ExecuteVtctlCommandRequest(); - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".vtctldata.ExecuteVtctlCommandRequest.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); + var message = new $root.query.ReserveBeginExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReserveBeginExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReserveBeginExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReserveBeginExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.ReserveBeginExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.ReserveBeginExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.ReserveBeginExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); + } + if (object.post_begin_queries) { + if (!Array.isArray(object.post_begin_queries)) + throw TypeError(".query.ReserveBeginExecuteRequest.post_begin_queries: array expected"); + message.post_begin_queries = []; + for (var i = 0; i < object.post_begin_queries.length; ++i) + message.post_begin_queries[i] = String(object.post_begin_queries[i]); } - if (object.action_timeout != null) - if ($util.Long) - (message.action_timeout = $util.Long.fromValue(object.action_timeout)).unsigned = false; - else if (typeof object.action_timeout === "string") - message.action_timeout = parseInt(object.action_timeout, 10); - else if (typeof object.action_timeout === "number") - message.action_timeout = object.action_timeout; - else if (typeof object.action_timeout === "object") - message.action_timeout = new $util.LongBits(object.action_timeout.low >>> 0, object.action_timeout.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @static - * @param {vtctldata.ExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest + * @param {query.ReserveBeginExecuteRequest} message ReserveBeginExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteVtctlCommandRequest.toObject = function toObject(message, options) { + ReserveBeginExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.args = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.action_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.action_timeout = options.longs === String ? "0" : 0; - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; + if (options.arrays || options.defaults) { + object.pre_queries = []; + object.post_begin_queries = []; + } + if (options.defaults) { + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; + } + if (message.post_begin_queries && message.post_begin_queries.length) { + object.post_begin_queries = []; + for (var j = 0; j < message.post_begin_queries.length; ++j) + object.post_begin_queries[j] = message.post_begin_queries[j]; } - if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) - if (typeof message.action_timeout === "number") - object.action_timeout = options.longs === String ? String(message.action_timeout) : message.action_timeout; - else - object.action_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.action_timeout) : options.longs === Number ? new $util.LongBits(message.action_timeout.low >>> 0, message.action_timeout.high >>> 0).toNumber() : message.action_timeout; return object; }; /** - * Converts this ExecuteVtctlCommandRequest to JSON. + * Converts this ReserveBeginExecuteRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteVtctlCommandRequest + * @memberof query.ReserveBeginExecuteRequest * @instance * @returns {Object.} JSON object */ - ExecuteVtctlCommandRequest.prototype.toJSON = function toJSON() { + ReserveBeginExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteVtctlCommandRequest; + return ReserveBeginExecuteRequest; })(); - vtctldata.ExecuteVtctlCommandResponse = (function() { + query.ReserveBeginExecuteResponse = (function() { /** - * Properties of an ExecuteVtctlCommandResponse. - * @memberof vtctldata - * @interface IExecuteVtctlCommandResponse - * @property {logutil.IEvent|null} [event] ExecuteVtctlCommandResponse event + * Properties of a ReserveBeginExecuteResponse. + * @memberof query + * @interface IReserveBeginExecuteResponse + * @property {vtrpc.IRPCError|null} [error] ReserveBeginExecuteResponse error + * @property {query.IQueryResult|null} [result] ReserveBeginExecuteResponse result + * @property {number|Long|null} [transaction_id] ReserveBeginExecuteResponse transaction_id + * @property {number|Long|null} [reserved_id] ReserveBeginExecuteResponse reserved_id + * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveBeginExecuteResponse tablet_alias + * @property {string|null} [session_state_changes] ReserveBeginExecuteResponse session_state_changes */ /** - * Constructs a new ExecuteVtctlCommandResponse. - * @memberof vtctldata - * @classdesc Represents an ExecuteVtctlCommandResponse. - * @implements IExecuteVtctlCommandResponse + * Constructs a new ReserveBeginExecuteResponse. + * @memberof query + * @classdesc Represents a ReserveBeginExecuteResponse. + * @implements IReserveBeginExecuteResponse * @constructor - * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set + * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set */ - function ExecuteVtctlCommandResponse(properties) { + function ReserveBeginExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80112,75 +80288,140 @@ $root.vtctldata = (function() { } /** - * ExecuteVtctlCommandResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof vtctldata.ExecuteVtctlCommandResponse + * ReserveBeginExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.ReserveBeginExecuteResponse * @instance */ - ExecuteVtctlCommandResponse.prototype.event = null; + ReserveBeginExecuteResponse.prototype.error = null; /** - * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. + * ReserveBeginExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.ReserveBeginExecuteResponse + * @instance + */ + ReserveBeginExecuteResponse.prototype.result = null; + + /** + * ReserveBeginExecuteResponse transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ReserveBeginExecuteResponse + * @instance + */ + ReserveBeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReserveBeginExecuteResponse reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ReserveBeginExecuteResponse + * @instance + */ + ReserveBeginExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReserveBeginExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.ReserveBeginExecuteResponse + * @instance + */ + ReserveBeginExecuteResponse.prototype.tablet_alias = null; + + /** + * ReserveBeginExecuteResponse session_state_changes. + * @member {string} session_state_changes + * @memberof query.ReserveBeginExecuteResponse + * @instance + */ + ReserveBeginExecuteResponse.prototype.session_state_changes = ""; + + /** + * Creates a new ReserveBeginExecuteResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static - * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse instance + * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set + * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse instance */ - ExecuteVtctlCommandResponse.create = function create(properties) { - return new ExecuteVtctlCommandResponse(properties); + ReserveBeginExecuteResponse.create = function create(properties) { + return new ReserveBeginExecuteResponse(properties); }; /** - * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. + * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static - * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode + * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteVtctlCommandResponse.encode = function encode(message, writer) { + ReserveBeginExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.reserved_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.session_state_changes); return writer; }; /** - * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. + * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static - * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode + * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteVtctlCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReserveBeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. + * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse + * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteVtctlCommandResponse.decode = function decode(reader, length) { + ReserveBeginExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); + break; + case 2: + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + break; + case 3: + message.transaction_id = reader.int64(); + break; + case 4: + message.reserved_id = reader.int64(); + break; + case 5: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 6: + message.session_state_changes = reader.string(); break; default: reader.skipType(tag & 7); @@ -80191,130 +80432,199 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse + * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteVtctlCommandResponse.decodeDelimited = function decodeDelimited(reader) { + ReserveBeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteVtctlCommandResponse message. + * Verifies a ReserveBeginExecuteResponse message. * @function verify - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteVtctlCommandResponse.verify = function verify(message) { + ReserveBeginExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); if (error) - return "event." + error; + return "error." + error; } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; + } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + if (!$util.isString(message.session_state_changes)) + return "session_state_changes: string expected"; return null; }; /** - * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse + * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse */ - ExecuteVtctlCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteVtctlCommandResponse) + ReserveBeginExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveBeginExecuteResponse) return object; - var message = new $root.vtctldata.ExecuteVtctlCommandResponse(); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".vtctldata.ExecuteVtctlCommandResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); + var message = new $root.query.ReserveBeginExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.ReserveBeginExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.ReserveBeginExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.ReserveBeginExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.session_state_changes != null) + message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @static - * @param {vtctldata.ExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse + * @param {query.ReserveBeginExecuteResponse} message ReserveBeginExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteVtctlCommandResponse.toObject = function toObject(message, options) { + ReserveBeginExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.event = null; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); + if (options.defaults) { + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; + object.session_state_changes = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this ExecuteVtctlCommandResponse to JSON. + * Converts this ReserveBeginExecuteResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteVtctlCommandResponse + * @memberof query.ReserveBeginExecuteResponse * @instance * @returns {Object.} JSON object */ - ExecuteVtctlCommandResponse.prototype.toJSON = function toJSON() { + ReserveBeginExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteVtctlCommandResponse; - })(); - - /** - * MaterializationIntent enum. - * @name vtctldata.MaterializationIntent - * @enum {number} - * @property {number} CUSTOM=0 CUSTOM value - * @property {number} MOVETABLES=1 MOVETABLES value - * @property {number} CREATELOOKUPINDEX=2 CREATELOOKUPINDEX value - */ - vtctldata.MaterializationIntent = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM"] = 0; - values[valuesById[1] = "MOVETABLES"] = 1; - values[valuesById[2] = "CREATELOOKUPINDEX"] = 2; - return values; + return ReserveBeginExecuteResponse; })(); - vtctldata.TableMaterializeSettings = (function() { + query.ReserveBeginStreamExecuteRequest = (function() { /** - * Properties of a TableMaterializeSettings. - * @memberof vtctldata - * @interface ITableMaterializeSettings - * @property {string|null} [target_table] TableMaterializeSettings target_table - * @property {string|null} [source_expression] TableMaterializeSettings source_expression - * @property {string|null} [create_ddl] TableMaterializeSettings create_ddl + * Properties of a ReserveBeginStreamExecuteRequest. + * @memberof query + * @interface IReserveBeginStreamExecuteRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveBeginStreamExecuteRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveBeginStreamExecuteRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReserveBeginStreamExecuteRequest target + * @property {query.IBoundQuery|null} [query] ReserveBeginStreamExecuteRequest query + * @property {query.IExecuteOptions|null} [options] ReserveBeginStreamExecuteRequest options + * @property {Array.|null} [pre_queries] ReserveBeginStreamExecuteRequest pre_queries + * @property {Array.|null} [post_begin_queries] ReserveBeginStreamExecuteRequest post_begin_queries */ /** - * Constructs a new TableMaterializeSettings. - * @memberof vtctldata - * @classdesc Represents a TableMaterializeSettings. - * @implements ITableMaterializeSettings + * Constructs a new ReserveBeginStreamExecuteRequest. + * @memberof query + * @classdesc Represents a ReserveBeginStreamExecuteRequest. + * @implements IReserveBeginStreamExecuteRequest * @constructor - * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set + * @param {query.IReserveBeginStreamExecuteRequest=} [properties] Properties to set */ - function TableMaterializeSettings(properties) { + function ReserveBeginStreamExecuteRequest(properties) { + this.pre_queries = []; + this.post_begin_queries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80322,101 +80632,159 @@ $root.vtctldata = (function() { } /** - * TableMaterializeSettings target_table. - * @member {string} target_table - * @memberof vtctldata.TableMaterializeSettings + * ReserveBeginStreamExecuteRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReserveBeginStreamExecuteRequest * @instance */ - TableMaterializeSettings.prototype.target_table = ""; + ReserveBeginStreamExecuteRequest.prototype.effective_caller_id = null; /** - * TableMaterializeSettings source_expression. - * @member {string} source_expression - * @memberof vtctldata.TableMaterializeSettings + * ReserveBeginStreamExecuteRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReserveBeginStreamExecuteRequest * @instance */ - TableMaterializeSettings.prototype.source_expression = ""; + ReserveBeginStreamExecuteRequest.prototype.immediate_caller_id = null; /** - * TableMaterializeSettings create_ddl. - * @member {string} create_ddl - * @memberof vtctldata.TableMaterializeSettings + * ReserveBeginStreamExecuteRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReserveBeginStreamExecuteRequest * @instance */ - TableMaterializeSettings.prototype.create_ddl = ""; + ReserveBeginStreamExecuteRequest.prototype.target = null; /** - * Creates a new TableMaterializeSettings instance using the specified properties. + * ReserveBeginStreamExecuteRequest query. + * @member {query.IBoundQuery|null|undefined} query + * @memberof query.ReserveBeginStreamExecuteRequest + * @instance + */ + ReserveBeginStreamExecuteRequest.prototype.query = null; + + /** + * ReserveBeginStreamExecuteRequest options. + * @member {query.IExecuteOptions|null|undefined} options + * @memberof query.ReserveBeginStreamExecuteRequest + * @instance + */ + ReserveBeginStreamExecuteRequest.prototype.options = null; + + /** + * ReserveBeginStreamExecuteRequest pre_queries. + * @member {Array.} pre_queries + * @memberof query.ReserveBeginStreamExecuteRequest + * @instance + */ + ReserveBeginStreamExecuteRequest.prototype.pre_queries = $util.emptyArray; + + /** + * ReserveBeginStreamExecuteRequest post_begin_queries. + * @member {Array.} post_begin_queries + * @memberof query.ReserveBeginStreamExecuteRequest + * @instance + */ + ReserveBeginStreamExecuteRequest.prototype.post_begin_queries = $util.emptyArray; + + /** + * Creates a new ReserveBeginStreamExecuteRequest instance using the specified properties. * @function create - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static - * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings instance + * @param {query.IReserveBeginStreamExecuteRequest=} [properties] Properties to set + * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest instance */ - TableMaterializeSettings.create = function create(properties) { - return new TableMaterializeSettings(properties); + ReserveBeginStreamExecuteRequest.create = function create(properties) { + return new ReserveBeginStreamExecuteRequest(properties); }; /** - * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. + * Encodes the specified ReserveBeginStreamExecuteRequest message. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static - * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode + * @param {query.IReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableMaterializeSettings.encode = function encode(message, writer) { + ReserveBeginStreamExecuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.target_table != null && Object.hasOwnProperty.call(message, "target_table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.target_table); - if (message.source_expression != null && Object.hasOwnProperty.call(message, "source_expression")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_expression); - if (message.create_ddl != null && Object.hasOwnProperty.call(message, "create_ddl")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.create_ddl); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pre_queries != null && message.pre_queries.length) + for (var i = 0; i < message.pre_queries.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); + if (message.post_begin_queries != null && message.post_begin_queries.length) + for (var i = 0; i < message.post_begin_queries.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.post_begin_queries[i]); return writer; }; /** - * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. + * Encodes the specified ReserveBeginStreamExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static - * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode + * @param {query.IReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableMaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { + ReserveBeginStreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer. + * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings + * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableMaterializeSettings.decode = function decode(reader, length) { + ReserveBeginStreamExecuteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TableMaterializeSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginStreamExecuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.target_table = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.source_expression = reader.string(); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); break; case 3: - message.create_ddl = reader.string(); + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); + break; + case 5: + message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.pre_queries && message.pre_queries.length)) + message.pre_queries = []; + message.pre_queries.push(reader.string()); + break; + case 7: + if (!(message.post_begin_queries && message.post_begin_queries.length)) + message.post_begin_queries = []; + message.post_begin_queries.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -80427,139 +80795,212 @@ $root.vtctldata = (function() { }; /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginStreamExecuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings + * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableMaterializeSettings.decodeDelimited = function decodeDelimited(reader) { + ReserveBeginStreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TableMaterializeSettings message. + * Verifies a ReserveBeginStreamExecuteRequest message. * @function verify - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TableMaterializeSettings.verify = function verify(message) { + ReserveBeginStreamExecuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target_table != null && message.hasOwnProperty("target_table")) - if (!$util.isString(message.target_table)) - return "target_table: string expected"; - if (message.source_expression != null && message.hasOwnProperty("source_expression")) - if (!$util.isString(message.source_expression)) - return "source_expression: string expected"; - if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) - if (!$util.isString(message.create_ddl)) - return "create_ddl: string expected"; - return null; - }; - - /** - * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings - */ - TableMaterializeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TableMaterializeSettings) - return object; - var message = new $root.vtctldata.TableMaterializeSettings(); - if (object.target_table != null) - message.target_table = String(object.target_table); - if (object.source_expression != null) - message.source_expression = String(object.source_expression); - if (object.create_ddl != null) - message.create_ddl = String(object.create_ddl); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); + if (error) + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.query != null && message.hasOwnProperty("query")) { + var error = $root.query.BoundQuery.verify(message.query); + if (error) + return "query." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.query.ExecuteOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { + if (!Array.isArray(message.pre_queries)) + return "pre_queries: array expected"; + for (var i = 0; i < message.pre_queries.length; ++i) + if (!$util.isString(message.pre_queries[i])) + return "pre_queries: string[] expected"; + } + if (message.post_begin_queries != null && message.hasOwnProperty("post_begin_queries")) { + if (!Array.isArray(message.post_begin_queries)) + return "post_begin_queries: array expected"; + for (var i = 0; i < message.post_begin_queries.length; ++i) + if (!$util.isString(message.post_begin_queries[i])) + return "post_begin_queries: string[] expected"; + } + return null; + }; + + /** + * Creates a ReserveBeginStreamExecuteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ReserveBeginStreamExecuteRequest + * @static + * @param {Object.} object Plain object + * @returns {query.ReserveBeginStreamExecuteRequest} ReserveBeginStreamExecuteRequest + */ + ReserveBeginStreamExecuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveBeginStreamExecuteRequest) + return object; + var message = new $root.query.ReserveBeginStreamExecuteRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteRequest.query: object expected"); + message.query = $root.query.BoundQuery.fromObject(object.query); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteRequest.options: object expected"); + message.options = $root.query.ExecuteOptions.fromObject(object.options); + } + if (object.pre_queries) { + if (!Array.isArray(object.pre_queries)) + throw TypeError(".query.ReserveBeginStreamExecuteRequest.pre_queries: array expected"); + message.pre_queries = []; + for (var i = 0; i < object.pre_queries.length; ++i) + message.pre_queries[i] = String(object.pre_queries[i]); + } + if (object.post_begin_queries) { + if (!Array.isArray(object.post_begin_queries)) + throw TypeError(".query.ReserveBeginStreamExecuteRequest.post_begin_queries: array expected"); + message.post_begin_queries = []; + for (var i = 0; i < object.post_begin_queries.length; ++i) + message.post_begin_queries[i] = String(object.post_begin_queries[i]); + } return message; }; /** - * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. + * Creates a plain object from a ReserveBeginStreamExecuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @static - * @param {vtctldata.TableMaterializeSettings} message TableMaterializeSettings + * @param {query.ReserveBeginStreamExecuteRequest} message ReserveBeginStreamExecuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TableMaterializeSettings.toObject = function toObject(message, options) { + ReserveBeginStreamExecuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pre_queries = []; + object.post_begin_queries = []; + } if (options.defaults) { - object.target_table = ""; - object.source_expression = ""; - object.create_ddl = ""; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + object.query = null; + object.options = null; + } + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = $root.query.BoundQuery.toObject(message.query, options); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.query.ExecuteOptions.toObject(message.options, options); + if (message.pre_queries && message.pre_queries.length) { + object.pre_queries = []; + for (var j = 0; j < message.pre_queries.length; ++j) + object.pre_queries[j] = message.pre_queries[j]; + } + if (message.post_begin_queries && message.post_begin_queries.length) { + object.post_begin_queries = []; + for (var j = 0; j < message.post_begin_queries.length; ++j) + object.post_begin_queries[j] = message.post_begin_queries[j]; } - if (message.target_table != null && message.hasOwnProperty("target_table")) - object.target_table = message.target_table; - if (message.source_expression != null && message.hasOwnProperty("source_expression")) - object.source_expression = message.source_expression; - if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) - object.create_ddl = message.create_ddl; return object; }; /** - * Converts this TableMaterializeSettings to JSON. + * Converts this ReserveBeginStreamExecuteRequest to JSON. * @function toJSON - * @memberof vtctldata.TableMaterializeSettings + * @memberof query.ReserveBeginStreamExecuteRequest * @instance * @returns {Object.} JSON object */ - TableMaterializeSettings.prototype.toJSON = function toJSON() { + ReserveBeginStreamExecuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TableMaterializeSettings; + return ReserveBeginStreamExecuteRequest; })(); - vtctldata.MaterializeSettings = (function() { + query.ReserveBeginStreamExecuteResponse = (function() { /** - * Properties of a MaterializeSettings. - * @memberof vtctldata - * @interface IMaterializeSettings - * @property {string|null} [workflow] MaterializeSettings workflow - * @property {string|null} [source_keyspace] MaterializeSettings source_keyspace - * @property {string|null} [target_keyspace] MaterializeSettings target_keyspace - * @property {boolean|null} [stop_after_copy] MaterializeSettings stop_after_copy - * @property {Array.|null} [table_settings] MaterializeSettings table_settings - * @property {string|null} [cell] MaterializeSettings cell - * @property {string|null} [tablet_types] MaterializeSettings tablet_types - * @property {string|null} [external_cluster] MaterializeSettings external_cluster - * @property {vtctldata.MaterializationIntent|null} [materialization_intent] MaterializeSettings materialization_intent - * @property {string|null} [source_time_zone] MaterializeSettings source_time_zone - * @property {string|null} [target_time_zone] MaterializeSettings target_time_zone - * @property {Array.|null} [source_shards] MaterializeSettings source_shards - * @property {string|null} [on_ddl] MaterializeSettings on_ddl - * @property {boolean|null} [defer_secondary_keys] MaterializeSettings defer_secondary_keys + * Properties of a ReserveBeginStreamExecuteResponse. + * @memberof query + * @interface IReserveBeginStreamExecuteResponse + * @property {vtrpc.IRPCError|null} [error] ReserveBeginStreamExecuteResponse error + * @property {query.IQueryResult|null} [result] ReserveBeginStreamExecuteResponse result + * @property {number|Long|null} [transaction_id] ReserveBeginStreamExecuteResponse transaction_id + * @property {number|Long|null} [reserved_id] ReserveBeginStreamExecuteResponse reserved_id + * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveBeginStreamExecuteResponse tablet_alias + * @property {string|null} [session_state_changes] ReserveBeginStreamExecuteResponse session_state_changes */ /** - * Constructs a new MaterializeSettings. - * @memberof vtctldata - * @classdesc Represents a MaterializeSettings. - * @implements IMaterializeSettings + * Constructs a new ReserveBeginStreamExecuteResponse. + * @memberof query + * @classdesc Represents a ReserveBeginStreamExecuteResponse. + * @implements IReserveBeginStreamExecuteResponse * @constructor - * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set + * @param {query.IReserveBeginStreamExecuteResponse=} [properties] Properties to set */ - function MaterializeSettings(properties) { - this.table_settings = []; - this.source_shards = []; + function ReserveBeginStreamExecuteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80567,250 +81008,140 @@ $root.vtctldata = (function() { } /** - * MaterializeSettings workflow. - * @member {string} workflow - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.workflow = ""; - - /** - * MaterializeSettings source_keyspace. - * @member {string} source_keyspace - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.source_keyspace = ""; - - /** - * MaterializeSettings target_keyspace. - * @member {string} target_keyspace - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.target_keyspace = ""; - - /** - * MaterializeSettings stop_after_copy. - * @member {boolean} stop_after_copy - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.stop_after_copy = false; - - /** - * MaterializeSettings table_settings. - * @member {Array.} table_settings - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.table_settings = $util.emptyArray; - - /** - * MaterializeSettings cell. - * @member {string} cell - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.cell = ""; - - /** - * MaterializeSettings tablet_types. - * @member {string} tablet_types - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.tablet_types = ""; - - /** - * MaterializeSettings external_cluster. - * @member {string} external_cluster - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.external_cluster = ""; - - /** - * MaterializeSettings materialization_intent. - * @member {vtctldata.MaterializationIntent} materialization_intent - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse error. + * @member {vtrpc.IRPCError|null|undefined} error + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.materialization_intent = 0; + ReserveBeginStreamExecuteResponse.prototype.error = null; /** - * MaterializeSettings source_time_zone. - * @member {string} source_time_zone - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.source_time_zone = ""; + ReserveBeginStreamExecuteResponse.prototype.result = null; /** - * MaterializeSettings target_time_zone. - * @member {string} target_time_zone - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.target_time_zone = ""; + ReserveBeginStreamExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MaterializeSettings source_shards. - * @member {Array.} source_shards - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.source_shards = $util.emptyArray; + ReserveBeginStreamExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MaterializeSettings on_ddl. - * @member {string} on_ddl - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.on_ddl = ""; + ReserveBeginStreamExecuteResponse.prototype.tablet_alias = null; /** - * MaterializeSettings defer_secondary_keys. - * @member {boolean} defer_secondary_keys - * @memberof vtctldata.MaterializeSettings + * ReserveBeginStreamExecuteResponse session_state_changes. + * @member {string} session_state_changes + * @memberof query.ReserveBeginStreamExecuteResponse * @instance */ - MaterializeSettings.prototype.defer_secondary_keys = false; + ReserveBeginStreamExecuteResponse.prototype.session_state_changes = ""; /** - * Creates a new MaterializeSettings instance using the specified properties. + * Creates a new ReserveBeginStreamExecuteResponse instance using the specified properties. * @function create - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static - * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set - * @returns {vtctldata.MaterializeSettings} MaterializeSettings instance + * @param {query.IReserveBeginStreamExecuteResponse=} [properties] Properties to set + * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse instance */ - MaterializeSettings.create = function create(properties) { - return new MaterializeSettings(properties); + ReserveBeginStreamExecuteResponse.create = function create(properties) { + return new ReserveBeginStreamExecuteResponse(properties); }; /** - * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. + * Encodes the specified ReserveBeginStreamExecuteResponse message. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static - * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode + * @param {query.IReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaterializeSettings.encode = function encode(message, writer) { + ReserveBeginStreamExecuteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.workflow); - if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_keyspace); - if (message.target_keyspace != null && Object.hasOwnProperty.call(message, "target_keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target_keyspace); - if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.stop_after_copy); - if (message.table_settings != null && message.table_settings.length) - for (var i = 0; i < message.table_settings.length; ++i) - $root.vtctldata.TableMaterializeSettings.encode(message.table_settings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.cell); - if (message.tablet_types != null && Object.hasOwnProperty.call(message, "tablet_types")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablet_types); - if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_cluster); - if (message.materialization_intent != null && Object.hasOwnProperty.call(message, "materialization_intent")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.materialization_intent); - if (message.source_time_zone != null && Object.hasOwnProperty.call(message, "source_time_zone")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.source_time_zone); - if (message.target_time_zone != null && Object.hasOwnProperty.call(message, "target_time_zone")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.target_time_zone); - if (message.source_shards != null && message.source_shards.length) - for (var i = 0; i < message.source_shards.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.source_shards[i]); - if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.on_ddl); - if (message.defer_secondary_keys != null && Object.hasOwnProperty.call(message, "defer_secondary_keys")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.defer_secondary_keys); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.reserved_id); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.session_state_changes != null && Object.hasOwnProperty.call(message, "session_state_changes")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.session_state_changes); return writer; }; /** - * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. + * Encodes the specified ReserveBeginStreamExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginStreamExecuteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static - * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode + * @param {query.IReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { + ReserveBeginStreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MaterializeSettings message from the specified reader or buffer. + * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.MaterializeSettings} MaterializeSettings + * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaterializeSettings.decode = function decode(reader, length) { + ReserveBeginStreamExecuteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.MaterializeSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginStreamExecuteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.workflow = reader.string(); + message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); break; case 2: - message.source_keyspace = reader.string(); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; case 3: - message.target_keyspace = reader.string(); + message.transaction_id = reader.int64(); break; case 4: - message.stop_after_copy = reader.bool(); + message.reserved_id = reader.int64(); break; case 5: - if (!(message.table_settings && message.table_settings.length)) - message.table_settings = []; - message.table_settings.push($root.vtctldata.TableMaterializeSettings.decode(reader, reader.uint32())); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 6: - message.cell = reader.string(); - break; - case 7: - message.tablet_types = reader.string(); - break; - case 8: - message.external_cluster = reader.string(); - break; - case 9: - message.materialization_intent = reader.int32(); - break; - case 10: - message.source_time_zone = reader.string(); - break; - case 11: - message.target_time_zone = reader.string(); - break; - case 12: - if (!(message.source_shards && message.source_shards.length)) - message.source_shards = []; - message.source_shards.push(reader.string()); - break; - case 13: - message.on_ddl = reader.string(); - break; - case 14: - message.defer_secondary_keys = reader.bool(); + message.session_state_changes = reader.string(); break; default: reader.skipType(tag & 7); @@ -80821,262 +81152,195 @@ $root.vtctldata = (function() { }; /** - * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. + * Decodes a ReserveBeginStreamExecuteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.MaterializeSettings} MaterializeSettings + * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaterializeSettings.decodeDelimited = function decodeDelimited(reader) { + ReserveBeginStreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MaterializeSettings message. + * Verifies a ReserveBeginStreamExecuteResponse message. * @function verify - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MaterializeSettings.verify = function verify(message) { + ReserveBeginStreamExecuteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workflow != null && message.hasOwnProperty("workflow")) - if (!$util.isString(message.workflow)) - return "workflow: string expected"; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - if (!$util.isString(message.source_keyspace)) - return "source_keyspace: string expected"; - if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) - if (!$util.isString(message.target_keyspace)) - return "target_keyspace: string expected"; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - if (typeof message.stop_after_copy !== "boolean") - return "stop_after_copy: boolean expected"; - if (message.table_settings != null && message.hasOwnProperty("table_settings")) { - if (!Array.isArray(message.table_settings)) - return "table_settings: array expected"; - for (var i = 0; i < message.table_settings.length; ++i) { - var error = $root.vtctldata.TableMaterializeSettings.verify(message.table_settings[i]); - if (error) - return "table_settings." + error; - } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.vtrpc.RPCError.verify(message.error); + if (error) + return "error." + error; } - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) - if (!$util.isString(message.tablet_types)) - return "tablet_types: string expected"; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - if (!$util.isString(message.external_cluster)) - return "external_cluster: string expected"; - if (message.materialization_intent != null && message.hasOwnProperty("materialization_intent")) - switch (message.materialization_intent) { - default: - return "materialization_intent: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) - if (!$util.isString(message.source_time_zone)) - return "source_time_zone: string expected"; - if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) - if (!$util.isString(message.target_time_zone)) - return "target_time_zone: string expected"; - if (message.source_shards != null && message.hasOwnProperty("source_shards")) { - if (!Array.isArray(message.source_shards)) - return "source_shards: array expected"; - for (var i = 0; i < message.source_shards.length; ++i) - if (!$util.isString(message.source_shards[i])) - return "source_shards: string[] expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; } - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - if (!$util.isString(message.on_ddl)) - return "on_ddl: string expected"; - if (message.defer_secondary_keys != null && message.hasOwnProperty("defer_secondary_keys")) - if (typeof message.defer_secondary_keys !== "boolean") - return "defer_secondary_keys: boolean expected"; - return null; - }; - - /** - * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.MaterializeSettings - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.MaterializeSettings} MaterializeSettings - */ - MaterializeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.MaterializeSettings) + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + if (!$util.isString(message.session_state_changes)) + return "session_state_changes: string expected"; + return null; + }; + + /** + * Creates a ReserveBeginStreamExecuteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ReserveBeginStreamExecuteResponse + * @static + * @param {Object.} object Plain object + * @returns {query.ReserveBeginStreamExecuteResponse} ReserveBeginStreamExecuteResponse + */ + ReserveBeginStreamExecuteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReserveBeginStreamExecuteResponse) return object; - var message = new $root.vtctldata.MaterializeSettings(); - if (object.workflow != null) - message.workflow = String(object.workflow); - if (object.source_keyspace != null) - message.source_keyspace = String(object.source_keyspace); - if (object.target_keyspace != null) - message.target_keyspace = String(object.target_keyspace); - if (object.stop_after_copy != null) - message.stop_after_copy = Boolean(object.stop_after_copy); - if (object.table_settings) { - if (!Array.isArray(object.table_settings)) - throw TypeError(".vtctldata.MaterializeSettings.table_settings: array expected"); - message.table_settings = []; - for (var i = 0; i < object.table_settings.length; ++i) { - if (typeof object.table_settings[i] !== "object") - throw TypeError(".vtctldata.MaterializeSettings.table_settings: object expected"); - message.table_settings[i] = $root.vtctldata.TableMaterializeSettings.fromObject(object.table_settings[i]); - } + var message = new $root.query.ReserveBeginStreamExecuteResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteResponse.error: object expected"); + message.error = $root.vtrpc.RPCError.fromObject(object.error); } - if (object.cell != null) - message.cell = String(object.cell); - if (object.tablet_types != null) - message.tablet_types = String(object.tablet_types); - if (object.external_cluster != null) - message.external_cluster = String(object.external_cluster); - switch (object.materialization_intent) { - case "CUSTOM": - case 0: - message.materialization_intent = 0; - break; - case "MOVETABLES": - case 1: - message.materialization_intent = 1; - break; - case "CREATELOOKUPINDEX": - case 2: - message.materialization_intent = 2; - break; + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } - if (object.source_time_zone != null) - message.source_time_zone = String(object.source_time_zone); - if (object.target_time_zone != null) - message.target_time_zone = String(object.target_time_zone); - if (object.source_shards) { - if (!Array.isArray(object.source_shards)) - throw TypeError(".vtctldata.MaterializeSettings.source_shards: array expected"); - message.source_shards = []; - for (var i = 0; i < object.source_shards.length; ++i) - message.source_shards[i] = String(object.source_shards[i]); + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.ReserveBeginStreamExecuteResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.on_ddl != null) - message.on_ddl = String(object.on_ddl); - if (object.defer_secondary_keys != null) - message.defer_secondary_keys = Boolean(object.defer_secondary_keys); + if (object.session_state_changes != null) + message.session_state_changes = String(object.session_state_changes); return message; }; /** - * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. + * Creates a plain object from a ReserveBeginStreamExecuteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @static - * @param {vtctldata.MaterializeSettings} message MaterializeSettings + * @param {query.ReserveBeginStreamExecuteResponse} message ReserveBeginStreamExecuteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaterializeSettings.toObject = function toObject(message, options) { + ReserveBeginStreamExecuteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.table_settings = []; - object.source_shards = []; - } if (options.defaults) { - object.workflow = ""; - object.source_keyspace = ""; - object.target_keyspace = ""; - object.stop_after_copy = false; - object.cell = ""; - object.tablet_types = ""; - object.external_cluster = ""; - object.materialization_intent = options.enums === String ? "CUSTOM" : 0; - object.source_time_zone = ""; - object.target_time_zone = ""; - object.on_ddl = ""; - object.defer_secondary_keys = false; - } - if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = message.workflow; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - object.source_keyspace = message.source_keyspace; - if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) - object.target_keyspace = message.target_keyspace; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - object.stop_after_copy = message.stop_after_copy; - if (message.table_settings && message.table_settings.length) { - object.table_settings = []; - for (var j = 0; j < message.table_settings.length; ++j) - object.table_settings[j] = $root.vtctldata.TableMaterializeSettings.toObject(message.table_settings[j], options); - } - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) - object.tablet_types = message.tablet_types; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - object.external_cluster = message.external_cluster; - if (message.materialization_intent != null && message.hasOwnProperty("materialization_intent")) - object.materialization_intent = options.enums === String ? $root.vtctldata.MaterializationIntent[message.materialization_intent] : message.materialization_intent; - if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) - object.source_time_zone = message.source_time_zone; - if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) - object.target_time_zone = message.target_time_zone; - if (message.source_shards && message.source_shards.length) { - object.source_shards = []; - for (var j = 0; j < message.source_shards.length; ++j) - object.source_shards[j] = message.source_shards[j]; + object.error = null; + object.result = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; + object.tablet_alias = null; + object.session_state_changes = ""; } - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - object.on_ddl = message.on_ddl; - if (message.defer_secondary_keys != null && message.hasOwnProperty("defer_secondary_keys")) - object.defer_secondary_keys = message.defer_secondary_keys; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.vtrpc.RPCError.toObject(message.error, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.session_state_changes != null && message.hasOwnProperty("session_state_changes")) + object.session_state_changes = message.session_state_changes; return object; }; /** - * Converts this MaterializeSettings to JSON. + * Converts this ReserveBeginStreamExecuteResponse to JSON. * @function toJSON - * @memberof vtctldata.MaterializeSettings + * @memberof query.ReserveBeginStreamExecuteResponse * @instance * @returns {Object.} JSON object */ - MaterializeSettings.prototype.toJSON = function toJSON() { + ReserveBeginStreamExecuteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MaterializeSettings; + return ReserveBeginStreamExecuteResponse; })(); - vtctldata.Keyspace = (function() { + query.ReleaseRequest = (function() { /** - * Properties of a Keyspace. - * @memberof vtctldata - * @interface IKeyspace - * @property {string|null} [name] Keyspace name - * @property {topodata.IKeyspace|null} [keyspace] Keyspace keyspace + * Properties of a ReleaseRequest. + * @memberof query + * @interface IReleaseRequest + * @property {vtrpc.ICallerID|null} [effective_caller_id] ReleaseRequest effective_caller_id + * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReleaseRequest immediate_caller_id + * @property {query.ITarget|null} [target] ReleaseRequest target + * @property {number|Long|null} [transaction_id] ReleaseRequest transaction_id + * @property {number|Long|null} [reserved_id] ReleaseRequest reserved_id */ /** - * Constructs a new Keyspace. - * @memberof vtctldata - * @classdesc Represents a Keyspace. - * @implements IKeyspace + * Constructs a new ReleaseRequest. + * @memberof query + * @classdesc Represents a ReleaseRequest. + * @implements IReleaseRequest * @constructor - * @param {vtctldata.IKeyspace=} [properties] Properties to set + * @param {query.IReleaseRequest=} [properties] Properties to set */ - function Keyspace(properties) { + function ReleaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81084,88 +81348,127 @@ $root.vtctldata = (function() { } /** - * Keyspace name. - * @member {string} name - * @memberof vtctldata.Keyspace + * ReleaseRequest effective_caller_id. + * @member {vtrpc.ICallerID|null|undefined} effective_caller_id + * @memberof query.ReleaseRequest * @instance */ - Keyspace.prototype.name = ""; + ReleaseRequest.prototype.effective_caller_id = null; /** - * Keyspace keyspace. - * @member {topodata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.Keyspace + * ReleaseRequest immediate_caller_id. + * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id + * @memberof query.ReleaseRequest * @instance */ - Keyspace.prototype.keyspace = null; + ReleaseRequest.prototype.immediate_caller_id = null; /** - * Creates a new Keyspace instance using the specified properties. + * ReleaseRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.ReleaseRequest + * @instance + */ + ReleaseRequest.prototype.target = null; + + /** + * ReleaseRequest transaction_id. + * @member {number|Long} transaction_id + * @memberof query.ReleaseRequest + * @instance + */ + ReleaseRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReleaseRequest reserved_id. + * @member {number|Long} reserved_id + * @memberof query.ReleaseRequest + * @instance + */ + ReleaseRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ReleaseRequest instance using the specified properties. * @function create - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static - * @param {vtctldata.IKeyspace=} [properties] Properties to set - * @returns {vtctldata.Keyspace} Keyspace instance + * @param {query.IReleaseRequest=} [properties] Properties to set + * @returns {query.ReleaseRequest} ReleaseRequest instance */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); + ReleaseRequest.create = function create(properties) { + return new ReleaseRequest(properties); }; /** - * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. + * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static - * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode + * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Keyspace.encode = function encode(message, writer) { + ReleaseRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) + $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) + $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); + if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.reserved_id); return writer; }; /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. + * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static - * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode + * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { + ReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a ReleaseRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Keyspace} Keyspace + * @returns {query.ReleaseRequest} ReleaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Keyspace.decode = function decode(reader, length) { + ReleaseRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Keyspace(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; case 2: - message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); + message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 4: + message.transaction_id = reader.int64(); + break; + case 5: + message.reserved_id = reader.int64(); break; default: reader.skipType(tag & 7); @@ -81176,123 +81479,182 @@ $root.vtctldata = (function() { }; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Keyspace} Keyspace + * @returns {query.ReleaseRequest} ReleaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Keyspace.decodeDelimited = function decodeDelimited(reader) { + ReleaseRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Keyspace message. + * Verifies a ReleaseRequest message. * @function verify - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Keyspace.verify = function verify(message) { + ReleaseRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.topodata.Keyspace.verify(message.keyspace); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); if (error) - return "keyspace." + error; + return "effective_caller_id." + error; + } + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { + var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); + if (error) + return "immediate_caller_id." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; } + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) + return "transaction_id: integer|Long expected"; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) + return "reserved_id: integer|Long expected"; return null; }; /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. + * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.Keyspace} Keyspace + * @returns {query.ReleaseRequest} ReleaseRequest */ - Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Keyspace) + ReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReleaseRequest) return object; - var message = new $root.vtctldata.Keyspace(); - if (object.name != null) - message.name = String(object.name); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.Keyspace.keyspace: object expected"); - message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); + var message = new $root.query.ReleaseRequest(); + if (object.effective_caller_id != null) { + if (typeof object.effective_caller_id !== "object") + throw TypeError(".query.ReleaseRequest.effective_caller_id: object expected"); + message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); + } + if (object.immediate_caller_id != null) { + if (typeof object.immediate_caller_id !== "object") + throw TypeError(".query.ReleaseRequest.immediate_caller_id: object expected"); + message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.ReleaseRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.transaction_id != null) + if ($util.Long) + (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; + else if (typeof object.transaction_id === "string") + message.transaction_id = parseInt(object.transaction_id, 10); + else if (typeof object.transaction_id === "number") + message.transaction_id = object.transaction_id; + else if (typeof object.transaction_id === "object") + message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); + if (object.reserved_id != null) + if ($util.Long) + (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; + else if (typeof object.reserved_id === "string") + message.reserved_id = parseInt(object.reserved_id, 10); + else if (typeof object.reserved_id === "number") + message.reserved_id = object.reserved_id; + else if (typeof object.reserved_id === "object") + message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. + * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @static - * @param {vtctldata.Keyspace} message Keyspace + * @param {query.ReleaseRequest} message ReleaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Keyspace.toObject = function toObject(message, options) { + ReleaseRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.keyspace = null; + object.effective_caller_id = null; + object.immediate_caller_id = null; + object.target = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transaction_id = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reserved_id = options.longs === String ? "0" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); + if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) + object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); + if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) + object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) + if (typeof message.transaction_id === "number") + object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; + else + object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; + if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) + if (typeof message.reserved_id === "number") + object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; + else + object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; return object; }; /** - * Converts this Keyspace to JSON. + * Converts this ReleaseRequest to JSON. * @function toJSON - * @memberof vtctldata.Keyspace + * @memberof query.ReleaseRequest * @instance * @returns {Object.} JSON object */ - Keyspace.prototype.toJSON = function toJSON() { + ReleaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Keyspace; + return ReleaseRequest; })(); - vtctldata.Shard = (function() { + query.ReleaseResponse = (function() { /** - * Properties of a Shard. - * @memberof vtctldata - * @interface IShard - * @property {string|null} [keyspace] Shard keyspace - * @property {string|null} [name] Shard name - * @property {topodata.IShard|null} [shard] Shard shard + * Properties of a ReleaseResponse. + * @memberof query + * @interface IReleaseResponse */ /** - * Constructs a new Shard. - * @memberof vtctldata - * @classdesc Represents a Shard. - * @implements IShard + * Constructs a new ReleaseResponse. + * @memberof query + * @classdesc Represents a ReleaseResponse. + * @implements IReleaseResponse * @constructor - * @param {vtctldata.IShard=} [properties] Properties to set + * @param {query.IReleaseResponse=} [properties] Properties to set */ - function Shard(properties) { + function ReleaseResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81300,102 +81662,223 @@ $root.vtctldata = (function() { } /** - * Shard keyspace. - * @member {string} keyspace - * @memberof vtctldata.Shard - * @instance - */ - Shard.prototype.keyspace = ""; - + * Creates a new ReleaseResponse instance using the specified properties. + * @function create + * @memberof query.ReleaseResponse + * @static + * @param {query.IReleaseResponse=} [properties] Properties to set + * @returns {query.ReleaseResponse} ReleaseResponse instance + */ + ReleaseResponse.create = function create(properties) { + return new ReleaseResponse(properties); + }; + /** - * Shard name. - * @member {string} name - * @memberof vtctldata.Shard - * @instance + * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * @function encode + * @memberof query.ReleaseResponse + * @static + * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Shard.prototype.name = ""; + ReleaseResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Shard shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.Shard + * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.ReleaseResponse + * @static + * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseResponse message from the specified reader or buffer. + * @function decode + * @memberof query.ReleaseResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.ReleaseResponse} ReleaseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.ReleaseResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.ReleaseResponse} ReleaseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseResponse message. + * @function verify + * @memberof query.ReleaseResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.ReleaseResponse + * @static + * @param {Object.} object Plain object + * @returns {query.ReleaseResponse} ReleaseResponse + */ + ReleaseResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.ReleaseResponse) + return object; + return new $root.query.ReleaseResponse(); + }; + + /** + * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.ReleaseResponse + * @static + * @param {query.ReleaseResponse} message ReleaseResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReleaseResponse to JSON. + * @function toJSON + * @memberof query.ReleaseResponse * @instance + * @returns {Object.} JSON object */ - Shard.prototype.shard = null; + ReleaseResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReleaseResponse; + })(); + + query.StreamHealthRequest = (function() { /** - * Creates a new Shard instance using the specified properties. + * Properties of a StreamHealthRequest. + * @memberof query + * @interface IStreamHealthRequest + */ + + /** + * Constructs a new StreamHealthRequest. + * @memberof query + * @classdesc Represents a StreamHealthRequest. + * @implements IStreamHealthRequest + * @constructor + * @param {query.IStreamHealthRequest=} [properties] Properties to set + */ + function StreamHealthRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new StreamHealthRequest instance using the specified properties. * @function create - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static - * @param {vtctldata.IShard=} [properties] Properties to set - * @returns {vtctldata.Shard} Shard instance + * @param {query.IStreamHealthRequest=} [properties] Properties to set + * @returns {query.StreamHealthRequest} StreamHealthRequest instance */ - Shard.create = function create(properties) { - return new Shard(properties); + StreamHealthRequest.create = function create(properties) { + return new StreamHealthRequest(properties); }; /** - * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. + * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static - * @param {vtctldata.IShard} message Shard message or plain object to encode + * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Shard.encode = function encode(message, writer) { + StreamHealthRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. + * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static - * @param {vtctldata.IShard} message Shard message or plain object to encode + * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Shard.encodeDelimited = function encodeDelimited(message, writer) { + StreamHealthRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Shard message from the specified reader or buffer. + * Decodes a StreamHealthRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Shard} Shard + * @returns {query.StreamHealthRequest} StreamHealthRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Shard.decode = function decode(reader, length) { + StreamHealthRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Shard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -81405,136 +81888,103 @@ $root.vtctldata = (function() { }; /** - * Decodes a Shard message from the specified reader or buffer, length delimited. + * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Shard} Shard + * @returns {query.StreamHealthRequest} StreamHealthRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Shard.decodeDelimited = function decodeDelimited(reader) { + StreamHealthRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Shard message. + * Verifies a StreamHealthRequest message. * @function verify - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Shard.verify = function verify(message) { + StreamHealthRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } return null; }; /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. + * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.Shard} Shard + * @returns {query.StreamHealthRequest} StreamHealthRequest */ - Shard.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Shard) + StreamHealthRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamHealthRequest) return object; - var message = new $root.vtctldata.Shard(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.name != null) - message.name = String(object.name); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.Shard.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); - } - return message; + return new $root.query.StreamHealthRequest(); }; /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. + * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @static - * @param {vtctldata.Shard} message Shard + * @param {query.StreamHealthRequest} message StreamHealthRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Shard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.name = ""; - object.shard = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); - return object; + StreamHealthRequest.toObject = function toObject() { + return {}; }; /** - * Converts this Shard to JSON. + * Converts this StreamHealthRequest to JSON. * @function toJSON - * @memberof vtctldata.Shard + * @memberof query.StreamHealthRequest * @instance * @returns {Object.} JSON object */ - Shard.prototype.toJSON = function toJSON() { + StreamHealthRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Shard; + return StreamHealthRequest; })(); - vtctldata.Workflow = (function() { + query.RealtimeStats = (function() { /** - * Properties of a Workflow. - * @memberof vtctldata - * @interface IWorkflow - * @property {string|null} [name] Workflow name - * @property {vtctldata.Workflow.IReplicationLocation|null} [source] Workflow source - * @property {vtctldata.Workflow.IReplicationLocation|null} [target] Workflow target - * @property {number|Long|null} [max_v_replication_lag] Workflow max_v_replication_lag - * @property {Object.|null} [shard_streams] Workflow shard_streams - * @property {string|null} [workflow_type] Workflow workflow_type - * @property {string|null} [workflow_sub_type] Workflow workflow_sub_type + * Properties of a RealtimeStats. + * @memberof query + * @interface IRealtimeStats + * @property {string|null} [health_error] RealtimeStats health_error + * @property {number|null} [replication_lag_seconds] RealtimeStats replication_lag_seconds + * @property {number|null} [binlog_players_count] RealtimeStats binlog_players_count + * @property {number|Long|null} [filtered_replication_lag_seconds] RealtimeStats filtered_replication_lag_seconds + * @property {number|null} [cpu_usage] RealtimeStats cpu_usage + * @property {number|null} [qps] RealtimeStats qps + * @property {Array.|null} [table_schema_changed] RealtimeStats table_schema_changed + * @property {Array.|null} [view_schema_changed] RealtimeStats view_schema_changed */ /** - * Constructs a new Workflow. - * @memberof vtctldata - * @classdesc Represents a Workflow. - * @implements IWorkflow + * Constructs a new RealtimeStats. + * @memberof query + * @classdesc Represents a RealtimeStats. + * @implements IRealtimeStats * @constructor - * @param {vtctldata.IWorkflow=} [properties] Properties to set + * @param {query.IRealtimeStats=} [properties] Properties to set */ - function Workflow(properties) { - this.shard_streams = {}; + function RealtimeStats(properties) { + this.table_schema_changed = []; + this.view_schema_changed = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81542,175 +81992,172 @@ $root.vtctldata = (function() { } /** - * Workflow name. - * @member {string} name - * @memberof vtctldata.Workflow + * RealtimeStats health_error. + * @member {string} health_error + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.name = ""; + RealtimeStats.prototype.health_error = ""; /** - * Workflow source. - * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} source - * @memberof vtctldata.Workflow + * RealtimeStats replication_lag_seconds. + * @member {number} replication_lag_seconds + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.source = null; + RealtimeStats.prototype.replication_lag_seconds = 0; /** - * Workflow target. - * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} target - * @memberof vtctldata.Workflow + * RealtimeStats binlog_players_count. + * @member {number} binlog_players_count + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.target = null; + RealtimeStats.prototype.binlog_players_count = 0; /** - * Workflow max_v_replication_lag. - * @member {number|Long} max_v_replication_lag - * @memberof vtctldata.Workflow + * RealtimeStats filtered_replication_lag_seconds. + * @member {number|Long} filtered_replication_lag_seconds + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.max_v_replication_lag = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RealtimeStats.prototype.filtered_replication_lag_seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Workflow shard_streams. - * @member {Object.} shard_streams - * @memberof vtctldata.Workflow + * RealtimeStats cpu_usage. + * @member {number} cpu_usage + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.shard_streams = $util.emptyObject; + RealtimeStats.prototype.cpu_usage = 0; /** - * Workflow workflow_type. - * @member {string} workflow_type - * @memberof vtctldata.Workflow + * RealtimeStats qps. + * @member {number} qps + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.workflow_type = ""; + RealtimeStats.prototype.qps = 0; /** - * Workflow workflow_sub_type. - * @member {string} workflow_sub_type - * @memberof vtctldata.Workflow + * RealtimeStats table_schema_changed. + * @member {Array.} table_schema_changed + * @memberof query.RealtimeStats * @instance */ - Workflow.prototype.workflow_sub_type = ""; + RealtimeStats.prototype.table_schema_changed = $util.emptyArray; /** - * Creates a new Workflow instance using the specified properties. + * RealtimeStats view_schema_changed. + * @member {Array.} view_schema_changed + * @memberof query.RealtimeStats + * @instance + */ + RealtimeStats.prototype.view_schema_changed = $util.emptyArray; + + /** + * Creates a new RealtimeStats instance using the specified properties. * @function create - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static - * @param {vtctldata.IWorkflow=} [properties] Properties to set - * @returns {vtctldata.Workflow} Workflow instance + * @param {query.IRealtimeStats=} [properties] Properties to set + * @returns {query.RealtimeStats} RealtimeStats instance */ - Workflow.create = function create(properties) { - return new Workflow(properties); + RealtimeStats.create = function create(properties) { + return new RealtimeStats(properties); }; /** - * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. + * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. * @function encode - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static - * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode + * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Workflow.encode = function encode(message, writer) { + RealtimeStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.vtctldata.Workflow.ReplicationLocation.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.vtctldata.Workflow.ReplicationLocation.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.max_v_replication_lag != null && Object.hasOwnProperty.call(message, "max_v_replication_lag")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.max_v_replication_lag); - if (message.shard_streams != null && Object.hasOwnProperty.call(message, "shard_streams")) - for (var keys = Object.keys(message.shard_streams), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.Workflow.ShardStream.encode(message.shard_streams[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.workflow_type != null && Object.hasOwnProperty.call(message, "workflow_type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.workflow_type); - if (message.workflow_sub_type != null && Object.hasOwnProperty.call(message, "workflow_sub_type")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.workflow_sub_type); + if (message.health_error != null && Object.hasOwnProperty.call(message, "health_error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.health_error); + if (message.replication_lag_seconds != null && Object.hasOwnProperty.call(message, "replication_lag_seconds")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.replication_lag_seconds); + if (message.binlog_players_count != null && Object.hasOwnProperty.call(message, "binlog_players_count")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.binlog_players_count); + if (message.filtered_replication_lag_seconds != null && Object.hasOwnProperty.call(message, "filtered_replication_lag_seconds")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filtered_replication_lag_seconds); + if (message.cpu_usage != null && Object.hasOwnProperty.call(message, "cpu_usage")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.cpu_usage); + if (message.qps != null && Object.hasOwnProperty.call(message, "qps")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.qps); + if (message.table_schema_changed != null && message.table_schema_changed.length) + for (var i = 0; i < message.table_schema_changed.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.table_schema_changed[i]); + if (message.view_schema_changed != null && message.view_schema_changed.length) + for (var i = 0; i < message.view_schema_changed.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.view_schema_changed[i]); return writer; }; /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. + * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static - * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode + * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Workflow.encodeDelimited = function encodeDelimited(message, writer) { + RealtimeStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Workflow message from the specified reader or buffer. + * Decodes a RealtimeStats message from the specified reader or buffer. * @function decode - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow} Workflow + * @returns {query.RealtimeStats} RealtimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Workflow.decode = function decode(reader, length) { + RealtimeStats.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RealtimeStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.health_error = reader.string(); break; case 2: - message.source = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); + message.replication_lag_seconds = reader.uint32(); break; case 3: - message.target = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); + message.binlog_players_count = reader.int32(); break; case 4: - message.max_v_replication_lag = reader.int64(); + message.filtered_replication_lag_seconds = reader.int64(); break; case 5: - if (message.shard_streams === $util.emptyObject) - message.shard_streams = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.Workflow.ShardStream.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shard_streams[key] = value; + message.cpu_usage = reader.double(); break; case 6: - message.workflow_type = reader.string(); + message.qps = reader.double(); break; case 7: - message.workflow_sub_type = reader.string(); + if (!(message.table_schema_changed && message.table_schema_changed.length)) + message.table_schema_changed = []; + message.table_schema_changed.push(reader.string()); + break; + case 8: + if (!(message.view_schema_changed && message.view_schema_changed.length)) + message.view_schema_changed = []; + message.view_schema_changed.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -81721,1896 +82168,1113 @@ $root.vtctldata = (function() { }; /** - * Decodes a Workflow message from the specified reader or buffer, length delimited. + * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow} Workflow + * @returns {query.RealtimeStats} RealtimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Workflow.decodeDelimited = function decodeDelimited(reader) { + RealtimeStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Workflow message. + * Verifies a RealtimeStats message. * @function verify - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Workflow.verify = function verify(message) { + RealtimeStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.source); - if (error) - return "source." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.target); - if (error) - return "target." + error; + if (message.health_error != null && message.hasOwnProperty("health_error")) + if (!$util.isString(message.health_error)) + return "health_error: string expected"; + if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) + if (!$util.isInteger(message.replication_lag_seconds)) + return "replication_lag_seconds: integer expected"; + if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) + if (!$util.isInteger(message.binlog_players_count)) + return "binlog_players_count: integer expected"; + if (message.filtered_replication_lag_seconds != null && message.hasOwnProperty("filtered_replication_lag_seconds")) + if (!$util.isInteger(message.filtered_replication_lag_seconds) && !(message.filtered_replication_lag_seconds && $util.isInteger(message.filtered_replication_lag_seconds.low) && $util.isInteger(message.filtered_replication_lag_seconds.high))) + return "filtered_replication_lag_seconds: integer|Long expected"; + if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) + if (typeof message.cpu_usage !== "number") + return "cpu_usage: number expected"; + if (message.qps != null && message.hasOwnProperty("qps")) + if (typeof message.qps !== "number") + return "qps: number expected"; + if (message.table_schema_changed != null && message.hasOwnProperty("table_schema_changed")) { + if (!Array.isArray(message.table_schema_changed)) + return "table_schema_changed: array expected"; + for (var i = 0; i < message.table_schema_changed.length; ++i) + if (!$util.isString(message.table_schema_changed[i])) + return "table_schema_changed: string[] expected"; } - if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) - if (!$util.isInteger(message.max_v_replication_lag) && !(message.max_v_replication_lag && $util.isInteger(message.max_v_replication_lag.low) && $util.isInteger(message.max_v_replication_lag.high))) - return "max_v_replication_lag: integer|Long expected"; - if (message.shard_streams != null && message.hasOwnProperty("shard_streams")) { - if (!$util.isObject(message.shard_streams)) - return "shard_streams: object expected"; - var key = Object.keys(message.shard_streams); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.Workflow.ShardStream.verify(message.shard_streams[key[i]]); - if (error) - return "shard_streams." + error; - } + if (message.view_schema_changed != null && message.hasOwnProperty("view_schema_changed")) { + if (!Array.isArray(message.view_schema_changed)) + return "view_schema_changed: array expected"; + for (var i = 0; i < message.view_schema_changed.length; ++i) + if (!$util.isString(message.view_schema_changed[i])) + return "view_schema_changed: string[] expected"; } - if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) - if (!$util.isString(message.workflow_type)) - return "workflow_type: string expected"; - if (message.workflow_sub_type != null && message.hasOwnProperty("workflow_sub_type")) - if (!$util.isString(message.workflow_sub_type)) - return "workflow_sub_type: string expected"; return null; }; /** - * Creates a Workflow message from a plain object. Also converts values to their respective internal types. + * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static * @param {Object.} object Plain object - * @returns {vtctldata.Workflow} Workflow + * @returns {query.RealtimeStats} RealtimeStats */ - Workflow.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow) + RealtimeStats.fromObject = function fromObject(object) { + if (object instanceof $root.query.RealtimeStats) return object; - var message = new $root.vtctldata.Workflow(); - if (object.name != null) - message.name = String(object.name); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".vtctldata.Workflow.source: object expected"); - message.source = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.source); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".vtctldata.Workflow.target: object expected"); - message.target = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.target); - } - if (object.max_v_replication_lag != null) + var message = new $root.query.RealtimeStats(); + if (object.health_error != null) + message.health_error = String(object.health_error); + if (object.replication_lag_seconds != null) + message.replication_lag_seconds = object.replication_lag_seconds >>> 0; + if (object.binlog_players_count != null) + message.binlog_players_count = object.binlog_players_count | 0; + if (object.filtered_replication_lag_seconds != null) if ($util.Long) - (message.max_v_replication_lag = $util.Long.fromValue(object.max_v_replication_lag)).unsigned = false; - else if (typeof object.max_v_replication_lag === "string") - message.max_v_replication_lag = parseInt(object.max_v_replication_lag, 10); - else if (typeof object.max_v_replication_lag === "number") - message.max_v_replication_lag = object.max_v_replication_lag; - else if (typeof object.max_v_replication_lag === "object") - message.max_v_replication_lag = new $util.LongBits(object.max_v_replication_lag.low >>> 0, object.max_v_replication_lag.high >>> 0).toNumber(); - if (object.shard_streams) { - if (typeof object.shard_streams !== "object") - throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); - message.shard_streams = {}; - for (var keys = Object.keys(object.shard_streams), i = 0; i < keys.length; ++i) { - if (typeof object.shard_streams[keys[i]] !== "object") - throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); - message.shard_streams[keys[i]] = $root.vtctldata.Workflow.ShardStream.fromObject(object.shard_streams[keys[i]]); - } + (message.filtered_replication_lag_seconds = $util.Long.fromValue(object.filtered_replication_lag_seconds)).unsigned = false; + else if (typeof object.filtered_replication_lag_seconds === "string") + message.filtered_replication_lag_seconds = parseInt(object.filtered_replication_lag_seconds, 10); + else if (typeof object.filtered_replication_lag_seconds === "number") + message.filtered_replication_lag_seconds = object.filtered_replication_lag_seconds; + else if (typeof object.filtered_replication_lag_seconds === "object") + message.filtered_replication_lag_seconds = new $util.LongBits(object.filtered_replication_lag_seconds.low >>> 0, object.filtered_replication_lag_seconds.high >>> 0).toNumber(); + if (object.cpu_usage != null) + message.cpu_usage = Number(object.cpu_usage); + if (object.qps != null) + message.qps = Number(object.qps); + if (object.table_schema_changed) { + if (!Array.isArray(object.table_schema_changed)) + throw TypeError(".query.RealtimeStats.table_schema_changed: array expected"); + message.table_schema_changed = []; + for (var i = 0; i < object.table_schema_changed.length; ++i) + message.table_schema_changed[i] = String(object.table_schema_changed[i]); + } + if (object.view_schema_changed) { + if (!Array.isArray(object.view_schema_changed)) + throw TypeError(".query.RealtimeStats.view_schema_changed: array expected"); + message.view_schema_changed = []; + for (var i = 0; i < object.view_schema_changed.length; ++i) + message.view_schema_changed[i] = String(object.view_schema_changed[i]); } - if (object.workflow_type != null) - message.workflow_type = String(object.workflow_type); - if (object.workflow_sub_type != null) - message.workflow_sub_type = String(object.workflow_sub_type); return message; }; /** - * Creates a plain object from a Workflow message. Also converts values to other types if specified. + * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @static - * @param {vtctldata.Workflow} message Workflow + * @param {query.RealtimeStats} message RealtimeStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Workflow.toObject = function toObject(message, options) { + RealtimeStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.shard_streams = {}; + if (options.arrays || options.defaults) { + object.table_schema_changed = []; + object.view_schema_changed = []; + } if (options.defaults) { - object.name = ""; - object.source = null; - object.target = null; + object.health_error = ""; + object.replication_lag_seconds = 0; + object.binlog_players_count = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.max_v_replication_lag = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.filtered_replication_lag_seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.max_v_replication_lag = options.longs === String ? "0" : 0; - object.workflow_type = ""; - object.workflow_sub_type = ""; + object.filtered_replication_lag_seconds = options.longs === String ? "0" : 0; + object.cpu_usage = 0; + object.qps = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.target, options); - if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) - if (typeof message.max_v_replication_lag === "number") - object.max_v_replication_lag = options.longs === String ? String(message.max_v_replication_lag) : message.max_v_replication_lag; + if (message.health_error != null && message.hasOwnProperty("health_error")) + object.health_error = message.health_error; + if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) + object.replication_lag_seconds = message.replication_lag_seconds; + if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) + object.binlog_players_count = message.binlog_players_count; + if (message.filtered_replication_lag_seconds != null && message.hasOwnProperty("filtered_replication_lag_seconds")) + if (typeof message.filtered_replication_lag_seconds === "number") + object.filtered_replication_lag_seconds = options.longs === String ? String(message.filtered_replication_lag_seconds) : message.filtered_replication_lag_seconds; else - object.max_v_replication_lag = options.longs === String ? $util.Long.prototype.toString.call(message.max_v_replication_lag) : options.longs === Number ? new $util.LongBits(message.max_v_replication_lag.low >>> 0, message.max_v_replication_lag.high >>> 0).toNumber() : message.max_v_replication_lag; - var keys2; - if (message.shard_streams && (keys2 = Object.keys(message.shard_streams)).length) { - object.shard_streams = {}; - for (var j = 0; j < keys2.length; ++j) - object.shard_streams[keys2[j]] = $root.vtctldata.Workflow.ShardStream.toObject(message.shard_streams[keys2[j]], options); + object.filtered_replication_lag_seconds = options.longs === String ? $util.Long.prototype.toString.call(message.filtered_replication_lag_seconds) : options.longs === Number ? new $util.LongBits(message.filtered_replication_lag_seconds.low >>> 0, message.filtered_replication_lag_seconds.high >>> 0).toNumber() : message.filtered_replication_lag_seconds; + if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) + object.cpu_usage = options.json && !isFinite(message.cpu_usage) ? String(message.cpu_usage) : message.cpu_usage; + if (message.qps != null && message.hasOwnProperty("qps")) + object.qps = options.json && !isFinite(message.qps) ? String(message.qps) : message.qps; + if (message.table_schema_changed && message.table_schema_changed.length) { + object.table_schema_changed = []; + for (var j = 0; j < message.table_schema_changed.length; ++j) + object.table_schema_changed[j] = message.table_schema_changed[j]; + } + if (message.view_schema_changed && message.view_schema_changed.length) { + object.view_schema_changed = []; + for (var j = 0; j < message.view_schema_changed.length; ++j) + object.view_schema_changed[j] = message.view_schema_changed[j]; } - if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) - object.workflow_type = message.workflow_type; - if (message.workflow_sub_type != null && message.hasOwnProperty("workflow_sub_type")) - object.workflow_sub_type = message.workflow_sub_type; return object; }; /** - * Converts this Workflow to JSON. + * Converts this RealtimeStats to JSON. * @function toJSON - * @memberof vtctldata.Workflow + * @memberof query.RealtimeStats * @instance * @returns {Object.} JSON object */ - Workflow.prototype.toJSON = function toJSON() { + RealtimeStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Workflow.ReplicationLocation = (function() { + return RealtimeStats; + })(); - /** - * Properties of a ReplicationLocation. - * @memberof vtctldata.Workflow - * @interface IReplicationLocation - * @property {string|null} [keyspace] ReplicationLocation keyspace - * @property {Array.|null} [shards] ReplicationLocation shards - */ + query.AggregateStats = (function() { - /** - * Constructs a new ReplicationLocation. - * @memberof vtctldata.Workflow - * @classdesc Represents a ReplicationLocation. - * @implements IReplicationLocation - * @constructor - * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set - */ - function ReplicationLocation(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an AggregateStats. + * @memberof query + * @interface IAggregateStats + * @property {number|null} [healthy_tablet_count] AggregateStats healthy_tablet_count + * @property {number|null} [unhealthy_tablet_count] AggregateStats unhealthy_tablet_count + * @property {number|null} [replication_lag_seconds_min] AggregateStats replication_lag_seconds_min + * @property {number|null} [replication_lag_seconds_max] AggregateStats replication_lag_seconds_max + */ - /** - * ReplicationLocation keyspace. - * @member {string} keyspace - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - */ - ReplicationLocation.prototype.keyspace = ""; + /** + * Constructs a new AggregateStats. + * @memberof query + * @classdesc Represents an AggregateStats. + * @implements IAggregateStats + * @constructor + * @param {query.IAggregateStats=} [properties] Properties to set + */ + function AggregateStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ReplicationLocation shards. - * @member {Array.} shards - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - */ - ReplicationLocation.prototype.shards = $util.emptyArray; + /** + * AggregateStats healthy_tablet_count. + * @member {number} healthy_tablet_count + * @memberof query.AggregateStats + * @instance + */ + AggregateStats.prototype.healthy_tablet_count = 0; - /** - * Creates a new ReplicationLocation instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation instance - */ - ReplicationLocation.create = function create(properties) { - return new ReplicationLocation(properties); - }; + /** + * AggregateStats unhealthy_tablet_count. + * @member {number} unhealthy_tablet_count + * @memberof query.AggregateStats + * @instance + */ + AggregateStats.prototype.unhealthy_tablet_count = 0; - /** - * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shards[i]); - return writer; - }; + /** + * AggregateStats replication_lag_seconds_min. + * @member {number} replication_lag_seconds_min + * @memberof query.AggregateStats + * @instance + */ + AggregateStats.prototype.replication_lag_seconds_min = 0; - /** - * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * AggregateStats replication_lag_seconds_max. + * @member {number} replication_lag_seconds_max + * @memberof query.AggregateStats + * @instance + */ + AggregateStats.prototype.replication_lag_seconds_max = 0; - /** - * Decodes a ReplicationLocation message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ReplicationLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new AggregateStats instance using the specified properties. + * @function create + * @memberof query.AggregateStats + * @static + * @param {query.IAggregateStats=} [properties] Properties to set + * @returns {query.AggregateStats} AggregateStats instance + */ + AggregateStats.create = function create(properties) { + return new AggregateStats(properties); + }; - /** - * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * @function encode + * @memberof query.AggregateStats + * @static + * @param {query.IAggregateStats} message AggregateStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.healthy_tablet_count != null && Object.hasOwnProperty.call(message, "healthy_tablet_count")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.healthy_tablet_count); + if (message.unhealthy_tablet_count != null && Object.hasOwnProperty.call(message, "unhealthy_tablet_count")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.unhealthy_tablet_count); + if (message.replication_lag_seconds_min != null && Object.hasOwnProperty.call(message, "replication_lag_seconds_min")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.replication_lag_seconds_min); + if (message.replication_lag_seconds_max != null && Object.hasOwnProperty.call(message, "replication_lag_seconds_max")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.replication_lag_seconds_max); + return writer; + }; - /** - * Verifies a ReplicationLocation message. - * @function verify - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicationLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) - if (!$util.isString(message.shards[i])) - return "shards: string[] expected"; + /** + * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. + * @function encodeDelimited + * @memberof query.AggregateStats + * @static + * @param {query.IAggregateStats} message AggregateStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregateStats message from the specified reader or buffer. + * @function decode + * @memberof query.AggregateStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.AggregateStats} AggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.AggregateStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.healthy_tablet_count = reader.int32(); + break; + case 2: + message.unhealthy_tablet_count = reader.int32(); + break; + case 3: + message.replication_lag_seconds_min = reader.uint32(); + break; + case 4: + message.replication_lag_seconds_max = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - */ - ReplicationLocation.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.ReplicationLocation) - return object; - var message = new $root.vtctldata.Workflow.ReplicationLocation(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.Workflow.ReplicationLocation.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) - message.shards[i] = String(object.shards[i]); - } - return message; - }; + /** + * Decodes an AggregateStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.AggregateStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.AggregateStats} AggregateStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.ReplicationLocation} message ReplicationLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicationLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = message.shards[j]; - } + /** + * Verifies an AggregateStats message. + * @function verify + * @memberof query.AggregateStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregateStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) + if (!$util.isInteger(message.healthy_tablet_count)) + return "healthy_tablet_count: integer expected"; + if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) + if (!$util.isInteger(message.unhealthy_tablet_count)) + return "unhealthy_tablet_count: integer expected"; + if (message.replication_lag_seconds_min != null && message.hasOwnProperty("replication_lag_seconds_min")) + if (!$util.isInteger(message.replication_lag_seconds_min)) + return "replication_lag_seconds_min: integer expected"; + if (message.replication_lag_seconds_max != null && message.hasOwnProperty("replication_lag_seconds_max")) + if (!$util.isInteger(message.replication_lag_seconds_max)) + return "replication_lag_seconds_max: integer expected"; + return null; + }; + + /** + * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.AggregateStats + * @static + * @param {Object.} object Plain object + * @returns {query.AggregateStats} AggregateStats + */ + AggregateStats.fromObject = function fromObject(object) { + if (object instanceof $root.query.AggregateStats) return object; - }; + var message = new $root.query.AggregateStats(); + if (object.healthy_tablet_count != null) + message.healthy_tablet_count = object.healthy_tablet_count | 0; + if (object.unhealthy_tablet_count != null) + message.unhealthy_tablet_count = object.unhealthy_tablet_count | 0; + if (object.replication_lag_seconds_min != null) + message.replication_lag_seconds_min = object.replication_lag_seconds_min >>> 0; + if (object.replication_lag_seconds_max != null) + message.replication_lag_seconds_max = object.replication_lag_seconds_max >>> 0; + return message; + }; - /** - * Converts this ReplicationLocation to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - * @returns {Object.} JSON object - */ - ReplicationLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. + * @function toObject + * @memberof query.AggregateStats + * @static + * @param {query.AggregateStats} message AggregateStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregateStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.healthy_tablet_count = 0; + object.unhealthy_tablet_count = 0; + object.replication_lag_seconds_min = 0; + object.replication_lag_seconds_max = 0; + } + if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) + object.healthy_tablet_count = message.healthy_tablet_count; + if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) + object.unhealthy_tablet_count = message.unhealthy_tablet_count; + if (message.replication_lag_seconds_min != null && message.hasOwnProperty("replication_lag_seconds_min")) + object.replication_lag_seconds_min = message.replication_lag_seconds_min; + if (message.replication_lag_seconds_max != null && message.hasOwnProperty("replication_lag_seconds_max")) + object.replication_lag_seconds_max = message.replication_lag_seconds_max; + return object; + }; - return ReplicationLocation; - })(); + /** + * Converts this AggregateStats to JSON. + * @function toJSON + * @memberof query.AggregateStats + * @instance + * @returns {Object.} JSON object + */ + AggregateStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Workflow.ShardStream = (function() { + return AggregateStats; + })(); - /** - * Properties of a ShardStream. - * @memberof vtctldata.Workflow - * @interface IShardStream - * @property {Array.|null} [streams] ShardStream streams - * @property {Array.|null} [tablet_controls] ShardStream tablet_controls - * @property {boolean|null} [is_primary_serving] ShardStream is_primary_serving - */ + query.StreamHealthResponse = (function() { - /** - * Constructs a new ShardStream. - * @memberof vtctldata.Workflow - * @classdesc Represents a ShardStream. - * @implements IShardStream - * @constructor - * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set - */ - function ShardStream(properties) { - this.streams = []; - this.tablet_controls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a StreamHealthResponse. + * @memberof query + * @interface IStreamHealthResponse + * @property {query.ITarget|null} [target] StreamHealthResponse target + * @property {boolean|null} [serving] StreamHealthResponse serving + * @property {number|Long|null} [tablet_externally_reparented_timestamp] StreamHealthResponse tablet_externally_reparented_timestamp + * @property {query.IRealtimeStats|null} [realtime_stats] StreamHealthResponse realtime_stats + * @property {topodata.ITabletAlias|null} [tablet_alias] StreamHealthResponse tablet_alias + */ - /** - * ShardStream streams. - * @member {Array.} streams - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.streams = $util.emptyArray; + /** + * Constructs a new StreamHealthResponse. + * @memberof query + * @classdesc Represents a StreamHealthResponse. + * @implements IStreamHealthResponse + * @constructor + * @param {query.IStreamHealthResponse=} [properties] Properties to set + */ + function StreamHealthResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ShardStream tablet_controls. - * @member {Array.} tablet_controls - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.tablet_controls = $util.emptyArray; + /** + * StreamHealthResponse target. + * @member {query.ITarget|null|undefined} target + * @memberof query.StreamHealthResponse + * @instance + */ + StreamHealthResponse.prototype.target = null; - /** - * ShardStream is_primary_serving. - * @member {boolean} is_primary_serving - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.is_primary_serving = false; + /** + * StreamHealthResponse serving. + * @member {boolean} serving + * @memberof query.StreamHealthResponse + * @instance + */ + StreamHealthResponse.prototype.serving = false; - /** - * Creates a new ShardStream instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set - * @returns {vtctldata.Workflow.ShardStream} ShardStream instance - */ - ShardStream.create = function create(properties) { - return new ShardStream(properties); - }; + /** + * StreamHealthResponse tablet_externally_reparented_timestamp. + * @member {number|Long} tablet_externally_reparented_timestamp + * @memberof query.StreamHealthResponse + * @instance + */ + StreamHealthResponse.prototype.tablet_externally_reparented_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.streams != null && message.streams.length) - for (var i = 0; i < message.streams.length; ++i) - $root.vtctldata.Workflow.Stream.encode(message.streams[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tablet_controls != null && message.tablet_controls.length) - for (var i = 0; i < message.tablet_controls.length; ++i) - $root.topodata.Shard.TabletControl.encode(message.tablet_controls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.is_primary_serving != null && Object.hasOwnProperty.call(message, "is_primary_serving")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_primary_serving); - return writer; - }; + /** + * StreamHealthResponse realtime_stats. + * @member {query.IRealtimeStats|null|undefined} realtime_stats + * @memberof query.StreamHealthResponse + * @instance + */ + StreamHealthResponse.prototype.realtime_stats = null; - /** - * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * StreamHealthResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof query.StreamHealthResponse + * @instance + */ + StreamHealthResponse.prototype.tablet_alias = null; - /** - * Decodes a ShardStream message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.ShardStream} ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardStream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ShardStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.streams && message.streams.length)) - message.streams = []; - message.streams.push($root.vtctldata.Workflow.Stream.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tablet_controls && message.tablet_controls.length)) - message.tablet_controls = []; - message.tablet_controls.push($root.topodata.Shard.TabletControl.decode(reader, reader.uint32())); - break; - case 3: - message.is_primary_serving = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new StreamHealthResponse instance using the specified properties. + * @function create + * @memberof query.StreamHealthResponse + * @static + * @param {query.IStreamHealthResponse=} [properties] Properties to set + * @returns {query.StreamHealthResponse} StreamHealthResponse instance + */ + StreamHealthResponse.create = function create(properties) { + return new StreamHealthResponse(properties); + }; - /** - * Decodes a ShardStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.ShardStream} ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * @function encode + * @memberof query.StreamHealthResponse + * @static + * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamHealthResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.serving != null && Object.hasOwnProperty.call(message, "serving")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.serving); + if (message.tablet_externally_reparented_timestamp != null && Object.hasOwnProperty.call(message, "tablet_externally_reparented_timestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tablet_externally_reparented_timestamp); + if (message.realtime_stats != null && Object.hasOwnProperty.call(message, "realtime_stats")) + $root.query.RealtimeStats.encode(message.realtime_stats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Verifies a ShardStream message. - * @function verify - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.streams != null && message.hasOwnProperty("streams")) { - if (!Array.isArray(message.streams)) - return "streams: array expected"; - for (var i = 0; i < message.streams.length; ++i) { - var error = $root.vtctldata.Workflow.Stream.verify(message.streams[i]); - if (error) - return "streams." + error; - } - } - if (message.tablet_controls != null && message.hasOwnProperty("tablet_controls")) { - if (!Array.isArray(message.tablet_controls)) - return "tablet_controls: array expected"; - for (var i = 0; i < message.tablet_controls.length; ++i) { - var error = $root.topodata.Shard.TabletControl.verify(message.tablet_controls[i]); - if (error) - return "tablet_controls." + error; - } - } - if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) - if (typeof message.is_primary_serving !== "boolean") - return "is_primary_serving: boolean expected"; - return null; - }; + /** + * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof query.StreamHealthResponse + * @static + * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamHealthResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.ShardStream} ShardStream - */ - ShardStream.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.ShardStream) - return object; - var message = new $root.vtctldata.Workflow.ShardStream(); - if (object.streams) { - if (!Array.isArray(object.streams)) - throw TypeError(".vtctldata.Workflow.ShardStream.streams: array expected"); - message.streams = []; - for (var i = 0; i < object.streams.length; ++i) { - if (typeof object.streams[i] !== "object") - throw TypeError(".vtctldata.Workflow.ShardStream.streams: object expected"); - message.streams[i] = $root.vtctldata.Workflow.Stream.fromObject(object.streams[i]); - } - } - if (object.tablet_controls) { - if (!Array.isArray(object.tablet_controls)) - throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: array expected"); - message.tablet_controls = []; - for (var i = 0; i < object.tablet_controls.length; ++i) { - if (typeof object.tablet_controls[i] !== "object") - throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: object expected"); - message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject(object.tablet_controls[i]); - } + /** + * Decodes a StreamHealthResponse message from the specified reader or buffer. + * @function decode + * @memberof query.StreamHealthResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.StreamHealthResponse} StreamHealthResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamHealthResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.query.Target.decode(reader, reader.uint32()); + break; + case 2: + message.serving = reader.bool(); + break; + case 3: + message.tablet_externally_reparented_timestamp = reader.int64(); + break; + case 4: + message.realtime_stats = $root.query.RealtimeStats.decode(reader, reader.uint32()); + break; + case 5: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (object.is_primary_serving != null) - message.is_primary_serving = Boolean(object.is_primary_serving); - return message; - }; - - /** - * Creates a plain object from a ShardStream message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.ShardStream} message ShardStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.streams = []; - object.tablet_controls = []; - } - if (options.defaults) - object.is_primary_serving = false; - if (message.streams && message.streams.length) { - object.streams = []; - for (var j = 0; j < message.streams.length; ++j) - object.streams[j] = $root.vtctldata.Workflow.Stream.toObject(message.streams[j], options); - } - if (message.tablet_controls && message.tablet_controls.length) { - object.tablet_controls = []; - for (var j = 0; j < message.tablet_controls.length; ++j) - object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject(message.tablet_controls[j], options); - } - if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) - object.is_primary_serving = message.is_primary_serving; - return object; - }; - - /** - * Converts this ShardStream to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.ShardStream - * @instance - * @returns {Object.} JSON object - */ - ShardStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - return ShardStream; - })(); + /** + * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.StreamHealthResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.StreamHealthResponse} StreamHealthResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamHealthResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Workflow.Stream = (function() { + /** + * Verifies a StreamHealthResponse message. + * @function verify + * @memberof query.StreamHealthResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamHealthResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.serving != null && message.hasOwnProperty("serving")) + if (typeof message.serving !== "boolean") + return "serving: boolean expected"; + if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) + if (!$util.isInteger(message.tablet_externally_reparented_timestamp) && !(message.tablet_externally_reparented_timestamp && $util.isInteger(message.tablet_externally_reparented_timestamp.low) && $util.isInteger(message.tablet_externally_reparented_timestamp.high))) + return "tablet_externally_reparented_timestamp: integer|Long expected"; + if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) { + var error = $root.query.RealtimeStats.verify(message.realtime_stats); + if (error) + return "realtime_stats." + error; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + return null; + }; - /** - * Properties of a Stream. - * @memberof vtctldata.Workflow - * @interface IStream - * @property {number|Long|null} [id] Stream id - * @property {string|null} [shard] Stream shard - * @property {topodata.ITabletAlias|null} [tablet] Stream tablet - * @property {binlogdata.IBinlogSource|null} [binlog_source] Stream binlog_source - * @property {string|null} [position] Stream position - * @property {string|null} [stop_position] Stream stop_position - * @property {string|null} [state] Stream state - * @property {string|null} [db_name] Stream db_name - * @property {vttime.ITime|null} [transaction_timestamp] Stream transaction_timestamp - * @property {vttime.ITime|null} [time_updated] Stream time_updated - * @property {string|null} [message] Stream message - * @property {Array.|null} [copy_states] Stream copy_states - * @property {Array.|null} [logs] Stream logs - * @property {string|null} [log_fetch_error] Stream log_fetch_error - * @property {Array.|null} [tags] Stream tags - */ + /** + * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.StreamHealthResponse + * @static + * @param {Object.} object Plain object + * @returns {query.StreamHealthResponse} StreamHealthResponse + */ + StreamHealthResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.StreamHealthResponse) + return object; + var message = new $root.query.StreamHealthResponse(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.StreamHealthResponse.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + if (object.serving != null) + message.serving = Boolean(object.serving); + if (object.tablet_externally_reparented_timestamp != null) + if ($util.Long) + (message.tablet_externally_reparented_timestamp = $util.Long.fromValue(object.tablet_externally_reparented_timestamp)).unsigned = false; + else if (typeof object.tablet_externally_reparented_timestamp === "string") + message.tablet_externally_reparented_timestamp = parseInt(object.tablet_externally_reparented_timestamp, 10); + else if (typeof object.tablet_externally_reparented_timestamp === "number") + message.tablet_externally_reparented_timestamp = object.tablet_externally_reparented_timestamp; + else if (typeof object.tablet_externally_reparented_timestamp === "object") + message.tablet_externally_reparented_timestamp = new $util.LongBits(object.tablet_externally_reparented_timestamp.low >>> 0, object.tablet_externally_reparented_timestamp.high >>> 0).toNumber(); + if (object.realtime_stats != null) { + if (typeof object.realtime_stats !== "object") + throw TypeError(".query.StreamHealthResponse.realtime_stats: object expected"); + message.realtime_stats = $root.query.RealtimeStats.fromObject(object.realtime_stats); + } + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".query.StreamHealthResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + return message; + }; - /** - * Constructs a new Stream. - * @memberof vtctldata.Workflow - * @classdesc Represents a Stream. - * @implements IStream - * @constructor - * @param {vtctldata.Workflow.IStream=} [properties] Properties to set - */ - function Stream(properties) { - this.copy_states = []; - this.logs = []; - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof query.StreamHealthResponse + * @static + * @param {query.StreamHealthResponse} message StreamHealthResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamHealthResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.serving = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tablet_externally_reparented_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tablet_externally_reparented_timestamp = options.longs === String ? "0" : 0; + object.realtime_stats = null; + object.tablet_alias = null; } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.serving != null && message.hasOwnProperty("serving")) + object.serving = message.serving; + if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) + if (typeof message.tablet_externally_reparented_timestamp === "number") + object.tablet_externally_reparented_timestamp = options.longs === String ? String(message.tablet_externally_reparented_timestamp) : message.tablet_externally_reparented_timestamp; + else + object.tablet_externally_reparented_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tablet_externally_reparented_timestamp) : options.longs === Number ? new $util.LongBits(message.tablet_externally_reparented_timestamp.low >>> 0, message.tablet_externally_reparented_timestamp.high >>> 0).toNumber() : message.tablet_externally_reparented_timestamp; + if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) + object.realtime_stats = $root.query.RealtimeStats.toObject(message.realtime_stats, options); + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + return object; + }; - /** - * Stream id. - * @member {number|Long} id - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Converts this StreamHealthResponse to JSON. + * @function toJSON + * @memberof query.StreamHealthResponse + * @instance + * @returns {Object.} JSON object + */ + StreamHealthResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Stream shard. - * @member {string} shard - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.shard = ""; + return StreamHealthResponse; + })(); - /** - * Stream tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.tablet = null; + /** + * TransactionState enum. + * @name query.TransactionState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PREPARE=1 PREPARE value + * @property {number} COMMIT=2 COMMIT value + * @property {number} ROLLBACK=3 ROLLBACK value + */ + query.TransactionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PREPARE"] = 1; + values[valuesById[2] = "COMMIT"] = 2; + values[valuesById[3] = "ROLLBACK"] = 3; + return values; + })(); - /** - * Stream binlog_source. - * @member {binlogdata.IBinlogSource|null|undefined} binlog_source - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.binlog_source = null; + query.TransactionMetadata = (function() { - /** - * Stream position. - * @member {string} position - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.position = ""; + /** + * Properties of a TransactionMetadata. + * @memberof query + * @interface ITransactionMetadata + * @property {string|null} [dtid] TransactionMetadata dtid + * @property {query.TransactionState|null} [state] TransactionMetadata state + * @property {number|Long|null} [time_created] TransactionMetadata time_created + * @property {Array.|null} [participants] TransactionMetadata participants + */ - /** - * Stream stop_position. - * @member {string} stop_position - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.stop_position = ""; + /** + * Constructs a new TransactionMetadata. + * @memberof query + * @classdesc Represents a TransactionMetadata. + * @implements ITransactionMetadata + * @constructor + * @param {query.ITransactionMetadata=} [properties] Properties to set + */ + function TransactionMetadata(properties) { + this.participants = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Stream state. - * @member {string} state - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.state = ""; + /** + * TransactionMetadata dtid. + * @member {string} dtid + * @memberof query.TransactionMetadata + * @instance + */ + TransactionMetadata.prototype.dtid = ""; - /** - * Stream db_name. - * @member {string} db_name - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.db_name = ""; + /** + * TransactionMetadata state. + * @member {query.TransactionState} state + * @memberof query.TransactionMetadata + * @instance + */ + TransactionMetadata.prototype.state = 0; - /** - * Stream transaction_timestamp. - * @member {vttime.ITime|null|undefined} transaction_timestamp - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.transaction_timestamp = null; + /** + * TransactionMetadata time_created. + * @member {number|Long} time_created + * @memberof query.TransactionMetadata + * @instance + */ + TransactionMetadata.prototype.time_created = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Stream time_updated. - * @member {vttime.ITime|null|undefined} time_updated - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.time_updated = null; + /** + * TransactionMetadata participants. + * @member {Array.} participants + * @memberof query.TransactionMetadata + * @instance + */ + TransactionMetadata.prototype.participants = $util.emptyArray; - /** - * Stream message. - * @member {string} message - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.message = ""; + /** + * Creates a new TransactionMetadata instance using the specified properties. + * @function create + * @memberof query.TransactionMetadata + * @static + * @param {query.ITransactionMetadata=} [properties] Properties to set + * @returns {query.TransactionMetadata} TransactionMetadata instance + */ + TransactionMetadata.create = function create(properties) { + return new TransactionMetadata(properties); + }; - /** - * Stream copy_states. - * @member {Array.} copy_states - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.copy_states = $util.emptyArray; + /** + * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * @function encode + * @memberof query.TransactionMetadata + * @static + * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransactionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dtid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time_created); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + $root.query.Target.encode(message.participants[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Stream logs. - * @member {Array.} logs - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.logs = $util.emptyArray; + /** + * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof query.TransactionMetadata + * @static + * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransactionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Stream log_fetch_error. - * @member {string} log_fetch_error - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.log_fetch_error = ""; + /** + * Decodes a TransactionMetadata message from the specified reader or buffer. + * @function decode + * @memberof query.TransactionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {query.TransactionMetadata} TransactionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransactionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.TransactionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dtid = reader.string(); + break; + case 2: + message.state = reader.int32(); + break; + case 3: + message.time_created = reader.int64(); + break; + case 4: + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.query.Target.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Stream tags. - * @member {Array.} tags - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.tags = $util.emptyArray; + /** + * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof query.TransactionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {query.TransactionMetadata} TransactionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransactionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new Stream instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream=} [properties] Properties to set - * @returns {vtctldata.Workflow.Stream} Stream instance - */ - Stream.create = function create(properties) { - return new Stream(properties); - }; - - /** - * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.binlog_source != null && Object.hasOwnProperty.call(message, "binlog_source")) - $root.binlogdata.BinlogSource.encode(message.binlog_source, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.position); - if (message.stop_position != null && Object.hasOwnProperty.call(message, "stop_position")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.stop_position); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.state); - if (message.db_name != null && Object.hasOwnProperty.call(message, "db_name")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.db_name); - if (message.transaction_timestamp != null && Object.hasOwnProperty.call(message, "transaction_timestamp")) - $root.vttime.Time.encode(message.transaction_timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.time_updated != null && Object.hasOwnProperty.call(message, "time_updated")) - $root.vttime.Time.encode(message.time_updated, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.message); - if (message.copy_states != null && message.copy_states.length) - for (var i = 0; i < message.copy_states.length; ++i) - $root.vtctldata.Workflow.Stream.CopyState.encode(message.copy_states[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.logs != null && message.logs.length) - for (var i = 0; i < message.logs.length; ++i) - $root.vtctldata.Workflow.Stream.Log.encode(message.logs[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.log_fetch_error != null && Object.hasOwnProperty.call(message, "log_fetch_error")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.log_fetch_error); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.tags[i]); - return writer; - }; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.binlog_source = $root.binlogdata.BinlogSource.decode(reader, reader.uint32()); - break; - case 5: - message.position = reader.string(); - break; - case 6: - message.stop_position = reader.string(); - break; - case 7: - message.state = reader.string(); - break; - case 8: - message.db_name = reader.string(); - break; - case 9: - message.transaction_timestamp = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 10: - message.time_updated = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 11: - message.message = reader.string(); - break; - case 12: - if (!(message.copy_states && message.copy_states.length)) - message.copy_states = []; - message.copy_states.push($root.vtctldata.Workflow.Stream.CopyState.decode(reader, reader.uint32())); - break; - case 13: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push($root.vtctldata.Workflow.Stream.Log.decode(reader, reader.uint32())); - break; - case 14: - message.log_fetch_error = reader.string(); - break; - case 15: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Stream message. - * @function verify - * @memberof vtctldata.Workflow.Stream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } - if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) { - var error = $root.binlogdata.BinlogSource.verify(message.binlog_source); - if (error) - return "binlog_source." + error; - } - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) - if (!$util.isString(message.stop_position)) - return "stop_position: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - if (!$util.isString(message.state)) - return "state: string expected"; - if (message.db_name != null && message.hasOwnProperty("db_name")) - if (!$util.isString(message.db_name)) - return "db_name: string expected"; - if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) { - var error = $root.vttime.Time.verify(message.transaction_timestamp); - if (error) - return "transaction_timestamp." + error; - } - if (message.time_updated != null && message.hasOwnProperty("time_updated")) { - var error = $root.vttime.Time.verify(message.time_updated); - if (error) - return "time_updated." + error; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.copy_states != null && message.hasOwnProperty("copy_states")) { - if (!Array.isArray(message.copy_states)) - return "copy_states: array expected"; - for (var i = 0; i < message.copy_states.length; ++i) { - var error = $root.vtctldata.Workflow.Stream.CopyState.verify(message.copy_states[i]); - if (error) - return "copy_states." + error; - } - } - if (message.logs != null && message.hasOwnProperty("logs")) { - if (!Array.isArray(message.logs)) - return "logs: array expected"; - for (var i = 0; i < message.logs.length; ++i) { - var error = $root.vtctldata.Workflow.Stream.Log.verify(message.logs[i]); - if (error) - return "logs." + error; - } - } - if (message.log_fetch_error != null && message.hasOwnProperty("log_fetch_error")) - if (!$util.isString(message.log_fetch_error)) - return "log_fetch_error: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - return null; - }; - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.Stream - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.Stream} Stream - */ - Stream.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.Stream) - return object; - var message = new $root.vtctldata.Workflow.Stream(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - if (object.shard != null) - message.shard = String(object.shard); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.Workflow.Stream.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } - if (object.binlog_source != null) { - if (typeof object.binlog_source !== "object") - throw TypeError(".vtctldata.Workflow.Stream.binlog_source: object expected"); - message.binlog_source = $root.binlogdata.BinlogSource.fromObject(object.binlog_source); - } - if (object.position != null) - message.position = String(object.position); - if (object.stop_position != null) - message.stop_position = String(object.stop_position); - if (object.state != null) - message.state = String(object.state); - if (object.db_name != null) - message.db_name = String(object.db_name); - if (object.transaction_timestamp != null) { - if (typeof object.transaction_timestamp !== "object") - throw TypeError(".vtctldata.Workflow.Stream.transaction_timestamp: object expected"); - message.transaction_timestamp = $root.vttime.Time.fromObject(object.transaction_timestamp); - } - if (object.time_updated != null) { - if (typeof object.time_updated !== "object") - throw TypeError(".vtctldata.Workflow.Stream.time_updated: object expected"); - message.time_updated = $root.vttime.Time.fromObject(object.time_updated); - } - if (object.message != null) - message.message = String(object.message); - if (object.copy_states) { - if (!Array.isArray(object.copy_states)) - throw TypeError(".vtctldata.Workflow.Stream.copy_states: array expected"); - message.copy_states = []; - for (var i = 0; i < object.copy_states.length; ++i) { - if (typeof object.copy_states[i] !== "object") - throw TypeError(".vtctldata.Workflow.Stream.copy_states: object expected"); - message.copy_states[i] = $root.vtctldata.Workflow.Stream.CopyState.fromObject(object.copy_states[i]); - } - } - if (object.logs) { - if (!Array.isArray(object.logs)) - throw TypeError(".vtctldata.Workflow.Stream.logs: array expected"); - message.logs = []; - for (var i = 0; i < object.logs.length; ++i) { - if (typeof object.logs[i] !== "object") - throw TypeError(".vtctldata.Workflow.Stream.logs: object expected"); - message.logs[i] = $root.vtctldata.Workflow.Stream.Log.fromObject(object.logs[i]); - } - } - if (object.log_fetch_error != null) - message.log_fetch_error = String(object.log_fetch_error); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".vtctldata.Workflow.Stream.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - return message; - }; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.Stream} message Stream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.copy_states = []; - object.logs = []; - object.tags = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.shard = ""; - object.tablet = null; - object.binlog_source = null; - object.position = ""; - object.stop_position = ""; - object.state = ""; - object.db_name = ""; - object.transaction_timestamp = null; - object.time_updated = null; - object.message = ""; - object.log_fetch_error = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); - if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) - object.binlog_source = $root.binlogdata.BinlogSource.toObject(message.binlog_source, options); - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) - object.stop_position = message.stop_position; - if (message.state != null && message.hasOwnProperty("state")) - object.state = message.state; - if (message.db_name != null && message.hasOwnProperty("db_name")) - object.db_name = message.db_name; - if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) - object.transaction_timestamp = $root.vttime.Time.toObject(message.transaction_timestamp, options); - if (message.time_updated != null && message.hasOwnProperty("time_updated")) - object.time_updated = $root.vttime.Time.toObject(message.time_updated, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.copy_states && message.copy_states.length) { - object.copy_states = []; - for (var j = 0; j < message.copy_states.length; ++j) - object.copy_states[j] = $root.vtctldata.Workflow.Stream.CopyState.toObject(message.copy_states[j], options); - } - if (message.logs && message.logs.length) { - object.logs = []; - for (var j = 0; j < message.logs.length; ++j) - object.logs[j] = $root.vtctldata.Workflow.Stream.Log.toObject(message.logs[j], options); - } - if (message.log_fetch_error != null && message.hasOwnProperty("log_fetch_error")) - object.log_fetch_error = message.log_fetch_error; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - return object; - }; - - /** - * Converts this Stream to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.Stream - * @instance - * @returns {Object.} JSON object - */ - Stream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Stream.CopyState = (function() { - - /** - * Properties of a CopyState. - * @memberof vtctldata.Workflow.Stream - * @interface ICopyState - * @property {string|null} [table] CopyState table - * @property {string|null} [last_pk] CopyState last_pk - */ - - /** - * Constructs a new CopyState. - * @memberof vtctldata.Workflow.Stream - * @classdesc Represents a CopyState. - * @implements ICopyState - * @constructor - * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set - */ - function CopyState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CopyState table. - * @member {string} table - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - */ - CopyState.prototype.table = ""; - - /** - * CopyState last_pk. - * @member {string} last_pk - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - */ - CopyState.prototype.last_pk = ""; - - /** - * Creates a new CopyState instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState instance - */ - CopyState.create = function create(properties) { - return new CopyState(properties); - }; - - /** - * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CopyState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.last_pk != null && Object.hasOwnProperty.call(message, "last_pk")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.last_pk); - return writer; - }; - - /** - * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CopyState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CopyState message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CopyState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream.CopyState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.last_pk = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CopyState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CopyState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CopyState message. - * @function verify - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CopyState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.last_pk != null && message.hasOwnProperty("last_pk")) - if (!$util.isString(message.last_pk)) - return "last_pk: string expected"; - return null; - }; - - /** - * Creates a CopyState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - */ - CopyState.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.Stream.CopyState) - return object; - var message = new $root.vtctldata.Workflow.Stream.CopyState(); - if (object.table != null) - message.table = String(object.table); - if (object.last_pk != null) - message.last_pk = String(object.last_pk); - return message; - }; - - /** - * Creates a plain object from a CopyState message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.CopyState} message CopyState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CopyState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.table = ""; - object.last_pk = ""; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.last_pk != null && message.hasOwnProperty("last_pk")) - object.last_pk = message.last_pk; - return object; - }; - - /** - * Converts this CopyState to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - * @returns {Object.} JSON object - */ - CopyState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CopyState; - })(); - - Stream.Log = (function() { - - /** - * Properties of a Log. - * @memberof vtctldata.Workflow.Stream - * @interface ILog - * @property {number|Long|null} [id] Log id - * @property {number|Long|null} [stream_id] Log stream_id - * @property {string|null} [type] Log type - * @property {string|null} [state] Log state - * @property {vttime.ITime|null} [created_at] Log created_at - * @property {vttime.ITime|null} [updated_at] Log updated_at - * @property {string|null} [message] Log message - * @property {number|Long|null} [count] Log count - */ - - /** - * Constructs a new Log. - * @memberof vtctldata.Workflow.Stream - * @classdesc Represents a Log. - * @implements ILog - * @constructor - * @param {vtctldata.Workflow.Stream.ILog=} [properties] Properties to set - */ - function Log(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Log id. - * @member {number|Long} id - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Log stream_id. - * @member {number|Long} stream_id - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.stream_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Log type. - * @member {string} type - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.type = ""; - - /** - * Log state. - * @member {string} state - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.state = ""; - - /** - * Log created_at. - * @member {vttime.ITime|null|undefined} created_at - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.created_at = null; - - /** - * Log updated_at. - * @member {vttime.ITime|null|undefined} updated_at - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.updated_at = null; - - /** - * Log message. - * @member {string} message - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.message = ""; - - /** - * Log count. - * @member {number|Long} count - * @memberof vtctldata.Workflow.Stream.Log - * @instance - */ - Log.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Log instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {vtctldata.Workflow.Stream.ILog=} [properties] Properties to set - * @returns {vtctldata.Workflow.Stream.Log} Log instance - */ - Log.create = function create(properties) { - return new Log(properties); - }; - - /** - * Encodes the specified Log message. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {vtctldata.Workflow.Stream.ILog} message Log message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Log.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.stream_id != null && Object.hasOwnProperty.call(message, "stream_id")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.stream_id); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.state); - if (message.created_at != null && Object.hasOwnProperty.call(message, "created_at")) - $root.vttime.Time.encode(message.created_at, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updated_at != null && Object.hasOwnProperty.call(message, "updated_at")) - $root.vttime.Time.encode(message.updated_at, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.count); - return writer; - }; - - /** - * Encodes the specified Log message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {vtctldata.Workflow.Stream.ILog} message Log message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Log.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Log message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.Stream.Log} Log - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Log.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream.Log(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.stream_id = reader.int64(); - break; - case 3: - message.type = reader.string(); - break; - case 4: - message.state = reader.string(); - break; - case 5: - message.created_at = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 6: - message.updated_at = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 7: - message.message = reader.string(); - break; - case 8: - message.count = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Log message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.Stream.Log} Log - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Log.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Log message. - * @function verify - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Log.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.stream_id != null && message.hasOwnProperty("stream_id")) - if (!$util.isInteger(message.stream_id) && !(message.stream_id && $util.isInteger(message.stream_id.low) && $util.isInteger(message.stream_id.high))) - return "stream_id: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - if (!$util.isString(message.state)) - return "state: string expected"; - if (message.created_at != null && message.hasOwnProperty("created_at")) { - var error = $root.vttime.Time.verify(message.created_at); - if (error) - return "created_at." + error; - } - if (message.updated_at != null && message.hasOwnProperty("updated_at")) { - var error = $root.vttime.Time.verify(message.updated_at); - if (error) - return "updated_at." + error; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - return null; - }; - - /** - * Creates a Log message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.Stream.Log} Log - */ - Log.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.Stream.Log) - return object; - var message = new $root.vtctldata.Workflow.Stream.Log(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - if (object.stream_id != null) - if ($util.Long) - (message.stream_id = $util.Long.fromValue(object.stream_id)).unsigned = false; - else if (typeof object.stream_id === "string") - message.stream_id = parseInt(object.stream_id, 10); - else if (typeof object.stream_id === "number") - message.stream_id = object.stream_id; - else if (typeof object.stream_id === "object") - message.stream_id = new $util.LongBits(object.stream_id.low >>> 0, object.stream_id.high >>> 0).toNumber(); - if (object.type != null) - message.type = String(object.type); - if (object.state != null) - message.state = String(object.state); - if (object.created_at != null) { - if (typeof object.created_at !== "object") - throw TypeError(".vtctldata.Workflow.Stream.Log.created_at: object expected"); - message.created_at = $root.vttime.Time.fromObject(object.created_at); - } - if (object.updated_at != null) { - if (typeof object.updated_at !== "object") - throw TypeError(".vtctldata.Workflow.Stream.Log.updated_at: object expected"); - message.updated_at = $root.vttime.Time.fromObject(object.updated_at); - } - if (object.message != null) - message.message = String(object.message); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - return message; - }; + /** + * Verifies a TransactionMetadata message. + * @function verify + * @memberof query.TransactionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransactionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dtid != null && message.hasOwnProperty("dtid")) + if (!$util.isString(message.dtid)) + return "dtid: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.time_created != null && message.hasOwnProperty("time_created")) + if (!$util.isInteger(message.time_created) && !(message.time_created && $util.isInteger(message.time_created.low) && $util.isInteger(message.time_created.high))) + return "time_created: integer|Long expected"; + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) { + var error = $root.query.Target.verify(message.participants[i]); + if (error) + return "participants." + error; + } + } + return null; + }; - /** - * Creates a plain object from a Log message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.Stream.Log - * @static - * @param {vtctldata.Workflow.Stream.Log} message Log - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Log.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.stream_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.stream_id = options.longs === String ? "0" : 0; - object.type = ""; - object.state = ""; - object.created_at = null; - object.updated_at = null; - object.message = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.stream_id != null && message.hasOwnProperty("stream_id")) - if (typeof message.stream_id === "number") - object.stream_id = options.longs === String ? String(message.stream_id) : message.stream_id; - else - object.stream_id = options.longs === String ? $util.Long.prototype.toString.call(message.stream_id) : options.longs === Number ? new $util.LongBits(message.stream_id.low >>> 0, message.stream_id.high >>> 0).toNumber() : message.stream_id; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = message.state; - if (message.created_at != null && message.hasOwnProperty("created_at")) - object.created_at = $root.vttime.Time.toObject(message.created_at, options); - if (message.updated_at != null && message.hasOwnProperty("updated_at")) - object.updated_at = $root.vttime.Time.toObject(message.updated_at, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - return object; - }; + /** + * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.TransactionMetadata + * @static + * @param {Object.} object Plain object + * @returns {query.TransactionMetadata} TransactionMetadata + */ + TransactionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.query.TransactionMetadata) + return object; + var message = new $root.query.TransactionMetadata(); + if (object.dtid != null) + message.dtid = String(object.dtid); + switch (object.state) { + case "UNKNOWN": + case 0: + message.state = 0; + break; + case "PREPARE": + case 1: + message.state = 1; + break; + case "COMMIT": + case 2: + message.state = 2; + break; + case "ROLLBACK": + case 3: + message.state = 3; + break; + } + if (object.time_created != null) + if ($util.Long) + (message.time_created = $util.Long.fromValue(object.time_created)).unsigned = false; + else if (typeof object.time_created === "string") + message.time_created = parseInt(object.time_created, 10); + else if (typeof object.time_created === "number") + message.time_created = object.time_created; + else if (typeof object.time_created === "object") + message.time_created = new $util.LongBits(object.time_created.low >>> 0, object.time_created.high >>> 0).toNumber(); + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".query.TransactionMetadata.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) { + if (typeof object.participants[i] !== "object") + throw TypeError(".query.TransactionMetadata.participants: object expected"); + message.participants[i] = $root.query.Target.fromObject(object.participants[i]); + } + } + return message; + }; - /** - * Converts this Log to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.Stream.Log - * @instance - * @returns {Object.} JSON object - */ - Log.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof query.TransactionMetadata + * @static + * @param {query.TransactionMetadata} message TransactionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransactionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.participants = []; + if (options.defaults) { + object.dtid = ""; + object.state = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.time_created = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.time_created = options.longs === String ? "0" : 0; + } + if (message.dtid != null && message.hasOwnProperty("dtid")) + object.dtid = message.dtid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.query.TransactionState[message.state] : message.state; + if (message.time_created != null && message.hasOwnProperty("time_created")) + if (typeof message.time_created === "number") + object.time_created = options.longs === String ? String(message.time_created) : message.time_created; + else + object.time_created = options.longs === String ? $util.Long.prototype.toString.call(message.time_created) : options.longs === Number ? new $util.LongBits(message.time_created.low >>> 0, message.time_created.high >>> 0).toNumber() : message.time_created; + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = $root.query.Target.toObject(message.participants[j], options); + } + return object; + }; - return Log; - })(); + /** + * Converts this TransactionMetadata to JSON. + * @function toJSON + * @memberof query.TransactionMetadata + * @instance + * @returns {Object.} JSON object + */ + TransactionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Stream; - })(); + return TransactionMetadata; + })(); - return Workflow; + /** + * SchemaTableType enum. + * @name query.SchemaTableType + * @enum {number} + * @property {number} VIEWS=0 VIEWS value + * @property {number} TABLES=1 TABLES value + * @property {number} ALL=2 ALL value + */ + query.SchemaTableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEWS"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "ALL"] = 2; + return values; })(); - vtctldata.AddCellInfoRequest = (function() { + query.GetSchemaRequest = (function() { /** - * Properties of an AddCellInfoRequest. - * @memberof vtctldata - * @interface IAddCellInfoRequest - * @property {string|null} [name] AddCellInfoRequest name - * @property {topodata.ICellInfo|null} [cell_info] AddCellInfoRequest cell_info + * Properties of a GetSchemaRequest. + * @memberof query + * @interface IGetSchemaRequest + * @property {query.ITarget|null} [target] GetSchemaRequest target + * @property {query.SchemaTableType|null} [table_type] GetSchemaRequest table_type + * @property {Array.|null} [table_names] GetSchemaRequest table_names */ /** - * Constructs a new AddCellInfoRequest. - * @memberof vtctldata - * @classdesc Represents an AddCellInfoRequest. - * @implements IAddCellInfoRequest + * Constructs a new GetSchemaRequest. + * @memberof query + * @classdesc Represents a GetSchemaRequest. + * @implements IGetSchemaRequest * @constructor - * @param {vtctldata.IAddCellInfoRequest=} [properties] Properties to set + * @param {query.IGetSchemaRequest=} [properties] Properties to set */ - function AddCellInfoRequest(properties) { + function GetSchemaRequest(properties) { + this.table_names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83618,88 +83282,104 @@ $root.vtctldata = (function() { } /** - * AddCellInfoRequest name. - * @member {string} name - * @memberof vtctldata.AddCellInfoRequest + * GetSchemaRequest target. + * @member {query.ITarget|null|undefined} target + * @memberof query.GetSchemaRequest * @instance */ - AddCellInfoRequest.prototype.name = ""; + GetSchemaRequest.prototype.target = null; /** - * AddCellInfoRequest cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.AddCellInfoRequest + * GetSchemaRequest table_type. + * @member {query.SchemaTableType} table_type + * @memberof query.GetSchemaRequest * @instance */ - AddCellInfoRequest.prototype.cell_info = null; + GetSchemaRequest.prototype.table_type = 0; /** - * Creates a new AddCellInfoRequest instance using the specified properties. + * GetSchemaRequest table_names. + * @member {Array.} table_names + * @memberof query.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_names = $util.emptyArray; + + /** + * Creates a new GetSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static - * @param {vtctldata.IAddCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest instance + * @param {query.IGetSchemaRequest=} [properties] Properties to set + * @returns {query.GetSchemaRequest} GetSchemaRequest instance */ - AddCellInfoRequest.create = function create(properties) { - return new AddCellInfoRequest(properties); + GetSchemaRequest.create = function create(properties) { + return new GetSchemaRequest(properties); }; /** - * Encodes the specified AddCellInfoRequest message. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static - * @param {vtctldata.IAddCellInfoRequest} message AddCellInfoRequest message or plain object to encode + * @param {query.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellInfoRequest.encode = function encode(message, writer) { + GetSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.query.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.table_type != null && Object.hasOwnProperty.call(message, "table_type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.table_type); + if (message.table_names != null && message.table_names.length) + for (var i = 0; i < message.table_names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.table_names[i]); return writer; }; /** - * Encodes the specified AddCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link query.GetSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static - * @param {vtctldata.IAddCellInfoRequest} message AddCellInfoRequest message or plain object to encode + * @param {query.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddCellInfoRequest message from the specified reader or buffer. + * Decodes a GetSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest + * @returns {query.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellInfoRequest.decode = function decode(reader, length) { + GetSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellInfoRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.GetSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.target = $root.query.Target.decode(reader, reader.uint32()); break; case 2: - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + message.table_type = reader.int32(); + break; + case 3: + if (!(message.table_names && message.table_names.length)) + message.table_names = []; + message.table_names.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -83710,120 +83390,161 @@ $root.vtctldata = (function() { }; /** - * Decodes an AddCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest + * @returns {query.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AddCellInfoRequest message. + * Verifies a GetSchemaRequest message. * @function verify - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AddCellInfoRequest.verify = function verify(message) { + GetSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - var error = $root.topodata.CellInfo.verify(message.cell_info); + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.query.Target.verify(message.target); if (error) - return "cell_info." + error; + return "target." + error; + } + if (message.table_type != null && message.hasOwnProperty("table_type")) + switch (message.table_type) { + default: + return "table_type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.table_names != null && message.hasOwnProperty("table_names")) { + if (!Array.isArray(message.table_names)) + return "table_names: array expected"; + for (var i = 0; i < message.table_names.length; ++i) + if (!$util.isString(message.table_names[i])) + return "table_names: string[] expected"; + } + return null; + }; + + /** + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof query.GetSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {query.GetSchemaRequest} GetSchemaRequest + */ + GetSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.query.GetSchemaRequest) + return object; + var message = new $root.query.GetSchemaRequest(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".query.GetSchemaRequest.target: object expected"); + message.target = $root.query.Target.fromObject(object.target); + } + switch (object.table_type) { + case "VIEWS": + case 0: + message.table_type = 0; + break; + case "TABLES": + case 1: + message.table_type = 1; + break; + case "ALL": + case 2: + message.table_type = 2; + break; } - return null; - }; - - /** - * Creates an AddCellInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.AddCellInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest - */ - AddCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.AddCellInfoRequest) - return object; - var message = new $root.vtctldata.AddCellInfoRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.AddCellInfoRequest.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + if (object.table_names) { + if (!Array.isArray(object.table_names)) + throw TypeError(".query.GetSchemaRequest.table_names: array expected"); + message.table_names = []; + for (var i = 0; i < object.table_names.length; ++i) + message.table_names[i] = String(object.table_names[i]); } return message; }; /** - * Creates a plain object from an AddCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @static - * @param {vtctldata.AddCellInfoRequest} message AddCellInfoRequest + * @param {query.GetSchemaRequest} message GetSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddCellInfoRequest.toObject = function toObject(message, options) { + GetSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.table_names = []; if (options.defaults) { - object.name = ""; - object.cell_info = null; + object.target = null; + object.table_type = options.enums === String ? "VIEWS" : 0; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.query.Target.toObject(message.target, options); + if (message.table_type != null && message.hasOwnProperty("table_type")) + object.table_type = options.enums === String ? $root.query.SchemaTableType[message.table_type] : message.table_type; + if (message.table_names && message.table_names.length) { + object.table_names = []; + for (var j = 0; j < message.table_names.length; ++j) + object.table_names[j] = message.table_names[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); return object; }; /** - * Converts this AddCellInfoRequest to JSON. + * Converts this GetSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.AddCellInfoRequest + * @memberof query.GetSchemaRequest * @instance * @returns {Object.} JSON object */ - AddCellInfoRequest.prototype.toJSON = function toJSON() { + GetSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AddCellInfoRequest; + return GetSchemaRequest; })(); - vtctldata.AddCellInfoResponse = (function() { + query.GetSchemaResponse = (function() { /** - * Properties of an AddCellInfoResponse. - * @memberof vtctldata - * @interface IAddCellInfoResponse + * Properties of a GetSchemaResponse. + * @memberof query + * @interface IGetSchemaResponse + * @property {Object.|null} [table_definition] GetSchemaResponse table_definition */ /** - * Constructs a new AddCellInfoResponse. - * @memberof vtctldata - * @classdesc Represents an AddCellInfoResponse. - * @implements IAddCellInfoResponse + * Constructs a new GetSchemaResponse. + * @memberof query + * @classdesc Represents a GetSchemaResponse. + * @implements IGetSchemaResponse * @constructor - * @param {vtctldata.IAddCellInfoResponse=} [properties] Properties to set + * @param {query.IGetSchemaResponse=} [properties] Properties to set */ - function AddCellInfoResponse(properties) { + function GetSchemaResponse(properties) { + this.table_definition = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83831,63 +83552,96 @@ $root.vtctldata = (function() { } /** - * Creates a new AddCellInfoResponse instance using the specified properties. + * GetSchemaResponse table_definition. + * @member {Object.} table_definition + * @memberof query.GetSchemaResponse + * @instance + */ + GetSchemaResponse.prototype.table_definition = $util.emptyObject; + + /** + * Creates a new GetSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static - * @param {vtctldata.IAddCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse instance + * @param {query.IGetSchemaResponse=} [properties] Properties to set + * @returns {query.GetSchemaResponse} GetSchemaResponse instance */ - AddCellInfoResponse.create = function create(properties) { - return new AddCellInfoResponse(properties); + GetSchemaResponse.create = function create(properties) { + return new GetSchemaResponse(properties); }; /** - * Encodes the specified AddCellInfoResponse message. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. + * Encodes the specified GetSchemaResponse message. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static - * @param {vtctldata.IAddCellInfoResponse} message AddCellInfoResponse message or plain object to encode + * @param {query.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellInfoResponse.encode = function encode(message, writer) { + GetSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.table_definition != null && Object.hasOwnProperty.call(message, "table_definition")) + for (var keys = Object.keys(message.table_definition), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.table_definition[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified AddCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. + * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link query.GetSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static - * @param {vtctldata.IAddCellInfoResponse} message AddCellInfoResponse message or plain object to encode + * @param {query.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddCellInfoResponse message from the specified reader or buffer. + * Decodes a GetSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse + * @returns {query.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellInfoResponse.decode = function decode(reader, length) { + GetSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellInfoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.GetSchemaResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + if (message.table_definition === $util.emptyObject) + message.table_definition = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.table_definition[key] = value; + break; default: reader.skipType(tag & 7); break; @@ -83897,96 +83651,154 @@ $root.vtctldata = (function() { }; /** - * Decodes an AddCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse + * @returns {query.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AddCellInfoResponse message. + * Verifies a GetSchemaResponse message. * @function verify - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AddCellInfoResponse.verify = function verify(message) { + GetSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.table_definition != null && message.hasOwnProperty("table_definition")) { + if (!$util.isObject(message.table_definition)) + return "table_definition: object expected"; + var key = Object.keys(message.table_definition); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.table_definition[key[i]])) + return "table_definition: string{k:string} expected"; + } return null; }; /** - * Creates an AddCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse + * @returns {query.GetSchemaResponse} GetSchemaResponse */ - AddCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.AddCellInfoResponse) + GetSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.query.GetSchemaResponse) return object; - return new $root.vtctldata.AddCellInfoResponse(); + var message = new $root.query.GetSchemaResponse(); + if (object.table_definition) { + if (typeof object.table_definition !== "object") + throw TypeError(".query.GetSchemaResponse.table_definition: object expected"); + message.table_definition = {}; + for (var keys = Object.keys(object.table_definition), i = 0; i < keys.length; ++i) + message.table_definition[keys[i]] = String(object.table_definition[keys[i]]); + } + return message; }; /** - * Creates a plain object from an AddCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @static - * @param {vtctldata.AddCellInfoResponse} message AddCellInfoResponse + * @param {query.GetSchemaResponse} message GetSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddCellInfoResponse.toObject = function toObject() { - return {}; + GetSchemaResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.table_definition = {}; + var keys2; + if (message.table_definition && (keys2 = Object.keys(message.table_definition)).length) { + object.table_definition = {}; + for (var j = 0; j < keys2.length; ++j) + object.table_definition[keys2[j]] = message.table_definition[keys2[j]]; + } + return object; }; /** - * Converts this AddCellInfoResponse to JSON. + * Converts this GetSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.AddCellInfoResponse + * @memberof query.GetSchemaResponse * @instance * @returns {Object.} JSON object */ - AddCellInfoResponse.prototype.toJSON = function toJSON() { + GetSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AddCellInfoResponse; + return GetSchemaResponse; })(); - vtctldata.AddCellsAliasRequest = (function() { + return query; +})(); + +$root.replicationdata = (function() { + + /** + * Namespace replicationdata. + * @exports replicationdata + * @namespace + */ + var replicationdata = {}; + + replicationdata.Status = (function() { /** - * Properties of an AddCellsAliasRequest. - * @memberof vtctldata - * @interface IAddCellsAliasRequest - * @property {string|null} [name] AddCellsAliasRequest name - * @property {Array.|null} [cells] AddCellsAliasRequest cells + * Properties of a Status. + * @memberof replicationdata + * @interface IStatus + * @property {string|null} [position] Status position + * @property {number|null} [replication_lag_seconds] Status replication_lag_seconds + * @property {string|null} [source_host] Status source_host + * @property {number|null} [source_port] Status source_port + * @property {number|null} [connect_retry] Status connect_retry + * @property {string|null} [relay_log_position] Status relay_log_position + * @property {string|null} [file_position] Status file_position + * @property {string|null} [relay_log_source_binlog_equivalent_position] Status relay_log_source_binlog_equivalent_position + * @property {number|null} [source_server_id] Status source_server_id + * @property {string|null} [source_uuid] Status source_uuid + * @property {number|null} [io_state] Status io_state + * @property {string|null} [last_io_error] Status last_io_error + * @property {number|null} [sql_state] Status sql_state + * @property {string|null} [last_sql_error] Status last_sql_error + * @property {string|null} [relay_log_file_position] Status relay_log_file_position + * @property {string|null} [source_user] Status source_user + * @property {number|null} [sql_delay] Status sql_delay + * @property {boolean|null} [auto_position] Status auto_position + * @property {boolean|null} [using_gtid] Status using_gtid + * @property {boolean|null} [has_replication_filters] Status has_replication_filters + * @property {boolean|null} [ssl_allowed] Status ssl_allowed + * @property {boolean|null} [replication_lag_unknown] Status replication_lag_unknown */ /** - * Constructs a new AddCellsAliasRequest. - * @memberof vtctldata - * @classdesc Represents an AddCellsAliasRequest. - * @implements IAddCellsAliasRequest + * Constructs a new Status. + * @memberof replicationdata + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {vtctldata.IAddCellsAliasRequest=} [properties] Properties to set + * @param {replicationdata.IStatus=} [properties] Properties to set */ - function AddCellsAliasRequest(properties) { - this.cells = []; + function Status(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83994,91 +83806,348 @@ $root.vtctldata = (function() { } /** - * AddCellsAliasRequest name. - * @member {string} name - * @memberof vtctldata.AddCellsAliasRequest + * Status position. + * @member {string} position + * @memberof replicationdata.Status * @instance */ - AddCellsAliasRequest.prototype.name = ""; + Status.prototype.position = ""; /** - * AddCellsAliasRequest cells. - * @member {Array.} cells - * @memberof vtctldata.AddCellsAliasRequest + * Status replication_lag_seconds. + * @member {number} replication_lag_seconds + * @memberof replicationdata.Status * @instance */ - AddCellsAliasRequest.prototype.cells = $util.emptyArray; + Status.prototype.replication_lag_seconds = 0; /** - * Creates a new AddCellsAliasRequest instance using the specified properties. + * Status source_host. + * @member {string} source_host + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.source_host = ""; + + /** + * Status source_port. + * @member {number} source_port + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.source_port = 0; + + /** + * Status connect_retry. + * @member {number} connect_retry + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.connect_retry = 0; + + /** + * Status relay_log_position. + * @member {string} relay_log_position + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.relay_log_position = ""; + + /** + * Status file_position. + * @member {string} file_position + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.file_position = ""; + + /** + * Status relay_log_source_binlog_equivalent_position. + * @member {string} relay_log_source_binlog_equivalent_position + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.relay_log_source_binlog_equivalent_position = ""; + + /** + * Status source_server_id. + * @member {number} source_server_id + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.source_server_id = 0; + + /** + * Status source_uuid. + * @member {string} source_uuid + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.source_uuid = ""; + + /** + * Status io_state. + * @member {number} io_state + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.io_state = 0; + + /** + * Status last_io_error. + * @member {string} last_io_error + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.last_io_error = ""; + + /** + * Status sql_state. + * @member {number} sql_state + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.sql_state = 0; + + /** + * Status last_sql_error. + * @member {string} last_sql_error + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.last_sql_error = ""; + + /** + * Status relay_log_file_position. + * @member {string} relay_log_file_position + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.relay_log_file_position = ""; + + /** + * Status source_user. + * @member {string} source_user + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.source_user = ""; + + /** + * Status sql_delay. + * @member {number} sql_delay + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.sql_delay = 0; + + /** + * Status auto_position. + * @member {boolean} auto_position + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.auto_position = false; + + /** + * Status using_gtid. + * @member {boolean} using_gtid + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.using_gtid = false; + + /** + * Status has_replication_filters. + * @member {boolean} has_replication_filters + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.has_replication_filters = false; + + /** + * Status ssl_allowed. + * @member {boolean} ssl_allowed + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.ssl_allowed = false; + + /** + * Status replication_lag_unknown. + * @member {boolean} replication_lag_unknown + * @memberof replicationdata.Status + * @instance + */ + Status.prototype.replication_lag_unknown = false; + + /** + * Creates a new Status instance using the specified properties. * @function create - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static - * @param {vtctldata.IAddCellsAliasRequest=} [properties] Properties to set - * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest instance + * @param {replicationdata.IStatus=} [properties] Properties to set + * @returns {replicationdata.Status} Status instance */ - AddCellsAliasRequest.create = function create(properties) { - return new AddCellsAliasRequest(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified AddCellsAliasRequest message. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. * @function encode - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static - * @param {vtctldata.IAddCellsAliasRequest} message AddCellsAliasRequest message or plain object to encode + * @param {replicationdata.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellsAliasRequest.encode = function encode(message, writer) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); + if (message.replication_lag_seconds != null && Object.hasOwnProperty.call(message, "replication_lag_seconds")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.replication_lag_seconds); + if (message.source_host != null && Object.hasOwnProperty.call(message, "source_host")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_host); + if (message.source_port != null && Object.hasOwnProperty.call(message, "source_port")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.source_port); + if (message.connect_retry != null && Object.hasOwnProperty.call(message, "connect_retry")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.connect_retry); + if (message.relay_log_position != null && Object.hasOwnProperty.call(message, "relay_log_position")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.relay_log_position); + if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.file_position); + if (message.relay_log_source_binlog_equivalent_position != null && Object.hasOwnProperty.call(message, "relay_log_source_binlog_equivalent_position")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.relay_log_source_binlog_equivalent_position); + if (message.source_server_id != null && Object.hasOwnProperty.call(message, "source_server_id")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.source_server_id); + if (message.source_uuid != null && Object.hasOwnProperty.call(message, "source_uuid")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.source_uuid); + if (message.io_state != null && Object.hasOwnProperty.call(message, "io_state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.io_state); + if (message.last_io_error != null && Object.hasOwnProperty.call(message, "last_io_error")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.last_io_error); + if (message.sql_state != null && Object.hasOwnProperty.call(message, "sql_state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.sql_state); + if (message.last_sql_error != null && Object.hasOwnProperty.call(message, "last_sql_error")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.last_sql_error); + if (message.relay_log_file_position != null && Object.hasOwnProperty.call(message, "relay_log_file_position")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.relay_log_file_position); + if (message.source_user != null && Object.hasOwnProperty.call(message, "source_user")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.source_user); + if (message.sql_delay != null && Object.hasOwnProperty.call(message, "sql_delay")) + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.sql_delay); + if (message.auto_position != null && Object.hasOwnProperty.call(message, "auto_position")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.auto_position); + if (message.using_gtid != null && Object.hasOwnProperty.call(message, "using_gtid")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.using_gtid); + if (message.has_replication_filters != null && Object.hasOwnProperty.call(message, "has_replication_filters")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.has_replication_filters); + if (message.ssl_allowed != null && Object.hasOwnProperty.call(message, "ssl_allowed")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.ssl_allowed); + if (message.replication_lag_unknown != null && Object.hasOwnProperty.call(message, "replication_lag_unknown")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.replication_lag_unknown); return writer; }; /** - * Encodes the specified AddCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static - * @param {vtctldata.IAddCellsAliasRequest} message AddCellsAliasRequest message or plain object to encode + * @param {replicationdata.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddCellsAliasRequest message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest + * @returns {replicationdata.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellsAliasRequest.decode = function decode(reader, length) { + Status.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellsAliasRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.position = reader.string(); break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + case 4: + message.replication_lag_seconds = reader.uint32(); + break; + case 5: + message.source_host = reader.string(); + break; + case 6: + message.source_port = reader.int32(); + break; + case 7: + message.connect_retry = reader.int32(); + break; + case 8: + message.relay_log_position = reader.string(); + break; + case 9: + message.file_position = reader.string(); + break; + case 10: + message.relay_log_source_binlog_equivalent_position = reader.string(); + break; + case 11: + message.source_server_id = reader.uint32(); + break; + case 12: + message.source_uuid = reader.string(); + break; + case 13: + message.io_state = reader.int32(); + break; + case 14: + message.last_io_error = reader.string(); + break; + case 15: + message.sql_state = reader.int32(); + break; + case 16: + message.last_sql_error = reader.string(); + break; + case 17: + message.relay_log_file_position = reader.string(); + break; + case 18: + message.source_user = reader.string(); + break; + case 19: + message.sql_delay = reader.uint32(); + break; + case 20: + message.auto_position = reader.bool(); + break; + case 21: + message.using_gtid = reader.bool(); + break; + case 22: + message.has_replication_filters = reader.bool(); + break; + case 23: + message.ssl_allowed = reader.bool(); + break; + case 24: + message.replication_lag_unknown = reader.bool(); break; default: reader.skipType(tag & 7); @@ -84089,127 +84158,277 @@ $root.vtctldata = (function() { }; /** - * Decodes an AddCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest + * @returns {replicationdata.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AddCellsAliasRequest message. + * Verifies a Status message. * @function verify - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AddCellsAliasRequest.verify = function verify(message) { + Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) + if (!$util.isInteger(message.replication_lag_seconds)) + return "replication_lag_seconds: integer expected"; + if (message.source_host != null && message.hasOwnProperty("source_host")) + if (!$util.isString(message.source_host)) + return "source_host: string expected"; + if (message.source_port != null && message.hasOwnProperty("source_port")) + if (!$util.isInteger(message.source_port)) + return "source_port: integer expected"; + if (message.connect_retry != null && message.hasOwnProperty("connect_retry")) + if (!$util.isInteger(message.connect_retry)) + return "connect_retry: integer expected"; + if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) + if (!$util.isString(message.relay_log_position)) + return "relay_log_position: string expected"; + if (message.file_position != null && message.hasOwnProperty("file_position")) + if (!$util.isString(message.file_position)) + return "file_position: string expected"; + if (message.relay_log_source_binlog_equivalent_position != null && message.hasOwnProperty("relay_log_source_binlog_equivalent_position")) + if (!$util.isString(message.relay_log_source_binlog_equivalent_position)) + return "relay_log_source_binlog_equivalent_position: string expected"; + if (message.source_server_id != null && message.hasOwnProperty("source_server_id")) + if (!$util.isInteger(message.source_server_id)) + return "source_server_id: integer expected"; + if (message.source_uuid != null && message.hasOwnProperty("source_uuid")) + if (!$util.isString(message.source_uuid)) + return "source_uuid: string expected"; + if (message.io_state != null && message.hasOwnProperty("io_state")) + if (!$util.isInteger(message.io_state)) + return "io_state: integer expected"; + if (message.last_io_error != null && message.hasOwnProperty("last_io_error")) + if (!$util.isString(message.last_io_error)) + return "last_io_error: string expected"; + if (message.sql_state != null && message.hasOwnProperty("sql_state")) + if (!$util.isInteger(message.sql_state)) + return "sql_state: integer expected"; + if (message.last_sql_error != null && message.hasOwnProperty("last_sql_error")) + if (!$util.isString(message.last_sql_error)) + return "last_sql_error: string expected"; + if (message.relay_log_file_position != null && message.hasOwnProperty("relay_log_file_position")) + if (!$util.isString(message.relay_log_file_position)) + return "relay_log_file_position: string expected"; + if (message.source_user != null && message.hasOwnProperty("source_user")) + if (!$util.isString(message.source_user)) + return "source_user: string expected"; + if (message.sql_delay != null && message.hasOwnProperty("sql_delay")) + if (!$util.isInteger(message.sql_delay)) + return "sql_delay: integer expected"; + if (message.auto_position != null && message.hasOwnProperty("auto_position")) + if (typeof message.auto_position !== "boolean") + return "auto_position: boolean expected"; + if (message.using_gtid != null && message.hasOwnProperty("using_gtid")) + if (typeof message.using_gtid !== "boolean") + return "using_gtid: boolean expected"; + if (message.has_replication_filters != null && message.hasOwnProperty("has_replication_filters")) + if (typeof message.has_replication_filters !== "boolean") + return "has_replication_filters: boolean expected"; + if (message.ssl_allowed != null && message.hasOwnProperty("ssl_allowed")) + if (typeof message.ssl_allowed !== "boolean") + return "ssl_allowed: boolean expected"; + if (message.replication_lag_unknown != null && message.hasOwnProperty("replication_lag_unknown")) + if (typeof message.replication_lag_unknown !== "boolean") + return "replication_lag_unknown: boolean expected"; return null; }; /** - * Creates an AddCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static * @param {Object.} object Plain object - * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest + * @returns {replicationdata.Status} Status */ - AddCellsAliasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.AddCellsAliasRequest) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.replicationdata.Status) return object; - var message = new $root.vtctldata.AddCellsAliasRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.AddCellsAliasRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } + var message = new $root.replicationdata.Status(); + if (object.position != null) + message.position = String(object.position); + if (object.replication_lag_seconds != null) + message.replication_lag_seconds = object.replication_lag_seconds >>> 0; + if (object.source_host != null) + message.source_host = String(object.source_host); + if (object.source_port != null) + message.source_port = object.source_port | 0; + if (object.connect_retry != null) + message.connect_retry = object.connect_retry | 0; + if (object.relay_log_position != null) + message.relay_log_position = String(object.relay_log_position); + if (object.file_position != null) + message.file_position = String(object.file_position); + if (object.relay_log_source_binlog_equivalent_position != null) + message.relay_log_source_binlog_equivalent_position = String(object.relay_log_source_binlog_equivalent_position); + if (object.source_server_id != null) + message.source_server_id = object.source_server_id >>> 0; + if (object.source_uuid != null) + message.source_uuid = String(object.source_uuid); + if (object.io_state != null) + message.io_state = object.io_state | 0; + if (object.last_io_error != null) + message.last_io_error = String(object.last_io_error); + if (object.sql_state != null) + message.sql_state = object.sql_state | 0; + if (object.last_sql_error != null) + message.last_sql_error = String(object.last_sql_error); + if (object.relay_log_file_position != null) + message.relay_log_file_position = String(object.relay_log_file_position); + if (object.source_user != null) + message.source_user = String(object.source_user); + if (object.sql_delay != null) + message.sql_delay = object.sql_delay >>> 0; + if (object.auto_position != null) + message.auto_position = Boolean(object.auto_position); + if (object.using_gtid != null) + message.using_gtid = Boolean(object.using_gtid); + if (object.has_replication_filters != null) + message.has_replication_filters = Boolean(object.has_replication_filters); + if (object.ssl_allowed != null) + message.ssl_allowed = Boolean(object.ssl_allowed); + if (object.replication_lag_unknown != null) + message.replication_lag_unknown = Boolean(object.replication_lag_unknown); return message; }; /** - * Creates a plain object from an AddCellsAliasRequest message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @static - * @param {vtctldata.AddCellsAliasRequest} message AddCellsAliasRequest + * @param {replicationdata.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddCellsAliasRequest.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (options.defaults) { + object.position = ""; + object.replication_lag_seconds = 0; + object.source_host = ""; + object.source_port = 0; + object.connect_retry = 0; + object.relay_log_position = ""; + object.file_position = ""; + object.relay_log_source_binlog_equivalent_position = ""; + object.source_server_id = 0; + object.source_uuid = ""; + object.io_state = 0; + object.last_io_error = ""; + object.sql_state = 0; + object.last_sql_error = ""; + object.relay_log_file_position = ""; + object.source_user = ""; + object.sql_delay = 0; + object.auto_position = false; + object.using_gtid = false; + object.has_replication_filters = false; + object.ssl_allowed = false; + object.replication_lag_unknown = false; } + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.replication_lag_seconds != null && message.hasOwnProperty("replication_lag_seconds")) + object.replication_lag_seconds = message.replication_lag_seconds; + if (message.source_host != null && message.hasOwnProperty("source_host")) + object.source_host = message.source_host; + if (message.source_port != null && message.hasOwnProperty("source_port")) + object.source_port = message.source_port; + if (message.connect_retry != null && message.hasOwnProperty("connect_retry")) + object.connect_retry = message.connect_retry; + if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) + object.relay_log_position = message.relay_log_position; + if (message.file_position != null && message.hasOwnProperty("file_position")) + object.file_position = message.file_position; + if (message.relay_log_source_binlog_equivalent_position != null && message.hasOwnProperty("relay_log_source_binlog_equivalent_position")) + object.relay_log_source_binlog_equivalent_position = message.relay_log_source_binlog_equivalent_position; + if (message.source_server_id != null && message.hasOwnProperty("source_server_id")) + object.source_server_id = message.source_server_id; + if (message.source_uuid != null && message.hasOwnProperty("source_uuid")) + object.source_uuid = message.source_uuid; + if (message.io_state != null && message.hasOwnProperty("io_state")) + object.io_state = message.io_state; + if (message.last_io_error != null && message.hasOwnProperty("last_io_error")) + object.last_io_error = message.last_io_error; + if (message.sql_state != null && message.hasOwnProperty("sql_state")) + object.sql_state = message.sql_state; + if (message.last_sql_error != null && message.hasOwnProperty("last_sql_error")) + object.last_sql_error = message.last_sql_error; + if (message.relay_log_file_position != null && message.hasOwnProperty("relay_log_file_position")) + object.relay_log_file_position = message.relay_log_file_position; + if (message.source_user != null && message.hasOwnProperty("source_user")) + object.source_user = message.source_user; + if (message.sql_delay != null && message.hasOwnProperty("sql_delay")) + object.sql_delay = message.sql_delay; + if (message.auto_position != null && message.hasOwnProperty("auto_position")) + object.auto_position = message.auto_position; + if (message.using_gtid != null && message.hasOwnProperty("using_gtid")) + object.using_gtid = message.using_gtid; + if (message.has_replication_filters != null && message.hasOwnProperty("has_replication_filters")) + object.has_replication_filters = message.has_replication_filters; + if (message.ssl_allowed != null && message.hasOwnProperty("ssl_allowed")) + object.ssl_allowed = message.ssl_allowed; + if (message.replication_lag_unknown != null && message.hasOwnProperty("replication_lag_unknown")) + object.replication_lag_unknown = message.replication_lag_unknown; return object; }; /** - * Converts this AddCellsAliasRequest to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof vtctldata.AddCellsAliasRequest + * @memberof replicationdata.Status * @instance * @returns {Object.} JSON object */ - AddCellsAliasRequest.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AddCellsAliasRequest; + return Status; })(); - vtctldata.AddCellsAliasResponse = (function() { + replicationdata.StopReplicationStatus = (function() { /** - * Properties of an AddCellsAliasResponse. - * @memberof vtctldata - * @interface IAddCellsAliasResponse + * Properties of a StopReplicationStatus. + * @memberof replicationdata + * @interface IStopReplicationStatus + * @property {replicationdata.IStatus|null} [before] StopReplicationStatus before + * @property {replicationdata.IStatus|null} [after] StopReplicationStatus after */ /** - * Constructs a new AddCellsAliasResponse. - * @memberof vtctldata - * @classdesc Represents an AddCellsAliasResponse. - * @implements IAddCellsAliasResponse + * Constructs a new StopReplicationStatus. + * @memberof replicationdata + * @classdesc Represents a StopReplicationStatus. + * @implements IStopReplicationStatus * @constructor - * @param {vtctldata.IAddCellsAliasResponse=} [properties] Properties to set + * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set */ - function AddCellsAliasResponse(properties) { + function StopReplicationStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84217,63 +84436,89 @@ $root.vtctldata = (function() { } /** - * Creates a new AddCellsAliasResponse instance using the specified properties. + * StopReplicationStatus before. + * @member {replicationdata.IStatus|null|undefined} before + * @memberof replicationdata.StopReplicationStatus + * @instance + */ + StopReplicationStatus.prototype.before = null; + + /** + * StopReplicationStatus after. + * @member {replicationdata.IStatus|null|undefined} after + * @memberof replicationdata.StopReplicationStatus + * @instance + */ + StopReplicationStatus.prototype.after = null; + + /** + * Creates a new StopReplicationStatus instance using the specified properties. * @function create - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static - * @param {vtctldata.IAddCellsAliasResponse=} [properties] Properties to set - * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse instance + * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set + * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus instance */ - AddCellsAliasResponse.create = function create(properties) { - return new AddCellsAliasResponse(properties); + StopReplicationStatus.create = function create(properties) { + return new StopReplicationStatus(properties); }; /** - * Encodes the specified AddCellsAliasResponse message. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. + * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. * @function encode - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static - * @param {vtctldata.IAddCellsAliasResponse} message AddCellsAliasResponse message or plain object to encode + * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellsAliasResponse.encode = function encode(message, writer) { + StopReplicationStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.replicationdata.Status.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.replicationdata.Status.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AddCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. + * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static - * @param {vtctldata.IAddCellsAliasResponse} message AddCellsAliasResponse message or plain object to encode + * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { + StopReplicationStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddCellsAliasResponse message from the specified reader or buffer. + * Decodes a StopReplicationStatus message from the specified reader or buffer. * @function decode - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse + * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellsAliasResponse.decode = function decode(reader, length) { + StopReplicationStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellsAliasResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.StopReplicationStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.before = $root.replicationdata.Status.decode(reader, reader.uint32()); + break; + case 2: + message.after = $root.replicationdata.Status.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -84283,97 +84528,141 @@ $root.vtctldata = (function() { }; /** - * Decodes an AddCellsAliasResponse message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse + * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { + StopReplicationStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AddCellsAliasResponse message. + * Verifies a StopReplicationStatus message. * @function verify - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AddCellsAliasResponse.verify = function verify(message) { + StopReplicationStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.replicationdata.Status.verify(message.before); + if (error) + return "before." + error; + } + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.replicationdata.Status.verify(message.after); + if (error) + return "after." + error; + } return null; }; /** - * Creates an AddCellsAliasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static * @param {Object.} object Plain object - * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse + * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus */ - AddCellsAliasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.AddCellsAliasResponse) + StopReplicationStatus.fromObject = function fromObject(object) { + if (object instanceof $root.replicationdata.StopReplicationStatus) return object; - return new $root.vtctldata.AddCellsAliasResponse(); + var message = new $root.replicationdata.StopReplicationStatus(); + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".replicationdata.StopReplicationStatus.before: object expected"); + message.before = $root.replicationdata.Status.fromObject(object.before); + } + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".replicationdata.StopReplicationStatus.after: object expected"); + message.after = $root.replicationdata.Status.fromObject(object.after); + } + return message; }; /** - * Creates a plain object from an AddCellsAliasResponse message. Also converts values to other types if specified. + * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @static - * @param {vtctldata.AddCellsAliasResponse} message AddCellsAliasResponse + * @param {replicationdata.StopReplicationStatus} message StopReplicationStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddCellsAliasResponse.toObject = function toObject() { - return {}; + StopReplicationStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.before = null; + object.after = null; + } + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.replicationdata.Status.toObject(message.before, options); + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.replicationdata.Status.toObject(message.after, options); + return object; }; /** - * Converts this AddCellsAliasResponse to JSON. + * Converts this StopReplicationStatus to JSON. * @function toJSON - * @memberof vtctldata.AddCellsAliasResponse + * @memberof replicationdata.StopReplicationStatus * @instance * @returns {Object.} JSON object */ - AddCellsAliasResponse.prototype.toJSON = function toJSON() { + StopReplicationStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AddCellsAliasResponse; + return StopReplicationStatus; })(); - vtctldata.ApplyRoutingRulesRequest = (function() { + /** + * StopReplicationMode enum. + * @name replicationdata.StopReplicationMode + * @enum {number} + * @property {number} IOANDSQLTHREAD=0 IOANDSQLTHREAD value + * @property {number} IOTHREADONLY=1 IOTHREADONLY value + */ + replicationdata.StopReplicationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IOANDSQLTHREAD"] = 0; + values[valuesById[1] = "IOTHREADONLY"] = 1; + return values; + })(); + + replicationdata.PrimaryStatus = (function() { /** - * Properties of an ApplyRoutingRulesRequest. - * @memberof vtctldata - * @interface IApplyRoutingRulesRequest - * @property {vschema.IRoutingRules|null} [routing_rules] ApplyRoutingRulesRequest routing_rules - * @property {boolean|null} [skip_rebuild] ApplyRoutingRulesRequest skip_rebuild - * @property {Array.|null} [rebuild_cells] ApplyRoutingRulesRequest rebuild_cells + * Properties of a PrimaryStatus. + * @memberof replicationdata + * @interface IPrimaryStatus + * @property {string|null} [position] PrimaryStatus position + * @property {string|null} [file_position] PrimaryStatus file_position */ /** - * Constructs a new ApplyRoutingRulesRequest. - * @memberof vtctldata - * @classdesc Represents an ApplyRoutingRulesRequest. - * @implements IApplyRoutingRulesRequest + * Constructs a new PrimaryStatus. + * @memberof replicationdata + * @classdesc Represents a PrimaryStatus. + * @implements IPrimaryStatus * @constructor - * @param {vtctldata.IApplyRoutingRulesRequest=} [properties] Properties to set + * @param {replicationdata.IPrimaryStatus=} [properties] Properties to set */ - function ApplyRoutingRulesRequest(properties) { - this.rebuild_cells = []; + function PrimaryStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84381,104 +84670,88 @@ $root.vtctldata = (function() { } /** - * ApplyRoutingRulesRequest routing_rules. - * @member {vschema.IRoutingRules|null|undefined} routing_rules - * @memberof vtctldata.ApplyRoutingRulesRequest - * @instance - */ - ApplyRoutingRulesRequest.prototype.routing_rules = null; - - /** - * ApplyRoutingRulesRequest skip_rebuild. - * @member {boolean} skip_rebuild - * @memberof vtctldata.ApplyRoutingRulesRequest + * PrimaryStatus position. + * @member {string} position + * @memberof replicationdata.PrimaryStatus * @instance */ - ApplyRoutingRulesRequest.prototype.skip_rebuild = false; + PrimaryStatus.prototype.position = ""; /** - * ApplyRoutingRulesRequest rebuild_cells. - * @member {Array.} rebuild_cells - * @memberof vtctldata.ApplyRoutingRulesRequest + * PrimaryStatus file_position. + * @member {string} file_position + * @memberof replicationdata.PrimaryStatus * @instance */ - ApplyRoutingRulesRequest.prototype.rebuild_cells = $util.emptyArray; + PrimaryStatus.prototype.file_position = ""; /** - * Creates a new ApplyRoutingRulesRequest instance using the specified properties. + * Creates a new PrimaryStatus instance using the specified properties. * @function create - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static - * @param {vtctldata.IApplyRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest instance + * @param {replicationdata.IPrimaryStatus=} [properties] Properties to set + * @returns {replicationdata.PrimaryStatus} PrimaryStatus instance */ - ApplyRoutingRulesRequest.create = function create(properties) { - return new ApplyRoutingRulesRequest(properties); + PrimaryStatus.create = function create(properties) { + return new PrimaryStatus(properties); }; /** - * Encodes the specified ApplyRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. + * Encodes the specified PrimaryStatus message. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static - * @param {vtctldata.IApplyRoutingRulesRequest} message ApplyRoutingRulesRequest message or plain object to encode + * @param {replicationdata.IPrimaryStatus} message PrimaryStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyRoutingRulesRequest.encode = function encode(message, writer) { + PrimaryStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) - $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); - if (message.rebuild_cells != null && message.rebuild_cells.length) - for (var i = 0; i < message.rebuild_cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.rebuild_cells[i]); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); + if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.file_position); return writer; }; /** - * Encodes the specified ApplyRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. + * Encodes the specified PrimaryStatus message, length delimited. Does not implicitly {@link replicationdata.PrimaryStatus.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static - * @param {vtctldata.IApplyRoutingRulesRequest} message ApplyRoutingRulesRequest message or plain object to encode + * @param {replicationdata.IPrimaryStatus} message PrimaryStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + PrimaryStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer. + * Decodes a PrimaryStatus message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest + * @returns {replicationdata.PrimaryStatus} PrimaryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyRoutingRulesRequest.decode = function decode(reader, length) { + PrimaryStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyRoutingRulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.PrimaryStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); + message.position = reader.string(); break; case 2: - message.skip_rebuild = reader.bool(); - break; - case 3: - if (!(message.rebuild_cells && message.rebuild_cells.length)) - message.rebuild_cells = []; - message.rebuild_cells.push(reader.string()); + message.file_position = reader.string(); break; default: reader.skipType(tag & 7); @@ -84489,141 +84762,136 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a PrimaryStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest + * @returns {replicationdata.PrimaryStatus} PrimaryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + PrimaryStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyRoutingRulesRequest message. + * Verifies a PrimaryStatus message. * @function verify - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyRoutingRulesRequest.verify = function verify(message) { + PrimaryStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { - var error = $root.vschema.RoutingRules.verify(message.routing_rules); - if (error) - return "routing_rules." + error; - } - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - if (typeof message.skip_rebuild !== "boolean") - return "skip_rebuild: boolean expected"; - if (message.rebuild_cells != null && message.hasOwnProperty("rebuild_cells")) { - if (!Array.isArray(message.rebuild_cells)) - return "rebuild_cells: array expected"; - for (var i = 0; i < message.rebuild_cells.length; ++i) - if (!$util.isString(message.rebuild_cells[i])) - return "rebuild_cells: string[] expected"; - } + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.file_position != null && message.hasOwnProperty("file_position")) + if (!$util.isString(message.file_position)) + return "file_position: string expected"; return null; }; /** - * Creates an ApplyRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PrimaryStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest + * @returns {replicationdata.PrimaryStatus} PrimaryStatus */ - ApplyRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyRoutingRulesRequest) + PrimaryStatus.fromObject = function fromObject(object) { + if (object instanceof $root.replicationdata.PrimaryStatus) return object; - var message = new $root.vtctldata.ApplyRoutingRulesRequest(); - if (object.routing_rules != null) { - if (typeof object.routing_rules !== "object") - throw TypeError(".vtctldata.ApplyRoutingRulesRequest.routing_rules: object expected"); - message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); - } - if (object.skip_rebuild != null) - message.skip_rebuild = Boolean(object.skip_rebuild); - if (object.rebuild_cells) { - if (!Array.isArray(object.rebuild_cells)) - throw TypeError(".vtctldata.ApplyRoutingRulesRequest.rebuild_cells: array expected"); - message.rebuild_cells = []; - for (var i = 0; i < object.rebuild_cells.length; ++i) - message.rebuild_cells[i] = String(object.rebuild_cells[i]); - } + var message = new $root.replicationdata.PrimaryStatus(); + if (object.position != null) + message.position = String(object.position); + if (object.file_position != null) + message.file_position = String(object.file_position); return message; }; /** - * Creates a plain object from an ApplyRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a PrimaryStatus message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @static - * @param {vtctldata.ApplyRoutingRulesRequest} message ApplyRoutingRulesRequest + * @param {replicationdata.PrimaryStatus} message PrimaryStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplyRoutingRulesRequest.toObject = function toObject(message, options) { + PrimaryStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rebuild_cells = []; if (options.defaults) { - object.routing_rules = null; - object.skip_rebuild = false; - } - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) - object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - object.skip_rebuild = message.skip_rebuild; - if (message.rebuild_cells && message.rebuild_cells.length) { - object.rebuild_cells = []; - for (var j = 0; j < message.rebuild_cells.length; ++j) - object.rebuild_cells[j] = message.rebuild_cells[j]; + object.position = ""; + object.file_position = ""; } + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.file_position != null && message.hasOwnProperty("file_position")) + object.file_position = message.file_position; return object; }; /** - * Converts this ApplyRoutingRulesRequest to JSON. + * Converts this PrimaryStatus to JSON. * @function toJSON - * @memberof vtctldata.ApplyRoutingRulesRequest + * @memberof replicationdata.PrimaryStatus * @instance * @returns {Object.} JSON object */ - ApplyRoutingRulesRequest.prototype.toJSON = function toJSON() { + PrimaryStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyRoutingRulesRequest; + return PrimaryStatus; })(); - vtctldata.ApplyRoutingRulesResponse = (function() { + replicationdata.FullStatus = (function() { /** - * Properties of an ApplyRoutingRulesResponse. - * @memberof vtctldata - * @interface IApplyRoutingRulesResponse + * Properties of a FullStatus. + * @memberof replicationdata + * @interface IFullStatus + * @property {number|null} [server_id] FullStatus server_id + * @property {string|null} [server_uuid] FullStatus server_uuid + * @property {replicationdata.IStatus|null} [replication_status] FullStatus replication_status + * @property {replicationdata.IPrimaryStatus|null} [primary_status] FullStatus primary_status + * @property {string|null} [gtid_purged] FullStatus gtid_purged + * @property {string|null} [version] FullStatus version + * @property {string|null} [version_comment] FullStatus version_comment + * @property {boolean|null} [read_only] FullStatus read_only + * @property {string|null} [gtid_mode] FullStatus gtid_mode + * @property {string|null} [binlog_format] FullStatus binlog_format + * @property {string|null} [binlog_row_image] FullStatus binlog_row_image + * @property {boolean|null} [log_bin_enabled] FullStatus log_bin_enabled + * @property {boolean|null} [log_replica_updates] FullStatus log_replica_updates + * @property {boolean|null} [semi_sync_primary_enabled] FullStatus semi_sync_primary_enabled + * @property {boolean|null} [semi_sync_replica_enabled] FullStatus semi_sync_replica_enabled + * @property {boolean|null} [semi_sync_primary_status] FullStatus semi_sync_primary_status + * @property {boolean|null} [semi_sync_replica_status] FullStatus semi_sync_replica_status + * @property {number|null} [semi_sync_primary_clients] FullStatus semi_sync_primary_clients + * @property {number|Long|null} [semi_sync_primary_timeout] FullStatus semi_sync_primary_timeout + * @property {number|null} [semi_sync_wait_for_replica_count] FullStatus semi_sync_wait_for_replica_count + * @property {boolean|null} [super_read_only] FullStatus super_read_only */ /** - * Constructs a new ApplyRoutingRulesResponse. - * @memberof vtctldata - * @classdesc Represents an ApplyRoutingRulesResponse. - * @implements IApplyRoutingRulesResponse + * Constructs a new FullStatus. + * @memberof replicationdata + * @classdesc Represents a FullStatus. + * @implements IFullStatus * @constructor - * @param {vtctldata.IApplyRoutingRulesResponse=} [properties] Properties to set + * @param {replicationdata.IFullStatus=} [properties] Properties to set */ - function ApplyRoutingRulesResponse(properties) { + function FullStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84631,63 +84899,336 @@ $root.vtctldata = (function() { } /** - * Creates a new ApplyRoutingRulesResponse instance using the specified properties. + * FullStatus server_id. + * @member {number} server_id + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.server_id = 0; + + /** + * FullStatus server_uuid. + * @member {string} server_uuid + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.server_uuid = ""; + + /** + * FullStatus replication_status. + * @member {replicationdata.IStatus|null|undefined} replication_status + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.replication_status = null; + + /** + * FullStatus primary_status. + * @member {replicationdata.IPrimaryStatus|null|undefined} primary_status + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.primary_status = null; + + /** + * FullStatus gtid_purged. + * @member {string} gtid_purged + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.gtid_purged = ""; + + /** + * FullStatus version. + * @member {string} version + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.version = ""; + + /** + * FullStatus version_comment. + * @member {string} version_comment + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.version_comment = ""; + + /** + * FullStatus read_only. + * @member {boolean} read_only + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.read_only = false; + + /** + * FullStatus gtid_mode. + * @member {string} gtid_mode + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.gtid_mode = ""; + + /** + * FullStatus binlog_format. + * @member {string} binlog_format + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.binlog_format = ""; + + /** + * FullStatus binlog_row_image. + * @member {string} binlog_row_image + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.binlog_row_image = ""; + + /** + * FullStatus log_bin_enabled. + * @member {boolean} log_bin_enabled + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.log_bin_enabled = false; + + /** + * FullStatus log_replica_updates. + * @member {boolean} log_replica_updates + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.log_replica_updates = false; + + /** + * FullStatus semi_sync_primary_enabled. + * @member {boolean} semi_sync_primary_enabled + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_primary_enabled = false; + + /** + * FullStatus semi_sync_replica_enabled. + * @member {boolean} semi_sync_replica_enabled + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_replica_enabled = false; + + /** + * FullStatus semi_sync_primary_status. + * @member {boolean} semi_sync_primary_status + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_primary_status = false; + + /** + * FullStatus semi_sync_replica_status. + * @member {boolean} semi_sync_replica_status + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_replica_status = false; + + /** + * FullStatus semi_sync_primary_clients. + * @member {number} semi_sync_primary_clients + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_primary_clients = 0; + + /** + * FullStatus semi_sync_primary_timeout. + * @member {number|Long} semi_sync_primary_timeout + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_primary_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * FullStatus semi_sync_wait_for_replica_count. + * @member {number} semi_sync_wait_for_replica_count + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.semi_sync_wait_for_replica_count = 0; + + /** + * FullStatus super_read_only. + * @member {boolean} super_read_only + * @memberof replicationdata.FullStatus + * @instance + */ + FullStatus.prototype.super_read_only = false; + + /** + * Creates a new FullStatus instance using the specified properties. * @function create - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static - * @param {vtctldata.IApplyRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse instance + * @param {replicationdata.IFullStatus=} [properties] Properties to set + * @returns {replicationdata.FullStatus} FullStatus instance */ - ApplyRoutingRulesResponse.create = function create(properties) { - return new ApplyRoutingRulesResponse(properties); + FullStatus.create = function create(properties) { + return new FullStatus(properties); }; /** - * Encodes the specified ApplyRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. + * Encodes the specified FullStatus message. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static - * @param {vtctldata.IApplyRoutingRulesResponse} message ApplyRoutingRulesResponse message or plain object to encode + * @param {replicationdata.IFullStatus} message FullStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyRoutingRulesResponse.encode = function encode(message, writer) { + FullStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.server_id != null && Object.hasOwnProperty.call(message, "server_id")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.server_id); + if (message.server_uuid != null && Object.hasOwnProperty.call(message, "server_uuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.server_uuid); + if (message.replication_status != null && Object.hasOwnProperty.call(message, "replication_status")) + $root.replicationdata.Status.encode(message.replication_status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.primary_status != null && Object.hasOwnProperty.call(message, "primary_status")) + $root.replicationdata.PrimaryStatus.encode(message.primary_status, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.gtid_purged != null && Object.hasOwnProperty.call(message, "gtid_purged")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gtid_purged); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); + if (message.version_comment != null && Object.hasOwnProperty.call(message, "version_comment")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.version_comment); + if (message.read_only != null && Object.hasOwnProperty.call(message, "read_only")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.read_only); + if (message.gtid_mode != null && Object.hasOwnProperty.call(message, "gtid_mode")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.gtid_mode); + if (message.binlog_format != null && Object.hasOwnProperty.call(message, "binlog_format")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.binlog_format); + if (message.binlog_row_image != null && Object.hasOwnProperty.call(message, "binlog_row_image")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.binlog_row_image); + if (message.log_bin_enabled != null && Object.hasOwnProperty.call(message, "log_bin_enabled")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.log_bin_enabled); + if (message.log_replica_updates != null && Object.hasOwnProperty.call(message, "log_replica_updates")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.log_replica_updates); + if (message.semi_sync_primary_enabled != null && Object.hasOwnProperty.call(message, "semi_sync_primary_enabled")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.semi_sync_primary_enabled); + if (message.semi_sync_replica_enabled != null && Object.hasOwnProperty.call(message, "semi_sync_replica_enabled")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.semi_sync_replica_enabled); + if (message.semi_sync_primary_status != null && Object.hasOwnProperty.call(message, "semi_sync_primary_status")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.semi_sync_primary_status); + if (message.semi_sync_replica_status != null && Object.hasOwnProperty.call(message, "semi_sync_replica_status")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.semi_sync_replica_status); + if (message.semi_sync_primary_clients != null && Object.hasOwnProperty.call(message, "semi_sync_primary_clients")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.semi_sync_primary_clients); + if (message.semi_sync_primary_timeout != null && Object.hasOwnProperty.call(message, "semi_sync_primary_timeout")) + writer.uint32(/* id 19, wireType 0 =*/152).uint64(message.semi_sync_primary_timeout); + if (message.semi_sync_wait_for_replica_count != null && Object.hasOwnProperty.call(message, "semi_sync_wait_for_replica_count")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.semi_sync_wait_for_replica_count); + if (message.super_read_only != null && Object.hasOwnProperty.call(message, "super_read_only")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.super_read_only); return writer; }; /** - * Encodes the specified ApplyRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. + * Encodes the specified FullStatus message, length delimited. Does not implicitly {@link replicationdata.FullStatus.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static - * @param {vtctldata.IApplyRoutingRulesResponse} message ApplyRoutingRulesResponse message or plain object to encode + * @param {replicationdata.IFullStatus} message FullStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + FullStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer. + * Decodes a FullStatus message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse + * @returns {replicationdata.FullStatus} FullStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyRoutingRulesResponse.decode = function decode(reader, length) { + FullStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyRoutingRulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.FullStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.server_id = reader.uint32(); + break; + case 2: + message.server_uuid = reader.string(); + break; + case 3: + message.replication_status = $root.replicationdata.Status.decode(reader, reader.uint32()); + break; + case 4: + message.primary_status = $root.replicationdata.PrimaryStatus.decode(reader, reader.uint32()); + break; + case 5: + message.gtid_purged = reader.string(); + break; + case 6: + message.version = reader.string(); + break; + case 7: + message.version_comment = reader.string(); + break; + case 8: + message.read_only = reader.bool(); + break; + case 9: + message.gtid_mode = reader.string(); + break; + case 10: + message.binlog_format = reader.string(); + break; + case 11: + message.binlog_row_image = reader.string(); + break; + case 12: + message.log_bin_enabled = reader.bool(); + break; + case 13: + message.log_replica_updates = reader.bool(); + break; + case 14: + message.semi_sync_primary_enabled = reader.bool(); + break; + case 15: + message.semi_sync_replica_enabled = reader.bool(); + break; + case 16: + message.semi_sync_primary_status = reader.bool(); + break; + case 17: + message.semi_sync_replica_status = reader.bool(); + break; + case 18: + message.semi_sync_primary_clients = reader.uint32(); + break; + case 19: + message.semi_sync_primary_timeout = reader.uint64(); + break; + case 20: + message.semi_sync_wait_for_replica_count = reader.uint32(); + break; + case 21: + message.super_read_only = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -84697,97 +85238,305 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a FullStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse + * @returns {replicationdata.FullStatus} FullStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + FullStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyRoutingRulesResponse message. + * Verifies a FullStatus message. * @function verify - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyRoutingRulesResponse.verify = function verify(message) { + FullStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.server_id != null && message.hasOwnProperty("server_id")) + if (!$util.isInteger(message.server_id)) + return "server_id: integer expected"; + if (message.server_uuid != null && message.hasOwnProperty("server_uuid")) + if (!$util.isString(message.server_uuid)) + return "server_uuid: string expected"; + if (message.replication_status != null && message.hasOwnProperty("replication_status")) { + var error = $root.replicationdata.Status.verify(message.replication_status); + if (error) + return "replication_status." + error; + } + if (message.primary_status != null && message.hasOwnProperty("primary_status")) { + var error = $root.replicationdata.PrimaryStatus.verify(message.primary_status); + if (error) + return "primary_status." + error; + } + if (message.gtid_purged != null && message.hasOwnProperty("gtid_purged")) + if (!$util.isString(message.gtid_purged)) + return "gtid_purged: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.version_comment != null && message.hasOwnProperty("version_comment")) + if (!$util.isString(message.version_comment)) + return "version_comment: string expected"; + if (message.read_only != null && message.hasOwnProperty("read_only")) + if (typeof message.read_only !== "boolean") + return "read_only: boolean expected"; + if (message.gtid_mode != null && message.hasOwnProperty("gtid_mode")) + if (!$util.isString(message.gtid_mode)) + return "gtid_mode: string expected"; + if (message.binlog_format != null && message.hasOwnProperty("binlog_format")) + if (!$util.isString(message.binlog_format)) + return "binlog_format: string expected"; + if (message.binlog_row_image != null && message.hasOwnProperty("binlog_row_image")) + if (!$util.isString(message.binlog_row_image)) + return "binlog_row_image: string expected"; + if (message.log_bin_enabled != null && message.hasOwnProperty("log_bin_enabled")) + if (typeof message.log_bin_enabled !== "boolean") + return "log_bin_enabled: boolean expected"; + if (message.log_replica_updates != null && message.hasOwnProperty("log_replica_updates")) + if (typeof message.log_replica_updates !== "boolean") + return "log_replica_updates: boolean expected"; + if (message.semi_sync_primary_enabled != null && message.hasOwnProperty("semi_sync_primary_enabled")) + if (typeof message.semi_sync_primary_enabled !== "boolean") + return "semi_sync_primary_enabled: boolean expected"; + if (message.semi_sync_replica_enabled != null && message.hasOwnProperty("semi_sync_replica_enabled")) + if (typeof message.semi_sync_replica_enabled !== "boolean") + return "semi_sync_replica_enabled: boolean expected"; + if (message.semi_sync_primary_status != null && message.hasOwnProperty("semi_sync_primary_status")) + if (typeof message.semi_sync_primary_status !== "boolean") + return "semi_sync_primary_status: boolean expected"; + if (message.semi_sync_replica_status != null && message.hasOwnProperty("semi_sync_replica_status")) + if (typeof message.semi_sync_replica_status !== "boolean") + return "semi_sync_replica_status: boolean expected"; + if (message.semi_sync_primary_clients != null && message.hasOwnProperty("semi_sync_primary_clients")) + if (!$util.isInteger(message.semi_sync_primary_clients)) + return "semi_sync_primary_clients: integer expected"; + if (message.semi_sync_primary_timeout != null && message.hasOwnProperty("semi_sync_primary_timeout")) + if (!$util.isInteger(message.semi_sync_primary_timeout) && !(message.semi_sync_primary_timeout && $util.isInteger(message.semi_sync_primary_timeout.low) && $util.isInteger(message.semi_sync_primary_timeout.high))) + return "semi_sync_primary_timeout: integer|Long expected"; + if (message.semi_sync_wait_for_replica_count != null && message.hasOwnProperty("semi_sync_wait_for_replica_count")) + if (!$util.isInteger(message.semi_sync_wait_for_replica_count)) + return "semi_sync_wait_for_replica_count: integer expected"; + if (message.super_read_only != null && message.hasOwnProperty("super_read_only")) + if (typeof message.super_read_only !== "boolean") + return "super_read_only: boolean expected"; return null; }; /** - * Creates an ApplyRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FullStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse + * @returns {replicationdata.FullStatus} FullStatus */ - ApplyRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyRoutingRulesResponse) + FullStatus.fromObject = function fromObject(object) { + if (object instanceof $root.replicationdata.FullStatus) return object; - return new $root.vtctldata.ApplyRoutingRulesResponse(); + var message = new $root.replicationdata.FullStatus(); + if (object.server_id != null) + message.server_id = object.server_id >>> 0; + if (object.server_uuid != null) + message.server_uuid = String(object.server_uuid); + if (object.replication_status != null) { + if (typeof object.replication_status !== "object") + throw TypeError(".replicationdata.FullStatus.replication_status: object expected"); + message.replication_status = $root.replicationdata.Status.fromObject(object.replication_status); + } + if (object.primary_status != null) { + if (typeof object.primary_status !== "object") + throw TypeError(".replicationdata.FullStatus.primary_status: object expected"); + message.primary_status = $root.replicationdata.PrimaryStatus.fromObject(object.primary_status); + } + if (object.gtid_purged != null) + message.gtid_purged = String(object.gtid_purged); + if (object.version != null) + message.version = String(object.version); + if (object.version_comment != null) + message.version_comment = String(object.version_comment); + if (object.read_only != null) + message.read_only = Boolean(object.read_only); + if (object.gtid_mode != null) + message.gtid_mode = String(object.gtid_mode); + if (object.binlog_format != null) + message.binlog_format = String(object.binlog_format); + if (object.binlog_row_image != null) + message.binlog_row_image = String(object.binlog_row_image); + if (object.log_bin_enabled != null) + message.log_bin_enabled = Boolean(object.log_bin_enabled); + if (object.log_replica_updates != null) + message.log_replica_updates = Boolean(object.log_replica_updates); + if (object.semi_sync_primary_enabled != null) + message.semi_sync_primary_enabled = Boolean(object.semi_sync_primary_enabled); + if (object.semi_sync_replica_enabled != null) + message.semi_sync_replica_enabled = Boolean(object.semi_sync_replica_enabled); + if (object.semi_sync_primary_status != null) + message.semi_sync_primary_status = Boolean(object.semi_sync_primary_status); + if (object.semi_sync_replica_status != null) + message.semi_sync_replica_status = Boolean(object.semi_sync_replica_status); + if (object.semi_sync_primary_clients != null) + message.semi_sync_primary_clients = object.semi_sync_primary_clients >>> 0; + if (object.semi_sync_primary_timeout != null) + if ($util.Long) + (message.semi_sync_primary_timeout = $util.Long.fromValue(object.semi_sync_primary_timeout)).unsigned = true; + else if (typeof object.semi_sync_primary_timeout === "string") + message.semi_sync_primary_timeout = parseInt(object.semi_sync_primary_timeout, 10); + else if (typeof object.semi_sync_primary_timeout === "number") + message.semi_sync_primary_timeout = object.semi_sync_primary_timeout; + else if (typeof object.semi_sync_primary_timeout === "object") + message.semi_sync_primary_timeout = new $util.LongBits(object.semi_sync_primary_timeout.low >>> 0, object.semi_sync_primary_timeout.high >>> 0).toNumber(true); + if (object.semi_sync_wait_for_replica_count != null) + message.semi_sync_wait_for_replica_count = object.semi_sync_wait_for_replica_count >>> 0; + if (object.super_read_only != null) + message.super_read_only = Boolean(object.super_read_only); + return message; }; /** - * Creates a plain object from an ApplyRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a FullStatus message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @static - * @param {vtctldata.ApplyRoutingRulesResponse} message ApplyRoutingRulesResponse + * @param {replicationdata.FullStatus} message FullStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplyRoutingRulesResponse.toObject = function toObject() { - return {}; + FullStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.server_id = 0; + object.server_uuid = ""; + object.replication_status = null; + object.primary_status = null; + object.gtid_purged = ""; + object.version = ""; + object.version_comment = ""; + object.read_only = false; + object.gtid_mode = ""; + object.binlog_format = ""; + object.binlog_row_image = ""; + object.log_bin_enabled = false; + object.log_replica_updates = false; + object.semi_sync_primary_enabled = false; + object.semi_sync_replica_enabled = false; + object.semi_sync_primary_status = false; + object.semi_sync_replica_status = false; + object.semi_sync_primary_clients = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.semi_sync_primary_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.semi_sync_primary_timeout = options.longs === String ? "0" : 0; + object.semi_sync_wait_for_replica_count = 0; + object.super_read_only = false; + } + if (message.server_id != null && message.hasOwnProperty("server_id")) + object.server_id = message.server_id; + if (message.server_uuid != null && message.hasOwnProperty("server_uuid")) + object.server_uuid = message.server_uuid; + if (message.replication_status != null && message.hasOwnProperty("replication_status")) + object.replication_status = $root.replicationdata.Status.toObject(message.replication_status, options); + if (message.primary_status != null && message.hasOwnProperty("primary_status")) + object.primary_status = $root.replicationdata.PrimaryStatus.toObject(message.primary_status, options); + if (message.gtid_purged != null && message.hasOwnProperty("gtid_purged")) + object.gtid_purged = message.gtid_purged; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.version_comment != null && message.hasOwnProperty("version_comment")) + object.version_comment = message.version_comment; + if (message.read_only != null && message.hasOwnProperty("read_only")) + object.read_only = message.read_only; + if (message.gtid_mode != null && message.hasOwnProperty("gtid_mode")) + object.gtid_mode = message.gtid_mode; + if (message.binlog_format != null && message.hasOwnProperty("binlog_format")) + object.binlog_format = message.binlog_format; + if (message.binlog_row_image != null && message.hasOwnProperty("binlog_row_image")) + object.binlog_row_image = message.binlog_row_image; + if (message.log_bin_enabled != null && message.hasOwnProperty("log_bin_enabled")) + object.log_bin_enabled = message.log_bin_enabled; + if (message.log_replica_updates != null && message.hasOwnProperty("log_replica_updates")) + object.log_replica_updates = message.log_replica_updates; + if (message.semi_sync_primary_enabled != null && message.hasOwnProperty("semi_sync_primary_enabled")) + object.semi_sync_primary_enabled = message.semi_sync_primary_enabled; + if (message.semi_sync_replica_enabled != null && message.hasOwnProperty("semi_sync_replica_enabled")) + object.semi_sync_replica_enabled = message.semi_sync_replica_enabled; + if (message.semi_sync_primary_status != null && message.hasOwnProperty("semi_sync_primary_status")) + object.semi_sync_primary_status = message.semi_sync_primary_status; + if (message.semi_sync_replica_status != null && message.hasOwnProperty("semi_sync_replica_status")) + object.semi_sync_replica_status = message.semi_sync_replica_status; + if (message.semi_sync_primary_clients != null && message.hasOwnProperty("semi_sync_primary_clients")) + object.semi_sync_primary_clients = message.semi_sync_primary_clients; + if (message.semi_sync_primary_timeout != null && message.hasOwnProperty("semi_sync_primary_timeout")) + if (typeof message.semi_sync_primary_timeout === "number") + object.semi_sync_primary_timeout = options.longs === String ? String(message.semi_sync_primary_timeout) : message.semi_sync_primary_timeout; + else + object.semi_sync_primary_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.semi_sync_primary_timeout) : options.longs === Number ? new $util.LongBits(message.semi_sync_primary_timeout.low >>> 0, message.semi_sync_primary_timeout.high >>> 0).toNumber(true) : message.semi_sync_primary_timeout; + if (message.semi_sync_wait_for_replica_count != null && message.hasOwnProperty("semi_sync_wait_for_replica_count")) + object.semi_sync_wait_for_replica_count = message.semi_sync_wait_for_replica_count; + if (message.super_read_only != null && message.hasOwnProperty("super_read_only")) + object.super_read_only = message.super_read_only; + return object; }; /** - * Converts this ApplyRoutingRulesResponse to JSON. + * Converts this FullStatus to JSON. * @function toJSON - * @memberof vtctldata.ApplyRoutingRulesResponse + * @memberof replicationdata.FullStatus * @instance * @returns {Object.} JSON object */ - ApplyRoutingRulesResponse.prototype.toJSON = function toJSON() { + FullStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyRoutingRulesResponse; + return FullStatus; })(); - vtctldata.ApplyShardRoutingRulesRequest = (function() { + return replicationdata; +})(); + +$root.vschema = (function() { + + /** + * Namespace vschema. + * @exports vschema + * @namespace + */ + var vschema = {}; + + vschema.RoutingRules = (function() { /** - * Properties of an ApplyShardRoutingRulesRequest. - * @memberof vtctldata - * @interface IApplyShardRoutingRulesRequest - * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] ApplyShardRoutingRulesRequest shard_routing_rules - * @property {boolean|null} [skip_rebuild] ApplyShardRoutingRulesRequest skip_rebuild - * @property {Array.|null} [rebuild_cells] ApplyShardRoutingRulesRequest rebuild_cells + * Properties of a RoutingRules. + * @memberof vschema + * @interface IRoutingRules + * @property {Array.|null} [rules] RoutingRules rules */ /** - * Constructs a new ApplyShardRoutingRulesRequest. - * @memberof vtctldata - * @classdesc Represents an ApplyShardRoutingRulesRequest. - * @implements IApplyShardRoutingRulesRequest + * Constructs a new RoutingRules. + * @memberof vschema + * @classdesc Represents a RoutingRules. + * @implements IRoutingRules * @constructor - * @param {vtctldata.IApplyShardRoutingRulesRequest=} [properties] Properties to set + * @param {vschema.IRoutingRules=} [properties] Properties to set */ - function ApplyShardRoutingRulesRequest(properties) { - this.rebuild_cells = []; + function RoutingRules(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84795,104 +85544,78 @@ $root.vtctldata = (function() { } /** - * ApplyShardRoutingRulesRequest shard_routing_rules. - * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules - * @memberof vtctldata.ApplyShardRoutingRulesRequest - * @instance - */ - ApplyShardRoutingRulesRequest.prototype.shard_routing_rules = null; - - /** - * ApplyShardRoutingRulesRequest skip_rebuild. - * @member {boolean} skip_rebuild - * @memberof vtctldata.ApplyShardRoutingRulesRequest - * @instance - */ - ApplyShardRoutingRulesRequest.prototype.skip_rebuild = false; - - /** - * ApplyShardRoutingRulesRequest rebuild_cells. - * @member {Array.} rebuild_cells - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * RoutingRules rules. + * @member {Array.} rules + * @memberof vschema.RoutingRules * @instance */ - ApplyShardRoutingRulesRequest.prototype.rebuild_cells = $util.emptyArray; + RoutingRules.prototype.rules = $util.emptyArray; /** - * Creates a new ApplyShardRoutingRulesRequest instance using the specified properties. + * Creates a new RoutingRules instance using the specified properties. * @function create - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static - * @param {vtctldata.IApplyShardRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest instance + * @param {vschema.IRoutingRules=} [properties] Properties to set + * @returns {vschema.RoutingRules} RoutingRules instance */ - ApplyShardRoutingRulesRequest.create = function create(properties) { - return new ApplyShardRoutingRulesRequest(properties); + RoutingRules.create = function create(properties) { + return new RoutingRules(properties); }; /** - * Encodes the specified ApplyShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static - * @param {vtctldata.IApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest message or plain object to encode + * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyShardRoutingRulesRequest.encode = function encode(message, writer) { + RoutingRules.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) - $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); - if (message.rebuild_cells != null && message.rebuild_cells.length) - for (var i = 0; i < message.rebuild_cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.rebuild_cells[i]); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.vschema.RoutingRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ApplyShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static - * @param {vtctldata.IApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest message or plain object to encode + * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + RoutingRules.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer. + * Decodes a RoutingRules message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest + * @returns {vschema.RoutingRules} RoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyShardRoutingRulesRequest.decode = function decode(reader, length) { + RoutingRules.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyShardRoutingRulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRules(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); - break; - case 2: - message.skip_rebuild = reader.bool(); - break; - case 3: - if (!(message.rebuild_cells && message.rebuild_cells.length)) - message.rebuild_cells = []; - message.rebuild_cells.push(reader.string()); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.vschema.RoutingRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -84903,141 +85626,126 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a RoutingRules message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest + * @returns {vschema.RoutingRules} RoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + RoutingRules.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyShardRoutingRulesRequest message. + * Verifies a RoutingRules message. * @function verify - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyShardRoutingRulesRequest.verify = function verify(message) { + RoutingRules.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { - var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); - if (error) - return "shard_routing_rules." + error; - } - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - if (typeof message.skip_rebuild !== "boolean") - return "skip_rebuild: boolean expected"; - if (message.rebuild_cells != null && message.hasOwnProperty("rebuild_cells")) { - if (!Array.isArray(message.rebuild_cells)) - return "rebuild_cells: array expected"; - for (var i = 0; i < message.rebuild_cells.length; ++i) - if (!$util.isString(message.rebuild_cells[i])) - return "rebuild_cells: string[] expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.vschema.RoutingRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } return null; }; /** - * Creates an ApplyShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest + * @returns {vschema.RoutingRules} RoutingRules */ - ApplyShardRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyShardRoutingRulesRequest) + RoutingRules.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.RoutingRules) return object; - var message = new $root.vtctldata.ApplyShardRoutingRulesRequest(); - if (object.shard_routing_rules != null) { - if (typeof object.shard_routing_rules !== "object") - throw TypeError(".vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules: object expected"); - message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); - } - if (object.skip_rebuild != null) - message.skip_rebuild = Boolean(object.skip_rebuild); - if (object.rebuild_cells) { - if (!Array.isArray(object.rebuild_cells)) - throw TypeError(".vtctldata.ApplyShardRoutingRulesRequest.rebuild_cells: array expected"); - message.rebuild_cells = []; - for (var i = 0; i < object.rebuild_cells.length; ++i) - message.rebuild_cells[i] = String(object.rebuild_cells[i]); + var message = new $root.vschema.RoutingRules(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".vschema.RoutingRules.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".vschema.RoutingRules.rules: object expected"); + message.rules[i] = $root.vschema.RoutingRule.fromObject(object.rules[i]); + } } return message; }; /** - * Creates a plain object from an ApplyShardRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyShardRoutingRulesRequest - * @static - * @param {vtctldata.ApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ApplyShardRoutingRulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rebuild_cells = []; - if (options.defaults) { - object.shard_routing_rules = null; - object.skip_rebuild = false; - } - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) - object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - object.skip_rebuild = message.skip_rebuild; - if (message.rebuild_cells && message.rebuild_cells.length) { - object.rebuild_cells = []; - for (var j = 0; j < message.rebuild_cells.length; ++j) - object.rebuild_cells[j] = message.rebuild_cells[j]; + * @memberof vschema.RoutingRules + * @static + * @param {vschema.RoutingRules} message RoutingRules + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RoutingRules.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.vschema.RoutingRule.toObject(message.rules[j], options); } return object; }; /** - * Converts this ApplyShardRoutingRulesRequest to JSON. + * Converts this RoutingRules to JSON. * @function toJSON - * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @memberof vschema.RoutingRules * @instance * @returns {Object.} JSON object */ - ApplyShardRoutingRulesRequest.prototype.toJSON = function toJSON() { + RoutingRules.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyShardRoutingRulesRequest; + return RoutingRules; })(); - vtctldata.ApplyShardRoutingRulesResponse = (function() { + vschema.RoutingRule = (function() { /** - * Properties of an ApplyShardRoutingRulesResponse. - * @memberof vtctldata - * @interface IApplyShardRoutingRulesResponse + * Properties of a RoutingRule. + * @memberof vschema + * @interface IRoutingRule + * @property {string|null} [from_table] RoutingRule from_table + * @property {Array.|null} [to_tables] RoutingRule to_tables */ /** - * Constructs a new ApplyShardRoutingRulesResponse. - * @memberof vtctldata - * @classdesc Represents an ApplyShardRoutingRulesResponse. - * @implements IApplyShardRoutingRulesResponse + * Constructs a new RoutingRule. + * @memberof vschema + * @classdesc Represents a RoutingRule. + * @implements IRoutingRule * @constructor - * @param {vtctldata.IApplyShardRoutingRulesResponse=} [properties] Properties to set + * @param {vschema.IRoutingRule=} [properties] Properties to set */ - function ApplyShardRoutingRulesResponse(properties) { + function RoutingRule(properties) { + this.to_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85045,63 +85753,92 @@ $root.vtctldata = (function() { } /** - * Creates a new ApplyShardRoutingRulesResponse instance using the specified properties. + * RoutingRule from_table. + * @member {string} from_table + * @memberof vschema.RoutingRule + * @instance + */ + RoutingRule.prototype.from_table = ""; + + /** + * RoutingRule to_tables. + * @member {Array.} to_tables + * @memberof vschema.RoutingRule + * @instance + */ + RoutingRule.prototype.to_tables = $util.emptyArray; + + /** + * Creates a new RoutingRule instance using the specified properties. * @function create - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static - * @param {vtctldata.IApplyShardRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse instance + * @param {vschema.IRoutingRule=} [properties] Properties to set + * @returns {vschema.RoutingRule} RoutingRule instance */ - ApplyShardRoutingRulesResponse.create = function create(properties) { - return new ApplyShardRoutingRulesResponse(properties); + RoutingRule.create = function create(properties) { + return new RoutingRule(properties); }; /** - * Encodes the specified ApplyShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static - * @param {vtctldata.IApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse message or plain object to encode + * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyShardRoutingRulesResponse.encode = function encode(message, writer) { + RoutingRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.from_table != null && Object.hasOwnProperty.call(message, "from_table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_table); + if (message.to_tables != null && message.to_tables.length) + for (var i = 0; i < message.to_tables.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_tables[i]); return writer; }; /** - * Encodes the specified ApplyShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static - * @param {vtctldata.IApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse message or plain object to encode + * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer. + * Decodes a RoutingRule message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse + * @returns {vschema.RoutingRule} RoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyShardRoutingRulesResponse.decode = function decode(reader, length) { + RoutingRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyShardRoutingRulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.from_table = reader.string(); + break; + case 2: + if (!(message.to_tables && message.to_tables.length)) + message.to_tables = []; + message.to_tables.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -85111,104 +85848,133 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse + * @returns {vschema.RoutingRule} RoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + RoutingRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyShardRoutingRulesResponse message. + * Verifies a RoutingRule message. * @function verify - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyShardRoutingRulesResponse.verify = function verify(message) { + RoutingRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.from_table != null && message.hasOwnProperty("from_table")) + if (!$util.isString(message.from_table)) + return "from_table: string expected"; + if (message.to_tables != null && message.hasOwnProperty("to_tables")) { + if (!Array.isArray(message.to_tables)) + return "to_tables: array expected"; + for (var i = 0; i < message.to_tables.length; ++i) + if (!$util.isString(message.to_tables[i])) + return "to_tables: string[] expected"; + } return null; }; /** - * Creates an ApplyShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse + * @returns {vschema.RoutingRule} RoutingRule */ - ApplyShardRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyShardRoutingRulesResponse) + RoutingRule.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.RoutingRule) return object; - return new $root.vtctldata.ApplyShardRoutingRulesResponse(); + var message = new $root.vschema.RoutingRule(); + if (object.from_table != null) + message.from_table = String(object.from_table); + if (object.to_tables) { + if (!Array.isArray(object.to_tables)) + throw TypeError(".vschema.RoutingRule.to_tables: array expected"); + message.to_tables = []; + for (var i = 0; i < object.to_tables.length; ++i) + message.to_tables[i] = String(object.to_tables[i]); + } + return message; }; /** - * Creates a plain object from an ApplyShardRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @static - * @param {vtctldata.ApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse + * @param {vschema.RoutingRule} message RoutingRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplyShardRoutingRulesResponse.toObject = function toObject() { - return {}; + RoutingRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.to_tables = []; + if (options.defaults) + object.from_table = ""; + if (message.from_table != null && message.hasOwnProperty("from_table")) + object.from_table = message.from_table; + if (message.to_tables && message.to_tables.length) { + object.to_tables = []; + for (var j = 0; j < message.to_tables.length; ++j) + object.to_tables[j] = message.to_tables[j]; + } + return object; }; /** - * Converts this ApplyShardRoutingRulesResponse to JSON. + * Converts this RoutingRule to JSON. * @function toJSON - * @memberof vtctldata.ApplyShardRoutingRulesResponse + * @memberof vschema.RoutingRule * @instance * @returns {Object.} JSON object */ - ApplyShardRoutingRulesResponse.prototype.toJSON = function toJSON() { + RoutingRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyShardRoutingRulesResponse; + return RoutingRule; })(); - vtctldata.ApplySchemaRequest = (function() { + vschema.Keyspace = (function() { /** - * Properties of an ApplySchemaRequest. - * @memberof vtctldata - * @interface IApplySchemaRequest - * @property {string|null} [keyspace] ApplySchemaRequest keyspace - * @property {boolean|null} [allow_long_unavailability] ApplySchemaRequest allow_long_unavailability - * @property {Array.|null} [sql] ApplySchemaRequest sql - * @property {string|null} [ddl_strategy] ApplySchemaRequest ddl_strategy - * @property {Array.|null} [uuid_list] ApplySchemaRequest uuid_list - * @property {string|null} [migration_context] ApplySchemaRequest migration_context - * @property {vttime.IDuration|null} [wait_replicas_timeout] ApplySchemaRequest wait_replicas_timeout - * @property {boolean|null} [skip_preflight] ApplySchemaRequest skip_preflight - * @property {vtrpc.ICallerID|null} [caller_id] ApplySchemaRequest caller_id + * Properties of a Keyspace. + * @memberof vschema + * @interface IKeyspace + * @property {boolean|null} [sharded] Keyspace sharded + * @property {Object.|null} [vindexes] Keyspace vindexes + * @property {Object.|null} [tables] Keyspace tables + * @property {boolean|null} [require_explicit_routing] Keyspace require_explicit_routing */ /** - * Constructs a new ApplySchemaRequest. - * @memberof vtctldata - * @classdesc Represents an ApplySchemaRequest. - * @implements IApplySchemaRequest + * Constructs a new Keyspace. + * @memberof vschema + * @classdesc Represents a Keyspace. + * @implements IKeyspace * @constructor - * @param {vtctldata.IApplySchemaRequest=} [properties] Properties to set + * @param {vschema.IKeyspace=} [properties] Properties to set */ - function ApplySchemaRequest(properties) { - this.sql = []; - this.uuid_list = []; + function Keyspace(properties) { + this.vindexes = {}; + this.tables = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85216,185 +85982,158 @@ $root.vtctldata = (function() { } /** - * ApplySchemaRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.keyspace = ""; - - /** - * ApplySchemaRequest allow_long_unavailability. - * @member {boolean} allow_long_unavailability - * @memberof vtctldata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.allow_long_unavailability = false; - - /** - * ApplySchemaRequest sql. - * @member {Array.} sql - * @memberof vtctldata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.sql = $util.emptyArray; - - /** - * ApplySchemaRequest ddl_strategy. - * @member {string} ddl_strategy - * @memberof vtctldata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.ddl_strategy = ""; - - /** - * ApplySchemaRequest uuid_list. - * @member {Array.} uuid_list - * @memberof vtctldata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.uuid_list = $util.emptyArray; - - /** - * ApplySchemaRequest migration_context. - * @member {string} migration_context - * @memberof vtctldata.ApplySchemaRequest + * Keyspace sharded. + * @member {boolean} sharded + * @memberof vschema.Keyspace * @instance */ - ApplySchemaRequest.prototype.migration_context = ""; + Keyspace.prototype.sharded = false; /** - * ApplySchemaRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.ApplySchemaRequest + * Keyspace vindexes. + * @member {Object.} vindexes + * @memberof vschema.Keyspace * @instance */ - ApplySchemaRequest.prototype.wait_replicas_timeout = null; + Keyspace.prototype.vindexes = $util.emptyObject; /** - * ApplySchemaRequest skip_preflight. - * @member {boolean} skip_preflight - * @memberof vtctldata.ApplySchemaRequest + * Keyspace tables. + * @member {Object.} tables + * @memberof vschema.Keyspace * @instance */ - ApplySchemaRequest.prototype.skip_preflight = false; + Keyspace.prototype.tables = $util.emptyObject; /** - * ApplySchemaRequest caller_id. - * @member {vtrpc.ICallerID|null|undefined} caller_id - * @memberof vtctldata.ApplySchemaRequest + * Keyspace require_explicit_routing. + * @member {boolean} require_explicit_routing + * @memberof vschema.Keyspace * @instance */ - ApplySchemaRequest.prototype.caller_id = null; + Keyspace.prototype.require_explicit_routing = false; /** - * Creates a new ApplySchemaRequest instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @function create - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static - * @param {vtctldata.IApplySchemaRequest=} [properties] Properties to set - * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest instance + * @param {vschema.IKeyspace=} [properties] Properties to set + * @returns {vschema.Keyspace} Keyspace instance */ - ApplySchemaRequest.create = function create(properties) { - return new ApplySchemaRequest(properties); + Keyspace.create = function create(properties) { + return new Keyspace(properties); }; /** - * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. + * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static - * @param {vtctldata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode + * @param {vschema.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplySchemaRequest.encode = function encode(message, writer) { + Keyspace.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.allow_long_unavailability != null && Object.hasOwnProperty.call(message, "allow_long_unavailability")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_long_unavailability); - if (message.sql != null && message.sql.length) - for (var i = 0; i < message.sql.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sql[i]); - if (message.ddl_strategy != null && Object.hasOwnProperty.call(message, "ddl_strategy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ddl_strategy); - if (message.uuid_list != null && message.uuid_list.length) - for (var i = 0; i < message.uuid_list.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.uuid_list[i]); - if (message.migration_context != null && Object.hasOwnProperty.call(message, "migration_context")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.migration_context); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.skip_preflight != null && Object.hasOwnProperty.call(message, "skip_preflight")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.skip_preflight); - if (message.caller_id != null && Object.hasOwnProperty.call(message, "caller_id")) - $root.vtrpc.CallerID.encode(message.caller_id, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.sharded != null && Object.hasOwnProperty.call(message, "sharded")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharded); + if (message.vindexes != null && Object.hasOwnProperty.call(message, "vindexes")) + for (var keys = Object.keys(message.vindexes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vschema.Vindex.encode(message.vindexes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + for (var keys = Object.keys(message.tables), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vschema.Table.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.require_explicit_routing != null && Object.hasOwnProperty.call(message, "require_explicit_routing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.require_explicit_routing); return writer; }; /** - * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static - * @param {vtctldata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode + * @param {vschema.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplySchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + Keyspace.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest + * @returns {vschema.Keyspace} Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplySchemaRequest.decode = function decode(reader, length) { + Keyspace.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplySchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Keyspace(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.sharded = reader.bool(); break; case 2: - message.allow_long_unavailability = reader.bool(); + if (message.vindexes === $util.emptyObject) + message.vindexes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vschema.Vindex.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.vindexes[key] = value; break; case 3: - if (!(message.sql && message.sql.length)) - message.sql = []; - message.sql.push(reader.string()); + if (message.tables === $util.emptyObject) + message.tables = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vschema.Table.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tables[key] = value; break; case 4: - message.ddl_strategy = reader.string(); - break; - case 5: - if (!(message.uuid_list && message.uuid_list.length)) - message.uuid_list = []; - message.uuid_list.push(reader.string()); - break; - case 6: - message.migration_context = reader.string(); - break; - case 7: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - case 8: - message.skip_preflight = reader.bool(); - break; - case 9: - message.caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.require_explicit_routing = reader.bool(); break; default: reader.skipType(tag & 7); @@ -85405,209 +86144,174 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest + * @returns {vschema.Keyspace} Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplySchemaRequest.decodeDelimited = function decodeDelimited(reader) { + Keyspace.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplySchemaRequest message. + * Verifies a Keyspace message. * @function verify - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplySchemaRequest.verify = function verify(message) { + Keyspace.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.allow_long_unavailability != null && message.hasOwnProperty("allow_long_unavailability")) - if (typeof message.allow_long_unavailability !== "boolean") - return "allow_long_unavailability: boolean expected"; - if (message.sql != null && message.hasOwnProperty("sql")) { - if (!Array.isArray(message.sql)) - return "sql: array expected"; - for (var i = 0; i < message.sql.length; ++i) - if (!$util.isString(message.sql[i])) - return "sql: string[] expected"; - } - if (message.ddl_strategy != null && message.hasOwnProperty("ddl_strategy")) - if (!$util.isString(message.ddl_strategy)) - return "ddl_strategy: string expected"; - if (message.uuid_list != null && message.hasOwnProperty("uuid_list")) { - if (!Array.isArray(message.uuid_list)) - return "uuid_list: array expected"; - for (var i = 0; i < message.uuid_list.length; ++i) - if (!$util.isString(message.uuid_list[i])) - return "uuid_list: string[] expected"; - } - if (message.migration_context != null && message.hasOwnProperty("migration_context")) - if (!$util.isString(message.migration_context)) - return "migration_context: string expected"; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; + if (message.sharded != null && message.hasOwnProperty("sharded")) + if (typeof message.sharded !== "boolean") + return "sharded: boolean expected"; + if (message.vindexes != null && message.hasOwnProperty("vindexes")) { + if (!$util.isObject(message.vindexes)) + return "vindexes: object expected"; + var key = Object.keys(message.vindexes); + for (var i = 0; i < key.length; ++i) { + var error = $root.vschema.Vindex.verify(message.vindexes[key[i]]); + if (error) + return "vindexes." + error; + } } - if (message.skip_preflight != null && message.hasOwnProperty("skip_preflight")) - if (typeof message.skip_preflight !== "boolean") - return "skip_preflight: boolean expected"; - if (message.caller_id != null && message.hasOwnProperty("caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.caller_id); - if (error) - return "caller_id." + error; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!$util.isObject(message.tables)) + return "tables: object expected"; + var key = Object.keys(message.tables); + for (var i = 0; i < key.length; ++i) { + var error = $root.vschema.Table.verify(message.tables[key[i]]); + if (error) + return "tables." + error; + } } + if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) + if (typeof message.require_explicit_routing !== "boolean") + return "require_explicit_routing: boolean expected"; return null; }; /** - * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest + * @returns {vschema.Keyspace} Keyspace */ - ApplySchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplySchemaRequest) + Keyspace.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.Keyspace) return object; - var message = new $root.vtctldata.ApplySchemaRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.allow_long_unavailability != null) - message.allow_long_unavailability = Boolean(object.allow_long_unavailability); - if (object.sql) { - if (!Array.isArray(object.sql)) - throw TypeError(".vtctldata.ApplySchemaRequest.sql: array expected"); - message.sql = []; - for (var i = 0; i < object.sql.length; ++i) - message.sql[i] = String(object.sql[i]); - } - if (object.ddl_strategy != null) - message.ddl_strategy = String(object.ddl_strategy); - if (object.uuid_list) { - if (!Array.isArray(object.uuid_list)) - throw TypeError(".vtctldata.ApplySchemaRequest.uuid_list: array expected"); - message.uuid_list = []; - for (var i = 0; i < object.uuid_list.length; ++i) - message.uuid_list[i] = String(object.uuid_list[i]); - } - if (object.migration_context != null) - message.migration_context = String(object.migration_context); - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.ApplySchemaRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + var message = new $root.vschema.Keyspace(); + if (object.sharded != null) + message.sharded = Boolean(object.sharded); + if (object.vindexes) { + if (typeof object.vindexes !== "object") + throw TypeError(".vschema.Keyspace.vindexes: object expected"); + message.vindexes = {}; + for (var keys = Object.keys(object.vindexes), i = 0; i < keys.length; ++i) { + if (typeof object.vindexes[keys[i]] !== "object") + throw TypeError(".vschema.Keyspace.vindexes: object expected"); + message.vindexes[keys[i]] = $root.vschema.Vindex.fromObject(object.vindexes[keys[i]]); + } } - if (object.skip_preflight != null) - message.skip_preflight = Boolean(object.skip_preflight); - if (object.caller_id != null) { - if (typeof object.caller_id !== "object") - throw TypeError(".vtctldata.ApplySchemaRequest.caller_id: object expected"); - message.caller_id = $root.vtrpc.CallerID.fromObject(object.caller_id); + if (object.tables) { + if (typeof object.tables !== "object") + throw TypeError(".vschema.Keyspace.tables: object expected"); + message.tables = {}; + for (var keys = Object.keys(object.tables), i = 0; i < keys.length; ++i) { + if (typeof object.tables[keys[i]] !== "object") + throw TypeError(".vschema.Keyspace.tables: object expected"); + message.tables[keys[i]] = $root.vschema.Table.fromObject(object.tables[keys[i]]); + } } + if (object.require_explicit_routing != null) + message.require_explicit_routing = Boolean(object.require_explicit_routing); return message; }; /** - * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @static - * @param {vtctldata.ApplySchemaRequest} message ApplySchemaRequest + * @param {vschema.Keyspace} message Keyspace * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplySchemaRequest.toObject = function toObject(message, options) { + Keyspace.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sql = []; - object.uuid_list = []; + if (options.objects || options.defaults) { + object.vindexes = {}; + object.tables = {}; } if (options.defaults) { - object.keyspace = ""; - object.allow_long_unavailability = false; - object.ddl_strategy = ""; - object.migration_context = ""; - object.wait_replicas_timeout = null; - object.skip_preflight = false; - object.caller_id = null; + object.sharded = false; + object.require_explicit_routing = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.allow_long_unavailability != null && message.hasOwnProperty("allow_long_unavailability")) - object.allow_long_unavailability = message.allow_long_unavailability; - if (message.sql && message.sql.length) { - object.sql = []; - for (var j = 0; j < message.sql.length; ++j) - object.sql[j] = message.sql[j]; + if (message.sharded != null && message.hasOwnProperty("sharded")) + object.sharded = message.sharded; + var keys2; + if (message.vindexes && (keys2 = Object.keys(message.vindexes)).length) { + object.vindexes = {}; + for (var j = 0; j < keys2.length; ++j) + object.vindexes[keys2[j]] = $root.vschema.Vindex.toObject(message.vindexes[keys2[j]], options); } - if (message.ddl_strategy != null && message.hasOwnProperty("ddl_strategy")) - object.ddl_strategy = message.ddl_strategy; - if (message.uuid_list && message.uuid_list.length) { - object.uuid_list = []; - for (var j = 0; j < message.uuid_list.length; ++j) - object.uuid_list[j] = message.uuid_list[j]; + if (message.tables && (keys2 = Object.keys(message.tables)).length) { + object.tables = {}; + for (var j = 0; j < keys2.length; ++j) + object.tables[keys2[j]] = $root.vschema.Table.toObject(message.tables[keys2[j]], options); } - if (message.migration_context != null && message.hasOwnProperty("migration_context")) - object.migration_context = message.migration_context; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - if (message.skip_preflight != null && message.hasOwnProperty("skip_preflight")) - object.skip_preflight = message.skip_preflight; - if (message.caller_id != null && message.hasOwnProperty("caller_id")) - object.caller_id = $root.vtrpc.CallerID.toObject(message.caller_id, options); + if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) + object.require_explicit_routing = message.require_explicit_routing; return object; }; /** - * Converts this ApplySchemaRequest to JSON. + * Converts this Keyspace to JSON. * @function toJSON - * @memberof vtctldata.ApplySchemaRequest + * @memberof vschema.Keyspace * @instance * @returns {Object.} JSON object */ - ApplySchemaRequest.prototype.toJSON = function toJSON() { + Keyspace.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplySchemaRequest; + return Keyspace; })(); - vtctldata.ApplySchemaResponse = (function() { + vschema.Vindex = (function() { /** - * Properties of an ApplySchemaResponse. - * @memberof vtctldata - * @interface IApplySchemaResponse - * @property {Array.|null} [uuid_list] ApplySchemaResponse uuid_list + * Properties of a Vindex. + * @memberof vschema + * @interface IVindex + * @property {string|null} [type] Vindex type + * @property {Object.|null} [params] Vindex params + * @property {string|null} [owner] Vindex owner */ /** - * Constructs a new ApplySchemaResponse. - * @memberof vtctldata - * @classdesc Represents an ApplySchemaResponse. - * @implements IApplySchemaResponse + * Constructs a new Vindex. + * @memberof vschema + * @classdesc Represents a Vindex. + * @implements IVindex * @constructor - * @param {vtctldata.IApplySchemaResponse=} [properties] Properties to set + * @param {vschema.IVindex=} [properties] Properties to set */ - function ApplySchemaResponse(properties) { - this.uuid_list = []; + function Vindex(properties) { + this.params = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85615,78 +86319,121 @@ $root.vtctldata = (function() { } /** - * ApplySchemaResponse uuid_list. - * @member {Array.} uuid_list - * @memberof vtctldata.ApplySchemaResponse + * Vindex type. + * @member {string} type + * @memberof vschema.Vindex * @instance */ - ApplySchemaResponse.prototype.uuid_list = $util.emptyArray; + Vindex.prototype.type = ""; /** - * Creates a new ApplySchemaResponse instance using the specified properties. + * Vindex params. + * @member {Object.} params + * @memberof vschema.Vindex + * @instance + */ + Vindex.prototype.params = $util.emptyObject; + + /** + * Vindex owner. + * @member {string} owner + * @memberof vschema.Vindex + * @instance + */ + Vindex.prototype.owner = ""; + + /** + * Creates a new Vindex instance using the specified properties. * @function create - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static - * @param {vtctldata.IApplySchemaResponse=} [properties] Properties to set - * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse instance + * @param {vschema.IVindex=} [properties] Properties to set + * @returns {vschema.Vindex} Vindex instance */ - ApplySchemaResponse.create = function create(properties) { - return new ApplySchemaResponse(properties); + Vindex.create = function create(properties) { + return new Vindex(properties); }; /** - * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. + * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static - * @param {vtctldata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode + * @param {vschema.IVindex} message Vindex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplySchemaResponse.encode = function encode(message, writer) { + Vindex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uuid_list != null && message.uuid_list.length) - for (var i = 0; i < message.uuid_list.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid_list[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); return writer; }; /** - * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. + * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static - * @param {vtctldata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode + * @param {vschema.IVindex} message Vindex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplySchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + Vindex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer. + * Decodes a Vindex message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse + * @returns {vschema.Vindex} Vindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplySchemaResponse.decode = function decode(reader, length) { + Vindex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplySchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Vindex(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.uuid_list && message.uuid_list.length)) - message.uuid_list = []; - message.uuid_list.push(reader.string()); + message.type = reader.string(); + break; + case 2: + if (message.params === $util.emptyObject) + message.params = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.params[key] = value; + break; + case 3: + message.owner = reader.string(); break; default: reader.skipType(tag & 7); @@ -85697,125 +86444,147 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a Vindex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse + * @returns {vschema.Vindex} Vindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplySchemaResponse.decodeDelimited = function decodeDelimited(reader) { + Vindex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplySchemaResponse message. + * Verifies a Vindex message. * @function verify - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplySchemaResponse.verify = function verify(message) { + Vindex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uuid_list != null && message.hasOwnProperty("uuid_list")) { - if (!Array.isArray(message.uuid_list)) - return "uuid_list: array expected"; - for (var i = 0; i < message.uuid_list.length; ++i) - if (!$util.isString(message.uuid_list[i])) - return "uuid_list: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.params[key[i]])) + return "params: string{k:string} expected"; } + if (message.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; return null; }; /** - * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Vindex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse + * @returns {vschema.Vindex} Vindex */ - ApplySchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplySchemaResponse) + Vindex.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.Vindex) return object; - var message = new $root.vtctldata.ApplySchemaResponse(); - if (object.uuid_list) { - if (!Array.isArray(object.uuid_list)) - throw TypeError(".vtctldata.ApplySchemaResponse.uuid_list: array expected"); - message.uuid_list = []; - for (var i = 0; i < object.uuid_list.length; ++i) - message.uuid_list[i] = String(object.uuid_list[i]); + var message = new $root.vschema.Vindex(); + if (object.type != null) + message.type = String(object.type); + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".vschema.Vindex.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) + message.params[keys[i]] = String(object.params[keys[i]]); } + if (object.owner != null) + message.owner = String(object.owner); return message; }; /** - * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a Vindex message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @static - * @param {vtctldata.ApplySchemaResponse} message ApplySchemaResponse + * @param {vschema.Vindex} message Vindex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplySchemaResponse.toObject = function toObject(message, options) { + Vindex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uuid_list = []; - if (message.uuid_list && message.uuid_list.length) { - object.uuid_list = []; - for (var j = 0; j < message.uuid_list.length; ++j) - object.uuid_list[j] = message.uuid_list[j]; + if (options.objects || options.defaults) + object.params = {}; + if (options.defaults) { + object.type = ""; + object.owner = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = message.params[keys2[j]]; } + if (message.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; return object; }; /** - * Converts this ApplySchemaResponse to JSON. + * Converts this Vindex to JSON. * @function toJSON - * @memberof vtctldata.ApplySchemaResponse + * @memberof vschema.Vindex * @instance * @returns {Object.} JSON object */ - ApplySchemaResponse.prototype.toJSON = function toJSON() { + Vindex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplySchemaResponse; + return Vindex; })(); - vtctldata.ApplyVSchemaRequest = (function() { + vschema.Table = (function() { /** - * Properties of an ApplyVSchemaRequest. - * @memberof vtctldata - * @interface IApplyVSchemaRequest - * @property {string|null} [keyspace] ApplyVSchemaRequest keyspace - * @property {boolean|null} [skip_rebuild] ApplyVSchemaRequest skip_rebuild - * @property {boolean|null} [dry_run] ApplyVSchemaRequest dry_run - * @property {Array.|null} [cells] ApplyVSchemaRequest cells - * @property {vschema.IKeyspace|null} [v_schema] ApplyVSchemaRequest v_schema - * @property {string|null} [sql] ApplyVSchemaRequest sql + * Properties of a Table. + * @memberof vschema + * @interface ITable + * @property {string|null} [type] Table type + * @property {Array.|null} [column_vindexes] Table column_vindexes + * @property {vschema.IAutoIncrement|null} [auto_increment] Table auto_increment + * @property {Array.|null} [columns] Table columns + * @property {string|null} [pinned] Table pinned + * @property {boolean|null} [column_list_authoritative] Table column_list_authoritative + * @property {string|null} [source] Table source */ /** - * Constructs a new ApplyVSchemaRequest. - * @memberof vtctldata - * @classdesc Represents an ApplyVSchemaRequest. - * @implements IApplyVSchemaRequest + * Constructs a new Table. + * @memberof vschema + * @classdesc Represents a Table. + * @implements ITable * @constructor - * @param {vtctldata.IApplyVSchemaRequest=} [properties] Properties to set + * @param {vschema.ITable=} [properties] Properties to set */ - function ApplyVSchemaRequest(properties) { - this.cells = []; + function Table(properties) { + this.column_vindexes = []; + this.columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85823,143 +86592,159 @@ $root.vtctldata = (function() { } /** - * ApplyVSchemaRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ApplyVSchemaRequest + * Table type. + * @member {string} type + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.keyspace = ""; + Table.prototype.type = ""; /** - * ApplyVSchemaRequest skip_rebuild. - * @member {boolean} skip_rebuild - * @memberof vtctldata.ApplyVSchemaRequest + * Table column_vindexes. + * @member {Array.} column_vindexes + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.skip_rebuild = false; + Table.prototype.column_vindexes = $util.emptyArray; /** - * ApplyVSchemaRequest dry_run. - * @member {boolean} dry_run - * @memberof vtctldata.ApplyVSchemaRequest + * Table auto_increment. + * @member {vschema.IAutoIncrement|null|undefined} auto_increment + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.dry_run = false; + Table.prototype.auto_increment = null; /** - * ApplyVSchemaRequest cells. - * @member {Array.} cells - * @memberof vtctldata.ApplyVSchemaRequest + * Table columns. + * @member {Array.} columns + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.cells = $util.emptyArray; + Table.prototype.columns = $util.emptyArray; /** - * ApplyVSchemaRequest v_schema. - * @member {vschema.IKeyspace|null|undefined} v_schema - * @memberof vtctldata.ApplyVSchemaRequest + * Table pinned. + * @member {string} pinned + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.v_schema = null; + Table.prototype.pinned = ""; /** - * ApplyVSchemaRequest sql. - * @member {string} sql - * @memberof vtctldata.ApplyVSchemaRequest + * Table column_list_authoritative. + * @member {boolean} column_list_authoritative + * @memberof vschema.Table * @instance */ - ApplyVSchemaRequest.prototype.sql = ""; + Table.prototype.column_list_authoritative = false; /** - * Creates a new ApplyVSchemaRequest instance using the specified properties. + * Table source. + * @member {string} source + * @memberof vschema.Table + * @instance + */ + Table.prototype.source = ""; + + /** + * Creates a new Table instance using the specified properties. * @function create - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static - * @param {vtctldata.IApplyVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest instance + * @param {vschema.ITable=} [properties] Properties to set + * @returns {vschema.Table} Table instance */ - ApplyVSchemaRequest.create = function create(properties) { - return new ApplyVSchemaRequest(properties); + Table.create = function create(properties) { + return new Table(properties); }; /** - * Encodes the specified ApplyVSchemaRequest message. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. + * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static - * @param {vtctldata.IApplyVSchemaRequest} message ApplyVSchemaRequest message or plain object to encode + * @param {vschema.ITable} message Table message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyVSchemaRequest.encode = function encode(message, writer) { + Table.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); - if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dry_run); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cells[i]); - if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) - $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sql); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.column_vindexes != null && message.column_vindexes.length) + for (var i = 0; i < message.column_vindexes.length; ++i) + $root.vschema.ColumnVindex.encode(message.column_vindexes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.auto_increment != null && Object.hasOwnProperty.call(message, "auto_increment")) + $root.vschema.AutoIncrement.encode(message.auto_increment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.vschema.Column.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pinned); + if (message.column_list_authoritative != null && Object.hasOwnProperty.call(message, "column_list_authoritative")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.column_list_authoritative); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.source); return writer; }; /** - * Encodes the specified ApplyVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. + * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static - * @param {vtctldata.IApplyVSchemaRequest} message ApplyVSchemaRequest message or plain object to encode + * @param {vschema.ITable} message Table message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + Table.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyVSchemaRequest message from the specified reader or buffer. + * Decodes a Table message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest + * @returns {vschema.Table} Table * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyVSchemaRequest.decode = function decode(reader, length) { + Table.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyVSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Table(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.type = reader.string(); break; case 2: - message.skip_rebuild = reader.bool(); + if (!(message.column_vindexes && message.column_vindexes.length)) + message.column_vindexes = []; + message.column_vindexes.push($root.vschema.ColumnVindex.decode(reader, reader.uint32())); break; case 3: - message.dry_run = reader.bool(); + message.auto_increment = $root.vschema.AutoIncrement.decode(reader, reader.uint32()); break; case 4: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.vschema.Column.decode(reader, reader.uint32())); break; case 5: - message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); + message.pinned = reader.string(); break; case 6: - message.sql = reader.string(); + message.column_list_authoritative = reader.bool(); + break; + case 7: + message.source = reader.string(); break; default: reader.skipType(tag & 7); @@ -85970,166 +86755,200 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a Table message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest + * @returns {vschema.Table} Table * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + Table.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyVSchemaRequest message. + * Verifies a Table message. * @function verify - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyVSchemaRequest.verify = function verify(message) { + Table.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - if (typeof message.skip_rebuild !== "boolean") - return "skip_rebuild: boolean expected"; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - if (typeof message.dry_run !== "boolean") - return "dry_run: boolean expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.column_vindexes != null && message.hasOwnProperty("column_vindexes")) { + if (!Array.isArray(message.column_vindexes)) + return "column_vindexes: array expected"; + for (var i = 0; i < message.column_vindexes.length; ++i) { + var error = $root.vschema.ColumnVindex.verify(message.column_vindexes[i]); + if (error) + return "column_vindexes." + error; + } } - if (message.v_schema != null && message.hasOwnProperty("v_schema")) { - var error = $root.vschema.Keyspace.verify(message.v_schema); + if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) { + var error = $root.vschema.AutoIncrement.verify(message.auto_increment); if (error) - return "v_schema." + error; + return "auto_increment." + error; } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.vschema.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.pinned != null && message.hasOwnProperty("pinned")) + if (!$util.isString(message.pinned)) + return "pinned: string expected"; + if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) + if (typeof message.column_list_authoritative !== "boolean") + return "column_list_authoritative: boolean expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; return null; }; /** - * Creates an ApplyVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Table message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest + * @returns {vschema.Table} Table */ - ApplyVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyVSchemaRequest) + Table.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.Table) return object; - var message = new $root.vtctldata.ApplyVSchemaRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.skip_rebuild != null) - message.skip_rebuild = Boolean(object.skip_rebuild); - if (object.dry_run != null) - message.dry_run = Boolean(object.dry_run); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.ApplyVSchemaRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + var message = new $root.vschema.Table(); + if (object.type != null) + message.type = String(object.type); + if (object.column_vindexes) { + if (!Array.isArray(object.column_vindexes)) + throw TypeError(".vschema.Table.column_vindexes: array expected"); + message.column_vindexes = []; + for (var i = 0; i < object.column_vindexes.length; ++i) { + if (typeof object.column_vindexes[i] !== "object") + throw TypeError(".vschema.Table.column_vindexes: object expected"); + message.column_vindexes[i] = $root.vschema.ColumnVindex.fromObject(object.column_vindexes[i]); + } } - if (object.v_schema != null) { - if (typeof object.v_schema !== "object") - throw TypeError(".vtctldata.ApplyVSchemaRequest.v_schema: object expected"); - message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); + if (object.auto_increment != null) { + if (typeof object.auto_increment !== "object") + throw TypeError(".vschema.Table.auto_increment: object expected"); + message.auto_increment = $root.vschema.AutoIncrement.fromObject(object.auto_increment); } - if (object.sql != null) - message.sql = String(object.sql); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".vschema.Table.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".vschema.Table.columns: object expected"); + message.columns[i] = $root.vschema.Column.fromObject(object.columns[i]); + } + } + if (object.pinned != null) + message.pinned = String(object.pinned); + if (object.column_list_authoritative != null) + message.column_list_authoritative = Boolean(object.column_list_authoritative); + if (object.source != null) + message.source = String(object.source); return message; }; /** - * Creates a plain object from an ApplyVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a Table message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @static - * @param {vtctldata.ApplyVSchemaRequest} message ApplyVSchemaRequest + * @param {vschema.Table} message Table * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplyVSchemaRequest.toObject = function toObject(message, options) { + Table.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; + if (options.arrays || options.defaults) { + object.column_vindexes = []; + object.columns = []; + } if (options.defaults) { - object.keyspace = ""; - object.skip_rebuild = false; - object.dry_run = false; - object.v_schema = null; - object.sql = ""; + object.type = ""; + object.auto_increment = null; + object.pinned = ""; + object.column_list_authoritative = false; + object.source = ""; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) - object.skip_rebuild = message.skip_rebuild; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - object.dry_run = message.dry_run; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.column_vindexes && message.column_vindexes.length) { + object.column_vindexes = []; + for (var j = 0; j < message.column_vindexes.length; ++j) + object.column_vindexes[j] = $root.vschema.ColumnVindex.toObject(message.column_vindexes[j], options); } - if (message.v_schema != null && message.hasOwnProperty("v_schema")) - object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; + if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) + object.auto_increment = $root.vschema.AutoIncrement.toObject(message.auto_increment, options); + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.vschema.Column.toObject(message.columns[j], options); + } + if (message.pinned != null && message.hasOwnProperty("pinned")) + object.pinned = message.pinned; + if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) + object.column_list_authoritative = message.column_list_authoritative; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; return object; }; /** - * Converts this ApplyVSchemaRequest to JSON. + * Converts this Table to JSON. * @function toJSON - * @memberof vtctldata.ApplyVSchemaRequest + * @memberof vschema.Table * @instance * @returns {Object.} JSON object */ - ApplyVSchemaRequest.prototype.toJSON = function toJSON() { + Table.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyVSchemaRequest; + return Table; })(); - vtctldata.ApplyVSchemaResponse = (function() { + vschema.ColumnVindex = (function() { /** - * Properties of an ApplyVSchemaResponse. - * @memberof vtctldata - * @interface IApplyVSchemaResponse - * @property {vschema.IKeyspace|null} [v_schema] ApplyVSchemaResponse v_schema + * Properties of a ColumnVindex. + * @memberof vschema + * @interface IColumnVindex + * @property {string|null} [column] ColumnVindex column + * @property {string|null} [name] ColumnVindex name + * @property {Array.|null} [columns] ColumnVindex columns */ /** - * Constructs a new ApplyVSchemaResponse. - * @memberof vtctldata - * @classdesc Represents an ApplyVSchemaResponse. - * @implements IApplyVSchemaResponse + * Constructs a new ColumnVindex. + * @memberof vschema + * @classdesc Represents a ColumnVindex. + * @implements IColumnVindex * @constructor - * @param {vtctldata.IApplyVSchemaResponse=} [properties] Properties to set + * @param {vschema.IColumnVindex=} [properties] Properties to set */ - function ApplyVSchemaResponse(properties) { + function ColumnVindex(properties) { + this.columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86137,75 +86956,104 @@ $root.vtctldata = (function() { } /** - * ApplyVSchemaResponse v_schema. - * @member {vschema.IKeyspace|null|undefined} v_schema - * @memberof vtctldata.ApplyVSchemaResponse + * ColumnVindex column. + * @member {string} column + * @memberof vschema.ColumnVindex * @instance */ - ApplyVSchemaResponse.prototype.v_schema = null; + ColumnVindex.prototype.column = ""; /** - * Creates a new ApplyVSchemaResponse instance using the specified properties. + * ColumnVindex name. + * @member {string} name + * @memberof vschema.ColumnVindex + * @instance + */ + ColumnVindex.prototype.name = ""; + + /** + * ColumnVindex columns. + * @member {Array.} columns + * @memberof vschema.ColumnVindex + * @instance + */ + ColumnVindex.prototype.columns = $util.emptyArray; + + /** + * Creates a new ColumnVindex instance using the specified properties. * @function create - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static - * @param {vtctldata.IApplyVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse instance + * @param {vschema.IColumnVindex=} [properties] Properties to set + * @returns {vschema.ColumnVindex} ColumnVindex instance */ - ApplyVSchemaResponse.create = function create(properties) { - return new ApplyVSchemaResponse(properties); + ColumnVindex.create = function create(properties) { + return new ColumnVindex(properties); }; /** - * Encodes the specified ApplyVSchemaResponse message. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. + * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. * @function encode - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static - * @param {vtctldata.IApplyVSchemaResponse} message ApplyVSchemaResponse message or plain object to encode + * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyVSchemaResponse.encode = function encode(message, writer) { + ColumnVindex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) - $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.columns[i]); return writer; }; /** - * Encodes the specified ApplyVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. + * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static - * @param {vtctldata.IApplyVSchemaResponse} message ApplyVSchemaResponse message or plain object to encode + * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApplyVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + ColumnVindex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApplyVSchemaResponse message from the specified reader or buffer. + * Decodes a ColumnVindex message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse + * @returns {vschema.ColumnVindex} ColumnVindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyVSchemaResponse.decode = function decode(reader, length) { + ColumnVindex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyVSchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ColumnVindex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); + message.column = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -86216,115 +87064,138 @@ $root.vtctldata = (function() { }; /** - * Decodes an ApplyVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse + * @returns {vschema.ColumnVindex} ColumnVindex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApplyVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + ColumnVindex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApplyVSchemaResponse message. + * Verifies a ColumnVindex message. * @function verify - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApplyVSchemaResponse.verify = function verify(message) { + ColumnVindex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) { - var error = $root.vschema.Keyspace.verify(message.v_schema); - if (error) - return "v_schema." + error; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) + if (!$util.isString(message.columns[i])) + return "columns: string[] expected"; } return null; }; /** - * Creates an ApplyVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static * @param {Object.} object Plain object - * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse + * @returns {vschema.ColumnVindex} ColumnVindex */ - ApplyVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ApplyVSchemaResponse) + ColumnVindex.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.ColumnVindex) return object; - var message = new $root.vtctldata.ApplyVSchemaResponse(); - if (object.v_schema != null) { - if (typeof object.v_schema !== "object") - throw TypeError(".vtctldata.ApplyVSchemaResponse.v_schema: object expected"); - message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); + var message = new $root.vschema.ColumnVindex(); + if (object.column != null) + message.column = String(object.column); + if (object.name != null) + message.name = String(object.name); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".vschema.ColumnVindex.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) + message.columns[i] = String(object.columns[i]); } return message; }; /** - * Creates a plain object from an ApplyVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @static - * @param {vtctldata.ApplyVSchemaResponse} message ApplyVSchemaResponse + * @param {vschema.ColumnVindex} message ColumnVindex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApplyVSchemaResponse.toObject = function toObject(message, options) { + ColumnVindex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.v_schema = null; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) - object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) { + object.column = ""; + object.name = ""; + } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = message.columns[j]; + } return object; }; /** - * Converts this ApplyVSchemaResponse to JSON. + * Converts this ColumnVindex to JSON. * @function toJSON - * @memberof vtctldata.ApplyVSchemaResponse + * @memberof vschema.ColumnVindex * @instance * @returns {Object.} JSON object */ - ApplyVSchemaResponse.prototype.toJSON = function toJSON() { + ColumnVindex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ApplyVSchemaResponse; + return ColumnVindex; })(); - vtctldata.BackupRequest = (function() { + vschema.AutoIncrement = (function() { /** - * Properties of a BackupRequest. - * @memberof vtctldata - * @interface IBackupRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] BackupRequest tablet_alias - * @property {boolean|null} [allow_primary] BackupRequest allow_primary - * @property {number|Long|null} [concurrency] BackupRequest concurrency - * @property {string|null} [incremental_from_pos] BackupRequest incremental_from_pos + * Properties of an AutoIncrement. + * @memberof vschema + * @interface IAutoIncrement + * @property {string|null} [column] AutoIncrement column + * @property {string|null} [sequence] AutoIncrement sequence */ /** - * Constructs a new BackupRequest. - * @memberof vtctldata - * @classdesc Represents a BackupRequest. - * @implements IBackupRequest + * Constructs a new AutoIncrement. + * @memberof vschema + * @classdesc Represents an AutoIncrement. + * @implements IAutoIncrement * @constructor - * @param {vtctldata.IBackupRequest=} [properties] Properties to set + * @param {vschema.IAutoIncrement=} [properties] Properties to set */ - function BackupRequest(properties) { + function AutoIncrement(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86332,114 +87203,88 @@ $root.vtctldata = (function() { } /** - * BackupRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.BackupRequest - * @instance - */ - BackupRequest.prototype.tablet_alias = null; - - /** - * BackupRequest allow_primary. - * @member {boolean} allow_primary - * @memberof vtctldata.BackupRequest - * @instance - */ - BackupRequest.prototype.allow_primary = false; - - /** - * BackupRequest concurrency. - * @member {number|Long} concurrency - * @memberof vtctldata.BackupRequest + * AutoIncrement column. + * @member {string} column + * @memberof vschema.AutoIncrement * @instance */ - BackupRequest.prototype.concurrency = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + AutoIncrement.prototype.column = ""; /** - * BackupRequest incremental_from_pos. - * @member {string} incremental_from_pos - * @memberof vtctldata.BackupRequest + * AutoIncrement sequence. + * @member {string} sequence + * @memberof vschema.AutoIncrement * @instance */ - BackupRequest.prototype.incremental_from_pos = ""; + AutoIncrement.prototype.sequence = ""; /** - * Creates a new BackupRequest instance using the specified properties. + * Creates a new AutoIncrement instance using the specified properties. * @function create - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static - * @param {vtctldata.IBackupRequest=} [properties] Properties to set - * @returns {vtctldata.BackupRequest} BackupRequest instance + * @param {vschema.IAutoIncrement=} [properties] Properties to set + * @returns {vschema.AutoIncrement} AutoIncrement instance */ - BackupRequest.create = function create(properties) { - return new BackupRequest(properties); + AutoIncrement.create = function create(properties) { + return new AutoIncrement(properties); }; /** - * Encodes the specified BackupRequest message. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. + * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. * @function encode - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static - * @param {vtctldata.IBackupRequest} message BackupRequest message or plain object to encode + * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupRequest.encode = function encode(message, writer) { + AutoIncrement.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); - if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.concurrency); - if (message.incremental_from_pos != null && Object.hasOwnProperty.call(message, "incremental_from_pos")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.incremental_from_pos); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sequence); return writer; }; /** - * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. + * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static - * @param {vtctldata.IBackupRequest} message BackupRequest message or plain object to encode + * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + AutoIncrement.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupRequest message from the specified reader or buffer. + * Decodes an AutoIncrement message from the specified reader or buffer. * @function decode - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.BackupRequest} BackupRequest + * @returns {vschema.AutoIncrement} AutoIncrement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupRequest.decode = function decode(reader, length) { + AutoIncrement.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.AutoIncrement(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.column = reader.string(); break; case 2: - message.allow_primary = reader.bool(); - break; - case 3: - message.concurrency = reader.uint64(); - break; - case 4: - message.incremental_from_pos = reader.string(); + message.sequence = reader.string(); break; default: reader.skipType(tag & 7); @@ -86450,154 +87295,117 @@ $root.vtctldata = (function() { }; /** - * Decodes a BackupRequest message from the specified reader or buffer, length delimited. + * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.BackupRequest} BackupRequest + * @returns {vschema.AutoIncrement} AutoIncrement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupRequest.decodeDelimited = function decodeDelimited(reader) { + AutoIncrement.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupRequest message. + * Verifies an AutoIncrement message. * @function verify - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupRequest.verify = function verify(message) { + AutoIncrement.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - if (typeof message.allow_primary !== "boolean") - return "allow_primary: boolean expected"; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (!$util.isInteger(message.concurrency) && !(message.concurrency && $util.isInteger(message.concurrency.low) && $util.isInteger(message.concurrency.high))) - return "concurrency: integer|Long expected"; - if (message.incremental_from_pos != null && message.hasOwnProperty("incremental_from_pos")) - if (!$util.isString(message.incremental_from_pos)) - return "incremental_from_pos: string expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isString(message.sequence)) + return "sequence: string expected"; return null; }; /** - * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static * @param {Object.} object Plain object - * @returns {vtctldata.BackupRequest} BackupRequest + * @returns {vschema.AutoIncrement} AutoIncrement */ - BackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.BackupRequest) + AutoIncrement.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.AutoIncrement) return object; - var message = new $root.vtctldata.BackupRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.BackupRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.allow_primary != null) - message.allow_primary = Boolean(object.allow_primary); - if (object.concurrency != null) - if ($util.Long) - (message.concurrency = $util.Long.fromValue(object.concurrency)).unsigned = true; - else if (typeof object.concurrency === "string") - message.concurrency = parseInt(object.concurrency, 10); - else if (typeof object.concurrency === "number") - message.concurrency = object.concurrency; - else if (typeof object.concurrency === "object") - message.concurrency = new $util.LongBits(object.concurrency.low >>> 0, object.concurrency.high >>> 0).toNumber(true); - if (object.incremental_from_pos != null) - message.incremental_from_pos = String(object.incremental_from_pos); + var message = new $root.vschema.AutoIncrement(); + if (object.column != null) + message.column = String(object.column); + if (object.sequence != null) + message.sequence = String(object.sequence); return message; }; /** - * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. + * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @static - * @param {vtctldata.BackupRequest} message BackupRequest + * @param {vschema.AutoIncrement} message AutoIncrement * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupRequest.toObject = function toObject(message, options) { + AutoIncrement.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tablet_alias = null; - object.allow_primary = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.concurrency = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.concurrency = options.longs === String ? "0" : 0; - object.incremental_from_pos = ""; + object.column = ""; + object.sequence = ""; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - object.allow_primary = message.allow_primary; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (typeof message.concurrency === "number") - object.concurrency = options.longs === String ? String(message.concurrency) : message.concurrency; - else - object.concurrency = options.longs === String ? $util.Long.prototype.toString.call(message.concurrency) : options.longs === Number ? new $util.LongBits(message.concurrency.low >>> 0, message.concurrency.high >>> 0).toNumber(true) : message.concurrency; - if (message.incremental_from_pos != null && message.hasOwnProperty("incremental_from_pos")) - object.incremental_from_pos = message.incremental_from_pos; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.sequence != null && message.hasOwnProperty("sequence")) + object.sequence = message.sequence; return object; }; /** - * Converts this BackupRequest to JSON. + * Converts this AutoIncrement to JSON. * @function toJSON - * @memberof vtctldata.BackupRequest + * @memberof vschema.AutoIncrement * @instance * @returns {Object.} JSON object */ - BackupRequest.prototype.toJSON = function toJSON() { + AutoIncrement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BackupRequest; + return AutoIncrement; })(); - vtctldata.BackupResponse = (function() { + vschema.Column = (function() { /** - * Properties of a BackupResponse. - * @memberof vtctldata - * @interface IBackupResponse - * @property {topodata.ITabletAlias|null} [tablet_alias] BackupResponse tablet_alias - * @property {string|null} [keyspace] BackupResponse keyspace - * @property {string|null} [shard] BackupResponse shard - * @property {logutil.IEvent|null} [event] BackupResponse event + * Properties of a Column. + * @memberof vschema + * @interface IColumn + * @property {string|null} [name] Column name + * @property {query.Type|null} [type] Column type */ /** - * Constructs a new BackupResponse. - * @memberof vtctldata - * @classdesc Represents a BackupResponse. - * @implements IBackupResponse + * Constructs a new Column. + * @memberof vschema + * @classdesc Represents a Column. + * @implements IColumn * @constructor - * @param {vtctldata.IBackupResponse=} [properties] Properties to set + * @param {vschema.IColumn=} [properties] Properties to set */ - function BackupResponse(properties) { + function Column(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86605,114 +87413,88 @@ $root.vtctldata = (function() { } /** - * BackupResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.BackupResponse - * @instance - */ - BackupResponse.prototype.tablet_alias = null; - - /** - * BackupResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.BackupResponse - * @instance - */ - BackupResponse.prototype.keyspace = ""; - - /** - * BackupResponse shard. - * @member {string} shard - * @memberof vtctldata.BackupResponse + * Column name. + * @member {string} name + * @memberof vschema.Column * @instance */ - BackupResponse.prototype.shard = ""; + Column.prototype.name = ""; /** - * BackupResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof vtctldata.BackupResponse + * Column type. + * @member {query.Type} type + * @memberof vschema.Column * @instance */ - BackupResponse.prototype.event = null; + Column.prototype.type = 0; /** - * Creates a new BackupResponse instance using the specified properties. + * Creates a new Column instance using the specified properties. * @function create - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static - * @param {vtctldata.IBackupResponse=} [properties] Properties to set - * @returns {vtctldata.BackupResponse} BackupResponse instance + * @param {vschema.IColumn=} [properties] Properties to set + * @returns {vschema.Column} Column instance */ - BackupResponse.create = function create(properties) { - return new BackupResponse(properties); + Column.create = function create(properties) { + return new Column(properties); }; /** - * Encodes the specified BackupResponse message. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. + * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. * @function encode - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static - * @param {vtctldata.IBackupResponse} message BackupResponse message or plain object to encode + * @param {vschema.IColumn} message Column message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupResponse.encode = function encode(message, writer) { + Column.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); return writer; }; /** - * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. + * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static - * @param {vtctldata.IBackupResponse} message BackupResponse message or plain object to encode + * @param {vschema.IColumn} message Column message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + Column.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupResponse message from the specified reader or buffer. + * Decodes a Column message from the specified reader or buffer. * @function decode - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.BackupResponse} BackupResponse + * @returns {vschema.Column} Column * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupResponse.decode = function decode(reader, length) { + Column.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Column(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.keyspace = reader.string(); - break; - case 3: - message.shard = reader.string(); - break; - case 4: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); + message.type = reader.int32(); break; default: reader.skipType(tag & 7); @@ -86723,145 +87505,297 @@ $root.vtctldata = (function() { }; /** - * Decodes a BackupResponse message from the specified reader or buffer, length delimited. + * Decodes a Column message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.BackupResponse} BackupResponse + * @returns {vschema.Column} Column * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupResponse.decodeDelimited = function decodeDelimited(reader) { + Column.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupResponse message. + * Verifies a Column message. * @function verify - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupResponse.verify = function verify(message) { + Column.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); - if (error) - return "event." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 257: + case 770: + case 259: + case 772: + case 261: + case 774: + case 263: + case 776: + case 265: + case 778: + case 1035: + case 1036: + case 2061: + case 2062: + case 2063: + case 2064: + case 785: + case 18: + case 6163: + case 10260: + case 6165: + case 10262: + case 6167: + case 10264: + case 2073: + case 2074: + case 2075: + case 28: + case 2077: + case 2078: + case 31: + case 4128: + case 4129: + case 4130: + break; + } return null; }; /** - * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Column message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static * @param {Object.} object Plain object - * @returns {vtctldata.BackupResponse} BackupResponse + * @returns {vschema.Column} Column */ - BackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.BackupResponse) + Column.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.Column) return object; - var message = new $root.vtctldata.BackupResponse(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.BackupResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".vtctldata.BackupResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); + var message = new $root.vschema.Column(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "NULL_TYPE": + case 0: + message.type = 0; + break; + case "INT8": + case 257: + message.type = 257; + break; + case "UINT8": + case 770: + message.type = 770; + break; + case "INT16": + case 259: + message.type = 259; + break; + case "UINT16": + case 772: + message.type = 772; + break; + case "INT24": + case 261: + message.type = 261; + break; + case "UINT24": + case 774: + message.type = 774; + break; + case "INT32": + case 263: + message.type = 263; + break; + case "UINT32": + case 776: + message.type = 776; + break; + case "INT64": + case 265: + message.type = 265; + break; + case "UINT64": + case 778: + message.type = 778; + break; + case "FLOAT32": + case 1035: + message.type = 1035; + break; + case "FLOAT64": + case 1036: + message.type = 1036; + break; + case "TIMESTAMP": + case 2061: + message.type = 2061; + break; + case "DATE": + case 2062: + message.type = 2062; + break; + case "TIME": + case 2063: + message.type = 2063; + break; + case "DATETIME": + case 2064: + message.type = 2064; + break; + case "YEAR": + case 785: + message.type = 785; + break; + case "DECIMAL": + case 18: + message.type = 18; + break; + case "TEXT": + case 6163: + message.type = 6163; + break; + case "BLOB": + case 10260: + message.type = 10260; + break; + case "VARCHAR": + case 6165: + message.type = 6165; + break; + case "VARBINARY": + case 10262: + message.type = 10262; + break; + case "CHAR": + case 6167: + message.type = 6167; + break; + case "BINARY": + case 10264: + message.type = 10264; + break; + case "BIT": + case 2073: + message.type = 2073; + break; + case "ENUM": + case 2074: + message.type = 2074; + break; + case "SET": + case 2075: + message.type = 2075; + break; + case "TUPLE": + case 28: + message.type = 28; + break; + case "GEOMETRY": + case 2077: + message.type = 2077; + break; + case "JSON": + case 2078: + message.type = 2078; + break; + case "EXPRESSION": + case 31: + message.type = 31; + break; + case "HEXNUM": + case 4128: + message.type = 4128; + break; + case "HEXVAL": + case 4129: + message.type = 4129; + break; + case "BITNUM": + case 4130: + message.type = 4130; + break; } return message; }; /** - * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a Column message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @static - * @param {vtctldata.BackupResponse} message BackupResponse + * @param {vschema.Column} message Column * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupResponse.toObject = function toObject(message, options) { + Column.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tablet_alias = null; - object.keyspace = ""; - object.shard = ""; - object.event = null; + object.name = ""; + object.type = options.enums === String ? "NULL_TYPE" : 0; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.query.Type[message.type] : message.type; return object; }; /** - * Converts this BackupResponse to JSON. + * Converts this Column to JSON. * @function toJSON - * @memberof vtctldata.BackupResponse + * @memberof vschema.Column * @instance * @returns {Object.} JSON object */ - BackupResponse.prototype.toJSON = function toJSON() { + Column.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BackupResponse; + return Column; })(); - vtctldata.BackupShardRequest = (function() { + vschema.SrvVSchema = (function() { /** - * Properties of a BackupShardRequest. - * @memberof vtctldata - * @interface IBackupShardRequest - * @property {string|null} [keyspace] BackupShardRequest keyspace - * @property {string|null} [shard] BackupShardRequest shard - * @property {boolean|null} [allow_primary] BackupShardRequest allow_primary - * @property {number|Long|null} [concurrency] BackupShardRequest concurrency + * Properties of a SrvVSchema. + * @memberof vschema + * @interface ISrvVSchema + * @property {Object.|null} [keyspaces] SrvVSchema keyspaces + * @property {vschema.IRoutingRules|null} [routing_rules] SrvVSchema routing_rules + * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] SrvVSchema shard_routing_rules */ /** - * Constructs a new BackupShardRequest. - * @memberof vtctldata - * @classdesc Represents a BackupShardRequest. - * @implements IBackupShardRequest + * Constructs a new SrvVSchema. + * @memberof vschema + * @classdesc Represents a SrvVSchema. + * @implements ISrvVSchema * @constructor - * @param {vtctldata.IBackupShardRequest=} [properties] Properties to set + * @param {vschema.ISrvVSchema=} [properties] Properties to set */ - function BackupShardRequest(properties) { + function SrvVSchema(properties) { + this.keyspaces = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86869,114 +87803,123 @@ $root.vtctldata = (function() { } /** - * BackupShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.BackupShardRequest - * @instance - */ - BackupShardRequest.prototype.keyspace = ""; - - /** - * BackupShardRequest shard. - * @member {string} shard - * @memberof vtctldata.BackupShardRequest + * SrvVSchema keyspaces. + * @member {Object.} keyspaces + * @memberof vschema.SrvVSchema * @instance */ - BackupShardRequest.prototype.shard = ""; + SrvVSchema.prototype.keyspaces = $util.emptyObject; /** - * BackupShardRequest allow_primary. - * @member {boolean} allow_primary - * @memberof vtctldata.BackupShardRequest + * SrvVSchema routing_rules. + * @member {vschema.IRoutingRules|null|undefined} routing_rules + * @memberof vschema.SrvVSchema * @instance */ - BackupShardRequest.prototype.allow_primary = false; + SrvVSchema.prototype.routing_rules = null; /** - * BackupShardRequest concurrency. - * @member {number|Long} concurrency - * @memberof vtctldata.BackupShardRequest + * SrvVSchema shard_routing_rules. + * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules + * @memberof vschema.SrvVSchema * @instance */ - BackupShardRequest.prototype.concurrency = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + SrvVSchema.prototype.shard_routing_rules = null; /** - * Creates a new BackupShardRequest instance using the specified properties. + * Creates a new SrvVSchema instance using the specified properties. * @function create - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static - * @param {vtctldata.IBackupShardRequest=} [properties] Properties to set - * @returns {vtctldata.BackupShardRequest} BackupShardRequest instance + * @param {vschema.ISrvVSchema=} [properties] Properties to set + * @returns {vschema.SrvVSchema} SrvVSchema instance */ - BackupShardRequest.create = function create(properties) { - return new BackupShardRequest(properties); + SrvVSchema.create = function create(properties) { + return new SrvVSchema(properties); }; /** - * Encodes the specified BackupShardRequest message. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. + * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. * @function encode - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static - * @param {vtctldata.IBackupShardRequest} message BackupShardRequest message or plain object to encode + * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupShardRequest.encode = function encode(message, writer) { + SrvVSchema.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_primary); - if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.concurrency); + if (message.keyspaces != null && Object.hasOwnProperty.call(message, "keyspaces")) + for (var keys = Object.keys(message.keyspaces), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vschema.Keyspace.encode(message.keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) + $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) + $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BackupShardRequest message, length delimited. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. + * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static - * @param {vtctldata.IBackupShardRequest} message BackupShardRequest message or plain object to encode + * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + SrvVSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupShardRequest message from the specified reader or buffer. + * Decodes a SrvVSchema message from the specified reader or buffer. * @function decode - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.BackupShardRequest} BackupShardRequest + * @returns {vschema.SrvVSchema} SrvVSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupShardRequest.decode = function decode(reader, length) { + SrvVSchema.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.SrvVSchema(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + if (message.keyspaces === $util.emptyObject) + message.keyspaces = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vschema.Keyspace.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.keyspaces[key] = value; break; case 2: - message.shard = reader.string(); + message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); break; case 3: - message.allow_primary = reader.bool(); - break; - case 4: - message.concurrency = reader.uint64(); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -86987,148 +87930,155 @@ $root.vtctldata = (function() { }; /** - * Decodes a BackupShardRequest message from the specified reader or buffer, length delimited. + * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.BackupShardRequest} BackupShardRequest + * @returns {vschema.SrvVSchema} SrvVSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupShardRequest.decodeDelimited = function decodeDelimited(reader) { + SrvVSchema.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupShardRequest message. + * Verifies a SrvVSchema message. * @function verify - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupShardRequest.verify = function verify(message) { + SrvVSchema.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - if (typeof message.allow_primary !== "boolean") - return "allow_primary: boolean expected"; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (!$util.isInteger(message.concurrency) && !(message.concurrency && $util.isInteger(message.concurrency.low) && $util.isInteger(message.concurrency.high))) - return "concurrency: integer|Long expected"; + if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { + if (!$util.isObject(message.keyspaces)) + return "keyspaces: object expected"; + var key = Object.keys(message.keyspaces); + for (var i = 0; i < key.length; ++i) { + var error = $root.vschema.Keyspace.verify(message.keyspaces[key[i]]); + if (error) + return "keyspaces." + error; + } + } + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { + var error = $root.vschema.RoutingRules.verify(message.routing_rules); + if (error) + return "routing_rules." + error; + } + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { + var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); + if (error) + return "shard_routing_rules." + error; + } return null; }; /** - * Creates a BackupShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static * @param {Object.} object Plain object - * @returns {vtctldata.BackupShardRequest} BackupShardRequest + * @returns {vschema.SrvVSchema} SrvVSchema */ - BackupShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.BackupShardRequest) + SrvVSchema.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.SrvVSchema) return object; - var message = new $root.vtctldata.BackupShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.allow_primary != null) - message.allow_primary = Boolean(object.allow_primary); - if (object.concurrency != null) - if ($util.Long) - (message.concurrency = $util.Long.fromValue(object.concurrency)).unsigned = true; - else if (typeof object.concurrency === "string") - message.concurrency = parseInt(object.concurrency, 10); - else if (typeof object.concurrency === "number") - message.concurrency = object.concurrency; - else if (typeof object.concurrency === "object") - message.concurrency = new $util.LongBits(object.concurrency.low >>> 0, object.concurrency.high >>> 0).toNumber(true); + var message = new $root.vschema.SrvVSchema(); + if (object.keyspaces) { + if (typeof object.keyspaces !== "object") + throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); + message.keyspaces = {}; + for (var keys = Object.keys(object.keyspaces), i = 0; i < keys.length; ++i) { + if (typeof object.keyspaces[keys[i]] !== "object") + throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); + message.keyspaces[keys[i]] = $root.vschema.Keyspace.fromObject(object.keyspaces[keys[i]]); + } + } + if (object.routing_rules != null) { + if (typeof object.routing_rules !== "object") + throw TypeError(".vschema.SrvVSchema.routing_rules: object expected"); + message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); + } + if (object.shard_routing_rules != null) { + if (typeof object.shard_routing_rules !== "object") + throw TypeError(".vschema.SrvVSchema.shard_routing_rules: object expected"); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); + } return message; }; /** - * Creates a plain object from a BackupShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @static - * @param {vtctldata.BackupShardRequest} message BackupShardRequest + * @param {vschema.SrvVSchema} message SrvVSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupShardRequest.toObject = function toObject(message, options) { + SrvVSchema.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.keyspaces = {}; if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.allow_primary = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.concurrency = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.concurrency = options.longs === String ? "0" : 0; + object.routing_rules = null; + object.shard_routing_rules = null; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - object.allow_primary = message.allow_primary; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (typeof message.concurrency === "number") - object.concurrency = options.longs === String ? String(message.concurrency) : message.concurrency; - else - object.concurrency = options.longs === String ? $util.Long.prototype.toString.call(message.concurrency) : options.longs === Number ? new $util.LongBits(message.concurrency.low >>> 0, message.concurrency.high >>> 0).toNumber(true) : message.concurrency; + var keys2; + if (message.keyspaces && (keys2 = Object.keys(message.keyspaces)).length) { + object.keyspaces = {}; + for (var j = 0; j < keys2.length; ++j) + object.keyspaces[keys2[j]] = $root.vschema.Keyspace.toObject(message.keyspaces[keys2[j]], options); + } + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) + object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) + object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); return object; }; /** - * Converts this BackupShardRequest to JSON. + * Converts this SrvVSchema to JSON. * @function toJSON - * @memberof vtctldata.BackupShardRequest + * @memberof vschema.SrvVSchema * @instance * @returns {Object.} JSON object */ - BackupShardRequest.prototype.toJSON = function toJSON() { + SrvVSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BackupShardRequest; + return SrvVSchema; })(); - vtctldata.ChangeTabletTypeRequest = (function() { + vschema.ShardRoutingRules = (function() { /** - * Properties of a ChangeTabletTypeRequest. - * @memberof vtctldata - * @interface IChangeTabletTypeRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ChangeTabletTypeRequest tablet_alias - * @property {topodata.TabletType|null} [db_type] ChangeTabletTypeRequest db_type - * @property {boolean|null} [dry_run] ChangeTabletTypeRequest dry_run + * Properties of a ShardRoutingRules. + * @memberof vschema + * @interface IShardRoutingRules + * @property {Array.|null} [rules] ShardRoutingRules rules */ /** - * Constructs a new ChangeTabletTypeRequest. - * @memberof vtctldata - * @classdesc Represents a ChangeTabletTypeRequest. - * @implements IChangeTabletTypeRequest + * Constructs a new ShardRoutingRules. + * @memberof vschema + * @classdesc Represents a ShardRoutingRules. + * @implements IShardRoutingRules * @constructor - * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set + * @param {vschema.IShardRoutingRules=} [properties] Properties to set */ - function ChangeTabletTypeRequest(properties) { + function ShardRoutingRules(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87136,101 +88086,78 @@ $root.vtctldata = (function() { } /** - * ChangeTabletTypeRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - */ - ChangeTabletTypeRequest.prototype.tablet_alias = null; - - /** - * ChangeTabletTypeRequest db_type. - * @member {topodata.TabletType} db_type - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - */ - ChangeTabletTypeRequest.prototype.db_type = 0; - - /** - * ChangeTabletTypeRequest dry_run. - * @member {boolean} dry_run - * @memberof vtctldata.ChangeTabletTypeRequest + * ShardRoutingRules rules. + * @member {Array.} rules + * @memberof vschema.ShardRoutingRules * @instance */ - ChangeTabletTypeRequest.prototype.dry_run = false; + ShardRoutingRules.prototype.rules = $util.emptyArray; /** - * Creates a new ChangeTabletTypeRequest instance using the specified properties. + * Creates a new ShardRoutingRules instance using the specified properties. * @function create - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static - * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest instance + * @param {vschema.IShardRoutingRules=} [properties] Properties to set + * @returns {vschema.ShardRoutingRules} ShardRoutingRules instance */ - ChangeTabletTypeRequest.create = function create(properties) { - return new ChangeTabletTypeRequest(properties); + ShardRoutingRules.create = function create(properties) { + return new ShardRoutingRules(properties); }; /** - * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. + * Encodes the specified ShardRoutingRules message. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. * @function encode - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static - * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode + * @param {vschema.IShardRoutingRules} message ShardRoutingRules message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeTabletTypeRequest.encode = function encode(message, writer) { + ShardRoutingRules.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.db_type != null && Object.hasOwnProperty.call(message, "db_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.db_type); - if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dry_run); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.vschema.ShardRoutingRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. + * Encodes the specified ShardRoutingRules message, length delimited. Does not implicitly {@link vschema.ShardRoutingRules.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static - * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode + * @param {vschema.IShardRoutingRules} message ShardRoutingRules message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeTabletTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ShardRoutingRules.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. + * Decodes a ShardRoutingRules message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest + * @returns {vschema.ShardRoutingRules} ShardRoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeTabletTypeRequest.decode = function decode(reader, length) { + ShardRoutingRules.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ShardRoutingRules(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.db_type = reader.int32(); - break; - case 3: - message.dry_run = reader.bool(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.vschema.ShardRoutingRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -87241,189 +88168,126 @@ $root.vtctldata = (function() { }; /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardRoutingRules message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest + * @returns {vschema.ShardRoutingRules} ShardRoutingRules * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeTabletTypeRequest.decodeDelimited = function decodeDelimited(reader) { + ShardRoutingRules.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeTabletTypeRequest message. + * Verifies a ShardRoutingRules message. * @function verify - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeTabletTypeRequest.verify = function verify(message) { + ShardRoutingRules.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.db_type != null && message.hasOwnProperty("db_type")) - switch (message.db_type) { - default: - return "db_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.vschema.ShardRoutingRule.verify(message.rules[i]); + if (error) + return "rules." + error; } - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - if (typeof message.dry_run !== "boolean") - return "dry_run: boolean expected"; + } return null; }; /** - * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardRoutingRules message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static * @param {Object.} object Plain object - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest + * @returns {vschema.ShardRoutingRules} ShardRoutingRules */ - ChangeTabletTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ChangeTabletTypeRequest) + ShardRoutingRules.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.ShardRoutingRules) return object; - var message = new $root.vtctldata.ChangeTabletTypeRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - switch (object.db_type) { - case "UNKNOWN": - case 0: - message.db_type = 0; - break; - case "PRIMARY": - case 1: - message.db_type = 1; - break; - case "MASTER": - case 1: - message.db_type = 1; - break; - case "REPLICA": - case 2: - message.db_type = 2; - break; - case "RDONLY": - case 3: - message.db_type = 3; - break; - case "BATCH": - case 3: - message.db_type = 3; - break; - case "SPARE": - case 4: - message.db_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.db_type = 5; - break; - case "BACKUP": - case 6: - message.db_type = 6; - break; - case "RESTORE": - case 7: - message.db_type = 7; - break; - case "DRAINED": - case 8: - message.db_type = 8; - break; + var message = new $root.vschema.ShardRoutingRules(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".vschema.ShardRoutingRules.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".vschema.ShardRoutingRules.rules: object expected"); + message.rules[i] = $root.vschema.ShardRoutingRule.fromObject(object.rules[i]); + } } - if (object.dry_run != null) - message.dry_run = Boolean(object.dry_run); return message; }; /** - * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ShardRoutingRules message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @static - * @param {vtctldata.ChangeTabletTypeRequest} message ChangeTabletTypeRequest + * @param {vschema.ShardRoutingRules} message ShardRoutingRules * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeTabletTypeRequest.toObject = function toObject(message, options) { + ShardRoutingRules.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.db_type = options.enums === String ? "UNKNOWN" : 0; - object.dry_run = false; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.vschema.ShardRoutingRule.toObject(message.rules[j], options); } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.db_type != null && message.hasOwnProperty("db_type")) - object.db_type = options.enums === String ? $root.topodata.TabletType[message.db_type] : message.db_type; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - object.dry_run = message.dry_run; return object; }; /** - * Converts this ChangeTabletTypeRequest to JSON. + * Converts this ShardRoutingRules to JSON. * @function toJSON - * @memberof vtctldata.ChangeTabletTypeRequest + * @memberof vschema.ShardRoutingRules * @instance * @returns {Object.} JSON object */ - ChangeTabletTypeRequest.prototype.toJSON = function toJSON() { + ShardRoutingRules.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ChangeTabletTypeRequest; + return ShardRoutingRules; })(); - vtctldata.ChangeTabletTypeResponse = (function() { + vschema.ShardRoutingRule = (function() { /** - * Properties of a ChangeTabletTypeResponse. - * @memberof vtctldata - * @interface IChangeTabletTypeResponse - * @property {topodata.ITablet|null} [before_tablet] ChangeTabletTypeResponse before_tablet - * @property {topodata.ITablet|null} [after_tablet] ChangeTabletTypeResponse after_tablet - * @property {boolean|null} [was_dry_run] ChangeTabletTypeResponse was_dry_run + * Properties of a ShardRoutingRule. + * @memberof vschema + * @interface IShardRoutingRule + * @property {string|null} [from_keyspace] ShardRoutingRule from_keyspace + * @property {string|null} [to_keyspace] ShardRoutingRule to_keyspace + * @property {string|null} [shard] ShardRoutingRule shard */ /** - * Constructs a new ChangeTabletTypeResponse. - * @memberof vtctldata - * @classdesc Represents a ChangeTabletTypeResponse. - * @implements IChangeTabletTypeResponse + * Constructs a new ShardRoutingRule. + * @memberof vschema + * @classdesc Represents a ShardRoutingRule. + * @implements IShardRoutingRule * @constructor - * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set + * @param {vschema.IShardRoutingRule=} [properties] Properties to set */ - function ChangeTabletTypeResponse(properties) { + function ShardRoutingRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87431,101 +88295,101 @@ $root.vtctldata = (function() { } /** - * ChangeTabletTypeResponse before_tablet. - * @member {topodata.ITablet|null|undefined} before_tablet - * @memberof vtctldata.ChangeTabletTypeResponse + * ShardRoutingRule from_keyspace. + * @member {string} from_keyspace + * @memberof vschema.ShardRoutingRule * @instance */ - ChangeTabletTypeResponse.prototype.before_tablet = null; + ShardRoutingRule.prototype.from_keyspace = ""; /** - * ChangeTabletTypeResponse after_tablet. - * @member {topodata.ITablet|null|undefined} after_tablet - * @memberof vtctldata.ChangeTabletTypeResponse + * ShardRoutingRule to_keyspace. + * @member {string} to_keyspace + * @memberof vschema.ShardRoutingRule * @instance */ - ChangeTabletTypeResponse.prototype.after_tablet = null; + ShardRoutingRule.prototype.to_keyspace = ""; /** - * ChangeTabletTypeResponse was_dry_run. - * @member {boolean} was_dry_run - * @memberof vtctldata.ChangeTabletTypeResponse + * ShardRoutingRule shard. + * @member {string} shard + * @memberof vschema.ShardRoutingRule * @instance */ - ChangeTabletTypeResponse.prototype.was_dry_run = false; + ShardRoutingRule.prototype.shard = ""; /** - * Creates a new ChangeTabletTypeResponse instance using the specified properties. + * Creates a new ShardRoutingRule instance using the specified properties. * @function create - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static - * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse instance + * @param {vschema.IShardRoutingRule=} [properties] Properties to set + * @returns {vschema.ShardRoutingRule} ShardRoutingRule instance */ - ChangeTabletTypeResponse.create = function create(properties) { - return new ChangeTabletTypeResponse(properties); + ShardRoutingRule.create = function create(properties) { + return new ShardRoutingRule(properties); }; /** - * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. + * Encodes the specified ShardRoutingRule message. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. * @function encode - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static - * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode + * @param {vschema.IShardRoutingRule} message ShardRoutingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeTabletTypeResponse.encode = function encode(message, writer) { + ShardRoutingRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.before_tablet != null && Object.hasOwnProperty.call(message, "before_tablet")) - $root.topodata.Tablet.encode(message.before_tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after_tablet != null && Object.hasOwnProperty.call(message, "after_tablet")) - $root.topodata.Tablet.encode(message.after_tablet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.was_dry_run != null && Object.hasOwnProperty.call(message, "was_dry_run")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.was_dry_run); + if (message.from_keyspace != null && Object.hasOwnProperty.call(message, "from_keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_keyspace); + if (message.to_keyspace != null && Object.hasOwnProperty.call(message, "to_keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); return writer; }; /** - * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. + * Encodes the specified ShardRoutingRule message, length delimited. Does not implicitly {@link vschema.ShardRoutingRule.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static - * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode + * @param {vschema.IShardRoutingRule} message ShardRoutingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeTabletTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { + ShardRoutingRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. + * Decodes a ShardRoutingRule message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse + * @returns {vschema.ShardRoutingRule} ShardRoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeTabletTypeResponse.decode = function decode(reader, length) { + ShardRoutingRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ShardRoutingRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.before_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + message.from_keyspace = reader.string(); break; case 2: - message.after_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + message.to_keyspace = reader.string(); break; case 3: - message.was_dry_run = reader.bool(); + message.shard = reader.string(); break; default: reader.skipType(tag & 7); @@ -87536,143 +88400,138 @@ $root.vtctldata = (function() { }; /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardRoutingRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse + * @returns {vschema.ShardRoutingRule} ShardRoutingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeTabletTypeResponse.decodeDelimited = function decodeDelimited(reader) { + ShardRoutingRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeTabletTypeResponse message. + * Verifies a ShardRoutingRule message. * @function verify - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeTabletTypeResponse.verify = function verify(message) { + ShardRoutingRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) { - var error = $root.topodata.Tablet.verify(message.before_tablet); - if (error) - return "before_tablet." + error; - } - if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) { - var error = $root.topodata.Tablet.verify(message.after_tablet); - if (error) - return "after_tablet." + error; - } - if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) - if (typeof message.was_dry_run !== "boolean") - return "was_dry_run: boolean expected"; + if (message.from_keyspace != null && message.hasOwnProperty("from_keyspace")) + if (!$util.isString(message.from_keyspace)) + return "from_keyspace: string expected"; + if (message.to_keyspace != null && message.hasOwnProperty("to_keyspace")) + if (!$util.isString(message.to_keyspace)) + return "to_keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; return null; }; /** - * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardRoutingRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static * @param {Object.} object Plain object - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse + * @returns {vschema.ShardRoutingRule} ShardRoutingRule */ - ChangeTabletTypeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ChangeTabletTypeResponse) + ShardRoutingRule.fromObject = function fromObject(object) { + if (object instanceof $root.vschema.ShardRoutingRule) return object; - var message = new $root.vtctldata.ChangeTabletTypeResponse(); - if (object.before_tablet != null) { - if (typeof object.before_tablet !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeResponse.before_tablet: object expected"); - message.before_tablet = $root.topodata.Tablet.fromObject(object.before_tablet); - } - if (object.after_tablet != null) { - if (typeof object.after_tablet !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeResponse.after_tablet: object expected"); - message.after_tablet = $root.topodata.Tablet.fromObject(object.after_tablet); - } - if (object.was_dry_run != null) - message.was_dry_run = Boolean(object.was_dry_run); + var message = new $root.vschema.ShardRoutingRule(); + if (object.from_keyspace != null) + message.from_keyspace = String(object.from_keyspace); + if (object.to_keyspace != null) + message.to_keyspace = String(object.to_keyspace); + if (object.shard != null) + message.shard = String(object.shard); return message; }; /** - * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. + * Creates a plain object from a ShardRoutingRule message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @static - * @param {vtctldata.ChangeTabletTypeResponse} message ChangeTabletTypeResponse + * @param {vschema.ShardRoutingRule} message ShardRoutingRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeTabletTypeResponse.toObject = function toObject(message, options) { + ShardRoutingRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.before_tablet = null; - object.after_tablet = null; - object.was_dry_run = false; + object.from_keyspace = ""; + object.to_keyspace = ""; + object.shard = ""; } - if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) - object.before_tablet = $root.topodata.Tablet.toObject(message.before_tablet, options); - if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) - object.after_tablet = $root.topodata.Tablet.toObject(message.after_tablet, options); - if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) - object.was_dry_run = message.was_dry_run; + if (message.from_keyspace != null && message.hasOwnProperty("from_keyspace")) + object.from_keyspace = message.from_keyspace; + if (message.to_keyspace != null && message.hasOwnProperty("to_keyspace")) + object.to_keyspace = message.to_keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; return object; }; /** - * Converts this ChangeTabletTypeResponse to JSON. + * Converts this ShardRoutingRule to JSON. * @function toJSON - * @memberof vtctldata.ChangeTabletTypeResponse + * @memberof vschema.ShardRoutingRule * @instance * @returns {Object.} JSON object */ - ChangeTabletTypeResponse.prototype.toJSON = function toJSON() { + ShardRoutingRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ChangeTabletTypeResponse; + return ShardRoutingRule; })(); - vtctldata.CreateKeyspaceRequest = (function() { + return vschema; +})(); + +$root.vtctldata = (function() { + + /** + * Namespace vtctldata. + * @exports vtctldata + * @namespace + */ + var vtctldata = {}; + + vtctldata.ExecuteVtctlCommandRequest = (function() { /** - * Properties of a CreateKeyspaceRequest. + * Properties of an ExecuteVtctlCommandRequest. * @memberof vtctldata - * @interface ICreateKeyspaceRequest - * @property {string|null} [name] CreateKeyspaceRequest name - * @property {boolean|null} [force] CreateKeyspaceRequest force - * @property {boolean|null} [allow_empty_v_schema] CreateKeyspaceRequest allow_empty_v_schema - * @property {Array.|null} [served_froms] CreateKeyspaceRequest served_froms - * @property {topodata.KeyspaceType|null} [type] CreateKeyspaceRequest type - * @property {string|null} [base_keyspace] CreateKeyspaceRequest base_keyspace - * @property {vttime.ITime|null} [snapshot_time] CreateKeyspaceRequest snapshot_time - * @property {string|null} [durability_policy] CreateKeyspaceRequest durability_policy - * @property {string|null} [sidecar_db_name] CreateKeyspaceRequest sidecar_db_name + * @interface IExecuteVtctlCommandRequest + * @property {Array.|null} [args] ExecuteVtctlCommandRequest args + * @property {number|Long|null} [action_timeout] ExecuteVtctlCommandRequest action_timeout */ /** - * Constructs a new CreateKeyspaceRequest. + * Constructs a new ExecuteVtctlCommandRequest. * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceRequest. - * @implements ICreateKeyspaceRequest + * @classdesc Represents an ExecuteVtctlCommandRequest. + * @implements IExecuteVtctlCommandRequest * @constructor - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set */ - function CreateKeyspaceRequest(properties) { - this.served_froms = []; + function ExecuteVtctlCommandRequest(properties) { + this.args = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87680,182 +88539,91 @@ $root.vtctldata = (function() { } /** - * CreateKeyspaceRequest name. - * @member {string} name - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.name = ""; - - /** - * CreateKeyspaceRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.force = false; - - /** - * CreateKeyspaceRequest allow_empty_v_schema. - * @member {boolean} allow_empty_v_schema - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.allow_empty_v_schema = false; - - /** - * CreateKeyspaceRequest served_froms. - * @member {Array.} served_froms - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.served_froms = $util.emptyArray; - - /** - * CreateKeyspaceRequest type. - * @member {topodata.KeyspaceType} type - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.type = 0; - - /** - * CreateKeyspaceRequest base_keyspace. - * @member {string} base_keyspace - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.base_keyspace = ""; - - /** - * CreateKeyspaceRequest snapshot_time. - * @member {vttime.ITime|null|undefined} snapshot_time - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.snapshot_time = null; - - /** - * CreateKeyspaceRequest durability_policy. - * @member {string} durability_policy - * @memberof vtctldata.CreateKeyspaceRequest + * ExecuteVtctlCommandRequest args. + * @member {Array.} args + * @memberof vtctldata.ExecuteVtctlCommandRequest * @instance */ - CreateKeyspaceRequest.prototype.durability_policy = ""; + ExecuteVtctlCommandRequest.prototype.args = $util.emptyArray; /** - * CreateKeyspaceRequest sidecar_db_name. - * @member {string} sidecar_db_name - * @memberof vtctldata.CreateKeyspaceRequest + * ExecuteVtctlCommandRequest action_timeout. + * @member {number|Long} action_timeout + * @memberof vtctldata.ExecuteVtctlCommandRequest * @instance */ - CreateKeyspaceRequest.prototype.sidecar_db_name = ""; + ExecuteVtctlCommandRequest.prototype.action_timeout = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new CreateKeyspaceRequest instance using the specified properties. + * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. * @function create - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest instance + * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest instance */ - CreateKeyspaceRequest.create = function create(properties) { - return new CreateKeyspaceRequest(properties); + ExecuteVtctlCommandRequest.create = function create(properties) { + return new ExecuteVtctlCommandRequest(properties); }; /** - * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode + * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceRequest.encode = function encode(message, writer) { + ExecuteVtctlCommandRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - if (message.allow_empty_v_schema != null && Object.hasOwnProperty.call(message, "allow_empty_v_schema")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_empty_v_schema); - if (message.served_froms != null && message.served_froms.length) - for (var i = 0; i < message.served_froms.length; ++i) - $root.topodata.Keyspace.ServedFrom.encode(message.served_froms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.base_keyspace); - if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) - $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.durability_policy); - if (message.sidecar_db_name != null && Object.hasOwnProperty.call(message, "sidecar_db_name")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.sidecar_db_name); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.args[i]); + if (message.action_timeout != null && Object.hasOwnProperty.call(message, "action_timeout")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.action_timeout); return writer; }; /** - * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. + * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode + * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteVtctlCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. + * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest + * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceRequest.decode = function decode(reader, length) { + ExecuteVtctlCommandRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); break; case 2: - message.force = reader.bool(); - break; - case 3: - message.allow_empty_v_schema = reader.bool(); - break; - case 6: - if (!(message.served_froms && message.served_froms.length)) - message.served_froms = []; - message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); - break; - case 7: - message.type = reader.int32(); - break; - case 8: - message.base_keyspace = reader.string(); - break; - case 9: - message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 10: - message.durability_policy = reader.string(); - break; - case 11: - message.sidecar_db_name = reader.string(); + message.action_timeout = reader.int64(); break; default: reader.skipType(tag & 7); @@ -87866,208 +88634,142 @@ $root.vtctldata = (function() { }; /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateKeyspaceRequest message. - * @function verify - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - if (typeof message.allow_empty_v_schema !== "boolean") - return "allow_empty_v_schema: boolean expected"; - if (message.served_froms != null && message.hasOwnProperty("served_froms")) { - if (!Array.isArray(message.served_froms)) - return "served_froms: array expected"; - for (var i = 0; i < message.served_froms.length; ++i) { - var error = $root.topodata.Keyspace.ServedFrom.verify(message.served_froms[i]); - if (error) - return "served_froms." + error; - } - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - if (!$util.isString(message.base_keyspace)) - return "base_keyspace: string expected"; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { - var error = $root.vttime.Time.verify(message.snapshot_time); - if (error) - return "snapshot_time." + error; + * @memberof vtctldata.ExecuteVtctlCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteVtctlCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteVtctlCommandRequest message. + * @function verify + * @memberof vtctldata.ExecuteVtctlCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteVtctlCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; } - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - if (!$util.isString(message.durability_policy)) - return "durability_policy: string expected"; - if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) - if (!$util.isString(message.sidecar_db_name)) - return "sidecar_db_name: string expected"; + if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) + if (!$util.isInteger(message.action_timeout) && !(message.action_timeout && $util.isInteger(message.action_timeout.low) && $util.isInteger(message.action_timeout.high))) + return "action_timeout: integer|Long expected"; return null; }; /** - * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest + * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest */ - CreateKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceRequest) + ExecuteVtctlCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteVtctlCommandRequest) return object; - var message = new $root.vtctldata.CreateKeyspaceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.allow_empty_v_schema != null) - message.allow_empty_v_schema = Boolean(object.allow_empty_v_schema); - if (object.served_froms) { - if (!Array.isArray(object.served_froms)) - throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: array expected"); - message.served_froms = []; - for (var i = 0; i < object.served_froms.length; ++i) { - if (typeof object.served_froms[i] !== "object") - throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: object expected"); - message.served_froms[i] = $root.topodata.Keyspace.ServedFrom.fromObject(object.served_froms[i]); - } - } - switch (object.type) { - case "NORMAL": - case 0: - message.type = 0; - break; - case "SNAPSHOT": - case 1: - message.type = 1; - break; - } - if (object.base_keyspace != null) - message.base_keyspace = String(object.base_keyspace); - if (object.snapshot_time != null) { - if (typeof object.snapshot_time !== "object") - throw TypeError(".vtctldata.CreateKeyspaceRequest.snapshot_time: object expected"); - message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); + var message = new $root.vtctldata.ExecuteVtctlCommandRequest(); + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".vtctldata.ExecuteVtctlCommandRequest.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); } - if (object.durability_policy != null) - message.durability_policy = String(object.durability_policy); - if (object.sidecar_db_name != null) - message.sidecar_db_name = String(object.sidecar_db_name); + if (object.action_timeout != null) + if ($util.Long) + (message.action_timeout = $util.Long.fromValue(object.action_timeout)).unsigned = false; + else if (typeof object.action_timeout === "string") + message.action_timeout = parseInt(object.action_timeout, 10); + else if (typeof object.action_timeout === "number") + message.action_timeout = object.action_timeout; + else if (typeof object.action_timeout === "object") + message.action_timeout = new $util.LongBits(object.action_timeout.low >>> 0, object.action_timeout.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @static - * @param {vtctldata.CreateKeyspaceRequest} message CreateKeyspaceRequest + * @param {vtctldata.ExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateKeyspaceRequest.toObject = function toObject(message, options) { + ExecuteVtctlCommandRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.served_froms = []; - if (options.defaults) { - object.name = ""; - object.force = false; - object.allow_empty_v_schema = false; - object.type = options.enums === String ? "NORMAL" : 0; - object.base_keyspace = ""; - object.snapshot_time = null; - object.durability_policy = ""; - object.sidecar_db_name = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - object.allow_empty_v_schema = message.allow_empty_v_schema; - if (message.served_froms && message.served_froms.length) { - object.served_froms = []; - for (var j = 0; j < message.served_froms.length; ++j) - object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject(message.served_froms[j], options); + object.args = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.action_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.action_timeout = options.longs === String ? "0" : 0; + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.topodata.KeyspaceType[message.type] : message.type; - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - object.base_keyspace = message.base_keyspace; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) - object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - object.durability_policy = message.durability_policy; - if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) - object.sidecar_db_name = message.sidecar_db_name; + if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) + if (typeof message.action_timeout === "number") + object.action_timeout = options.longs === String ? String(message.action_timeout) : message.action_timeout; + else + object.action_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.action_timeout) : options.longs === Number ? new $util.LongBits(message.action_timeout.low >>> 0, message.action_timeout.high >>> 0).toNumber() : message.action_timeout; return object; }; /** - * Converts this CreateKeyspaceRequest to JSON. + * Converts this ExecuteVtctlCommandRequest to JSON. * @function toJSON - * @memberof vtctldata.CreateKeyspaceRequest + * @memberof vtctldata.ExecuteVtctlCommandRequest * @instance * @returns {Object.} JSON object */ - CreateKeyspaceRequest.prototype.toJSON = function toJSON() { + ExecuteVtctlCommandRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateKeyspaceRequest; + return ExecuteVtctlCommandRequest; })(); - vtctldata.CreateKeyspaceResponse = (function() { + vtctldata.ExecuteVtctlCommandResponse = (function() { /** - * Properties of a CreateKeyspaceResponse. + * Properties of an ExecuteVtctlCommandResponse. * @memberof vtctldata - * @interface ICreateKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateKeyspaceResponse keyspace + * @interface IExecuteVtctlCommandResponse + * @property {logutil.IEvent|null} [event] ExecuteVtctlCommandResponse event */ /** - * Constructs a new CreateKeyspaceResponse. + * Constructs a new ExecuteVtctlCommandResponse. * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceResponse. - * @implements ICreateKeyspaceResponse + * @classdesc Represents an ExecuteVtctlCommandResponse. + * @implements IExecuteVtctlCommandResponse * @constructor - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set */ - function CreateKeyspaceResponse(properties) { + function ExecuteVtctlCommandResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88075,75 +88777,75 @@ $root.vtctldata = (function() { } /** - * CreateKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateKeyspaceResponse + * ExecuteVtctlCommandResponse event. + * @member {logutil.IEvent|null|undefined} event + * @memberof vtctldata.ExecuteVtctlCommandResponse * @instance */ - CreateKeyspaceResponse.prototype.keyspace = null; + ExecuteVtctlCommandResponse.prototype.event = null; /** - * Creates a new CreateKeyspaceResponse instance using the specified properties. + * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. * @function create - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse instance + * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse instance */ - CreateKeyspaceResponse.create = function create(properties) { - return new CreateKeyspaceResponse(properties); + ExecuteVtctlCommandResponse.create = function create(properties) { + return new ExecuteVtctlCommandResponse(properties); }; /** - * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode + * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceResponse.encode = function encode(message, writer) { + ExecuteVtctlCommandResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.logutil.Event.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. + * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode + * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteVtctlCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. + * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceResponse.decode = function decode(reader, length) { + ExecuteVtctlCommandResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + message.event = $root.logutil.Event.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -88154,115 +88856,130 @@ $root.vtctldata = (function() { }; /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteVtctlCommandResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateKeyspaceResponse message. + * Verifies an ExecuteVtctlCommandResponse message. * @function verify - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateKeyspaceResponse.verify = function verify(message) { + ExecuteVtctlCommandResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (message.event != null && message.hasOwnProperty("event")) { + var error = $root.logutil.Event.verify(message.event); if (error) - return "keyspace." + error; + return "event." + error; } return null; }; /** - * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse + * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse */ - CreateKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceResponse) + ExecuteVtctlCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteVtctlCommandResponse) return object; - var message = new $root.vtctldata.CreateKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + var message = new $root.vtctldata.ExecuteVtctlCommandResponse(); + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".vtctldata.ExecuteVtctlCommandResponse.event: object expected"); + message.event = $root.logutil.Event.fromObject(object.event); } return message; }; /** - * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @static - * @param {vtctldata.CreateKeyspaceResponse} message CreateKeyspaceResponse + * @param {vtctldata.ExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateKeyspaceResponse.toObject = function toObject(message, options) { + ExecuteVtctlCommandResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + object.event = null; + if (message.event != null && message.hasOwnProperty("event")) + object.event = $root.logutil.Event.toObject(message.event, options); return object; }; /** - * Converts this CreateKeyspaceResponse to JSON. + * Converts this ExecuteVtctlCommandResponse to JSON. * @function toJSON - * @memberof vtctldata.CreateKeyspaceResponse + * @memberof vtctldata.ExecuteVtctlCommandResponse * @instance * @returns {Object.} JSON object */ - CreateKeyspaceResponse.prototype.toJSON = function toJSON() { + ExecuteVtctlCommandResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateKeyspaceResponse; + return ExecuteVtctlCommandResponse; })(); - vtctldata.CreateShardRequest = (function() { + /** + * MaterializationIntent enum. + * @name vtctldata.MaterializationIntent + * @enum {number} + * @property {number} CUSTOM=0 CUSTOM value + * @property {number} MOVETABLES=1 MOVETABLES value + * @property {number} CREATELOOKUPINDEX=2 CREATELOOKUPINDEX value + */ + vtctldata.MaterializationIntent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM"] = 0; + values[valuesById[1] = "MOVETABLES"] = 1; + values[valuesById[2] = "CREATELOOKUPINDEX"] = 2; + return values; + })(); + + vtctldata.TableMaterializeSettings = (function() { /** - * Properties of a CreateShardRequest. + * Properties of a TableMaterializeSettings. * @memberof vtctldata - * @interface ICreateShardRequest - * @property {string|null} [keyspace] CreateShardRequest keyspace - * @property {string|null} [shard_name] CreateShardRequest shard_name - * @property {boolean|null} [force] CreateShardRequest force - * @property {boolean|null} [include_parent] CreateShardRequest include_parent + * @interface ITableMaterializeSettings + * @property {string|null} [target_table] TableMaterializeSettings target_table + * @property {string|null} [source_expression] TableMaterializeSettings source_expression + * @property {string|null} [create_ddl] TableMaterializeSettings create_ddl */ /** - * Constructs a new CreateShardRequest. + * Constructs a new TableMaterializeSettings. * @memberof vtctldata - * @classdesc Represents a CreateShardRequest. - * @implements ICreateShardRequest + * @classdesc Represents a TableMaterializeSettings. + * @implements ITableMaterializeSettings * @constructor - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set + * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set */ - function CreateShardRequest(properties) { + function TableMaterializeSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88270,114 +88987,101 @@ $root.vtctldata = (function() { } /** - * CreateShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.keyspace = ""; - - /** - * CreateShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.CreateShardRequest + * TableMaterializeSettings target_table. + * @member {string} target_table + * @memberof vtctldata.TableMaterializeSettings * @instance */ - CreateShardRequest.prototype.shard_name = ""; + TableMaterializeSettings.prototype.target_table = ""; /** - * CreateShardRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateShardRequest + * TableMaterializeSettings source_expression. + * @member {string} source_expression + * @memberof vtctldata.TableMaterializeSettings * @instance */ - CreateShardRequest.prototype.force = false; + TableMaterializeSettings.prototype.source_expression = ""; /** - * CreateShardRequest include_parent. - * @member {boolean} include_parent - * @memberof vtctldata.CreateShardRequest + * TableMaterializeSettings create_ddl. + * @member {string} create_ddl + * @memberof vtctldata.TableMaterializeSettings * @instance */ - CreateShardRequest.prototype.include_parent = false; + TableMaterializeSettings.prototype.create_ddl = ""; /** - * Creates a new CreateShardRequest instance using the specified properties. + * Creates a new TableMaterializeSettings instance using the specified properties. * @function create - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set - * @returns {vtctldata.CreateShardRequest} CreateShardRequest instance + * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set + * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings instance */ - CreateShardRequest.create = function create(properties) { - return new CreateShardRequest(properties); + TableMaterializeSettings.create = function create(properties) { + return new TableMaterializeSettings(properties); }; /** - * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode + * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardRequest.encode = function encode(message, writer) { + TableMaterializeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.include_parent != null && Object.hasOwnProperty.call(message, "include_parent")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_parent); + if (message.target_table != null && Object.hasOwnProperty.call(message, "target_table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.target_table); + if (message.source_expression != null && Object.hasOwnProperty.call(message, "source_expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_expression); + if (message.create_ddl != null && Object.hasOwnProperty.call(message, "create_ddl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.create_ddl); return writer; }; /** - * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. + * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode + * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + TableMaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateShardRequest message from the specified reader or buffer. + * Decodes a TableMaterializeSettings message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardRequest.decode = function decode(reader, length) { + TableMaterializeSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TableMaterializeSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.target_table = reader.string(); break; case 2: - message.shard_name = reader.string(); + message.source_expression = reader.string(); break; case 3: - message.force = reader.bool(); - break; - case 4: - message.include_parent = reader.bool(); + message.create_ddl = reader.string(); break; default: reader.skipType(tag & 7); @@ -88388,134 +89092,139 @@ $root.vtctldata = (function() { }; /** - * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. + * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardRequest.decodeDelimited = function decodeDelimited(reader) { + TableMaterializeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateShardRequest message. + * Verifies a TableMaterializeSettings message. * @function verify - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateShardRequest.verify = function verify(message) { + TableMaterializeSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - if (typeof message.include_parent !== "boolean") - return "include_parent: boolean expected"; + if (message.target_table != null && message.hasOwnProperty("target_table")) + if (!$util.isString(message.target_table)) + return "target_table: string expected"; + if (message.source_expression != null && message.hasOwnProperty("source_expression")) + if (!$util.isString(message.source_expression)) + return "source_expression: string expected"; + if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) + if (!$util.isString(message.create_ddl)) + return "create_ddl: string expected"; return null; }; /** - * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardRequest} CreateShardRequest + * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings */ - CreateShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardRequest) + TableMaterializeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.TableMaterializeSettings) return object; - var message = new $root.vtctldata.CreateShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.include_parent != null) - message.include_parent = Boolean(object.include_parent); + var message = new $root.vtctldata.TableMaterializeSettings(); + if (object.target_table != null) + message.target_table = String(object.target_table); + if (object.source_expression != null) + message.source_expression = String(object.source_expression); + if (object.create_ddl != null) + message.create_ddl = String(object.create_ddl); return message; }; /** - * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @static - * @param {vtctldata.CreateShardRequest} message CreateShardRequest + * @param {vtctldata.TableMaterializeSettings} message TableMaterializeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateShardRequest.toObject = function toObject(message, options) { + TableMaterializeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.keyspace = ""; - object.shard_name = ""; - object.force = false; - object.include_parent = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - object.include_parent = message.include_parent; + object.target_table = ""; + object.source_expression = ""; + object.create_ddl = ""; + } + if (message.target_table != null && message.hasOwnProperty("target_table")) + object.target_table = message.target_table; + if (message.source_expression != null && message.hasOwnProperty("source_expression")) + object.source_expression = message.source_expression; + if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) + object.create_ddl = message.create_ddl; return object; }; /** - * Converts this CreateShardRequest to JSON. + * Converts this TableMaterializeSettings to JSON. * @function toJSON - * @memberof vtctldata.CreateShardRequest + * @memberof vtctldata.TableMaterializeSettings * @instance * @returns {Object.} JSON object */ - CreateShardRequest.prototype.toJSON = function toJSON() { + TableMaterializeSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateShardRequest; + return TableMaterializeSettings; })(); - vtctldata.CreateShardResponse = (function() { + vtctldata.MaterializeSettings = (function() { /** - * Properties of a CreateShardResponse. + * Properties of a MaterializeSettings. * @memberof vtctldata - * @interface ICreateShardResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateShardResponse keyspace - * @property {vtctldata.IShard|null} [shard] CreateShardResponse shard - * @property {boolean|null} [shard_already_exists] CreateShardResponse shard_already_exists + * @interface IMaterializeSettings + * @property {string|null} [workflow] MaterializeSettings workflow + * @property {string|null} [source_keyspace] MaterializeSettings source_keyspace + * @property {string|null} [target_keyspace] MaterializeSettings target_keyspace + * @property {boolean|null} [stop_after_copy] MaterializeSettings stop_after_copy + * @property {Array.|null} [table_settings] MaterializeSettings table_settings + * @property {string|null} [cell] MaterializeSettings cell + * @property {string|null} [tablet_types] MaterializeSettings tablet_types + * @property {string|null} [external_cluster] MaterializeSettings external_cluster + * @property {vtctldata.MaterializationIntent|null} [materialization_intent] MaterializeSettings materialization_intent + * @property {string|null} [source_time_zone] MaterializeSettings source_time_zone + * @property {string|null} [target_time_zone] MaterializeSettings target_time_zone + * @property {Array.|null} [source_shards] MaterializeSettings source_shards + * @property {string|null} [on_ddl] MaterializeSettings on_ddl + * @property {boolean|null} [defer_secondary_keys] MaterializeSettings defer_secondary_keys */ /** - * Constructs a new CreateShardResponse. + * Constructs a new MaterializeSettings. * @memberof vtctldata - * @classdesc Represents a CreateShardResponse. - * @implements ICreateShardResponse + * @classdesc Represents a MaterializeSettings. + * @implements IMaterializeSettings * @constructor - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set + * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set */ - function CreateShardResponse(properties) { + function MaterializeSettings(properties) { + this.table_settings = []; + this.source_shards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88523,101 +89232,250 @@ $root.vtctldata = (function() { } /** - * CreateShardResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateShardResponse + * MaterializeSettings workflow. + * @member {string} workflow + * @memberof vtctldata.MaterializeSettings * @instance */ - CreateShardResponse.prototype.keyspace = null; + MaterializeSettings.prototype.workflow = ""; /** - * CreateShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.CreateShardResponse + * MaterializeSettings source_keyspace. + * @member {string} source_keyspace + * @memberof vtctldata.MaterializeSettings * @instance */ - CreateShardResponse.prototype.shard = null; + MaterializeSettings.prototype.source_keyspace = ""; /** - * CreateShardResponse shard_already_exists. - * @member {boolean} shard_already_exists - * @memberof vtctldata.CreateShardResponse + * MaterializeSettings target_keyspace. + * @member {string} target_keyspace + * @memberof vtctldata.MaterializeSettings * @instance */ - CreateShardResponse.prototype.shard_already_exists = false; + MaterializeSettings.prototype.target_keyspace = ""; /** - * Creates a new CreateShardResponse instance using the specified properties. + * MaterializeSettings stop_after_copy. + * @member {boolean} stop_after_copy + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.stop_after_copy = false; + + /** + * MaterializeSettings table_settings. + * @member {Array.} table_settings + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.table_settings = $util.emptyArray; + + /** + * MaterializeSettings cell. + * @member {string} cell + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.cell = ""; + + /** + * MaterializeSettings tablet_types. + * @member {string} tablet_types + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.tablet_types = ""; + + /** + * MaterializeSettings external_cluster. + * @member {string} external_cluster + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.external_cluster = ""; + + /** + * MaterializeSettings materialization_intent. + * @member {vtctldata.MaterializationIntent} materialization_intent + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.materialization_intent = 0; + + /** + * MaterializeSettings source_time_zone. + * @member {string} source_time_zone + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.source_time_zone = ""; + + /** + * MaterializeSettings target_time_zone. + * @member {string} target_time_zone + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.target_time_zone = ""; + + /** + * MaterializeSettings source_shards. + * @member {Array.} source_shards + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.source_shards = $util.emptyArray; + + /** + * MaterializeSettings on_ddl. + * @member {string} on_ddl + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.on_ddl = ""; + + /** + * MaterializeSettings defer_secondary_keys. + * @member {boolean} defer_secondary_keys + * @memberof vtctldata.MaterializeSettings + * @instance + */ + MaterializeSettings.prototype.defer_secondary_keys = false; + + /** + * Creates a new MaterializeSettings instance using the specified properties. * @function create - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set - * @returns {vtctldata.CreateShardResponse} CreateShardResponse instance + * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set + * @returns {vtctldata.MaterializeSettings} MaterializeSettings instance */ - CreateShardResponse.create = function create(properties) { - return new CreateShardResponse(properties); + MaterializeSettings.create = function create(properties) { + return new MaterializeSettings(properties); }; /** - * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. * @function encode - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode + * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardResponse.encode = function encode(message, writer) { + MaterializeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shard_already_exists != null && Object.hasOwnProperty.call(message, "shard_already_exists")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.shard_already_exists); + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workflow); + if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_keyspace); + if (message.target_keyspace != null && Object.hasOwnProperty.call(message, "target_keyspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target_keyspace); + if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.stop_after_copy); + if (message.table_settings != null && message.table_settings.length) + for (var i = 0; i < message.table_settings.length; ++i) + $root.vtctldata.TableMaterializeSettings.encode(message.table_settings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.cell); + if (message.tablet_types != null && Object.hasOwnProperty.call(message, "tablet_types")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablet_types); + if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_cluster); + if (message.materialization_intent != null && Object.hasOwnProperty.call(message, "materialization_intent")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.materialization_intent); + if (message.source_time_zone != null && Object.hasOwnProperty.call(message, "source_time_zone")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.source_time_zone); + if (message.target_time_zone != null && Object.hasOwnProperty.call(message, "target_time_zone")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.target_time_zone); + if (message.source_shards != null && message.source_shards.length) + for (var i = 0; i < message.source_shards.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.source_shards[i]); + if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.on_ddl); + if (message.defer_secondary_keys != null && Object.hasOwnProperty.call(message, "defer_secondary_keys")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.defer_secondary_keys); return writer; }; /** - * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. + * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode + * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + MaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateShardResponse message from the specified reader or buffer. + * Decodes a MaterializeSettings message from the specified reader or buffer. * @function decode - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.MaterializeSettings} MaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardResponse.decode = function decode(reader, length) { + MaterializeSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.MaterializeSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + message.workflow = reader.string(); break; case 2: - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); + message.source_keyspace = reader.string(); break; case 3: - message.shard_already_exists = reader.bool(); + message.target_keyspace = reader.string(); + break; + case 4: + message.stop_after_copy = reader.bool(); + break; + case 5: + if (!(message.table_settings && message.table_settings.length)) + message.table_settings = []; + message.table_settings.push($root.vtctldata.TableMaterializeSettings.decode(reader, reader.uint32())); + break; + case 6: + message.cell = reader.string(); + break; + case 7: + message.tablet_types = reader.string(); + break; + case 8: + message.external_cluster = reader.string(); + break; + case 9: + message.materialization_intent = reader.int32(); + break; + case 10: + message.source_time_zone = reader.string(); + break; + case 11: + message.target_time_zone = reader.string(); + break; + case 12: + if (!(message.source_shards && message.source_shards.length)) + message.source_shards = []; + message.source_shards.push(reader.string()); + break; + case 13: + message.on_ddl = reader.string(); + break; + case 14: + message.defer_secondary_keys = reader.bool(); break; default: reader.skipType(tag & 7); @@ -88628,135 +89486,262 @@ $root.vtctldata = (function() { }; /** - * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. + * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.MaterializeSettings} MaterializeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateShardResponse.decodeDelimited = function decodeDelimited(reader) { + MaterializeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateShardResponse message. + * Verifies a MaterializeSettings message. * @function verify - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateShardResponse.verify = function verify(message) { + MaterializeSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; + if (message.workflow != null && message.hasOwnProperty("workflow")) + if (!$util.isString(message.workflow)) + return "workflow: string expected"; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + if (!$util.isString(message.source_keyspace)) + return "source_keyspace: string expected"; + if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) + if (!$util.isString(message.target_keyspace)) + return "target_keyspace: string expected"; + if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) + if (typeof message.stop_after_copy !== "boolean") + return "stop_after_copy: boolean expected"; + if (message.table_settings != null && message.hasOwnProperty("table_settings")) { + if (!Array.isArray(message.table_settings)) + return "table_settings: array expected"; + for (var i = 0; i < message.table_settings.length; ++i) { + var error = $root.vtctldata.TableMaterializeSettings.verify(message.table_settings[i]); + if (error) + return "table_settings." + error; + } } - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.vtctldata.Shard.verify(message.shard); - if (error) - return "shard." + error; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; + if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) + if (!$util.isString(message.tablet_types)) + return "tablet_types: string expected"; + if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) + if (!$util.isString(message.external_cluster)) + return "external_cluster: string expected"; + if (message.materialization_intent != null && message.hasOwnProperty("materialization_intent")) + switch (message.materialization_intent) { + default: + return "materialization_intent: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) + if (!$util.isString(message.source_time_zone)) + return "source_time_zone: string expected"; + if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) + if (!$util.isString(message.target_time_zone)) + return "target_time_zone: string expected"; + if (message.source_shards != null && message.hasOwnProperty("source_shards")) { + if (!Array.isArray(message.source_shards)) + return "source_shards: array expected"; + for (var i = 0; i < message.source_shards.length; ++i) + if (!$util.isString(message.source_shards[i])) + return "source_shards: string[] expected"; } - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - if (typeof message.shard_already_exists !== "boolean") - return "shard_already_exists: boolean expected"; + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + if (!$util.isString(message.on_ddl)) + return "on_ddl: string expected"; + if (message.defer_secondary_keys != null && message.hasOwnProperty("defer_secondary_keys")) + if (typeof message.defer_secondary_keys !== "boolean") + return "defer_secondary_keys: boolean expected"; return null; }; /** - * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardResponse} CreateShardResponse + * @returns {vtctldata.MaterializeSettings} MaterializeSettings */ - CreateShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardResponse) + MaterializeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.MaterializeSettings) return object; - var message = new $root.vtctldata.CreateShardResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateShardResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + var message = new $root.vtctldata.MaterializeSettings(); + if (object.workflow != null) + message.workflow = String(object.workflow); + if (object.source_keyspace != null) + message.source_keyspace = String(object.source_keyspace); + if (object.target_keyspace != null) + message.target_keyspace = String(object.target_keyspace); + if (object.stop_after_copy != null) + message.stop_after_copy = Boolean(object.stop_after_copy); + if (object.table_settings) { + if (!Array.isArray(object.table_settings)) + throw TypeError(".vtctldata.MaterializeSettings.table_settings: array expected"); + message.table_settings = []; + for (var i = 0; i < object.table_settings.length; ++i) { + if (typeof object.table_settings[i] !== "object") + throw TypeError(".vtctldata.MaterializeSettings.table_settings: object expected"); + message.table_settings[i] = $root.vtctldata.TableMaterializeSettings.fromObject(object.table_settings[i]); + } } - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.CreateShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); + if (object.cell != null) + message.cell = String(object.cell); + if (object.tablet_types != null) + message.tablet_types = String(object.tablet_types); + if (object.external_cluster != null) + message.external_cluster = String(object.external_cluster); + switch (object.materialization_intent) { + case "CUSTOM": + case 0: + message.materialization_intent = 0; + break; + case "MOVETABLES": + case 1: + message.materialization_intent = 1; + break; + case "CREATELOOKUPINDEX": + case 2: + message.materialization_intent = 2; + break; } - if (object.shard_already_exists != null) - message.shard_already_exists = Boolean(object.shard_already_exists); + if (object.source_time_zone != null) + message.source_time_zone = String(object.source_time_zone); + if (object.target_time_zone != null) + message.target_time_zone = String(object.target_time_zone); + if (object.source_shards) { + if (!Array.isArray(object.source_shards)) + throw TypeError(".vtctldata.MaterializeSettings.source_shards: array expected"); + message.source_shards = []; + for (var i = 0; i < object.source_shards.length; ++i) + message.source_shards[i] = String(object.source_shards[i]); + } + if (object.on_ddl != null) + message.on_ddl = String(object.on_ddl); + if (object.defer_secondary_keys != null) + message.defer_secondary_keys = Boolean(object.defer_secondary_keys); return message; }; /** - * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @static - * @param {vtctldata.CreateShardResponse} message CreateShardResponse + * @param {vtctldata.MaterializeSettings} message MaterializeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateShardResponse.toObject = function toObject(message, options) { + MaterializeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.table_settings = []; + object.source_shards = []; + } if (options.defaults) { - object.keyspace = null; - object.shard = null; - object.shard_already_exists = false; + object.workflow = ""; + object.source_keyspace = ""; + object.target_keyspace = ""; + object.stop_after_copy = false; + object.cell = ""; + object.tablet_types = ""; + object.external_cluster = ""; + object.materialization_intent = options.enums === String ? "CUSTOM" : 0; + object.source_time_zone = ""; + object.target_time_zone = ""; + object.on_ddl = ""; + object.defer_secondary_keys = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - object.shard_already_exists = message.shard_already_exists; + if (message.workflow != null && message.hasOwnProperty("workflow")) + object.workflow = message.workflow; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + object.source_keyspace = message.source_keyspace; + if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) + object.target_keyspace = message.target_keyspace; + if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) + object.stop_after_copy = message.stop_after_copy; + if (message.table_settings && message.table_settings.length) { + object.table_settings = []; + for (var j = 0; j < message.table_settings.length; ++j) + object.table_settings[j] = $root.vtctldata.TableMaterializeSettings.toObject(message.table_settings[j], options); + } + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) + object.tablet_types = message.tablet_types; + if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) + object.external_cluster = message.external_cluster; + if (message.materialization_intent != null && message.hasOwnProperty("materialization_intent")) + object.materialization_intent = options.enums === String ? $root.vtctldata.MaterializationIntent[message.materialization_intent] : message.materialization_intent; + if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) + object.source_time_zone = message.source_time_zone; + if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) + object.target_time_zone = message.target_time_zone; + if (message.source_shards && message.source_shards.length) { + object.source_shards = []; + for (var j = 0; j < message.source_shards.length; ++j) + object.source_shards[j] = message.source_shards[j]; + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + object.on_ddl = message.on_ddl; + if (message.defer_secondary_keys != null && message.hasOwnProperty("defer_secondary_keys")) + object.defer_secondary_keys = message.defer_secondary_keys; return object; }; /** - * Converts this CreateShardResponse to JSON. + * Converts this MaterializeSettings to JSON. * @function toJSON - * @memberof vtctldata.CreateShardResponse + * @memberof vtctldata.MaterializeSettings * @instance * @returns {Object.} JSON object */ - CreateShardResponse.prototype.toJSON = function toJSON() { + MaterializeSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateShardResponse; + return MaterializeSettings; })(); - vtctldata.DeleteCellInfoRequest = (function() { + vtctldata.Keyspace = (function() { /** - * Properties of a DeleteCellInfoRequest. + * Properties of a Keyspace. * @memberof vtctldata - * @interface IDeleteCellInfoRequest - * @property {string|null} [name] DeleteCellInfoRequest name - * @property {boolean|null} [force] DeleteCellInfoRequest force + * @interface IKeyspace + * @property {string|null} [name] Keyspace name + * @property {topodata.IKeyspace|null} [keyspace] Keyspace keyspace */ /** - * Constructs a new DeleteCellInfoRequest. + * Constructs a new Keyspace. * @memberof vtctldata - * @classdesc Represents a DeleteCellInfoRequest. - * @implements IDeleteCellInfoRequest + * @classdesc Represents a Keyspace. + * @implements IKeyspace * @constructor - * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set + * @param {vtctldata.IKeyspace=} [properties] Properties to set */ - function DeleteCellInfoRequest(properties) { + function Keyspace(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88764,80 +89749,80 @@ $root.vtctldata = (function() { } /** - * DeleteCellInfoRequest name. + * Keyspace name. * @member {string} name - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @instance */ - DeleteCellInfoRequest.prototype.name = ""; + Keyspace.prototype.name = ""; /** - * DeleteCellInfoRequest force. - * @member {boolean} force - * @memberof vtctldata.DeleteCellInfoRequest + * Keyspace keyspace. + * @member {topodata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.Keyspace * @instance */ - DeleteCellInfoRequest.prototype.force = false; + Keyspace.prototype.keyspace = null; /** - * Creates a new DeleteCellInfoRequest instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static - * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest instance + * @param {vtctldata.IKeyspace=} [properties] Properties to set + * @returns {vtctldata.Keyspace} Keyspace instance */ - DeleteCellInfoRequest.create = function create(properties) { - return new DeleteCellInfoRequest(properties); + Keyspace.create = function create(properties) { + return new Keyspace(properties); }; /** - * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static - * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode + * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoRequest.encode = function encode(message, writer) { + Keyspace.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static - * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode + * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + Keyspace.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.Keyspace} Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoRequest.decode = function decode(reader, length) { + Keyspace.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Keyspace(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -88845,7 +89830,7 @@ $root.vtctldata = (function() { message.name = reader.string(); break; case 2: - message.force = reader.bool(); + message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -88856,115 +89841,123 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.Keyspace} Keyspace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + Keyspace.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellInfoRequest message. + * Verifies a Keyspace message. * @function verify - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellInfoRequest.verify = function verify(message) { + Keyspace.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.topodata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; + } return null; }; /** - * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest + * @returns {vtctldata.Keyspace} Keyspace */ - DeleteCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellInfoRequest) + Keyspace.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Keyspace) return object; - var message = new $root.vtctldata.DeleteCellInfoRequest(); + var message = new $root.vtctldata.Keyspace(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.Keyspace.keyspace: object expected"); + message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); + } return message; }; /** - * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @static - * @param {vtctldata.DeleteCellInfoRequest} message DeleteCellInfoRequest + * @param {vtctldata.Keyspace} message Keyspace * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellInfoRequest.toObject = function toObject(message, options) { + Keyspace.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.force = false; + object.keyspace = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this DeleteCellInfoRequest to JSON. + * Converts this Keyspace to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellInfoRequest + * @memberof vtctldata.Keyspace * @instance * @returns {Object.} JSON object */ - DeleteCellInfoRequest.prototype.toJSON = function toJSON() { + Keyspace.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteCellInfoRequest; + return Keyspace; })(); - vtctldata.DeleteCellInfoResponse = (function() { + vtctldata.Shard = (function() { /** - * Properties of a DeleteCellInfoResponse. + * Properties of a Shard. * @memberof vtctldata - * @interface IDeleteCellInfoResponse + * @interface IShard + * @property {string|null} [keyspace] Shard keyspace + * @property {string|null} [name] Shard name + * @property {topodata.IShard|null} [shard] Shard shard */ /** - * Constructs a new DeleteCellInfoResponse. + * Constructs a new Shard. * @memberof vtctldata - * @classdesc Represents a DeleteCellInfoResponse. - * @implements IDeleteCellInfoResponse + * @classdesc Represents a Shard. + * @implements IShard * @constructor - * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set + * @param {vtctldata.IShard=} [properties] Properties to set */ - function DeleteCellInfoResponse(properties) { + function Shard(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88972,63 +89965,102 @@ $root.vtctldata = (function() { } /** - * Creates a new DeleteCellInfoResponse instance using the specified properties. + * Shard keyspace. + * @member {string} keyspace + * @memberof vtctldata.Shard + * @instance + */ + Shard.prototype.keyspace = ""; + + /** + * Shard name. + * @member {string} name + * @memberof vtctldata.Shard + * @instance + */ + Shard.prototype.name = ""; + + /** + * Shard shard. + * @member {topodata.IShard|null|undefined} shard + * @memberof vtctldata.Shard + * @instance + */ + Shard.prototype.shard = null; + + /** + * Creates a new Shard instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static - * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse instance + * @param {vtctldata.IShard=} [properties] Properties to set + * @returns {vtctldata.Shard} Shard instance */ - DeleteCellInfoResponse.create = function create(properties) { - return new DeleteCellInfoResponse(properties); + Shard.create = function create(properties) { + return new Shard(properties); }; /** - * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static - * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode + * @param {vtctldata.IShard} message Shard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoResponse.encode = function encode(message, writer) { + Shard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. + * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static - * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode + * @param {vtctldata.IShard} message Shard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + Shard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. + * Decodes a Shard message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.Shard} Shard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoResponse.decode = function decode(reader, length) { + Shard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Shard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -89038,94 +90070,136 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a Shard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.Shard} Shard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + Shard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellInfoResponse message. + * Verifies a Shard message. * @function verify - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellInfoResponse.verify = function verify(message) { + Shard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.topodata.Shard.verify(message.shard); + if (error) + return "shard." + error; + } return null; }; /** - * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Shard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse + * @returns {vtctldata.Shard} Shard */ - DeleteCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellInfoResponse) + Shard.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Shard) return object; - return new $root.vtctldata.DeleteCellInfoResponse(); + var message = new $root.vtctldata.Shard(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.name != null) + message.name = String(object.name); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.Shard.shard: object expected"); + message.shard = $root.topodata.Shard.fromObject(object.shard); + } + return message; }; /** - * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a Shard message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @static - * @param {vtctldata.DeleteCellInfoResponse} message DeleteCellInfoResponse + * @param {vtctldata.Shard} message Shard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellInfoResponse.toObject = function toObject() { - return {}; + Shard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.name = ""; + object.shard = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.topodata.Shard.toObject(message.shard, options); + return object; }; /** - * Converts this DeleteCellInfoResponse to JSON. + * Converts this Shard to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellInfoResponse + * @memberof vtctldata.Shard * @instance * @returns {Object.} JSON object */ - DeleteCellInfoResponse.prototype.toJSON = function toJSON() { + Shard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteCellInfoResponse; + return Shard; })(); - vtctldata.DeleteCellsAliasRequest = (function() { + vtctldata.Workflow = (function() { /** - * Properties of a DeleteCellsAliasRequest. + * Properties of a Workflow. * @memberof vtctldata - * @interface IDeleteCellsAliasRequest - * @property {string|null} [name] DeleteCellsAliasRequest name + * @interface IWorkflow + * @property {string|null} [name] Workflow name + * @property {vtctldata.Workflow.IReplicationLocation|null} [source] Workflow source + * @property {vtctldata.Workflow.IReplicationLocation|null} [target] Workflow target + * @property {number|Long|null} [max_v_replication_lag] Workflow max_v_replication_lag + * @property {Object.|null} [shard_streams] Workflow shard_streams + * @property {string|null} [workflow_type] Workflow workflow_type + * @property {string|null} [workflow_sub_type] Workflow workflow_sub_type */ /** - * Constructs a new DeleteCellsAliasRequest. + * Constructs a new Workflow. * @memberof vtctldata - * @classdesc Represents a DeleteCellsAliasRequest. - * @implements IDeleteCellsAliasRequest + * @classdesc Represents a Workflow. + * @implements IWorkflow * @constructor - * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set + * @param {vtctldata.IWorkflow=} [properties] Properties to set */ - function DeleteCellsAliasRequest(properties) { + function Workflow(properties) { + this.shard_streams = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89133,76 +90207,176 @@ $root.vtctldata = (function() { } /** - * DeleteCellsAliasRequest name. + * Workflow name. * @member {string} name - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @instance */ - DeleteCellsAliasRequest.prototype.name = ""; + Workflow.prototype.name = ""; /** - * Creates a new DeleteCellsAliasRequest instance using the specified properties. + * Workflow source. + * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} source + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.source = null; + + /** + * Workflow target. + * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} target + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.target = null; + + /** + * Workflow max_v_replication_lag. + * @member {number|Long} max_v_replication_lag + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.max_v_replication_lag = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Workflow shard_streams. + * @member {Object.} shard_streams + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.shard_streams = $util.emptyObject; + + /** + * Workflow workflow_type. + * @member {string} workflow_type + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.workflow_type = ""; + + /** + * Workflow workflow_sub_type. + * @member {string} workflow_sub_type + * @memberof vtctldata.Workflow + * @instance + */ + Workflow.prototype.workflow_sub_type = ""; + + /** + * Creates a new Workflow instance using the specified properties. * @function create - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static - * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest instance + * @param {vtctldata.IWorkflow=} [properties] Properties to set + * @returns {vtctldata.Workflow} Workflow instance */ - DeleteCellsAliasRequest.create = function create(properties) { - return new DeleteCellsAliasRequest(properties); + Workflow.create = function create(properties) { + return new Workflow(properties); }; /** - * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static - * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode + * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasRequest.encode = function encode(message, writer) { + Workflow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.vtctldata.Workflow.ReplicationLocation.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.vtctldata.Workflow.ReplicationLocation.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.max_v_replication_lag != null && Object.hasOwnProperty.call(message, "max_v_replication_lag")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.max_v_replication_lag); + if (message.shard_streams != null && Object.hasOwnProperty.call(message, "shard_streams")) + for (var keys = Object.keys(message.shard_streams), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.Workflow.ShardStream.encode(message.shard_streams[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.workflow_type != null && Object.hasOwnProperty.call(message, "workflow_type")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.workflow_type); + if (message.workflow_sub_type != null && Object.hasOwnProperty.call(message, "workflow_sub_type")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.workflow_sub_type); return writer; }; /** - * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. + * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static - * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode + * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { + Workflow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. + * Decodes a Workflow message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.Workflow} Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasRequest.decode = function decode(reader, length) { + Workflow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.source = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); + break; + case 3: + message.target = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); + break; + case 4: + message.max_v_replication_lag = reader.int64(); + break; + case 5: + if (message.shard_streams === $util.emptyObject) + message.shard_streams = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.Workflow.ShardStream.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.shard_streams[key] = value; + break; + case 6: + message.workflow_type = reader.string(); + break; + case 7: + message.workflow_sub_type = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -89212,1095 +90386,1896 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a Workflow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.Workflow} Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { + Workflow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCellsAliasRequest message. + * Verifies a Workflow message. * @function verify - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCellsAliasRequest.verify = function verify(message) { + Workflow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.source); + if (error) + return "source." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.target); + if (error) + return "target." + error; + } + if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) + if (!$util.isInteger(message.max_v_replication_lag) && !(message.max_v_replication_lag && $util.isInteger(message.max_v_replication_lag.low) && $util.isInteger(message.max_v_replication_lag.high))) + return "max_v_replication_lag: integer|Long expected"; + if (message.shard_streams != null && message.hasOwnProperty("shard_streams")) { + if (!$util.isObject(message.shard_streams)) + return "shard_streams: object expected"; + var key = Object.keys(message.shard_streams); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.Workflow.ShardStream.verify(message.shard_streams[key[i]]); + if (error) + return "shard_streams." + error; + } + } + if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) + if (!$util.isString(message.workflow_type)) + return "workflow_type: string expected"; + if (message.workflow_sub_type != null && message.hasOwnProperty("workflow_sub_type")) + if (!$util.isString(message.workflow_sub_type)) + return "workflow_sub_type: string expected"; return null; }; /** - * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Workflow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest + * @returns {vtctldata.Workflow} Workflow */ - DeleteCellsAliasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellsAliasRequest) + Workflow.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow) return object; - var message = new $root.vtctldata.DeleteCellsAliasRequest(); + var message = new $root.vtctldata.Workflow(); if (object.name != null) message.name = String(object.name); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".vtctldata.Workflow.source: object expected"); + message.source = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.source); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".vtctldata.Workflow.target: object expected"); + message.target = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.target); + } + if (object.max_v_replication_lag != null) + if ($util.Long) + (message.max_v_replication_lag = $util.Long.fromValue(object.max_v_replication_lag)).unsigned = false; + else if (typeof object.max_v_replication_lag === "string") + message.max_v_replication_lag = parseInt(object.max_v_replication_lag, 10); + else if (typeof object.max_v_replication_lag === "number") + message.max_v_replication_lag = object.max_v_replication_lag; + else if (typeof object.max_v_replication_lag === "object") + message.max_v_replication_lag = new $util.LongBits(object.max_v_replication_lag.low >>> 0, object.max_v_replication_lag.high >>> 0).toNumber(); + if (object.shard_streams) { + if (typeof object.shard_streams !== "object") + throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); + message.shard_streams = {}; + for (var keys = Object.keys(object.shard_streams), i = 0; i < keys.length; ++i) { + if (typeof object.shard_streams[keys[i]] !== "object") + throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); + message.shard_streams[keys[i]] = $root.vtctldata.Workflow.ShardStream.fromObject(object.shard_streams[keys[i]]); + } + } + if (object.workflow_type != null) + message.workflow_type = String(object.workflow_type); + if (object.workflow_sub_type != null) + message.workflow_sub_type = String(object.workflow_sub_type); return message; }; /** - * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. + * Creates a plain object from a Workflow message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @static - * @param {vtctldata.DeleteCellsAliasRequest} message DeleteCellsAliasRequest + * @param {vtctldata.Workflow} message Workflow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCellsAliasRequest.toObject = function toObject(message, options) { + Workflow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.objects || options.defaults) + object.shard_streams = {}; + if (options.defaults) { object.name = ""; + object.source = null; + object.target = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max_v_replication_lag = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max_v_replication_lag = options.longs === String ? "0" : 0; + object.workflow_type = ""; + object.workflow_sub_type = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.target, options); + if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) + if (typeof message.max_v_replication_lag === "number") + object.max_v_replication_lag = options.longs === String ? String(message.max_v_replication_lag) : message.max_v_replication_lag; + else + object.max_v_replication_lag = options.longs === String ? $util.Long.prototype.toString.call(message.max_v_replication_lag) : options.longs === Number ? new $util.LongBits(message.max_v_replication_lag.low >>> 0, message.max_v_replication_lag.high >>> 0).toNumber() : message.max_v_replication_lag; + var keys2; + if (message.shard_streams && (keys2 = Object.keys(message.shard_streams)).length) { + object.shard_streams = {}; + for (var j = 0; j < keys2.length; ++j) + object.shard_streams[keys2[j]] = $root.vtctldata.Workflow.ShardStream.toObject(message.shard_streams[keys2[j]], options); + } + if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) + object.workflow_type = message.workflow_type; + if (message.workflow_sub_type != null && message.hasOwnProperty("workflow_sub_type")) + object.workflow_sub_type = message.workflow_sub_type; return object; }; /** - * Converts this DeleteCellsAliasRequest to JSON. + * Converts this Workflow to JSON. * @function toJSON - * @memberof vtctldata.DeleteCellsAliasRequest + * @memberof vtctldata.Workflow * @instance * @returns {Object.} JSON object */ - DeleteCellsAliasRequest.prototype.toJSON = function toJSON() { + Workflow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteCellsAliasRequest; - })(); + Workflow.ReplicationLocation = (function() { - vtctldata.DeleteCellsAliasResponse = (function() { + /** + * Properties of a ReplicationLocation. + * @memberof vtctldata.Workflow + * @interface IReplicationLocation + * @property {string|null} [keyspace] ReplicationLocation keyspace + * @property {Array.|null} [shards] ReplicationLocation shards + */ - /** - * Properties of a DeleteCellsAliasResponse. - * @memberof vtctldata - * @interface IDeleteCellsAliasResponse - */ + /** + * Constructs a new ReplicationLocation. + * @memberof vtctldata.Workflow + * @classdesc Represents a ReplicationLocation. + * @implements IReplicationLocation + * @constructor + * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set + */ + function ReplicationLocation(properties) { + this.shards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DeleteCellsAliasResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteCellsAliasResponse. - * @implements IDeleteCellsAliasResponse - * @constructor - * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set - */ - function DeleteCellsAliasResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ReplicationLocation keyspace. + * @member {string} keyspace + * @memberof vtctldata.Workflow.ReplicationLocation + * @instance + */ + ReplicationLocation.prototype.keyspace = ""; - /** - * Creates a new DeleteCellsAliasResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse instance - */ - DeleteCellsAliasResponse.create = function create(properties) { - return new DeleteCellsAliasResponse(properties); - }; + /** + * ReplicationLocation shards. + * @member {Array.} shards + * @memberof vtctldata.Workflow.ReplicationLocation + * @instance + */ + ReplicationLocation.prototype.shards = $util.emptyArray; - /** - * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteCellsAliasResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a new ReplicationLocation instance using the specified properties. + * @function create + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set + * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation instance + */ + ReplicationLocation.create = function create(properties) { + return new ReplicationLocation(properties); + }; - /** - * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. + * @function encode + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicationLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shards != null && message.shards.length) + for (var i = 0; i < message.shards.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shards[i]); + return writer; + }; - /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteCellsAliasResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicationLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplicationLocation message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicationLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ReplicationLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + if (!(message.shards && message.shards.length)) + message.shards = []; + message.shards.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicationLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicationLocation message. + * @function verify + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicationLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (var i = 0; i < message.shards.length; ++i) + if (!$util.isString(message.shards[i])) + return "shards: string[] expected"; + } + return null; + }; + + /** + * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation + */ + ReplicationLocation.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow.ReplicationLocation) + return object; + var message = new $root.vtctldata.Workflow.ReplicationLocation(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".vtctldata.Workflow.ReplicationLocation.shards: array expected"); + message.shards = []; + for (var i = 0; i < object.shards.length; ++i) + message.shards[i] = String(object.shards[i]); + } + return message; + }; + + /** + * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.Workflow.ReplicationLocation + * @static + * @param {vtctldata.Workflow.ReplicationLocation} message ReplicationLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplicationLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shards = []; + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shards && message.shards.length) { + object.shards = []; + for (var j = 0; j < message.shards.length; ++j) + object.shards[j] = message.shards[j]; + } + return object; + }; + + /** + * Converts this ReplicationLocation to JSON. + * @function toJSON + * @memberof vtctldata.Workflow.ReplicationLocation + * @instance + * @returns {Object.} JSON object + */ + ReplicationLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReplicationLocation; + })(); + + Workflow.ShardStream = (function() { + + /** + * Properties of a ShardStream. + * @memberof vtctldata.Workflow + * @interface IShardStream + * @property {Array.|null} [streams] ShardStream streams + * @property {Array.|null} [tablet_controls] ShardStream tablet_controls + * @property {boolean|null} [is_primary_serving] ShardStream is_primary_serving + */ + + /** + * Constructs a new ShardStream. + * @memberof vtctldata.Workflow + * @classdesc Represents a ShardStream. + * @implements IShardStream + * @constructor + * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set + */ + function ShardStream(properties) { + this.streams = []; + this.tablet_controls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardStream streams. + * @member {Array.} streams + * @memberof vtctldata.Workflow.ShardStream + * @instance + */ + ShardStream.prototype.streams = $util.emptyArray; + + /** + * ShardStream tablet_controls. + * @member {Array.} tablet_controls + * @memberof vtctldata.Workflow.ShardStream + * @instance + */ + ShardStream.prototype.tablet_controls = $util.emptyArray; + + /** + * ShardStream is_primary_serving. + * @member {boolean} is_primary_serving + * @memberof vtctldata.Workflow.ShardStream + * @instance + */ + ShardStream.prototype.is_primary_serving = false; + + /** + * Creates a new ShardStream instance using the specified properties. + * @function create + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set + * @returns {vtctldata.Workflow.ShardStream} ShardStream instance + */ + ShardStream.create = function create(properties) { + return new ShardStream(properties); + }; + + /** + * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. + * @function encode + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.streams != null && message.streams.length) + for (var i = 0; i < message.streams.length; ++i) + $root.vtctldata.Workflow.Stream.encode(message.streams[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_controls != null && message.tablet_controls.length) + for (var i = 0; i < message.tablet_controls.length; ++i) + $root.topodata.Shard.TabletControl.encode(message.tablet_controls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.is_primary_serving != null && Object.hasOwnProperty.call(message, "is_primary_serving")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_primary_serving); + return writer; + }; + + /** + * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardStream message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.Workflow.ShardStream} ShardStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardStream.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ShardStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.streams && message.streams.length)) + message.streams = []; + message.streams.push($root.vtctldata.Workflow.Stream.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tablet_controls && message.tablet_controls.length)) + message.tablet_controls = []; + message.tablet_controls.push($root.topodata.Shard.TabletControl.decode(reader, reader.uint32())); + break; + case 3: + message.is_primary_serving = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ShardStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.Workflow.ShardStream} ShardStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DeleteCellsAliasResponse message. - * @function verify - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteCellsAliasResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Verifies a ShardStream message. + * @function verify + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.streams != null && message.hasOwnProperty("streams")) { + if (!Array.isArray(message.streams)) + return "streams: array expected"; + for (var i = 0; i < message.streams.length; ++i) { + var error = $root.vtctldata.Workflow.Stream.verify(message.streams[i]); + if (error) + return "streams." + error; + } + } + if (message.tablet_controls != null && message.hasOwnProperty("tablet_controls")) { + if (!Array.isArray(message.tablet_controls)) + return "tablet_controls: array expected"; + for (var i = 0; i < message.tablet_controls.length; ++i) { + var error = $root.topodata.Shard.TabletControl.verify(message.tablet_controls[i]); + if (error) + return "tablet_controls." + error; + } + } + if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) + if (typeof message.is_primary_serving !== "boolean") + return "is_primary_serving: boolean expected"; + return null; + }; - /** - * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse - */ - DeleteCellsAliasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteCellsAliasResponse) + /** + * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.Workflow.ShardStream} ShardStream + */ + ShardStream.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow.ShardStream) + return object; + var message = new $root.vtctldata.Workflow.ShardStream(); + if (object.streams) { + if (!Array.isArray(object.streams)) + throw TypeError(".vtctldata.Workflow.ShardStream.streams: array expected"); + message.streams = []; + for (var i = 0; i < object.streams.length; ++i) { + if (typeof object.streams[i] !== "object") + throw TypeError(".vtctldata.Workflow.ShardStream.streams: object expected"); + message.streams[i] = $root.vtctldata.Workflow.Stream.fromObject(object.streams[i]); + } + } + if (object.tablet_controls) { + if (!Array.isArray(object.tablet_controls)) + throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: array expected"); + message.tablet_controls = []; + for (var i = 0; i < object.tablet_controls.length; ++i) { + if (typeof object.tablet_controls[i] !== "object") + throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: object expected"); + message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject(object.tablet_controls[i]); + } + } + if (object.is_primary_serving != null) + message.is_primary_serving = Boolean(object.is_primary_serving); + return message; + }; + + /** + * Creates a plain object from a ShardStream message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.Workflow.ShardStream + * @static + * @param {vtctldata.Workflow.ShardStream} message ShardStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.streams = []; + object.tablet_controls = []; + } + if (options.defaults) + object.is_primary_serving = false; + if (message.streams && message.streams.length) { + object.streams = []; + for (var j = 0; j < message.streams.length; ++j) + object.streams[j] = $root.vtctldata.Workflow.Stream.toObject(message.streams[j], options); + } + if (message.tablet_controls && message.tablet_controls.length) { + object.tablet_controls = []; + for (var j = 0; j < message.tablet_controls.length; ++j) + object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject(message.tablet_controls[j], options); + } + if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) + object.is_primary_serving = message.is_primary_serving; return object; - return new $root.vtctldata.DeleteCellsAliasResponse(); - }; + }; - /** - * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteCellsAliasResponse - * @static - * @param {vtctldata.DeleteCellsAliasResponse} message DeleteCellsAliasResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteCellsAliasResponse.toObject = function toObject() { - return {}; - }; + /** + * Converts this ShardStream to JSON. + * @function toJSON + * @memberof vtctldata.Workflow.ShardStream + * @instance + * @returns {Object.} JSON object + */ + ShardStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DeleteCellsAliasResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteCellsAliasResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteCellsAliasResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ShardStream; + })(); - return DeleteCellsAliasResponse; - })(); + Workflow.Stream = (function() { - vtctldata.DeleteKeyspaceRequest = (function() { + /** + * Properties of a Stream. + * @memberof vtctldata.Workflow + * @interface IStream + * @property {number|Long|null} [id] Stream id + * @property {string|null} [shard] Stream shard + * @property {topodata.ITabletAlias|null} [tablet] Stream tablet + * @property {binlogdata.IBinlogSource|null} [binlog_source] Stream binlog_source + * @property {string|null} [position] Stream position + * @property {string|null} [stop_position] Stream stop_position + * @property {string|null} [state] Stream state + * @property {string|null} [db_name] Stream db_name + * @property {vttime.ITime|null} [transaction_timestamp] Stream transaction_timestamp + * @property {vttime.ITime|null} [time_updated] Stream time_updated + * @property {string|null} [message] Stream message + * @property {Array.|null} [copy_states] Stream copy_states + * @property {Array.|null} [logs] Stream logs + * @property {string|null} [log_fetch_error] Stream log_fetch_error + * @property {Array.|null} [tags] Stream tags + */ - /** - * Properties of a DeleteKeyspaceRequest. - * @memberof vtctldata - * @interface IDeleteKeyspaceRequest - * @property {string|null} [keyspace] DeleteKeyspaceRequest keyspace - * @property {boolean|null} [recursive] DeleteKeyspaceRequest recursive - * @property {boolean|null} [force] DeleteKeyspaceRequest force - */ + /** + * Constructs a new Stream. + * @memberof vtctldata.Workflow + * @classdesc Represents a Stream. + * @implements IStream + * @constructor + * @param {vtctldata.Workflow.IStream=} [properties] Properties to set + */ + function Stream(properties) { + this.copy_states = []; + this.logs = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DeleteKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceRequest. - * @implements IDeleteKeyspaceRequest - * @constructor - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set - */ - function DeleteKeyspaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Stream id. + * @member {number|Long} id + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * DeleteKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.keyspace = ""; + /** + * Stream shard. + * @member {string} shard + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.shard = ""; - /** - * DeleteKeyspaceRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.recursive = false; + /** + * Stream tablet. + * @member {topodata.ITabletAlias|null|undefined} tablet + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.tablet = null; - /** - * DeleteKeyspaceRequest force. - * @member {boolean} force - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.force = false; + /** + * Stream binlog_source. + * @member {binlogdata.IBinlogSource|null|undefined} binlog_source + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.binlog_source = null; - /** - * Creates a new DeleteKeyspaceRequest instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest instance - */ - DeleteKeyspaceRequest.create = function create(properties) { - return new DeleteKeyspaceRequest(properties); - }; + /** + * Stream position. + * @member {string} position + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.position = ""; - /** - * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - return writer; - }; + /** + * Stream stop_position. + * @member {string} stop_position + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.stop_position = ""; - /** - * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Stream state. + * @member {string} state + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.state = ""; - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.recursive = reader.bool(); - break; - case 3: - message.force = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Stream db_name. + * @member {string} db_name + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.db_name = ""; - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Stream transaction_timestamp. + * @member {vttime.ITime|null|undefined} transaction_timestamp + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.transaction_timestamp = null; - /** - * Verifies a DeleteKeyspaceRequest message. - * @function verify - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; + /** + * Stream time_updated. + * @member {vttime.ITime|null|undefined} time_updated + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.time_updated = null; - /** - * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - */ - DeleteKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceRequest) - return object; - var message = new $root.vtctldata.DeleteKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; + /** + * Stream message. + * @member {string} message + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.message = ""; - /** - * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.DeleteKeyspaceRequest} message DeleteKeyspaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.recursive = false; - object.force = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; + /** + * Stream copy_states. + * @member {Array.} copy_states + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.copy_states = $util.emptyArray; - /** - * Converts this DeleteKeyspaceRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteKeyspaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Stream logs. + * @member {Array.} logs + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.logs = $util.emptyArray; - return DeleteKeyspaceRequest; - })(); + /** + * Stream log_fetch_error. + * @member {string} log_fetch_error + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.log_fetch_error = ""; - vtctldata.DeleteKeyspaceResponse = (function() { + /** + * Stream tags. + * @member {Array.} tags + * @memberof vtctldata.Workflow.Stream + * @instance + */ + Stream.prototype.tags = $util.emptyArray; - /** - * Properties of a DeleteKeyspaceResponse. - * @memberof vtctldata - * @interface IDeleteKeyspaceResponse - */ + /** + * Creates a new Stream instance using the specified properties. + * @function create + * @memberof vtctldata.Workflow.Stream + * @static + * @param {vtctldata.Workflow.IStream=} [properties] Properties to set + * @returns {vtctldata.Workflow.Stream} Stream instance + */ + Stream.create = function create(properties) { + return new Stream(properties); + }; - /** - * Constructs a new DeleteKeyspaceResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceResponse. - * @implements IDeleteKeyspaceResponse - * @constructor - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set - */ - function DeleteKeyspaceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. + * @function encode + * @memberof vtctldata.Workflow.Stream + * @static + * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.binlog_source != null && Object.hasOwnProperty.call(message, "binlog_source")) + $root.binlogdata.BinlogSource.encode(message.binlog_source, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.position != null && Object.hasOwnProperty.call(message, "position")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.position); + if (message.stop_position != null && Object.hasOwnProperty.call(message, "stop_position")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.stop_position); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.state); + if (message.db_name != null && Object.hasOwnProperty.call(message, "db_name")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.db_name); + if (message.transaction_timestamp != null && Object.hasOwnProperty.call(message, "transaction_timestamp")) + $root.vttime.Time.encode(message.transaction_timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.time_updated != null && Object.hasOwnProperty.call(message, "time_updated")) + $root.vttime.Time.encode(message.time_updated, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.message); + if (message.copy_states != null && message.copy_states.length) + for (var i = 0; i < message.copy_states.length; ++i) + $root.vtctldata.Workflow.Stream.CopyState.encode(message.copy_states[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + $root.vtctldata.Workflow.Stream.Log.encode(message.logs[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.log_fetch_error != null && Object.hasOwnProperty.call(message, "log_fetch_error")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.log_fetch_error); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.tags[i]); + return writer; + }; - /** - * Creates a new DeleteKeyspaceResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse instance - */ - DeleteKeyspaceResponse.create = function create(properties) { - return new DeleteKeyspaceResponse(properties); - }; + /** + * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.Workflow.Stream + * @static + * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Decodes a Stream message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.Workflow.Stream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.Workflow.Stream} Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stream.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.int64(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 4: + message.binlog_source = $root.binlogdata.BinlogSource.decode(reader, reader.uint32()); + break; + case 5: + message.position = reader.string(); + break; + case 6: + message.stop_position = reader.string(); + break; + case 7: + message.state = reader.string(); + break; + case 8: + message.db_name = reader.string(); + break; + case 9: + message.transaction_timestamp = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 10: + message.time_updated = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 11: + message.message = reader.string(); + break; + case 12: + if (!(message.copy_states && message.copy_states.length)) + message.copy_states = []; + message.copy_states.push($root.vtctldata.Workflow.Stream.CopyState.decode(reader, reader.uint32())); + break; + case 13: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push($root.vtctldata.Workflow.Stream.Log.decode(reader, reader.uint32())); + break; + case 14: + message.log_fetch_error = reader.string(); + break; + case 15: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Stream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.Workflow.Stream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.Workflow.Stream} Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a Stream message. + * @function verify + * @memberof vtctldata.Workflow.Stream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.tablet != null && message.hasOwnProperty("tablet")) { + var error = $root.topodata.TabletAlias.verify(message.tablet); + if (error) + return "tablet." + error; + } + if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) { + var error = $root.binlogdata.BinlogSource.verify(message.binlog_source); + if (error) + return "binlog_source." + error; + } + if (message.position != null && message.hasOwnProperty("position")) + if (!$util.isString(message.position)) + return "position: string expected"; + if (message.stop_position != null && message.hasOwnProperty("stop_position")) + if (!$util.isString(message.stop_position)) + return "stop_position: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + if (!$util.isString(message.state)) + return "state: string expected"; + if (message.db_name != null && message.hasOwnProperty("db_name")) + if (!$util.isString(message.db_name)) + return "db_name: string expected"; + if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) { + var error = $root.vttime.Time.verify(message.transaction_timestamp); + if (error) + return "transaction_timestamp." + error; + } + if (message.time_updated != null && message.hasOwnProperty("time_updated")) { + var error = $root.vttime.Time.verify(message.time_updated); + if (error) + return "time_updated." + error; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.copy_states != null && message.hasOwnProperty("copy_states")) { + if (!Array.isArray(message.copy_states)) + return "copy_states: array expected"; + for (var i = 0; i < message.copy_states.length; ++i) { + var error = $root.vtctldata.Workflow.Stream.CopyState.verify(message.copy_states[i]); + if (error) + return "copy_states." + error; + } + } + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) { + var error = $root.vtctldata.Workflow.Stream.Log.verify(message.logs[i]); + if (error) + return "logs." + error; + } + } + if (message.log_fetch_error != null && message.hasOwnProperty("log_fetch_error")) + if (!$util.isString(message.log_fetch_error)) + return "log_fetch_error: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + return null; + }; + + /** + * Creates a Stream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.Workflow.Stream + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.Workflow.Stream} Stream + */ + Stream.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow.Stream) + return object; + var message = new $root.vtctldata.Workflow.Stream(); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.shard != null) + message.shard = String(object.shard); + if (object.tablet != null) { + if (typeof object.tablet !== "object") + throw TypeError(".vtctldata.Workflow.Stream.tablet: object expected"); + message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); + } + if (object.binlog_source != null) { + if (typeof object.binlog_source !== "object") + throw TypeError(".vtctldata.Workflow.Stream.binlog_source: object expected"); + message.binlog_source = $root.binlogdata.BinlogSource.fromObject(object.binlog_source); + } + if (object.position != null) + message.position = String(object.position); + if (object.stop_position != null) + message.stop_position = String(object.stop_position); + if (object.state != null) + message.state = String(object.state); + if (object.db_name != null) + message.db_name = String(object.db_name); + if (object.transaction_timestamp != null) { + if (typeof object.transaction_timestamp !== "object") + throw TypeError(".vtctldata.Workflow.Stream.transaction_timestamp: object expected"); + message.transaction_timestamp = $root.vttime.Time.fromObject(object.transaction_timestamp); + } + if (object.time_updated != null) { + if (typeof object.time_updated !== "object") + throw TypeError(".vtctldata.Workflow.Stream.time_updated: object expected"); + message.time_updated = $root.vttime.Time.fromObject(object.time_updated); + } + if (object.message != null) + message.message = String(object.message); + if (object.copy_states) { + if (!Array.isArray(object.copy_states)) + throw TypeError(".vtctldata.Workflow.Stream.copy_states: array expected"); + message.copy_states = []; + for (var i = 0; i < object.copy_states.length; ++i) { + if (typeof object.copy_states[i] !== "object") + throw TypeError(".vtctldata.Workflow.Stream.copy_states: object expected"); + message.copy_states[i] = $root.vtctldata.Workflow.Stream.CopyState.fromObject(object.copy_states[i]); + } + } + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".vtctldata.Workflow.Stream.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) { + if (typeof object.logs[i] !== "object") + throw TypeError(".vtctldata.Workflow.Stream.logs: object expected"); + message.logs[i] = $root.vtctldata.Workflow.Stream.Log.fromObject(object.logs[i]); + } + } + if (object.log_fetch_error != null) + message.log_fetch_error = String(object.log_fetch_error); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".vtctldata.Workflow.Stream.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + return message; + }; + + /** + * Creates a plain object from a Stream message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.Workflow.Stream + * @static + * @param {vtctldata.Workflow.Stream} message Stream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.copy_states = []; + object.logs = []; + object.tags = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + object.shard = ""; + object.tablet = null; + object.binlog_source = null; + object.position = ""; + object.stop_position = ""; + object.state = ""; + object.db_name = ""; + object.transaction_timestamp = null; + object.time_updated = null; + object.message = ""; + object.log_fetch_error = ""; } - } - return message; - }; - - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); + if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) + object.binlog_source = $root.binlogdata.BinlogSource.toObject(message.binlog_source, options); + if (message.position != null && message.hasOwnProperty("position")) + object.position = message.position; + if (message.stop_position != null && message.hasOwnProperty("stop_position")) + object.stop_position = message.stop_position; + if (message.state != null && message.hasOwnProperty("state")) + object.state = message.state; + if (message.db_name != null && message.hasOwnProperty("db_name")) + object.db_name = message.db_name; + if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) + object.transaction_timestamp = $root.vttime.Time.toObject(message.transaction_timestamp, options); + if (message.time_updated != null && message.hasOwnProperty("time_updated")) + object.time_updated = $root.vttime.Time.toObject(message.time_updated, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.copy_states && message.copy_states.length) { + object.copy_states = []; + for (var j = 0; j < message.copy_states.length; ++j) + object.copy_states[j] = $root.vtctldata.Workflow.Stream.CopyState.toObject(message.copy_states[j], options); + } + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = $root.vtctldata.Workflow.Stream.Log.toObject(message.logs[j], options); + } + if (message.log_fetch_error != null && message.hasOwnProperty("log_fetch_error")) + object.log_fetch_error = message.log_fetch_error; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + return object; + }; - /** - * Verifies a DeleteKeyspaceResponse message. - * @function verify - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteKeyspaceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Converts this Stream to JSON. + * @function toJSON + * @memberof vtctldata.Workflow.Stream + * @instance + * @returns {Object.} JSON object + */ + Stream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - */ - DeleteKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceResponse) - return object; - return new $root.vtctldata.DeleteKeyspaceResponse(); - }; + Stream.CopyState = (function() { - /** - * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.DeleteKeyspaceResponse} message DeleteKeyspaceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteKeyspaceResponse.toObject = function toObject() { - return {}; - }; + /** + * Properties of a CopyState. + * @memberof vtctldata.Workflow.Stream + * @interface ICopyState + * @property {string|null} [table] CopyState table + * @property {string|null} [last_pk] CopyState last_pk + */ - /** - * Converts this DeleteKeyspaceResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteKeyspaceResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteKeyspaceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new CopyState. + * @memberof vtctldata.Workflow.Stream + * @classdesc Represents a CopyState. + * @implements ICopyState + * @constructor + * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set + */ + function CopyState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return DeleteKeyspaceResponse; - })(); + /** + * CopyState table. + * @member {string} table + * @memberof vtctldata.Workflow.Stream.CopyState + * @instance + */ + CopyState.prototype.table = ""; - vtctldata.DeleteShardsRequest = (function() { + /** + * CopyState last_pk. + * @member {string} last_pk + * @memberof vtctldata.Workflow.Stream.CopyState + * @instance + */ + CopyState.prototype.last_pk = ""; - /** - * Properties of a DeleteShardsRequest. - * @memberof vtctldata - * @interface IDeleteShardsRequest - * @property {Array.|null} [shards] DeleteShardsRequest shards - * @property {boolean|null} [recursive] DeleteShardsRequest recursive - * @property {boolean|null} [even_if_serving] DeleteShardsRequest even_if_serving - * @property {boolean|null} [force] DeleteShardsRequest force - */ + /** + * Creates a new CopyState instance using the specified properties. + * @function create + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set + * @returns {vtctldata.Workflow.Stream.CopyState} CopyState instance + */ + CopyState.create = function create(properties) { + return new CopyState(properties); + }; - /** - * Constructs a new DeleteShardsRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteShardsRequest. - * @implements IDeleteShardsRequest - * @constructor - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - */ - function DeleteShardsRequest(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. + * @function encode + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.last_pk != null && Object.hasOwnProperty.call(message, "last_pk")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.last_pk); + return writer; + }; - /** - * DeleteShardsRequest shards. - * @member {Array.} shards - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.shards = $util.emptyArray; + /** + * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * DeleteShardsRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.recursive = false; + /** + * Decodes a CopyState message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.Workflow.Stream.CopyState} CopyState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream.CopyState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.table = reader.string(); + break; + case 2: + message.last_pk = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * DeleteShardsRequest even_if_serving. - * @member {boolean} even_if_serving - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.even_if_serving = false; + /** + * Decodes a CopyState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.Workflow.Stream.CopyState} CopyState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * DeleteShardsRequest force. - * @member {boolean} force - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.force = false; + /** + * Verifies a CopyState message. + * @function verify + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopyState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.last_pk != null && message.hasOwnProperty("last_pk")) + if (!$util.isString(message.last_pk)) + return "last_pk: string expected"; + return null; + }; - /** - * Creates a new DeleteShardsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest instance - */ - DeleteShardsRequest.create = function create(properties) { - return new DeleteShardsRequest(properties); - }; + /** + * Creates a CopyState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.Workflow.Stream.CopyState} CopyState + */ + CopyState.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow.Stream.CopyState) + return object; + var message = new $root.vtctldata.Workflow.Stream.CopyState(); + if (object.table != null) + message.table = String(object.table); + if (object.last_pk != null) + message.last_pk = String(object.last_pk); + return message; + }; - /** - * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - $root.vtctldata.Shard.encode(message.shards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); - if (message.even_if_serving != null && Object.hasOwnProperty.call(message, "even_if_serving")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.even_if_serving); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; + /** + * Creates a plain object from a CopyState message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.Workflow.Stream.CopyState + * @static + * @param {vtctldata.Workflow.Stream.CopyState} message CopyState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopyState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = ""; + object.last_pk = ""; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.last_pk != null && message.hasOwnProperty("last_pk")) + object.last_pk = message.last_pk; + return object; + }; - /** - * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this CopyState to JSON. + * @function toJSON + * @memberof vtctldata.Workflow.Stream.CopyState + * @instance + * @returns {Object.} JSON object + */ + CopyState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push($root.vtctldata.Shard.decode(reader, reader.uint32())); - break; - case 2: - message.recursive = reader.bool(); - break; - case 4: - message.even_if_serving = reader.bool(); - break; - case 5: - message.force = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return CopyState; + })(); - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Stream.Log = (function() { - /** - * Verifies a DeleteShardsRequest message. - * @function verify - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteShardsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) { - var error = $root.vtctldata.Shard.verify(message.shards[i]); - if (error) - return "shards." + error; - } - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - if (typeof message.even_if_serving !== "boolean") - return "even_if_serving: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; + /** + * Properties of a Log. + * @memberof vtctldata.Workflow.Stream + * @interface ILog + * @property {number|Long|null} [id] Log id + * @property {number|Long|null} [stream_id] Log stream_id + * @property {string|null} [type] Log type + * @property {string|null} [state] Log state + * @property {vttime.ITime|null} [created_at] Log created_at + * @property {vttime.ITime|null} [updated_at] Log updated_at + * @property {string|null} [message] Log message + * @property {number|Long|null} [count] Log count + */ - /** - * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - */ - DeleteShardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsRequest) - return object; - var message = new $root.vtctldata.DeleteShardsRequest(); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.DeleteShardsRequest.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) { - if (typeof object.shards[i] !== "object") - throw TypeError(".vtctldata.DeleteShardsRequest.shards: object expected"); - message.shards[i] = $root.vtctldata.Shard.fromObject(object.shards[i]); + /** + * Constructs a new Log. + * @memberof vtctldata.Workflow.Stream + * @classdesc Represents a Log. + * @implements ILog + * @constructor + * @param {vtctldata.Workflow.Stream.ILog=} [properties] Properties to set + */ + function Log(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - if (object.even_if_serving != null) - message.even_if_serving = Boolean(object.even_if_serving); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - /** - * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.DeleteShardsRequest} message DeleteShardsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteShardsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) { - object.recursive = false; - object.even_if_serving = false; - object.force = false; - } - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = $root.vtctldata.Shard.toObject(message.shards[j], options); - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - object.even_if_serving = message.even_if_serving; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; + /** + * Log id. + * @member {number|Long} id + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Converts this DeleteShardsRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteShardsRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteShardsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Log stream_id. + * @member {number|Long} stream_id + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.stream_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - return DeleteShardsRequest; - })(); + /** + * Log type. + * @member {string} type + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.type = ""; - vtctldata.DeleteShardsResponse = (function() { + /** + * Log state. + * @member {string} state + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.state = ""; - /** - * Properties of a DeleteShardsResponse. - * @memberof vtctldata - * @interface IDeleteShardsResponse - */ + /** + * Log created_at. + * @member {vttime.ITime|null|undefined} created_at + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.created_at = null; - /** - * Constructs a new DeleteShardsResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteShardsResponse. - * @implements IDeleteShardsResponse - * @constructor - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set - */ - function DeleteShardsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Log updated_at. + * @member {vttime.ITime|null|undefined} updated_at + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.updated_at = null; - /** - * Creates a new DeleteShardsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse instance - */ - DeleteShardsResponse.create = function create(properties) { - return new DeleteShardsResponse(properties); - }; + /** + * Log message. + * @member {string} message + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.message = ""; - /** - * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Log count. + * @member {number|Long} count + * @memberof vtctldata.Workflow.Stream.Log + * @instance + */ + Log.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Log instance using the specified properties. + * @function create + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {vtctldata.Workflow.Stream.ILog=} [properties] Properties to set + * @returns {vtctldata.Workflow.Stream.Log} Log instance + */ + Log.create = function create(properties) { + return new Log(properties); + }; - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Log message. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. + * @function encode + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {vtctldata.Workflow.Stream.ILog} message Log message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Log.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); + if (message.stream_id != null && Object.hasOwnProperty.call(message, "stream_id")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.stream_id); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.state); + if (message.created_at != null && Object.hasOwnProperty.call(message, "created_at")) + $root.vttime.Time.encode(message.created_at, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updated_at != null && Object.hasOwnProperty.call(message, "updated_at")) + $root.vttime.Time.encode(message.updated_at, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.count); + return writer; + }; - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Log message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.Log.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {vtctldata.Workflow.Stream.ILog} message Log message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Log.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a DeleteShardsResponse message. - * @function verify - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteShardsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes a Log message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.Workflow.Stream.Log} Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Log.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream.Log(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.int64(); + break; + case 2: + message.stream_id = reader.int64(); + break; + case 3: + message.type = reader.string(); + break; + case 4: + message.state = reader.string(); + break; + case 5: + message.created_at = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 6: + message.updated_at = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 7: + message.message = reader.string(); + break; + case 8: + message.count = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Log message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.Workflow.Stream.Log} Log + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Log.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Log message. + * @function verify + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Log.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.stream_id != null && message.hasOwnProperty("stream_id")) + if (!$util.isInteger(message.stream_id) && !(message.stream_id && $util.isInteger(message.stream_id.low) && $util.isInteger(message.stream_id.high))) + return "stream_id: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + if (!$util.isString(message.state)) + return "state: string expected"; + if (message.created_at != null && message.hasOwnProperty("created_at")) { + var error = $root.vttime.Time.verify(message.created_at); + if (error) + return "created_at." + error; + } + if (message.updated_at != null && message.hasOwnProperty("updated_at")) { + var error = $root.vttime.Time.verify(message.updated_at); + if (error) + return "updated_at." + error; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a Log message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.Workflow.Stream.Log} Log + */ + Log.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.Workflow.Stream.Log) + return object; + var message = new $root.vtctldata.Workflow.Stream.Log(); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.stream_id != null) + if ($util.Long) + (message.stream_id = $util.Long.fromValue(object.stream_id)).unsigned = false; + else if (typeof object.stream_id === "string") + message.stream_id = parseInt(object.stream_id, 10); + else if (typeof object.stream_id === "number") + message.stream_id = object.stream_id; + else if (typeof object.stream_id === "object") + message.stream_id = new $util.LongBits(object.stream_id.low >>> 0, object.stream_id.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.state != null) + message.state = String(object.state); + if (object.created_at != null) { + if (typeof object.created_at !== "object") + throw TypeError(".vtctldata.Workflow.Stream.Log.created_at: object expected"); + message.created_at = $root.vttime.Time.fromObject(object.created_at); + } + if (object.updated_at != null) { + if (typeof object.updated_at !== "object") + throw TypeError(".vtctldata.Workflow.Stream.Log.updated_at: object expected"); + message.updated_at = $root.vttime.Time.fromObject(object.updated_at); + } + if (object.message != null) + message.message = String(object.message); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Log message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.Workflow.Stream.Log + * @static + * @param {vtctldata.Workflow.Stream.Log} message Log + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Log.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.stream_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.stream_id = options.longs === String ? "0" : 0; + object.type = ""; + object.state = ""; + object.created_at = null; + object.updated_at = null; + object.message = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.stream_id != null && message.hasOwnProperty("stream_id")) + if (typeof message.stream_id === "number") + object.stream_id = options.longs === String ? String(message.stream_id) : message.stream_id; + else + object.stream_id = options.longs === String ? $util.Long.prototype.toString.call(message.stream_id) : options.longs === Number ? new $util.LongBits(message.stream_id.low >>> 0, message.stream_id.high >>> 0).toNumber() : message.stream_id; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = message.state; + if (message.created_at != null && message.hasOwnProperty("created_at")) + object.created_at = $root.vttime.Time.toObject(message.created_at, options); + if (message.updated_at != null && message.hasOwnProperty("updated_at")) + object.updated_at = $root.vttime.Time.toObject(message.updated_at, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; - /** - * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - */ - DeleteShardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsResponse) - return object; - return new $root.vtctldata.DeleteShardsResponse(); - }; + /** + * Converts this Log to JSON. + * @function toJSON + * @memberof vtctldata.Workflow.Stream.Log + * @instance + * @returns {Object.} JSON object + */ + Log.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.DeleteShardsResponse} message DeleteShardsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteShardsResponse.toObject = function toObject() { - return {}; - }; + return Log; + })(); - /** - * Converts this DeleteShardsResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteShardsResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteShardsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Stream; + })(); - return DeleteShardsResponse; + return Workflow; })(); - vtctldata.DeleteSrvVSchemaRequest = (function() { + vtctldata.AddCellInfoRequest = (function() { /** - * Properties of a DeleteSrvVSchemaRequest. + * Properties of an AddCellInfoRequest. * @memberof vtctldata - * @interface IDeleteSrvVSchemaRequest - * @property {string|null} [cell] DeleteSrvVSchemaRequest cell + * @interface IAddCellInfoRequest + * @property {string|null} [name] AddCellInfoRequest name + * @property {topodata.ICellInfo|null} [cell_info] AddCellInfoRequest cell_info */ /** - * Constructs a new DeleteSrvVSchemaRequest. + * Constructs a new AddCellInfoRequest. * @memberof vtctldata - * @classdesc Represents a DeleteSrvVSchemaRequest. - * @implements IDeleteSrvVSchemaRequest + * @classdesc Represents an AddCellInfoRequest. + * @implements IAddCellInfoRequest * @constructor - * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IAddCellInfoRequest=} [properties] Properties to set */ - function DeleteSrvVSchemaRequest(properties) { + function AddCellInfoRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90308,75 +92283,88 @@ $root.vtctldata = (function() { } /** - * DeleteSrvVSchemaRequest cell. - * @member {string} cell - * @memberof vtctldata.DeleteSrvVSchemaRequest + * AddCellInfoRequest name. + * @member {string} name + * @memberof vtctldata.AddCellInfoRequest * @instance */ - DeleteSrvVSchemaRequest.prototype.cell = ""; + AddCellInfoRequest.prototype.name = ""; /** - * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. + * AddCellInfoRequest cell_info. + * @member {topodata.ICellInfo|null|undefined} cell_info + * @memberof vtctldata.AddCellInfoRequest + * @instance + */ + AddCellInfoRequest.prototype.cell_info = null; + + /** + * Creates a new AddCellInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest instance + * @param {vtctldata.IAddCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest instance */ - DeleteSrvVSchemaRequest.create = function create(properties) { - return new DeleteSrvVSchemaRequest(properties); + AddCellInfoRequest.create = function create(properties) { + return new AddCellInfoRequest(properties); }; /** - * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified AddCellInfoRequest message. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IAddCellInfoRequest} message AddCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaRequest.encode = function encode(message, writer) { + AddCellInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) + $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified AddCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static - * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IAddCellInfoRequest} message AddCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + AddCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. + * Decodes an AddCellInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaRequest.decode = function decode(reader, length) { + AddCellInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cell = reader.string(); + message.name = reader.string(); + break; + case 2: + message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -90387,269 +92375,120 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes an AddCellInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + AddCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSrvVSchemaRequest message. + * Verifies an AddCellInfoRequest message. * @function verify - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSrvVSchemaRequest.verify = function verify(message) { + AddCellInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) { + var error = $root.topodata.CellInfo.verify(message.cell_info); + if (error) + return "cell_info." + error; + } return null; }; /** - * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest + * @returns {vtctldata.AddCellInfoRequest} AddCellInfoRequest */ - DeleteSrvVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteSrvVSchemaRequest) + AddCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.AddCellInfoRequest) return object; - var message = new $root.vtctldata.DeleteSrvVSchemaRequest(); - if (object.cell != null) - message.cell = String(object.cell); + var message = new $root.vtctldata.AddCellInfoRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cell_info != null) { + if (typeof object.cell_info !== "object") + throw TypeError(".vtctldata.AddCellInfoRequest.cell_info: object expected"); + message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + } return message; }; /** - * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from an AddCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteSrvVSchemaRequest + * @memberof vtctldata.AddCellInfoRequest * @static - * @param {vtctldata.DeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest + * @param {vtctldata.AddCellInfoRequest} message AddCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSrvVSchemaRequest.toObject = function toObject(message, options) { + AddCellInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - return object; - }; - - /** - * Converts this DeleteSrvVSchemaRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteSrvVSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSrvVSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteSrvVSchemaRequest; - })(); - - vtctldata.DeleteSrvVSchemaResponse = (function() { - - /** - * Properties of a DeleteSrvVSchemaResponse. - * @memberof vtctldata - * @interface IDeleteSrvVSchemaResponse - */ - - /** - * Constructs a new DeleteSrvVSchemaResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteSrvVSchemaResponse. - * @implements IDeleteSrvVSchemaResponse - * @constructor - * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set - */ - function DeleteSrvVSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse instance - */ - DeleteSrvVSchemaResponse.create = function create(properties) { - return new DeleteSrvVSchemaResponse(properties); - }; - - /** - * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSrvVSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSrvVSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } + if (options.defaults) { + object.name = ""; + object.cell_info = null; } - return message; - }; - - /** - * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSrvVSchemaResponse message. - * @function verify - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSrvVSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse - */ - DeleteSrvVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteSrvVSchemaResponse) - return object; - return new $root.vtctldata.DeleteSrvVSchemaResponse(); - }; - - /** - * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteSrvVSchemaResponse - * @static - * @param {vtctldata.DeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSrvVSchemaResponse.toObject = function toObject() { - return {}; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) + object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); + return object; }; /** - * Converts this DeleteSrvVSchemaResponse to JSON. + * Converts this AddCellInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteSrvVSchemaResponse + * @memberof vtctldata.AddCellInfoRequest * @instance * @returns {Object.} JSON object */ - DeleteSrvVSchemaResponse.prototype.toJSON = function toJSON() { + AddCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSrvVSchemaResponse; + return AddCellInfoRequest; })(); - vtctldata.DeleteTabletsRequest = (function() { + vtctldata.AddCellInfoResponse = (function() { /** - * Properties of a DeleteTabletsRequest. + * Properties of an AddCellInfoResponse. * @memberof vtctldata - * @interface IDeleteTabletsRequest - * @property {Array.|null} [tablet_aliases] DeleteTabletsRequest tablet_aliases - * @property {boolean|null} [allow_primary] DeleteTabletsRequest allow_primary + * @interface IAddCellInfoResponse */ /** - * Constructs a new DeleteTabletsRequest. + * Constructs a new AddCellInfoResponse. * @memberof vtctldata - * @classdesc Represents a DeleteTabletsRequest. - * @implements IDeleteTabletsRequest + * @classdesc Represents an AddCellInfoResponse. + * @implements IAddCellInfoResponse * @constructor - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set + * @param {vtctldata.IAddCellInfoResponse=} [properties] Properties to set */ - function DeleteTabletsRequest(properties) { - this.tablet_aliases = []; + function AddCellInfoResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90657,92 +92496,63 @@ $root.vtctldata = (function() { } /** - * DeleteTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.DeleteTabletsRequest - * @instance - */ - DeleteTabletsRequest.prototype.tablet_aliases = $util.emptyArray; - - /** - * DeleteTabletsRequest allow_primary. - * @member {boolean} allow_primary - * @memberof vtctldata.DeleteTabletsRequest - * @instance - */ - DeleteTabletsRequest.prototype.allow_primary = false; - - /** - * Creates a new DeleteTabletsRequest instance using the specified properties. + * Creates a new AddCellInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest instance + * @param {vtctldata.IAddCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse instance */ - DeleteTabletsRequest.create = function create(properties) { - return new DeleteTabletsRequest(properties); + AddCellInfoResponse.create = function create(properties) { + return new AddCellInfoResponse(properties); }; /** - * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * Encodes the specified AddCellInfoResponse message. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode + * @param {vtctldata.IAddCellInfoResponse} message AddCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsRequest.encode = function encode(message, writer) { + AddCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (var i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); return writer; }; /** - * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. + * Encodes the specified AddCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode + * @param {vtctldata.IAddCellInfoResponse} message AddCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + AddCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer. + * Decodes an AddCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsRequest.decode = function decode(reader, length) { + AddCellInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - case 2: - message.allow_primary = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -90752,132 +92562,96 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes an AddCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsRequest.decodeDelimited = function decodeDelimited(reader) { + AddCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTabletsRequest message. + * Verifies an AddCellInfoResponse message. * @function verify - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTabletsRequest.verify = function verify(message) { + AddCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (var i = 0; i < message.tablet_aliases.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); - if (error) - return "tablet_aliases." + error; - } - } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - if (typeof message.allow_primary !== "boolean") - return "allow_primary: boolean expected"; return null; }; /** - * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest + * @returns {vtctldata.AddCellInfoResponse} AddCellInfoResponse */ - DeleteTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsRequest) + AddCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.AddCellInfoResponse) return object; - var message = new $root.vtctldata.DeleteTabletsRequest(); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (var i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); - } - } - if (object.allow_primary != null) - message.allow_primary = Boolean(object.allow_primary); - return message; + return new $root.vtctldata.AddCellInfoResponse(); }; /** - * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. + * Creates a plain object from an AddCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @static - * @param {vtctldata.DeleteTabletsRequest} message DeleteTabletsRequest + * @param {vtctldata.AddCellInfoResponse} message AddCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tablet_aliases = []; - if (options.defaults) - object.allow_primary = false; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (var j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); - } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - object.allow_primary = message.allow_primary; - return object; + AddCellInfoResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DeleteTabletsRequest to JSON. + * Converts this AddCellInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.DeleteTabletsRequest + * @memberof vtctldata.AddCellInfoResponse * @instance * @returns {Object.} JSON object */ - DeleteTabletsRequest.prototype.toJSON = function toJSON() { + AddCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTabletsRequest; + return AddCellInfoResponse; })(); - vtctldata.DeleteTabletsResponse = (function() { + vtctldata.AddCellsAliasRequest = (function() { /** - * Properties of a DeleteTabletsResponse. + * Properties of an AddCellsAliasRequest. * @memberof vtctldata - * @interface IDeleteTabletsResponse + * @interface IAddCellsAliasRequest + * @property {string|null} [name] AddCellsAliasRequest name + * @property {Array.|null} [cells] AddCellsAliasRequest cells */ /** - * Constructs a new DeleteTabletsResponse. + * Constructs a new AddCellsAliasRequest. * @memberof vtctldata - * @classdesc Represents a DeleteTabletsResponse. - * @implements IDeleteTabletsResponse + * @classdesc Represents an AddCellsAliasRequest. + * @implements IAddCellsAliasRequest * @constructor - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set + * @param {vtctldata.IAddCellsAliasRequest=} [properties] Properties to set */ - function DeleteTabletsResponse(properties) { + function AddCellsAliasRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90885,63 +92659,92 @@ $root.vtctldata = (function() { } /** - * Creates a new DeleteTabletsResponse instance using the specified properties. + * AddCellsAliasRequest name. + * @member {string} name + * @memberof vtctldata.AddCellsAliasRequest + * @instance + */ + AddCellsAliasRequest.prototype.name = ""; + + /** + * AddCellsAliasRequest cells. + * @member {Array.} cells + * @memberof vtctldata.AddCellsAliasRequest + * @instance + */ + AddCellsAliasRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new AddCellsAliasRequest instance using the specified properties. * @function create - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse instance + * @param {vtctldata.IAddCellsAliasRequest=} [properties] Properties to set + * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest instance */ - DeleteTabletsResponse.create = function create(properties) { - return new DeleteTabletsResponse(properties); + AddCellsAliasRequest.create = function create(properties) { + return new AddCellsAliasRequest(properties); }; /** - * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * Encodes the specified AddCellsAliasRequest message. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode + * @param {vtctldata.IAddCellsAliasRequest} message AddCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsResponse.encode = function encode(message, writer) { + AddCellsAliasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. + * Encodes the specified AddCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode + * @param {vtctldata.IAddCellsAliasRequest} message AddCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + AddCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer. + * Decodes an AddCellsAliasRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsResponse.decode = function decode(reader, length) { + AddCellsAliasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellsAliasRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -90951,100 +92754,127 @@ $root.vtctldata = (function() { }; /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes an AddCellsAliasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + AddCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTabletsResponse message. + * Verifies an AddCellsAliasRequest message. * @function verify - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTabletsResponse.verify = function verify(message) { + AddCellsAliasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse + * @returns {vtctldata.AddCellsAliasRequest} AddCellsAliasRequest */ - DeleteTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsResponse) + AddCellsAliasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.AddCellsAliasRequest) return object; - return new $root.vtctldata.DeleteTabletsResponse(); + var message = new $root.vtctldata.AddCellsAliasRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.AddCellsAliasRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. + * Creates a plain object from an AddCellsAliasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @static - * @param {vtctldata.DeleteTabletsResponse} message DeleteTabletsResponse + * @param {vtctldata.AddCellsAliasRequest} message AddCellsAliasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTabletsResponse.toObject = function toObject() { - return {}; + AddCellsAliasRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this DeleteTabletsResponse to JSON. + * Converts this AddCellsAliasRequest to JSON. * @function toJSON - * @memberof vtctldata.DeleteTabletsResponse + * @memberof vtctldata.AddCellsAliasRequest * @instance * @returns {Object.} JSON object */ - DeleteTabletsResponse.prototype.toJSON = function toJSON() { + AddCellsAliasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTabletsResponse; + return AddCellsAliasRequest; })(); - vtctldata.EmergencyReparentShardRequest = (function() { + vtctldata.AddCellsAliasResponse = (function() { /** - * Properties of an EmergencyReparentShardRequest. + * Properties of an AddCellsAliasResponse. * @memberof vtctldata - * @interface IEmergencyReparentShardRequest - * @property {string|null} [keyspace] EmergencyReparentShardRequest keyspace - * @property {string|null} [shard] EmergencyReparentShardRequest shard - * @property {topodata.ITabletAlias|null} [new_primary] EmergencyReparentShardRequest new_primary - * @property {Array.|null} [ignore_replicas] EmergencyReparentShardRequest ignore_replicas - * @property {vttime.IDuration|null} [wait_replicas_timeout] EmergencyReparentShardRequest wait_replicas_timeout - * @property {boolean|null} [prevent_cross_cell_promotion] EmergencyReparentShardRequest prevent_cross_cell_promotion + * @interface IAddCellsAliasResponse */ /** - * Constructs a new EmergencyReparentShardRequest. + * Constructs a new AddCellsAliasResponse. * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardRequest. - * @implements IEmergencyReparentShardRequest + * @classdesc Represents an AddCellsAliasResponse. + * @implements IAddCellsAliasResponse * @constructor - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set + * @param {vtctldata.IAddCellsAliasResponse=} [properties] Properties to set */ - function EmergencyReparentShardRequest(properties) { - this.ignore_replicas = []; + function AddCellsAliasResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91052,144 +92882,63 @@ $root.vtctldata = (function() { } /** - * EmergencyReparentShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.keyspace = ""; - - /** - * EmergencyReparentShardRequest shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.shard = ""; - - /** - * EmergencyReparentShardRequest new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.new_primary = null; - - /** - * EmergencyReparentShardRequest ignore_replicas. - * @member {Array.} ignore_replicas - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.ignore_replicas = $util.emptyArray; - - /** - * EmergencyReparentShardRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.wait_replicas_timeout = null; - - /** - * EmergencyReparentShardRequest prevent_cross_cell_promotion. - * @member {boolean} prevent_cross_cell_promotion - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.prevent_cross_cell_promotion = false; - - /** - * Creates a new EmergencyReparentShardRequest instance using the specified properties. + * Creates a new AddCellsAliasResponse instance using the specified properties. * @function create - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest instance + * @param {vtctldata.IAddCellsAliasResponse=} [properties] Properties to set + * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse instance */ - EmergencyReparentShardRequest.create = function create(properties) { - return new EmergencyReparentShardRequest(properties); + AddCellsAliasResponse.create = function create(properties) { + return new AddCellsAliasResponse(properties); }; /** - * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * Encodes the specified AddCellsAliasResponse message. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode + * @param {vtctldata.IAddCellsAliasResponse} message AddCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardRequest.encode = function encode(message, writer) { + AddCellsAliasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.ignore_replicas != null && message.ignore_replicas.length) - for (var i = 0; i < message.ignore_replicas.length; ++i) - $root.topodata.TabletAlias.encode(message.ignore_replicas[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.prevent_cross_cell_promotion != null && Object.hasOwnProperty.call(message, "prevent_cross_cell_promotion")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prevent_cross_cell_promotion); return writer; }; /** - * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. + * Encodes the specified AddCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.AddCellsAliasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode + * @param {vtctldata.IAddCellsAliasResponse} message AddCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + AddCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. + * Decodes an AddCellsAliasResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardRequest.decode = function decode(reader, length) { + AddCellsAliasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.AddCellsAliasResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.ignore_replicas && message.ignore_replicas.length)) - message.ignore_replicas = []; - message.ignore_replicas.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.prevent_cross_cell_promotion = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -91199,180 +92948,97 @@ $root.vtctldata = (function() { }; /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. + * Decodes an AddCellsAliasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { + AddCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EmergencyReparentShardRequest message. + * Verifies an AddCellsAliasResponse message. * @function verify - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EmergencyReparentShardRequest.verify = function verify(message) { + AddCellsAliasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.ignore_replicas != null && message.hasOwnProperty("ignore_replicas")) { - if (!Array.isArray(message.ignore_replicas)) - return "ignore_replicas: array expected"; - for (var i = 0; i < message.ignore_replicas.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.ignore_replicas[i]); - if (error) - return "ignore_replicas." + error; - } - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; - } - if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) - if (typeof message.prevent_cross_cell_promotion !== "boolean") - return "prevent_cross_cell_promotion: boolean expected"; return null; }; /** - * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AddCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest + * @returns {vtctldata.AddCellsAliasResponse} AddCellsAliasResponse */ - EmergencyReparentShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardRequest) + AddCellsAliasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.AddCellsAliasResponse) return object; - var message = new $root.vtctldata.EmergencyReparentShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.ignore_replicas) { - if (!Array.isArray(object.ignore_replicas)) - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: array expected"); - message.ignore_replicas = []; - for (var i = 0; i < object.ignore_replicas.length; ++i) { - if (typeof object.ignore_replicas[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: object expected"); - message.ignore_replicas[i] = $root.topodata.TabletAlias.fromObject(object.ignore_replicas[i]); - } - } - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); - } - if (object.prevent_cross_cell_promotion != null) - message.prevent_cross_cell_promotion = Boolean(object.prevent_cross_cell_promotion); - return message; + return new $root.vtctldata.AddCellsAliasResponse(); }; /** - * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. + * Creates a plain object from an AddCellsAliasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @static - * @param {vtctldata.EmergencyReparentShardRequest} message EmergencyReparentShardRequest + * @param {vtctldata.AddCellsAliasResponse} message AddCellsAliasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EmergencyReparentShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ignore_replicas = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.wait_replicas_timeout = null; - object.prevent_cross_cell_promotion = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.ignore_replicas && message.ignore_replicas.length) { - object.ignore_replicas = []; - for (var j = 0; j < message.ignore_replicas.length; ++j) - object.ignore_replicas[j] = $root.topodata.TabletAlias.toObject(message.ignore_replicas[j], options); - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) - object.prevent_cross_cell_promotion = message.prevent_cross_cell_promotion; - return object; + AddCellsAliasResponse.toObject = function toObject() { + return {}; }; /** - * Converts this EmergencyReparentShardRequest to JSON. + * Converts this AddCellsAliasResponse to JSON. * @function toJSON - * @memberof vtctldata.EmergencyReparentShardRequest + * @memberof vtctldata.AddCellsAliasResponse * @instance * @returns {Object.} JSON object */ - EmergencyReparentShardRequest.prototype.toJSON = function toJSON() { + AddCellsAliasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EmergencyReparentShardRequest; + return AddCellsAliasResponse; })(); - vtctldata.EmergencyReparentShardResponse = (function() { + vtctldata.ApplyRoutingRulesRequest = (function() { /** - * Properties of an EmergencyReparentShardResponse. + * Properties of an ApplyRoutingRulesRequest. * @memberof vtctldata - * @interface IEmergencyReparentShardResponse - * @property {string|null} [keyspace] EmergencyReparentShardResponse keyspace - * @property {string|null} [shard] EmergencyReparentShardResponse shard - * @property {topodata.ITabletAlias|null} [promoted_primary] EmergencyReparentShardResponse promoted_primary - * @property {Array.|null} [events] EmergencyReparentShardResponse events + * @interface IApplyRoutingRulesRequest + * @property {vschema.IRoutingRules|null} [routing_rules] ApplyRoutingRulesRequest routing_rules + * @property {boolean|null} [skip_rebuild] ApplyRoutingRulesRequest skip_rebuild + * @property {Array.|null} [rebuild_cells] ApplyRoutingRulesRequest rebuild_cells */ /** - * Constructs a new EmergencyReparentShardResponse. + * Constructs a new ApplyRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardResponse. - * @implements IEmergencyReparentShardResponse + * @classdesc Represents an ApplyRoutingRulesRequest. + * @implements IApplyRoutingRulesRequest * @constructor - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set + * @param {vtctldata.IApplyRoutingRulesRequest=} [properties] Properties to set */ - function EmergencyReparentShardResponse(properties) { - this.events = []; + function ApplyRoutingRulesRequest(properties) { + this.rebuild_cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91380,117 +93046,104 @@ $root.vtctldata = (function() { } /** - * EmergencyReparentShardResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.keyspace = ""; - - /** - * EmergencyReparentShardResponse shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardResponse + * ApplyRoutingRulesRequest routing_rules. + * @member {vschema.IRoutingRules|null|undefined} routing_rules + * @memberof vtctldata.ApplyRoutingRulesRequest * @instance */ - EmergencyReparentShardResponse.prototype.shard = ""; + ApplyRoutingRulesRequest.prototype.routing_rules = null; /** - * EmergencyReparentShardResponse promoted_primary. - * @member {topodata.ITabletAlias|null|undefined} promoted_primary - * @memberof vtctldata.EmergencyReparentShardResponse + * ApplyRoutingRulesRequest skip_rebuild. + * @member {boolean} skip_rebuild + * @memberof vtctldata.ApplyRoutingRulesRequest * @instance */ - EmergencyReparentShardResponse.prototype.promoted_primary = null; + ApplyRoutingRulesRequest.prototype.skip_rebuild = false; /** - * EmergencyReparentShardResponse events. - * @member {Array.} events - * @memberof vtctldata.EmergencyReparentShardResponse + * ApplyRoutingRulesRequest rebuild_cells. + * @member {Array.} rebuild_cells + * @memberof vtctldata.ApplyRoutingRulesRequest * @instance */ - EmergencyReparentShardResponse.prototype.events = $util.emptyArray; + ApplyRoutingRulesRequest.prototype.rebuild_cells = $util.emptyArray; /** - * Creates a new EmergencyReparentShardResponse instance using the specified properties. + * Creates a new ApplyRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse instance + * @param {vtctldata.IApplyRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest instance */ - EmergencyReparentShardResponse.create = function create(properties) { - return new EmergencyReparentShardResponse(properties); + ApplyRoutingRulesRequest.create = function create(properties) { + return new ApplyRoutingRulesRequest(properties); }; /** - * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * Encodes the specified ApplyRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode + * @param {vtctldata.IApplyRoutingRulesRequest} message ApplyRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardResponse.encode = function encode(message, writer) { + ApplyRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) - $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) + $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); + if (message.rebuild_cells != null && message.rebuild_cells.length) + for (var i = 0; i < message.rebuild_cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rebuild_cells[i]); return writer; }; /** - * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. + * Encodes the specified ApplyRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode + * @param {vtctldata.IApplyRoutingRulesRequest} message ApplyRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmergencyReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + ApplyRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. + * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardResponse.decode = function decode(reader, length) { + ApplyRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyRoutingRulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); break; case 2: - message.shard = reader.string(); + message.skip_rebuild = reader.bool(); break; case 3: - message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); + if (!(message.rebuild_cells && message.rebuild_cells.length)) + message.rebuild_cells = []; + message.rebuild_cells.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -91501,158 +93154,141 @@ $root.vtctldata = (function() { }; /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyRoutingRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmergencyReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { + ApplyRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EmergencyReparentShardResponse message. + * Verifies an ApplyRoutingRulesRequest message. * @function verify - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EmergencyReparentShardResponse.verify = function verify(message) { + ApplyRoutingRulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { - var error = $root.topodata.TabletAlias.verify(message.promoted_primary); + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { + var error = $root.vschema.RoutingRules.verify(message.routing_rules); if (error) - return "promoted_primary." + error; + return "routing_rules." + error; } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + if (typeof message.skip_rebuild !== "boolean") + return "skip_rebuild: boolean expected"; + if (message.rebuild_cells != null && message.hasOwnProperty("rebuild_cells")) { + if (!Array.isArray(message.rebuild_cells)) + return "rebuild_cells: array expected"; + for (var i = 0; i < message.rebuild_cells.length; ++i) + if (!$util.isString(message.rebuild_cells[i])) + return "rebuild_cells: string[] expected"; } return null; }; /** - * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse + * @returns {vtctldata.ApplyRoutingRulesRequest} ApplyRoutingRulesRequest */ - EmergencyReparentShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardResponse) + ApplyRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyRoutingRulesRequest) return object; - var message = new $root.vtctldata.EmergencyReparentShardResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.promoted_primary != null) { - if (typeof object.promoted_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.promoted_primary: object expected"); - message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); + var message = new $root.vtctldata.ApplyRoutingRulesRequest(); + if (object.routing_rules != null) { + if (typeof object.routing_rules !== "object") + throw TypeError(".vtctldata.ApplyRoutingRulesRequest.routing_rules: object expected"); + message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } + if (object.skip_rebuild != null) + message.skip_rebuild = Boolean(object.skip_rebuild); + if (object.rebuild_cells) { + if (!Array.isArray(object.rebuild_cells)) + throw TypeError(".vtctldata.ApplyRoutingRulesRequest.rebuild_cells: array expected"); + message.rebuild_cells = []; + for (var i = 0; i < object.rebuild_cells.length; ++i) + message.rebuild_cells[i] = String(object.rebuild_cells[i]); } return message; }; /** - * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. + * Creates a plain object from an ApplyRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @static - * @param {vtctldata.EmergencyReparentShardResponse} message EmergencyReparentShardResponse + * @param {vtctldata.ApplyRoutingRulesRequest} message ApplyRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EmergencyReparentShardResponse.toObject = function toObject(message, options) { + ApplyRoutingRulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.events = []; + object.rebuild_cells = []; if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.promoted_primary = null; + object.routing_rules = null; + object.skip_rebuild = false; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) - object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) + object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + object.skip_rebuild = message.skip_rebuild; + if (message.rebuild_cells && message.rebuild_cells.length) { + object.rebuild_cells = []; + for (var j = 0; j < message.rebuild_cells.length; ++j) + object.rebuild_cells[j] = message.rebuild_cells[j]; } return object; }; /** - * Converts this EmergencyReparentShardResponse to JSON. + * Converts this ApplyRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.EmergencyReparentShardResponse + * @memberof vtctldata.ApplyRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - EmergencyReparentShardResponse.prototype.toJSON = function toJSON() { + ApplyRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EmergencyReparentShardResponse; + return ApplyRoutingRulesRequest; })(); - vtctldata.ExecuteFetchAsAppRequest = (function() { + vtctldata.ApplyRoutingRulesResponse = (function() { /** - * Properties of an ExecuteFetchAsAppRequest. + * Properties of an ApplyRoutingRulesResponse. * @memberof vtctldata - * @interface IExecuteFetchAsAppRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsAppRequest tablet_alias - * @property {string|null} [query] ExecuteFetchAsAppRequest query - * @property {number|Long|null} [max_rows] ExecuteFetchAsAppRequest max_rows - * @property {boolean|null} [use_pool] ExecuteFetchAsAppRequest use_pool + * @interface IApplyRoutingRulesResponse */ /** - * Constructs a new ExecuteFetchAsAppRequest. + * Constructs a new ApplyRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsAppRequest. - * @implements IExecuteFetchAsAppRequest + * @classdesc Represents an ApplyRoutingRulesResponse. + * @implements IApplyRoutingRulesResponse * @constructor - * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set + * @param {vtctldata.IApplyRoutingRulesResponse=} [properties] Properties to set */ - function ExecuteFetchAsAppRequest(properties) { + function ApplyRoutingRulesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91660,115 +93296,63 @@ $root.vtctldata = (function() { } /** - * ExecuteFetchAsAppRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.tablet_alias = null; - - /** - * ExecuteFetchAsAppRequest query. - * @member {string} query - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.query = ""; - - /** - * ExecuteFetchAsAppRequest max_rows. - * @member {number|Long} max_rows - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteFetchAsAppRequest use_pool. - * @member {boolean} use_pool - * @memberof vtctldata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.use_pool = false; - - /** - * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. + * Creates a new ApplyRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest instance + * @param {vtctldata.IApplyRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse instance */ - ExecuteFetchAsAppRequest.create = function create(properties) { - return new ExecuteFetchAsAppRequest(properties); + ApplyRoutingRulesResponse.create = function create(properties) { + return new ApplyRoutingRulesResponse(properties); }; /** - * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * Encodes the specified ApplyRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode + * @param {vtctldata.IApplyRoutingRulesResponse} message ApplyRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppRequest.encode = function encode(message, writer) { + ApplyRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); - if (message.use_pool != null && Object.hasOwnProperty.call(message, "use_pool")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.use_pool); return writer; }; /** - * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. + * Encodes the specified ApplyRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode + * @param {vtctldata.IApplyRoutingRulesResponse} message ApplyRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppRequest.encodeDelimited = function encodeDelimited(message, writer) { + ApplyRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. + * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppRequest.decode = function decode(reader, length) { + ApplyRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyRoutingRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.query = reader.string(); - break; - case 3: - message.max_rows = reader.int64(); - break; - case 4: - message.use_pool = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -91778,151 +93362,97 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppRequest.decodeDelimited = function decodeDelimited(reader) { + ApplyRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsAppRequest message. + * Verifies an ApplyRoutingRulesResponse message. * @function verify - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsAppRequest.verify = function verify(message) { + ApplyRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.use_pool != null && message.hasOwnProperty("use_pool")) - if (typeof message.use_pool !== "boolean") - return "use_pool: boolean expected"; return null; }; /** - * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest + * @returns {vtctldata.ApplyRoutingRulesResponse} ApplyRoutingRulesResponse */ - ExecuteFetchAsAppRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsAppRequest) + ApplyRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyRoutingRulesResponse) return object; - var message = new $root.vtctldata.ExecuteFetchAsAppRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsAppRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.query != null) - message.query = String(object.query); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); - if (object.use_pool != null) - message.use_pool = Boolean(object.use_pool); - return message; + return new $root.vtctldata.ApplyRoutingRulesResponse(); }; /** - * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. + * Creates a plain object from an ApplyRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @static - * @param {vtctldata.ExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest + * @param {vtctldata.ApplyRoutingRulesResponse} message ApplyRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsAppRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.query = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.use_pool = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; - if (message.use_pool != null && message.hasOwnProperty("use_pool")) - object.use_pool = message.use_pool; - return object; + ApplyRoutingRulesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ExecuteFetchAsAppRequest to JSON. + * Converts this ApplyRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsAppRequest + * @memberof vtctldata.ApplyRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsAppRequest.prototype.toJSON = function toJSON() { + ApplyRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteFetchAsAppRequest; + return ApplyRoutingRulesResponse; })(); - vtctldata.ExecuteFetchAsAppResponse = (function() { + vtctldata.ApplyShardRoutingRulesRequest = (function() { /** - * Properties of an ExecuteFetchAsAppResponse. + * Properties of an ApplyShardRoutingRulesRequest. * @memberof vtctldata - * @interface IExecuteFetchAsAppResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsAppResponse result + * @interface IApplyShardRoutingRulesRequest + * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] ApplyShardRoutingRulesRequest shard_routing_rules + * @property {boolean|null} [skip_rebuild] ApplyShardRoutingRulesRequest skip_rebuild + * @property {Array.|null} [rebuild_cells] ApplyShardRoutingRulesRequest rebuild_cells */ /** - * Constructs a new ExecuteFetchAsAppResponse. + * Constructs a new ApplyShardRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsAppResponse. - * @implements IExecuteFetchAsAppResponse + * @classdesc Represents an ApplyShardRoutingRulesRequest. + * @implements IApplyShardRoutingRulesRequest * @constructor - * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set + * @param {vtctldata.IApplyShardRoutingRulesRequest=} [properties] Properties to set */ - function ExecuteFetchAsAppResponse(properties) { + function ApplyShardRoutingRulesRequest(properties) { + this.rebuild_cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91930,75 +93460,104 @@ $root.vtctldata = (function() { } /** - * ExecuteFetchAsAppResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof vtctldata.ExecuteFetchAsAppResponse + * ApplyShardRoutingRulesRequest shard_routing_rules. + * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @instance */ - ExecuteFetchAsAppResponse.prototype.result = null; + ApplyShardRoutingRulesRequest.prototype.shard_routing_rules = null; /** - * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. + * ApplyShardRoutingRulesRequest skip_rebuild. + * @member {boolean} skip_rebuild + * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @instance + */ + ApplyShardRoutingRulesRequest.prototype.skip_rebuild = false; + + /** + * ApplyShardRoutingRulesRequest rebuild_cells. + * @member {Array.} rebuild_cells + * @memberof vtctldata.ApplyShardRoutingRulesRequest + * @instance + */ + ApplyShardRoutingRulesRequest.prototype.rebuild_cells = $util.emptyArray; + + /** + * Creates a new ApplyShardRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static - * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse instance + * @param {vtctldata.IApplyShardRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest instance */ - ExecuteFetchAsAppResponse.create = function create(properties) { - return new ExecuteFetchAsAppResponse(properties); + ApplyShardRoutingRulesRequest.create = function create(properties) { + return new ApplyShardRoutingRulesRequest(properties); }; /** - * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * Encodes the specified ApplyShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static - * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode + * @param {vtctldata.IApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppResponse.encode = function encode(message, writer) { + ApplyShardRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) + $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); + if (message.rebuild_cells != null && message.rebuild_cells.length) + for (var i = 0; i < message.rebuild_cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rebuild_cells[i]); return writer; }; /** - * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. + * Encodes the specified ApplyShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static - * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode + * @param {vtctldata.IApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsAppResponse.encodeDelimited = function encodeDelimited(message, writer) { + ApplyShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. + * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppResponse.decode = function decode(reader, length) { + ApplyShardRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyShardRoutingRulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); + break; + case 2: + message.skip_rebuild = reader.bool(); + break; + case 3: + if (!(message.rebuild_cells && message.rebuild_cells.length)) + message.rebuild_cells = []; + message.rebuild_cells.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -92009,116 +93568,141 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyShardRoutingRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsAppResponse.decodeDelimited = function decodeDelimited(reader) { + ApplyShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsAppResponse message. + * Verifies an ApplyShardRoutingRulesRequest message. * @function verify - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsAppResponse.verify = function verify(message) { + ApplyShardRoutingRulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { + var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); if (error) - return "result." + error; + return "shard_routing_rules." + error; + } + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + if (typeof message.skip_rebuild !== "boolean") + return "skip_rebuild: boolean expected"; + if (message.rebuild_cells != null && message.hasOwnProperty("rebuild_cells")) { + if (!Array.isArray(message.rebuild_cells)) + return "rebuild_cells: array expected"; + for (var i = 0; i < message.rebuild_cells.length; ++i) + if (!$util.isString(message.rebuild_cells[i])) + return "rebuild_cells: string[] expected"; } return null; }; /** - * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse + * @returns {vtctldata.ApplyShardRoutingRulesRequest} ApplyShardRoutingRulesRequest */ - ExecuteFetchAsAppResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsAppResponse) + ApplyShardRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyShardRoutingRulesRequest) return object; - var message = new $root.vtctldata.ExecuteFetchAsAppResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsAppResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.vtctldata.ApplyShardRoutingRulesRequest(); + if (object.shard_routing_rules != null) { + if (typeof object.shard_routing_rules !== "object") + throw TypeError(".vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules: object expected"); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); + } + if (object.skip_rebuild != null) + message.skip_rebuild = Boolean(object.skip_rebuild); + if (object.rebuild_cells) { + if (!Array.isArray(object.rebuild_cells)) + throw TypeError(".vtctldata.ApplyShardRoutingRulesRequest.rebuild_cells: array expected"); + message.rebuild_cells = []; + for (var i = 0; i < object.rebuild_cells.length; ++i) + message.rebuild_cells[i] = String(object.rebuild_cells[i]); } return message; }; /** - * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. + * Creates a plain object from an ApplyShardRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @static - * @param {vtctldata.ExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse + * @param {vtctldata.ApplyShardRoutingRulesRequest} message ApplyShardRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsAppResponse.toObject = function toObject(message, options) { + ApplyShardRoutingRulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (options.arrays || options.defaults) + object.rebuild_cells = []; + if (options.defaults) { + object.shard_routing_rules = null; + object.skip_rebuild = false; + } + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) + object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + object.skip_rebuild = message.skip_rebuild; + if (message.rebuild_cells && message.rebuild_cells.length) { + object.rebuild_cells = []; + for (var j = 0; j < message.rebuild_cells.length; ++j) + object.rebuild_cells[j] = message.rebuild_cells[j]; + } return object; }; /** - * Converts this ExecuteFetchAsAppResponse to JSON. + * Converts this ApplyShardRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsAppResponse + * @memberof vtctldata.ApplyShardRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsAppResponse.prototype.toJSON = function toJSON() { + ApplyShardRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteFetchAsAppResponse; + return ApplyShardRoutingRulesRequest; })(); - vtctldata.ExecuteFetchAsDBARequest = (function() { + vtctldata.ApplyShardRoutingRulesResponse = (function() { /** - * Properties of an ExecuteFetchAsDBARequest. + * Properties of an ApplyShardRoutingRulesResponse. * @memberof vtctldata - * @interface IExecuteFetchAsDBARequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsDBARequest tablet_alias - * @property {string|null} [query] ExecuteFetchAsDBARequest query - * @property {number|Long|null} [max_rows] ExecuteFetchAsDBARequest max_rows - * @property {boolean|null} [disable_binlogs] ExecuteFetchAsDBARequest disable_binlogs - * @property {boolean|null} [reload_schema] ExecuteFetchAsDBARequest reload_schema + * @interface IApplyShardRoutingRulesResponse */ /** - * Constructs a new ExecuteFetchAsDBARequest. + * Constructs a new ApplyShardRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsDBARequest. - * @implements IExecuteFetchAsDBARequest + * @classdesc Represents an ApplyShardRoutingRulesResponse. + * @implements IApplyShardRoutingRulesResponse * @constructor - * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set + * @param {vtctldata.IApplyShardRoutingRulesResponse=} [properties] Properties to set */ - function ExecuteFetchAsDBARequest(properties) { + function ApplyShardRoutingRulesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92126,128 +93710,63 @@ $root.vtctldata = (function() { } /** - * ExecuteFetchAsDBARequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteFetchAsDBARequest - * @instance - */ - ExecuteFetchAsDBARequest.prototype.tablet_alias = null; - - /** - * ExecuteFetchAsDBARequest query. - * @member {string} query - * @memberof vtctldata.ExecuteFetchAsDBARequest - * @instance - */ - ExecuteFetchAsDBARequest.prototype.query = ""; - - /** - * ExecuteFetchAsDBARequest max_rows. - * @member {number|Long} max_rows - * @memberof vtctldata.ExecuteFetchAsDBARequest - * @instance - */ - ExecuteFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteFetchAsDBARequest disable_binlogs. - * @member {boolean} disable_binlogs - * @memberof vtctldata.ExecuteFetchAsDBARequest - * @instance - */ - ExecuteFetchAsDBARequest.prototype.disable_binlogs = false; - - /** - * ExecuteFetchAsDBARequest reload_schema. - * @member {boolean} reload_schema - * @memberof vtctldata.ExecuteFetchAsDBARequest - * @instance - */ - ExecuteFetchAsDBARequest.prototype.reload_schema = false; - - /** - * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. + * Creates a new ApplyShardRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest instance + * @param {vtctldata.IApplyShardRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse instance */ - ExecuteFetchAsDBARequest.create = function create(properties) { - return new ExecuteFetchAsDBARequest(properties); + ApplyShardRoutingRulesResponse.create = function create(properties) { + return new ApplyShardRoutingRulesResponse(properties); }; /** - * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * Encodes the specified ApplyShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBARequest.encode = function encode(message, writer) { + ApplyShardRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); - if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disable_binlogs); - if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reload_schema); return writer; }; /** - * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. + * Encodes the specified ApplyShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyShardRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static - * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode + * @param {vtctldata.IApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { + ApplyShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. + * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBARequest.decode = function decode(reader, length) { + ApplyShardRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBARequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyShardRoutingRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.query = reader.string(); - break; - case 3: - message.max_rows = reader.int64(); - break; - case 4: - message.disable_binlogs = reader.bool(); - break; - case 5: - message.reload_schema = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -92257,159 +93776,104 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyShardRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { + ApplyShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsDBARequest message. + * Verifies an ApplyShardRoutingRulesResponse message. * @function verify - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsDBARequest.verify = function verify(message) { + ApplyShardRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - if (typeof message.disable_binlogs !== "boolean") - return "disable_binlogs: boolean expected"; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - if (typeof message.reload_schema !== "boolean") - return "reload_schema: boolean expected"; return null; }; /** - * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest + * @returns {vtctldata.ApplyShardRoutingRulesResponse} ApplyShardRoutingRulesResponse */ - ExecuteFetchAsDBARequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsDBARequest) + ApplyShardRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyShardRoutingRulesResponse) return object; - var message = new $root.vtctldata.ExecuteFetchAsDBARequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsDBARequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.query != null) - message.query = String(object.query); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); - if (object.disable_binlogs != null) - message.disable_binlogs = Boolean(object.disable_binlogs); - if (object.reload_schema != null) - message.reload_schema = Boolean(object.reload_schema); - return message; + return new $root.vtctldata.ApplyShardRoutingRulesResponse(); }; /** - * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. + * Creates a plain object from an ApplyShardRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @static - * @param {vtctldata.ExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest + * @param {vtctldata.ApplyShardRoutingRulesResponse} message ApplyShardRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsDBARequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.query = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.disable_binlogs = false; - object.reload_schema = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - object.disable_binlogs = message.disable_binlogs; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - object.reload_schema = message.reload_schema; - return object; + ApplyShardRoutingRulesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ExecuteFetchAsDBARequest to JSON. + * Converts this ApplyShardRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsDBARequest + * @memberof vtctldata.ApplyShardRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsDBARequest.prototype.toJSON = function toJSON() { + ApplyShardRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteFetchAsDBARequest; + return ApplyShardRoutingRulesResponse; })(); - vtctldata.ExecuteFetchAsDBAResponse = (function() { + vtctldata.ApplySchemaRequest = (function() { /** - * Properties of an ExecuteFetchAsDBAResponse. + * Properties of an ApplySchemaRequest. * @memberof vtctldata - * @interface IExecuteFetchAsDBAResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsDBAResponse result + * @interface IApplySchemaRequest + * @property {string|null} [keyspace] ApplySchemaRequest keyspace + * @property {boolean|null} [allow_long_unavailability] ApplySchemaRequest allow_long_unavailability + * @property {Array.|null} [sql] ApplySchemaRequest sql + * @property {string|null} [ddl_strategy] ApplySchemaRequest ddl_strategy + * @property {Array.|null} [uuid_list] ApplySchemaRequest uuid_list + * @property {string|null} [migration_context] ApplySchemaRequest migration_context + * @property {vttime.IDuration|null} [wait_replicas_timeout] ApplySchemaRequest wait_replicas_timeout + * @property {boolean|null} [skip_preflight] ApplySchemaRequest skip_preflight + * @property {vtrpc.ICallerID|null} [caller_id] ApplySchemaRequest caller_id */ /** - * Constructs a new ExecuteFetchAsDBAResponse. + * Constructs a new ApplySchemaRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteFetchAsDBAResponse. - * @implements IExecuteFetchAsDBAResponse + * @classdesc Represents an ApplySchemaRequest. + * @implements IApplySchemaRequest * @constructor - * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set + * @param {vtctldata.IApplySchemaRequest=} [properties] Properties to set */ - function ExecuteFetchAsDBAResponse(properties) { + function ApplySchemaRequest(properties) { + this.sql = []; + this.uuid_list = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92417,75 +93881,185 @@ $root.vtctldata = (function() { } /** - * ExecuteFetchAsDBAResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * ApplySchemaRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ApplySchemaRequest * @instance */ - ExecuteFetchAsDBAResponse.prototype.result = null; + ApplySchemaRequest.prototype.keyspace = ""; /** - * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. + * ApplySchemaRequest allow_long_unavailability. + * @member {boolean} allow_long_unavailability + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.allow_long_unavailability = false; + + /** + * ApplySchemaRequest sql. + * @member {Array.} sql + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.sql = $util.emptyArray; + + /** + * ApplySchemaRequest ddl_strategy. + * @member {string} ddl_strategy + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.ddl_strategy = ""; + + /** + * ApplySchemaRequest uuid_list. + * @member {Array.} uuid_list + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.uuid_list = $util.emptyArray; + + /** + * ApplySchemaRequest migration_context. + * @member {string} migration_context + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.migration_context = ""; + + /** + * ApplySchemaRequest wait_replicas_timeout. + * @member {vttime.IDuration|null|undefined} wait_replicas_timeout + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.wait_replicas_timeout = null; + + /** + * ApplySchemaRequest skip_preflight. + * @member {boolean} skip_preflight + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.skip_preflight = false; + + /** + * ApplySchemaRequest caller_id. + * @member {vtrpc.ICallerID|null|undefined} caller_id + * @memberof vtctldata.ApplySchemaRequest + * @instance + */ + ApplySchemaRequest.prototype.caller_id = null; + + /** + * Creates a new ApplySchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse instance + * @param {vtctldata.IApplySchemaRequest=} [properties] Properties to set + * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest instance */ - ExecuteFetchAsDBAResponse.create = function create(properties) { - return new ExecuteFetchAsDBAResponse(properties); + ApplySchemaRequest.create = function create(properties) { + return new ApplySchemaRequest(properties); }; /** - * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBAResponse.encode = function encode(message, writer) { + ApplySchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.allow_long_unavailability != null && Object.hasOwnProperty.call(message, "allow_long_unavailability")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_long_unavailability); + if (message.sql != null && message.sql.length) + for (var i = 0; i < message.sql.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sql[i]); + if (message.ddl_strategy != null && Object.hasOwnProperty.call(message, "ddl_strategy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ddl_strategy); + if (message.uuid_list != null && message.uuid_list.length) + for (var i = 0; i < message.uuid_list.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.uuid_list[i]); + if (message.migration_context != null && Object.hasOwnProperty.call(message, "migration_context")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.migration_context); + if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) + $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.skip_preflight != null && Object.hasOwnProperty.call(message, "skip_preflight")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.skip_preflight); + if (message.caller_id != null && Object.hasOwnProperty.call(message, "caller_id")) + $root.vtrpc.CallerID.encode(message.caller_id, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. + * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static - * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode + * @param {vtctldata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { + ApplySchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. + * Decodes an ApplySchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBAResponse.decode = function decode(reader, length) { + ApplySchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplySchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.allow_long_unavailability = reader.bool(); + break; + case 3: + if (!(message.sql && message.sql.length)) + message.sql = []; + message.sql.push(reader.string()); + break; + case 4: + message.ddl_strategy = reader.string(); + break; + case 5: + if (!(message.uuid_list && message.uuid_list.length)) + message.uuid_list = []; + message.uuid_list.push(reader.string()); + break; + case 6: + message.migration_context = reader.string(); + break; + case 7: + message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); + break; + case 8: + message.skip_preflight = reader.bool(); + break; + case 9: + message.caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -92496,113 +94070,209 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { + ApplySchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteFetchAsDBAResponse message. + * Verifies an ApplySchemaRequest message. * @function verify - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteFetchAsDBAResponse.verify = function verify(message) { + ApplySchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.allow_long_unavailability != null && message.hasOwnProperty("allow_long_unavailability")) + if (typeof message.allow_long_unavailability !== "boolean") + return "allow_long_unavailability: boolean expected"; + if (message.sql != null && message.hasOwnProperty("sql")) { + if (!Array.isArray(message.sql)) + return "sql: array expected"; + for (var i = 0; i < message.sql.length; ++i) + if (!$util.isString(message.sql[i])) + return "sql: string[] expected"; + } + if (message.ddl_strategy != null && message.hasOwnProperty("ddl_strategy")) + if (!$util.isString(message.ddl_strategy)) + return "ddl_strategy: string expected"; + if (message.uuid_list != null && message.hasOwnProperty("uuid_list")) { + if (!Array.isArray(message.uuid_list)) + return "uuid_list: array expected"; + for (var i = 0; i < message.uuid_list.length; ++i) + if (!$util.isString(message.uuid_list[i])) + return "uuid_list: string[] expected"; + } + if (message.migration_context != null && message.hasOwnProperty("migration_context")) + if (!$util.isString(message.migration_context)) + return "migration_context: string expected"; + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { + var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); if (error) - return "result." + error; + return "wait_replicas_timeout." + error; + } + if (message.skip_preflight != null && message.hasOwnProperty("skip_preflight")) + if (typeof message.skip_preflight !== "boolean") + return "skip_preflight: boolean expected"; + if (message.caller_id != null && message.hasOwnProperty("caller_id")) { + var error = $root.vtrpc.CallerID.verify(message.caller_id); + if (error) + return "caller_id." + error; } return null; }; /** - * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse + * @returns {vtctldata.ApplySchemaRequest} ApplySchemaRequest */ - ExecuteFetchAsDBAResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteFetchAsDBAResponse) + ApplySchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplySchemaRequest) return object; - var message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".vtctldata.ExecuteFetchAsDBAResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); + var message = new $root.vtctldata.ApplySchemaRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.allow_long_unavailability != null) + message.allow_long_unavailability = Boolean(object.allow_long_unavailability); + if (object.sql) { + if (!Array.isArray(object.sql)) + throw TypeError(".vtctldata.ApplySchemaRequest.sql: array expected"); + message.sql = []; + for (var i = 0; i < object.sql.length; ++i) + message.sql[i] = String(object.sql[i]); + } + if (object.ddl_strategy != null) + message.ddl_strategy = String(object.ddl_strategy); + if (object.uuid_list) { + if (!Array.isArray(object.uuid_list)) + throw TypeError(".vtctldata.ApplySchemaRequest.uuid_list: array expected"); + message.uuid_list = []; + for (var i = 0; i < object.uuid_list.length; ++i) + message.uuid_list[i] = String(object.uuid_list[i]); + } + if (object.migration_context != null) + message.migration_context = String(object.migration_context); + if (object.wait_replicas_timeout != null) { + if (typeof object.wait_replicas_timeout !== "object") + throw TypeError(".vtctldata.ApplySchemaRequest.wait_replicas_timeout: object expected"); + message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + } + if (object.skip_preflight != null) + message.skip_preflight = Boolean(object.skip_preflight); + if (object.caller_id != null) { + if (typeof object.caller_id !== "object") + throw TypeError(".vtctldata.ApplySchemaRequest.caller_id: object expected"); + message.caller_id = $root.vtrpc.CallerID.fromObject(object.caller_id); } return message; }; /** - * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. + * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @static - * @param {vtctldata.ExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse + * @param {vtctldata.ApplySchemaRequest} message ApplySchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteFetchAsDBAResponse.toObject = function toObject(message, options) { + ApplySchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); + if (options.arrays || options.defaults) { + object.sql = []; + object.uuid_list = []; + } + if (options.defaults) { + object.keyspace = ""; + object.allow_long_unavailability = false; + object.ddl_strategy = ""; + object.migration_context = ""; + object.wait_replicas_timeout = null; + object.skip_preflight = false; + object.caller_id = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.allow_long_unavailability != null && message.hasOwnProperty("allow_long_unavailability")) + object.allow_long_unavailability = message.allow_long_unavailability; + if (message.sql && message.sql.length) { + object.sql = []; + for (var j = 0; j < message.sql.length; ++j) + object.sql[j] = message.sql[j]; + } + if (message.ddl_strategy != null && message.hasOwnProperty("ddl_strategy")) + object.ddl_strategy = message.ddl_strategy; + if (message.uuid_list && message.uuid_list.length) { + object.uuid_list = []; + for (var j = 0; j < message.uuid_list.length; ++j) + object.uuid_list[j] = message.uuid_list[j]; + } + if (message.migration_context != null && message.hasOwnProperty("migration_context")) + object.migration_context = message.migration_context; + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) + object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); + if (message.skip_preflight != null && message.hasOwnProperty("skip_preflight")) + object.skip_preflight = message.skip_preflight; + if (message.caller_id != null && message.hasOwnProperty("caller_id")) + object.caller_id = $root.vtrpc.CallerID.toObject(message.caller_id, options); return object; }; /** - * Converts this ExecuteFetchAsDBAResponse to JSON. + * Converts this ApplySchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteFetchAsDBAResponse + * @memberof vtctldata.ApplySchemaRequest * @instance * @returns {Object.} JSON object */ - ExecuteFetchAsDBAResponse.prototype.toJSON = function toJSON() { + ApplySchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteFetchAsDBAResponse; + return ApplySchemaRequest; })(); - vtctldata.ExecuteHookRequest = (function() { + vtctldata.ApplySchemaResponse = (function() { /** - * Properties of an ExecuteHookRequest. + * Properties of an ApplySchemaResponse. * @memberof vtctldata - * @interface IExecuteHookRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteHookRequest tablet_alias - * @property {tabletmanagerdata.IExecuteHookRequest|null} [tablet_hook_request] ExecuteHookRequest tablet_hook_request + * @interface IApplySchemaResponse + * @property {Array.|null} [uuid_list] ApplySchemaResponse uuid_list */ /** - * Constructs a new ExecuteHookRequest. + * Constructs a new ApplySchemaResponse. * @memberof vtctldata - * @classdesc Represents an ExecuteHookRequest. - * @implements IExecuteHookRequest + * @classdesc Represents an ApplySchemaResponse. + * @implements IApplySchemaResponse * @constructor - * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set + * @param {vtctldata.IApplySchemaResponse=} [properties] Properties to set */ - function ExecuteHookRequest(properties) { + function ApplySchemaResponse(properties) { + this.uuid_list = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92610,88 +94280,78 @@ $root.vtctldata = (function() { } /** - * ExecuteHookRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ExecuteHookRequest - * @instance - */ - ExecuteHookRequest.prototype.tablet_alias = null; - - /** - * ExecuteHookRequest tablet_hook_request. - * @member {tabletmanagerdata.IExecuteHookRequest|null|undefined} tablet_hook_request - * @memberof vtctldata.ExecuteHookRequest + * ApplySchemaResponse uuid_list. + * @member {Array.} uuid_list + * @memberof vtctldata.ApplySchemaResponse * @instance */ - ExecuteHookRequest.prototype.tablet_hook_request = null; + ApplySchemaResponse.prototype.uuid_list = $util.emptyArray; /** - * Creates a new ExecuteHookRequest instance using the specified properties. + * Creates a new ApplySchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static - * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest instance + * @param {vtctldata.IApplySchemaResponse=} [properties] Properties to set + * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse instance */ - ExecuteHookRequest.create = function create(properties) { - return new ExecuteHookRequest(properties); + ApplySchemaResponse.create = function create(properties) { + return new ApplySchemaResponse(properties); }; /** - * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static - * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode + * @param {vtctldata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookRequest.encode = function encode(message, writer) { + ApplySchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tablet_hook_request != null && Object.hasOwnProperty.call(message, "tablet_hook_request")) - $root.tabletmanagerdata.ExecuteHookRequest.encode(message.tablet_hook_request, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uuid_list != null && message.uuid_list.length) + for (var i = 0; i < message.uuid_list.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid_list[i]); return writer; }; /** - * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. + * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplySchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static - * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode + * @param {vtctldata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookRequest.encodeDelimited = function encodeDelimited(message, writer) { + ApplySchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer. + * Decodes an ApplySchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookRequest.decode = function decode(reader, length) { + ApplySchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplySchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.decode(reader, reader.uint32()); + if (!(message.uuid_list && message.uuid_list.length)) + message.uuid_list = []; + message.uuid_list.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -92702,126 +94362,125 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookRequest.decodeDelimited = function decodeDelimited(reader) { + ApplySchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteHookRequest message. + * Verifies an ApplySchemaResponse message. * @function verify - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteHookRequest.verify = function verify(message) { + ApplySchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) { - var error = $root.tabletmanagerdata.ExecuteHookRequest.verify(message.tablet_hook_request); - if (error) - return "tablet_hook_request." + error; + if (message.uuid_list != null && message.hasOwnProperty("uuid_list")) { + if (!Array.isArray(message.uuid_list)) + return "uuid_list: array expected"; + for (var i = 0; i < message.uuid_list.length; ++i) + if (!$util.isString(message.uuid_list[i])) + return "uuid_list: string[] expected"; } return null; }; /** - * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest + * @returns {vtctldata.ApplySchemaResponse} ApplySchemaResponse */ - ExecuteHookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteHookRequest) + ApplySchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplySchemaResponse) return object; - var message = new $root.vtctldata.ExecuteHookRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ExecuteHookRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.tablet_hook_request != null) { - if (typeof object.tablet_hook_request !== "object") - throw TypeError(".vtctldata.ExecuteHookRequest.tablet_hook_request: object expected"); - message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.fromObject(object.tablet_hook_request); + var message = new $root.vtctldata.ApplySchemaResponse(); + if (object.uuid_list) { + if (!Array.isArray(object.uuid_list)) + throw TypeError(".vtctldata.ApplySchemaResponse.uuid_list: array expected"); + message.uuid_list = []; + for (var i = 0; i < object.uuid_list.length; ++i) + message.uuid_list[i] = String(object.uuid_list[i]); } return message; }; /** - * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. + * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @static - * @param {vtctldata.ExecuteHookRequest} message ExecuteHookRequest + * @param {vtctldata.ApplySchemaResponse} message ApplySchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteHookRequest.toObject = function toObject(message, options) { + ApplySchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.tablet_hook_request = null; + if (options.arrays || options.defaults) + object.uuid_list = []; + if (message.uuid_list && message.uuid_list.length) { + object.uuid_list = []; + for (var j = 0; j < message.uuid_list.length; ++j) + object.uuid_list[j] = message.uuid_list[j]; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) - object.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.toObject(message.tablet_hook_request, options); return object; }; /** - * Converts this ExecuteHookRequest to JSON. + * Converts this ApplySchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.ExecuteHookRequest + * @memberof vtctldata.ApplySchemaResponse * @instance * @returns {Object.} JSON object */ - ExecuteHookRequest.prototype.toJSON = function toJSON() { + ApplySchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteHookRequest; + return ApplySchemaResponse; })(); - vtctldata.ExecuteHookResponse = (function() { + vtctldata.ApplyVSchemaRequest = (function() { /** - * Properties of an ExecuteHookResponse. + * Properties of an ApplyVSchemaRequest. * @memberof vtctldata - * @interface IExecuteHookResponse - * @property {tabletmanagerdata.IExecuteHookResponse|null} [hook_result] ExecuteHookResponse hook_result + * @interface IApplyVSchemaRequest + * @property {string|null} [keyspace] ApplyVSchemaRequest keyspace + * @property {boolean|null} [skip_rebuild] ApplyVSchemaRequest skip_rebuild + * @property {boolean|null} [dry_run] ApplyVSchemaRequest dry_run + * @property {Array.|null} [cells] ApplyVSchemaRequest cells + * @property {vschema.IKeyspace|null} [v_schema] ApplyVSchemaRequest v_schema + * @property {string|null} [sql] ApplyVSchemaRequest sql */ /** - * Constructs a new ExecuteHookResponse. + * Constructs a new ApplyVSchemaRequest. * @memberof vtctldata - * @classdesc Represents an ExecuteHookResponse. - * @implements IExecuteHookResponse + * @classdesc Represents an ApplyVSchemaRequest. + * @implements IApplyVSchemaRequest * @constructor - * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set + * @param {vtctldata.IApplyVSchemaRequest=} [properties] Properties to set */ - function ExecuteHookResponse(properties) { + function ApplyVSchemaRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92829,75 +94488,143 @@ $root.vtctldata = (function() { } /** - * ExecuteHookResponse hook_result. - * @member {tabletmanagerdata.IExecuteHookResponse|null|undefined} hook_result - * @memberof vtctldata.ExecuteHookResponse + * ApplyVSchemaRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ApplyVSchemaRequest * @instance */ - ExecuteHookResponse.prototype.hook_result = null; + ApplyVSchemaRequest.prototype.keyspace = ""; /** - * Creates a new ExecuteHookResponse instance using the specified properties. + * ApplyVSchemaRequest skip_rebuild. + * @member {boolean} skip_rebuild + * @memberof vtctldata.ApplyVSchemaRequest + * @instance + */ + ApplyVSchemaRequest.prototype.skip_rebuild = false; + + /** + * ApplyVSchemaRequest dry_run. + * @member {boolean} dry_run + * @memberof vtctldata.ApplyVSchemaRequest + * @instance + */ + ApplyVSchemaRequest.prototype.dry_run = false; + + /** + * ApplyVSchemaRequest cells. + * @member {Array.} cells + * @memberof vtctldata.ApplyVSchemaRequest + * @instance + */ + ApplyVSchemaRequest.prototype.cells = $util.emptyArray; + + /** + * ApplyVSchemaRequest v_schema. + * @member {vschema.IKeyspace|null|undefined} v_schema + * @memberof vtctldata.ApplyVSchemaRequest + * @instance + */ + ApplyVSchemaRequest.prototype.v_schema = null; + + /** + * ApplyVSchemaRequest sql. + * @member {string} sql + * @memberof vtctldata.ApplyVSchemaRequest + * @instance + */ + ApplyVSchemaRequest.prototype.sql = ""; + + /** + * Creates a new ApplyVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static - * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse instance + * @param {vtctldata.IApplyVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest instance */ - ExecuteHookResponse.create = function create(properties) { - return new ExecuteHookResponse(properties); + ApplyVSchemaRequest.create = function create(properties) { + return new ApplyVSchemaRequest(properties); }; /** - * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * Encodes the specified ApplyVSchemaRequest message. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static - * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode + * @param {vtctldata.IApplyVSchemaRequest} message ApplyVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookResponse.encode = function encode(message, writer) { + ApplyVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hook_result != null && Object.hasOwnProperty.call(message, "hook_result")) - $root.tabletmanagerdata.ExecuteHookResponse.encode(message.hook_result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.skip_rebuild != null && Object.hasOwnProperty.call(message, "skip_rebuild")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skip_rebuild); + if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dry_run); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cells[i]); + if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) + $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sql); return writer; }; /** - * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. + * Encodes the specified ApplyVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static - * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode + * @param {vtctldata.IApplyVSchemaRequest} message ApplyVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteHookResponse.encodeDelimited = function encodeDelimited(message, writer) { + ApplyVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer. + * Decodes an ApplyVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookResponse.decode = function decode(reader, length) { + ApplyVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyVSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.skip_rebuild = reader.bool(); + break; + case 3: + message.dry_run = reader.bool(); + break; + case 4: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 5: + message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); + break; + case 6: + message.sql = reader.string(); break; default: reader.skipType(tag & 7); @@ -92908,112 +94635,166 @@ $root.vtctldata = (function() { }; /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. + * Decodes an ApplyVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecuteHookResponse.decodeDelimited = function decodeDelimited(reader) { + ApplyVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecuteHookResponse message. + * Verifies an ApplyVSchemaRequest message. * @function verify - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecuteHookResponse.verify = function verify(message) { + ApplyVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hook_result != null && message.hasOwnProperty("hook_result")) { - var error = $root.tabletmanagerdata.ExecuteHookResponse.verify(message.hook_result); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + if (typeof message.skip_rebuild !== "boolean") + return "skip_rebuild: boolean expected"; + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + if (typeof message.dry_run !== "boolean") + return "dry_run: boolean expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.v_schema != null && message.hasOwnProperty("v_schema")) { + var error = $root.vschema.Keyspace.verify(message.v_schema); if (error) - return "hook_result." + error; + return "v_schema." + error; } + if (message.sql != null && message.hasOwnProperty("sql")) + if (!$util.isString(message.sql)) + return "sql: string expected"; return null; }; /** - * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse + * @returns {vtctldata.ApplyVSchemaRequest} ApplyVSchemaRequest */ - ExecuteHookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteHookResponse) + ApplyVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyVSchemaRequest) return object; - var message = new $root.vtctldata.ExecuteHookResponse(); - if (object.hook_result != null) { - if (typeof object.hook_result !== "object") - throw TypeError(".vtctldata.ExecuteHookResponse.hook_result: object expected"); - message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.fromObject(object.hook_result); + var message = new $root.vtctldata.ApplyVSchemaRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.skip_rebuild != null) + message.skip_rebuild = Boolean(object.skip_rebuild); + if (object.dry_run != null) + message.dry_run = Boolean(object.dry_run); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.ApplyVSchemaRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.v_schema != null) { + if (typeof object.v_schema !== "object") + throw TypeError(".vtctldata.ApplyVSchemaRequest.v_schema: object expected"); + message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); } + if (object.sql != null) + message.sql = String(object.sql); return message; }; /** - * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. + * Creates a plain object from an ApplyVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @static - * @param {vtctldata.ExecuteHookResponse} message ExecuteHookResponse + * @param {vtctldata.ApplyVSchemaRequest} message ApplyVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteHookResponse.toObject = function toObject(message, options) { + ApplyVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.hook_result = null; - if (message.hook_result != null && message.hasOwnProperty("hook_result")) - object.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.toObject(message.hook_result, options); + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) { + object.keyspace = ""; + object.skip_rebuild = false; + object.dry_run = false; + object.v_schema = null; + object.sql = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.skip_rebuild != null && message.hasOwnProperty("skip_rebuild")) + object.skip_rebuild = message.skip_rebuild; + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + object.dry_run = message.dry_run; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.v_schema != null && message.hasOwnProperty("v_schema")) + object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = message.sql; return object; }; /** - * Converts this ExecuteHookResponse to JSON. + * Converts this ApplyVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.ExecuteHookResponse + * @memberof vtctldata.ApplyVSchemaRequest * @instance * @returns {Object.} JSON object */ - ExecuteHookResponse.prototype.toJSON = function toJSON() { + ApplyVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecuteHookResponse; + return ApplyVSchemaRequest; })(); - vtctldata.FindAllShardsInKeyspaceRequest = (function() { + vtctldata.ApplyVSchemaResponse = (function() { /** - * Properties of a FindAllShardsInKeyspaceRequest. + * Properties of an ApplyVSchemaResponse. * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceRequest - * @property {string|null} [keyspace] FindAllShardsInKeyspaceRequest keyspace + * @interface IApplyVSchemaResponse + * @property {vschema.IKeyspace|null} [v_schema] ApplyVSchemaResponse v_schema */ /** - * Constructs a new FindAllShardsInKeyspaceRequest. + * Constructs a new ApplyVSchemaResponse. * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceRequest. - * @implements IFindAllShardsInKeyspaceRequest + * @classdesc Represents an ApplyVSchemaResponse. + * @implements IApplyVSchemaResponse * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IApplyVSchemaResponse=} [properties] Properties to set */ - function FindAllShardsInKeyspaceRequest(properties) { + function ApplyVSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93021,75 +94802,75 @@ $root.vtctldata = (function() { } /** - * FindAllShardsInKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * ApplyVSchemaResponse v_schema. + * @member {vschema.IKeyspace|null|undefined} v_schema + * @memberof vtctldata.ApplyVSchemaResponse * @instance */ - FindAllShardsInKeyspaceRequest.prototype.keyspace = ""; + ApplyVSchemaResponse.prototype.v_schema = null; /** - * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. + * Creates a new ApplyVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest instance + * @param {vtctldata.IApplyVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse instance */ - FindAllShardsInKeyspaceRequest.create = function create(properties) { - return new FindAllShardsInKeyspaceRequest(properties); + ApplyVSchemaResponse.create = function create(properties) { + return new ApplyVSchemaResponse(properties); }; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * Encodes the specified ApplyVSchemaResponse message. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode + * @param {vtctldata.IApplyVSchemaResponse} message ApplyVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceRequest.encode = function encode(message, writer) { + ApplyVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) + $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. + * Encodes the specified ApplyVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ApplyVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode + * @param {vtctldata.IApplyVSchemaResponse} message ApplyVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ApplyVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. + * Decodes an ApplyVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceRequest.decode = function decode(reader, length) { + ApplyVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ApplyVSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -93100,108 +94881,115 @@ $root.vtctldata = (function() { }; /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes an ApplyVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + ApplyVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FindAllShardsInKeyspaceRequest message. + * Verifies an ApplyVSchemaResponse message. * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FindAllShardsInKeyspaceRequest.verify = function verify(message) { + ApplyVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; + if (message.v_schema != null && message.hasOwnProperty("v_schema")) { + var error = $root.vschema.Keyspace.verify(message.v_schema); + if (error) + return "v_schema." + error; + } return null; }; /** - * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ApplyVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @returns {vtctldata.ApplyVSchemaResponse} ApplyVSchemaResponse */ - FindAllShardsInKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceRequest) + ApplyVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ApplyVSchemaResponse) return object; - var message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); + var message = new $root.vtctldata.ApplyVSchemaResponse(); + if (object.v_schema != null) { + if (typeof object.v_schema !== "object") + throw TypeError(".vtctldata.ApplyVSchemaResponse.v_schema: object expected"); + message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); + } return message; }; /** - * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from an ApplyVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @static - * @param {vtctldata.FindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest + * @param {vtctldata.ApplyVSchemaResponse} message ApplyVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FindAllShardsInKeyspaceRequest.toObject = function toObject(message, options) { + ApplyVSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + object.v_schema = null; + if (message.v_schema != null && message.hasOwnProperty("v_schema")) + object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); return object; }; /** - * Converts this FindAllShardsInKeyspaceRequest to JSON. + * Converts this ApplyVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @memberof vtctldata.ApplyVSchemaResponse * @instance * @returns {Object.} JSON object */ - FindAllShardsInKeyspaceRequest.prototype.toJSON = function toJSON() { + ApplyVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FindAllShardsInKeyspaceRequest; + return ApplyVSchemaResponse; })(); - vtctldata.FindAllShardsInKeyspaceResponse = (function() { + vtctldata.BackupRequest = (function() { /** - * Properties of a FindAllShardsInKeyspaceResponse. + * Properties of a BackupRequest. * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceResponse - * @property {Object.|null} [shards] FindAllShardsInKeyspaceResponse shards + * @interface IBackupRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] BackupRequest tablet_alias + * @property {boolean|null} [allow_primary] BackupRequest allow_primary + * @property {number|Long|null} [concurrency] BackupRequest concurrency + * @property {string|null} [incremental_from_pos] BackupRequest incremental_from_pos */ /** - * Constructs a new FindAllShardsInKeyspaceResponse. + * Constructs a new BackupRequest. * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceResponse. - * @implements IFindAllShardsInKeyspaceResponse + * @classdesc Represents a BackupRequest. + * @implements IBackupRequest * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IBackupRequest=} [properties] Properties to set */ - function FindAllShardsInKeyspaceResponse(properties) { - this.shards = {}; + function BackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93209,97 +94997,114 @@ $root.vtctldata = (function() { } /** - * FindAllShardsInKeyspaceResponse shards. - * @member {Object.} shards - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * BackupRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.BackupRequest * @instance */ - FindAllShardsInKeyspaceResponse.prototype.shards = $util.emptyObject; + BackupRequest.prototype.tablet_alias = null; /** - * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. + * BackupRequest allow_primary. + * @member {boolean} allow_primary + * @memberof vtctldata.BackupRequest + * @instance + */ + BackupRequest.prototype.allow_primary = false; + + /** + * BackupRequest concurrency. + * @member {number|Long} concurrency + * @memberof vtctldata.BackupRequest + * @instance + */ + BackupRequest.prototype.concurrency = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BackupRequest incremental_from_pos. + * @member {string} incremental_from_pos + * @memberof vtctldata.BackupRequest + * @instance + */ + BackupRequest.prototype.incremental_from_pos = ""; + + /** + * Creates a new BackupRequest instance using the specified properties. * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse instance + * @param {vtctldata.IBackupRequest=} [properties] Properties to set + * @returns {vtctldata.BackupRequest} BackupRequest instance */ - FindAllShardsInKeyspaceResponse.create = function create(properties) { - return new FindAllShardsInKeyspaceResponse(properties); + BackupRequest.create = function create(properties) { + return new BackupRequest(properties); }; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * Encodes the specified BackupRequest message. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode + * @param {vtctldata.IBackupRequest} message BackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceResponse.encode = function encode(message, writer) { + BackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shards != null && Object.hasOwnProperty.call(message, "shards")) - for (var keys = Object.keys(message.shards), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.Shard.encode(message.shards[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); + if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.concurrency); + if (message.incremental_from_pos != null && Object.hasOwnProperty.call(message, "incremental_from_pos")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.incremental_from_pos); return writer; }; /** - * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. + * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link vtctldata.BackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode + * @param {vtctldata.IBackupRequest} message BackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindAllShardsInKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + BackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. + * Decodes a BackupRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.BackupRequest} BackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceResponse.decode = function decode(reader, length) { + BackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.shards === $util.emptyObject) - message.shards = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shards[key] = value; + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.allow_primary = reader.bool(); + break; + case 3: + message.concurrency = reader.uint64(); + break; + case 4: + message.incremental_from_pos = reader.string(); break; default: reader.skipType(tag & 7); @@ -93310,130 +95115,154 @@ $root.vtctldata = (function() { }; /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a BackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.BackupRequest} BackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindAllShardsInKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + BackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FindAllShardsInKeyspaceResponse message. + * Verifies a BackupRequest message. * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FindAllShardsInKeyspaceResponse.verify = function verify(message) { + BackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!$util.isObject(message.shards)) - return "shards: object expected"; - var key = Object.keys(message.shards); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.Shard.verify(message.shards[key[i]]); - if (error) - return "shards." + error; - } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + if (typeof message.allow_primary !== "boolean") + return "allow_primary: boolean expected"; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (!$util.isInteger(message.concurrency) && !(message.concurrency && $util.isInteger(message.concurrency.low) && $util.isInteger(message.concurrency.high))) + return "concurrency: integer|Long expected"; + if (message.incremental_from_pos != null && message.hasOwnProperty("incremental_from_pos")) + if (!$util.isString(message.incremental_from_pos)) + return "incremental_from_pos: string expected"; return null; }; /** - * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse + * @returns {vtctldata.BackupRequest} BackupRequest */ - FindAllShardsInKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceResponse) + BackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.BackupRequest) return object; - var message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(); - if (object.shards) { - if (typeof object.shards !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards = {}; - for (var keys = Object.keys(object.shards), i = 0; i < keys.length; ++i) { - if (typeof object.shards[keys[i]] !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards[keys[i]] = $root.vtctldata.Shard.fromObject(object.shards[keys[i]]); - } + var message = new $root.vtctldata.BackupRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.BackupRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.allow_primary != null) + message.allow_primary = Boolean(object.allow_primary); + if (object.concurrency != null) + if ($util.Long) + (message.concurrency = $util.Long.fromValue(object.concurrency)).unsigned = true; + else if (typeof object.concurrency === "string") + message.concurrency = parseInt(object.concurrency, 10); + else if (typeof object.concurrency === "number") + message.concurrency = object.concurrency; + else if (typeof object.concurrency === "object") + message.concurrency = new $util.LongBits(object.concurrency.low >>> 0, object.concurrency.high >>> 0).toNumber(true); + if (object.incremental_from_pos != null) + message.incremental_from_pos = String(object.incremental_from_pos); return message; }; /** - * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @static - * @param {vtctldata.FindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse + * @param {vtctldata.BackupRequest} message BackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FindAllShardsInKeyspaceResponse.toObject = function toObject(message, options) { + BackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.shards = {}; - var keys2; - if (message.shards && (keys2 = Object.keys(message.shards)).length) { - object.shards = {}; - for (var j = 0; j < keys2.length; ++j) - object.shards[keys2[j]] = $root.vtctldata.Shard.toObject(message.shards[keys2[j]], options); + if (options.defaults) { + object.tablet_alias = null; + object.allow_primary = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.concurrency = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.concurrency = options.longs === String ? "0" : 0; + object.incremental_from_pos = ""; } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + object.allow_primary = message.allow_primary; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (typeof message.concurrency === "number") + object.concurrency = options.longs === String ? String(message.concurrency) : message.concurrency; + else + object.concurrency = options.longs === String ? $util.Long.prototype.toString.call(message.concurrency) : options.longs === Number ? new $util.LongBits(message.concurrency.low >>> 0, message.concurrency.high >>> 0).toNumber(true) : message.concurrency; + if (message.incremental_from_pos != null && message.hasOwnProperty("incremental_from_pos")) + object.incremental_from_pos = message.incremental_from_pos; return object; }; /** - * Converts this FindAllShardsInKeyspaceResponse to JSON. + * Converts this BackupRequest to JSON. * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @memberof vtctldata.BackupRequest * @instance * @returns {Object.} JSON object */ - FindAllShardsInKeyspaceResponse.prototype.toJSON = function toJSON() { + BackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FindAllShardsInKeyspaceResponse; + return BackupRequest; })(); - vtctldata.GetBackupsRequest = (function() { + vtctldata.BackupResponse = (function() { /** - * Properties of a GetBackupsRequest. + * Properties of a BackupResponse. * @memberof vtctldata - * @interface IGetBackupsRequest - * @property {string|null} [keyspace] GetBackupsRequest keyspace - * @property {string|null} [shard] GetBackupsRequest shard - * @property {number|null} [limit] GetBackupsRequest limit - * @property {boolean|null} [detailed] GetBackupsRequest detailed - * @property {number|null} [detailed_limit] GetBackupsRequest detailed_limit + * @interface IBackupResponse + * @property {topodata.ITabletAlias|null} [tablet_alias] BackupResponse tablet_alias + * @property {string|null} [keyspace] BackupResponse keyspace + * @property {string|null} [shard] BackupResponse shard + * @property {logutil.IEvent|null} [event] BackupResponse event */ /** - * Constructs a new GetBackupsRequest. + * Constructs a new BackupResponse. * @memberof vtctldata - * @classdesc Represents a GetBackupsRequest. - * @implements IGetBackupsRequest + * @classdesc Represents a BackupResponse. + * @implements IBackupResponse * @constructor - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set + * @param {vtctldata.IBackupResponse=} [properties] Properties to set */ - function GetBackupsRequest(properties) { + function BackupResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93441,127 +95270,114 @@ $root.vtctldata = (function() { } /** - * GetBackupsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.keyspace = ""; - - /** - * GetBackupsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetBackupsRequest + * BackupResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.BackupResponse * @instance */ - GetBackupsRequest.prototype.shard = ""; + BackupResponse.prototype.tablet_alias = null; /** - * GetBackupsRequest limit. - * @member {number} limit - * @memberof vtctldata.GetBackupsRequest + * BackupResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.BackupResponse * @instance */ - GetBackupsRequest.prototype.limit = 0; + BackupResponse.prototype.keyspace = ""; /** - * GetBackupsRequest detailed. - * @member {boolean} detailed - * @memberof vtctldata.GetBackupsRequest + * BackupResponse shard. + * @member {string} shard + * @memberof vtctldata.BackupResponse * @instance */ - GetBackupsRequest.prototype.detailed = false; + BackupResponse.prototype.shard = ""; /** - * GetBackupsRequest detailed_limit. - * @member {number} detailed_limit - * @memberof vtctldata.GetBackupsRequest + * BackupResponse event. + * @member {logutil.IEvent|null|undefined} event + * @memberof vtctldata.BackupResponse * @instance */ - GetBackupsRequest.prototype.detailed_limit = 0; + BackupResponse.prototype.event = null; /** - * Creates a new GetBackupsRequest instance using the specified properties. + * Creates a new BackupResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest instance + * @param {vtctldata.IBackupResponse=} [properties] Properties to set + * @returns {vtctldata.BackupResponse} BackupResponse instance */ - GetBackupsRequest.create = function create(properties) { - return new GetBackupsRequest(properties); + BackupResponse.create = function create(properties) { + return new BackupResponse(properties); }; /** - * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * Encodes the specified BackupResponse message. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode + * @param {vtctldata.IBackupResponse} message BackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsRequest.encode = function encode(message, writer) { + BackupResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.limit); - if (message.detailed != null && Object.hasOwnProperty.call(message, "detailed")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.detailed); - if (message.detailed_limit != null && Object.hasOwnProperty.call(message, "detailed_limit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.detailed_limit); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.logutil.Event.encode(message.event, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. + * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link vtctldata.BackupResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode + * @param {vtctldata.IBackupResponse} message BackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + BackupResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer. + * Decodes a BackupResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.BackupResponse} BackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsRequest.decode = function decode(reader, length) { + BackupResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 2: - message.shard = reader.string(); + message.keyspace = reader.string(); break; case 3: - message.limit = reader.uint32(); + message.shard = reader.string(); break; case 4: - message.detailed = reader.bool(); - break; - case 5: - message.detailed_limit = reader.uint32(); + message.event = $root.logutil.Event.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -93572,141 +95388,145 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a BackupResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.BackupResponse} BackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + BackupResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupsRequest message. + * Verifies a BackupResponse message. * @function verify - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupsRequest.verify = function verify(message) { + BackupResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; if (message.shard != null && message.hasOwnProperty("shard")) if (!$util.isString(message.shard)) return "shard: string expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit)) - return "limit: integer expected"; - if (message.detailed != null && message.hasOwnProperty("detailed")) - if (typeof message.detailed !== "boolean") - return "detailed: boolean expected"; - if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) - if (!$util.isInteger(message.detailed_limit)) - return "detailed_limit: integer expected"; + if (message.event != null && message.hasOwnProperty("event")) { + var error = $root.logutil.Event.verify(message.event); + if (error) + return "event." + error; + } return null; }; /** - * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest + * @returns {vtctldata.BackupResponse} BackupResponse */ - GetBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsRequest) + BackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.BackupResponse) return object; - var message = new $root.vtctldata.GetBackupsRequest(); + var message = new $root.vtctldata.BackupResponse(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.BackupResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); - if (object.limit != null) - message.limit = object.limit >>> 0; - if (object.detailed != null) - message.detailed = Boolean(object.detailed); - if (object.detailed_limit != null) - message.detailed_limit = object.detailed_limit >>> 0; + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".vtctldata.BackupResponse.event: object expected"); + message.event = $root.logutil.Event.fromObject(object.event); + } return message; }; /** - * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @static - * @param {vtctldata.GetBackupsRequest} message GetBackupsRequest + * @param {vtctldata.BackupResponse} message BackupResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupsRequest.toObject = function toObject(message, options) { + BackupResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.tablet_alias = null; object.keyspace = ""; object.shard = ""; - object.limit = 0; - object.detailed = false; - object.detailed_limit = 0; + object.event = null; } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) object.shard = message.shard; - if (message.limit != null && message.hasOwnProperty("limit")) - object.limit = message.limit; - if (message.detailed != null && message.hasOwnProperty("detailed")) - object.detailed = message.detailed; - if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) - object.detailed_limit = message.detailed_limit; + if (message.event != null && message.hasOwnProperty("event")) + object.event = $root.logutil.Event.toObject(message.event, options); return object; }; /** - * Converts this GetBackupsRequest to JSON. + * Converts this BackupResponse to JSON. * @function toJSON - * @memberof vtctldata.GetBackupsRequest + * @memberof vtctldata.BackupResponse * @instance * @returns {Object.} JSON object */ - GetBackupsRequest.prototype.toJSON = function toJSON() { + BackupResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBackupsRequest; + return BackupResponse; })(); - vtctldata.GetBackupsResponse = (function() { + vtctldata.BackupShardRequest = (function() { /** - * Properties of a GetBackupsResponse. + * Properties of a BackupShardRequest. * @memberof vtctldata - * @interface IGetBackupsResponse - * @property {Array.|null} [backups] GetBackupsResponse backups + * @interface IBackupShardRequest + * @property {string|null} [keyspace] BackupShardRequest keyspace + * @property {string|null} [shard] BackupShardRequest shard + * @property {boolean|null} [allow_primary] BackupShardRequest allow_primary + * @property {number|Long|null} [concurrency] BackupShardRequest concurrency */ /** - * Constructs a new GetBackupsResponse. + * Constructs a new BackupShardRequest. * @memberof vtctldata - * @classdesc Represents a GetBackupsResponse. - * @implements IGetBackupsResponse + * @classdesc Represents a BackupShardRequest. + * @implements IBackupShardRequest * @constructor - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set + * @param {vtctldata.IBackupShardRequest=} [properties] Properties to set */ - function GetBackupsResponse(properties) { - this.backups = []; + function BackupShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93714,78 +95534,114 @@ $root.vtctldata = (function() { } /** - * GetBackupsResponse backups. - * @member {Array.} backups - * @memberof vtctldata.GetBackupsResponse + * BackupShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.BackupShardRequest * @instance */ - GetBackupsResponse.prototype.backups = $util.emptyArray; + BackupShardRequest.prototype.keyspace = ""; /** - * Creates a new GetBackupsResponse instance using the specified properties. + * BackupShardRequest shard. + * @member {string} shard + * @memberof vtctldata.BackupShardRequest + * @instance + */ + BackupShardRequest.prototype.shard = ""; + + /** + * BackupShardRequest allow_primary. + * @member {boolean} allow_primary + * @memberof vtctldata.BackupShardRequest + * @instance + */ + BackupShardRequest.prototype.allow_primary = false; + + /** + * BackupShardRequest concurrency. + * @member {number|Long} concurrency + * @memberof vtctldata.BackupShardRequest + * @instance + */ + BackupShardRequest.prototype.concurrency = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BackupShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse instance + * @param {vtctldata.IBackupShardRequest=} [properties] Properties to set + * @returns {vtctldata.BackupShardRequest} BackupShardRequest instance */ - GetBackupsResponse.create = function create(properties) { - return new GetBackupsResponse(properties); + BackupShardRequest.create = function create(properties) { + return new BackupShardRequest(properties); }; /** - * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * Encodes the specified BackupShardRequest message. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode + * @param {vtctldata.IBackupShardRequest} message BackupShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsResponse.encode = function encode(message, writer) { + BackupShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.mysqlctl.BackupInfo.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_primary); + if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.concurrency); return writer; }; /** - * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. + * Encodes the specified BackupShardRequest message, length delimited. Does not implicitly {@link vtctldata.BackupShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode + * @param {vtctldata.IBackupShardRequest} message BackupShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BackupShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer. + * Decodes a BackupShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.BackupShardRequest} BackupShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsResponse.decode = function decode(reader, length) { + BackupShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.BackupShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.mysqlctl.BackupInfo.decode(reader, reader.uint32())); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.allow_primary = reader.bool(); + break; + case 4: + message.concurrency = reader.uint64(); break; default: reader.skipType(tag & 7); @@ -93796,124 +95652,148 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes a BackupShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.BackupShardRequest} BackupShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + BackupShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupsResponse message. + * Verifies a BackupShardRequest message. * @function verify - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupsResponse.verify = function verify(message) { + BackupShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.mysqlctl.BackupInfo.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + if (typeof message.allow_primary !== "boolean") + return "allow_primary: boolean expected"; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (!$util.isInteger(message.concurrency) && !(message.concurrency && $util.isInteger(message.concurrency.low) && $util.isInteger(message.concurrency.high))) + return "concurrency: integer|Long expected"; return null; }; /** - * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BackupShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse + * @returns {vtctldata.BackupShardRequest} BackupShardRequest */ - GetBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsResponse) + BackupShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.BackupShardRequest) return object; - var message = new $root.vtctldata.GetBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".vtctldata.GetBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".vtctldata.GetBackupsResponse.backups: object expected"); - message.backups[i] = $root.mysqlctl.BackupInfo.fromObject(object.backups[i]); - } - } + var message = new $root.vtctldata.BackupShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.allow_primary != null) + message.allow_primary = Boolean(object.allow_primary); + if (object.concurrency != null) + if ($util.Long) + (message.concurrency = $util.Long.fromValue(object.concurrency)).unsigned = true; + else if (typeof object.concurrency === "string") + message.concurrency = parseInt(object.concurrency, 10); + else if (typeof object.concurrency === "number") + message.concurrency = object.concurrency; + else if (typeof object.concurrency === "object") + message.concurrency = new $util.LongBits(object.concurrency.low >>> 0, object.concurrency.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BackupShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @static - * @param {vtctldata.GetBackupsResponse} message GetBackupsResponse + * @param {vtctldata.BackupShardRequest} message BackupShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupsResponse.toObject = function toObject(message, options) { + BackupShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.backups = []; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.mysqlctl.BackupInfo.toObject(message.backups[j], options); + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.allow_primary = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.concurrency = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.concurrency = options.longs === String ? "0" : 0; } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + object.allow_primary = message.allow_primary; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (typeof message.concurrency === "number") + object.concurrency = options.longs === String ? String(message.concurrency) : message.concurrency; + else + object.concurrency = options.longs === String ? $util.Long.prototype.toString.call(message.concurrency) : options.longs === Number ? new $util.LongBits(message.concurrency.low >>> 0, message.concurrency.high >>> 0).toNumber(true) : message.concurrency; return object; }; /** - * Converts this GetBackupsResponse to JSON. + * Converts this BackupShardRequest to JSON. * @function toJSON - * @memberof vtctldata.GetBackupsResponse + * @memberof vtctldata.BackupShardRequest * @instance * @returns {Object.} JSON object */ - GetBackupsResponse.prototype.toJSON = function toJSON() { + BackupShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBackupsResponse; + return BackupShardRequest; })(); - vtctldata.GetCellInfoRequest = (function() { + vtctldata.ChangeTabletTypeRequest = (function() { /** - * Properties of a GetCellInfoRequest. + * Properties of a ChangeTabletTypeRequest. * @memberof vtctldata - * @interface IGetCellInfoRequest - * @property {string|null} [cell] GetCellInfoRequest cell + * @interface IChangeTabletTypeRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ChangeTabletTypeRequest tablet_alias + * @property {topodata.TabletType|null} [db_type] ChangeTabletTypeRequest db_type + * @property {boolean|null} [dry_run] ChangeTabletTypeRequest dry_run */ /** - * Constructs a new GetCellInfoRequest. + * Constructs a new ChangeTabletTypeRequest. * @memberof vtctldata - * @classdesc Represents a GetCellInfoRequest. - * @implements IGetCellInfoRequest + * @classdesc Represents a ChangeTabletTypeRequest. + * @implements IChangeTabletTypeRequest * @constructor - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set + * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set */ - function GetCellInfoRequest(properties) { + function ChangeTabletTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93921,75 +95801,101 @@ $root.vtctldata = (function() { } /** - * GetCellInfoRequest cell. - * @member {string} cell - * @memberof vtctldata.GetCellInfoRequest + * ChangeTabletTypeRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ChangeTabletTypeRequest * @instance */ - GetCellInfoRequest.prototype.cell = ""; + ChangeTabletTypeRequest.prototype.tablet_alias = null; /** - * Creates a new GetCellInfoRequest instance using the specified properties. + * ChangeTabletTypeRequest db_type. + * @member {topodata.TabletType} db_type + * @memberof vtctldata.ChangeTabletTypeRequest + * @instance + */ + ChangeTabletTypeRequest.prototype.db_type = 0; + + /** + * ChangeTabletTypeRequest dry_run. + * @member {boolean} dry_run + * @memberof vtctldata.ChangeTabletTypeRequest + * @instance + */ + ChangeTabletTypeRequest.prototype.dry_run = false; + + /** + * Creates a new ChangeTabletTypeRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest instance + * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set + * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest instance */ - GetCellInfoRequest.create = function create(properties) { - return new GetCellInfoRequest(properties); + ChangeTabletTypeRequest.create = function create(properties) { + return new ChangeTabletTypeRequest(properties); }; /** - * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode + * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoRequest.encode = function encode(message, writer) { + ChangeTabletTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.db_type != null && Object.hasOwnProperty.call(message, "db_type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.db_type); + if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dry_run); return writer; }; /** - * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. + * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode + * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + ChangeTabletTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer. + * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoRequest.decode = function decode(reader, length) { + ChangeTabletTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cell = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.db_type = reader.int32(); + break; + case 3: + message.dry_run = reader.bool(); break; default: reader.skipType(tag & 7); @@ -94000,107 +95906,189 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + ChangeTabletTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoRequest message. + * Verifies a ChangeTabletTypeRequest message. * @function verify - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoRequest.verify = function verify(message) { + ChangeTabletTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.db_type != null && message.hasOwnProperty("db_type")) + switch (message.db_type) { + default: + return "db_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + if (typeof message.dry_run !== "boolean") + return "dry_run: boolean expected"; return null; }; /** - * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest + * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest */ - GetCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoRequest) + ChangeTabletTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ChangeTabletTypeRequest) return object; - var message = new $root.vtctldata.GetCellInfoRequest(); - if (object.cell != null) - message.cell = String(object.cell); + var message = new $root.vtctldata.ChangeTabletTypeRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ChangeTabletTypeRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + switch (object.db_type) { + case "UNKNOWN": + case 0: + message.db_type = 0; + break; + case "PRIMARY": + case 1: + message.db_type = 1; + break; + case "MASTER": + case 1: + message.db_type = 1; + break; + case "REPLICA": + case 2: + message.db_type = 2; + break; + case "RDONLY": + case 3: + message.db_type = 3; + break; + case "BATCH": + case 3: + message.db_type = 3; + break; + case "SPARE": + case 4: + message.db_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.db_type = 5; + break; + case "BACKUP": + case 6: + message.db_type = 6; + break; + case "RESTORE": + case 7: + message.db_type = 7; + break; + case "DRAINED": + case 8: + message.db_type = 8; + break; + } + if (object.dry_run != null) + message.dry_run = Boolean(object.dry_run); return message; }; /** - * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @static - * @param {vtctldata.GetCellInfoRequest} message GetCellInfoRequest + * @param {vtctldata.ChangeTabletTypeRequest} message ChangeTabletTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoRequest.toObject = function toObject(message, options) { + ChangeTabletTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (options.defaults) { + object.tablet_alias = null; + object.db_type = options.enums === String ? "UNKNOWN" : 0; + object.dry_run = false; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.db_type != null && message.hasOwnProperty("db_type")) + object.db_type = options.enums === String ? $root.topodata.TabletType[message.db_type] : message.db_type; + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + object.dry_run = message.dry_run; return object; }; /** - * Converts this GetCellInfoRequest to JSON. + * Converts this ChangeTabletTypeRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoRequest + * @memberof vtctldata.ChangeTabletTypeRequest * @instance * @returns {Object.} JSON object */ - GetCellInfoRequest.prototype.toJSON = function toJSON() { + ChangeTabletTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellInfoRequest; + return ChangeTabletTypeRequest; })(); - vtctldata.GetCellInfoResponse = (function() { + vtctldata.ChangeTabletTypeResponse = (function() { /** - * Properties of a GetCellInfoResponse. + * Properties of a ChangeTabletTypeResponse. * @memberof vtctldata - * @interface IGetCellInfoResponse - * @property {topodata.ICellInfo|null} [cell_info] GetCellInfoResponse cell_info + * @interface IChangeTabletTypeResponse + * @property {topodata.ITablet|null} [before_tablet] ChangeTabletTypeResponse before_tablet + * @property {topodata.ITablet|null} [after_tablet] ChangeTabletTypeResponse after_tablet + * @property {boolean|null} [was_dry_run] ChangeTabletTypeResponse was_dry_run */ /** - * Constructs a new GetCellInfoResponse. + * Constructs a new ChangeTabletTypeResponse. * @memberof vtctldata - * @classdesc Represents a GetCellInfoResponse. - * @implements IGetCellInfoResponse + * @classdesc Represents a ChangeTabletTypeResponse. + * @implements IChangeTabletTypeResponse * @constructor - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set + * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set */ - function GetCellInfoResponse(properties) { + function ChangeTabletTypeResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94108,75 +96096,101 @@ $root.vtctldata = (function() { } /** - * GetCellInfoResponse cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.GetCellInfoResponse + * ChangeTabletTypeResponse before_tablet. + * @member {topodata.ITablet|null|undefined} before_tablet + * @memberof vtctldata.ChangeTabletTypeResponse * @instance */ - GetCellInfoResponse.prototype.cell_info = null; + ChangeTabletTypeResponse.prototype.before_tablet = null; /** - * Creates a new GetCellInfoResponse instance using the specified properties. + * ChangeTabletTypeResponse after_tablet. + * @member {topodata.ITablet|null|undefined} after_tablet + * @memberof vtctldata.ChangeTabletTypeResponse + * @instance + */ + ChangeTabletTypeResponse.prototype.after_tablet = null; + + /** + * ChangeTabletTypeResponse was_dry_run. + * @member {boolean} was_dry_run + * @memberof vtctldata.ChangeTabletTypeResponse + * @instance + */ + ChangeTabletTypeResponse.prototype.was_dry_run = false; + + /** + * Creates a new ChangeTabletTypeResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse instance + * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set + * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse instance */ - GetCellInfoResponse.create = function create(properties) { - return new GetCellInfoResponse(properties); + ChangeTabletTypeResponse.create = function create(properties) { + return new ChangeTabletTypeResponse(properties); }; /** - * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode + * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoResponse.encode = function encode(message, writer) { + ChangeTabletTypeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.before_tablet != null && Object.hasOwnProperty.call(message, "before_tablet")) + $root.topodata.Tablet.encode(message.before_tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.after_tablet != null && Object.hasOwnProperty.call(message, "after_tablet")) + $root.topodata.Tablet.encode(message.after_tablet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.was_dry_run != null && Object.hasOwnProperty.call(message, "was_dry_run")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.was_dry_run); return writer; }; /** - * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. + * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode + * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + ChangeTabletTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer. + * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoResponse.decode = function decode(reader, length) { + ChangeTabletTypeResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + message.before_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + break; + case 2: + message.after_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + break; + case 3: + message.was_dry_run = reader.bool(); break; default: reader.skipType(tag & 7); @@ -94187,111 +96201,143 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + ChangeTabletTypeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoResponse message. + * Verifies a ChangeTabletTypeResponse message. * @function verify - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoResponse.verify = function verify(message) { + ChangeTabletTypeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - var error = $root.topodata.CellInfo.verify(message.cell_info); + if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) { + var error = $root.topodata.Tablet.verify(message.before_tablet); if (error) - return "cell_info." + error; + return "before_tablet." + error; } + if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) { + var error = $root.topodata.Tablet.verify(message.after_tablet); + if (error) + return "after_tablet." + error; + } + if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) + if (typeof message.was_dry_run !== "boolean") + return "was_dry_run: boolean expected"; return null; }; /** - * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse + * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse */ - GetCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoResponse) + ChangeTabletTypeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ChangeTabletTypeResponse) return object; - var message = new $root.vtctldata.GetCellInfoResponse(); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.GetCellInfoResponse.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + var message = new $root.vtctldata.ChangeTabletTypeResponse(); + if (object.before_tablet != null) { + if (typeof object.before_tablet !== "object") + throw TypeError(".vtctldata.ChangeTabletTypeResponse.before_tablet: object expected"); + message.before_tablet = $root.topodata.Tablet.fromObject(object.before_tablet); + } + if (object.after_tablet != null) { + if (typeof object.after_tablet !== "object") + throw TypeError(".vtctldata.ChangeTabletTypeResponse.after_tablet: object expected"); + message.after_tablet = $root.topodata.Tablet.fromObject(object.after_tablet); } + if (object.was_dry_run != null) + message.was_dry_run = Boolean(object.was_dry_run); return message; }; /** - * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @static - * @param {vtctldata.GetCellInfoResponse} message GetCellInfoResponse + * @param {vtctldata.ChangeTabletTypeResponse} message ChangeTabletTypeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoResponse.toObject = function toObject(message, options) { + ChangeTabletTypeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cell_info = null; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); + if (options.defaults) { + object.before_tablet = null; + object.after_tablet = null; + object.was_dry_run = false; + } + if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) + object.before_tablet = $root.topodata.Tablet.toObject(message.before_tablet, options); + if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) + object.after_tablet = $root.topodata.Tablet.toObject(message.after_tablet, options); + if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) + object.was_dry_run = message.was_dry_run; return object; }; /** - * Converts this GetCellInfoResponse to JSON. + * Converts this ChangeTabletTypeResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoResponse + * @memberof vtctldata.ChangeTabletTypeResponse * @instance * @returns {Object.} JSON object */ - GetCellInfoResponse.prototype.toJSON = function toJSON() { + ChangeTabletTypeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellInfoResponse; + return ChangeTabletTypeResponse; })(); - vtctldata.GetCellInfoNamesRequest = (function() { + vtctldata.CreateKeyspaceRequest = (function() { /** - * Properties of a GetCellInfoNamesRequest. + * Properties of a CreateKeyspaceRequest. * @memberof vtctldata - * @interface IGetCellInfoNamesRequest + * @interface ICreateKeyspaceRequest + * @property {string|null} [name] CreateKeyspaceRequest name + * @property {boolean|null} [force] CreateKeyspaceRequest force + * @property {boolean|null} [allow_empty_v_schema] CreateKeyspaceRequest allow_empty_v_schema + * @property {Array.|null} [served_froms] CreateKeyspaceRequest served_froms + * @property {topodata.KeyspaceType|null} [type] CreateKeyspaceRequest type + * @property {string|null} [base_keyspace] CreateKeyspaceRequest base_keyspace + * @property {vttime.ITime|null} [snapshot_time] CreateKeyspaceRequest snapshot_time + * @property {string|null} [durability_policy] CreateKeyspaceRequest durability_policy + * @property {string|null} [sidecar_db_name] CreateKeyspaceRequest sidecar_db_name */ /** - * Constructs a new GetCellInfoNamesRequest. + * Constructs a new CreateKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesRequest. - * @implements IGetCellInfoNamesRequest + * @classdesc Represents a CreateKeyspaceRequest. + * @implements ICreateKeyspaceRequest * @constructor - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set + * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set */ - function GetCellInfoNamesRequest(properties) { + function CreateKeyspaceRequest(properties) { + this.served_froms = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94299,63 +96345,183 @@ $root.vtctldata = (function() { } /** - * Creates a new GetCellInfoNamesRequest instance using the specified properties. + * CreateKeyspaceRequest name. + * @member {string} name + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.name = ""; + + /** + * CreateKeyspaceRequest force. + * @member {boolean} force + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.force = false; + + /** + * CreateKeyspaceRequest allow_empty_v_schema. + * @member {boolean} allow_empty_v_schema + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.allow_empty_v_schema = false; + + /** + * CreateKeyspaceRequest served_froms. + * @member {Array.} served_froms + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.served_froms = $util.emptyArray; + + /** + * CreateKeyspaceRequest type. + * @member {topodata.KeyspaceType} type + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.type = 0; + + /** + * CreateKeyspaceRequest base_keyspace. + * @member {string} base_keyspace + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.base_keyspace = ""; + + /** + * CreateKeyspaceRequest snapshot_time. + * @member {vttime.ITime|null|undefined} snapshot_time + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.snapshot_time = null; + + /** + * CreateKeyspaceRequest durability_policy. + * @member {string} durability_policy + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.durability_policy = ""; + + /** + * CreateKeyspaceRequest sidecar_db_name. + * @member {string} sidecar_db_name + * @memberof vtctldata.CreateKeyspaceRequest + * @instance + */ + CreateKeyspaceRequest.prototype.sidecar_db_name = ""; + + /** + * Creates a new CreateKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest instance + * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest instance */ - GetCellInfoNamesRequest.create = function create(properties) { - return new GetCellInfoNamesRequest(properties); + CreateKeyspaceRequest.create = function create(properties) { + return new CreateKeyspaceRequest(properties); }; /** - * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode + * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesRequest.encode = function encode(message, writer) { + CreateKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.allow_empty_v_schema != null && Object.hasOwnProperty.call(message, "allow_empty_v_schema")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_empty_v_schema); + if (message.served_froms != null && message.served_froms.length) + for (var i = 0; i < message.served_froms.length; ++i) + $root.topodata.Keyspace.ServedFrom.encode(message.served_froms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.base_keyspace); + if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) + $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.durability_policy); + if (message.sidecar_db_name != null && Object.hasOwnProperty.call(message, "sidecar_db_name")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sidecar_db_name); return writer; }; /** - * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. + * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode + * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesRequest.decode = function decode(reader, length) { + CreateKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + case 3: + message.allow_empty_v_schema = reader.bool(); + break; + case 6: + if (!(message.served_froms && message.served_froms.length)) + message.served_froms = []; + message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); + break; + case 7: + message.type = reader.int32(); + break; + case 8: + message.base_keyspace = reader.string(); + break; + case 9: + message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 10: + message.durability_policy = reader.string(); + break; + case 11: + message.sidecar_db_name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -94365,95 +96531,208 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoNamesRequest message. + * Verifies a CreateKeyspaceRequest message. * @function verify - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoNamesRequest.verify = function verify(message) { + CreateKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) + if (typeof message.allow_empty_v_schema !== "boolean") + return "allow_empty_v_schema: boolean expected"; + if (message.served_froms != null && message.hasOwnProperty("served_froms")) { + if (!Array.isArray(message.served_froms)) + return "served_froms: array expected"; + for (var i = 0; i < message.served_froms.length; ++i) { + var error = $root.topodata.Keyspace.ServedFrom.verify(message.served_froms[i]); + if (error) + return "served_froms." + error; + } + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) + if (!$util.isString(message.base_keyspace)) + return "base_keyspace: string expected"; + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { + var error = $root.vttime.Time.verify(message.snapshot_time); + if (error) + return "snapshot_time." + error; + } + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + if (!$util.isString(message.durability_policy)) + return "durability_policy: string expected"; + if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) + if (!$util.isString(message.sidecar_db_name)) + return "sidecar_db_name: string expected"; return null; }; /** - * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest + * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest */ - GetCellInfoNamesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesRequest) + CreateKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateKeyspaceRequest) return object; - return new $root.vtctldata.GetCellInfoNamesRequest(); + var message = new $root.vtctldata.CreateKeyspaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + if (object.allow_empty_v_schema != null) + message.allow_empty_v_schema = Boolean(object.allow_empty_v_schema); + if (object.served_froms) { + if (!Array.isArray(object.served_froms)) + throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: array expected"); + message.served_froms = []; + for (var i = 0; i < object.served_froms.length; ++i) { + if (typeof object.served_froms[i] !== "object") + throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: object expected"); + message.served_froms[i] = $root.topodata.Keyspace.ServedFrom.fromObject(object.served_froms[i]); + } + } + switch (object.type) { + case "NORMAL": + case 0: + message.type = 0; + break; + case "SNAPSHOT": + case 1: + message.type = 1; + break; + } + if (object.base_keyspace != null) + message.base_keyspace = String(object.base_keyspace); + if (object.snapshot_time != null) { + if (typeof object.snapshot_time !== "object") + throw TypeError(".vtctldata.CreateKeyspaceRequest.snapshot_time: object expected"); + message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); + } + if (object.durability_policy != null) + message.durability_policy = String(object.durability_policy); + if (object.sidecar_db_name != null) + message.sidecar_db_name = String(object.sidecar_db_name); + return message; }; /** - * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @static - * @param {vtctldata.GetCellInfoNamesRequest} message GetCellInfoNamesRequest + * @param {vtctldata.CreateKeyspaceRequest} message CreateKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoNamesRequest.toObject = function toObject() { - return {}; + CreateKeyspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.served_froms = []; + if (options.defaults) { + object.name = ""; + object.force = false; + object.allow_empty_v_schema = false; + object.type = options.enums === String ? "NORMAL" : 0; + object.base_keyspace = ""; + object.snapshot_time = null; + object.durability_policy = ""; + object.sidecar_db_name = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) + object.allow_empty_v_schema = message.allow_empty_v_schema; + if (message.served_froms && message.served_froms.length) { + object.served_froms = []; + for (var j = 0; j < message.served_froms.length; ++j) + object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject(message.served_froms[j], options); + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.topodata.KeyspaceType[message.type] : message.type; + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) + object.base_keyspace = message.base_keyspace; + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) + object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + object.durability_policy = message.durability_policy; + if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) + object.sidecar_db_name = message.sidecar_db_name; + return object; }; /** - * Converts this GetCellInfoNamesRequest to JSON. + * Converts this CreateKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoNamesRequest + * @memberof vtctldata.CreateKeyspaceRequest * @instance * @returns {Object.} JSON object */ - GetCellInfoNamesRequest.prototype.toJSON = function toJSON() { + CreateKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellInfoNamesRequest; + return CreateKeyspaceRequest; })(); - vtctldata.GetCellInfoNamesResponse = (function() { + vtctldata.CreateKeyspaceResponse = (function() { /** - * Properties of a GetCellInfoNamesResponse. + * Properties of a CreateKeyspaceResponse. * @memberof vtctldata - * @interface IGetCellInfoNamesResponse - * @property {Array.|null} [names] GetCellInfoNamesResponse names + * @interface ICreateKeyspaceResponse + * @property {vtctldata.IKeyspace|null} [keyspace] CreateKeyspaceResponse keyspace */ /** - * Constructs a new GetCellInfoNamesResponse. + * Constructs a new CreateKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesResponse. - * @implements IGetCellInfoNamesResponse + * @classdesc Represents a CreateKeyspaceResponse. + * @implements ICreateKeyspaceResponse * @constructor - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set + * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set */ - function GetCellInfoNamesResponse(properties) { - this.names = []; + function CreateKeyspaceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94461,78 +96740,75 @@ $root.vtctldata = (function() { } /** - * GetCellInfoNamesResponse names. - * @member {Array.} names - * @memberof vtctldata.GetCellInfoNamesResponse + * CreateKeyspaceResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.CreateKeyspaceResponse * @instance */ - GetCellInfoNamesResponse.prototype.names = $util.emptyArray; + CreateKeyspaceResponse.prototype.keyspace = null; /** - * Creates a new GetCellInfoNamesResponse instance using the specified properties. + * Creates a new CreateKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse instance + * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse instance */ - GetCellInfoNamesResponse.create = function create(properties) { - return new GetCellInfoNamesResponse(properties); + CreateKeyspaceResponse.create = function create(properties) { + return new CreateKeyspaceResponse(properties); }; /** - * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode + * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesResponse.encode = function encode(message, writer) { + CreateKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. + * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode + * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellInfoNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesResponse.decode = function decode(reader, length) { + CreateKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -94543,118 +96819,115 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellInfoNamesResponse.decodeDelimited = function decodeDelimited(reader) { + CreateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellInfoNamesResponse message. + * Verifies a CreateKeyspaceResponse message. * @function verify - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellInfoNamesResponse.verify = function verify(message) { + CreateKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; } return null; }; /** - * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse + * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse */ - GetCellInfoNamesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesResponse) + CreateKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateKeyspaceResponse) return object; - var message = new $root.vtctldata.GetCellInfoNamesResponse(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".vtctldata.GetCellInfoNamesResponse.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); + var message = new $root.vtctldata.CreateKeyspaceResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.CreateKeyspaceResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @static - * @param {vtctldata.GetCellInfoNamesResponse} message GetCellInfoNamesResponse + * @param {vtctldata.CreateKeyspaceResponse} message CreateKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellInfoNamesResponse.toObject = function toObject(message, options) { + CreateKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } + if (options.defaults) + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this GetCellInfoNamesResponse to JSON. + * Converts this CreateKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellInfoNamesResponse + * @memberof vtctldata.CreateKeyspaceResponse * @instance * @returns {Object.} JSON object */ - GetCellInfoNamesResponse.prototype.toJSON = function toJSON() { + CreateKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellInfoNamesResponse; + return CreateKeyspaceResponse; })(); - vtctldata.GetCellsAliasesRequest = (function() { + vtctldata.CreateShardRequest = (function() { /** - * Properties of a GetCellsAliasesRequest. + * Properties of a CreateShardRequest. * @memberof vtctldata - * @interface IGetCellsAliasesRequest + * @interface ICreateShardRequest + * @property {string|null} [keyspace] CreateShardRequest keyspace + * @property {string|null} [shard_name] CreateShardRequest shard_name + * @property {boolean|null} [force] CreateShardRequest force + * @property {boolean|null} [include_parent] CreateShardRequest include_parent */ /** - * Constructs a new GetCellsAliasesRequest. + * Constructs a new CreateShardRequest. * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesRequest. - * @implements IGetCellsAliasesRequest + * @classdesc Represents a CreateShardRequest. + * @implements ICreateShardRequest * @constructor - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set + * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set */ - function GetCellsAliasesRequest(properties) { + function CreateShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94662,63 +96935,115 @@ $root.vtctldata = (function() { } /** - * Creates a new GetCellsAliasesRequest instance using the specified properties. + * CreateShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.keyspace = ""; + + /** + * CreateShardRequest shard_name. + * @member {string} shard_name + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.shard_name = ""; + + /** + * CreateShardRequest force. + * @member {boolean} force + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.force = false; + + /** + * CreateShardRequest include_parent. + * @member {boolean} include_parent + * @memberof vtctldata.CreateShardRequest + * @instance + */ + CreateShardRequest.prototype.include_parent = false; + + /** + * Creates a new CreateShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest instance + * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set + * @returns {vtctldata.CreateShardRequest} CreateShardRequest instance */ - GetCellsAliasesRequest.create = function create(properties) { - return new GetCellsAliasesRequest(properties); + CreateShardRequest.create = function create(properties) { + return new CreateShardRequest(properties); }; /** - * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode + * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesRequest.encode = function encode(message, writer) { + CreateShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.include_parent != null && Object.hasOwnProperty.call(message, "include_parent")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_parent); return writer; }; /** - * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. + * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode + * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. + * Decodes a CreateShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesRequest.decode = function decode(reader, length) { + CreateShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + message.shard_name = reader.string(); + break; + case 3: + message.force = reader.bool(); + break; + case 4: + message.include_parent = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -94728,95 +97053,134 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellsAliasesRequest message. + * Verifies a CreateShardRequest message. * @function verify - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellsAliasesRequest.verify = function verify(message) { + CreateShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + if (!$util.isString(message.shard_name)) + return "shard_name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.include_parent != null && message.hasOwnProperty("include_parent")) + if (typeof message.include_parent !== "boolean") + return "include_parent: boolean expected"; return null; }; /** - * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + * @returns {vtctldata.CreateShardRequest} CreateShardRequest */ - GetCellsAliasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesRequest) + CreateShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateShardRequest) return object; - return new $root.vtctldata.GetCellsAliasesRequest(); + var message = new $root.vtctldata.CreateShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard_name != null) + message.shard_name = String(object.shard_name); + if (object.force != null) + message.force = Boolean(object.force); + if (object.include_parent != null) + message.include_parent = Boolean(object.include_parent); + return message; }; /** - * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @static - * @param {vtctldata.GetCellsAliasesRequest} message GetCellsAliasesRequest + * @param {vtctldata.CreateShardRequest} message CreateShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellsAliasesRequest.toObject = function toObject() { - return {}; + CreateShardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.shard_name = ""; + object.force = false; + object.include_parent = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + object.shard_name = message.shard_name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.include_parent != null && message.hasOwnProperty("include_parent")) + object.include_parent = message.include_parent; + return object; }; /** - * Converts this GetCellsAliasesRequest to JSON. + * Converts this CreateShardRequest to JSON. * @function toJSON - * @memberof vtctldata.GetCellsAliasesRequest + * @memberof vtctldata.CreateShardRequest * @instance * @returns {Object.} JSON object */ - GetCellsAliasesRequest.prototype.toJSON = function toJSON() { + CreateShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellsAliasesRequest; + return CreateShardRequest; })(); - vtctldata.GetCellsAliasesResponse = (function() { + vtctldata.CreateShardResponse = (function() { /** - * Properties of a GetCellsAliasesResponse. + * Properties of a CreateShardResponse. * @memberof vtctldata - * @interface IGetCellsAliasesResponse - * @property {Object.|null} [aliases] GetCellsAliasesResponse aliases + * @interface ICreateShardResponse + * @property {vtctldata.IKeyspace|null} [keyspace] CreateShardResponse keyspace + * @property {vtctldata.IShard|null} [shard] CreateShardResponse shard + * @property {boolean|null} [shard_already_exists] CreateShardResponse shard_already_exists */ /** - * Constructs a new GetCellsAliasesResponse. + * Constructs a new CreateShardResponse. * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesResponse. - * @implements IGetCellsAliasesResponse + * @classdesc Represents a CreateShardResponse. + * @implements ICreateShardResponse * @constructor - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set + * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set */ - function GetCellsAliasesResponse(properties) { - this.aliases = {}; + function CreateShardResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94824,97 +97188,101 @@ $root.vtctldata = (function() { } /** - * GetCellsAliasesResponse aliases. - * @member {Object.} aliases - * @memberof vtctldata.GetCellsAliasesResponse + * CreateShardResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.CreateShardResponse * @instance */ - GetCellsAliasesResponse.prototype.aliases = $util.emptyObject; + CreateShardResponse.prototype.keyspace = null; /** - * Creates a new GetCellsAliasesResponse instance using the specified properties. + * CreateShardResponse shard. + * @member {vtctldata.IShard|null|undefined} shard + * @memberof vtctldata.CreateShardResponse + * @instance + */ + CreateShardResponse.prototype.shard = null; + + /** + * CreateShardResponse shard_already_exists. + * @member {boolean} shard_already_exists + * @memberof vtctldata.CreateShardResponse + * @instance + */ + CreateShardResponse.prototype.shard_already_exists = false; + + /** + * Creates a new CreateShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse instance + * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set + * @returns {vtctldata.CreateShardResponse} CreateShardResponse instance */ - GetCellsAliasesResponse.create = function create(properties) { - return new GetCellsAliasesResponse(properties); + CreateShardResponse.create = function create(properties) { + return new CreateShardResponse(properties); }; /** - * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode + * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesResponse.encode = function encode(message, writer) { + CreateShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.aliases != null && Object.hasOwnProperty.call(message, "aliases")) - for (var keys = Object.keys(message.aliases), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.CellsAlias.encode(message.aliases[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.shard_already_exists != null && Object.hasOwnProperty.call(message, "shard_already_exists")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.shard_already_exists); return writer; }; /** - * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. + * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode + * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCellsAliasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. + * Decodes a CreateShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesResponse.decode = function decode(reader, length) { + CreateShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.aliases === $util.emptyObject) - message.aliases = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.CellsAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.aliases[key] = value; + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); + break; + case 2: + message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); + break; + case 3: + message.shard_already_exists = reader.bool(); break; default: reader.skipType(tag & 7); @@ -94925,126 +97293,135 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCellsAliasesResponse.decodeDelimited = function decodeDelimited(reader) { + CreateShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCellsAliasesResponse message. + * Verifies a CreateShardResponse message. * @function verify - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCellsAliasesResponse.verify = function verify(message) { + CreateShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.aliases != null && message.hasOwnProperty("aliases")) { - if (!$util.isObject(message.aliases)) - return "aliases: object expected"; - var key = Object.keys(message.aliases); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.CellsAlias.verify(message.aliases[key[i]]); - if (error) - return "aliases." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; + } + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.vtctldata.Shard.verify(message.shard); + if (error) + return "shard." + error; } + if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) + if (typeof message.shard_already_exists !== "boolean") + return "shard_already_exists: boolean expected"; return null; }; /** - * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse + * @returns {vtctldata.CreateShardResponse} CreateShardResponse */ - GetCellsAliasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesResponse) + CreateShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.CreateShardResponse) return object; - var message = new $root.vtctldata.GetCellsAliasesResponse(); - if (object.aliases) { - if (typeof object.aliases !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases = {}; - for (var keys = Object.keys(object.aliases), i = 0; i < keys.length; ++i) { - if (typeof object.aliases[keys[i]] !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases[keys[i]] = $root.topodata.CellsAlias.fromObject(object.aliases[keys[i]]); - } + var message = new $root.vtctldata.CreateShardResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.CreateShardResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); } + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.CreateShardResponse.shard: object expected"); + message.shard = $root.vtctldata.Shard.fromObject(object.shard); + } + if (object.shard_already_exists != null) + message.shard_already_exists = Boolean(object.shard_already_exists); return message; }; /** - * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @static - * @param {vtctldata.GetCellsAliasesResponse} message GetCellsAliasesResponse + * @param {vtctldata.CreateShardResponse} message CreateShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCellsAliasesResponse.toObject = function toObject(message, options) { + CreateShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.aliases = {}; - var keys2; - if (message.aliases && (keys2 = Object.keys(message.aliases)).length) { - object.aliases = {}; - for (var j = 0; j < keys2.length; ++j) - object.aliases[keys2[j]] = $root.topodata.CellsAlias.toObject(message.aliases[keys2[j]], options); + if (options.defaults) { + object.keyspace = null; + object.shard = null; + object.shard_already_exists = false; } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.vtctldata.Shard.toObject(message.shard, options); + if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) + object.shard_already_exists = message.shard_already_exists; return object; }; /** - * Converts this GetCellsAliasesResponse to JSON. + * Converts this CreateShardResponse to JSON. * @function toJSON - * @memberof vtctldata.GetCellsAliasesResponse + * @memberof vtctldata.CreateShardResponse * @instance * @returns {Object.} JSON object */ - GetCellsAliasesResponse.prototype.toJSON = function toJSON() { + CreateShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCellsAliasesResponse; + return CreateShardResponse; })(); - vtctldata.GetFullStatusRequest = (function() { + vtctldata.DeleteCellInfoRequest = (function() { /** - * Properties of a GetFullStatusRequest. + * Properties of a DeleteCellInfoRequest. * @memberof vtctldata - * @interface IGetFullStatusRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetFullStatusRequest tablet_alias + * @interface IDeleteCellInfoRequest + * @property {string|null} [name] DeleteCellInfoRequest name + * @property {boolean|null} [force] DeleteCellInfoRequest force */ /** - * Constructs a new GetFullStatusRequest. + * Constructs a new DeleteCellInfoRequest. * @memberof vtctldata - * @classdesc Represents a GetFullStatusRequest. - * @implements IGetFullStatusRequest + * @classdesc Represents a DeleteCellInfoRequest. + * @implements IDeleteCellInfoRequest * @constructor - * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set */ - function GetFullStatusRequest(properties) { + function DeleteCellInfoRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95052,75 +97429,88 @@ $root.vtctldata = (function() { } /** - * GetFullStatusRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetFullStatusRequest + * DeleteCellInfoRequest name. + * @member {string} name + * @memberof vtctldata.DeleteCellInfoRequest * @instance */ - GetFullStatusRequest.prototype.tablet_alias = null; + DeleteCellInfoRequest.prototype.name = ""; /** - * Creates a new GetFullStatusRequest instance using the specified properties. + * DeleteCellInfoRequest force. + * @member {boolean} force + * @memberof vtctldata.DeleteCellInfoRequest + * @instance + */ + DeleteCellInfoRequest.prototype.force = false; + + /** + * Creates a new DeleteCellInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest instance + * @param {vtctldata.IDeleteCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest instance */ - GetFullStatusRequest.create = function create(properties) { - return new GetFullStatusRequest(properties); + DeleteCellInfoRequest.create = function create(properties) { + return new DeleteCellInfoRequest(properties); }; /** - * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * Encodes the specified DeleteCellInfoRequest message. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusRequest.encode = function encode(message, writer) { + DeleteCellInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. + * Encodes the specified DeleteCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode + * @param {vtctldata.IDeleteCellInfoRequest} message DeleteCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusRequest.decode = function decode(reader, length) { + DeleteCellInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -95131,112 +97521,115 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFullStatusRequest message. + * Verifies a DeleteCellInfoRequest message. * @function verify - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFullStatusRequest.verify = function verify(message) { + DeleteCellInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest + * @returns {vtctldata.DeleteCellInfoRequest} DeleteCellInfoRequest */ - GetFullStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetFullStatusRequest) + DeleteCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellInfoRequest) return object; - var message = new $root.vtctldata.GetFullStatusRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetFullStatusRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } + var message = new $root.vtctldata.DeleteCellInfoRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @static - * @param {vtctldata.GetFullStatusRequest} message GetFullStatusRequest + * @param {vtctldata.DeleteCellInfoRequest} message DeleteCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFullStatusRequest.toObject = function toObject(message, options) { + DeleteCellInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this GetFullStatusRequest to JSON. + * Converts this DeleteCellInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.GetFullStatusRequest + * @memberof vtctldata.DeleteCellInfoRequest * @instance * @returns {Object.} JSON object */ - GetFullStatusRequest.prototype.toJSON = function toJSON() { + DeleteCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFullStatusRequest; + return DeleteCellInfoRequest; })(); - vtctldata.GetFullStatusResponse = (function() { + vtctldata.DeleteCellInfoResponse = (function() { /** - * Properties of a GetFullStatusResponse. + * Properties of a DeleteCellInfoResponse. * @memberof vtctldata - * @interface IGetFullStatusResponse - * @property {replicationdata.IFullStatus|null} [status] GetFullStatusResponse status + * @interface IDeleteCellInfoResponse */ /** - * Constructs a new GetFullStatusResponse. + * Constructs a new DeleteCellInfoResponse. * @memberof vtctldata - * @classdesc Represents a GetFullStatusResponse. - * @implements IGetFullStatusResponse + * @classdesc Represents a DeleteCellInfoResponse. + * @implements IDeleteCellInfoResponse * @constructor - * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set */ - function GetFullStatusResponse(properties) { + function DeleteCellInfoResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95244,76 +97637,63 @@ $root.vtctldata = (function() { } /** - * GetFullStatusResponse status. - * @member {replicationdata.IFullStatus|null|undefined} status - * @memberof vtctldata.GetFullStatusResponse - * @instance - */ - GetFullStatusResponse.prototype.status = null; - - /** - * Creates a new GetFullStatusResponse instance using the specified properties. + * Creates a new DeleteCellInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse instance + * @param {vtctldata.IDeleteCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse instance */ - GetFullStatusResponse.create = function create(properties) { - return new GetFullStatusResponse(properties); + DeleteCellInfoResponse.create = function create(properties) { + return new DeleteCellInfoResponse(properties); }; /** - * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * Encodes the specified DeleteCellInfoResponse message. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode + * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusResponse.encode = function encode(message, writer) { + DeleteCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.replicationdata.FullStatus.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. + * Encodes the specified DeleteCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode + * @param {vtctldata.IDeleteCellInfoResponse} message DeleteCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFullStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusResponse.decode = function decode(reader, length) { + DeleteCellInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = $root.replicationdata.FullStatus.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -95323,111 +97703,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFullStatusResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFullStatusResponse message. + * Verifies a DeleteCellInfoResponse message. * @function verify - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFullStatusResponse.verify = function verify(message) { + DeleteCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.replicationdata.FullStatus.verify(message.status); - if (error) - return "status." + error; - } return null; }; /** - * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse + * @returns {vtctldata.DeleteCellInfoResponse} DeleteCellInfoResponse */ - GetFullStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetFullStatusResponse) + DeleteCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellInfoResponse) return object; - var message = new $root.vtctldata.GetFullStatusResponse(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".vtctldata.GetFullStatusResponse.status: object expected"); - message.status = $root.replicationdata.FullStatus.fromObject(object.status); - } - return message; + return new $root.vtctldata.DeleteCellInfoResponse(); }; /** - * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @static - * @param {vtctldata.GetFullStatusResponse} message GetFullStatusResponse + * @param {vtctldata.DeleteCellInfoResponse} message DeleteCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFullStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.replicationdata.FullStatus.toObject(message.status, options); - return object; + DeleteCellInfoResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetFullStatusResponse to JSON. + * Converts this DeleteCellInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.GetFullStatusResponse + * @memberof vtctldata.DeleteCellInfoResponse * @instance * @returns {Object.} JSON object */ - GetFullStatusResponse.prototype.toJSON = function toJSON() { + DeleteCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFullStatusResponse; + return DeleteCellInfoResponse; })(); - vtctldata.GetKeyspacesRequest = (function() { + vtctldata.DeleteCellsAliasRequest = (function() { /** - * Properties of a GetKeyspacesRequest. + * Properties of a DeleteCellsAliasRequest. * @memberof vtctldata - * @interface IGetKeyspacesRequest + * @interface IDeleteCellsAliasRequest + * @property {string|null} [name] DeleteCellsAliasRequest name */ /** - * Constructs a new GetKeyspacesRequest. + * Constructs a new DeleteCellsAliasRequest. * @memberof vtctldata - * @classdesc Represents a GetKeyspacesRequest. - * @implements IGetKeyspacesRequest + * @classdesc Represents a DeleteCellsAliasRequest. + * @implements IDeleteCellsAliasRequest * @constructor - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set */ - function GetKeyspacesRequest(properties) { + function DeleteCellsAliasRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95435,63 +97798,76 @@ $root.vtctldata = (function() { } /** - * Creates a new GetKeyspacesRequest instance using the specified properties. + * DeleteCellsAliasRequest name. + * @member {string} name + * @memberof vtctldata.DeleteCellsAliasRequest + * @instance + */ + DeleteCellsAliasRequest.prototype.name = ""; + + /** + * Creates a new DeleteCellsAliasRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest instance + * @param {vtctldata.IDeleteCellsAliasRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest instance */ - GetKeyspacesRequest.create = function create(properties) { - return new GetKeyspacesRequest(properties); + DeleteCellsAliasRequest.create = function create(properties) { + return new DeleteCellsAliasRequest(properties); }; /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * Encodes the specified DeleteCellsAliasRequest message. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesRequest.encode = function encode(message, writer) { + DeleteCellsAliasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. + * Encodes the specified DeleteCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasRequest} message DeleteCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesRequest.decode = function decode(reader, length) { + DeleteCellsAliasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -95501,95 +97877,106 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspacesRequest message. + * Verifies a DeleteCellsAliasRequest message. * @function verify - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspacesRequest.verify = function verify(message) { + DeleteCellsAliasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest + * @returns {vtctldata.DeleteCellsAliasRequest} DeleteCellsAliasRequest */ - GetKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesRequest) + DeleteCellsAliasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellsAliasRequest) return object; - return new $root.vtctldata.GetKeyspacesRequest(); + var message = new $root.vtctldata.DeleteCellsAliasRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellsAliasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @static - * @param {vtctldata.GetKeyspacesRequest} message GetKeyspacesRequest + * @param {vtctldata.DeleteCellsAliasRequest} message DeleteCellsAliasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspacesRequest.toObject = function toObject() { - return {}; + DeleteCellsAliasRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; }; /** - * Converts this GetKeyspacesRequest to JSON. + * Converts this DeleteCellsAliasRequest to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspacesRequest + * @memberof vtctldata.DeleteCellsAliasRequest * @instance * @returns {Object.} JSON object */ - GetKeyspacesRequest.prototype.toJSON = function toJSON() { + DeleteCellsAliasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetKeyspacesRequest; + return DeleteCellsAliasRequest; })(); - vtctldata.GetKeyspacesResponse = (function() { + vtctldata.DeleteCellsAliasResponse = (function() { /** - * Properties of a GetKeyspacesResponse. + * Properties of a DeleteCellsAliasResponse. * @memberof vtctldata - * @interface IGetKeyspacesResponse - * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces + * @interface IDeleteCellsAliasResponse */ /** - * Constructs a new GetKeyspacesResponse. + * Constructs a new DeleteCellsAliasResponse. * @memberof vtctldata - * @classdesc Represents a GetKeyspacesResponse. - * @implements IGetKeyspacesResponse + * @classdesc Represents a DeleteCellsAliasResponse. + * @implements IDeleteCellsAliasResponse * @constructor - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set */ - function GetKeyspacesResponse(properties) { - this.keyspaces = []; + function DeleteCellsAliasResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95597,79 +97984,63 @@ $root.vtctldata = (function() { } /** - * GetKeyspacesResponse keyspaces. - * @member {Array.} keyspaces - * @memberof vtctldata.GetKeyspacesResponse - * @instance - */ - GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; - - /** - * Creates a new GetKeyspacesResponse instance using the specified properties. + * Creates a new DeleteCellsAliasResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse instance + * @param {vtctldata.IDeleteCellsAliasResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse instance */ - GetKeyspacesResponse.create = function create(properties) { - return new GetKeyspacesResponse(properties); + DeleteCellsAliasResponse.create = function create(properties) { + return new DeleteCellsAliasResponse(properties); }; /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * Encodes the specified DeleteCellsAliasResponse message. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesResponse.encode = function encode(message, writer) { + DeleteCellsAliasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspaces != null && message.keyspaces.length) - for (var i = 0; i < message.keyspaces.length; ++i) - $root.vtctldata.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. + * Encodes the specified DeleteCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteCellsAliasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode + * @param {vtctldata.IDeleteCellsAliasResponse} message DeleteCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesResponse.decode = function decode(reader, length) { + DeleteCellsAliasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteCellsAliasResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.keyspaces && message.keyspaces.length)) - message.keyspaces = []; - message.keyspaces.push($root.vtctldata.Keyspace.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -95679,124 +98050,96 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteCellsAliasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspacesResponse message. + * Verifies a DeleteCellsAliasResponse message. * @function verify - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspacesResponse.verify = function verify(message) { + DeleteCellsAliasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { - if (!Array.isArray(message.keyspaces)) - return "keyspaces: array expected"; - for (var i = 0; i < message.keyspaces.length; ++i) { - var error = $root.vtctldata.Keyspace.verify(message.keyspaces[i]); - if (error) - return "keyspaces." + error; - } - } return null; }; /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse + * @returns {vtctldata.DeleteCellsAliasResponse} DeleteCellsAliasResponse */ - GetKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesResponse) + DeleteCellsAliasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteCellsAliasResponse) return object; - var message = new $root.vtctldata.GetKeyspacesResponse(); - if (object.keyspaces) { - if (!Array.isArray(object.keyspaces)) - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: array expected"); - message.keyspaces = []; - for (var i = 0; i < object.keyspaces.length; ++i) { - if (typeof object.keyspaces[i] !== "object") - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: object expected"); - message.keyspaces[i] = $root.vtctldata.Keyspace.fromObject(object.keyspaces[i]); - } - } - return message; + return new $root.vtctldata.DeleteCellsAliasResponse(); }; /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCellsAliasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @static - * @param {vtctldata.GetKeyspacesResponse} message GetKeyspacesResponse + * @param {vtctldata.DeleteCellsAliasResponse} message DeleteCellsAliasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspacesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keyspaces = []; - if (message.keyspaces && message.keyspaces.length) { - object.keyspaces = []; - for (var j = 0; j < message.keyspaces.length; ++j) - object.keyspaces[j] = $root.vtctldata.Keyspace.toObject(message.keyspaces[j], options); - } - return object; + DeleteCellsAliasResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetKeyspacesResponse to JSON. + * Converts this DeleteCellsAliasResponse to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspacesResponse + * @memberof vtctldata.DeleteCellsAliasResponse * @instance * @returns {Object.} JSON object */ - GetKeyspacesResponse.prototype.toJSON = function toJSON() { + DeleteCellsAliasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetKeyspacesResponse; + return DeleteCellsAliasResponse; })(); - vtctldata.GetKeyspaceRequest = (function() { + vtctldata.DeleteKeyspaceRequest = (function() { /** - * Properties of a GetKeyspaceRequest. + * Properties of a DeleteKeyspaceRequest. * @memberof vtctldata - * @interface IGetKeyspaceRequest - * @property {string|null} [keyspace] GetKeyspaceRequest keyspace + * @interface IDeleteKeyspaceRequest + * @property {string|null} [keyspace] DeleteKeyspaceRequest keyspace + * @property {boolean|null} [recursive] DeleteKeyspaceRequest recursive + * @property {boolean|null} [force] DeleteKeyspaceRequest force */ /** - * Constructs a new GetKeyspaceRequest. + * Constructs a new DeleteKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceRequest. - * @implements IGetKeyspaceRequest + * @classdesc Represents a DeleteKeyspaceRequest. + * @implements IDeleteKeyspaceRequest * @constructor - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set */ - function GetKeyspaceRequest(properties) { + function DeleteKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95804,76 +98147,102 @@ $root.vtctldata = (function() { } /** - * GetKeyspaceRequest keyspace. + * DeleteKeyspaceRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @instance */ - GetKeyspaceRequest.prototype.keyspace = ""; + DeleteKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new GetKeyspaceRequest instance using the specified properties. + * DeleteKeyspaceRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.DeleteKeyspaceRequest + * @instance + */ + DeleteKeyspaceRequest.prototype.recursive = false; + + /** + * DeleteKeyspaceRequest force. + * @member {boolean} force + * @memberof vtctldata.DeleteKeyspaceRequest + * @instance + */ + DeleteKeyspaceRequest.prototype.force = false; + + /** + * Creates a new DeleteKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest instance + * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest instance */ - GetKeyspaceRequest.create = function create(properties) { - return new GetKeyspaceRequest(properties); + DeleteKeyspaceRequest.create = function create(properties) { + return new DeleteKeyspaceRequest(properties); }; /** - * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRequest.encode = function encode(message, writer) { + DeleteKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. + * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRequest.decode = function decode(reader, length) { + DeleteKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.keyspace = reader.string(); break; + case 2: + message.recursive = reader.bool(); + break; + case 3: + message.force = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -95883,107 +98252,123 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceRequest message. + * Verifies a DeleteKeyspaceRequest message. * @function verify - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceRequest.verify = function verify(message) { + DeleteKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest + * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest */ - GetKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceRequest) + DeleteKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteKeyspaceRequest) return object; - var message = new $root.vtctldata.GetKeyspaceRequest(); + var message = new $root.vtctldata.DeleteKeyspaceRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @static - * @param {vtctldata.GetKeyspaceRequest} message GetKeyspaceRequest + * @param {vtctldata.DeleteKeyspaceRequest} message DeleteKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceRequest.toObject = function toObject(message, options) { + DeleteKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.keyspace = ""; + object.recursive = false; + object.force = false; + } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this GetKeyspaceRequest to JSON. + * Converts this DeleteKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceRequest + * @memberof vtctldata.DeleteKeyspaceRequest * @instance * @returns {Object.} JSON object */ - GetKeyspaceRequest.prototype.toJSON = function toJSON() { + DeleteKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetKeyspaceRequest; + return DeleteKeyspaceRequest; })(); - vtctldata.GetKeyspaceResponse = (function() { + vtctldata.DeleteKeyspaceResponse = (function() { /** - * Properties of a GetKeyspaceResponse. + * Properties of a DeleteKeyspaceResponse. * @memberof vtctldata - * @interface IGetKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] GetKeyspaceResponse keyspace + * @interface IDeleteKeyspaceResponse */ /** - * Constructs a new GetKeyspaceResponse. + * Constructs a new DeleteKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a GetKeyspaceResponse. - * @implements IGetKeyspaceResponse + * @classdesc Represents a DeleteKeyspaceResponse. + * @implements IDeleteKeyspaceResponse * @constructor - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set */ - function GetKeyspaceResponse(properties) { + function DeleteKeyspaceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95991,76 +98376,63 @@ $root.vtctldata = (function() { } /** - * GetKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.GetKeyspaceResponse - * @instance - */ - GetKeyspaceResponse.prototype.keyspace = null; - - /** - * Creates a new GetKeyspaceResponse instance using the specified properties. + * Creates a new DeleteKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse instance + * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse instance */ - GetKeyspaceResponse.create = function create(properties) { - return new GetKeyspaceResponse(properties); + DeleteKeyspaceResponse.create = function create(properties) { + return new DeleteKeyspaceResponse(properties); }; /** - * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceResponse.encode = function encode(message, writer) { + DeleteKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. + * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode + * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceResponse.decode = function decode(reader, length) { + DeleteKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -96070,112 +98442,98 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetKeyspaceResponse message. + * Verifies a DeleteKeyspaceResponse message. * @function verify - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetKeyspaceResponse.verify = function verify(message) { + DeleteKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } return null; }; /** - * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse + * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse */ - GetKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceResponse) + DeleteKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteKeyspaceResponse) return object; - var message = new $root.vtctldata.GetKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.GetKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); - } - return message; + return new $root.vtctldata.DeleteKeyspaceResponse(); }; /** - * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @static - * @param {vtctldata.GetKeyspaceResponse} message GetKeyspaceResponse + * @param {vtctldata.DeleteKeyspaceResponse} message DeleteKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetKeyspaceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - return object; + DeleteKeyspaceResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetKeyspaceResponse to JSON. + * Converts this DeleteKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.GetKeyspaceResponse + * @memberof vtctldata.DeleteKeyspaceResponse * @instance * @returns {Object.} JSON object */ - GetKeyspaceResponse.prototype.toJSON = function toJSON() { + DeleteKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetKeyspaceResponse; + return DeleteKeyspaceResponse; })(); - vtctldata.GetPermissionsRequest = (function() { + vtctldata.DeleteShardsRequest = (function() { /** - * Properties of a GetPermissionsRequest. + * Properties of a DeleteShardsRequest. * @memberof vtctldata - * @interface IGetPermissionsRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetPermissionsRequest tablet_alias + * @interface IDeleteShardsRequest + * @property {Array.|null} [shards] DeleteShardsRequest shards + * @property {boolean|null} [recursive] DeleteShardsRequest recursive + * @property {boolean|null} [even_if_serving] DeleteShardsRequest even_if_serving + * @property {boolean|null} [force] DeleteShardsRequest force */ /** - * Constructs a new GetPermissionsRequest. + * Constructs a new DeleteShardsRequest. * @memberof vtctldata - * @classdesc Represents a GetPermissionsRequest. - * @implements IGetPermissionsRequest + * @classdesc Represents a DeleteShardsRequest. + * @implements IDeleteShardsRequest * @constructor - * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set */ - function GetPermissionsRequest(properties) { + function DeleteShardsRequest(properties) { + this.shards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96183,75 +98541,117 @@ $root.vtctldata = (function() { } /** - * GetPermissionsRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetPermissionsRequest + * DeleteShardsRequest shards. + * @member {Array.} shards + * @memberof vtctldata.DeleteShardsRequest * @instance */ - GetPermissionsRequest.prototype.tablet_alias = null; + DeleteShardsRequest.prototype.shards = $util.emptyArray; /** - * Creates a new GetPermissionsRequest instance using the specified properties. + * DeleteShardsRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.DeleteShardsRequest + * @instance + */ + DeleteShardsRequest.prototype.recursive = false; + + /** + * DeleteShardsRequest even_if_serving. + * @member {boolean} even_if_serving + * @memberof vtctldata.DeleteShardsRequest + * @instance + */ + DeleteShardsRequest.prototype.even_if_serving = false; + + /** + * DeleteShardsRequest force. + * @member {boolean} force + * @memberof vtctldata.DeleteShardsRequest + * @instance + */ + DeleteShardsRequest.prototype.force = false; + + /** + * Creates a new DeleteShardsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest instance + * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest instance */ - GetPermissionsRequest.create = function create(properties) { - return new GetPermissionsRequest(properties); + DeleteShardsRequest.create = function create(properties) { + return new DeleteShardsRequest(properties); }; /** - * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode + * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsRequest.encode = function encode(message, writer) { + DeleteShardsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shards != null && message.shards.length) + for (var i = 0; i < message.shards.length; ++i) + $root.vtctldata.Shard.encode(message.shards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); + if (message.even_if_serving != null && Object.hasOwnProperty.call(message, "even_if_serving")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.even_if_serving); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; /** - * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. + * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode + * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteShardsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer. + * Decodes a DeleteShardsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsRequest.decode = function decode(reader, length) { + DeleteShardsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + if (!(message.shards && message.shards.length)) + message.shards = []; + message.shards.push($root.vtctldata.Shard.decode(reader, reader.uint32())); + break; + case 2: + message.recursive = reader.bool(); + break; + case 4: + message.even_if_serving = reader.bool(); + break; + case 5: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -96262,112 +98662,149 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteShardsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPermissionsRequest message. + * Verifies a DeleteShardsRequest message. * @function verify - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPermissionsRequest.verify = function verify(message) { + DeleteShardsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (var i = 0; i < message.shards.length; ++i) { + var error = $root.vtctldata.Shard.verify(message.shards[i]); + if (error) + return "shards." + error; + } } + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; + if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) + if (typeof message.even_if_serving !== "boolean") + return "even_if_serving: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest + * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest */ - GetPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetPermissionsRequest) + DeleteShardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteShardsRequest) return object; - var message = new $root.vtctldata.GetPermissionsRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetPermissionsRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.DeleteShardsRequest(); + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".vtctldata.DeleteShardsRequest.shards: array expected"); + message.shards = []; + for (var i = 0; i < object.shards.length; ++i) { + if (typeof object.shards[i] !== "object") + throw TypeError(".vtctldata.DeleteShardsRequest.shards: object expected"); + message.shards[i] = $root.vtctldata.Shard.fromObject(object.shards[i]); + } } + if (object.recursive != null) + message.recursive = Boolean(object.recursive); + if (object.even_if_serving != null) + message.even_if_serving = Boolean(object.even_if_serving); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @static - * @param {vtctldata.GetPermissionsRequest} message GetPermissionsRequest + * @param {vtctldata.DeleteShardsRequest} message DeleteShardsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPermissionsRequest.toObject = function toObject(message, options) { + DeleteShardsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (options.arrays || options.defaults) + object.shards = []; + if (options.defaults) { + object.recursive = false; + object.even_if_serving = false; + object.force = false; + } + if (message.shards && message.shards.length) { + object.shards = []; + for (var j = 0; j < message.shards.length; ++j) + object.shards[j] = $root.vtctldata.Shard.toObject(message.shards[j], options); + } + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; + if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) + object.even_if_serving = message.even_if_serving; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this GetPermissionsRequest to JSON. + * Converts this DeleteShardsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetPermissionsRequest + * @memberof vtctldata.DeleteShardsRequest * @instance * @returns {Object.} JSON object */ - GetPermissionsRequest.prototype.toJSON = function toJSON() { + DeleteShardsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPermissionsRequest; + return DeleteShardsRequest; })(); - vtctldata.GetPermissionsResponse = (function() { + vtctldata.DeleteShardsResponse = (function() { /** - * Properties of a GetPermissionsResponse. + * Properties of a DeleteShardsResponse. * @memberof vtctldata - * @interface IGetPermissionsResponse - * @property {tabletmanagerdata.IPermissions|null} [permissions] GetPermissionsResponse permissions + * @interface IDeleteShardsResponse */ /** - * Constructs a new GetPermissionsResponse. + * Constructs a new DeleteShardsResponse. * @memberof vtctldata - * @classdesc Represents a GetPermissionsResponse. - * @implements IGetPermissionsResponse + * @classdesc Represents a DeleteShardsResponse. + * @implements IDeleteShardsResponse * @constructor - * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set */ - function GetPermissionsResponse(properties) { + function DeleteShardsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96375,76 +98812,63 @@ $root.vtctldata = (function() { } /** - * GetPermissionsResponse permissions. - * @member {tabletmanagerdata.IPermissions|null|undefined} permissions - * @memberof vtctldata.GetPermissionsResponse - * @instance - */ - GetPermissionsResponse.prototype.permissions = null; - - /** - * Creates a new GetPermissionsResponse instance using the specified properties. + * Creates a new DeleteShardsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse instance + * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse instance */ - GetPermissionsResponse.create = function create(properties) { - return new GetPermissionsResponse(properties); + DeleteShardsResponse.create = function create(properties) { + return new DeleteShardsResponse(properties); }; /** - * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode + * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsResponse.encode = function encode(message, writer) { + DeleteShardsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.tabletmanagerdata.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. + * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode + * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteShardsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer. + * Decodes a DeleteShardsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsResponse.decode = function decode(reader, length) { + DeleteShardsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.permissions = $root.tabletmanagerdata.Permissions.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -96454,111 +98878,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteShardsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPermissionsResponse message. + * Verifies a DeleteShardsResponse message. * @function verify - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPermissionsResponse.verify = function verify(message) { + DeleteShardsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - var error = $root.tabletmanagerdata.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } return null; }; /** - * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse + * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse */ - GetPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetPermissionsResponse) + DeleteShardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteShardsResponse) return object; - var message = new $root.vtctldata.GetPermissionsResponse(); - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".vtctldata.GetPermissionsResponse.permissions: object expected"); - message.permissions = $root.tabletmanagerdata.Permissions.fromObject(object.permissions); - } - return message; + return new $root.vtctldata.DeleteShardsResponse(); }; /** - * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @static - * @param {vtctldata.GetPermissionsResponse} message GetPermissionsResponse + * @param {vtctldata.DeleteShardsResponse} message DeleteShardsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.permissions = null; - if (message.permissions != null && message.hasOwnProperty("permissions")) - object.permissions = $root.tabletmanagerdata.Permissions.toObject(message.permissions, options); - return object; + DeleteShardsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetPermissionsResponse to JSON. + * Converts this DeleteShardsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetPermissionsResponse + * @memberof vtctldata.DeleteShardsResponse * @instance * @returns {Object.} JSON object */ - GetPermissionsResponse.prototype.toJSON = function toJSON() { + DeleteShardsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPermissionsResponse; + return DeleteShardsResponse; })(); - vtctldata.GetRoutingRulesRequest = (function() { + vtctldata.DeleteSrvVSchemaRequest = (function() { /** - * Properties of a GetRoutingRulesRequest. + * Properties of a DeleteSrvVSchemaRequest. * @memberof vtctldata - * @interface IGetRoutingRulesRequest + * @interface IDeleteSrvVSchemaRequest + * @property {string|null} [cell] DeleteSrvVSchemaRequest cell */ /** - * Constructs a new GetRoutingRulesRequest. + * Constructs a new DeleteSrvVSchemaRequest. * @memberof vtctldata - * @classdesc Represents a GetRoutingRulesRequest. - * @implements IGetRoutingRulesRequest + * @classdesc Represents a DeleteSrvVSchemaRequest. + * @implements IDeleteSrvVSchemaRequest * @constructor - * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set */ - function GetRoutingRulesRequest(properties) { + function DeleteSrvVSchemaRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96566,63 +98973,76 @@ $root.vtctldata = (function() { } /** - * Creates a new GetRoutingRulesRequest instance using the specified properties. + * DeleteSrvVSchemaRequest cell. + * @member {string} cell + * @memberof vtctldata.DeleteSrvVSchemaRequest + * @instance + */ + DeleteSrvVSchemaRequest.prototype.cell = ""; + + /** + * Creates a new DeleteSrvVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest instance + * @param {vtctldata.IDeleteSrvVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest instance */ - GetRoutingRulesRequest.create = function create(properties) { - return new GetRoutingRulesRequest(properties); + DeleteSrvVSchemaRequest.create = function create(properties) { + return new DeleteSrvVSchemaRequest(properties); }; /** - * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaRequest message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesRequest.encode = function encode(message, writer) { + DeleteSrvVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesRequest.decode = function decode(reader, length) { + DeleteSrvVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.cell = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -96632,94 +99052,106 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRoutingRulesRequest message. + * Verifies a DeleteSrvVSchemaRequest message. * @function verify - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRoutingRulesRequest.verify = function verify(message) { + DeleteSrvVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + * @returns {vtctldata.DeleteSrvVSchemaRequest} DeleteSrvVSchemaRequest */ - GetRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetRoutingRulesRequest) + DeleteSrvVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteSrvVSchemaRequest) return object; - return new $root.vtctldata.GetRoutingRulesRequest(); + var message = new $root.vtctldata.DeleteSrvVSchemaRequest(); + if (object.cell != null) + message.cell = String(object.cell); + return message; }; /** - * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSrvVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @static - * @param {vtctldata.GetRoutingRulesRequest} message GetRoutingRulesRequest + * @param {vtctldata.DeleteSrvVSchemaRequest} message DeleteSrvVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRoutingRulesRequest.toObject = function toObject() { - return {}; + DeleteSrvVSchemaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + return object; }; /** - * Converts this GetRoutingRulesRequest to JSON. + * Converts this DeleteSrvVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.GetRoutingRulesRequest + * @memberof vtctldata.DeleteSrvVSchemaRequest * @instance * @returns {Object.} JSON object */ - GetRoutingRulesRequest.prototype.toJSON = function toJSON() { + DeleteSrvVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetRoutingRulesRequest; + return DeleteSrvVSchemaRequest; })(); - vtctldata.GetRoutingRulesResponse = (function() { + vtctldata.DeleteSrvVSchemaResponse = (function() { /** - * Properties of a GetRoutingRulesResponse. + * Properties of a DeleteSrvVSchemaResponse. * @memberof vtctldata - * @interface IGetRoutingRulesResponse - * @property {vschema.IRoutingRules|null} [routing_rules] GetRoutingRulesResponse routing_rules + * @interface IDeleteSrvVSchemaResponse */ /** - * Constructs a new GetRoutingRulesResponse. + * Constructs a new DeleteSrvVSchemaResponse. * @memberof vtctldata - * @classdesc Represents a GetRoutingRulesResponse. - * @implements IGetRoutingRulesResponse + * @classdesc Represents a DeleteSrvVSchemaResponse. + * @implements IDeleteSrvVSchemaResponse * @constructor - * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set */ - function GetRoutingRulesResponse(properties) { + function DeleteSrvVSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96727,76 +99159,63 @@ $root.vtctldata = (function() { } /** - * GetRoutingRulesResponse routing_rules. - * @member {vschema.IRoutingRules|null|undefined} routing_rules - * @memberof vtctldata.GetRoutingRulesResponse - * @instance - */ - GetRoutingRulesResponse.prototype.routing_rules = null; - - /** - * Creates a new GetRoutingRulesResponse instance using the specified properties. + * Creates a new DeleteSrvVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse instance + * @param {vtctldata.IDeleteSrvVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse instance */ - GetRoutingRulesResponse.create = function create(properties) { - return new GetRoutingRulesResponse(properties); + DeleteSrvVSchemaResponse.create = function create(properties) { + return new DeleteSrvVSchemaResponse(properties); }; /** - * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaResponse message. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesResponse.encode = function encode(message, writer) { + DeleteSrvVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) - $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. + * Encodes the specified DeleteSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteSrvVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IDeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesResponse.decode = function decode(reader, length) { + DeleteSrvVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteSrvVSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -96806,120 +99225,96 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRoutingRulesResponse message. + * Verifies a DeleteSrvVSchemaResponse message. * @function verify - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRoutingRulesResponse.verify = function verify(message) { + DeleteSrvVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { - var error = $root.vschema.RoutingRules.verify(message.routing_rules); - if (error) - return "routing_rules." + error; - } return null; }; /** - * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse + * @returns {vtctldata.DeleteSrvVSchemaResponse} DeleteSrvVSchemaResponse */ - GetRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetRoutingRulesResponse) + DeleteSrvVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteSrvVSchemaResponse) return object; - var message = new $root.vtctldata.GetRoutingRulesResponse(); - if (object.routing_rules != null) { - if (typeof object.routing_rules !== "object") - throw TypeError(".vtctldata.GetRoutingRulesResponse.routing_rules: object expected"); - message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); - } - return message; + return new $root.vtctldata.DeleteSrvVSchemaResponse(); }; /** - * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSrvVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @static - * @param {vtctldata.GetRoutingRulesResponse} message GetRoutingRulesResponse + * @param {vtctldata.DeleteSrvVSchemaResponse} message DeleteSrvVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRoutingRulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.routing_rules = null; - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) - object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); - return object; + DeleteSrvVSchemaResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetRoutingRulesResponse to JSON. + * Converts this DeleteSrvVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.GetRoutingRulesResponse + * @memberof vtctldata.DeleteSrvVSchemaResponse * @instance * @returns {Object.} JSON object */ - GetRoutingRulesResponse.prototype.toJSON = function toJSON() { + DeleteSrvVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetRoutingRulesResponse; + return DeleteSrvVSchemaResponse; })(); - vtctldata.GetSchemaRequest = (function() { + vtctldata.DeleteTabletsRequest = (function() { /** - * Properties of a GetSchemaRequest. + * Properties of a DeleteTabletsRequest. * @memberof vtctldata - * @interface IGetSchemaRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetSchemaRequest tablet_alias - * @property {Array.|null} [tables] GetSchemaRequest tables - * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables - * @property {boolean|null} [include_views] GetSchemaRequest include_views - * @property {boolean|null} [table_names_only] GetSchemaRequest table_names_only - * @property {boolean|null} [table_sizes_only] GetSchemaRequest table_sizes_only - * @property {boolean|null} [table_schema_only] GetSchemaRequest table_schema_only + * @interface IDeleteTabletsRequest + * @property {Array.|null} [tablet_aliases] DeleteTabletsRequest tablet_aliases + * @property {boolean|null} [allow_primary] DeleteTabletsRequest allow_primary */ /** - * Constructs a new GetSchemaRequest. + * Constructs a new DeleteTabletsRequest. * @memberof vtctldata - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest + * @classdesc Represents a DeleteTabletsRequest. + * @implements IDeleteTabletsRequest * @constructor - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set */ - function GetSchemaRequest(properties) { - this.tables = []; - this.exclude_tables = []; + function DeleteTabletsRequest(properties) { + this.tablet_aliases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96927,159 +99322,91 @@ $root.vtctldata = (function() { } /** - * GetSchemaRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tablet_alias = null; - - /** - * GetSchemaRequest tables. - * @member {Array.} tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tables = $util.emptyArray; - - /** - * GetSchemaRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; - - /** - * GetSchemaRequest include_views. - * @member {boolean} include_views - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.include_views = false; - - /** - * GetSchemaRequest table_names_only. - * @member {boolean} table_names_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_names_only = false; - - /** - * GetSchemaRequest table_sizes_only. - * @member {boolean} table_sizes_only - * @memberof vtctldata.GetSchemaRequest + * DeleteTabletsRequest tablet_aliases. + * @member {Array.} tablet_aliases + * @memberof vtctldata.DeleteTabletsRequest * @instance */ - GetSchemaRequest.prototype.table_sizes_only = false; + DeleteTabletsRequest.prototype.tablet_aliases = $util.emptyArray; /** - * GetSchemaRequest table_schema_only. - * @member {boolean} table_schema_only - * @memberof vtctldata.GetSchemaRequest + * DeleteTabletsRequest allow_primary. + * @member {boolean} allow_primary + * @memberof vtctldata.DeleteTabletsRequest * @instance */ - GetSchemaRequest.prototype.table_schema_only = false; + DeleteTabletsRequest.prototype.allow_primary = false; /** - * Creates a new GetSchemaRequest instance using the specified properties. + * Creates a new DeleteTabletsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest instance + * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest instance */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); + DeleteTabletsRequest.create = function create(properties) { + return new DeleteTabletsRequest(properties); }; /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encode = function encode(message, writer) { + DeleteTabletsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); - if (message.exclude_tables != null && message.exclude_tables.length) - for (var i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); - if (message.table_names_only != null && Object.hasOwnProperty.call(message, "table_names_only")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.table_names_only); - if (message.table_sizes_only != null && Object.hasOwnProperty.call(message, "table_sizes_only")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.table_sizes_only); - if (message.table_schema_only != null && Object.hasOwnProperty.call(message, "table_schema_only")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.table_schema_only); + if (message.tablet_aliases != null && message.tablet_aliases.length) + for (var i = 0; i < message.tablet_aliases.length; ++i) + $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); return writer; }; /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. + * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaRequest.decode = function decode(reader, length) { + DeleteTabletsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + if (!(message.tablet_aliases && message.tablet_aliases.length)) + message.tablet_aliases = []; + message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); break; case 2: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 3: - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - case 4: - message.include_views = reader.bool(); - break; - case 5: - message.table_names_only = reader.bool(); - break; - case 6: - message.table_sizes_only = reader.bool(); - break; - case 7: - message.table_schema_only = reader.bool(); + message.allow_primary = reader.bool(); break; default: reader.skipType(tag & 7); @@ -97090,187 +99417,132 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTabletsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaRequest message. + * Verifies a DeleteTabletsRequest message. * @function verify - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaRequest.verify = function verify(message) { + DeleteTabletsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (var i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; + if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { + if (!Array.isArray(message.tablet_aliases)) + return "tablet_aliases: array expected"; + for (var i = 0; i < message.tablet_aliases.length; ++i) { + var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); + if (error) + return "tablet_aliases." + error; + } } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - if (typeof message.table_names_only !== "boolean") - return "table_names_only: boolean expected"; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - if (typeof message.table_sizes_only !== "boolean") - return "table_sizes_only: boolean expected"; - if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) - if (typeof message.table_schema_only !== "boolean") - return "table_schema_only: boolean expected"; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + if (typeof message.allow_primary !== "boolean") + return "allow_primary: boolean expected"; return null; }; /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest + * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaRequest) + DeleteTabletsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteTabletsRequest) return object; - var message = new $root.vtctldata.GetSchemaRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetSchemaRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".vtctldata.GetSchemaRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".vtctldata.GetSchemaRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (var i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); + var message = new $root.vtctldata.DeleteTabletsRequest(); + if (object.tablet_aliases) { + if (!Array.isArray(object.tablet_aliases)) + throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: array expected"); + message.tablet_aliases = []; + for (var i = 0; i < object.tablet_aliases.length; ++i) { + if (typeof object.tablet_aliases[i] !== "object") + throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: object expected"); + message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); + } } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); - if (object.table_names_only != null) - message.table_names_only = Boolean(object.table_names_only); - if (object.table_sizes_only != null) - message.table_sizes_only = Boolean(object.table_sizes_only); - if (object.table_schema_only != null) - message.table_schema_only = Boolean(object.table_schema_only); + if (object.allow_primary != null) + message.allow_primary = Boolean(object.allow_primary); return message; }; /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @static - * @param {vtctldata.GetSchemaRequest} message GetSchemaRequest + * @param {vtctldata.DeleteTabletsRequest} message DeleteTabletsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaRequest.toObject = function toObject(message, options) { + DeleteTabletsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.exclude_tables = []; - } - if (options.defaults) { - object.tablet_alias = null; - object.include_views = false; - object.table_names_only = false; - object.table_sizes_only = false; - object.table_schema_only = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (var j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; + if (options.arrays || options.defaults) + object.tablet_aliases = []; + if (options.defaults) + object.allow_primary = false; + if (message.tablet_aliases && message.tablet_aliases.length) { + object.tablet_aliases = []; + for (var j = 0; j < message.tablet_aliases.length; ++j) + object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - object.table_names_only = message.table_names_only; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - object.table_sizes_only = message.table_sizes_only; - if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) - object.table_schema_only = message.table_schema_only; + if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) + object.allow_primary = message.allow_primary; return object; }; /** - * Converts this GetSchemaRequest to JSON. + * Converts this DeleteTabletsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaRequest + * @memberof vtctldata.DeleteTabletsRequest * @instance * @returns {Object.} JSON object */ - GetSchemaRequest.prototype.toJSON = function toJSON() { + DeleteTabletsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSchemaRequest; + return DeleteTabletsRequest; })(); - vtctldata.GetSchemaResponse = (function() { + vtctldata.DeleteTabletsResponse = (function() { /** - * Properties of a GetSchemaResponse. + * Properties of a DeleteTabletsResponse. * @memberof vtctldata - * @interface IGetSchemaResponse - * @property {tabletmanagerdata.ISchemaDefinition|null} [schema] GetSchemaResponse schema + * @interface IDeleteTabletsResponse */ /** - * Constructs a new GetSchemaResponse. + * Constructs a new DeleteTabletsResponse. * @memberof vtctldata - * @classdesc Represents a GetSchemaResponse. - * @implements IGetSchemaResponse + * @classdesc Represents a DeleteTabletsResponse. + * @implements IDeleteTabletsResponse * @constructor - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set */ - function GetSchemaResponse(properties) { + function DeleteTabletsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97278,76 +99550,63 @@ $root.vtctldata = (function() { } /** - * GetSchemaResponse schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema - * @memberof vtctldata.GetSchemaResponse - * @instance - */ - GetSchemaResponse.prototype.schema = null; - - /** - * Creates a new GetSchemaResponse instance using the specified properties. + * Creates a new DeleteTabletsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse instance + * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse instance */ - GetSchemaResponse.create = function create(properties) { - return new GetSchemaResponse(properties); + DeleteTabletsResponse.create = function create(properties) { + return new DeleteTabletsResponse(properties); }; /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encode = function encode(message, writer) { + DeleteTabletsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. + * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode + * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decode = function decode(reader, length) { + DeleteTabletsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -97357,113 +99616,100 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteTabletsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSchemaResponse message. + * Verifies a DeleteTabletsResponse message. * @function verify - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSchemaResponse.verify = function verify(message) { + DeleteTabletsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema); - if (error) - return "schema." + error; - } return null; }; /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse + * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse */ - GetSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaResponse) + DeleteTabletsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.DeleteTabletsResponse) return object; - var message = new $root.vtctldata.GetSchemaResponse(); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".vtctldata.GetSchemaResponse.schema: object expected"); - message.schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema); - } - return message; + return new $root.vtctldata.DeleteTabletsResponse(); }; /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @static - * @param {vtctldata.GetSchemaResponse} message GetSchemaResponse + * @param {vtctldata.DeleteTabletsResponse} message DeleteTabletsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.schema = null; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema, options); - return object; + DeleteTabletsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetSchemaResponse to JSON. + * Converts this DeleteTabletsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSchemaResponse + * @memberof vtctldata.DeleteTabletsResponse * @instance * @returns {Object.} JSON object */ - GetSchemaResponse.prototype.toJSON = function toJSON() { + DeleteTabletsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSchemaResponse; + return DeleteTabletsResponse; })(); - vtctldata.GetShardRequest = (function() { + vtctldata.EmergencyReparentShardRequest = (function() { /** - * Properties of a GetShardRequest. + * Properties of an EmergencyReparentShardRequest. * @memberof vtctldata - * @interface IGetShardRequest - * @property {string|null} [keyspace] GetShardRequest keyspace - * @property {string|null} [shard_name] GetShardRequest shard_name + * @interface IEmergencyReparentShardRequest + * @property {string|null} [keyspace] EmergencyReparentShardRequest keyspace + * @property {string|null} [shard] EmergencyReparentShardRequest shard + * @property {topodata.ITabletAlias|null} [new_primary] EmergencyReparentShardRequest new_primary + * @property {Array.|null} [ignore_replicas] EmergencyReparentShardRequest ignore_replicas + * @property {vttime.IDuration|null} [wait_replicas_timeout] EmergencyReparentShardRequest wait_replicas_timeout + * @property {boolean|null} [prevent_cross_cell_promotion] EmergencyReparentShardRequest prevent_cross_cell_promotion */ /** - * Constructs a new GetShardRequest. + * Constructs a new EmergencyReparentShardRequest. * @memberof vtctldata - * @classdesc Represents a GetShardRequest. - * @implements IGetShardRequest + * @classdesc Represents an EmergencyReparentShardRequest. + * @implements IEmergencyReparentShardRequest * @constructor - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set + * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set */ - function GetShardRequest(properties) { + function EmergencyReparentShardRequest(properties) { + this.ignore_replicas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97471,80 +99717,121 @@ $root.vtctldata = (function() { } /** - * GetShardRequest keyspace. + * EmergencyReparentShardRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - GetShardRequest.prototype.keyspace = ""; + EmergencyReparentShardRequest.prototype.keyspace = ""; /** - * GetShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.GetShardRequest + * EmergencyReparentShardRequest shard. + * @member {string} shard + * @memberof vtctldata.EmergencyReparentShardRequest * @instance */ - GetShardRequest.prototype.shard_name = ""; + EmergencyReparentShardRequest.prototype.shard = ""; /** - * Creates a new GetShardRequest instance using the specified properties. + * EmergencyReparentShardRequest new_primary. + * @member {topodata.ITabletAlias|null|undefined} new_primary + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.new_primary = null; + + /** + * EmergencyReparentShardRequest ignore_replicas. + * @member {Array.} ignore_replicas + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.ignore_replicas = $util.emptyArray; + + /** + * EmergencyReparentShardRequest wait_replicas_timeout. + * @member {vttime.IDuration|null|undefined} wait_replicas_timeout + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.wait_replicas_timeout = null; + + /** + * EmergencyReparentShardRequest prevent_cross_cell_promotion. + * @member {boolean} prevent_cross_cell_promotion + * @memberof vtctldata.EmergencyReparentShardRequest + * @instance + */ + EmergencyReparentShardRequest.prototype.prevent_cross_cell_promotion = false; + + /** + * Creates a new EmergencyReparentShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardRequest} GetShardRequest instance + * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest instance */ - GetShardRequest.create = function create(properties) { - return new GetShardRequest(properties); + EmergencyReparentShardRequest.create = function create(properties) { + return new EmergencyReparentShardRequest(properties); }; /** - * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRequest.encode = function encode(message, writer) { + EmergencyReparentShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) + $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ignore_replicas != null && message.ignore_replicas.length) + for (var i = 0; i < message.ignore_replicas.length; ++i) + $root.topodata.TabletAlias.encode(message.ignore_replicas[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) + $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.prevent_cross_cell_promotion != null && Object.hasOwnProperty.call(message, "prevent_cross_cell_promotion")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prevent_cross_cell_promotion); return writer; }; /** - * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. + * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + EmergencyReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRequest message from the specified reader or buffer. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRequest.decode = function decode(reader, length) { + EmergencyReparentShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -97552,7 +99839,21 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - message.shard_name = reader.string(); + message.shard = reader.string(); + break; + case 3: + message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.ignore_replicas && message.ignore_replicas.length)) + message.ignore_replicas = []; + message.ignore_replicas.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); + break; + case 5: + message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.prevent_cross_cell_promotion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -97563,116 +99864,180 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRequest.decodeDelimited = function decodeDelimited(reader) { + EmergencyReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRequest message. + * Verifies an EmergencyReparentShardRequest message. * @function verify - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRequest.verify = function verify(message) { + EmergencyReparentShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) { + var error = $root.topodata.TabletAlias.verify(message.new_primary); + if (error) + return "new_primary." + error; + } + if (message.ignore_replicas != null && message.hasOwnProperty("ignore_replicas")) { + if (!Array.isArray(message.ignore_replicas)) + return "ignore_replicas: array expected"; + for (var i = 0; i < message.ignore_replicas.length; ++i) { + var error = $root.topodata.TabletAlias.verify(message.ignore_replicas[i]); + if (error) + return "ignore_replicas." + error; + } + } + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { + var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + if (error) + return "wait_replicas_timeout." + error; + } + if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) + if (typeof message.prevent_cross_cell_promotion !== "boolean") + return "prevent_cross_cell_promotion: boolean expected"; return null; }; /** - * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRequest} GetShardRequest + * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest */ - GetShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRequest) + EmergencyReparentShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.EmergencyReparentShardRequest) return object; - var message = new $root.vtctldata.GetShardRequest(); + var message = new $root.vtctldata.EmergencyReparentShardRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); + if (object.shard != null) + message.shard = String(object.shard); + if (object.new_primary != null) { + if (typeof object.new_primary !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.new_primary: object expected"); + message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); + } + if (object.ignore_replicas) { + if (!Array.isArray(object.ignore_replicas)) + throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: array expected"); + message.ignore_replicas = []; + for (var i = 0; i < object.ignore_replicas.length; ++i) { + if (typeof object.ignore_replicas[i] !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: object expected"); + message.ignore_replicas[i] = $root.topodata.TabletAlias.fromObject(object.ignore_replicas[i]); + } + } + if (object.wait_replicas_timeout != null) { + if (typeof object.wait_replicas_timeout !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout: object expected"); + message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + } + if (object.prevent_cross_cell_promotion != null) + message.prevent_cross_cell_promotion = Boolean(object.prevent_cross_cell_promotion); return message; }; /** - * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. + * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @static - * @param {vtctldata.GetShardRequest} message GetShardRequest + * @param {vtctldata.EmergencyReparentShardRequest} message EmergencyReparentShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRequest.toObject = function toObject(message, options) { + EmergencyReparentShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.ignore_replicas = []; if (options.defaults) { object.keyspace = ""; - object.shard_name = ""; + object.shard = ""; + object.new_primary = null; + object.wait_replicas_timeout = null; + object.prevent_cross_cell_promotion = false; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) + object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); + if (message.ignore_replicas && message.ignore_replicas.length) { + object.ignore_replicas = []; + for (var j = 0; j < message.ignore_replicas.length; ++j) + object.ignore_replicas[j] = $root.topodata.TabletAlias.toObject(message.ignore_replicas[j], options); + } + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) + object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); + if (message.prevent_cross_cell_promotion != null && message.hasOwnProperty("prevent_cross_cell_promotion")) + object.prevent_cross_cell_promotion = message.prevent_cross_cell_promotion; return object; }; /** - * Converts this GetShardRequest to JSON. + * Converts this EmergencyReparentShardRequest to JSON. * @function toJSON - * @memberof vtctldata.GetShardRequest + * @memberof vtctldata.EmergencyReparentShardRequest * @instance * @returns {Object.} JSON object */ - GetShardRequest.prototype.toJSON = function toJSON() { + EmergencyReparentShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetShardRequest; + return EmergencyReparentShardRequest; })(); - vtctldata.GetShardResponse = (function() { + vtctldata.EmergencyReparentShardResponse = (function() { /** - * Properties of a GetShardResponse. + * Properties of an EmergencyReparentShardResponse. * @memberof vtctldata - * @interface IGetShardResponse - * @property {vtctldata.IShard|null} [shard] GetShardResponse shard + * @interface IEmergencyReparentShardResponse + * @property {string|null} [keyspace] EmergencyReparentShardResponse keyspace + * @property {string|null} [shard] EmergencyReparentShardResponse shard + * @property {topodata.ITabletAlias|null} [promoted_primary] EmergencyReparentShardResponse promoted_primary + * @property {Array.|null} [events] EmergencyReparentShardResponse events */ /** - * Constructs a new GetShardResponse. + * Constructs a new EmergencyReparentShardResponse. * @memberof vtctldata - * @classdesc Represents a GetShardResponse. - * @implements IGetShardResponse + * @classdesc Represents an EmergencyReparentShardResponse. + * @implements IEmergencyReparentShardResponse * @constructor - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set + * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set */ - function GetShardResponse(properties) { + function EmergencyReparentShardResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97680,75 +100045,117 @@ $root.vtctldata = (function() { } /** - * GetShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.GetShardResponse + * EmergencyReparentShardResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.EmergencyReparentShardResponse * @instance */ - GetShardResponse.prototype.shard = null; + EmergencyReparentShardResponse.prototype.keyspace = ""; /** - * Creates a new GetShardResponse instance using the specified properties. + * EmergencyReparentShardResponse shard. + * @member {string} shard + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.shard = ""; + + /** + * EmergencyReparentShardResponse promoted_primary. + * @member {topodata.ITabletAlias|null|undefined} promoted_primary + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.promoted_primary = null; + + /** + * EmergencyReparentShardResponse events. + * @member {Array.} events + * @memberof vtctldata.EmergencyReparentShardResponse + * @instance + */ + EmergencyReparentShardResponse.prototype.events = $util.emptyArray; + + /** + * Creates a new EmergencyReparentShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardResponse} GetShardResponse instance + * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse instance */ - GetShardResponse.create = function create(properties) { - return new GetShardResponse(properties); + EmergencyReparentShardResponse.create = function create(properties) { + return new EmergencyReparentShardResponse(properties); }; /** - * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardResponse.encode = function encode(message, writer) { + EmergencyReparentShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) + $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. + * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode + * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + EmergencyReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardResponse message from the specified reader or buffer. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardResponse.decode = function decode(reader, length) { + EmergencyReparentShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -97759,111 +100166,158 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. + * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardResponse.decodeDelimited = function decodeDelimited(reader) { + EmergencyReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardResponse message. + * Verifies an EmergencyReparentShardResponse message. * @function verify - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardResponse.verify = function verify(message) { + EmergencyReparentShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.vtctldata.Shard.verify(message.shard); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { + var error = $root.topodata.TabletAlias.verify(message.promoted_primary); if (error) - return "shard." + error; + return "promoted_primary." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.logutil.Event.verify(message.events[i]); + if (error) + return "events." + error; + } } return null; }; /** - * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardResponse} GetShardResponse + * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse */ - GetShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardResponse) + EmergencyReparentShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.EmergencyReparentShardResponse) return object; - var message = new $root.vtctldata.GetShardResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.GetShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); + var message = new $root.vtctldata.EmergencyReparentShardResponse(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.promoted_primary != null) { + if (typeof object.promoted_primary !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardResponse.promoted_primary: object expected"); + message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + } } return message; }; /** - * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. + * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @static - * @param {vtctldata.GetShardResponse} message GetShardResponse + * @param {vtctldata.EmergencyReparentShardResponse} message EmergencyReparentShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardResponse.toObject = function toObject(message, options) { + EmergencyReparentShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.shard = null; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.promoted_primary = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); + object.shard = message.shard; + if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) + object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + } return object; }; /** - * Converts this GetShardResponse to JSON. + * Converts this EmergencyReparentShardResponse to JSON. * @function toJSON - * @memberof vtctldata.GetShardResponse + * @memberof vtctldata.EmergencyReparentShardResponse * @instance * @returns {Object.} JSON object */ - GetShardResponse.prototype.toJSON = function toJSON() { + EmergencyReparentShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetShardResponse; + return EmergencyReparentShardResponse; })(); - vtctldata.GetShardRoutingRulesRequest = (function() { + vtctldata.ExecuteFetchAsAppRequest = (function() { /** - * Properties of a GetShardRoutingRulesRequest. + * Properties of an ExecuteFetchAsAppRequest. * @memberof vtctldata - * @interface IGetShardRoutingRulesRequest + * @interface IExecuteFetchAsAppRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsAppRequest tablet_alias + * @property {string|null} [query] ExecuteFetchAsAppRequest query + * @property {number|Long|null} [max_rows] ExecuteFetchAsAppRequest max_rows + * @property {boolean|null} [use_pool] ExecuteFetchAsAppRequest use_pool */ /** - * Constructs a new GetShardRoutingRulesRequest. + * Constructs a new ExecuteFetchAsAppRequest. * @memberof vtctldata - * @classdesc Represents a GetShardRoutingRulesRequest. - * @implements IGetShardRoutingRulesRequest + * @classdesc Represents an ExecuteFetchAsAppRequest. + * @implements IExecuteFetchAsAppRequest * @constructor - * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set */ - function GetShardRoutingRulesRequest(properties) { + function ExecuteFetchAsAppRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97871,63 +100325,115 @@ $root.vtctldata = (function() { } /** - * Creates a new GetShardRoutingRulesRequest instance using the specified properties. + * ExecuteFetchAsAppRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.tablet_alias = null; + + /** + * ExecuteFetchAsAppRequest query. + * @member {string} query + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.query = ""; + + /** + * ExecuteFetchAsAppRequest max_rows. + * @member {number|Long} max_rows + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ExecuteFetchAsAppRequest use_pool. + * @member {boolean} use_pool + * @memberof vtctldata.ExecuteFetchAsAppRequest + * @instance + */ + ExecuteFetchAsAppRequest.prototype.use_pool = false; + + /** + * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest instance + * @param {vtctldata.IExecuteFetchAsAppRequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest instance */ - GetShardRoutingRulesRequest.create = function create(properties) { - return new GetShardRoutingRulesRequest(properties); + ExecuteFetchAsAppRequest.create = function create(properties) { + return new ExecuteFetchAsAppRequest(properties); }; /** - * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesRequest.encode = function encode(message, writer) { + ExecuteFetchAsAppRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); + if (message.use_pool != null && Object.hasOwnProperty.call(message, "use_pool")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.use_pool); return writer; }; /** - * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsAppRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesRequest.decode = function decode(reader, length) { + ExecuteFetchAsAppRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.query = reader.string(); + break; + case 3: + message.max_rows = reader.int64(); + break; + case 4: + message.use_pool = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -97937,94 +100443,151 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsAppRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRoutingRulesRequest message. + * Verifies an ExecuteFetchAsAppRequest message. * @function verify - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRoutingRulesRequest.verify = function verify(message) { + ExecuteFetchAsAppRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) + return "max_rows: integer|Long expected"; + if (message.use_pool != null && message.hasOwnProperty("use_pool")) + if (typeof message.use_pool !== "boolean") + return "use_pool: boolean expected"; return null; }; /** - * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest + * @returns {vtctldata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest */ - GetShardRoutingRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRoutingRulesRequest) + ExecuteFetchAsAppRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsAppRequest) return object; - return new $root.vtctldata.GetShardRoutingRulesRequest(); + var message = new $root.vtctldata.ExecuteFetchAsAppRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsAppRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.query != null) + message.query = String(object.query); + if (object.max_rows != null) + if ($util.Long) + (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; + else if (typeof object.max_rows === "string") + message.max_rows = parseInt(object.max_rows, 10); + else if (typeof object.max_rows === "number") + message.max_rows = object.max_rows; + else if (typeof object.max_rows === "object") + message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); + if (object.use_pool != null) + message.use_pool = Boolean(object.use_pool); + return message; }; /** - * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @static - * @param {vtctldata.GetShardRoutingRulesRequest} message GetShardRoutingRulesRequest + * @param {vtctldata.ExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRoutingRulesRequest.toObject = function toObject() { - return {}; + ExecuteFetchAsAppRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tablet_alias = null; + object.query = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max_rows = options.longs === String ? "0" : 0; + object.use_pool = false; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (typeof message.max_rows === "number") + object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; + else + object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; + if (message.use_pool != null && message.hasOwnProperty("use_pool")) + object.use_pool = message.use_pool; + return object; }; /** - * Converts this GetShardRoutingRulesRequest to JSON. + * Converts this ExecuteFetchAsAppRequest to JSON. * @function toJSON - * @memberof vtctldata.GetShardRoutingRulesRequest + * @memberof vtctldata.ExecuteFetchAsAppRequest * @instance * @returns {Object.} JSON object */ - GetShardRoutingRulesRequest.prototype.toJSON = function toJSON() { + ExecuteFetchAsAppRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetShardRoutingRulesRequest; + return ExecuteFetchAsAppRequest; })(); - vtctldata.GetShardRoutingRulesResponse = (function() { + vtctldata.ExecuteFetchAsAppResponse = (function() { /** - * Properties of a GetShardRoutingRulesResponse. + * Properties of an ExecuteFetchAsAppResponse. * @memberof vtctldata - * @interface IGetShardRoutingRulesResponse - * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] GetShardRoutingRulesResponse shard_routing_rules + * @interface IExecuteFetchAsAppResponse + * @property {query.IQueryResult|null} [result] ExecuteFetchAsAppResponse result */ /** - * Constructs a new GetShardRoutingRulesResponse. + * Constructs a new ExecuteFetchAsAppResponse. * @memberof vtctldata - * @classdesc Represents a GetShardRoutingRulesResponse. - * @implements IGetShardRoutingRulesResponse + * @classdesc Represents an ExecuteFetchAsAppResponse. + * @implements IExecuteFetchAsAppResponse * @constructor - * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set */ - function GetShardRoutingRulesResponse(properties) { + function ExecuteFetchAsAppResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98032,75 +100595,75 @@ $root.vtctldata = (function() { } /** - * GetShardRoutingRulesResponse shard_routing_rules. - * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules - * @memberof vtctldata.GetShardRoutingRulesResponse + * ExecuteFetchAsAppResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof vtctldata.ExecuteFetchAsAppResponse * @instance */ - GetShardRoutingRulesResponse.prototype.shard_routing_rules = null; + ExecuteFetchAsAppResponse.prototype.result = null; /** - * Creates a new GetShardRoutingRulesResponse instance using the specified properties. + * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse instance + * @param {vtctldata.IExecuteFetchAsAppResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse instance */ - GetShardRoutingRulesResponse.create = function create(properties) { - return new GetShardRoutingRulesResponse(properties); + ExecuteFetchAsAppResponse.create = function create(properties) { + return new ExecuteFetchAsAppResponse(properties); }; /** - * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesResponse.encode = function encode(message, writer) { + ExecuteFetchAsAppResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) - $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsAppResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsAppResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesResponse.decode = function decode(reader, length) { + ExecuteFetchAsAppResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsAppResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -98111,113 +100674,116 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsAppResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetShardRoutingRulesResponse message. + * Verifies an ExecuteFetchAsAppResponse message. * @function verify - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetShardRoutingRulesResponse.verify = function verify(message) { + ExecuteFetchAsAppResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { - var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); if (error) - return "shard_routing_rules." + error; + return "result." + error; } return null; }; /** - * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse + * @returns {vtctldata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse */ - GetShardRoutingRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRoutingRulesResponse) + ExecuteFetchAsAppResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsAppResponse) return object; - var message = new $root.vtctldata.GetShardRoutingRulesResponse(); - if (object.shard_routing_rules != null) { - if (typeof object.shard_routing_rules !== "object") - throw TypeError(".vtctldata.GetShardRoutingRulesResponse.shard_routing_rules: object expected"); - message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); + var message = new $root.vtctldata.ExecuteFetchAsAppResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsAppResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @static - * @param {vtctldata.GetShardRoutingRulesResponse} message GetShardRoutingRulesResponse + * @param {vtctldata.ExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetShardRoutingRulesResponse.toObject = function toObject(message, options) { + ExecuteFetchAsAppResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.shard_routing_rules = null; - if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) - object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this GetShardRoutingRulesResponse to JSON. + * Converts this ExecuteFetchAsAppResponse to JSON. * @function toJSON - * @memberof vtctldata.GetShardRoutingRulesResponse + * @memberof vtctldata.ExecuteFetchAsAppResponse * @instance * @returns {Object.} JSON object */ - GetShardRoutingRulesResponse.prototype.toJSON = function toJSON() { + ExecuteFetchAsAppResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetShardRoutingRulesResponse; + return ExecuteFetchAsAppResponse; })(); - vtctldata.GetSrvKeyspaceNamesRequest = (function() { + vtctldata.ExecuteFetchAsDBARequest = (function() { /** - * Properties of a GetSrvKeyspaceNamesRequest. + * Properties of an ExecuteFetchAsDBARequest. * @memberof vtctldata - * @interface IGetSrvKeyspaceNamesRequest - * @property {Array.|null} [cells] GetSrvKeyspaceNamesRequest cells + * @interface IExecuteFetchAsDBARequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteFetchAsDBARequest tablet_alias + * @property {string|null} [query] ExecuteFetchAsDBARequest query + * @property {number|Long|null} [max_rows] ExecuteFetchAsDBARequest max_rows + * @property {boolean|null} [disable_binlogs] ExecuteFetchAsDBARequest disable_binlogs + * @property {boolean|null} [reload_schema] ExecuteFetchAsDBARequest reload_schema */ /** - * Constructs a new GetSrvKeyspaceNamesRequest. + * Constructs a new ExecuteFetchAsDBARequest. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspaceNamesRequest. - * @implements IGetSrvKeyspaceNamesRequest + * @classdesc Represents an ExecuteFetchAsDBARequest. + * @implements IExecuteFetchAsDBARequest * @constructor - * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set */ - function GetSrvKeyspaceNamesRequest(properties) { - this.cells = []; + function ExecuteFetchAsDBARequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98225,78 +100791,127 @@ $root.vtctldata = (function() { } /** - * GetSrvKeyspaceNamesRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * ExecuteFetchAsDBARequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance */ - GetSrvKeyspaceNamesRequest.prototype.cells = $util.emptyArray; + ExecuteFetchAsDBARequest.prototype.tablet_alias = null; /** - * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. + * ExecuteFetchAsDBARequest query. + * @member {string} query + * @memberof vtctldata.ExecuteFetchAsDBARequest + * @instance + */ + ExecuteFetchAsDBARequest.prototype.query = ""; + + /** + * ExecuteFetchAsDBARequest max_rows. + * @member {number|Long} max_rows + * @memberof vtctldata.ExecuteFetchAsDBARequest + * @instance + */ + ExecuteFetchAsDBARequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ExecuteFetchAsDBARequest disable_binlogs. + * @member {boolean} disable_binlogs + * @memberof vtctldata.ExecuteFetchAsDBARequest + * @instance + */ + ExecuteFetchAsDBARequest.prototype.disable_binlogs = false; + + /** + * ExecuteFetchAsDBARequest reload_schema. + * @member {boolean} reload_schema + * @memberof vtctldata.ExecuteFetchAsDBARequest + * @instance + */ + ExecuteFetchAsDBARequest.prototype.reload_schema = false; + + /** + * Creates a new ExecuteFetchAsDBARequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest instance + * @param {vtctldata.IExecuteFetchAsDBARequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest instance */ - GetSrvKeyspaceNamesRequest.create = function create(properties) { - return new GetSrvKeyspaceNamesRequest(properties); + ExecuteFetchAsDBARequest.create = function create(properties) { + return new ExecuteFetchAsDBARequest(properties); }; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBARequest message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesRequest.encode = function encode(message, writer) { + ExecuteFetchAsDBARequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_rows); + if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disable_binlogs); + if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reload_schema); return writer; }; /** - * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBARequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBARequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsDBARequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesRequest.decode = function decode(reader, length) { + ExecuteFetchAsDBARequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBARequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.query = reader.string(); + break; + case 3: + message.max_rows = reader.int64(); + break; + case 4: + message.disable_binlogs = reader.bool(); + break; + case 5: + message.reload_schema = reader.bool(); break; default: reader.skipType(tag & 7); @@ -98307,120 +100922,159 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBARequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsDBARequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspaceNamesRequest message. + * Verifies an ExecuteFetchAsDBARequest message. * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspaceNamesRequest.verify = function verify(message) { + ExecuteFetchAsDBARequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) + return "max_rows: integer|Long expected"; + if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) + if (typeof message.disable_binlogs !== "boolean") + return "disable_binlogs: boolean expected"; + if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) + if (typeof message.reload_schema !== "boolean") + return "reload_schema: boolean expected"; return null; }; /** - * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBARequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest + * @returns {vtctldata.ExecuteFetchAsDBARequest} ExecuteFetchAsDBARequest */ - GetSrvKeyspaceNamesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesRequest) + ExecuteFetchAsDBARequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsDBARequest) return object; - var message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvKeyspaceNamesRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + var message = new $root.vtctldata.ExecuteFetchAsDBARequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsDBARequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.query != null) + message.query = String(object.query); + if (object.max_rows != null) + if ($util.Long) + (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = false; + else if (typeof object.max_rows === "string") + message.max_rows = parseInt(object.max_rows, 10); + else if (typeof object.max_rows === "number") + message.max_rows = object.max_rows; + else if (typeof object.max_rows === "object") + message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(); + if (object.disable_binlogs != null) + message.disable_binlogs = Boolean(object.disable_binlogs); + if (object.reload_schema != null) + message.reload_schema = Boolean(object.reload_schema); return message; }; /** - * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsDBARequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @static - * @param {vtctldata.GetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest + * @param {vtctldata.ExecuteFetchAsDBARequest} message ExecuteFetchAsDBARequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspaceNamesRequest.toObject = function toObject(message, options) { + ExecuteFetchAsDBARequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (options.defaults) { + object.tablet_alias = null; + object.query = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max_rows = options.longs === String ? "0" : 0; + object.disable_binlogs = false; + object.reload_schema = false; } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.max_rows != null && message.hasOwnProperty("max_rows")) + if (typeof message.max_rows === "number") + object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; + else + object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber() : message.max_rows; + if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) + object.disable_binlogs = message.disable_binlogs; + if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) + object.reload_schema = message.reload_schema; return object; }; /** - * Converts this GetSrvKeyspaceNamesRequest to JSON. + * Converts this ExecuteFetchAsDBARequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @memberof vtctldata.ExecuteFetchAsDBARequest * @instance * @returns {Object.} JSON object */ - GetSrvKeyspaceNamesRequest.prototype.toJSON = function toJSON() { + ExecuteFetchAsDBARequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvKeyspaceNamesRequest; + return ExecuteFetchAsDBARequest; })(); - vtctldata.GetSrvKeyspaceNamesResponse = (function() { + vtctldata.ExecuteFetchAsDBAResponse = (function() { /** - * Properties of a GetSrvKeyspaceNamesResponse. + * Properties of an ExecuteFetchAsDBAResponse. * @memberof vtctldata - * @interface IGetSrvKeyspaceNamesResponse - * @property {Object.|null} [names] GetSrvKeyspaceNamesResponse names + * @interface IExecuteFetchAsDBAResponse + * @property {query.IQueryResult|null} [result] ExecuteFetchAsDBAResponse result */ /** - * Constructs a new GetSrvKeyspaceNamesResponse. + * Constructs a new ExecuteFetchAsDBAResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspaceNamesResponse. - * @implements IGetSrvKeyspaceNamesResponse + * @classdesc Represents an ExecuteFetchAsDBAResponse. + * @implements IExecuteFetchAsDBAResponse * @constructor - * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set */ - function GetSrvKeyspaceNamesResponse(properties) { - this.names = {}; + function ExecuteFetchAsDBAResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98428,97 +101082,75 @@ $root.vtctldata = (function() { } /** - * GetSrvKeyspaceNamesResponse names. - * @member {Object.} names - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * ExecuteFetchAsDBAResponse result. + * @member {query.IQueryResult|null|undefined} result + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @instance */ - GetSrvKeyspaceNamesResponse.prototype.names = $util.emptyObject; + ExecuteFetchAsDBAResponse.prototype.result = null; /** - * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. + * Creates a new ExecuteFetchAsDBAResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse instance + * @param {vtctldata.IExecuteFetchAsDBAResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse instance */ - GetSrvKeyspaceNamesResponse.create = function create(properties) { - return new GetSrvKeyspaceNamesResponse(properties); + ExecuteFetchAsDBAResponse.create = function create(properties) { + return new ExecuteFetchAsDBAResponse(properties); }; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBAResponse message. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesResponse.encode = function encode(message, writer) { + ExecuteFetchAsDBAResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.names != null && Object.hasOwnProperty.call(message, "names")) - for (var keys = Object.keys(message.names), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.encode(message.names[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. + * Encodes the specified ExecuteFetchAsDBAResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteFetchAsDBAResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode + * @param {vtctldata.IExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspaceNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteFetchAsDBAResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesResponse.decode = function decode(reader, length) { + ExecuteFetchAsDBAResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.names === $util.emptyObject) - message.names = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.names[key] = value; + message.result = $root.query.QueryResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -98529,331 +101161,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteFetchAsDBAResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspaceNamesResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteFetchAsDBAResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspaceNamesResponse message. + * Verifies an ExecuteFetchAsDBAResponse message. * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspaceNamesResponse.verify = function verify(message) { + ExecuteFetchAsDBAResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!$util.isObject(message.names)) - return "names: object expected"; - var key = Object.keys(message.names); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify(message.names[key[i]]); - if (error) - return "names." + error; - } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.query.QueryResult.verify(message.result); + if (error) + return "result." + error; } return null; }; /** - * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteFetchAsDBAResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse + * @returns {vtctldata.ExecuteFetchAsDBAResponse} ExecuteFetchAsDBAResponse */ - GetSrvKeyspaceNamesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse) + ExecuteFetchAsDBAResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteFetchAsDBAResponse) return object; - var message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(); - if (object.names) { - if (typeof object.names !== "object") - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); - message.names = {}; - for (var keys = Object.keys(object.names), i = 0; i < keys.length; ++i) { - if (typeof object.names[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); - message.names[keys[i]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.fromObject(object.names[keys[i]]); - } + var message = new $root.vtctldata.ExecuteFetchAsDBAResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".vtctldata.ExecuteFetchAsDBAResponse.result: object expected"); + message.result = $root.query.QueryResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteFetchAsDBAResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse + * @param {vtctldata.ExecuteFetchAsDBAResponse} message ExecuteFetchAsDBAResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspaceNamesResponse.toObject = function toObject(message, options) { + ExecuteFetchAsDBAResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.names = {}; - var keys2; - if (message.names && (keys2 = Object.keys(message.names)).length) { - object.names = {}; - for (var j = 0; j < keys2.length; ++j) - object.names[keys2[j]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.toObject(message.names[keys2[j]], options); - } + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.query.QueryResult.toObject(message.result, options); return object; }; /** - * Converts this GetSrvKeyspaceNamesResponse to JSON. + * Converts this ExecuteFetchAsDBAResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @memberof vtctldata.ExecuteFetchAsDBAResponse * @instance * @returns {Object.} JSON object */ - GetSrvKeyspaceNamesResponse.prototype.toJSON = function toJSON() { + ExecuteFetchAsDBAResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GetSrvKeyspaceNamesResponse.NameList = (function() { - - /** - * Properties of a NameList. - * @memberof vtctldata.GetSrvKeyspaceNamesResponse - * @interface INameList - * @property {Array.|null} [names] NameList names - */ - - /** - * Constructs a new NameList. - * @memberof vtctldata.GetSrvKeyspaceNamesResponse - * @classdesc Represents a NameList. - * @implements INameList - * @constructor - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set - */ - function NameList(properties) { - this.names = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NameList names. - * @member {Array.} names - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @instance - */ - NameList.prototype.names = $util.emptyArray; - - /** - * Creates a new NameList instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList instance - */ - NameList.create = function create(properties) { - return new NameList(properties); - }; - - /** - * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NameList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); - return writer; - }; - - /** - * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NameList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NameList message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameList.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NameList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NameList message. - * @function verify - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NameList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; - } - return null; - }; - - /** - * Creates a NameList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList - */ - NameList.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList) - return object; - var message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.NameList.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); - } - return message; - }; - - /** - * Creates a plain object from a NameList message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @static - * @param {vtctldata.GetSrvKeyspaceNamesResponse.NameList} message NameList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NameList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } - return object; - }; - - /** - * Converts this NameList to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList - * @instance - * @returns {Object.} JSON object - */ - NameList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NameList; - })(); - - return GetSrvKeyspaceNamesResponse; + return ExecuteFetchAsDBAResponse; })(); - vtctldata.GetSrvKeyspacesRequest = (function() { + vtctldata.ExecuteHookRequest = (function() { /** - * Properties of a GetSrvKeyspacesRequest. + * Properties of an ExecuteHookRequest. * @memberof vtctldata - * @interface IGetSrvKeyspacesRequest - * @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace - * @property {Array.|null} [cells] GetSrvKeyspacesRequest cells + * @interface IExecuteHookRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ExecuteHookRequest tablet_alias + * @property {tabletmanagerdata.IExecuteHookRequest|null} [tablet_hook_request] ExecuteHookRequest tablet_hook_request */ /** - * Constructs a new GetSrvKeyspacesRequest. + * Constructs a new ExecuteHookRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesRequest. - * @implements IGetSrvKeyspacesRequest + * @classdesc Represents an ExecuteHookRequest. + * @implements IExecuteHookRequest * @constructor - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set + * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set */ - function GetSrvKeyspacesRequest(properties) { - this.cells = []; + function ExecuteHookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98861,91 +101275,88 @@ $root.vtctldata = (function() { } /** - * GetSrvKeyspacesRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetSrvKeyspacesRequest + * ExecuteHookRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ExecuteHookRequest * @instance */ - GetSrvKeyspacesRequest.prototype.keyspace = ""; + ExecuteHookRequest.prototype.tablet_alias = null; /** - * GetSrvKeyspacesRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvKeyspacesRequest + * ExecuteHookRequest tablet_hook_request. + * @member {tabletmanagerdata.IExecuteHookRequest|null|undefined} tablet_hook_request + * @memberof vtctldata.ExecuteHookRequest * @instance */ - GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray; + ExecuteHookRequest.prototype.tablet_hook_request = null; /** - * Creates a new GetSrvKeyspacesRequest instance using the specified properties. + * Creates a new ExecuteHookRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance + * @param {vtctldata.IExecuteHookRequest=} [properties] Properties to set + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest instance */ - GetSrvKeyspacesRequest.create = function create(properties) { - return new GetSrvKeyspacesRequest(properties); + ExecuteHookRequest.create = function create(properties) { + return new ExecuteHookRequest(properties); }; /** - * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode + * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesRequest.encode = function encode(message, writer) { + ExecuteHookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_hook_request != null && Object.hasOwnProperty.call(message, "tablet_hook_request")) + $root.tabletmanagerdata.ExecuteHookRequest.encode(message.tablet_hook_request, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. + * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode + * @param {vtctldata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteHookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. + * Decodes an ExecuteHookRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesRequest.decode = function decode(reader, length) { + ExecuteHookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -98956,129 +101367,126 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteHookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspacesRequest message. + * Verifies an ExecuteHookRequest message. * @function verify - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspacesRequest.verify = function verify(message) { + ExecuteHookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) { + var error = $root.tabletmanagerdata.ExecuteHookRequest.verify(message.tablet_hook_request); + if (error) + return "tablet_hook_request." + error; } return null; }; /** - * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest + * @returns {vtctldata.ExecuteHookRequest} ExecuteHookRequest */ - GetSrvKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest) + ExecuteHookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteHookRequest) return object; - var message = new $root.vtctldata.GetSrvKeyspacesRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + var message = new $root.vtctldata.ExecuteHookRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ExecuteHookRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.tablet_hook_request != null) { + if (typeof object.tablet_hook_request !== "object") + throw TypeError(".vtctldata.ExecuteHookRequest.tablet_hook_request: object expected"); + message.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.fromObject(object.tablet_hook_request); } return message; }; /** - * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @static - * @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest + * @param {vtctldata.ExecuteHookRequest} message ExecuteHookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspacesRequest.toObject = function toObject(message, options) { + ExecuteHookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (options.defaults) { + object.tablet_alias = null; + object.tablet_hook_request = null; } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.tablet_hook_request != null && message.hasOwnProperty("tablet_hook_request")) + object.tablet_hook_request = $root.tabletmanagerdata.ExecuteHookRequest.toObject(message.tablet_hook_request, options); return object; }; /** - * Converts this GetSrvKeyspacesRequest to JSON. + * Converts this ExecuteHookRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesRequest + * @memberof vtctldata.ExecuteHookRequest * @instance * @returns {Object.} JSON object */ - GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() { + ExecuteHookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvKeyspacesRequest; + return ExecuteHookRequest; })(); - vtctldata.GetSrvKeyspacesResponse = (function() { + vtctldata.ExecuteHookResponse = (function() { /** - * Properties of a GetSrvKeyspacesResponse. + * Properties of an ExecuteHookResponse. * @memberof vtctldata - * @interface IGetSrvKeyspacesResponse - * @property {Object.|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces + * @interface IExecuteHookResponse + * @property {tabletmanagerdata.IExecuteHookResponse|null} [hook_result] ExecuteHookResponse hook_result */ /** - * Constructs a new GetSrvKeyspacesResponse. + * Constructs a new ExecuteHookResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesResponse. - * @implements IGetSrvKeyspacesResponse + * @classdesc Represents an ExecuteHookResponse. + * @implements IExecuteHookResponse * @constructor - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set + * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set */ - function GetSrvKeyspacesResponse(properties) { - this.srv_keyspaces = {}; + function ExecuteHookResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99086,97 +101494,75 @@ $root.vtctldata = (function() { } /** - * GetSrvKeyspacesResponse srv_keyspaces. - * @member {Object.} srv_keyspaces - * @memberof vtctldata.GetSrvKeyspacesResponse + * ExecuteHookResponse hook_result. + * @member {tabletmanagerdata.IExecuteHookResponse|null|undefined} hook_result + * @memberof vtctldata.ExecuteHookResponse * @instance */ - GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject; + ExecuteHookResponse.prototype.hook_result = null; /** - * Creates a new GetSrvKeyspacesResponse instance using the specified properties. + * Creates a new ExecuteHookResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance + * @param {vtctldata.IExecuteHookResponse=} [properties] Properties to set + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse instance */ - GetSrvKeyspacesResponse.create = function create(properties) { - return new GetSrvKeyspacesResponse(properties); + ExecuteHookResponse.create = function create(properties) { + return new ExecuteHookResponse(properties); }; /** - * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode + * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesResponse.encode = function encode(message, writer) { + ExecuteHookResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces")) - for (var keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.hook_result != null && Object.hasOwnProperty.call(message, "hook_result")) + $root.tabletmanagerdata.ExecuteHookResponse.encode(message.hook_result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. + * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteHookResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode + * @param {vtctldata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteHookResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. + * Decodes an ExecuteHookResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesResponse.decode = function decode(reader, length) { + ExecuteHookResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteHookResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.srv_keyspaces === $util.emptyObject) - message.srv_keyspaces = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.srv_keyspaces[key] = value; + message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -99187,133 +101573,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteHookResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvKeyspacesResponse message. + * Verifies an ExecuteHookResponse message. * @function verify - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvKeyspacesResponse.verify = function verify(message) { + ExecuteHookResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) { - if (!$util.isObject(message.srv_keyspaces)) - return "srv_keyspaces: object expected"; - var key = Object.keys(message.srv_keyspaces); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]); - if (error) - return "srv_keyspaces." + error; - } + if (message.hook_result != null && message.hasOwnProperty("hook_result")) { + var error = $root.tabletmanagerdata.ExecuteHookResponse.verify(message.hook_result); + if (error) + return "hook_result." + error; } return null; }; /** - * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse + * @returns {vtctldata.ExecuteHookResponse} ExecuteHookResponse */ - GetSrvKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse) + ExecuteHookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ExecuteHookResponse) return object; - var message = new $root.vtctldata.GetSrvKeyspacesResponse(); - if (object.srv_keyspaces) { - if (typeof object.srv_keyspaces !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces = {}; - for (var keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) { - if (typeof object.srv_keyspaces[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]); - } + var message = new $root.vtctldata.ExecuteHookResponse(); + if (object.hook_result != null) { + if (typeof object.hook_result !== "object") + throw TypeError(".vtctldata.ExecuteHookResponse.hook_result: object expected"); + message.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.fromObject(object.hook_result); } return message; }; /** - * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @static - * @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse + * @param {vtctldata.ExecuteHookResponse} message ExecuteHookResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvKeyspacesResponse.toObject = function toObject(message, options) { + ExecuteHookResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.srv_keyspaces = {}; - var keys2; - if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) { - object.srv_keyspaces = {}; - for (var j = 0; j < keys2.length; ++j) - object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options); - } + if (options.defaults) + object.hook_result = null; + if (message.hook_result != null && message.hasOwnProperty("hook_result")) + object.hook_result = $root.tabletmanagerdata.ExecuteHookResponse.toObject(message.hook_result, options); return object; }; /** - * Converts this GetSrvKeyspacesResponse to JSON. + * Converts this ExecuteHookResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesResponse + * @memberof vtctldata.ExecuteHookResponse * @instance * @returns {Object.} JSON object */ - GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() { + ExecuteHookResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvKeyspacesResponse; + return ExecuteHookResponse; })(); - vtctldata.UpdateThrottlerConfigRequest = (function() { + vtctldata.FindAllShardsInKeyspaceRequest = (function() { /** - * Properties of an UpdateThrottlerConfigRequest. + * Properties of a FindAllShardsInKeyspaceRequest. * @memberof vtctldata - * @interface IUpdateThrottlerConfigRequest - * @property {string|null} [keyspace] UpdateThrottlerConfigRequest keyspace - * @property {boolean|null} [enable] UpdateThrottlerConfigRequest enable - * @property {boolean|null} [disable] UpdateThrottlerConfigRequest disable - * @property {number|null} [threshold] UpdateThrottlerConfigRequest threshold - * @property {string|null} [custom_query] UpdateThrottlerConfigRequest custom_query - * @property {boolean|null} [custom_query_set] UpdateThrottlerConfigRequest custom_query_set - * @property {boolean|null} [check_as_check_self] UpdateThrottlerConfigRequest check_as_check_self - * @property {boolean|null} [check_as_check_shard] UpdateThrottlerConfigRequest check_as_check_shard + * @interface IFindAllShardsInKeyspaceRequest + * @property {string|null} [keyspace] FindAllShardsInKeyspaceRequest keyspace */ /** - * Constructs a new UpdateThrottlerConfigRequest. + * Constructs a new FindAllShardsInKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents an UpdateThrottlerConfigRequest. - * @implements IUpdateThrottlerConfigRequest + * @classdesc Represents a FindAllShardsInKeyspaceRequest. + * @implements IFindAllShardsInKeyspaceRequest * @constructor - * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set + * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set */ - function UpdateThrottlerConfigRequest(properties) { + function FindAllShardsInKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99321,166 +101686,75 @@ $root.vtctldata = (function() { } /** - * UpdateThrottlerConfigRequest keyspace. + * FindAllShardsInKeyspaceRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.keyspace = ""; - - /** - * UpdateThrottlerConfigRequest enable. - * @member {boolean} enable - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.enable = false; - - /** - * UpdateThrottlerConfigRequest disable. - * @member {boolean} disable - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.disable = false; - - /** - * UpdateThrottlerConfigRequest threshold. - * @member {number} threshold - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.threshold = 0; - - /** - * UpdateThrottlerConfigRequest custom_query. - * @member {string} custom_query - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.custom_query = ""; - - /** - * UpdateThrottlerConfigRequest custom_query_set. - * @member {boolean} custom_query_set - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.custom_query_set = false; - - /** - * UpdateThrottlerConfigRequest check_as_check_self. - * @member {boolean} check_as_check_self - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @instance - */ - UpdateThrottlerConfigRequest.prototype.check_as_check_self = false; - - /** - * UpdateThrottlerConfigRequest check_as_check_shard. - * @member {boolean} check_as_check_shard - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @instance */ - UpdateThrottlerConfigRequest.prototype.check_as_check_shard = false; + FindAllShardsInKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. + * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest instance + * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest instance */ - UpdateThrottlerConfigRequest.create = function create(properties) { - return new UpdateThrottlerConfigRequest(properties); + FindAllShardsInKeyspaceRequest.create = function create(properties) { + return new FindAllShardsInKeyspaceRequest(properties); }; /** - * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigRequest.encode = function encode(message, writer) { + FindAllShardsInKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enable); - if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.disable); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.threshold); - if (message.custom_query != null && Object.hasOwnProperty.call(message, "custom_query")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.custom_query); - if (message.custom_query_set != null && Object.hasOwnProperty.call(message, "custom_query_set")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.custom_query_set); - if (message.check_as_check_self != null && Object.hasOwnProperty.call(message, "check_as_check_self")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.check_as_check_self); - if (message.check_as_check_shard != null && Object.hasOwnProperty.call(message, "check_as_check_shard")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.check_as_check_shard); return writer; }; /** - * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + FindAllShardsInKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateThrottlerConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateThrottlerConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.enable = reader.bool(); - break; - case 3: - message.disable = reader.bool(); - break; - case 4: - message.threshold = reader.double(); - break; - case 5: - message.custom_query = reader.string(); - break; - case 6: - message.custom_query_set = reader.bool(); - break; - case 7: - message.check_as_check_self = reader.bool(); - break; - case 8: - message.check_as_check_shard = reader.bool(); + * @memberof vtctldata.FindAllShardsInKeyspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindAllShardsInKeyspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); break; default: reader.skipType(tag & 7); @@ -99491,163 +101765,108 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + FindAllShardsInKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateThrottlerConfigRequest message. + * Verifies a FindAllShardsInKeyspaceRequest message. * @function verify - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateThrottlerConfigRequest.verify = function verify(message) { + FindAllShardsInKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.enable != null && message.hasOwnProperty("enable")) - if (typeof message.enable !== "boolean") - return "enable: boolean expected"; - if (message.disable != null && message.hasOwnProperty("disable")) - if (typeof message.disable !== "boolean") - return "disable: boolean expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - if (message.custom_query != null && message.hasOwnProperty("custom_query")) - if (!$util.isString(message.custom_query)) - return "custom_query: string expected"; - if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) - if (typeof message.custom_query_set !== "boolean") - return "custom_query_set: boolean expected"; - if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) - if (typeof message.check_as_check_self !== "boolean") - return "check_as_check_self: boolean expected"; - if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) - if (typeof message.check_as_check_shard !== "boolean") - return "check_as_check_shard: boolean expected"; return null; }; /** - * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest + * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest */ - UpdateThrottlerConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateThrottlerConfigRequest) + FindAllShardsInKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceRequest) return object; - var message = new $root.vtctldata.UpdateThrottlerConfigRequest(); + var message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.enable != null) - message.enable = Boolean(object.enable); - if (object.disable != null) - message.disable = Boolean(object.disable); - if (object.threshold != null) - message.threshold = Number(object.threshold); - if (object.custom_query != null) - message.custom_query = String(object.custom_query); - if (object.custom_query_set != null) - message.custom_query_set = Boolean(object.custom_query_set); - if (object.check_as_check_self != null) - message.check_as_check_self = Boolean(object.check_as_check_self); - if (object.check_as_check_shard != null) - message.check_as_check_shard = Boolean(object.check_as_check_shard); return message; }; /** - * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @static - * @param {vtctldata.UpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest + * @param {vtctldata.FindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateThrottlerConfigRequest.toObject = function toObject(message, options) { + FindAllShardsInKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.keyspace = ""; - object.enable = false; - object.disable = false; - object.threshold = 0; - object.custom_query = ""; - object.custom_query_set = false; - object.check_as_check_self = false; - object.check_as_check_shard = false; - } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.enable != null && message.hasOwnProperty("enable")) - object.enable = message.enable; - if (message.disable != null && message.hasOwnProperty("disable")) - object.disable = message.disable; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.custom_query != null && message.hasOwnProperty("custom_query")) - object.custom_query = message.custom_query; - if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) - object.custom_query_set = message.custom_query_set; - if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) - object.check_as_check_self = message.check_as_check_self; - if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) - object.check_as_check_shard = message.check_as_check_shard; return object; }; /** - * Converts this UpdateThrottlerConfigRequest to JSON. + * Converts this FindAllShardsInKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.UpdateThrottlerConfigRequest + * @memberof vtctldata.FindAllShardsInKeyspaceRequest * @instance * @returns {Object.} JSON object */ - UpdateThrottlerConfigRequest.prototype.toJSON = function toJSON() { + FindAllShardsInKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateThrottlerConfigRequest; + return FindAllShardsInKeyspaceRequest; })(); - vtctldata.UpdateThrottlerConfigResponse = (function() { + vtctldata.FindAllShardsInKeyspaceResponse = (function() { /** - * Properties of an UpdateThrottlerConfigResponse. + * Properties of a FindAllShardsInKeyspaceResponse. * @memberof vtctldata - * @interface IUpdateThrottlerConfigResponse + * @interface IFindAllShardsInKeyspaceResponse + * @property {Object.|null} [shards] FindAllShardsInKeyspaceResponse shards */ /** - * Constructs a new UpdateThrottlerConfigResponse. + * Constructs a new FindAllShardsInKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents an UpdateThrottlerConfigResponse. - * @implements IUpdateThrottlerConfigResponse + * @classdesc Represents a FindAllShardsInKeyspaceResponse. + * @implements IFindAllShardsInKeyspaceResponse * @constructor - * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set + * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set */ - function UpdateThrottlerConfigResponse(properties) { + function FindAllShardsInKeyspaceResponse(properties) { + this.shards = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99655,63 +101874,98 @@ $root.vtctldata = (function() { } /** - * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. + * FindAllShardsInKeyspaceResponse shards. + * @member {Object.} shards + * @memberof vtctldata.FindAllShardsInKeyspaceResponse + * @instance + */ + FindAllShardsInKeyspaceResponse.prototype.shards = $util.emptyObject; + + /** + * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse instance + * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse instance */ - UpdateThrottlerConfigResponse.create = function create(properties) { - return new UpdateThrottlerConfigResponse(properties); + FindAllShardsInKeyspaceResponse.create = function create(properties) { + return new FindAllShardsInKeyspaceResponse(properties); }; /** - * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigResponse.encode = function encode(message, writer) { + FindAllShardsInKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.shards != null && Object.hasOwnProperty.call(message, "shards")) + for (var keys = Object.keys(message.shards), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.Shard.encode(message.shards[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. + * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode + * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateThrottlerConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + FindAllShardsInKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigResponse.decode = function decode(reader, length) { + FindAllShardsInKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (message.shards === $util.emptyObject) + message.shards = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.Shard.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.shards[key] = value; + break; default: reader.skipType(tag & 7); break; @@ -99721,94 +101975,130 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. + * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateThrottlerConfigResponse.decodeDelimited = function decodeDelimited(reader) { + FindAllShardsInKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateThrottlerConfigResponse message. + * Verifies a FindAllShardsInKeyspaceResponse message. * @function verify - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateThrottlerConfigResponse.verify = function verify(message) { + FindAllShardsInKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!$util.isObject(message.shards)) + return "shards: object expected"; + var key = Object.keys(message.shards); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.Shard.verify(message.shards[key[i]]); + if (error) + return "shards." + error; + } + } return null; }; /** - * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse + * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse */ - UpdateThrottlerConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateThrottlerConfigResponse) + FindAllShardsInKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceResponse) return object; - return new $root.vtctldata.UpdateThrottlerConfigResponse(); + var message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(); + if (object.shards) { + if (typeof object.shards !== "object") + throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); + message.shards = {}; + for (var keys = Object.keys(object.shards), i = 0; i < keys.length; ++i) { + if (typeof object.shards[keys[i]] !== "object") + throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); + message.shards[keys[i]] = $root.vtctldata.Shard.fromObject(object.shards[keys[i]]); + } + } + return message; }; /** - * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. + * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @static - * @param {vtctldata.UpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse + * @param {vtctldata.FindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateThrottlerConfigResponse.toObject = function toObject() { - return {}; + FindAllShardsInKeyspaceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.shards = {}; + var keys2; + if (message.shards && (keys2 = Object.keys(message.shards)).length) { + object.shards = {}; + for (var j = 0; j < keys2.length; ++j) + object.shards[keys2[j]] = $root.vtctldata.Shard.toObject(message.shards[keys2[j]], options); + } + return object; }; /** - * Converts this UpdateThrottlerConfigResponse to JSON. + * Converts this FindAllShardsInKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.UpdateThrottlerConfigResponse + * @memberof vtctldata.FindAllShardsInKeyspaceResponse * @instance * @returns {Object.} JSON object */ - UpdateThrottlerConfigResponse.prototype.toJSON = function toJSON() { + FindAllShardsInKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateThrottlerConfigResponse; + return FindAllShardsInKeyspaceResponse; })(); - vtctldata.GetSrvVSchemaRequest = (function() { + vtctldata.GetBackupsRequest = (function() { /** - * Properties of a GetSrvVSchemaRequest. + * Properties of a GetBackupsRequest. * @memberof vtctldata - * @interface IGetSrvVSchemaRequest - * @property {string|null} [cell] GetSrvVSchemaRequest cell + * @interface IGetBackupsRequest + * @property {string|null} [keyspace] GetBackupsRequest keyspace + * @property {string|null} [shard] GetBackupsRequest shard + * @property {number|null} [limit] GetBackupsRequest limit + * @property {boolean|null} [detailed] GetBackupsRequest detailed + * @property {number|null} [detailed_limit] GetBackupsRequest detailed_limit */ /** - * Constructs a new GetSrvVSchemaRequest. + * Constructs a new GetBackupsRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaRequest. - * @implements IGetSrvVSchemaRequest + * @classdesc Represents a GetBackupsRequest. + * @implements IGetBackupsRequest * @constructor - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set */ - function GetSrvVSchemaRequest(properties) { + function GetBackupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99816,75 +102106,127 @@ $root.vtctldata = (function() { } /** - * GetSrvVSchemaRequest cell. - * @member {string} cell - * @memberof vtctldata.GetSrvVSchemaRequest + * GetBackupsRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetBackupsRequest * @instance */ - GetSrvVSchemaRequest.prototype.cell = ""; + GetBackupsRequest.prototype.keyspace = ""; /** - * Creates a new GetSrvVSchemaRequest instance using the specified properties. + * GetBackupsRequest shard. + * @member {string} shard + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.shard = ""; + + /** + * GetBackupsRequest limit. + * @member {number} limit + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.limit = 0; + + /** + * GetBackupsRequest detailed. + * @member {boolean} detailed + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.detailed = false; + + /** + * GetBackupsRequest detailed_limit. + * @member {number} detailed_limit + * @memberof vtctldata.GetBackupsRequest + * @instance + */ + GetBackupsRequest.prototype.detailed_limit = 0; + + /** + * Creates a new GetBackupsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest instance + * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest instance */ - GetSrvVSchemaRequest.create = function create(properties) { - return new GetSrvVSchemaRequest(properties); + GetBackupsRequest.create = function create(properties) { + return new GetBackupsRequest(properties); }; /** - * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaRequest.encode = function encode(message, writer) { + GetBackupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.limit); + if (message.detailed != null && Object.hasOwnProperty.call(message, "detailed")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.detailed); + if (message.detailed_limit != null && Object.hasOwnProperty.call(message, "detailed_limit")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.detailed_limit); return writer; }; /** - * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. + * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. + * Decodes a GetBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaRequest.decode = function decode(reader, length) { + GetBackupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cell = reader.string(); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.limit = reader.uint32(); + break; + case 4: + message.detailed = reader.bool(); + break; + case 5: + message.detailed_limit = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -99895,107 +102237,141 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemaRequest message. + * Verifies a GetBackupsRequest message. * @function verify - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemaRequest.verify = function verify(message) { + GetBackupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.detailed != null && message.hasOwnProperty("detailed")) + if (typeof message.detailed !== "boolean") + return "detailed: boolean expected"; + if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) + if (!$util.isInteger(message.detailed_limit)) + return "detailed_limit: integer expected"; return null; }; /** - * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest + * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest */ - GetSrvVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaRequest) + GetBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetBackupsRequest) return object; - var message = new $root.vtctldata.GetSrvVSchemaRequest(); - if (object.cell != null) - message.cell = String(object.cell); + var message = new $root.vtctldata.GetBackupsRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.limit != null) + message.limit = object.limit >>> 0; + if (object.detailed != null) + message.detailed = Boolean(object.detailed); + if (object.detailed_limit != null) + message.detailed_limit = object.detailed_limit >>> 0; return message; }; /** - * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @static - * @param {vtctldata.GetSrvVSchemaRequest} message GetSrvVSchemaRequest + * @param {vtctldata.GetBackupsRequest} message GetBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemaRequest.toObject = function toObject(message, options) { + GetBackupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.limit = 0; + object.detailed = false; + object.detailed_limit = 0; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + if (message.detailed != null && message.hasOwnProperty("detailed")) + object.detailed = message.detailed; + if (message.detailed_limit != null && message.hasOwnProperty("detailed_limit")) + object.detailed_limit = message.detailed_limit; return object; }; /** - * Converts this GetSrvVSchemaRequest to JSON. + * Converts this GetBackupsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemaRequest + * @memberof vtctldata.GetBackupsRequest * @instance * @returns {Object.} JSON object */ - GetSrvVSchemaRequest.prototype.toJSON = function toJSON() { + GetBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvVSchemaRequest; + return GetBackupsRequest; })(); - vtctldata.GetSrvVSchemaResponse = (function() { + vtctldata.GetBackupsResponse = (function() { /** - * Properties of a GetSrvVSchemaResponse. + * Properties of a GetBackupsResponse. * @memberof vtctldata - * @interface IGetSrvVSchemaResponse - * @property {vschema.ISrvVSchema|null} [srv_v_schema] GetSrvVSchemaResponse srv_v_schema + * @interface IGetBackupsResponse + * @property {Array.|null} [backups] GetBackupsResponse backups */ /** - * Constructs a new GetSrvVSchemaResponse. + * Constructs a new GetBackupsResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaResponse. - * @implements IGetSrvVSchemaResponse + * @classdesc Represents a GetBackupsResponse. + * @implements IGetBackupsResponse * @constructor - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set */ - function GetSrvVSchemaResponse(properties) { + function GetBackupsResponse(properties) { + this.backups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100003,75 +102379,78 @@ $root.vtctldata = (function() { } /** - * GetSrvVSchemaResponse srv_v_schema. - * @member {vschema.ISrvVSchema|null|undefined} srv_v_schema - * @memberof vtctldata.GetSrvVSchemaResponse + * GetBackupsResponse backups. + * @member {Array.} backups + * @memberof vtctldata.GetBackupsResponse * @instance */ - GetSrvVSchemaResponse.prototype.srv_v_schema = null; + GetBackupsResponse.prototype.backups = $util.emptyArray; /** - * Creates a new GetSrvVSchemaResponse instance using the specified properties. + * Creates a new GetBackupsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse instance + * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse instance */ - GetSrvVSchemaResponse.create = function create(properties) { - return new GetSrvVSchemaResponse(properties); + GetBackupsResponse.create = function create(properties) { + return new GetBackupsResponse(properties); }; /** - * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaResponse.encode = function encode(message, writer) { + GetBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_v_schema != null && Object.hasOwnProperty.call(message, "srv_v_schema")) - $root.vschema.SrvVSchema.encode(message.srv_v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.mysqlctl.BackupInfo.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. + * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode + * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. + * Decodes a GetBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaResponse.decode = function decode(reader, length) { + GetBackupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.srv_v_schema = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.mysqlctl.BackupInfo.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -100082,113 +102461,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + GetBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemaResponse message. + * Verifies a GetBackupsResponse message. * @function verify - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemaResponse.verify = function verify(message) { + GetBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) { - var error = $root.vschema.SrvVSchema.verify(message.srv_v_schema); - if (error) - return "srv_v_schema." + error; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.mysqlctl.BackupInfo.verify(message.backups[i]); + if (error) + return "backups." + error; + } } return null; }; /** - * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse + * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse */ - GetSrvVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaResponse) + GetBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetBackupsResponse) return object; - var message = new $root.vtctldata.GetSrvVSchemaResponse(); - if (object.srv_v_schema != null) { - if (typeof object.srv_v_schema !== "object") - throw TypeError(".vtctldata.GetSrvVSchemaResponse.srv_v_schema: object expected"); - message.srv_v_schema = $root.vschema.SrvVSchema.fromObject(object.srv_v_schema); + var message = new $root.vtctldata.GetBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".vtctldata.GetBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".vtctldata.GetBackupsResponse.backups: object expected"); + message.backups[i] = $root.mysqlctl.BackupInfo.fromObject(object.backups[i]); + } } return message; }; /** - * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @static - * @param {vtctldata.GetSrvVSchemaResponse} message GetSrvVSchemaResponse + * @param {vtctldata.GetBackupsResponse} message GetBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemaResponse.toObject = function toObject(message, options) { + GetBackupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.srv_v_schema = null; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) - object.srv_v_schema = $root.vschema.SrvVSchema.toObject(message.srv_v_schema, options); + if (options.arrays || options.defaults) + object.backups = []; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.mysqlctl.BackupInfo.toObject(message.backups[j], options); + } return object; }; /** - * Converts this GetSrvVSchemaResponse to JSON. + * Converts this GetBackupsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemaResponse + * @memberof vtctldata.GetBackupsResponse * @instance * @returns {Object.} JSON object */ - GetSrvVSchemaResponse.prototype.toJSON = function toJSON() { + GetBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvVSchemaResponse; + return GetBackupsResponse; })(); - vtctldata.GetSrvVSchemasRequest = (function() { + vtctldata.GetCellInfoRequest = (function() { /** - * Properties of a GetSrvVSchemasRequest. + * Properties of a GetCellInfoRequest. * @memberof vtctldata - * @interface IGetSrvVSchemasRequest - * @property {Array.|null} [cells] GetSrvVSchemasRequest cells + * @interface IGetCellInfoRequest + * @property {string|null} [cell] GetCellInfoRequest cell */ /** - * Constructs a new GetSrvVSchemasRequest. + * Constructs a new GetCellInfoRequest. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemasRequest. - * @implements IGetSrvVSchemasRequest + * @classdesc Represents a GetCellInfoRequest. + * @implements IGetCellInfoRequest * @constructor - * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set */ - function GetSrvVSchemasRequest(properties) { - this.cells = []; + function GetCellInfoRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100196,78 +102586,75 @@ $root.vtctldata = (function() { } /** - * GetSrvVSchemasRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvVSchemasRequest + * GetCellInfoRequest cell. + * @member {string} cell + * @memberof vtctldata.GetCellInfoRequest * @instance */ - GetSrvVSchemasRequest.prototype.cells = $util.emptyArray; + GetCellInfoRequest.prototype.cell = ""; /** - * Creates a new GetSrvVSchemasRequest instance using the specified properties. + * Creates a new GetCellInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest instance + * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest instance */ - GetSrvVSchemasRequest.create = function create(properties) { - return new GetSrvVSchemasRequest(properties); + GetCellInfoRequest.create = function create(properties) { + return new GetCellInfoRequest(properties); }; /** - * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasRequest.encode = function encode(message, writer) { + GetCellInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. + * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. + * Decodes a GetCellInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasRequest.decode = function decode(reader, length) { + GetCellInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + case 1: + message.cell = reader.string(); break; default: reader.skipType(tag & 7); @@ -100278,120 +102665,107 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemasRequest message. + * Verifies a GetCellInfoRequest message. * @function verify - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemasRequest.verify = function verify(message) { + GetCellInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest + * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest */ - GetSrvVSchemasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemasRequest) + GetCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoRequest) return object; - var message = new $root.vtctldata.GetSrvVSchemasRequest(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvVSchemasRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } + var message = new $root.vtctldata.GetCellInfoRequest(); + if (object.cell != null) + message.cell = String(object.cell); return message; }; /** - * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @static - * @param {vtctldata.GetSrvVSchemasRequest} message GetSrvVSchemasRequest + * @param {vtctldata.GetCellInfoRequest} message GetCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemasRequest.toObject = function toObject(message, options) { + GetCellInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; return object; }; /** - * Converts this GetSrvVSchemasRequest to JSON. + * Converts this GetCellInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemasRequest + * @memberof vtctldata.GetCellInfoRequest * @instance * @returns {Object.} JSON object */ - GetSrvVSchemasRequest.prototype.toJSON = function toJSON() { + GetCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvVSchemasRequest; + return GetCellInfoRequest; })(); - vtctldata.GetSrvVSchemasResponse = (function() { + vtctldata.GetCellInfoResponse = (function() { /** - * Properties of a GetSrvVSchemasResponse. + * Properties of a GetCellInfoResponse. * @memberof vtctldata - * @interface IGetSrvVSchemasResponse - * @property {Object.|null} [srv_v_schemas] GetSrvVSchemasResponse srv_v_schemas + * @interface IGetCellInfoResponse + * @property {topodata.ICellInfo|null} [cell_info] GetCellInfoResponse cell_info */ /** - * Constructs a new GetSrvVSchemasResponse. + * Constructs a new GetCellInfoResponse. * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemasResponse. - * @implements IGetSrvVSchemasResponse + * @classdesc Represents a GetCellInfoResponse. + * @implements IGetCellInfoResponse * @constructor - * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set */ - function GetSrvVSchemasResponse(properties) { - this.srv_v_schemas = {}; + function GetCellInfoResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100399,97 +102773,75 @@ $root.vtctldata = (function() { } /** - * GetSrvVSchemasResponse srv_v_schemas. - * @member {Object.} srv_v_schemas - * @memberof vtctldata.GetSrvVSchemasResponse + * GetCellInfoResponse cell_info. + * @member {topodata.ICellInfo|null|undefined} cell_info + * @memberof vtctldata.GetCellInfoResponse * @instance */ - GetSrvVSchemasResponse.prototype.srv_v_schemas = $util.emptyObject; + GetCellInfoResponse.prototype.cell_info = null; /** - * Creates a new GetSrvVSchemasResponse instance using the specified properties. + * Creates a new GetCellInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse instance + * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse instance */ - GetSrvVSchemasResponse.create = function create(properties) { - return new GetSrvVSchemasResponse(properties); + GetCellInfoResponse.create = function create(properties) { + return new GetCellInfoResponse(properties); }; /** - * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasResponse.encode = function encode(message, writer) { + GetCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.srv_v_schemas != null && Object.hasOwnProperty.call(message, "srv_v_schemas")) - for (var keys = Object.keys(message.srv_v_schemas), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.SrvVSchema.encode(message.srv_v_schemas[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) + $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. + * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSrvVSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. + * Decodes a GetCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasResponse.decode = function decode(reader, length) { + GetCellInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.srv_v_schemas === $util.emptyObject) - message.srv_v_schemas = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.srv_v_schemas[key] = value; + message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -100500,126 +102852,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSrvVSchemasResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSrvVSchemasResponse message. + * Verifies a GetCellInfoResponse message. * @function verify - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSrvVSchemasResponse.verify = function verify(message) { + GetCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.srv_v_schemas != null && message.hasOwnProperty("srv_v_schemas")) { - if (!$util.isObject(message.srv_v_schemas)) - return "srv_v_schemas: object expected"; - var key = Object.keys(message.srv_v_schemas); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.SrvVSchema.verify(message.srv_v_schemas[key[i]]); - if (error) - return "srv_v_schemas." + error; - } + if (message.cell_info != null && message.hasOwnProperty("cell_info")) { + var error = $root.topodata.CellInfo.verify(message.cell_info); + if (error) + return "cell_info." + error; } return null; }; /** - * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse + * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse */ - GetSrvVSchemasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemasResponse) + GetCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoResponse) return object; - var message = new $root.vtctldata.GetSrvVSchemasResponse(); - if (object.srv_v_schemas) { - if (typeof object.srv_v_schemas !== "object") - throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); - message.srv_v_schemas = {}; - for (var keys = Object.keys(object.srv_v_schemas), i = 0; i < keys.length; ++i) { - if (typeof object.srv_v_schemas[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); - message.srv_v_schemas[keys[i]] = $root.vschema.SrvVSchema.fromObject(object.srv_v_schemas[keys[i]]); - } + var message = new $root.vtctldata.GetCellInfoResponse(); + if (object.cell_info != null) { + if (typeof object.cell_info !== "object") + throw TypeError(".vtctldata.GetCellInfoResponse.cell_info: object expected"); + message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); } return message; }; /** - * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @static - * @param {vtctldata.GetSrvVSchemasResponse} message GetSrvVSchemasResponse + * @param {vtctldata.GetCellInfoResponse} message GetCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSrvVSchemasResponse.toObject = function toObject(message, options) { + GetCellInfoResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.srv_v_schemas = {}; - var keys2; - if (message.srv_v_schemas && (keys2 = Object.keys(message.srv_v_schemas)).length) { - object.srv_v_schemas = {}; - for (var j = 0; j < keys2.length; ++j) - object.srv_v_schemas[keys2[j]] = $root.vschema.SrvVSchema.toObject(message.srv_v_schemas[keys2[j]], options); - } + if (options.defaults) + object.cell_info = null; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) + object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); return object; }; /** - * Converts this GetSrvVSchemasResponse to JSON. + * Converts this GetCellInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.GetSrvVSchemasResponse + * @memberof vtctldata.GetCellInfoResponse * @instance * @returns {Object.} JSON object */ - GetSrvVSchemasResponse.prototype.toJSON = function toJSON() { + GetCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSrvVSchemasResponse; + return GetCellInfoResponse; })(); - vtctldata.GetTabletRequest = (function() { + vtctldata.GetCellInfoNamesRequest = (function() { /** - * Properties of a GetTabletRequest. + * Properties of a GetCellInfoNamesRequest. * @memberof vtctldata - * @interface IGetTabletRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetTabletRequest tablet_alias + * @interface IGetCellInfoNamesRequest */ /** - * Constructs a new GetTabletRequest. + * Constructs a new GetCellInfoNamesRequest. * @memberof vtctldata - * @classdesc Represents a GetTabletRequest. - * @implements IGetTabletRequest + * @classdesc Represents a GetCellInfoNamesRequest. + * @implements IGetCellInfoNamesRequest * @constructor - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set */ - function GetTabletRequest(properties) { + function GetCellInfoNamesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100627,76 +102964,63 @@ $root.vtctldata = (function() { } /** - * GetTabletRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetTabletRequest - * @instance - */ - GetTabletRequest.prototype.tablet_alias = null; - - /** - * Creates a new GetTabletRequest instance using the specified properties. + * Creates a new GetCellInfoNamesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletRequest} GetTabletRequest instance + * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest instance */ - GetTabletRequest.create = function create(properties) { - return new GetTabletRequest(properties); + GetCellInfoNamesRequest.create = function create(properties) { + return new GetCellInfoNamesRequest(properties); }; /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletRequest.encode = function encode(message, writer) { + GetCellInfoNamesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. + * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletRequest.decode = function decode(reader, length) { + GetCellInfoNamesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -100706,112 +103030,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoNamesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletRequest message. + * Verifies a GetCellInfoNamesRequest message. * @function verify - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletRequest.verify = function verify(message) { + GetCellInfoNamesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } return null; }; /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletRequest} GetTabletRequest + * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest */ - GetTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletRequest) + GetCellInfoNamesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoNamesRequest) return object; - var message = new $root.vtctldata.GetTabletRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetTabletRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; + return new $root.vtctldata.GetCellInfoNamesRequest(); }; /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @static - * @param {vtctldata.GetTabletRequest} message GetTabletRequest + * @param {vtctldata.GetCellInfoNamesRequest} message GetCellInfoNamesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; + GetCellInfoNamesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetTabletRequest to JSON. + * Converts this GetCellInfoNamesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetTabletRequest + * @memberof vtctldata.GetCellInfoNamesRequest * @instance * @returns {Object.} JSON object */ - GetTabletRequest.prototype.toJSON = function toJSON() { + GetCellInfoNamesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletRequest; + return GetCellInfoNamesRequest; })(); - vtctldata.GetTabletResponse = (function() { + vtctldata.GetCellInfoNamesResponse = (function() { /** - * Properties of a GetTabletResponse. + * Properties of a GetCellInfoNamesResponse. * @memberof vtctldata - * @interface IGetTabletResponse - * @property {topodata.ITablet|null} [tablet] GetTabletResponse tablet + * @interface IGetCellInfoNamesResponse + * @property {Array.|null} [names] GetCellInfoNamesResponse names */ /** - * Constructs a new GetTabletResponse. + * Constructs a new GetCellInfoNamesResponse. * @memberof vtctldata - * @classdesc Represents a GetTabletResponse. - * @implements IGetTabletResponse + * @classdesc Represents a GetCellInfoNamesResponse. + * @implements IGetCellInfoNamesResponse * @constructor - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set */ - function GetTabletResponse(properties) { + function GetCellInfoNamesResponse(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100819,75 +103126,78 @@ $root.vtctldata = (function() { } /** - * GetTabletResponse tablet. - * @member {topodata.ITablet|null|undefined} tablet - * @memberof vtctldata.GetTabletResponse + * GetCellInfoNamesResponse names. + * @member {Array.} names + * @memberof vtctldata.GetCellInfoNamesResponse * @instance */ - GetTabletResponse.prototype.tablet = null; + GetCellInfoNamesResponse.prototype.names = $util.emptyArray; /** - * Creates a new GetTabletResponse instance using the specified properties. + * Creates a new GetCellInfoNamesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletResponse} GetTabletResponse instance + * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse instance */ - GetTabletResponse.create = function create(properties) { - return new GetTabletResponse(properties); + GetCellInfoNamesResponse.create = function create(properties) { + return new GetCellInfoNamesResponse(properties); }; /** - * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletResponse.encode = function encode(message, writer) { + GetCellInfoNamesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); return writer; }; /** - * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. + * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode + * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellInfoNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletResponse message from the specified reader or buffer. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletResponse.decode = function decode(reader, length) { + GetCellInfoNamesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -100898,119 +103208,118 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellInfoNamesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletResponse message. + * Verifies a GetCellInfoNamesResponse message. * @function verify - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletResponse.verify = function verify(message) { + GetCellInfoNamesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.Tablet.verify(message.tablet); - if (error) - return "tablet." + error; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletResponse} GetTabletResponse + * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse */ - GetTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletResponse) + GetCellInfoNamesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellInfoNamesResponse) return object; - var message = new $root.vtctldata.GetTabletResponse(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.GetTabletResponse.tablet: object expected"); - message.tablet = $root.topodata.Tablet.fromObject(object.tablet); + var message = new $root.vtctldata.GetCellInfoNamesResponse(); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".vtctldata.GetCellInfoNamesResponse.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @static - * @param {vtctldata.GetTabletResponse} message GetTabletResponse + * @param {vtctldata.GetCellInfoNamesResponse} message GetCellInfoNamesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletResponse.toObject = function toObject(message, options) { + GetCellInfoNamesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); + if (options.arrays || options.defaults) + object.names = []; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } return object; }; /** - * Converts this GetTabletResponse to JSON. + * Converts this GetCellInfoNamesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetTabletResponse + * @memberof vtctldata.GetCellInfoNamesResponse * @instance * @returns {Object.} JSON object */ - GetTabletResponse.prototype.toJSON = function toJSON() { + GetCellInfoNamesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletResponse; + return GetCellInfoNamesResponse; })(); - vtctldata.GetTabletsRequest = (function() { + vtctldata.GetCellsAliasesRequest = (function() { /** - * Properties of a GetTabletsRequest. + * Properties of a GetCellsAliasesRequest. * @memberof vtctldata - * @interface IGetTabletsRequest - * @property {string|null} [keyspace] GetTabletsRequest keyspace - * @property {string|null} [shard] GetTabletsRequest shard - * @property {Array.|null} [cells] GetTabletsRequest cells - * @property {boolean|null} [strict] GetTabletsRequest strict - * @property {Array.|null} [tablet_aliases] GetTabletsRequest tablet_aliases - * @property {topodata.TabletType|null} [tablet_type] GetTabletsRequest tablet_type + * @interface IGetCellsAliasesRequest */ /** - * Constructs a new GetTabletsRequest. + * Constructs a new GetCellsAliasesRequest. * @memberof vtctldata - * @classdesc Represents a GetTabletsRequest. - * @implements IGetTabletsRequest + * @classdesc Represents a GetCellsAliasesRequest. + * @implements IGetCellsAliasesRequest * @constructor - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set + * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set */ - function GetTabletsRequest(properties) { - this.cells = []; - this.tablet_aliases = []; + function GetCellsAliasesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101018,147 +103327,63 @@ $root.vtctldata = (function() { } /** - * GetTabletsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.keyspace = ""; - - /** - * GetTabletsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.shard = ""; - - /** - * GetTabletsRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.cells = $util.emptyArray; - - /** - * GetTabletsRequest strict. - * @member {boolean} strict - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.strict = false; - - /** - * GetTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.tablet_aliases = $util.emptyArray; - - /** - * GetTabletsRequest tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.tablet_type = 0; - - /** - * Creates a new GetTabletsRequest instance using the specified properties. + * Creates a new GetCellsAliasesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest instance + * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest instance */ - GetTabletsRequest.create = function create(properties) { - return new GetTabletsRequest(properties); + GetCellsAliasesRequest.create = function create(properties) { + return new GetCellsAliasesRequest(properties); }; /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsRequest.encode = function encode(message, writer) { + GetCellsAliasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); - if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strict); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (var i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.tablet_type); return writer; }; /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCellsAliasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsRequest.decode = function decode(reader, length) { + GetCellsAliasesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 4: - message.strict = reader.bool(); - break; - case 5: - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - case 6: - message.tablet_type = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -101168,238 +103393,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { + GetCellsAliasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsRequest message. + * Verifies a GetCellsAliasesRequest message. * @function verify - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletsRequest.verify = function verify(message) { + GetCellsAliasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.strict != null && message.hasOwnProperty("strict")) - if (typeof message.strict !== "boolean") - return "strict: boolean expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (var i = 0; i < message.tablet_aliases.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); - if (error) - return "tablet_aliases." + error; - } - } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } return null; }; /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest - */ - GetTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsRequest) - return object; - var message = new $root.vtctldata.GetTabletsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetTabletsRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.strict != null) - message.strict = Boolean(object.strict); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (var i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); - } - } - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - return message; + * @param {Object.} object Plain object + * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest + */ + GetCellsAliasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellsAliasesRequest) + return object; + return new $root.vtctldata.GetCellsAliasesRequest(); }; /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @static - * @param {vtctldata.GetTabletsRequest} message GetTabletsRequest + * @param {vtctldata.GetCellsAliasesRequest} message GetCellsAliasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cells = []; - object.tablet_aliases = []; - } - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.strict = false; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.strict != null && message.hasOwnProperty("strict")) - object.strict = message.strict; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (var j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); - } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - return object; + GetCellsAliasesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetTabletsRequest to JSON. + * Converts this GetCellsAliasesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetTabletsRequest + * @memberof vtctldata.GetCellsAliasesRequest * @instance * @returns {Object.} JSON object */ - GetTabletsRequest.prototype.toJSON = function toJSON() { + GetCellsAliasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletsRequest; + return GetCellsAliasesRequest; })(); - vtctldata.GetTabletsResponse = (function() { + vtctldata.GetCellsAliasesResponse = (function() { /** - * Properties of a GetTabletsResponse. + * Properties of a GetCellsAliasesResponse. * @memberof vtctldata - * @interface IGetTabletsResponse - * @property {Array.|null} [tablets] GetTabletsResponse tablets + * @interface IGetCellsAliasesResponse + * @property {Object.|null} [aliases] GetCellsAliasesResponse aliases */ /** - * Constructs a new GetTabletsResponse. + * Constructs a new GetCellsAliasesResponse. * @memberof vtctldata - * @classdesc Represents a GetTabletsResponse. - * @implements IGetTabletsResponse + * @classdesc Represents a GetCellsAliasesResponse. + * @implements IGetCellsAliasesResponse * @constructor - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set + * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set */ - function GetTabletsResponse(properties) { - this.tablets = []; + function GetCellsAliasesResponse(properties) { + this.aliases = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101407,78 +103489,97 @@ $root.vtctldata = (function() { } /** - * GetTabletsResponse tablets. - * @member {Array.} tablets - * @memberof vtctldata.GetTabletsResponse + * GetCellsAliasesResponse aliases. + * @member {Object.} aliases + * @memberof vtctldata.GetCellsAliasesResponse * @instance */ - GetTabletsResponse.prototype.tablets = $util.emptyArray; + GetCellsAliasesResponse.prototype.aliases = $util.emptyObject; /** - * Creates a new GetTabletsResponse instance using the specified properties. + * Creates a new GetCellsAliasesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse instance + * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse instance */ - GetTabletsResponse.create = function create(properties) { - return new GetTabletsResponse(properties); + GetCellsAliasesResponse.create = function create(properties) { + return new GetCellsAliasesResponse(properties); }; /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsResponse.encode = function encode(message, writer) { + GetCellsAliasesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablets != null && message.tablets.length) - for (var i = 0; i < message.tablets.length; ++i) - $root.topodata.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aliases != null && Object.hasOwnProperty.call(message, "aliases")) + for (var keys = Object.keys(message.aliases), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.CellsAlias.encode(message.aliases[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. + * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCellsAliasesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsResponse.decode = function decode(reader, length) { + GetCellsAliasesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.tablets && message.tablets.length)) - message.tablets = []; - message.tablets.push($root.topodata.Tablet.decode(reader, reader.uint32())); + if (message.aliases === $util.emptyObject) + message.aliases = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.CellsAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.aliases[key] = value; break; default: reader.skipType(tag & 7); @@ -101489,124 +103590,126 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { + GetCellsAliasesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsResponse message. + * Verifies a GetCellsAliasesResponse message. * @function verify - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTabletsResponse.verify = function verify(message) { + GetCellsAliasesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablets != null && message.hasOwnProperty("tablets")) { - if (!Array.isArray(message.tablets)) - return "tablets: array expected"; - for (var i = 0; i < message.tablets.length; ++i) { - var error = $root.topodata.Tablet.verify(message.tablets[i]); + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!$util.isObject(message.aliases)) + return "aliases: object expected"; + var key = Object.keys(message.aliases); + for (var i = 0; i < key.length; ++i) { + var error = $root.topodata.CellsAlias.verify(message.aliases[key[i]]); if (error) - return "tablets." + error; + return "aliases." + error; } } return null; }; /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse + * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse */ - GetTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsResponse) + GetCellsAliasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetCellsAliasesResponse) return object; - var message = new $root.vtctldata.GetTabletsResponse(); - if (object.tablets) { - if (!Array.isArray(object.tablets)) - throw TypeError(".vtctldata.GetTabletsResponse.tablets: array expected"); - message.tablets = []; - for (var i = 0; i < object.tablets.length; ++i) { - if (typeof object.tablets[i] !== "object") - throw TypeError(".vtctldata.GetTabletsResponse.tablets: object expected"); - message.tablets[i] = $root.topodata.Tablet.fromObject(object.tablets[i]); + var message = new $root.vtctldata.GetCellsAliasesResponse(); + if (object.aliases) { + if (typeof object.aliases !== "object") + throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); + message.aliases = {}; + for (var keys = Object.keys(object.aliases), i = 0; i < keys.length; ++i) { + if (typeof object.aliases[keys[i]] !== "object") + throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); + message.aliases[keys[i]] = $root.topodata.CellsAlias.fromObject(object.aliases[keys[i]]); } } return message; }; /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @static - * @param {vtctldata.GetTabletsResponse} message GetTabletsResponse + * @param {vtctldata.GetCellsAliasesResponse} message GetCellsAliasesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletsResponse.toObject = function toObject(message, options) { + GetCellsAliasesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tablets = []; - if (message.tablets && message.tablets.length) { - object.tablets = []; - for (var j = 0; j < message.tablets.length; ++j) - object.tablets[j] = $root.topodata.Tablet.toObject(message.tablets[j], options); + if (options.objects || options.defaults) + object.aliases = {}; + var keys2; + if (message.aliases && (keys2 = Object.keys(message.aliases)).length) { + object.aliases = {}; + for (var j = 0; j < keys2.length; ++j) + object.aliases[keys2[j]] = $root.topodata.CellsAlias.toObject(message.aliases[keys2[j]], options); } return object; }; /** - * Converts this GetTabletsResponse to JSON. + * Converts this GetCellsAliasesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetTabletsResponse + * @memberof vtctldata.GetCellsAliasesResponse * @instance * @returns {Object.} JSON object */ - GetTabletsResponse.prototype.toJSON = function toJSON() { + GetCellsAliasesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletsResponse; + return GetCellsAliasesResponse; })(); - vtctldata.GetTopologyPathRequest = (function() { + vtctldata.GetFullStatusRequest = (function() { /** - * Properties of a GetTopologyPathRequest. + * Properties of a GetFullStatusRequest. * @memberof vtctldata - * @interface IGetTopologyPathRequest - * @property {string|null} [path] GetTopologyPathRequest path + * @interface IGetFullStatusRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetFullStatusRequest tablet_alias */ /** - * Constructs a new GetTopologyPathRequest. + * Constructs a new GetFullStatusRequest. * @memberof vtctldata - * @classdesc Represents a GetTopologyPathRequest. - * @implements IGetTopologyPathRequest + * @classdesc Represents a GetFullStatusRequest. + * @implements IGetFullStatusRequest * @constructor - * @param {vtctldata.IGetTopologyPathRequest=} [properties] Properties to set + * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set */ - function GetTopologyPathRequest(properties) { + function GetFullStatusRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101614,75 +103717,75 @@ $root.vtctldata = (function() { } /** - * GetTopologyPathRequest path. - * @member {string} path - * @memberof vtctldata.GetTopologyPathRequest + * GetFullStatusRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetFullStatusRequest * @instance */ - GetTopologyPathRequest.prototype.path = ""; + GetFullStatusRequest.prototype.tablet_alias = null; /** - * Creates a new GetTopologyPathRequest instance using the specified properties. + * Creates a new GetFullStatusRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetTopologyPathRequest=} [properties] Properties to set - * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest instance + * @param {vtctldata.IGetFullStatusRequest=} [properties] Properties to set + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest instance */ - GetTopologyPathRequest.create = function create(properties) { - return new GetTopologyPathRequest(properties); + GetFullStatusRequest.create = function create(properties) { + return new GetFullStatusRequest(properties); }; /** - * Encodes the specified GetTopologyPathRequest message. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. + * Encodes the specified GetFullStatusRequest message. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetTopologyPathRequest} message GetTopologyPathRequest message or plain object to encode + * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTopologyPathRequest.encode = function encode(message, writer) { + GetFullStatusRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTopologyPathRequest message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. + * Encodes the specified GetFullStatusRequest message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.IGetTopologyPathRequest} message GetTopologyPathRequest message or plain object to encode + * @param {vtctldata.IGetFullStatusRequest} message GetFullStatusRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTopologyPathRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFullStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTopologyPathRequest message from the specified reader or buffer. + * Decodes a GetFullStatusRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTopologyPathRequest.decode = function decode(reader, length) { + GetFullStatusRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTopologyPathRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.path = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -101693,107 +103796,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTopologyPathRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTopologyPathRequest.decodeDelimited = function decodeDelimited(reader) { + GetFullStatusRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTopologyPathRequest message. + * Verifies a GetFullStatusRequest message. * @function verify - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTopologyPathRequest.verify = function verify(message) { + GetFullStatusRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a GetTopologyPathRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest + * @returns {vtctldata.GetFullStatusRequest} GetFullStatusRequest */ - GetTopologyPathRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTopologyPathRequest) + GetFullStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetFullStatusRequest) return object; - var message = new $root.vtctldata.GetTopologyPathRequest(); - if (object.path != null) - message.path = String(object.path); + var message = new $root.vtctldata.GetFullStatusRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetFullStatusRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } return message; }; /** - * Creates a plain object from a GetTopologyPathRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFullStatusRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @static - * @param {vtctldata.GetTopologyPathRequest} message GetTopologyPathRequest + * @param {vtctldata.GetFullStatusRequest} message GetFullStatusRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTopologyPathRequest.toObject = function toObject(message, options) { + GetFullStatusRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.path = ""; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this GetTopologyPathRequest to JSON. + * Converts this GetFullStatusRequest to JSON. * @function toJSON - * @memberof vtctldata.GetTopologyPathRequest + * @memberof vtctldata.GetFullStatusRequest * @instance * @returns {Object.} JSON object */ - GetTopologyPathRequest.prototype.toJSON = function toJSON() { + GetFullStatusRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTopologyPathRequest; + return GetFullStatusRequest; })(); - vtctldata.GetTopologyPathResponse = (function() { + vtctldata.GetFullStatusResponse = (function() { /** - * Properties of a GetTopologyPathResponse. + * Properties of a GetFullStatusResponse. * @memberof vtctldata - * @interface IGetTopologyPathResponse - * @property {vtctldata.ITopologyCell|null} [cell] GetTopologyPathResponse cell + * @interface IGetFullStatusResponse + * @property {replicationdata.IFullStatus|null} [status] GetFullStatusResponse status */ /** - * Constructs a new GetTopologyPathResponse. + * Constructs a new GetFullStatusResponse. * @memberof vtctldata - * @classdesc Represents a GetTopologyPathResponse. - * @implements IGetTopologyPathResponse + * @classdesc Represents a GetFullStatusResponse. + * @implements IGetFullStatusResponse * @constructor - * @param {vtctldata.IGetTopologyPathResponse=} [properties] Properties to set + * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set */ - function GetTopologyPathResponse(properties) { + function GetFullStatusResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101801,75 +103909,75 @@ $root.vtctldata = (function() { } /** - * GetTopologyPathResponse cell. - * @member {vtctldata.ITopologyCell|null|undefined} cell - * @memberof vtctldata.GetTopologyPathResponse + * GetFullStatusResponse status. + * @member {replicationdata.IFullStatus|null|undefined} status + * @memberof vtctldata.GetFullStatusResponse * @instance */ - GetTopologyPathResponse.prototype.cell = null; + GetFullStatusResponse.prototype.status = null; /** - * Creates a new GetTopologyPathResponse instance using the specified properties. + * Creates a new GetFullStatusResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetTopologyPathResponse=} [properties] Properties to set - * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse instance + * @param {vtctldata.IGetFullStatusResponse=} [properties] Properties to set + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse instance */ - GetTopologyPathResponse.create = function create(properties) { - return new GetTopologyPathResponse(properties); + GetFullStatusResponse.create = function create(properties) { + return new GetFullStatusResponse(properties); }; /** - * Encodes the specified GetTopologyPathResponse message. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. + * Encodes the specified GetFullStatusResponse message. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetTopologyPathResponse} message GetTopologyPathResponse message or plain object to encode + * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTopologyPathResponse.encode = function encode(message, writer) { + GetFullStatusResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - $root.vtctldata.TopologyCell.encode(message.cell, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.replicationdata.FullStatus.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTopologyPathResponse message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. + * Encodes the specified GetFullStatusResponse message, length delimited. Does not implicitly {@link vtctldata.GetFullStatusResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.IGetTopologyPathResponse} message GetTopologyPathResponse message or plain object to encode + * @param {vtctldata.IGetFullStatusResponse} message GetFullStatusResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTopologyPathResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetFullStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTopologyPathResponse message from the specified reader or buffer. + * Decodes a GetFullStatusResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTopologyPathResponse.decode = function decode(reader, length) { + GetFullStatusResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTopologyPathResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetFullStatusResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cell = $root.vtctldata.TopologyCell.decode(reader, reader.uint32()); + message.status = $root.replicationdata.FullStatus.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -101880,116 +103988,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetTopologyPathResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFullStatusResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTopologyPathResponse.decodeDelimited = function decodeDelimited(reader) { + GetFullStatusResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTopologyPathResponse message. + * Verifies a GetFullStatusResponse message. * @function verify - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTopologyPathResponse.verify = function verify(message) { + GetFullStatusResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) { - var error = $root.vtctldata.TopologyCell.verify(message.cell); + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.replicationdata.FullStatus.verify(message.status); if (error) - return "cell." + error; + return "status." + error; } return null; }; /** - * Creates a GetTopologyPathResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFullStatusResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse + * @returns {vtctldata.GetFullStatusResponse} GetFullStatusResponse */ - GetTopologyPathResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTopologyPathResponse) + GetFullStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetFullStatusResponse) return object; - var message = new $root.vtctldata.GetTopologyPathResponse(); - if (object.cell != null) { - if (typeof object.cell !== "object") - throw TypeError(".vtctldata.GetTopologyPathResponse.cell: object expected"); - message.cell = $root.vtctldata.TopologyCell.fromObject(object.cell); + var message = new $root.vtctldata.GetFullStatusResponse(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".vtctldata.GetFullStatusResponse.status: object expected"); + message.status = $root.replicationdata.FullStatus.fromObject(object.status); } return message; }; /** - * Creates a plain object from a GetTopologyPathResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetFullStatusResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @static - * @param {vtctldata.GetTopologyPathResponse} message GetTopologyPathResponse + * @param {vtctldata.GetFullStatusResponse} message GetFullStatusResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTopologyPathResponse.toObject = function toObject(message, options) { + GetFullStatusResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.cell = null; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = $root.vtctldata.TopologyCell.toObject(message.cell, options); + object.status = null; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.replicationdata.FullStatus.toObject(message.status, options); return object; }; /** - * Converts this GetTopologyPathResponse to JSON. + * Converts this GetFullStatusResponse to JSON. * @function toJSON - * @memberof vtctldata.GetTopologyPathResponse + * @memberof vtctldata.GetFullStatusResponse * @instance * @returns {Object.} JSON object */ - GetTopologyPathResponse.prototype.toJSON = function toJSON() { + GetFullStatusResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTopologyPathResponse; + return GetFullStatusResponse; })(); - vtctldata.TopologyCell = (function() { + vtctldata.GetKeyspacesRequest = (function() { /** - * Properties of a TopologyCell. + * Properties of a GetKeyspacesRequest. * @memberof vtctldata - * @interface ITopologyCell - * @property {string|null} [name] TopologyCell name - * @property {string|null} [path] TopologyCell path - * @property {string|null} [data] TopologyCell data - * @property {Array.|null} [children] TopologyCell children + * @interface IGetKeyspacesRequest */ /** - * Constructs a new TopologyCell. + * Constructs a new GetKeyspacesRequest. * @memberof vtctldata - * @classdesc Represents a TopologyCell. - * @implements ITopologyCell + * @classdesc Represents a GetKeyspacesRequest. + * @implements IGetKeyspacesRequest * @constructor - * @param {vtctldata.ITopologyCell=} [properties] Properties to set + * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set */ - function TopologyCell(properties) { - this.children = []; + function GetKeyspacesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101997,118 +104100,63 @@ $root.vtctldata = (function() { } /** - * TopologyCell name. - * @member {string} name - * @memberof vtctldata.TopologyCell - * @instance - */ - TopologyCell.prototype.name = ""; - - /** - * TopologyCell path. - * @member {string} path - * @memberof vtctldata.TopologyCell - * @instance - */ - TopologyCell.prototype.path = ""; - - /** - * TopologyCell data. - * @member {string} data - * @memberof vtctldata.TopologyCell - * @instance - */ - TopologyCell.prototype.data = ""; - - /** - * TopologyCell children. - * @member {Array.} children - * @memberof vtctldata.TopologyCell - * @instance - */ - TopologyCell.prototype.children = $util.emptyArray; - - /** - * Creates a new TopologyCell instance using the specified properties. + * Creates a new GetKeyspacesRequest instance using the specified properties. * @function create - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.ITopologyCell=} [properties] Properties to set - * @returns {vtctldata.TopologyCell} TopologyCell instance + * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest instance */ - TopologyCell.create = function create(properties) { - return new TopologyCell(properties); + GetKeyspacesRequest.create = function create(properties) { + return new GetKeyspacesRequest(properties); }; /** - * Encodes the specified TopologyCell message. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. + * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.ITopologyCell} message TopologyCell message or plain object to encode + * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TopologyCell.encode = function encode(message, writer) { + GetKeyspacesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.data); - if (message.children != null && message.children.length) - for (var i = 0; i < message.children.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.children[i]); return writer; }; /** - * Encodes the specified TopologyCell message, length delimited. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. + * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.ITopologyCell} message TopologyCell message or plain object to encode + * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TopologyCell.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TopologyCell message from the specified reader or buffer. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TopologyCell} TopologyCell + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TopologyCell.decode = function decode(reader, length) { + GetKeyspacesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TopologyCell(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.data = reader.string(); - break; - case 4: - if (!(message.children && message.children.length)) - message.children = []; - message.children.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -102118,145 +104166,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a TopologyCell message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TopologyCell} TopologyCell + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TopologyCell.decodeDelimited = function decodeDelimited(reader) { + GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TopologyCell message. + * Verifies a GetKeyspacesRequest message. * @function verify - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TopologyCell.verify = function verify(message) { + GetKeyspacesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!$util.isString(message.data)) - return "data: string expected"; - if (message.children != null && message.hasOwnProperty("children")) { - if (!Array.isArray(message.children)) - return "children: array expected"; - for (var i = 0; i < message.children.length; ++i) - if (!$util.isString(message.children[i])) - return "children: string[] expected"; - } return null; }; /** - * Creates a TopologyCell message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.TopologyCell} TopologyCell + * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest */ - TopologyCell.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TopologyCell) + GetKeyspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspacesRequest) return object; - var message = new $root.vtctldata.TopologyCell(); - if (object.name != null) - message.name = String(object.name); - if (object.path != null) - message.path = String(object.path); - if (object.data != null) - message.data = String(object.data); - if (object.children) { - if (!Array.isArray(object.children)) - throw TypeError(".vtctldata.TopologyCell.children: array expected"); - message.children = []; - for (var i = 0; i < object.children.length; ++i) - message.children[i] = String(object.children[i]); - } - return message; + return new $root.vtctldata.GetKeyspacesRequest(); }; /** - * Creates a plain object from a TopologyCell message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @static - * @param {vtctldata.TopologyCell} message TopologyCell + * @param {vtctldata.GetKeyspacesRequest} message GetKeyspacesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TopologyCell.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.children = []; - if (options.defaults) { - object.name = ""; - object.path = ""; - object.data = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.data != null && message.hasOwnProperty("data")) - object.data = message.data; - if (message.children && message.children.length) { - object.children = []; - for (var j = 0; j < message.children.length; ++j) - object.children[j] = message.children[j]; - } - return object; + GetKeyspacesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this TopologyCell to JSON. + * Converts this GetKeyspacesRequest to JSON. * @function toJSON - * @memberof vtctldata.TopologyCell + * @memberof vtctldata.GetKeyspacesRequest * @instance * @returns {Object.} JSON object */ - TopologyCell.prototype.toJSON = function toJSON() { + GetKeyspacesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TopologyCell; + return GetKeyspacesRequest; })(); - vtctldata.GetVSchemaRequest = (function() { + vtctldata.GetKeyspacesResponse = (function() { /** - * Properties of a GetVSchemaRequest. + * Properties of a GetKeyspacesResponse. * @memberof vtctldata - * @interface IGetVSchemaRequest - * @property {string|null} [keyspace] GetVSchemaRequest keyspace + * @interface IGetKeyspacesResponse + * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces */ /** - * Constructs a new GetVSchemaRequest. + * Constructs a new GetKeyspacesResponse. * @memberof vtctldata - * @classdesc Represents a GetVSchemaRequest. - * @implements IGetVSchemaRequest + * @classdesc Represents a GetKeyspacesResponse. + * @implements IGetKeyspacesResponse * @constructor - * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set */ - function GetVSchemaRequest(properties) { + function GetKeyspacesResponse(properties) { + this.keyspaces = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102264,75 +104262,78 @@ $root.vtctldata = (function() { } /** - * GetVSchemaRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetVSchemaRequest + * GetKeyspacesResponse keyspaces. + * @member {Array.} keyspaces + * @memberof vtctldata.GetKeyspacesResponse * @instance */ - GetVSchemaRequest.prototype.keyspace = ""; + GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; /** - * Creates a new GetVSchemaRequest instance using the specified properties. + * Creates a new GetKeyspacesResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest instance + * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse instance */ - GetVSchemaRequest.create = function create(properties) { - return new GetVSchemaRequest(properties); + GetKeyspacesResponse.create = function create(properties) { + return new GetKeyspacesResponse(properties); }; /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVSchemaRequest.encode = function encode(message, writer) { + GetKeyspacesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.keyspaces != null && message.keyspaces.length) + for (var i = 0; i < message.keyspaces.length; ++i) + $root.vtctldata.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode + * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVSchemaRequest.decode = function decode(reader, length) { + GetKeyspacesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + if (!(message.keyspaces && message.keyspaces.length)) + message.keyspaces = []; + message.keyspaces.push($root.vtctldata.Keyspace.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -102343,107 +104344,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVSchemaRequest message. + * Verifies a GetKeyspacesResponse message. * @function verify - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVSchemaRequest.verify = function verify(message) { + GetKeyspacesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; + if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { + if (!Array.isArray(message.keyspaces)) + return "keyspaces: array expected"; + for (var i = 0; i < message.keyspaces.length; ++i) { + var error = $root.vtctldata.Keyspace.verify(message.keyspaces[i]); + if (error) + return "keyspaces." + error; + } + } return null; }; /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest + * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse */ - GetVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVSchemaRequest) + GetKeyspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspacesResponse) return object; - var message = new $root.vtctldata.GetVSchemaRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); + var message = new $root.vtctldata.GetKeyspacesResponse(); + if (object.keyspaces) { + if (!Array.isArray(object.keyspaces)) + throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: array expected"); + message.keyspaces = []; + for (var i = 0; i < object.keyspaces.length; ++i) { + if (typeof object.keyspaces[i] !== "object") + throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: object expected"); + message.keyspaces[i] = $root.vtctldata.Keyspace.fromObject(object.keyspaces[i]); + } + } return message; }; /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @static - * @param {vtctldata.GetVSchemaRequest} message GetVSchemaRequest + * @param {vtctldata.GetKeyspacesResponse} message GetKeyspacesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVSchemaRequest.toObject = function toObject(message, options) { + GetKeyspacesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + if (options.arrays || options.defaults) + object.keyspaces = []; + if (message.keyspaces && message.keyspaces.length) { + object.keyspaces = []; + for (var j = 0; j < message.keyspaces.length; ++j) + object.keyspaces[j] = $root.vtctldata.Keyspace.toObject(message.keyspaces[j], options); + } return object; }; /** - * Converts this GetVSchemaRequest to JSON. + * Converts this GetKeyspacesResponse to JSON. * @function toJSON - * @memberof vtctldata.GetVSchemaRequest + * @memberof vtctldata.GetKeyspacesResponse * @instance * @returns {Object.} JSON object */ - GetVSchemaRequest.prototype.toJSON = function toJSON() { + GetKeyspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVSchemaRequest; + return GetKeyspacesResponse; })(); - vtctldata.GetVersionRequest = (function() { + vtctldata.GetKeyspaceRequest = (function() { /** - * Properties of a GetVersionRequest. + * Properties of a GetKeyspaceRequest. * @memberof vtctldata - * @interface IGetVersionRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetVersionRequest tablet_alias + * @interface IGetKeyspaceRequest + * @property {string|null} [keyspace] GetKeyspaceRequest keyspace */ /** - * Constructs a new GetVersionRequest. + * Constructs a new GetKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a GetVersionRequest. - * @implements IGetVersionRequest + * @classdesc Represents a GetKeyspaceRequest. + * @implements IGetKeyspaceRequest * @constructor - * @param {vtctldata.IGetVersionRequest=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set */ - function GetVersionRequest(properties) { + function GetKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102451,75 +104469,75 @@ $root.vtctldata = (function() { } /** - * GetVersionRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetVersionRequest + * GetKeyspaceRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetKeyspaceRequest * @instance */ - GetVersionRequest.prototype.tablet_alias = null; + GetKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new GetKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetVersionRequest=} [properties] Properties to set - * @returns {vtctldata.GetVersionRequest} GetVersionRequest instance + * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest instance */ - GetVersionRequest.create = function create(properties) { - return new GetVersionRequest(properties); + GetKeyspaceRequest.create = function create(properties) { + return new GetKeyspaceRequest(properties); }; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encode = function encode(message, writer) { + GetKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); return writer; }; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. + * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVersionRequest} GetVersionRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionRequest.decode = function decode(reader, length) { + GetKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; default: reader.skipType(tag & 7); @@ -102530,112 +104548,107 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVersionRequest} GetVersionRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + GetKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVersionRequest message. + * Verifies a GetKeyspaceRequest message. * @function verify - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVersionRequest.verify = function verify(message) { + GetKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetVersionRequest} GetVersionRequest + * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest */ - GetVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVersionRequest) + GetKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceRequest) return object; - var message = new $root.vtctldata.GetVersionRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetVersionRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } + var message = new $root.vtctldata.GetKeyspaceRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); return message; }; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @static - * @param {vtctldata.GetVersionRequest} message GetVersionRequest + * @param {vtctldata.GetKeyspaceRequest} message GetKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVersionRequest.toObject = function toObject(message, options) { + GetKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; return object; }; /** - * Converts this GetVersionRequest to JSON. + * Converts this GetKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.GetVersionRequest + * @memberof vtctldata.GetKeyspaceRequest * @instance * @returns {Object.} JSON object */ - GetVersionRequest.prototype.toJSON = function toJSON() { + GetKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVersionRequest; + return GetKeyspaceRequest; })(); - vtctldata.GetVersionResponse = (function() { + vtctldata.GetKeyspaceResponse = (function() { /** - * Properties of a GetVersionResponse. + * Properties of a GetKeyspaceResponse. * @memberof vtctldata - * @interface IGetVersionResponse - * @property {string|null} [version] GetVersionResponse version + * @interface IGetKeyspaceResponse + * @property {vtctldata.IKeyspace|null} [keyspace] GetKeyspaceResponse keyspace */ /** - * Constructs a new GetVersionResponse. + * Constructs a new GetKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a GetVersionResponse. - * @implements IGetVersionResponse + * @classdesc Represents a GetKeyspaceResponse. + * @implements IGetKeyspaceResponse * @constructor - * @param {vtctldata.IGetVersionResponse=} [properties] Properties to set + * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set */ - function GetVersionResponse(properties) { + function GetKeyspaceResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102643,75 +104656,75 @@ $root.vtctldata = (function() { } /** - * GetVersionResponse version. - * @member {string} version - * @memberof vtctldata.GetVersionResponse + * GetKeyspaceResponse keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.GetKeyspaceResponse * @instance */ - GetVersionResponse.prototype.version = ""; + GetKeyspaceResponse.prototype.keyspace = null; /** - * Creates a new GetVersionResponse instance using the specified properties. + * Creates a new GetKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetVersionResponse=} [properties] Properties to set - * @returns {vtctldata.GetVersionResponse} GetVersionResponse instance + * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse instance */ - GetVersionResponse.create = function create(properties) { - return new GetVersionResponse(properties); + GetKeyspaceResponse.create = function create(properties) { + return new GetKeyspaceResponse(properties); }; /** - * Encodes the specified GetVersionResponse message. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetVersionResponse} message GetVersionResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionResponse.encode = function encode(message, writer) { + GetKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVersionResponse message, length delimited. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. + * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.IGetVersionResponse} message GetVersionResponse message or plain object to encode + * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVersionResponse message from the specified reader or buffer. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVersionResponse} GetVersionResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionResponse.decode = function decode(reader, length) { + GetKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVersionResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.string(); + message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -102722,107 +104735,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetVersionResponse message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVersionResponse} GetVersionResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionResponse.decodeDelimited = function decodeDelimited(reader) { + GetKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVersionResponse message. + * Verifies a GetKeyspaceResponse message. * @function verify - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVersionResponse.verify = function verify(message) { + GetKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; + } return null; }; /** - * Creates a GetVersionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetVersionResponse} GetVersionResponse + * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse */ - GetVersionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVersionResponse) + GetKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetKeyspaceResponse) return object; - var message = new $root.vtctldata.GetVersionResponse(); - if (object.version != null) - message.version = String(object.version); + var message = new $root.vtctldata.GetKeyspaceResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.GetKeyspaceResponse.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); + } return message; }; /** - * Creates a plain object from a GetVersionResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @static - * @param {vtctldata.GetVersionResponse} message GetVersionResponse + * @param {vtctldata.GetKeyspaceResponse} message GetKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVersionResponse.toObject = function toObject(message, options) { + GetKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this GetVersionResponse to JSON. + * Converts this GetKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.GetVersionResponse + * @memberof vtctldata.GetKeyspaceResponse * @instance * @returns {Object.} JSON object */ - GetVersionResponse.prototype.toJSON = function toJSON() { + GetKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVersionResponse; + return GetKeyspaceResponse; })(); - vtctldata.GetVSchemaResponse = (function() { + vtctldata.GetPermissionsRequest = (function() { /** - * Properties of a GetVSchemaResponse. + * Properties of a GetPermissionsRequest. * @memberof vtctldata - * @interface IGetVSchemaResponse - * @property {vschema.IKeyspace|null} [v_schema] GetVSchemaResponse v_schema + * @interface IGetPermissionsRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetPermissionsRequest tablet_alias */ /** - * Constructs a new GetVSchemaResponse. + * Constructs a new GetPermissionsRequest. * @memberof vtctldata - * @classdesc Represents a GetVSchemaResponse. - * @implements IGetVSchemaResponse + * @classdesc Represents a GetPermissionsRequest. + * @implements IGetPermissionsRequest * @constructor - * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set */ - function GetVSchemaResponse(properties) { + function GetPermissionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102830,75 +104848,75 @@ $root.vtctldata = (function() { } /** - * GetVSchemaResponse v_schema. - * @member {vschema.IKeyspace|null|undefined} v_schema - * @memberof vtctldata.GetVSchemaResponse + * GetPermissionsRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetPermissionsRequest * @instance */ - GetVSchemaResponse.prototype.v_schema = null; + GetPermissionsRequest.prototype.tablet_alias = null; /** - * Creates a new GetVSchemaResponse instance using the specified properties. + * Creates a new GetPermissionsRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse instance + * @param {vtctldata.IGetPermissionsRequest=} [properties] Properties to set + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest instance */ - GetVSchemaResponse.create = function create(properties) { - return new GetVSchemaResponse(properties); + GetPermissionsRequest.create = function create(properties) { + return new GetPermissionsRequest(properties); }; /** - * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. + * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode + * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVSchemaResponse.encode = function encode(message, writer) { + GetPermissionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) - $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. + * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode + * @param {vtctldata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer. + * Decodes a GetPermissionsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVSchemaResponse.decode = function decode(reader, length) { + GetPermissionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -102909,113 +104927,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + GetPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVSchemaResponse message. + * Verifies a GetPermissionsRequest message. * @function verify - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVSchemaResponse.verify = function verify(message) { + GetPermissionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) { - var error = $root.vschema.Keyspace.verify(message.v_schema); + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); if (error) - return "v_schema." + error; + return "tablet_alias." + error; } return null; }; /** - * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse + * @returns {vtctldata.GetPermissionsRequest} GetPermissionsRequest */ - GetVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVSchemaResponse) + GetPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetPermissionsRequest) return object; - var message = new $root.vtctldata.GetVSchemaResponse(); - if (object.v_schema != null) { - if (typeof object.v_schema !== "object") - throw TypeError(".vtctldata.GetVSchemaResponse.v_schema: object expected"); - message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); + var message = new $root.vtctldata.GetPermissionsRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetPermissionsRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @static - * @param {vtctldata.GetVSchemaResponse} message GetVSchemaResponse + * @param {vtctldata.GetPermissionsRequest} message GetPermissionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVSchemaResponse.toObject = function toObject(message, options) { + GetPermissionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.v_schema = null; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) - object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this GetVSchemaResponse to JSON. + * Converts this GetPermissionsRequest to JSON. * @function toJSON - * @memberof vtctldata.GetVSchemaResponse + * @memberof vtctldata.GetPermissionsRequest * @instance * @returns {Object.} JSON object */ - GetVSchemaResponse.prototype.toJSON = function toJSON() { + GetPermissionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVSchemaResponse; + return GetPermissionsRequest; })(); - vtctldata.GetWorkflowsRequest = (function() { + vtctldata.GetPermissionsResponse = (function() { /** - * Properties of a GetWorkflowsRequest. + * Properties of a GetPermissionsResponse. * @memberof vtctldata - * @interface IGetWorkflowsRequest - * @property {string|null} [keyspace] GetWorkflowsRequest keyspace - * @property {boolean|null} [active_only] GetWorkflowsRequest active_only + * @interface IGetPermissionsResponse + * @property {tabletmanagerdata.IPermissions|null} [permissions] GetPermissionsResponse permissions */ /** - * Constructs a new GetWorkflowsRequest. + * Constructs a new GetPermissionsResponse. * @memberof vtctldata - * @classdesc Represents a GetWorkflowsRequest. - * @implements IGetWorkflowsRequest + * @classdesc Represents a GetPermissionsResponse. + * @implements IGetPermissionsResponse * @constructor - * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set + * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set */ - function GetWorkflowsRequest(properties) { + function GetPermissionsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103023,88 +105040,75 @@ $root.vtctldata = (function() { } /** - * GetWorkflowsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetWorkflowsRequest - * @instance - */ - GetWorkflowsRequest.prototype.keyspace = ""; - - /** - * GetWorkflowsRequest active_only. - * @member {boolean} active_only - * @memberof vtctldata.GetWorkflowsRequest + * GetPermissionsResponse permissions. + * @member {tabletmanagerdata.IPermissions|null|undefined} permissions + * @memberof vtctldata.GetPermissionsResponse * @instance */ - GetWorkflowsRequest.prototype.active_only = false; + GetPermissionsResponse.prototype.permissions = null; /** - * Creates a new GetWorkflowsRequest instance using the specified properties. + * Creates a new GetPermissionsResponse instance using the specified properties. * @function create - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest instance + * @param {vtctldata.IGetPermissionsResponse=} [properties] Properties to set + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse instance */ - GetWorkflowsRequest.create = function create(properties) { - return new GetWorkflowsRequest(properties); + GetPermissionsResponse.create = function create(properties) { + return new GetPermissionsResponse(properties); }; /** - * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. + * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode + * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkflowsRequest.encode = function encode(message, writer) { + GetPermissionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.active_only != null && Object.hasOwnProperty.call(message, "active_only")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.active_only); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.tabletmanagerdata.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. + * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link vtctldata.GetPermissionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode + * @param {vtctldata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer. + * Decodes a GetPermissionsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkflowsRequest.decode = function decode(reader, length) { + GetPermissionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetPermissionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.active_only = reader.bool(); + message.permissions = $root.tabletmanagerdata.Permissions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -103115,117 +105119,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { + GetPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetWorkflowsRequest message. + * Verifies a GetPermissionsResponse message. * @function verify - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetWorkflowsRequest.verify = function verify(message) { + GetPermissionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.active_only != null && message.hasOwnProperty("active_only")) - if (typeof message.active_only !== "boolean") - return "active_only: boolean expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + var error = $root.tabletmanagerdata.Permissions.verify(message.permissions); + if (error) + return "permissions." + error; + } return null; }; /** - * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest + * @returns {vtctldata.GetPermissionsResponse} GetPermissionsResponse */ - GetWorkflowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetWorkflowsRequest) + GetPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetPermissionsResponse) return object; - var message = new $root.vtctldata.GetWorkflowsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.active_only != null) - message.active_only = Boolean(object.active_only); + var message = new $root.vtctldata.GetPermissionsResponse(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".vtctldata.GetPermissionsResponse.permissions: object expected"); + message.permissions = $root.tabletmanagerdata.Permissions.fromObject(object.permissions); + } return message; }; /** - * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @static - * @param {vtctldata.GetWorkflowsRequest} message GetWorkflowsRequest + * @param {vtctldata.GetPermissionsResponse} message GetPermissionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetWorkflowsRequest.toObject = function toObject(message, options) { + GetPermissionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.active_only = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.active_only != null && message.hasOwnProperty("active_only")) - object.active_only = message.active_only; + if (options.defaults) + object.permissions = null; + if (message.permissions != null && message.hasOwnProperty("permissions")) + object.permissions = $root.tabletmanagerdata.Permissions.toObject(message.permissions, options); return object; }; /** - * Converts this GetWorkflowsRequest to JSON. + * Converts this GetPermissionsResponse to JSON. * @function toJSON - * @memberof vtctldata.GetWorkflowsRequest + * @memberof vtctldata.GetPermissionsResponse * @instance * @returns {Object.} JSON object */ - GetWorkflowsRequest.prototype.toJSON = function toJSON() { + GetPermissionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetWorkflowsRequest; + return GetPermissionsResponse; })(); - vtctldata.GetWorkflowsResponse = (function() { + vtctldata.GetRoutingRulesRequest = (function() { /** - * Properties of a GetWorkflowsResponse. + * Properties of a GetRoutingRulesRequest. * @memberof vtctldata - * @interface IGetWorkflowsResponse - * @property {Array.|null} [workflows] GetWorkflowsResponse workflows + * @interface IGetRoutingRulesRequest */ /** - * Constructs a new GetWorkflowsResponse. + * Constructs a new GetRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents a GetWorkflowsResponse. - * @implements IGetWorkflowsResponse + * @classdesc Represents a GetRoutingRulesRequest. + * @implements IGetRoutingRulesRequest * @constructor - * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set + * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set */ - function GetWorkflowsResponse(properties) { - this.workflows = []; + function GetRoutingRulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103233,79 +105231,63 @@ $root.vtctldata = (function() { } /** - * GetWorkflowsResponse workflows. - * @member {Array.} workflows - * @memberof vtctldata.GetWorkflowsResponse - * @instance - */ - GetWorkflowsResponse.prototype.workflows = $util.emptyArray; - - /** - * Creates a new GetWorkflowsResponse instance using the specified properties. + * Creates a new GetRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse instance + * @param {vtctldata.IGetRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest instance */ - GetWorkflowsResponse.create = function create(properties) { - return new GetWorkflowsResponse(properties); + GetRoutingRulesRequest.create = function create(properties) { + return new GetRoutingRulesRequest(properties); }; /** - * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. + * Encodes the specified GetRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode + * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkflowsResponse.encode = function encode(message, writer) { + GetRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.workflows != null && message.workflows.length) - for (var i = 0; i < message.workflows.length; ++i) - $root.vtctldata.Workflow.encode(message.workflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. + * Encodes the specified GetRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode + * @param {vtctldata.IGetRoutingRulesRequest} message GetRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkflowsResponse.decode = function decode(reader, length) { + GetRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workflows && message.workflows.length)) - message.workflows = []; - message.workflows.push($root.vtctldata.Workflow.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -103315,128 +105297,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { + GetRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetWorkflowsResponse message. + * Verifies a GetRoutingRulesRequest message. * @function verify - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetWorkflowsResponse.verify = function verify(message) { + GetRoutingRulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workflows != null && message.hasOwnProperty("workflows")) { - if (!Array.isArray(message.workflows)) - return "workflows: array expected"; - for (var i = 0; i < message.workflows.length; ++i) { - var error = $root.vtctldata.Workflow.verify(message.workflows[i]); - if (error) - return "workflows." + error; - } - } return null; }; /** - * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse - */ - GetWorkflowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetWorkflowsResponse) - return object; - var message = new $root.vtctldata.GetWorkflowsResponse(); - if (object.workflows) { - if (!Array.isArray(object.workflows)) - throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: array expected"); - message.workflows = []; - for (var i = 0; i < object.workflows.length; ++i) { - if (typeof object.workflows[i] !== "object") - throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: object expected"); - message.workflows[i] = $root.vtctldata.Workflow.fromObject(object.workflows[i]); - } - } - return message; + * @memberof vtctldata.GetRoutingRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetRoutingRulesRequest} GetRoutingRulesRequest + */ + GetRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetRoutingRulesRequest) + return object; + return new $root.vtctldata.GetRoutingRulesRequest(); }; /** - * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @static - * @param {vtctldata.GetWorkflowsResponse} message GetWorkflowsResponse + * @param {vtctldata.GetRoutingRulesRequest} message GetRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetWorkflowsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.workflows = []; - if (message.workflows && message.workflows.length) { - object.workflows = []; - for (var j = 0; j < message.workflows.length; ++j) - object.workflows[j] = $root.vtctldata.Workflow.toObject(message.workflows[j], options); - } - return object; + GetRoutingRulesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetWorkflowsResponse to JSON. + * Converts this GetRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.GetWorkflowsResponse + * @memberof vtctldata.GetRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - GetWorkflowsResponse.prototype.toJSON = function toJSON() { + GetRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetWorkflowsResponse; + return GetRoutingRulesRequest; })(); - vtctldata.InitShardPrimaryRequest = (function() { + vtctldata.GetRoutingRulesResponse = (function() { /** - * Properties of an InitShardPrimaryRequest. + * Properties of a GetRoutingRulesResponse. * @memberof vtctldata - * @interface IInitShardPrimaryRequest - * @property {string|null} [keyspace] InitShardPrimaryRequest keyspace - * @property {string|null} [shard] InitShardPrimaryRequest shard - * @property {topodata.ITabletAlias|null} [primary_elect_tablet_alias] InitShardPrimaryRequest primary_elect_tablet_alias - * @property {boolean|null} [force] InitShardPrimaryRequest force - * @property {vttime.IDuration|null} [wait_replicas_timeout] InitShardPrimaryRequest wait_replicas_timeout + * @interface IGetRoutingRulesResponse + * @property {vschema.IRoutingRules|null} [routing_rules] GetRoutingRulesResponse routing_rules */ /** - * Constructs a new InitShardPrimaryRequest. + * Constructs a new GetRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents an InitShardPrimaryRequest. - * @implements IInitShardPrimaryRequest + * @classdesc Represents a GetRoutingRulesResponse. + * @implements IGetRoutingRulesResponse * @constructor - * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set + * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set */ - function InitShardPrimaryRequest(properties) { + function GetRoutingRulesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103444,127 +105392,75 @@ $root.vtctldata = (function() { } /** - * InitShardPrimaryRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.keyspace = ""; - - /** - * InitShardPrimaryRequest shard. - * @member {string} shard - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.shard = ""; - - /** - * InitShardPrimaryRequest primary_elect_tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} primary_elect_tablet_alias - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.primary_elect_tablet_alias = null; - - /** - * InitShardPrimaryRequest force. - * @member {boolean} force - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.force = false; - - /** - * InitShardPrimaryRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.InitShardPrimaryRequest + * GetRoutingRulesResponse routing_rules. + * @member {vschema.IRoutingRules|null|undefined} routing_rules + * @memberof vtctldata.GetRoutingRulesResponse * @instance */ - InitShardPrimaryRequest.prototype.wait_replicas_timeout = null; + GetRoutingRulesResponse.prototype.routing_rules = null; /** - * Creates a new InitShardPrimaryRequest instance using the specified properties. + * Creates a new GetRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest instance + * @param {vtctldata.IGetRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse instance */ - InitShardPrimaryRequest.create = function create(properties) { - return new InitShardPrimaryRequest(properties); + GetRoutingRulesResponse.create = function create(properties) { + return new GetRoutingRulesResponse(properties); }; /** - * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. + * Encodes the specified GetRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode + * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitShardPrimaryRequest.encode = function encode(message, writer) { + GetRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.primary_elect_tablet_alias != null && Object.hasOwnProperty.call(message, "primary_elect_tablet_alias")) - $root.topodata.TabletAlias.encode(message.primary_elect_tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) + $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. + * Encodes the specified GetRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode + * @param {vtctldata.IGetRoutingRulesResponse} message GetRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitShardPrimaryRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitShardPrimaryRequest.decode = function decode(reader, length) { + GetRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetRoutingRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.primary_elect_tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.force = reader.bool(); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); + message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -103575,151 +105471,120 @@ $root.vtctldata = (function() { }; /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitShardPrimaryRequest.decodeDelimited = function decodeDelimited(reader) { + GetRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitShardPrimaryRequest message. + * Verifies a GetRoutingRulesResponse message. * @function verify - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitShardPrimaryRequest.verify = function verify(message) { + GetRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.primary_elect_tablet_alias); - if (error) - return "primary_elect_tablet_alias." + error; - } - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { + var error = $root.vschema.RoutingRules.verify(message.routing_rules); if (error) - return "wait_replicas_timeout." + error; + return "routing_rules." + error; } return null; }; /** - * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest + * @returns {vtctldata.GetRoutingRulesResponse} GetRoutingRulesResponse */ - InitShardPrimaryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.InitShardPrimaryRequest) + GetRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetRoutingRulesResponse) return object; - var message = new $root.vtctldata.InitShardPrimaryRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.primary_elect_tablet_alias != null) { - if (typeof object.primary_elect_tablet_alias !== "object") - throw TypeError(".vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias: object expected"); - message.primary_elect_tablet_alias = $root.topodata.TabletAlias.fromObject(object.primary_elect_tablet_alias); - } - if (object.force != null) - message.force = Boolean(object.force); - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.InitShardPrimaryRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + var message = new $root.vtctldata.GetRoutingRulesResponse(); + if (object.routing_rules != null) { + if (typeof object.routing_rules !== "object") + throw TypeError(".vtctldata.GetRoutingRulesResponse.routing_rules: object expected"); + message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); } return message; }; /** - * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @static - * @param {vtctldata.InitShardPrimaryRequest} message InitShardPrimaryRequest + * @param {vtctldata.GetRoutingRulesResponse} message GetRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitShardPrimaryRequest.toObject = function toObject(message, options) { + GetRoutingRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.primary_elect_tablet_alias = null; - object.force = false; - object.wait_replicas_timeout = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) - object.primary_elect_tablet_alias = $root.topodata.TabletAlias.toObject(message.primary_elect_tablet_alias, options); - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); + if (options.defaults) + object.routing_rules = null; + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) + object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); return object; }; /** - * Converts this InitShardPrimaryRequest to JSON. + * Converts this GetRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.InitShardPrimaryRequest + * @memberof vtctldata.GetRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - InitShardPrimaryRequest.prototype.toJSON = function toJSON() { + GetRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InitShardPrimaryRequest; + return GetRoutingRulesResponse; })(); - vtctldata.InitShardPrimaryResponse = (function() { + vtctldata.GetSchemaRequest = (function() { /** - * Properties of an InitShardPrimaryResponse. + * Properties of a GetSchemaRequest. * @memberof vtctldata - * @interface IInitShardPrimaryResponse - * @property {Array.|null} [events] InitShardPrimaryResponse events + * @interface IGetSchemaRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetSchemaRequest tablet_alias + * @property {Array.|null} [tables] GetSchemaRequest tables + * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables + * @property {boolean|null} [include_views] GetSchemaRequest include_views + * @property {boolean|null} [table_names_only] GetSchemaRequest table_names_only + * @property {boolean|null} [table_sizes_only] GetSchemaRequest table_sizes_only + * @property {boolean|null} [table_schema_only] GetSchemaRequest table_schema_only */ /** - * Constructs a new InitShardPrimaryResponse. + * Constructs a new GetSchemaRequest. * @memberof vtctldata - * @classdesc Represents an InitShardPrimaryResponse. - * @implements IInitShardPrimaryResponse + * @classdesc Represents a GetSchemaRequest. + * @implements IGetSchemaRequest * @constructor - * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set + * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set */ - function InitShardPrimaryResponse(properties) { - this.events = []; + function GetSchemaRequest(properties) { + this.tables = []; + this.exclude_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103727,78 +105592,159 @@ $root.vtctldata = (function() { } /** - * InitShardPrimaryResponse events. - * @member {Array.} events - * @memberof vtctldata.InitShardPrimaryResponse + * GetSchemaRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetSchemaRequest * @instance */ - InitShardPrimaryResponse.prototype.events = $util.emptyArray; + GetSchemaRequest.prototype.tablet_alias = null; /** - * Creates a new InitShardPrimaryResponse instance using the specified properties. + * GetSchemaRequest tables. + * @member {Array.} tables + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.tables = $util.emptyArray; + + /** + * GetSchemaRequest exclude_tables. + * @member {Array.} exclude_tables + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; + + /** + * GetSchemaRequest include_views. + * @member {boolean} include_views + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.include_views = false; + + /** + * GetSchemaRequest table_names_only. + * @member {boolean} table_names_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_names_only = false; + + /** + * GetSchemaRequest table_sizes_only. + * @member {boolean} table_sizes_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_sizes_only = false; + + /** + * GetSchemaRequest table_schema_only. + * @member {boolean} table_schema_only + * @memberof vtctldata.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.table_schema_only = false; + + /** + * Creates a new GetSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse instance + * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest instance */ - InitShardPrimaryResponse.create = function create(properties) { - return new InitShardPrimaryResponse(properties); + GetSchemaRequest.create = function create(properties) { + return new GetSchemaRequest(properties); }; /** - * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode + * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitShardPrimaryResponse.encode = function encode(message, writer) { + GetSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); + if (message.exclude_tables != null && message.exclude_tables.length) + for (var i = 0; i < message.exclude_tables.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); + if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); + if (message.table_names_only != null && Object.hasOwnProperty.call(message, "table_names_only")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.table_names_only); + if (message.table_sizes_only != null && Object.hasOwnProperty.call(message, "table_sizes_only")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.table_sizes_only); + if (message.table_schema_only != null && Object.hasOwnProperty.call(message, "table_schema_only")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.table_schema_only); return writer; }; /** - * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode + * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitShardPrimaryResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. + * Decodes a GetSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitShardPrimaryResponse.decode = function decode(reader, length) { + GetSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + case 3: + if (!(message.exclude_tables && message.exclude_tables.length)) + message.exclude_tables = []; + message.exclude_tables.push(reader.string()); + break; + case 4: + message.include_views = reader.bool(); + break; + case 5: + message.table_names_only = reader.bool(); + break; + case 6: + message.table_sizes_only = reader.bool(); + break; + case 7: + message.table_schema_only = reader.bool(); break; default: reader.skipType(tag & 7); @@ -103809,124 +105755,187 @@ $root.vtctldata = (function() { }; /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitShardPrimaryResponse.decodeDelimited = function decodeDelimited(reader) { + GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitShardPrimaryResponse message. + * Verifies a GetSchemaRequest message. * @function verify - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitShardPrimaryResponse.verify = function verify(message) { + GetSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; + } + if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { + if (!Array.isArray(message.exclude_tables)) + return "exclude_tables: array expected"; + for (var i = 0; i < message.exclude_tables.length; ++i) + if (!$util.isString(message.exclude_tables[i])) + return "exclude_tables: string[] expected"; } + if (message.include_views != null && message.hasOwnProperty("include_views")) + if (typeof message.include_views !== "boolean") + return "include_views: boolean expected"; + if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) + if (typeof message.table_names_only !== "boolean") + return "table_names_only: boolean expected"; + if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) + if (typeof message.table_sizes_only !== "boolean") + return "table_sizes_only: boolean expected"; + if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) + if (typeof message.table_schema_only !== "boolean") + return "table_schema_only: boolean expected"; return null; }; /** - * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse + * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest */ - InitShardPrimaryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.InitShardPrimaryResponse) + GetSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaRequest) return object; - var message = new $root.vtctldata.InitShardPrimaryResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.InitShardPrimaryResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.InitShardPrimaryResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } + var message = new $root.vtctldata.GetSchemaRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetSchemaRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".vtctldata.GetSchemaRequest.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); + } + if (object.exclude_tables) { + if (!Array.isArray(object.exclude_tables)) + throw TypeError(".vtctldata.GetSchemaRequest.exclude_tables: array expected"); + message.exclude_tables = []; + for (var i = 0; i < object.exclude_tables.length; ++i) + message.exclude_tables[i] = String(object.exclude_tables[i]); } + if (object.include_views != null) + message.include_views = Boolean(object.include_views); + if (object.table_names_only != null) + message.table_names_only = Boolean(object.table_names_only); + if (object.table_sizes_only != null) + message.table_sizes_only = Boolean(object.table_sizes_only); + if (object.table_schema_only != null) + message.table_schema_only = Boolean(object.table_schema_only); return message; }; /** - * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @static - * @param {vtctldata.InitShardPrimaryResponse} message InitShardPrimaryResponse + * @param {vtctldata.GetSchemaRequest} message GetSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitShardPrimaryResponse.toObject = function toObject(message, options) { + GetSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + if (options.arrays || options.defaults) { + object.tables = []; + object.exclude_tables = []; + } + if (options.defaults) { + object.tablet_alias = null; + object.include_views = false; + object.table_names_only = false; + object.table_sizes_only = false; + object.table_schema_only = false; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; } + if (message.exclude_tables && message.exclude_tables.length) { + object.exclude_tables = []; + for (var j = 0; j < message.exclude_tables.length; ++j) + object.exclude_tables[j] = message.exclude_tables[j]; + } + if (message.include_views != null && message.hasOwnProperty("include_views")) + object.include_views = message.include_views; + if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) + object.table_names_only = message.table_names_only; + if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) + object.table_sizes_only = message.table_sizes_only; + if (message.table_schema_only != null && message.hasOwnProperty("table_schema_only")) + object.table_schema_only = message.table_schema_only; return object; }; /** - * Converts this InitShardPrimaryResponse to JSON. + * Converts this GetSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.InitShardPrimaryResponse + * @memberof vtctldata.GetSchemaRequest * @instance * @returns {Object.} JSON object */ - InitShardPrimaryResponse.prototype.toJSON = function toJSON() { + GetSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InitShardPrimaryResponse; + return GetSchemaRequest; })(); - vtctldata.PingTabletRequest = (function() { + vtctldata.GetSchemaResponse = (function() { /** - * Properties of a PingTabletRequest. + * Properties of a GetSchemaResponse. * @memberof vtctldata - * @interface IPingTabletRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] PingTabletRequest tablet_alias + * @interface IGetSchemaResponse + * @property {tabletmanagerdata.ISchemaDefinition|null} [schema] GetSchemaResponse schema */ /** - * Constructs a new PingTabletRequest. + * Constructs a new GetSchemaResponse. * @memberof vtctldata - * @classdesc Represents a PingTabletRequest. - * @implements IPingTabletRequest + * @classdesc Represents a GetSchemaResponse. + * @implements IGetSchemaResponse * @constructor - * @param {vtctldata.IPingTabletRequest=} [properties] Properties to set + * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set */ - function PingTabletRequest(properties) { + function GetSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103934,75 +105943,75 @@ $root.vtctldata = (function() { } /** - * PingTabletRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.PingTabletRequest + * GetSchemaResponse schema. + * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema + * @memberof vtctldata.GetSchemaResponse * @instance */ - PingTabletRequest.prototype.tablet_alias = null; + GetSchemaResponse.prototype.schema = null; /** - * Creates a new PingTabletRequest instance using the specified properties. + * Creates a new GetSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IPingTabletRequest=} [properties] Properties to set - * @returns {vtctldata.PingTabletRequest} PingTabletRequest instance + * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse instance */ - PingTabletRequest.create = function create(properties) { - return new PingTabletRequest(properties); + GetSchemaResponse.create = function create(properties) { + return new GetSchemaResponse(properties); }; /** - * Encodes the specified PingTabletRequest message. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. + * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IPingTabletRequest} message PingTabletRequest message or plain object to encode + * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingTabletRequest.encode = function encode(message, writer) { + GetSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.tabletmanagerdata.SchemaDefinition.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PingTabletRequest message, length delimited. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. + * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.IPingTabletRequest} message PingTabletRequest message or plain object to encode + * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PingTabletRequest message from the specified reader or buffer. + * Decodes a GetSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PingTabletRequest} PingTabletRequest + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingTabletRequest.decode = function decode(reader, length) { + GetSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PingTabletRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -104013,111 +106022,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a PingTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PingTabletRequest} PingTabletRequest + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingTabletRequest.decodeDelimited = function decodeDelimited(reader) { + GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PingTabletRequest message. + * Verifies a GetSchemaResponse message. * @function verify - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PingTabletRequest.verify = function verify(message) { + GetSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema); if (error) - return "tablet_alias." + error; + return "schema." + error; } return null; }; /** - * Creates a PingTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.PingTabletRequest} PingTabletRequest + * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse */ - PingTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PingTabletRequest) + GetSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSchemaResponse) return object; - var message = new $root.vtctldata.PingTabletRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.PingTabletRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.GetSchemaResponse(); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".vtctldata.GetSchemaResponse.schema: object expected"); + message.schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema); } return message; }; /** - * Creates a plain object from a PingTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @static - * @param {vtctldata.PingTabletRequest} message PingTabletRequest + * @param {vtctldata.GetSchemaResponse} message GetSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PingTabletRequest.toObject = function toObject(message, options) { + GetSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.schema = null; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema, options); return object; }; /** - * Converts this PingTabletRequest to JSON. + * Converts this GetSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.PingTabletRequest + * @memberof vtctldata.GetSchemaResponse * @instance * @returns {Object.} JSON object */ - PingTabletRequest.prototype.toJSON = function toJSON() { + GetSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PingTabletRequest; + return GetSchemaResponse; })(); - vtctldata.PingTabletResponse = (function() { + vtctldata.GetShardRequest = (function() { /** - * Properties of a PingTabletResponse. + * Properties of a GetShardRequest. * @memberof vtctldata - * @interface IPingTabletResponse + * @interface IGetShardRequest + * @property {string|null} [keyspace] GetShardRequest keyspace + * @property {string|null} [shard_name] GetShardRequest shard_name */ /** - * Constructs a new PingTabletResponse. + * Constructs a new GetShardRequest. * @memberof vtctldata - * @classdesc Represents a PingTabletResponse. - * @implements IPingTabletResponse + * @classdesc Represents a GetShardRequest. + * @implements IGetShardRequest * @constructor - * @param {vtctldata.IPingTabletResponse=} [properties] Properties to set + * @param {vtctldata.IGetShardRequest=} [properties] Properties to set */ - function PingTabletResponse(properties) { + function GetShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104125,63 +106136,89 @@ $root.vtctldata = (function() { } /** - * Creates a new PingTabletResponse instance using the specified properties. + * GetShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetShardRequest + * @instance + */ + GetShardRequest.prototype.keyspace = ""; + + /** + * GetShardRequest shard_name. + * @member {string} shard_name + * @memberof vtctldata.GetShardRequest + * @instance + */ + GetShardRequest.prototype.shard_name = ""; + + /** + * Creates a new GetShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IPingTabletResponse=} [properties] Properties to set - * @returns {vtctldata.PingTabletResponse} PingTabletResponse instance + * @param {vtctldata.IGetShardRequest=} [properties] Properties to set + * @returns {vtctldata.GetShardRequest} GetShardRequest instance */ - PingTabletResponse.create = function create(properties) { - return new PingTabletResponse(properties); + GetShardRequest.create = function create(properties) { + return new GetShardRequest(properties); }; /** - * Encodes the specified PingTabletResponse message. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. + * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IPingTabletResponse} message PingTabletResponse message or plain object to encode + * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingTabletResponse.encode = function encode(message, writer) { + GetShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); return writer; }; /** - * Encodes the specified PingTabletResponse message, length delimited. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. + * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.IPingTabletResponse} message PingTabletResponse message or plain object to encode + * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PingTabletResponse message from the specified reader or buffer. + * Decodes a GetShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PingTabletResponse} PingTabletResponse + * @returns {vtctldata.GetShardRequest} GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingTabletResponse.decode = function decode(reader, length) { + GetShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PingTabletResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + message.shard_name = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -104191,98 +106228,116 @@ $root.vtctldata = (function() { }; /** - * Decodes a PingTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PingTabletResponse} PingTabletResponse + * @returns {vtctldata.GetShardRequest} GetShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingTabletResponse.decodeDelimited = function decodeDelimited(reader) { + GetShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PingTabletResponse message. + * Verifies a GetShardRequest message. * @function verify - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PingTabletResponse.verify = function verify(message) { + GetShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + if (!$util.isString(message.shard_name)) + return "shard_name: string expected"; return null; }; /** - * Creates a PingTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.PingTabletResponse} PingTabletResponse + * @returns {vtctldata.GetShardRequest} GetShardRequest */ - PingTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PingTabletResponse) + GetShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRequest) return object; - return new $root.vtctldata.PingTabletResponse(); + var message = new $root.vtctldata.GetShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard_name != null) + message.shard_name = String(object.shard_name); + return message; }; /** - * Creates a plain object from a PingTabletResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @static - * @param {vtctldata.PingTabletResponse} message PingTabletResponse + * @param {vtctldata.GetShardRequest} message GetShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PingTabletResponse.toObject = function toObject() { - return {}; + GetShardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.shard_name = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + object.shard_name = message.shard_name; + return object; }; /** - * Converts this PingTabletResponse to JSON. + * Converts this GetShardRequest to JSON. * @function toJSON - * @memberof vtctldata.PingTabletResponse + * @memberof vtctldata.GetShardRequest * @instance * @returns {Object.} JSON object */ - PingTabletResponse.prototype.toJSON = function toJSON() { + GetShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PingTabletResponse; + return GetShardRequest; })(); - vtctldata.PlannedReparentShardRequest = (function() { + vtctldata.GetShardResponse = (function() { /** - * Properties of a PlannedReparentShardRequest. + * Properties of a GetShardResponse. * @memberof vtctldata - * @interface IPlannedReparentShardRequest - * @property {string|null} [keyspace] PlannedReparentShardRequest keyspace - * @property {string|null} [shard] PlannedReparentShardRequest shard - * @property {topodata.ITabletAlias|null} [new_primary] PlannedReparentShardRequest new_primary - * @property {topodata.ITabletAlias|null} [avoid_primary] PlannedReparentShardRequest avoid_primary - * @property {vttime.IDuration|null} [wait_replicas_timeout] PlannedReparentShardRequest wait_replicas_timeout + * @interface IGetShardResponse + * @property {vtctldata.IShard|null} [shard] GetShardResponse shard */ /** - * Constructs a new PlannedReparentShardRequest. + * Constructs a new GetShardResponse. * @memberof vtctldata - * @classdesc Represents a PlannedReparentShardRequest. - * @implements IPlannedReparentShardRequest + * @classdesc Represents a GetShardResponse. + * @implements IGetShardResponse * @constructor - * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set + * @param {vtctldata.IGetShardResponse=} [properties] Properties to set */ - function PlannedReparentShardRequest(properties) { + function GetShardResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104290,127 +106345,75 @@ $root.vtctldata = (function() { } /** - * PlannedReparentShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.keyspace = ""; - - /** - * PlannedReparentShardRequest shard. - * @member {string} shard - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.shard = ""; - - /** - * PlannedReparentShardRequest new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.new_primary = null; - - /** - * PlannedReparentShardRequest avoid_primary. - * @member {topodata.ITabletAlias|null|undefined} avoid_primary - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.avoid_primary = null; - - /** - * PlannedReparentShardRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.PlannedReparentShardRequest + * GetShardResponse shard. + * @member {vtctldata.IShard|null|undefined} shard + * @memberof vtctldata.GetShardResponse * @instance */ - PlannedReparentShardRequest.prototype.wait_replicas_timeout = null; + GetShardResponse.prototype.shard = null; /** - * Creates a new PlannedReparentShardRequest instance using the specified properties. + * Creates a new GetShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest instance + * @param {vtctldata.IGetShardResponse=} [properties] Properties to set + * @returns {vtctldata.GetShardResponse} GetShardResponse instance */ - PlannedReparentShardRequest.create = function create(properties) { - return new PlannedReparentShardRequest(properties); + GetShardResponse.create = function create(properties) { + return new GetShardResponse(properties); }; /** - * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. + * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode + * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlannedReparentShardRequest.encode = function encode(message, writer) { + GetShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.avoid_primary != null && Object.hasOwnProperty.call(message, "avoid_primary")) - $root.topodata.TabletAlias.encode(message.avoid_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. + * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode + * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlannedReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. + * Decodes a GetShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest + * @returns {vtctldata.GetShardResponse} GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlannedReparentShardRequest.decode = function decode(reader, length) { + GetShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.avoid_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); + message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -104421,159 +106424,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest + * @returns {vtctldata.GetShardResponse} GetShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlannedReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { + GetShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlannedReparentShardRequest message. - * @function verify - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlannedReparentShardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) { - var error = $root.topodata.TabletAlias.verify(message.avoid_primary); - if (error) - return "avoid_primary." + error; - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + }; + + /** + * Verifies a GetShardResponse message. + * @function verify + * @memberof vtctldata.GetShardResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetShardResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.vtctldata.Shard.verify(message.shard); if (error) - return "wait_replicas_timeout." + error; + return "shard." + error; } return null; }; /** - * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest + * @returns {vtctldata.GetShardResponse} GetShardResponse */ - PlannedReparentShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PlannedReparentShardRequest) + GetShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardResponse) return object; - var message = new $root.vtctldata.PlannedReparentShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.avoid_primary != null) { - if (typeof object.avoid_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.avoid_primary: object expected"); - message.avoid_primary = $root.topodata.TabletAlias.fromObject(object.avoid_primary); - } - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); + var message = new $root.vtctldata.GetShardResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.GetShardResponse.shard: object expected"); + message.shard = $root.vtctldata.Shard.fromObject(object.shard); } return message; }; /** - * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @static - * @param {vtctldata.PlannedReparentShardRequest} message PlannedReparentShardRequest + * @param {vtctldata.GetShardResponse} message GetShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlannedReparentShardRequest.toObject = function toObject(message, options) { + GetShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.avoid_primary = null; - object.wait_replicas_timeout = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + if (options.defaults) + object.shard = null; if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) - object.avoid_primary = $root.topodata.TabletAlias.toObject(message.avoid_primary, options); - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); + object.shard = $root.vtctldata.Shard.toObject(message.shard, options); return object; }; /** - * Converts this PlannedReparentShardRequest to JSON. + * Converts this GetShardResponse to JSON. * @function toJSON - * @memberof vtctldata.PlannedReparentShardRequest + * @memberof vtctldata.GetShardResponse * @instance * @returns {Object.} JSON object */ - PlannedReparentShardRequest.prototype.toJSON = function toJSON() { + GetShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PlannedReparentShardRequest; + return GetShardResponse; })(); - vtctldata.PlannedReparentShardResponse = (function() { + vtctldata.GetShardRoutingRulesRequest = (function() { /** - * Properties of a PlannedReparentShardResponse. + * Properties of a GetShardRoutingRulesRequest. * @memberof vtctldata - * @interface IPlannedReparentShardResponse - * @property {string|null} [keyspace] PlannedReparentShardResponse keyspace - * @property {string|null} [shard] PlannedReparentShardResponse shard - * @property {topodata.ITabletAlias|null} [promoted_primary] PlannedReparentShardResponse promoted_primary - * @property {Array.|null} [events] PlannedReparentShardResponse events + * @interface IGetShardRoutingRulesRequest */ /** - * Constructs a new PlannedReparentShardResponse. + * Constructs a new GetShardRoutingRulesRequest. * @memberof vtctldata - * @classdesc Represents a PlannedReparentShardResponse. - * @implements IPlannedReparentShardResponse + * @classdesc Represents a GetShardRoutingRulesRequest. + * @implements IGetShardRoutingRulesRequest * @constructor - * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set + * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set */ - function PlannedReparentShardResponse(properties) { - this.events = []; + function GetShardRoutingRulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104581,118 +106536,63 @@ $root.vtctldata = (function() { } /** - * PlannedReparentShardResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.keyspace = ""; - - /** - * PlannedReparentShardResponse shard. - * @member {string} shard - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.shard = ""; - - /** - * PlannedReparentShardResponse promoted_primary. - * @member {topodata.ITabletAlias|null|undefined} promoted_primary - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.promoted_primary = null; - - /** - * PlannedReparentShardResponse events. - * @member {Array.} events - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new PlannedReparentShardResponse instance using the specified properties. + * Creates a new GetShardRoutingRulesRequest instance using the specified properties. * @function create - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static - * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse instance + * @param {vtctldata.IGetShardRoutingRulesRequest=} [properties] Properties to set + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest instance */ - PlannedReparentShardResponse.create = function create(properties) { - return new PlannedReparentShardResponse(properties); + GetShardRoutingRulesRequest.create = function create(properties) { + return new GetShardRoutingRulesRequest(properties); }; /** - * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesRequest message. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static - * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlannedReparentShardResponse.encode = function encode(message, writer) { + GetShardRoutingRulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) - $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static - * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesRequest} message GetShardRoutingRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlannedReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetShardRoutingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlannedReparentShardResponse.decode = function decode(reader, length) { + GetShardRoutingRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -104702,158 +106602,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetShardRoutingRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlannedReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { + GetShardRoutingRulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlannedReparentShardResponse message. + * Verifies a GetShardRoutingRulesRequest message. * @function verify - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlannedReparentShardResponse.verify = function verify(message) { + GetShardRoutingRulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { - var error = $root.topodata.TabletAlias.verify(message.promoted_primary); - if (error) - return "promoted_primary." + error; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } return null; }; /** - * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRoutingRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse + * @returns {vtctldata.GetShardRoutingRulesRequest} GetShardRoutingRulesRequest */ - PlannedReparentShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PlannedReparentShardResponse) + GetShardRoutingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRoutingRulesRequest) return object; - var message = new $root.vtctldata.PlannedReparentShardResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.promoted_primary != null) { - if (typeof object.promoted_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardResponse.promoted_primary: object expected"); - message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.PlannedReparentShardResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.PlannedReparentShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } - } - return message; + return new $root.vtctldata.GetShardRoutingRulesRequest(); }; /** - * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetShardRoutingRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @static - * @param {vtctldata.PlannedReparentShardResponse} message PlannedReparentShardResponse + * @param {vtctldata.GetShardRoutingRulesRequest} message GetShardRoutingRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlannedReparentShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.promoted_primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) - object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } - return object; + GetShardRoutingRulesRequest.toObject = function toObject() { + return {}; }; /** - * Converts this PlannedReparentShardResponse to JSON. + * Converts this GetShardRoutingRulesRequest to JSON. * @function toJSON - * @memberof vtctldata.PlannedReparentShardResponse + * @memberof vtctldata.GetShardRoutingRulesRequest * @instance * @returns {Object.} JSON object */ - PlannedReparentShardResponse.prototype.toJSON = function toJSON() { + GetShardRoutingRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PlannedReparentShardResponse; + return GetShardRoutingRulesRequest; })(); - vtctldata.RebuildKeyspaceGraphRequest = (function() { + vtctldata.GetShardRoutingRulesResponse = (function() { /** - * Properties of a RebuildKeyspaceGraphRequest. + * Properties of a GetShardRoutingRulesResponse. * @memberof vtctldata - * @interface IRebuildKeyspaceGraphRequest - * @property {string|null} [keyspace] RebuildKeyspaceGraphRequest keyspace - * @property {Array.|null} [cells] RebuildKeyspaceGraphRequest cells - * @property {boolean|null} [allow_partial] RebuildKeyspaceGraphRequest allow_partial + * @interface IGetShardRoutingRulesResponse + * @property {vschema.IShardRoutingRules|null} [shard_routing_rules] GetShardRoutingRulesResponse shard_routing_rules */ /** - * Constructs a new RebuildKeyspaceGraphRequest. + * Constructs a new GetShardRoutingRulesResponse. * @memberof vtctldata - * @classdesc Represents a RebuildKeyspaceGraphRequest. - * @implements IRebuildKeyspaceGraphRequest + * @classdesc Represents a GetShardRoutingRulesResponse. + * @implements IGetShardRoutingRulesResponse * @constructor - * @param {vtctldata.IRebuildKeyspaceGraphRequest=} [properties] Properties to set + * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set */ - function RebuildKeyspaceGraphRequest(properties) { - this.cells = []; + function GetShardRoutingRulesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104861,104 +106697,75 @@ $root.vtctldata = (function() { } /** - * RebuildKeyspaceGraphRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RebuildKeyspaceGraphRequest - * @instance - */ - RebuildKeyspaceGraphRequest.prototype.keyspace = ""; - - /** - * RebuildKeyspaceGraphRequest cells. - * @member {Array.} cells - * @memberof vtctldata.RebuildKeyspaceGraphRequest - * @instance - */ - RebuildKeyspaceGraphRequest.prototype.cells = $util.emptyArray; - - /** - * RebuildKeyspaceGraphRequest allow_partial. - * @member {boolean} allow_partial - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * GetShardRoutingRulesResponse shard_routing_rules. + * @member {vschema.IShardRoutingRules|null|undefined} shard_routing_rules + * @memberof vtctldata.GetShardRoutingRulesResponse * @instance */ - RebuildKeyspaceGraphRequest.prototype.allow_partial = false; + GetShardRoutingRulesResponse.prototype.shard_routing_rules = null; /** - * Creates a new RebuildKeyspaceGraphRequest instance using the specified properties. + * Creates a new GetShardRoutingRulesResponse instance using the specified properties. * @function create - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IRebuildKeyspaceGraphRequest=} [properties] Properties to set - * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest instance + * @param {vtctldata.IGetShardRoutingRulesResponse=} [properties] Properties to set + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse instance */ - RebuildKeyspaceGraphRequest.create = function create(properties) { - return new RebuildKeyspaceGraphRequest(properties); + GetShardRoutingRulesResponse.create = function create(properties) { + return new GetShardRoutingRulesResponse(properties); }; /** - * Encodes the specified RebuildKeyspaceGraphRequest message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesResponse message. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IRebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildKeyspaceGraphRequest.encode = function encode(message, writer) { + GetShardRoutingRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - if (message.allow_partial != null && Object.hasOwnProperty.call(message, "allow_partial")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_partial); + if (message.shard_routing_rules != null && Object.hasOwnProperty.call(message, "shard_routing_rules")) + $root.vschema.ShardRoutingRules.encode(message.shard_routing_rules, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RebuildKeyspaceGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. + * Encodes the specified GetShardRoutingRulesResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardRoutingRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.IRebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest message or plain object to encode + * @param {vtctldata.IGetShardRoutingRulesResponse} message GetShardRoutingRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildKeyspaceGraphRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetShardRoutingRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildKeyspaceGraphRequest.decode = function decode(reader, length) { + GetShardRoutingRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildKeyspaceGraphRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRoutingRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 3: - message.allow_partial = reader.bool(); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -104969,136 +106776,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer, length delimited. + * Decodes a GetShardRoutingRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildKeyspaceGraphRequest.decodeDelimited = function decodeDelimited(reader) { + GetShardRoutingRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RebuildKeyspaceGraphRequest message. + * Verifies a GetShardRoutingRulesResponse message. * @function verify - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RebuildKeyspaceGraphRequest.verify = function verify(message) { + GetShardRoutingRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) { + var error = $root.vschema.ShardRoutingRules.verify(message.shard_routing_rules); + if (error) + return "shard_routing_rules." + error; } - if (message.allow_partial != null && message.hasOwnProperty("allow_partial")) - if (typeof message.allow_partial !== "boolean") - return "allow_partial: boolean expected"; return null; }; /** - * Creates a RebuildKeyspaceGraphRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetShardRoutingRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest + * @returns {vtctldata.GetShardRoutingRulesResponse} GetShardRoutingRulesResponse */ - RebuildKeyspaceGraphRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RebuildKeyspaceGraphRequest) + GetShardRoutingRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetShardRoutingRulesResponse) return object; - var message = new $root.vtctldata.RebuildKeyspaceGraphRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.RebuildKeyspaceGraphRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + var message = new $root.vtctldata.GetShardRoutingRulesResponse(); + if (object.shard_routing_rules != null) { + if (typeof object.shard_routing_rules !== "object") + throw TypeError(".vtctldata.GetShardRoutingRulesResponse.shard_routing_rules: object expected"); + message.shard_routing_rules = $root.vschema.ShardRoutingRules.fromObject(object.shard_routing_rules); } - if (object.allow_partial != null) - message.allow_partial = Boolean(object.allow_partial); return message; }; /** - * Creates a plain object from a RebuildKeyspaceGraphRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetShardRoutingRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @static - * @param {vtctldata.RebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest + * @param {vtctldata.GetShardRoutingRulesResponse} message GetShardRoutingRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RebuildKeyspaceGraphRequest.toObject = function toObject(message, options) { + GetShardRoutingRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) { - object.keyspace = ""; - object.allow_partial = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.allow_partial != null && message.hasOwnProperty("allow_partial")) - object.allow_partial = message.allow_partial; + if (options.defaults) + object.shard_routing_rules = null; + if (message.shard_routing_rules != null && message.hasOwnProperty("shard_routing_rules")) + object.shard_routing_rules = $root.vschema.ShardRoutingRules.toObject(message.shard_routing_rules, options); return object; }; /** - * Converts this RebuildKeyspaceGraphRequest to JSON. + * Converts this GetShardRoutingRulesResponse to JSON. * @function toJSON - * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @memberof vtctldata.GetShardRoutingRulesResponse * @instance * @returns {Object.} JSON object */ - RebuildKeyspaceGraphRequest.prototype.toJSON = function toJSON() { + GetShardRoutingRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RebuildKeyspaceGraphRequest; + return GetShardRoutingRulesResponse; })(); - vtctldata.RebuildKeyspaceGraphResponse = (function() { + vtctldata.GetSrvKeyspaceNamesRequest = (function() { /** - * Properties of a RebuildKeyspaceGraphResponse. + * Properties of a GetSrvKeyspaceNamesRequest. * @memberof vtctldata - * @interface IRebuildKeyspaceGraphResponse + * @interface IGetSrvKeyspaceNamesRequest + * @property {Array.|null} [cells] GetSrvKeyspaceNamesRequest cells */ /** - * Constructs a new RebuildKeyspaceGraphResponse. + * Constructs a new GetSrvKeyspaceNamesRequest. * @memberof vtctldata - * @classdesc Represents a RebuildKeyspaceGraphResponse. - * @implements IRebuildKeyspaceGraphResponse + * @classdesc Represents a GetSrvKeyspaceNamesRequest. + * @implements IGetSrvKeyspaceNamesRequest * @constructor - * @param {vtctldata.IRebuildKeyspaceGraphResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set */ - function RebuildKeyspaceGraphResponse(properties) { + function GetSrvKeyspaceNamesRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105106,63 +106890,79 @@ $root.vtctldata = (function() { } /** - * Creates a new RebuildKeyspaceGraphResponse instance using the specified properties. + * GetSrvKeyspaceNamesRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvKeyspaceNamesRequest + * @instance + */ + GetSrvKeyspaceNamesRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new GetSrvKeyspaceNamesRequest instance using the specified properties. * @function create - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IRebuildKeyspaceGraphResponse=} [properties] Properties to set - * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse instance + * @param {vtctldata.IGetSrvKeyspaceNamesRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest instance */ - RebuildKeyspaceGraphResponse.create = function create(properties) { - return new RebuildKeyspaceGraphResponse(properties); + GetSrvKeyspaceNamesRequest.create = function create(properties) { + return new GetSrvKeyspaceNamesRequest(properties); }; /** - * Encodes the specified RebuildKeyspaceGraphResponse message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IRebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildKeyspaceGraphResponse.encode = function encode(message, writer) { + GetSrvKeyspaceNamesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); return writer; }; /** - * Encodes the specified RebuildKeyspaceGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.IRebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildKeyspaceGraphResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspaceNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildKeyspaceGraphResponse.decode = function decode(reader, length) { + GetSrvKeyspaceNamesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildKeyspaceGraphResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -105172,95 +106972,120 @@ $root.vtctldata = (function() { }; /** - * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildKeyspaceGraphResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspaceNamesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RebuildKeyspaceGraphResponse message. + * Verifies a GetSrvKeyspaceNamesRequest message. * @function verify - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RebuildKeyspaceGraphResponse.verify = function verify(message) { + GetSrvKeyspaceNamesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a RebuildKeyspaceGraphResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse + * @returns {vtctldata.GetSrvKeyspaceNamesRequest} GetSrvKeyspaceNamesRequest */ - RebuildKeyspaceGraphResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RebuildKeyspaceGraphResponse) + GetSrvKeyspaceNamesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesRequest) return object; - return new $root.vtctldata.RebuildKeyspaceGraphResponse(); + var message = new $root.vtctldata.GetSrvKeyspaceNamesRequest(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvKeyspaceNamesRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from a RebuildKeyspaceGraphResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspaceNamesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @static - * @param {vtctldata.RebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse + * @param {vtctldata.GetSrvKeyspaceNamesRequest} message GetSrvKeyspaceNamesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RebuildKeyspaceGraphResponse.toObject = function toObject() { - return {}; + GetSrvKeyspaceNamesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this RebuildKeyspaceGraphResponse to JSON. + * Converts this GetSrvKeyspaceNamesRequest to JSON. * @function toJSON - * @memberof vtctldata.RebuildKeyspaceGraphResponse + * @memberof vtctldata.GetSrvKeyspaceNamesRequest * @instance * @returns {Object.} JSON object */ - RebuildKeyspaceGraphResponse.prototype.toJSON = function toJSON() { + GetSrvKeyspaceNamesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RebuildKeyspaceGraphResponse; + return GetSrvKeyspaceNamesRequest; })(); - vtctldata.RebuildVSchemaGraphRequest = (function() { + vtctldata.GetSrvKeyspaceNamesResponse = (function() { /** - * Properties of a RebuildVSchemaGraphRequest. + * Properties of a GetSrvKeyspaceNamesResponse. * @memberof vtctldata - * @interface IRebuildVSchemaGraphRequest - * @property {Array.|null} [cells] RebuildVSchemaGraphRequest cells + * @interface IGetSrvKeyspaceNamesResponse + * @property {Object.|null} [names] GetSrvKeyspaceNamesResponse names */ /** - * Constructs a new RebuildVSchemaGraphRequest. + * Constructs a new GetSrvKeyspaceNamesResponse. * @memberof vtctldata - * @classdesc Represents a RebuildVSchemaGraphRequest. - * @implements IRebuildVSchemaGraphRequest + * @classdesc Represents a GetSrvKeyspaceNamesResponse. + * @implements IGetSrvKeyspaceNamesResponse * @constructor - * @param {vtctldata.IRebuildVSchemaGraphRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set */ - function RebuildVSchemaGraphRequest(properties) { - this.cells = []; + function GetSrvKeyspaceNamesResponse(properties) { + this.names = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105268,78 +107093,97 @@ $root.vtctldata = (function() { } /** - * RebuildVSchemaGraphRequest cells. - * @member {Array.} cells - * @memberof vtctldata.RebuildVSchemaGraphRequest + * GetSrvKeyspaceNamesResponse names. + * @member {Object.} names + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @instance */ - RebuildVSchemaGraphRequest.prototype.cells = $util.emptyArray; + GetSrvKeyspaceNamesResponse.prototype.names = $util.emptyObject; /** - * Creates a new RebuildVSchemaGraphRequest instance using the specified properties. + * Creates a new GetSrvKeyspaceNamesResponse instance using the specified properties. * @function create - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IRebuildVSchemaGraphRequest=} [properties] Properties to set - * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest instance + * @param {vtctldata.IGetSrvKeyspaceNamesResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse instance */ - RebuildVSchemaGraphRequest.create = function create(properties) { - return new RebuildVSchemaGraphRequest(properties); + GetSrvKeyspaceNamesResponse.create = function create(properties) { + return new GetSrvKeyspaceNamesResponse(properties); }; /** - * Encodes the specified RebuildVSchemaGraphRequest message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IRebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildVSchemaGraphRequest.encode = function encode(message, writer) { + GetSrvKeyspaceNamesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); + if (message.names != null && Object.hasOwnProperty.call(message, "names")) + for (var keys = Object.keys(message.names), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.encode(message.names[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified RebuildVSchemaGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspaceNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.IRebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildVSchemaGraphRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspaceNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildVSchemaGraphRequest.decode = function decode(reader, length) { + GetSrvKeyspaceNamesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildVSchemaGraphRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + if (message.names === $util.emptyObject) + message.names = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.names[key] = value; break; default: reader.skipType(tag & 7); @@ -105350,118 +107194,331 @@ $root.vtctldata = (function() { }; /** - * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspaceNamesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildVSchemaGraphRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspaceNamesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RebuildVSchemaGraphRequest message. + * Verifies a GetSrvKeyspaceNamesResponse message. * @function verify - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RebuildVSchemaGraphRequest.verify = function verify(message) { + GetSrvKeyspaceNamesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!$util.isObject(message.names)) + return "names: object expected"; + var key = Object.keys(message.names); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify(message.names[key[i]]); + if (error) + return "names." + error; + } } return null; }; /** - * Creates a RebuildVSchemaGraphRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspaceNamesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest + * @returns {vtctldata.GetSrvKeyspaceNamesResponse} GetSrvKeyspaceNamesResponse */ - RebuildVSchemaGraphRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RebuildVSchemaGraphRequest) + GetSrvKeyspaceNamesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse) return object; - var message = new $root.vtctldata.RebuildVSchemaGraphRequest(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.RebuildVSchemaGraphRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + var message = new $root.vtctldata.GetSrvKeyspaceNamesResponse(); + if (object.names) { + if (typeof object.names !== "object") + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); + message.names = {}; + for (var keys = Object.keys(object.names), i = 0; i < keys.length; ++i) { + if (typeof object.names[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.names: object expected"); + message.names[keys[i]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.fromObject(object.names[keys[i]]); + } } return message; }; /** - * Creates a plain object from a RebuildVSchemaGraphRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspaceNamesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @static - * @param {vtctldata.RebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest + * @param {vtctldata.GetSrvKeyspaceNamesResponse} message GetSrvKeyspaceNamesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RebuildVSchemaGraphRequest.toObject = function toObject(message, options) { + GetSrvKeyspaceNamesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; + if (options.objects || options.defaults) + object.names = {}; + var keys2; + if (message.names && (keys2 = Object.keys(message.names)).length) { + object.names = {}; + for (var j = 0; j < keys2.length; ++j) + object.names[keys2[j]] = $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList.toObject(message.names[keys2[j]], options); } return object; }; /** - * Converts this RebuildVSchemaGraphRequest to JSON. + * Converts this GetSrvKeyspaceNamesResponse to JSON. * @function toJSON - * @memberof vtctldata.RebuildVSchemaGraphRequest + * @memberof vtctldata.GetSrvKeyspaceNamesResponse * @instance * @returns {Object.} JSON object */ - RebuildVSchemaGraphRequest.prototype.toJSON = function toJSON() { + GetSrvKeyspaceNamesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RebuildVSchemaGraphRequest; + GetSrvKeyspaceNamesResponse.NameList = (function() { + + /** + * Properties of a NameList. + * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @interface INameList + * @property {Array.|null} [names] NameList names + */ + + /** + * Constructs a new NameList. + * @memberof vtctldata.GetSrvKeyspaceNamesResponse + * @classdesc Represents a NameList. + * @implements INameList + * @constructor + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set + */ + function NameList(properties) { + this.names = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NameList names. + * @member {Array.} names + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @instance + */ + NameList.prototype.names = $util.emptyArray; + + /** + * Creates a new NameList instance using the specified properties. + * @function create + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList instance + */ + NameList.create = function create(properties) { + return new NameList(properties); + }; + + /** + * Encodes the specified NameList message. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @function encode + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NameList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified NameList message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspaceNamesResponse.NameList.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.INameList} message NameList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NameList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NameList message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NameList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NameList message. + * @function verify + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NameList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a NameList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.GetSrvKeyspaceNamesResponse.NameList} NameList + */ + NameList.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList) + return object; + var message = new $root.vtctldata.GetSrvKeyspaceNamesResponse.NameList(); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".vtctldata.GetSrvKeyspaceNamesResponse.NameList.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a NameList message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @static + * @param {vtctldata.GetSrvKeyspaceNamesResponse.NameList} message NameList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NameList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this NameList to JSON. + * @function toJSON + * @memberof vtctldata.GetSrvKeyspaceNamesResponse.NameList + * @instance + * @returns {Object.} JSON object + */ + NameList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NameList; + })(); + + return GetSrvKeyspaceNamesResponse; })(); - vtctldata.RebuildVSchemaGraphResponse = (function() { + vtctldata.GetSrvKeyspacesRequest = (function() { /** - * Properties of a RebuildVSchemaGraphResponse. + * Properties of a GetSrvKeyspacesRequest. * @memberof vtctldata - * @interface IRebuildVSchemaGraphResponse + * @interface IGetSrvKeyspacesRequest + * @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace + * @property {Array.|null} [cells] GetSrvKeyspacesRequest cells */ /** - * Constructs a new RebuildVSchemaGraphResponse. + * Constructs a new GetSrvKeyspacesRequest. * @memberof vtctldata - * @classdesc Represents a RebuildVSchemaGraphResponse. - * @implements IRebuildVSchemaGraphResponse + * @classdesc Represents a GetSrvKeyspacesRequest. + * @implements IGetSrvKeyspacesRequest * @constructor - * @param {vtctldata.IRebuildVSchemaGraphResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set */ - function RebuildVSchemaGraphResponse(properties) { + function GetSrvKeyspacesRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105469,63 +107526,92 @@ $root.vtctldata = (function() { } /** - * Creates a new RebuildVSchemaGraphResponse instance using the specified properties. + * GetSrvKeyspacesRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetSrvKeyspacesRequest + * @instance + */ + GetSrvKeyspacesRequest.prototype.keyspace = ""; + + /** + * GetSrvKeyspacesRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvKeyspacesRequest + * @instance + */ + GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new GetSrvKeyspacesRequest instance using the specified properties. * @function create - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IRebuildVSchemaGraphResponse=} [properties] Properties to set - * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse instance + * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance */ - RebuildVSchemaGraphResponse.create = function create(properties) { - return new RebuildVSchemaGraphResponse(properties); + GetSrvKeyspacesRequest.create = function create(properties) { + return new GetSrvKeyspacesRequest(properties); }; /** - * Encodes the specified RebuildVSchemaGraphResponse message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IRebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildVSchemaGraphResponse.encode = function encode(message, writer) { + GetSrvKeyspacesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified RebuildVSchemaGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.IRebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RebuildVSchemaGraphResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildVSchemaGraphResponse.decode = function decode(reader, length) { + GetSrvKeyspacesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildVSchemaGraphResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -105535,94 +107621,129 @@ $root.vtctldata = (function() { }; /** - * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RebuildVSchemaGraphResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RebuildVSchemaGraphResponse message. + * Verifies a GetSrvKeyspacesRequest message. * @function verify - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RebuildVSchemaGraphResponse.verify = function verify(message) { + GetSrvKeyspacesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a RebuildVSchemaGraphResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse + * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest */ - RebuildVSchemaGraphResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RebuildVSchemaGraphResponse) + GetSrvKeyspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest) return object; - return new $root.vtctldata.RebuildVSchemaGraphResponse(); + var message = new $root.vtctldata.GetSrvKeyspacesRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from a RebuildVSchemaGraphResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @static - * @param {vtctldata.RebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse + * @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RebuildVSchemaGraphResponse.toObject = function toObject() { - return {}; + GetSrvKeyspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this RebuildVSchemaGraphResponse to JSON. + * Converts this GetSrvKeyspacesRequest to JSON. * @function toJSON - * @memberof vtctldata.RebuildVSchemaGraphResponse + * @memberof vtctldata.GetSrvKeyspacesRequest * @instance * @returns {Object.} JSON object */ - RebuildVSchemaGraphResponse.prototype.toJSON = function toJSON() { + GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RebuildVSchemaGraphResponse; + return GetSrvKeyspacesRequest; })(); - vtctldata.RefreshStateRequest = (function() { + vtctldata.GetSrvKeyspacesResponse = (function() { /** - * Properties of a RefreshStateRequest. + * Properties of a GetSrvKeyspacesResponse. * @memberof vtctldata - * @interface IRefreshStateRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] RefreshStateRequest tablet_alias + * @interface IGetSrvKeyspacesResponse + * @property {Object.|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces */ /** - * Constructs a new RefreshStateRequest. + * Constructs a new GetSrvKeyspacesResponse. * @memberof vtctldata - * @classdesc Represents a RefreshStateRequest. - * @implements IRefreshStateRequest + * @classdesc Represents a GetSrvKeyspacesResponse. + * @implements IGetSrvKeyspacesResponse * @constructor - * @param {vtctldata.IRefreshStateRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set */ - function RefreshStateRequest(properties) { + function GetSrvKeyspacesResponse(properties) { + this.srv_keyspaces = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105630,75 +107751,97 @@ $root.vtctldata = (function() { } /** - * RefreshStateRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.RefreshStateRequest + * GetSrvKeyspacesResponse srv_keyspaces. + * @member {Object.} srv_keyspaces + * @memberof vtctldata.GetSrvKeyspacesResponse * @instance */ - RefreshStateRequest.prototype.tablet_alias = null; + GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject; /** - * Creates a new RefreshStateRequest instance using the specified properties. + * Creates a new GetSrvKeyspacesResponse instance using the specified properties. * @function create - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IRefreshStateRequest=} [properties] Properties to set - * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest instance + * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance */ - RefreshStateRequest.create = function create(properties) { - return new RefreshStateRequest(properties); + GetSrvKeyspacesResponse.create = function create(properties) { + return new GetSrvKeyspacesResponse(properties); }; /** - * Encodes the specified RefreshStateRequest message. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateRequest.encode = function encode(message, writer) { + GetSrvKeyspacesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces")) + for (var keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. + * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode + * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RefreshStateRequest message from the specified reader or buffer. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateRequest.decode = function decode(reader, length) { + GetSrvKeyspacesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + if (message.srv_keyspaces === $util.emptyObject) + message.srv_keyspaces = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.srv_keyspaces[key] = value; break; default: reader.skipType(tag & 7); @@ -105709,111 +107852,133 @@ $root.vtctldata = (function() { }; /** - * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RefreshStateRequest message. + * Verifies a GetSrvKeyspacesResponse message. * @function verify - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RefreshStateRequest.verify = function verify(message) { + GetSrvKeyspacesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; + if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) { + if (!$util.isObject(message.srv_keyspaces)) + return "srv_keyspaces: object expected"; + var key = Object.keys(message.srv_keyspaces); + for (var i = 0; i < key.length; ++i) { + var error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]); + if (error) + return "srv_keyspaces." + error; + } } return null; }; /** - * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest + * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse */ - RefreshStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RefreshStateRequest) + GetSrvKeyspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse) return object; - var message = new $root.vtctldata.RefreshStateRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.RefreshStateRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.GetSrvKeyspacesResponse(); + if (object.srv_keyspaces) { + if (typeof object.srv_keyspaces !== "object") + throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); + message.srv_keyspaces = {}; + for (var keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) { + if (typeof object.srv_keyspaces[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); + message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]); + } } return message; }; /** - * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @static - * @param {vtctldata.RefreshStateRequest} message RefreshStateRequest + * @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RefreshStateRequest.toObject = function toObject(message, options) { + GetSrvKeyspacesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (options.objects || options.defaults) + object.srv_keyspaces = {}; + var keys2; + if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) { + object.srv_keyspaces = {}; + for (var j = 0; j < keys2.length; ++j) + object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options); + } return object; }; /** - * Converts this RefreshStateRequest to JSON. + * Converts this GetSrvKeyspacesResponse to JSON. * @function toJSON - * @memberof vtctldata.RefreshStateRequest + * @memberof vtctldata.GetSrvKeyspacesResponse * @instance * @returns {Object.} JSON object */ - RefreshStateRequest.prototype.toJSON = function toJSON() { + GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RefreshStateRequest; + return GetSrvKeyspacesResponse; })(); - vtctldata.RefreshStateResponse = (function() { + vtctldata.UpdateThrottlerConfigRequest = (function() { /** - * Properties of a RefreshStateResponse. + * Properties of an UpdateThrottlerConfigRequest. * @memberof vtctldata - * @interface IRefreshStateResponse + * @interface IUpdateThrottlerConfigRequest + * @property {string|null} [keyspace] UpdateThrottlerConfigRequest keyspace + * @property {boolean|null} [enable] UpdateThrottlerConfigRequest enable + * @property {boolean|null} [disable] UpdateThrottlerConfigRequest disable + * @property {number|null} [threshold] UpdateThrottlerConfigRequest threshold + * @property {string|null} [custom_query] UpdateThrottlerConfigRequest custom_query + * @property {boolean|null} [custom_query_set] UpdateThrottlerConfigRequest custom_query_set + * @property {boolean|null} [check_as_check_self] UpdateThrottlerConfigRequest check_as_check_self + * @property {boolean|null} [check_as_check_shard] UpdateThrottlerConfigRequest check_as_check_shard */ /** - * Constructs a new RefreshStateResponse. + * Constructs a new UpdateThrottlerConfigRequest. * @memberof vtctldata - * @classdesc Represents a RefreshStateResponse. - * @implements IRefreshStateResponse + * @classdesc Represents an UpdateThrottlerConfigRequest. + * @implements IUpdateThrottlerConfigRequest * @constructor - * @param {vtctldata.IRefreshStateResponse=} [properties] Properties to set + * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set */ - function RefreshStateResponse(properties) { + function UpdateThrottlerConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105821,63 +107986,167 @@ $root.vtctldata = (function() { } /** - * Creates a new RefreshStateResponse instance using the specified properties. + * UpdateThrottlerConfigRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.keyspace = ""; + + /** + * UpdateThrottlerConfigRequest enable. + * @member {boolean} enable + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.enable = false; + + /** + * UpdateThrottlerConfigRequest disable. + * @member {boolean} disable + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.disable = false; + + /** + * UpdateThrottlerConfigRequest threshold. + * @member {number} threshold + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.threshold = 0; + + /** + * UpdateThrottlerConfigRequest custom_query. + * @member {string} custom_query + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.custom_query = ""; + + /** + * UpdateThrottlerConfigRequest custom_query_set. + * @member {boolean} custom_query_set + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.custom_query_set = false; + + /** + * UpdateThrottlerConfigRequest check_as_check_self. + * @member {boolean} check_as_check_self + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.check_as_check_self = false; + + /** + * UpdateThrottlerConfigRequest check_as_check_shard. + * @member {boolean} check_as_check_shard + * @memberof vtctldata.UpdateThrottlerConfigRequest + * @instance + */ + UpdateThrottlerConfigRequest.prototype.check_as_check_shard = false; + + /** + * Creates a new UpdateThrottlerConfigRequest instance using the specified properties. * @function create - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IRefreshStateResponse=} [properties] Properties to set - * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse instance + * @param {vtctldata.IUpdateThrottlerConfigRequest=} [properties] Properties to set + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest instance */ - RefreshStateResponse.create = function create(properties) { - return new RefreshStateResponse(properties); + UpdateThrottlerConfigRequest.create = function create(properties) { + return new UpdateThrottlerConfigRequest(properties); }; /** - * Encodes the specified RefreshStateResponse message. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigRequest message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateResponse.encode = function encode(message, writer) { + UpdateThrottlerConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enable); + if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.disable); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.threshold); + if (message.custom_query != null && Object.hasOwnProperty.call(message, "custom_query")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.custom_query); + if (message.custom_query_set != null && Object.hasOwnProperty.call(message, "custom_query_set")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.custom_query_set); + if (message.check_as_check_self != null && Object.hasOwnProperty.call(message, "check_as_check_self")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.check_as_check_self); + if (message.check_as_check_shard != null && Object.hasOwnProperty.call(message, "check_as_check_shard")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.check_as_check_shard); return writer; }; /** - * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateThrottlerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RefreshStateResponse message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateResponse.decode = function decode(reader, length) { + UpdateThrottlerConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + message.enable = reader.bool(); + break; + case 3: + message.disable = reader.bool(); + break; + case 4: + message.threshold = reader.double(); + break; + case 5: + message.custom_query = reader.string(); + break; + case 6: + message.custom_query_set = reader.bool(); + break; + case 7: + message.check_as_check_self = reader.bool(); + break; + case 8: + message.check_as_check_shard = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -105887,97 +108156,163 @@ $root.vtctldata = (function() { }; /** - * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateThrottlerConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RefreshStateResponse message. + * Verifies an UpdateThrottlerConfigRequest message. * @function verify - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RefreshStateResponse.verify = function verify(message) { + UpdateThrottlerConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.enable != null && message.hasOwnProperty("enable")) + if (typeof message.enable !== "boolean") + return "enable: boolean expected"; + if (message.disable != null && message.hasOwnProperty("disable")) + if (typeof message.disable !== "boolean") + return "disable: boolean expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; + if (message.custom_query != null && message.hasOwnProperty("custom_query")) + if (!$util.isString(message.custom_query)) + return "custom_query: string expected"; + if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) + if (typeof message.custom_query_set !== "boolean") + return "custom_query_set: boolean expected"; + if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) + if (typeof message.check_as_check_self !== "boolean") + return "check_as_check_self: boolean expected"; + if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) + if (typeof message.check_as_check_shard !== "boolean") + return "check_as_check_shard: boolean expected"; return null; }; /** - * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse + * @returns {vtctldata.UpdateThrottlerConfigRequest} UpdateThrottlerConfigRequest */ - RefreshStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RefreshStateResponse) + UpdateThrottlerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateThrottlerConfigRequest) return object; - return new $root.vtctldata.RefreshStateResponse(); + var message = new $root.vtctldata.UpdateThrottlerConfigRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.enable != null) + message.enable = Boolean(object.enable); + if (object.disable != null) + message.disable = Boolean(object.disable); + if (object.threshold != null) + message.threshold = Number(object.threshold); + if (object.custom_query != null) + message.custom_query = String(object.custom_query); + if (object.custom_query_set != null) + message.custom_query_set = Boolean(object.custom_query_set); + if (object.check_as_check_self != null) + message.check_as_check_self = Boolean(object.check_as_check_self); + if (object.check_as_check_shard != null) + message.check_as_check_shard = Boolean(object.check_as_check_shard); + return message; }; /** - * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateThrottlerConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @static - * @param {vtctldata.RefreshStateResponse} message RefreshStateResponse + * @param {vtctldata.UpdateThrottlerConfigRequest} message UpdateThrottlerConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RefreshStateResponse.toObject = function toObject() { - return {}; + UpdateThrottlerConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.enable = false; + object.disable = false; + object.threshold = 0; + object.custom_query = ""; + object.custom_query_set = false; + object.check_as_check_self = false; + object.check_as_check_shard = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.enable != null && message.hasOwnProperty("enable")) + object.enable = message.enable; + if (message.disable != null && message.hasOwnProperty("disable")) + object.disable = message.disable; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + if (message.custom_query != null && message.hasOwnProperty("custom_query")) + object.custom_query = message.custom_query; + if (message.custom_query_set != null && message.hasOwnProperty("custom_query_set")) + object.custom_query_set = message.custom_query_set; + if (message.check_as_check_self != null && message.hasOwnProperty("check_as_check_self")) + object.check_as_check_self = message.check_as_check_self; + if (message.check_as_check_shard != null && message.hasOwnProperty("check_as_check_shard")) + object.check_as_check_shard = message.check_as_check_shard; + return object; }; /** - * Converts this RefreshStateResponse to JSON. + * Converts this UpdateThrottlerConfigRequest to JSON. * @function toJSON - * @memberof vtctldata.RefreshStateResponse + * @memberof vtctldata.UpdateThrottlerConfigRequest * @instance * @returns {Object.} JSON object */ - RefreshStateResponse.prototype.toJSON = function toJSON() { + UpdateThrottlerConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RefreshStateResponse; + return UpdateThrottlerConfigRequest; })(); - vtctldata.RefreshStateByShardRequest = (function() { + vtctldata.UpdateThrottlerConfigResponse = (function() { /** - * Properties of a RefreshStateByShardRequest. + * Properties of an UpdateThrottlerConfigResponse. * @memberof vtctldata - * @interface IRefreshStateByShardRequest - * @property {string|null} [keyspace] RefreshStateByShardRequest keyspace - * @property {string|null} [shard] RefreshStateByShardRequest shard - * @property {Array.|null} [cells] RefreshStateByShardRequest cells + * @interface IUpdateThrottlerConfigResponse */ /** - * Constructs a new RefreshStateByShardRequest. + * Constructs a new UpdateThrottlerConfigResponse. * @memberof vtctldata - * @classdesc Represents a RefreshStateByShardRequest. - * @implements IRefreshStateByShardRequest + * @classdesc Represents an UpdateThrottlerConfigResponse. + * @implements IUpdateThrottlerConfigResponse * @constructor - * @param {vtctldata.IRefreshStateByShardRequest=} [properties] Properties to set + * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set */ - function RefreshStateByShardRequest(properties) { - this.cells = []; + function UpdateThrottlerConfigResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105985,105 +108320,63 @@ $root.vtctldata = (function() { } /** - * RefreshStateByShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RefreshStateByShardRequest - * @instance - */ - RefreshStateByShardRequest.prototype.keyspace = ""; - - /** - * RefreshStateByShardRequest shard. - * @member {string} shard - * @memberof vtctldata.RefreshStateByShardRequest - * @instance - */ - RefreshStateByShardRequest.prototype.shard = ""; - - /** - * RefreshStateByShardRequest cells. - * @member {Array.} cells - * @memberof vtctldata.RefreshStateByShardRequest - * @instance - */ - RefreshStateByShardRequest.prototype.cells = $util.emptyArray; - - /** - * Creates a new RefreshStateByShardRequest instance using the specified properties. + * Creates a new UpdateThrottlerConfigResponse instance using the specified properties. * @function create - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IRefreshStateByShardRequest=} [properties] Properties to set - * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest instance + * @param {vtctldata.IUpdateThrottlerConfigResponse=} [properties] Properties to set + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse instance */ - RefreshStateByShardRequest.create = function create(properties) { - return new RefreshStateByShardRequest(properties); + UpdateThrottlerConfigResponse.create = function create(properties) { + return new UpdateThrottlerConfigResponse(properties); }; /** - * Encodes the specified RefreshStateByShardRequest message. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigResponse message. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IRefreshStateByShardRequest} message RefreshStateByShardRequest message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateByShardRequest.encode = function encode(message, writer) { + UpdateThrottlerConfigResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); return writer; }; /** - * Encodes the specified RefreshStateByShardRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. + * Encodes the specified UpdateThrottlerConfigResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateThrottlerConfigResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.IRefreshStateByShardRequest} message RefreshStateByShardRequest message or plain object to encode + * @param {vtctldata.IUpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateByShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateThrottlerConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RefreshStateByShardRequest message from the specified reader or buffer. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateByShardRequest.decode = function decode(reader, length) { + UpdateThrottlerConfigResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateByShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateThrottlerConfigResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -106093,138 +108386,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a RefreshStateByShardRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateThrottlerConfigResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateByShardRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateThrottlerConfigResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RefreshStateByShardRequest message. + * Verifies an UpdateThrottlerConfigResponse message. * @function verify - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RefreshStateByShardRequest.verify = function verify(message) { + UpdateThrottlerConfigResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } return null; }; /** - * Creates a RefreshStateByShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateThrottlerConfigResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest + * @returns {vtctldata.UpdateThrottlerConfigResponse} UpdateThrottlerConfigResponse */ - RefreshStateByShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RefreshStateByShardRequest) + UpdateThrottlerConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateThrottlerConfigResponse) return object; - var message = new $root.vtctldata.RefreshStateByShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.RefreshStateByShardRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - return message; + return new $root.vtctldata.UpdateThrottlerConfigResponse(); }; /** - * Creates a plain object from a RefreshStateByShardRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateThrottlerConfigResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @static - * @param {vtctldata.RefreshStateByShardRequest} message RefreshStateByShardRequest + * @param {vtctldata.UpdateThrottlerConfigResponse} message UpdateThrottlerConfigResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RefreshStateByShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - return object; + UpdateThrottlerConfigResponse.toObject = function toObject() { + return {}; }; /** - * Converts this RefreshStateByShardRequest to JSON. + * Converts this UpdateThrottlerConfigResponse to JSON. * @function toJSON - * @memberof vtctldata.RefreshStateByShardRequest + * @memberof vtctldata.UpdateThrottlerConfigResponse * @instance * @returns {Object.} JSON object */ - RefreshStateByShardRequest.prototype.toJSON = function toJSON() { + UpdateThrottlerConfigResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RefreshStateByShardRequest; + return UpdateThrottlerConfigResponse; })(); - vtctldata.RefreshStateByShardResponse = (function() { + vtctldata.GetSrvVSchemaRequest = (function() { /** - * Properties of a RefreshStateByShardResponse. + * Properties of a GetSrvVSchemaRequest. * @memberof vtctldata - * @interface IRefreshStateByShardResponse - * @property {boolean|null} [is_partial_refresh] RefreshStateByShardResponse is_partial_refresh - * @property {string|null} [partial_refresh_details] RefreshStateByShardResponse partial_refresh_details + * @interface IGetSrvVSchemaRequest + * @property {string|null} [cell] GetSrvVSchemaRequest cell */ /** - * Constructs a new RefreshStateByShardResponse. + * Constructs a new GetSrvVSchemaRequest. * @memberof vtctldata - * @classdesc Represents a RefreshStateByShardResponse. - * @implements IRefreshStateByShardResponse + * @classdesc Represents a GetSrvVSchemaRequest. + * @implements IGetSrvVSchemaRequest * @constructor - * @param {vtctldata.IRefreshStateByShardResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set */ - function RefreshStateByShardResponse(properties) { + function GetSrvVSchemaRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106232,88 +108481,75 @@ $root.vtctldata = (function() { } /** - * RefreshStateByShardResponse is_partial_refresh. - * @member {boolean} is_partial_refresh - * @memberof vtctldata.RefreshStateByShardResponse - * @instance - */ - RefreshStateByShardResponse.prototype.is_partial_refresh = false; - - /** - * RefreshStateByShardResponse partial_refresh_details. - * @member {string} partial_refresh_details - * @memberof vtctldata.RefreshStateByShardResponse + * GetSrvVSchemaRequest cell. + * @member {string} cell + * @memberof vtctldata.GetSrvVSchemaRequest * @instance */ - RefreshStateByShardResponse.prototype.partial_refresh_details = ""; + GetSrvVSchemaRequest.prototype.cell = ""; /** - * Creates a new RefreshStateByShardResponse instance using the specified properties. + * Creates a new GetSrvVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IRefreshStateByShardResponse=} [properties] Properties to set - * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse instance + * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest instance */ - RefreshStateByShardResponse.create = function create(properties) { - return new RefreshStateByShardResponse(properties); + GetSrvVSchemaRequest.create = function create(properties) { + return new GetSrvVSchemaRequest(properties); }; /** - * Encodes the specified RefreshStateByShardResponse message. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IRefreshStateByShardResponse} message RefreshStateByShardResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateByShardResponse.encode = function encode(message, writer) { + GetSrvVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.is_partial_refresh != null && Object.hasOwnProperty.call(message, "is_partial_refresh")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.is_partial_refresh); - if (message.partial_refresh_details != null && Object.hasOwnProperty.call(message, "partial_refresh_details")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.partial_refresh_details); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); return writer; }; /** - * Encodes the specified RefreshStateByShardResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.IRefreshStateByShardResponse} message RefreshStateByShardResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RefreshStateByShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RefreshStateByShardResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateByShardResponse.decode = function decode(reader, length) { + GetSrvVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateByShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.is_partial_refresh = reader.bool(); - break; - case 2: - message.partial_refresh_details = reader.string(); + message.cell = reader.string(); break; default: reader.skipType(tag & 7); @@ -106324,116 +108560,107 @@ $root.vtctldata = (function() { }; /** - * Decodes a RefreshStateByShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RefreshStateByShardResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RefreshStateByShardResponse message. + * Verifies a GetSrvVSchemaRequest message. * @function verify - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RefreshStateByShardResponse.verify = function verify(message) { + GetSrvVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.is_partial_refresh != null && message.hasOwnProperty("is_partial_refresh")) - if (typeof message.is_partial_refresh !== "boolean") - return "is_partial_refresh: boolean expected"; - if (message.partial_refresh_details != null && message.hasOwnProperty("partial_refresh_details")) - if (!$util.isString(message.partial_refresh_details)) - return "partial_refresh_details: string expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a RefreshStateByShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse + * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest */ - RefreshStateByShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RefreshStateByShardResponse) + GetSrvVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemaRequest) return object; - var message = new $root.vtctldata.RefreshStateByShardResponse(); - if (object.is_partial_refresh != null) - message.is_partial_refresh = Boolean(object.is_partial_refresh); - if (object.partial_refresh_details != null) - message.partial_refresh_details = String(object.partial_refresh_details); + var message = new $root.vtctldata.GetSrvVSchemaRequest(); + if (object.cell != null) + message.cell = String(object.cell); return message; }; /** - * Creates a plain object from a RefreshStateByShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @static - * @param {vtctldata.RefreshStateByShardResponse} message RefreshStateByShardResponse + * @param {vtctldata.GetSrvVSchemaRequest} message GetSrvVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RefreshStateByShardResponse.toObject = function toObject(message, options) { + GetSrvVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.is_partial_refresh = false; - object.partial_refresh_details = ""; - } - if (message.is_partial_refresh != null && message.hasOwnProperty("is_partial_refresh")) - object.is_partial_refresh = message.is_partial_refresh; - if (message.partial_refresh_details != null && message.hasOwnProperty("partial_refresh_details")) - object.partial_refresh_details = message.partial_refresh_details; + if (options.defaults) + object.cell = ""; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; return object; }; /** - * Converts this RefreshStateByShardResponse to JSON. + * Converts this GetSrvVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.RefreshStateByShardResponse + * @memberof vtctldata.GetSrvVSchemaRequest * @instance * @returns {Object.} JSON object */ - RefreshStateByShardResponse.prototype.toJSON = function toJSON() { + GetSrvVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RefreshStateByShardResponse; + return GetSrvVSchemaRequest; })(); - vtctldata.ReloadSchemaRequest = (function() { + vtctldata.GetSrvVSchemaResponse = (function() { /** - * Properties of a ReloadSchemaRequest. + * Properties of a GetSrvVSchemaResponse. * @memberof vtctldata - * @interface IReloadSchemaRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ReloadSchemaRequest tablet_alias + * @interface IGetSrvVSchemaResponse + * @property {vschema.ISrvVSchema|null} [srv_v_schema] GetSrvVSchemaResponse srv_v_schema */ /** - * Constructs a new ReloadSchemaRequest. + * Constructs a new GetSrvVSchemaResponse. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaRequest. - * @implements IReloadSchemaRequest + * @classdesc Represents a GetSrvVSchemaResponse. + * @implements IGetSrvVSchemaResponse * @constructor - * @param {vtctldata.IReloadSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set */ - function ReloadSchemaRequest(properties) { + function GetSrvVSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106441,75 +108668,75 @@ $root.vtctldata = (function() { } /** - * ReloadSchemaRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ReloadSchemaRequest + * GetSrvVSchemaResponse srv_v_schema. + * @member {vschema.ISrvVSchema|null|undefined} srv_v_schema + * @memberof vtctldata.GetSrvVSchemaResponse * @instance */ - ReloadSchemaRequest.prototype.tablet_alias = null; + GetSrvVSchemaResponse.prototype.srv_v_schema = null; /** - * Creates a new ReloadSchemaRequest instance using the specified properties. + * Creates a new GetSrvVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IReloadSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest instance + * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse instance */ - ReloadSchemaRequest.create = function create(properties) { - return new ReloadSchemaRequest(properties); + GetSrvVSchemaResponse.create = function create(properties) { + return new GetSrvVSchemaResponse(properties); }; /** - * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaRequest.encode = function encode(message, writer) { + GetSrvVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.srv_v_schema != null && Object.hasOwnProperty.call(message, "srv_v_schema")) + $root.vschema.SrvVSchema.encode(message.srv_v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaRequest.decode = function decode(reader, length) { + GetSrvVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.srv_v_schema = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -106520,111 +108747,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaRequest message. + * Verifies a GetSrvVSchemaResponse message. * @function verify - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaRequest.verify = function verify(message) { + GetSrvVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) { + var error = $root.vschema.SrvVSchema.verify(message.srv_v_schema); if (error) - return "tablet_alias." + error; + return "srv_v_schema." + error; } return null; }; /** - * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest + * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse */ - ReloadSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaRequest) + GetSrvVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemaResponse) return object; - var message = new $root.vtctldata.ReloadSchemaRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ReloadSchemaRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.GetSrvVSchemaResponse(); + if (object.srv_v_schema != null) { + if (typeof object.srv_v_schema !== "object") + throw TypeError(".vtctldata.GetSrvVSchemaResponse.srv_v_schema: object expected"); + message.srv_v_schema = $root.vschema.SrvVSchema.fromObject(object.srv_v_schema); } return message; }; /** - * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @static - * @param {vtctldata.ReloadSchemaRequest} message ReloadSchemaRequest + * @param {vtctldata.GetSrvVSchemaResponse} message GetSrvVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaRequest.toObject = function toObject(message, options) { + GetSrvVSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + object.srv_v_schema = null; + if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) + object.srv_v_schema = $root.vschema.SrvVSchema.toObject(message.srv_v_schema, options); return object; }; /** - * Converts this ReloadSchemaRequest to JSON. + * Converts this GetSrvVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaRequest + * @memberof vtctldata.GetSrvVSchemaResponse * @instance * @returns {Object.} JSON object */ - ReloadSchemaRequest.prototype.toJSON = function toJSON() { + GetSrvVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaRequest; + return GetSrvVSchemaResponse; })(); - vtctldata.ReloadSchemaResponse = (function() { + vtctldata.GetSrvVSchemasRequest = (function() { /** - * Properties of a ReloadSchemaResponse. + * Properties of a GetSrvVSchemasRequest. * @memberof vtctldata - * @interface IReloadSchemaResponse + * @interface IGetSrvVSchemasRequest + * @property {Array.|null} [cells] GetSrvVSchemasRequest cells */ /** - * Constructs a new ReloadSchemaResponse. + * Constructs a new GetSrvVSchemasRequest. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaResponse. - * @implements IReloadSchemaResponse + * @classdesc Represents a GetSrvVSchemasRequest. + * @implements IGetSrvVSchemasRequest * @constructor - * @param {vtctldata.IReloadSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set */ - function ReloadSchemaResponse(properties) { + function GetSrvVSchemasRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106632,63 +108861,79 @@ $root.vtctldata = (function() { } /** - * Creates a new ReloadSchemaResponse instance using the specified properties. + * GetSrvVSchemasRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetSrvVSchemasRequest + * @instance + */ + GetSrvVSchemasRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new GetSrvVSchemasRequest instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IReloadSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse instance + * @param {vtctldata.IGetSrvVSchemasRequest=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest instance */ - ReloadSchemaResponse.create = function create(properties) { - return new ReloadSchemaResponse(properties); + GetSrvVSchemasRequest.create = function create(properties) { + return new GetSrvVSchemasRequest(properties); }; /** - * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemasRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaResponse.encode = function encode(message, writer) { + GetSrvVSchemasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. + * Encodes the specified GetSrvVSchemasRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasRequest} message GetSrvVSchemasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaResponse.decode = function decode(reader, length) { + GetSrvVSchemasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -106698,97 +108943,120 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaResponse message. + * Verifies a GetSrvVSchemasRequest message. * @function verify - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaResponse.verify = function verify(message) { + GetSrvVSchemasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse + * @returns {vtctldata.GetSrvVSchemasRequest} GetSrvVSchemasRequest */ - ReloadSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaResponse) + GetSrvVSchemasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemasRequest) return object; - return new $root.vtctldata.ReloadSchemaResponse(); + var message = new $root.vtctldata.GetSrvVSchemasRequest(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetSrvVSchemasRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + return message; }; /** - * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @static - * @param {vtctldata.ReloadSchemaResponse} message ReloadSchemaResponse + * @param {vtctldata.GetSrvVSchemasRequest} message GetSrvVSchemasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaResponse.toObject = function toObject() { - return {}; + GetSrvVSchemasRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + return object; }; /** - * Converts this ReloadSchemaResponse to JSON. + * Converts this GetSrvVSchemasRequest to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaResponse + * @memberof vtctldata.GetSrvVSchemasRequest * @instance * @returns {Object.} JSON object */ - ReloadSchemaResponse.prototype.toJSON = function toJSON() { + GetSrvVSchemasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaResponse; + return GetSrvVSchemasRequest; })(); - vtctldata.ReloadSchemaKeyspaceRequest = (function() { + vtctldata.GetSrvVSchemasResponse = (function() { /** - * Properties of a ReloadSchemaKeyspaceRequest. + * Properties of a GetSrvVSchemasResponse. * @memberof vtctldata - * @interface IReloadSchemaKeyspaceRequest - * @property {string|null} [keyspace] ReloadSchemaKeyspaceRequest keyspace - * @property {string|null} [wait_position] ReloadSchemaKeyspaceRequest wait_position - * @property {boolean|null} [include_primary] ReloadSchemaKeyspaceRequest include_primary - * @property {number|null} [concurrency] ReloadSchemaKeyspaceRequest concurrency + * @interface IGetSrvVSchemasResponse + * @property {Object.|null} [srv_v_schemas] GetSrvVSchemasResponse srv_v_schemas */ /** - * Constructs a new ReloadSchemaKeyspaceRequest. + * Constructs a new GetSrvVSchemasResponse. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaKeyspaceRequest. - * @implements IReloadSchemaKeyspaceRequest + * @classdesc Represents a GetSrvVSchemasResponse. + * @implements IGetSrvVSchemasResponse * @constructor - * @param {vtctldata.IReloadSchemaKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set */ - function ReloadSchemaKeyspaceRequest(properties) { + function GetSrvVSchemasResponse(properties) { + this.srv_v_schemas = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106796,114 +109064,97 @@ $root.vtctldata = (function() { } /** - * ReloadSchemaKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ReloadSchemaKeyspaceRequest - * @instance - */ - ReloadSchemaKeyspaceRequest.prototype.keyspace = ""; - - /** - * ReloadSchemaKeyspaceRequest wait_position. - * @member {string} wait_position - * @memberof vtctldata.ReloadSchemaKeyspaceRequest - * @instance - */ - ReloadSchemaKeyspaceRequest.prototype.wait_position = ""; - - /** - * ReloadSchemaKeyspaceRequest include_primary. - * @member {boolean} include_primary - * @memberof vtctldata.ReloadSchemaKeyspaceRequest - * @instance - */ - ReloadSchemaKeyspaceRequest.prototype.include_primary = false; - - /** - * ReloadSchemaKeyspaceRequest concurrency. - * @member {number} concurrency - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * GetSrvVSchemasResponse srv_v_schemas. + * @member {Object.} srv_v_schemas + * @memberof vtctldata.GetSrvVSchemasResponse * @instance */ - ReloadSchemaKeyspaceRequest.prototype.concurrency = 0; + GetSrvVSchemasResponse.prototype.srv_v_schemas = $util.emptyObject; /** - * Creates a new ReloadSchemaKeyspaceRequest instance using the specified properties. + * Creates a new GetSrvVSchemasResponse instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IReloadSchemaKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest instance + * @param {vtctldata.IGetSrvVSchemasResponse=} [properties] Properties to set + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse instance */ - ReloadSchemaKeyspaceRequest.create = function create(properties) { - return new ReloadSchemaKeyspaceRequest(properties); + GetSrvVSchemasResponse.create = function create(properties) { + return new GetSrvVSchemasResponse(properties); }; /** - * Encodes the specified ReloadSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemasResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaKeyspaceRequest.encode = function encode(message, writer) { + GetSrvVSchemasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.wait_position); - if (message.include_primary != null && Object.hasOwnProperty.call(message, "include_primary")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.include_primary); - if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.concurrency); + if (message.srv_v_schemas != null && Object.hasOwnProperty.call(message, "srv_v_schemas")) + for (var keys = Object.keys(message.srv_v_schemas), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vschema.SrvVSchema.encode(message.srv_v_schemas[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ReloadSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. + * Encodes the specified GetSrvVSchemasResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.IReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest message or plain object to encode + * @param {vtctldata.IGetSrvVSchemasResponse} message GetSrvVSchemasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSrvVSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaKeyspaceRequest.decode = function decode(reader, length) { + GetSrvVSchemasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemasResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.wait_position = reader.string(); - break; - case 3: - message.include_primary = reader.bool(); - break; - case 4: - message.concurrency = reader.uint32(); + if (message.srv_v_schemas === $util.emptyObject) + message.srv_v_schemas = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.srv_v_schemas[key] = value; break; default: reader.skipType(tag & 7); @@ -106914,133 +109165,126 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSrvVSchemasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + GetSrvVSchemasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaKeyspaceRequest message. + * Verifies a GetSrvVSchemasResponse message. * @function verify - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaKeyspaceRequest.verify = function verify(message) { + GetSrvVSchemasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - if (!$util.isString(message.wait_position)) - return "wait_position: string expected"; - if (message.include_primary != null && message.hasOwnProperty("include_primary")) - if (typeof message.include_primary !== "boolean") - return "include_primary: boolean expected"; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (!$util.isInteger(message.concurrency)) - return "concurrency: integer expected"; + if (message.srv_v_schemas != null && message.hasOwnProperty("srv_v_schemas")) { + if (!$util.isObject(message.srv_v_schemas)) + return "srv_v_schemas: object expected"; + var key = Object.keys(message.srv_v_schemas); + for (var i = 0; i < key.length; ++i) { + var error = $root.vschema.SrvVSchema.verify(message.srv_v_schemas[key[i]]); + if (error) + return "srv_v_schemas." + error; + } + } return null; }; /** - * Creates a ReloadSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSrvVSchemasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest + * @returns {vtctldata.GetSrvVSchemasResponse} GetSrvVSchemasResponse */ - ReloadSchemaKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaKeyspaceRequest) + GetSrvVSchemasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetSrvVSchemasResponse) return object; - var message = new $root.vtctldata.ReloadSchemaKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.wait_position != null) - message.wait_position = String(object.wait_position); - if (object.include_primary != null) - message.include_primary = Boolean(object.include_primary); - if (object.concurrency != null) - message.concurrency = object.concurrency >>> 0; + var message = new $root.vtctldata.GetSrvVSchemasResponse(); + if (object.srv_v_schemas) { + if (typeof object.srv_v_schemas !== "object") + throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); + message.srv_v_schemas = {}; + for (var keys = Object.keys(object.srv_v_schemas), i = 0; i < keys.length; ++i) { + if (typeof object.srv_v_schemas[keys[i]] !== "object") + throw TypeError(".vtctldata.GetSrvVSchemasResponse.srv_v_schemas: object expected"); + message.srv_v_schemas[keys[i]] = $root.vschema.SrvVSchema.fromObject(object.srv_v_schemas[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a ReloadSchemaKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSrvVSchemasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @static - * @param {vtctldata.ReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest + * @param {vtctldata.GetSrvVSchemasResponse} message GetSrvVSchemasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaKeyspaceRequest.toObject = function toObject(message, options) { + GetSrvVSchemasResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.wait_position = ""; - object.include_primary = false; - object.concurrency = 0; + if (options.objects || options.defaults) + object.srv_v_schemas = {}; + var keys2; + if (message.srv_v_schemas && (keys2 = Object.keys(message.srv_v_schemas)).length) { + object.srv_v_schemas = {}; + for (var j = 0; j < keys2.length; ++j) + object.srv_v_schemas[keys2[j]] = $root.vschema.SrvVSchema.toObject(message.srv_v_schemas[keys2[j]], options); } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - object.wait_position = message.wait_position; - if (message.include_primary != null && message.hasOwnProperty("include_primary")) - object.include_primary = message.include_primary; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - object.concurrency = message.concurrency; return object; }; /** - * Converts this ReloadSchemaKeyspaceRequest to JSON. + * Converts this GetSrvVSchemasResponse to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @memberof vtctldata.GetSrvVSchemasResponse * @instance * @returns {Object.} JSON object */ - ReloadSchemaKeyspaceRequest.prototype.toJSON = function toJSON() { + GetSrvVSchemasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaKeyspaceRequest; + return GetSrvVSchemasResponse; })(); - vtctldata.ReloadSchemaKeyspaceResponse = (function() { + vtctldata.GetTabletRequest = (function() { /** - * Properties of a ReloadSchemaKeyspaceResponse. + * Properties of a GetTabletRequest. * @memberof vtctldata - * @interface IReloadSchemaKeyspaceResponse - * @property {Array.|null} [events] ReloadSchemaKeyspaceResponse events + * @interface IGetTabletRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetTabletRequest tablet_alias */ /** - * Constructs a new ReloadSchemaKeyspaceResponse. + * Constructs a new GetTabletRequest. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaKeyspaceResponse. - * @implements IReloadSchemaKeyspaceResponse + * @classdesc Represents a GetTabletRequest. + * @implements IGetTabletRequest * @constructor - * @param {vtctldata.IReloadSchemaKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set */ - function ReloadSchemaKeyspaceResponse(properties) { - this.events = []; + function GetTabletRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107048,78 +109292,75 @@ $root.vtctldata = (function() { } /** - * ReloadSchemaKeyspaceResponse events. - * @member {Array.} events - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * GetTabletRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetTabletRequest * @instance */ - ReloadSchemaKeyspaceResponse.prototype.events = $util.emptyArray; + GetTabletRequest.prototype.tablet_alias = null; /** - * Creates a new ReloadSchemaKeyspaceResponse instance using the specified properties. + * Creates a new GetTabletRequest instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IReloadSchemaKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse instance + * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set + * @returns {vtctldata.GetTabletRequest} GetTabletRequest instance */ - ReloadSchemaKeyspaceResponse.create = function create(properties) { - return new ReloadSchemaKeyspaceResponse(properties); + GetTabletRequest.create = function create(properties) { + return new GetTabletRequest(properties); }; /** - * Encodes the specified ReloadSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. + * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse message or plain object to encode + * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaKeyspaceResponse.encode = function encode(message, writer) { + GetTabletRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReloadSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. + * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.IReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse message or plain object to encode + * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer. + * Decodes a GetTabletRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaKeyspaceResponse.decode = function decode(reader, length) { + GetTabletRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaKeyspaceResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -107130,128 +109371,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaKeyspaceResponse message. + * Verifies a GetTabletRequest message. * @function verify - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaKeyspaceResponse.verify = function verify(message) { + GetTabletRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } return null; }; /** - * Creates a ReloadSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse + * @returns {vtctldata.GetTabletRequest} GetTabletRequest */ - ReloadSchemaKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaKeyspaceResponse) + GetTabletRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletRequest) return object; - var message = new $root.vtctldata.ReloadSchemaKeyspaceResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.ReloadSchemaKeyspaceResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.ReloadSchemaKeyspaceResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } + var message = new $root.vtctldata.GetTabletRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetTabletRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a ReloadSchemaKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @static - * @param {vtctldata.ReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse + * @param {vtctldata.GetTabletRequest} message GetTabletRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaKeyspaceResponse.toObject = function toObject(message, options) { + GetTabletRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ReloadSchemaKeyspaceResponse to JSON. + * Converts this GetTabletRequest to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaKeyspaceResponse + * @memberof vtctldata.GetTabletRequest * @instance * @returns {Object.} JSON object */ - ReloadSchemaKeyspaceResponse.prototype.toJSON = function toJSON() { + GetTabletRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaKeyspaceResponse; + return GetTabletRequest; })(); - vtctldata.ReloadSchemaShardRequest = (function() { + vtctldata.GetTabletResponse = (function() { /** - * Properties of a ReloadSchemaShardRequest. + * Properties of a GetTabletResponse. * @memberof vtctldata - * @interface IReloadSchemaShardRequest - * @property {string|null} [keyspace] ReloadSchemaShardRequest keyspace - * @property {string|null} [shard] ReloadSchemaShardRequest shard - * @property {string|null} [wait_position] ReloadSchemaShardRequest wait_position - * @property {boolean|null} [include_primary] ReloadSchemaShardRequest include_primary - * @property {number|null} [concurrency] ReloadSchemaShardRequest concurrency + * @interface IGetTabletResponse + * @property {topodata.ITablet|null} [tablet] GetTabletResponse tablet */ /** - * Constructs a new ReloadSchemaShardRequest. + * Constructs a new GetTabletResponse. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaShardRequest. - * @implements IReloadSchemaShardRequest + * @classdesc Represents a GetTabletResponse. + * @implements IGetTabletResponse * @constructor - * @param {vtctldata.IReloadSchemaShardRequest=} [properties] Properties to set + * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set */ - function ReloadSchemaShardRequest(properties) { + function GetTabletResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107259,127 +109484,75 @@ $root.vtctldata = (function() { } /** - * ReloadSchemaShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ReloadSchemaShardRequest - * @instance - */ - ReloadSchemaShardRequest.prototype.keyspace = ""; - - /** - * ReloadSchemaShardRequest shard. - * @member {string} shard - * @memberof vtctldata.ReloadSchemaShardRequest - * @instance - */ - ReloadSchemaShardRequest.prototype.shard = ""; - - /** - * ReloadSchemaShardRequest wait_position. - * @member {string} wait_position - * @memberof vtctldata.ReloadSchemaShardRequest - * @instance - */ - ReloadSchemaShardRequest.prototype.wait_position = ""; - - /** - * ReloadSchemaShardRequest include_primary. - * @member {boolean} include_primary - * @memberof vtctldata.ReloadSchemaShardRequest - * @instance - */ - ReloadSchemaShardRequest.prototype.include_primary = false; - - /** - * ReloadSchemaShardRequest concurrency. - * @member {number} concurrency - * @memberof vtctldata.ReloadSchemaShardRequest + * GetTabletResponse tablet. + * @member {topodata.ITablet|null|undefined} tablet + * @memberof vtctldata.GetTabletResponse * @instance */ - ReloadSchemaShardRequest.prototype.concurrency = 0; + GetTabletResponse.prototype.tablet = null; /** - * Creates a new ReloadSchemaShardRequest instance using the specified properties. + * Creates a new GetTabletResponse instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IReloadSchemaShardRequest=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest instance + * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set + * @returns {vtctldata.GetTabletResponse} GetTabletResponse instance */ - ReloadSchemaShardRequest.create = function create(properties) { - return new ReloadSchemaShardRequest(properties); + GetTabletResponse.create = function create(properties) { + return new GetTabletResponse(properties); }; /** - * Encodes the specified ReloadSchemaShardRequest message. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. + * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IReloadSchemaShardRequest} message ReloadSchemaShardRequest message or plain object to encode + * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaShardRequest.encode = function encode(message, writer) { + GetTabletResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.wait_position); - if (message.include_primary != null && Object.hasOwnProperty.call(message, "include_primary")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_primary); - if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.concurrency); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReloadSchemaShardRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. + * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.IReloadSchemaShardRequest} message ReloadSchemaShardRequest message or plain object to encode + * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer. + * Decodes a GetTabletResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaShardRequest.decode = function decode(reader, length) { + GetTabletResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.wait_position = reader.string(); - break; - case 4: - message.include_primary = reader.bool(); - break; - case 5: - message.concurrency = reader.uint32(); + message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -107390,141 +109563,119 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaShardRequest.decodeDelimited = function decodeDelimited(reader) { + GetTabletResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaShardRequest message. + * Verifies a GetTabletResponse message. * @function verify - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaShardRequest.verify = function verify(message) { + GetTabletResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - if (!$util.isString(message.wait_position)) - return "wait_position: string expected"; - if (message.include_primary != null && message.hasOwnProperty("include_primary")) - if (typeof message.include_primary !== "boolean") - return "include_primary: boolean expected"; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (!$util.isInteger(message.concurrency)) - return "concurrency: integer expected"; + if (message.tablet != null && message.hasOwnProperty("tablet")) { + var error = $root.topodata.Tablet.verify(message.tablet); + if (error) + return "tablet." + error; + } return null; }; /** - * Creates a ReloadSchemaShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest + * @returns {vtctldata.GetTabletResponse} GetTabletResponse */ - ReloadSchemaShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaShardRequest) + GetTabletResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletResponse) return object; - var message = new $root.vtctldata.ReloadSchemaShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.wait_position != null) - message.wait_position = String(object.wait_position); - if (object.include_primary != null) - message.include_primary = Boolean(object.include_primary); - if (object.concurrency != null) - message.concurrency = object.concurrency >>> 0; + var message = new $root.vtctldata.GetTabletResponse(); + if (object.tablet != null) { + if (typeof object.tablet !== "object") + throw TypeError(".vtctldata.GetTabletResponse.tablet: object expected"); + message.tablet = $root.topodata.Tablet.fromObject(object.tablet); + } return message; }; /** - * Creates a plain object from a ReloadSchemaShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @static - * @param {vtctldata.ReloadSchemaShardRequest} message ReloadSchemaShardRequest + * @param {vtctldata.GetTabletResponse} message GetTabletResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaShardRequest.toObject = function toObject(message, options) { + GetTabletResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.wait_position = ""; - object.include_primary = false; - object.concurrency = 0; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - object.wait_position = message.wait_position; - if (message.include_primary != null && message.hasOwnProperty("include_primary")) - object.include_primary = message.include_primary; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - object.concurrency = message.concurrency; + if (options.defaults) + object.tablet = null; + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); return object; }; /** - * Converts this ReloadSchemaShardRequest to JSON. + * Converts this GetTabletResponse to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaShardRequest + * @memberof vtctldata.GetTabletResponse * @instance * @returns {Object.} JSON object */ - ReloadSchemaShardRequest.prototype.toJSON = function toJSON() { + GetTabletResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaShardRequest; + return GetTabletResponse; })(); - vtctldata.ReloadSchemaShardResponse = (function() { + vtctldata.GetTabletsRequest = (function() { /** - * Properties of a ReloadSchemaShardResponse. + * Properties of a GetTabletsRequest. * @memberof vtctldata - * @interface IReloadSchemaShardResponse - * @property {Array.|null} [events] ReloadSchemaShardResponse events + * @interface IGetTabletsRequest + * @property {string|null} [keyspace] GetTabletsRequest keyspace + * @property {string|null} [shard] GetTabletsRequest shard + * @property {Array.|null} [cells] GetTabletsRequest cells + * @property {boolean|null} [strict] GetTabletsRequest strict + * @property {Array.|null} [tablet_aliases] GetTabletsRequest tablet_aliases + * @property {topodata.TabletType|null} [tablet_type] GetTabletsRequest tablet_type */ /** - * Constructs a new ReloadSchemaShardResponse. + * Constructs a new GetTabletsRequest. * @memberof vtctldata - * @classdesc Represents a ReloadSchemaShardResponse. - * @implements IReloadSchemaShardResponse + * @classdesc Represents a GetTabletsRequest. + * @implements IGetTabletsRequest * @constructor - * @param {vtctldata.IReloadSchemaShardResponse=} [properties] Properties to set + * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set */ - function ReloadSchemaShardResponse(properties) { - this.events = []; + function GetTabletsRequest(properties) { + this.cells = []; + this.tablet_aliases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107532,78 +109683,146 @@ $root.vtctldata = (function() { } /** - * ReloadSchemaShardResponse events. - * @member {Array.} events - * @memberof vtctldata.ReloadSchemaShardResponse + * GetTabletsRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetTabletsRequest * @instance */ - ReloadSchemaShardResponse.prototype.events = $util.emptyArray; + GetTabletsRequest.prototype.keyspace = ""; /** - * Creates a new ReloadSchemaShardResponse instance using the specified properties. + * GetTabletsRequest shard. + * @member {string} shard + * @memberof vtctldata.GetTabletsRequest + * @instance + */ + GetTabletsRequest.prototype.shard = ""; + + /** + * GetTabletsRequest cells. + * @member {Array.} cells + * @memberof vtctldata.GetTabletsRequest + * @instance + */ + GetTabletsRequest.prototype.cells = $util.emptyArray; + + /** + * GetTabletsRequest strict. + * @member {boolean} strict + * @memberof vtctldata.GetTabletsRequest + * @instance + */ + GetTabletsRequest.prototype.strict = false; + + /** + * GetTabletsRequest tablet_aliases. + * @member {Array.} tablet_aliases + * @memberof vtctldata.GetTabletsRequest + * @instance + */ + GetTabletsRequest.prototype.tablet_aliases = $util.emptyArray; + + /** + * GetTabletsRequest tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof vtctldata.GetTabletsRequest + * @instance + */ + GetTabletsRequest.prototype.tablet_type = 0; + + /** + * Creates a new GetTabletsRequest instance using the specified properties. * @function create - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IReloadSchemaShardResponse=} [properties] Properties to set - * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse instance + * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest instance */ - ReloadSchemaShardResponse.create = function create(properties) { - return new ReloadSchemaShardResponse(properties); + GetTabletsRequest.create = function create(properties) { + return new GetTabletsRequest(properties); }; /** - * Encodes the specified ReloadSchemaShardResponse message. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. + * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IReloadSchemaShardResponse} message ReloadSchemaShardResponse message or plain object to encode + * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaShardResponse.encode = function encode(message, writer) { + GetTabletsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); + if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strict); + if (message.tablet_aliases != null && message.tablet_aliases.length) + for (var i = 0; i < message.tablet_aliases.length; ++i) + $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.tablet_type); return writer; }; /** - * Encodes the specified ReloadSchemaShardResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. + * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.IReloadSchemaShardResponse} message ReloadSchemaShardResponse message or plain object to encode + * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadSchemaShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer. + * Decodes a GetTabletsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaShardResponse.decode = function decode(reader, length) { + GetTabletsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; case 2: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); + message.shard = reader.string(); + break; + case 3: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 4: + message.strict = reader.bool(); + break; + case 5: + if (!(message.tablet_aliases && message.tablet_aliases.length)) + message.tablet_aliases = []; + message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); + break; + case 6: + message.tablet_type = reader.int32(); break; default: reader.skipType(tag & 7); @@ -107614,126 +109833,238 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadSchemaShardResponse.decodeDelimited = function decodeDelimited(reader) { + GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadSchemaShardResponse message. + * Verifies a GetTabletsRequest message. * @function verify - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadSchemaShardResponse.verify = function verify(message) { + GetTabletsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.strict != null && message.hasOwnProperty("strict")) + if (typeof message.strict !== "boolean") + return "strict: boolean expected"; + if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { + if (!Array.isArray(message.tablet_aliases)) + return "tablet_aliases: array expected"; + for (var i = 0; i < message.tablet_aliases.length; ++i) { + var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); if (error) - return "events." + error; + return "tablet_aliases." + error; + } + } + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - } return null; }; /** - * Creates a ReloadSchemaShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse + * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest */ - ReloadSchemaShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReloadSchemaShardResponse) + GetTabletsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletsRequest) return object; - var message = new $root.vtctldata.ReloadSchemaShardResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.ReloadSchemaShardResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.ReloadSchemaShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + var message = new $root.vtctldata.GetTabletsRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.GetTabletsRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.strict != null) + message.strict = Boolean(object.strict); + if (object.tablet_aliases) { + if (!Array.isArray(object.tablet_aliases)) + throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: array expected"); + message.tablet_aliases = []; + for (var i = 0; i < object.tablet_aliases.length; ++i) { + if (typeof object.tablet_aliases[i] !== "object") + throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: object expected"); + message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); } } + switch (object.tablet_type) { + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; + } return message; }; /** - * Creates a plain object from a ReloadSchemaShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @static - * @param {vtctldata.ReloadSchemaShardResponse} message ReloadSchemaShardResponse + * @param {vtctldata.GetTabletsRequest} message GetTabletsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadSchemaShardResponse.toObject = function toObject(message, options) { + GetTabletsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + if (options.arrays || options.defaults) { + object.cells = []; + object.tablet_aliases = []; + } + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.strict = false; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.strict != null && message.hasOwnProperty("strict")) + object.strict = message.strict; + if (message.tablet_aliases && message.tablet_aliases.length) { + object.tablet_aliases = []; + for (var j = 0; j < message.tablet_aliases.length; ++j) + object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); } + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; return object; }; /** - * Converts this ReloadSchemaShardResponse to JSON. + * Converts this GetTabletsRequest to JSON. * @function toJSON - * @memberof vtctldata.ReloadSchemaShardResponse + * @memberof vtctldata.GetTabletsRequest * @instance * @returns {Object.} JSON object */ - ReloadSchemaShardResponse.prototype.toJSON = function toJSON() { + GetTabletsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadSchemaShardResponse; + return GetTabletsRequest; })(); - vtctldata.RemoveBackupRequest = (function() { + vtctldata.GetTabletsResponse = (function() { /** - * Properties of a RemoveBackupRequest. + * Properties of a GetTabletsResponse. * @memberof vtctldata - * @interface IRemoveBackupRequest - * @property {string|null} [keyspace] RemoveBackupRequest keyspace - * @property {string|null} [shard] RemoveBackupRequest shard - * @property {string|null} [name] RemoveBackupRequest name + * @interface IGetTabletsResponse + * @property {Array.|null} [tablets] GetTabletsResponse tablets */ /** - * Constructs a new RemoveBackupRequest. + * Constructs a new GetTabletsResponse. * @memberof vtctldata - * @classdesc Represents a RemoveBackupRequest. - * @implements IRemoveBackupRequest + * @classdesc Represents a GetTabletsResponse. + * @implements IGetTabletsResponse * @constructor - * @param {vtctldata.IRemoveBackupRequest=} [properties] Properties to set + * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set */ - function RemoveBackupRequest(properties) { + function GetTabletsResponse(properties) { + this.tablets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107741,101 +110072,78 @@ $root.vtctldata = (function() { } /** - * RemoveBackupRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RemoveBackupRequest - * @instance - */ - RemoveBackupRequest.prototype.keyspace = ""; - - /** - * RemoveBackupRequest shard. - * @member {string} shard - * @memberof vtctldata.RemoveBackupRequest - * @instance - */ - RemoveBackupRequest.prototype.shard = ""; - - /** - * RemoveBackupRequest name. - * @member {string} name - * @memberof vtctldata.RemoveBackupRequest + * GetTabletsResponse tablets. + * @member {Array.} tablets + * @memberof vtctldata.GetTabletsResponse * @instance */ - RemoveBackupRequest.prototype.name = ""; + GetTabletsResponse.prototype.tablets = $util.emptyArray; /** - * Creates a new RemoveBackupRequest instance using the specified properties. + * Creates a new GetTabletsResponse instance using the specified properties. * @function create - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static - * @param {vtctldata.IRemoveBackupRequest=} [properties] Properties to set - * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest instance + * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse instance */ - RemoveBackupRequest.create = function create(properties) { - return new RemoveBackupRequest(properties); + GetTabletsResponse.create = function create(properties) { + return new GetTabletsResponse(properties); }; /** - * Encodes the specified RemoveBackupRequest message. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. + * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static - * @param {vtctldata.IRemoveBackupRequest} message RemoveBackupRequest message or plain object to encode + * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveBackupRequest.encode = function encode(message, writer) { + GetTabletsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.tablets != null && message.tablets.length) + for (var i = 0; i < message.tablets.length; ++i) + $root.topodata.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RemoveBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. + * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static - * @param {vtctldata.IRemoveBackupRequest} message RemoveBackupRequest message or plain object to encode + * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveBackupRequest message from the specified reader or buffer. + * Decodes a GetTabletsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveBackupRequest.decode = function decode(reader, length) { + GetTabletsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.name = reader.string(); + if (!(message.tablets && message.tablets.length)) + message.tablets = []; + message.tablets.push($root.topodata.Tablet.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -107846,123 +110154,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveBackupRequest.decodeDelimited = function decodeDelimited(reader) { + GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveBackupRequest message. + * Verifies a GetTabletsResponse message. * @function verify - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveBackupRequest.verify = function verify(message) { + GetTabletsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.tablets != null && message.hasOwnProperty("tablets")) { + if (!Array.isArray(message.tablets)) + return "tablets: array expected"; + for (var i = 0; i < message.tablets.length; ++i) { + var error = $root.topodata.Tablet.verify(message.tablets[i]); + if (error) + return "tablets." + error; + } + } return null; }; /** - * Creates a RemoveBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest + * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse */ - RemoveBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveBackupRequest) + GetTabletsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTabletsResponse) return object; - var message = new $root.vtctldata.RemoveBackupRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.name != null) - message.name = String(object.name); + var message = new $root.vtctldata.GetTabletsResponse(); + if (object.tablets) { + if (!Array.isArray(object.tablets)) + throw TypeError(".vtctldata.GetTabletsResponse.tablets: array expected"); + message.tablets = []; + for (var i = 0; i < object.tablets.length; ++i) { + if (typeof object.tablets[i] !== "object") + throw TypeError(".vtctldata.GetTabletsResponse.tablets: object expected"); + message.tablets[i] = $root.topodata.Tablet.fromObject(object.tablets[i]); + } + } return message; }; /** - * Creates a plain object from a RemoveBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @static - * @param {vtctldata.RemoveBackupRequest} message RemoveBackupRequest + * @param {vtctldata.GetTabletsResponse} message GetTabletsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveBackupRequest.toObject = function toObject(message, options) { + GetTabletsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.name = ""; + if (options.arrays || options.defaults) + object.tablets = []; + if (message.tablets && message.tablets.length) { + object.tablets = []; + for (var j = 0; j < message.tablets.length; ++j) + object.tablets[j] = $root.topodata.Tablet.toObject(message.tablets[j], options); } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this RemoveBackupRequest to JSON. + * Converts this GetTabletsResponse to JSON. * @function toJSON - * @memberof vtctldata.RemoveBackupRequest + * @memberof vtctldata.GetTabletsResponse * @instance * @returns {Object.} JSON object */ - RemoveBackupRequest.prototype.toJSON = function toJSON() { + GetTabletsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveBackupRequest; + return GetTabletsResponse; })(); - vtctldata.RemoveBackupResponse = (function() { + vtctldata.GetTopologyPathRequest = (function() { /** - * Properties of a RemoveBackupResponse. + * Properties of a GetTopologyPathRequest. * @memberof vtctldata - * @interface IRemoveBackupResponse + * @interface IGetTopologyPathRequest + * @property {string|null} [path] GetTopologyPathRequest path */ /** - * Constructs a new RemoveBackupResponse. + * Constructs a new GetTopologyPathRequest. * @memberof vtctldata - * @classdesc Represents a RemoveBackupResponse. - * @implements IRemoveBackupResponse + * @classdesc Represents a GetTopologyPathRequest. + * @implements IGetTopologyPathRequest * @constructor - * @param {vtctldata.IRemoveBackupResponse=} [properties] Properties to set + * @param {vtctldata.IGetTopologyPathRequest=} [properties] Properties to set */ - function RemoveBackupResponse(properties) { + function GetTopologyPathRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107970,63 +110279,76 @@ $root.vtctldata = (function() { } /** - * Creates a new RemoveBackupResponse instance using the specified properties. + * GetTopologyPathRequest path. + * @member {string} path + * @memberof vtctldata.GetTopologyPathRequest + * @instance + */ + GetTopologyPathRequest.prototype.path = ""; + + /** + * Creates a new GetTopologyPathRequest instance using the specified properties. * @function create - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static - * @param {vtctldata.IRemoveBackupResponse=} [properties] Properties to set - * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse instance + * @param {vtctldata.IGetTopologyPathRequest=} [properties] Properties to set + * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest instance */ - RemoveBackupResponse.create = function create(properties) { - return new RemoveBackupResponse(properties); + GetTopologyPathRequest.create = function create(properties) { + return new GetTopologyPathRequest(properties); }; /** - * Encodes the specified RemoveBackupResponse message. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. + * Encodes the specified GetTopologyPathRequest message. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static - * @param {vtctldata.IRemoveBackupResponse} message RemoveBackupResponse message or plain object to encode + * @param {vtctldata.IGetTopologyPathRequest} message GetTopologyPathRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveBackupResponse.encode = function encode(message, writer) { + GetTopologyPathRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); return writer; }; /** - * Encodes the specified RemoveBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. + * Encodes the specified GetTopologyPathRequest message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static - * @param {vtctldata.IRemoveBackupResponse} message RemoveBackupResponse message or plain object to encode + * @param {vtctldata.IGetTopologyPathRequest} message GetTopologyPathRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTopologyPathRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveBackupResponse message from the specified reader or buffer. + * Decodes a GetTopologyPathRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse + * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveBackupResponse.decode = function decode(reader, length) { + GetTopologyPathRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveBackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTopologyPathRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -108036,212 +110358,183 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTopologyPathRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse + * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveBackupResponse.decodeDelimited = function decodeDelimited(reader) { + GetTopologyPathRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveBackupResponse message. + * Verifies a GetTopologyPathRequest message. * @function verify - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveBackupResponse.verify = function verify(message) { + GetTopologyPathRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a RemoveBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTopologyPathRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse + * @returns {vtctldata.GetTopologyPathRequest} GetTopologyPathRequest */ - RemoveBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveBackupResponse) + GetTopologyPathRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTopologyPathRequest) return object; - return new $root.vtctldata.RemoveBackupResponse(); + var message = new $root.vtctldata.GetTopologyPathRequest(); + if (object.path != null) + message.path = String(object.path); + return message; }; /** - * Creates a plain object from a RemoveBackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTopologyPathRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @static - * @param {vtctldata.RemoveBackupResponse} message RemoveBackupResponse + * @param {vtctldata.GetTopologyPathRequest} message GetTopologyPathRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveBackupResponse.toObject = function toObject() { - return {}; + GetTopologyPathRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.path = ""; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; }; /** - * Converts this RemoveBackupResponse to JSON. + * Converts this GetTopologyPathRequest to JSON. * @function toJSON - * @memberof vtctldata.RemoveBackupResponse + * @memberof vtctldata.GetTopologyPathRequest * @instance * @returns {Object.} JSON object */ - RemoveBackupResponse.prototype.toJSON = function toJSON() { + GetTopologyPathRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveBackupResponse; + return GetTopologyPathRequest; })(); - vtctldata.RemoveKeyspaceCellRequest = (function() { + vtctldata.GetTopologyPathResponse = (function() { /** - * Properties of a RemoveKeyspaceCellRequest. + * Properties of a GetTopologyPathResponse. * @memberof vtctldata - * @interface IRemoveKeyspaceCellRequest - * @property {string|null} [keyspace] RemoveKeyspaceCellRequest keyspace - * @property {string|null} [cell] RemoveKeyspaceCellRequest cell - * @property {boolean|null} [force] RemoveKeyspaceCellRequest force - * @property {boolean|null} [recursive] RemoveKeyspaceCellRequest recursive + * @interface IGetTopologyPathResponse + * @property {vtctldata.ITopologyCell|null} [cell] GetTopologyPathResponse cell */ /** - * Constructs a new RemoveKeyspaceCellRequest. + * Constructs a new GetTopologyPathResponse. * @memberof vtctldata - * @classdesc Represents a RemoveKeyspaceCellRequest. - * @implements IRemoveKeyspaceCellRequest + * @classdesc Represents a GetTopologyPathResponse. + * @implements IGetTopologyPathResponse * @constructor - * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set + * @param {vtctldata.IGetTopologyPathResponse=} [properties] Properties to set */ - function RemoveKeyspaceCellRequest(properties) { + function GetTopologyPathResponse(properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveKeyspaceCellRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.keyspace = ""; - - /** - * RemoveKeyspaceCellRequest cell. - * @member {string} cell - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.cell = ""; - - /** - * RemoveKeyspaceCellRequest force. - * @member {boolean} force - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.force = false; + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * RemoveKeyspaceCellRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.RemoveKeyspaceCellRequest + * GetTopologyPathResponse cell. + * @member {vtctldata.ITopologyCell|null|undefined} cell + * @memberof vtctldata.GetTopologyPathResponse * @instance */ - RemoveKeyspaceCellRequest.prototype.recursive = false; + GetTopologyPathResponse.prototype.cell = null; /** - * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. + * Creates a new GetTopologyPathResponse instance using the specified properties. * @function create - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest instance + * @param {vtctldata.IGetTopologyPathResponse=} [properties] Properties to set + * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse instance */ - RemoveKeyspaceCellRequest.create = function create(properties) { - return new RemoveKeyspaceCellRequest(properties); + GetTopologyPathResponse.create = function create(properties) { + return new GetTopologyPathResponse(properties); }; /** - * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. + * Encodes the specified GetTopologyPathResponse message. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode + * @param {vtctldata.IGetTopologyPathResponse} message GetTopologyPathResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveKeyspaceCellRequest.encode = function encode(message, writer) { + GetTopologyPathResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cell); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); + $root.vtctldata.TopologyCell.encode(message.cell, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. + * Encodes the specified GetTopologyPathResponse message, length delimited. Does not implicitly {@link vtctldata.GetTopologyPathResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode + * @param {vtctldata.IGetTopologyPathResponse} message GetTopologyPathResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveKeyspaceCellRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTopologyPathResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. + * Decodes a GetTopologyPathResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest + * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveKeyspaceCellRequest.decode = function decode(reader, length) { + GetTopologyPathResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTopologyPathResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.cell = reader.string(); - break; - case 3: - message.force = reader.bool(); - break; - case 4: - message.recursive = reader.bool(); + message.cell = $root.vtctldata.TopologyCell.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -108252,131 +110545,116 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTopologyPathResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest + * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveKeyspaceCellRequest.decodeDelimited = function decodeDelimited(reader) { + GetTopologyPathResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveKeyspaceCellRequest message. + * Verifies a GetTopologyPathResponse message. * @function verify - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveKeyspaceCellRequest.verify = function verify(message) { + GetTopologyPathResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; + if (message.cell != null && message.hasOwnProperty("cell")) { + var error = $root.vtctldata.TopologyCell.verify(message.cell); + if (error) + return "cell." + error; + } return null; }; /** - * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTopologyPathResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest + * @returns {vtctldata.GetTopologyPathResponse} GetTopologyPathResponse */ - RemoveKeyspaceCellRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveKeyspaceCellRequest) + GetTopologyPathResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetTopologyPathResponse) return object; - var message = new $root.vtctldata.RemoveKeyspaceCellRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cell != null) - message.cell = String(object.cell); - if (object.force != null) - message.force = Boolean(object.force); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); + var message = new $root.vtctldata.GetTopologyPathResponse(); + if (object.cell != null) { + if (typeof object.cell !== "object") + throw TypeError(".vtctldata.GetTopologyPathResponse.cell: object expected"); + message.cell = $root.vtctldata.TopologyCell.fromObject(object.cell); + } return message; }; /** - * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTopologyPathResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @static - * @param {vtctldata.RemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest + * @param {vtctldata.GetTopologyPathResponse} message GetTopologyPathResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveKeyspaceCellRequest.toObject = function toObject(message, options) { + GetTopologyPathResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.cell = ""; - object.force = false; - object.recursive = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; + if (options.defaults) + object.cell = null; if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; + object.cell = $root.vtctldata.TopologyCell.toObject(message.cell, options); return object; }; /** - * Converts this RemoveKeyspaceCellRequest to JSON. + * Converts this GetTopologyPathResponse to JSON. * @function toJSON - * @memberof vtctldata.RemoveKeyspaceCellRequest + * @memberof vtctldata.GetTopologyPathResponse * @instance * @returns {Object.} JSON object */ - RemoveKeyspaceCellRequest.prototype.toJSON = function toJSON() { + GetTopologyPathResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveKeyspaceCellRequest; + return GetTopologyPathResponse; })(); - vtctldata.RemoveKeyspaceCellResponse = (function() { + vtctldata.TopologyCell = (function() { /** - * Properties of a RemoveKeyspaceCellResponse. + * Properties of a TopologyCell. * @memberof vtctldata - * @interface IRemoveKeyspaceCellResponse + * @interface ITopologyCell + * @property {string|null} [name] TopologyCell name + * @property {string|null} [path] TopologyCell path + * @property {string|null} [data] TopologyCell data + * @property {Array.|null} [children] TopologyCell children */ /** - * Constructs a new RemoveKeyspaceCellResponse. + * Constructs a new TopologyCell. * @memberof vtctldata - * @classdesc Represents a RemoveKeyspaceCellResponse. - * @implements IRemoveKeyspaceCellResponse + * @classdesc Represents a TopologyCell. + * @implements ITopologyCell * @constructor - * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set + * @param {vtctldata.ITopologyCell=} [properties] Properties to set */ - function RemoveKeyspaceCellResponse(properties) { + function TopologyCell(properties) { + this.children = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108384,63 +110662,118 @@ $root.vtctldata = (function() { } /** - * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. + * TopologyCell name. + * @member {string} name + * @memberof vtctldata.TopologyCell + * @instance + */ + TopologyCell.prototype.name = ""; + + /** + * TopologyCell path. + * @member {string} path + * @memberof vtctldata.TopologyCell + * @instance + */ + TopologyCell.prototype.path = ""; + + /** + * TopologyCell data. + * @member {string} data + * @memberof vtctldata.TopologyCell + * @instance + */ + TopologyCell.prototype.data = ""; + + /** + * TopologyCell children. + * @member {Array.} children + * @memberof vtctldata.TopologyCell + * @instance + */ + TopologyCell.prototype.children = $util.emptyArray; + + /** + * Creates a new TopologyCell instance using the specified properties. * @function create - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse instance + * @param {vtctldata.ITopologyCell=} [properties] Properties to set + * @returns {vtctldata.TopologyCell} TopologyCell instance */ - RemoveKeyspaceCellResponse.create = function create(properties) { - return new RemoveKeyspaceCellResponse(properties); + TopologyCell.create = function create(properties) { + return new TopologyCell(properties); }; /** - * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. + * Encodes the specified TopologyCell message. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode + * @param {vtctldata.ITopologyCell} message TopologyCell message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveKeyspaceCellResponse.encode = function encode(message, writer) { + TopologyCell.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.data); + if (message.children != null && message.children.length) + for (var i = 0; i < message.children.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.children[i]); return writer; }; /** - * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. + * Encodes the specified TopologyCell message, length delimited. Does not implicitly {@link vtctldata.TopologyCell.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode + * @param {vtctldata.ITopologyCell} message TopologyCell message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveKeyspaceCellResponse.encodeDelimited = function encodeDelimited(message, writer) { + TopologyCell.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. + * Decodes a TopologyCell message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse + * @returns {vtctldata.TopologyCell} TopologyCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveKeyspaceCellResponse.decode = function decode(reader, length) { + TopologyCell.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TopologyCell(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.data = reader.string(); + break; + case 4: + if (!(message.children && message.children.length)) + message.children = []; + message.children.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -108450,98 +110783,145 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. + * Decodes a TopologyCell message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse + * @returns {vtctldata.TopologyCell} TopologyCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveKeyspaceCellResponse.decodeDelimited = function decodeDelimited(reader) { + TopologyCell.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveKeyspaceCellResponse message. + * Verifies a TopologyCell message. * @function verify - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveKeyspaceCellResponse.verify = function verify(message) { + TopologyCell.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.children != null && message.hasOwnProperty("children")) { + if (!Array.isArray(message.children)) + return "children: array expected"; + for (var i = 0; i < message.children.length; ++i) + if (!$util.isString(message.children[i])) + return "children: string[] expected"; + } return null; }; /** - * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TopologyCell message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse + * @returns {vtctldata.TopologyCell} TopologyCell */ - RemoveKeyspaceCellResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveKeyspaceCellResponse) + TopologyCell.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.TopologyCell) return object; - return new $root.vtctldata.RemoveKeyspaceCellResponse(); + var message = new $root.vtctldata.TopologyCell(); + if (object.name != null) + message.name = String(object.name); + if (object.path != null) + message.path = String(object.path); + if (object.data != null) + message.data = String(object.data); + if (object.children) { + if (!Array.isArray(object.children)) + throw TypeError(".vtctldata.TopologyCell.children: array expected"); + message.children = []; + for (var i = 0; i < object.children.length; ++i) + message.children[i] = String(object.children[i]); + } + return message; }; /** - * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. + * Creates a plain object from a TopologyCell message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @static - * @param {vtctldata.RemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse + * @param {vtctldata.TopologyCell} message TopologyCell * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveKeyspaceCellResponse.toObject = function toObject() { - return {}; + TopologyCell.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.children = []; + if (options.defaults) { + object.name = ""; + object.path = ""; + object.data = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.children && message.children.length) { + object.children = []; + for (var j = 0; j < message.children.length; ++j) + object.children[j] = message.children[j]; + } + return object; }; /** - * Converts this RemoveKeyspaceCellResponse to JSON. + * Converts this TopologyCell to JSON. * @function toJSON - * @memberof vtctldata.RemoveKeyspaceCellResponse + * @memberof vtctldata.TopologyCell * @instance * @returns {Object.} JSON object */ - RemoveKeyspaceCellResponse.prototype.toJSON = function toJSON() { + TopologyCell.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveKeyspaceCellResponse; + return TopologyCell; })(); - vtctldata.RemoveShardCellRequest = (function() { + vtctldata.GetVSchemaRequest = (function() { /** - * Properties of a RemoveShardCellRequest. + * Properties of a GetVSchemaRequest. * @memberof vtctldata - * @interface IRemoveShardCellRequest - * @property {string|null} [keyspace] RemoveShardCellRequest keyspace - * @property {string|null} [shard_name] RemoveShardCellRequest shard_name - * @property {string|null} [cell] RemoveShardCellRequest cell - * @property {boolean|null} [force] RemoveShardCellRequest force - * @property {boolean|null} [recursive] RemoveShardCellRequest recursive + * @interface IGetVSchemaRequest + * @property {string|null} [keyspace] GetVSchemaRequest keyspace */ /** - * Constructs a new RemoveShardCellRequest. + * Constructs a new GetVSchemaRequest. * @memberof vtctldata - * @classdesc Represents a RemoveShardCellRequest. - * @implements IRemoveShardCellRequest + * @classdesc Represents a GetVSchemaRequest. + * @implements IGetVSchemaRequest * @constructor - * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set + * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set */ - function RemoveShardCellRequest(properties) { + function GetVSchemaRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108549,128 +110929,76 @@ $root.vtctldata = (function() { } /** - * RemoveShardCellRequest keyspace. + * GetVSchemaRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.keyspace = ""; - - /** - * RemoveShardCellRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.shard_name = ""; - - /** - * RemoveShardCellRequest cell. - * @member {string} cell - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.cell = ""; - - /** - * RemoveShardCellRequest force. - * @member {boolean} force - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.force = false; - - /** - * RemoveShardCellRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @instance */ - RemoveShardCellRequest.prototype.recursive = false; + GetVSchemaRequest.prototype.keyspace = ""; /** - * Creates a new RemoveShardCellRequest instance using the specified properties. + * Creates a new GetVSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static - * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest instance + * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest instance */ - RemoveShardCellRequest.create = function create(properties) { - return new RemoveShardCellRequest(properties); + GetVSchemaRequest.create = function create(properties) { + return new GetVSchemaRequest(properties); }; /** - * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. + * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static - * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode + * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveShardCellRequest.encode = function encode(message, writer) { + GetVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.recursive); return writer; }; /** - * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. + * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static - * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode + * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveShardCellRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer. + * Decodes a GetVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest + * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveShardCellRequest.decode = function decode(reader, length) { + GetVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.keyspace = reader.string(); break; - case 2: - message.shard_name = reader.string(); - break; - case 3: - message.cell = reader.string(); - break; - case 4: - message.force = reader.bool(); - break; - case 5: - message.recursive = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -108680,139 +111008,107 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest + * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveShardCellRequest.decodeDelimited = function decodeDelimited(reader) { + GetVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveShardCellRequest message. + * Verifies a GetVSchemaRequest message. * @function verify - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveShardCellRequest.verify = function verify(message) { + GetVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; /** - * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest + * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest */ - RemoveShardCellRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveShardCellRequest) + GetVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetVSchemaRequest) return object; - var message = new $root.vtctldata.RemoveShardCellRequest(); + var message = new $root.vtctldata.GetVSchemaRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - if (object.cell != null) - message.cell = String(object.cell); - if (object.force != null) - message.force = Boolean(object.force); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); return message; }; /** - * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @static - * @param {vtctldata.RemoveShardCellRequest} message RemoveShardCellRequest + * @param {vtctldata.GetVSchemaRequest} message GetVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveShardCellRequest.toObject = function toObject(message, options) { + GetVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.keyspace = ""; - object.shard_name = ""; - object.cell = ""; - object.force = false; - object.recursive = false; - } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; return object; }; /** - * Converts this RemoveShardCellRequest to JSON. + * Converts this GetVSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.RemoveShardCellRequest + * @memberof vtctldata.GetVSchemaRequest * @instance * @returns {Object.} JSON object */ - RemoveShardCellRequest.prototype.toJSON = function toJSON() { + GetVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveShardCellRequest; + return GetVSchemaRequest; })(); - vtctldata.RemoveShardCellResponse = (function() { + vtctldata.GetVersionRequest = (function() { /** - * Properties of a RemoveShardCellResponse. + * Properties of a GetVersionRequest. * @memberof vtctldata - * @interface IRemoveShardCellResponse + * @interface IGetVersionRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] GetVersionRequest tablet_alias */ /** - * Constructs a new RemoveShardCellResponse. + * Constructs a new GetVersionRequest. * @memberof vtctldata - * @classdesc Represents a RemoveShardCellResponse. - * @implements IRemoveShardCellResponse + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest * @constructor - * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set + * @param {vtctldata.IGetVersionRequest=} [properties] Properties to set */ - function RemoveShardCellResponse(properties) { + function GetVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108820,63 +111116,76 @@ $root.vtctldata = (function() { } /** - * Creates a new RemoveShardCellResponse instance using the specified properties. + * GetVersionRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.tablet_alias = null; + + /** + * Creates a new GetVersionRequest instance using the specified properties. * @function create - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static - * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse instance + * @param {vtctldata.IGetVersionRequest=} [properties] Properties to set + * @returns {vtctldata.GetVersionRequest} GetVersionRequest instance */ - RemoveShardCellResponse.create = function create(properties) { - return new RemoveShardCellResponse(properties); + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); }; /** - * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. + * Encodes the specified GetVersionRequest message. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static - * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode + * @param {vtctldata.IGetVersionRequest} message GetVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveShardCellResponse.encode = function encode(message, writer) { + GetVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link vtctldata.GetVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static - * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode + * @param {vtctldata.IGetVersionRequest} message GetVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveShardCellResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer. + * Decodes a GetVersionRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse + * @returns {vtctldata.GetVersionRequest} GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveShardCellResponse.decode = function decode(reader, length) { + GetVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -108886,94 +111195,112 @@ $root.vtctldata = (function() { }; /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse + * @returns {vtctldata.GetVersionRequest} GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveShardCellResponse.decodeDelimited = function decodeDelimited(reader) { + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveShardCellResponse message. + * Verifies a GetVersionRequest message. * @function verify - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveShardCellResponse.verify = function verify(message) { + GetVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse + * @returns {vtctldata.GetVersionRequest} GetVersionRequest */ - RemoveShardCellResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveShardCellResponse) + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetVersionRequest) return object; - return new $root.vtctldata.RemoveShardCellResponse(); + var message = new $root.vtctldata.GetVersionRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.GetVersionRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + return message; }; /** - * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @static - * @param {vtctldata.RemoveShardCellResponse} message RemoveShardCellResponse + * @param {vtctldata.GetVersionRequest} message GetVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveShardCellResponse.toObject = function toObject() { - return {}; + GetVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + return object; }; /** - * Converts this RemoveShardCellResponse to JSON. + * Converts this GetVersionRequest to JSON. * @function toJSON - * @memberof vtctldata.RemoveShardCellResponse + * @memberof vtctldata.GetVersionRequest * @instance * @returns {Object.} JSON object */ - RemoveShardCellResponse.prototype.toJSON = function toJSON() { + GetVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RemoveShardCellResponse; + return GetVersionRequest; })(); - vtctldata.ReparentTabletRequest = (function() { + vtctldata.GetVersionResponse = (function() { /** - * Properties of a ReparentTabletRequest. + * Properties of a GetVersionResponse. * @memberof vtctldata - * @interface IReparentTabletRequest - * @property {topodata.ITabletAlias|null} [tablet] ReparentTabletRequest tablet + * @interface IGetVersionResponse + * @property {string|null} [version] GetVersionResponse version */ /** - * Constructs a new ReparentTabletRequest. + * Constructs a new GetVersionResponse. * @memberof vtctldata - * @classdesc Represents a ReparentTabletRequest. - * @implements IReparentTabletRequest + * @classdesc Represents a GetVersionResponse. + * @implements IGetVersionResponse * @constructor - * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set + * @param {vtctldata.IGetVersionResponse=} [properties] Properties to set */ - function ReparentTabletRequest(properties) { + function GetVersionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108981,75 +111308,75 @@ $root.vtctldata = (function() { } /** - * ReparentTabletRequest tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.ReparentTabletRequest + * GetVersionResponse version. + * @member {string} version + * @memberof vtctldata.GetVersionResponse * @instance */ - ReparentTabletRequest.prototype.tablet = null; + GetVersionResponse.prototype.version = ""; /** - * Creates a new ReparentTabletRequest instance using the specified properties. + * Creates a new GetVersionResponse instance using the specified properties. * @function create - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static - * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest instance + * @param {vtctldata.IGetVersionResponse=} [properties] Properties to set + * @returns {vtctldata.GetVersionResponse} GetVersionResponse instance */ - ReparentTabletRequest.create = function create(properties) { - return new ReparentTabletRequest(properties); + GetVersionResponse.create = function create(properties) { + return new GetVersionResponse(properties); }; /** - * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. + * Encodes the specified GetVersionResponse message. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static - * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode + * @param {vtctldata.IGetVersionResponse} message GetVersionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReparentTabletRequest.encode = function encode(message, writer) { + GetVersionResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); return writer; }; /** - * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. + * Encodes the specified GetVersionResponse message, length delimited. Does not implicitly {@link vtctldata.GetVersionResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static - * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode + * @param {vtctldata.IGetVersionResponse} message GetVersionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReparentTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer. + * Decodes a GetVersionResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest + * @returns {vtctldata.GetVersionResponse} GetVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReparentTabletRequest.decode = function decode(reader, length) { + GetVersionResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVersionResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -109060,114 +111387,107 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVersionResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest + * @returns {vtctldata.GetVersionResponse} GetVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReparentTabletRequest.decodeDelimited = function decodeDelimited(reader) { + GetVersionResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReparentTabletRequest message. + * Verifies a GetVersionResponse message. * @function verify - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReparentTabletRequest.verify = function verify(message) { + GetVersionResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest + * @returns {vtctldata.GetVersionResponse} GetVersionResponse */ - ReparentTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReparentTabletRequest) + GetVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetVersionResponse) return object; - var message = new $root.vtctldata.ReparentTabletRequest(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.ReparentTabletRequest.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } + var message = new $root.vtctldata.GetVersionResponse(); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetVersionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @static - * @param {vtctldata.ReparentTabletRequest} message ReparentTabletRequest + * @param {vtctldata.GetVersionResponse} message GetVersionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReparentTabletRequest.toObject = function toObject(message, options) { + GetVersionResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this ReparentTabletRequest to JSON. + * Converts this GetVersionResponse to JSON. * @function toJSON - * @memberof vtctldata.ReparentTabletRequest + * @memberof vtctldata.GetVersionResponse * @instance * @returns {Object.} JSON object */ - ReparentTabletRequest.prototype.toJSON = function toJSON() { + GetVersionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReparentTabletRequest; + return GetVersionResponse; })(); - vtctldata.ReparentTabletResponse = (function() { + vtctldata.GetVSchemaResponse = (function() { /** - * Properties of a ReparentTabletResponse. + * Properties of a GetVSchemaResponse. * @memberof vtctldata - * @interface IReparentTabletResponse - * @property {string|null} [keyspace] ReparentTabletResponse keyspace - * @property {string|null} [shard] ReparentTabletResponse shard - * @property {topodata.ITabletAlias|null} [primary] ReparentTabletResponse primary + * @interface IGetVSchemaResponse + * @property {vschema.IKeyspace|null} [v_schema] GetVSchemaResponse v_schema */ /** - * Constructs a new ReparentTabletResponse. + * Constructs a new GetVSchemaResponse. * @memberof vtctldata - * @classdesc Represents a ReparentTabletResponse. - * @implements IReparentTabletResponse + * @classdesc Represents a GetVSchemaResponse. + * @implements IGetVSchemaResponse * @constructor - * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set + * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set */ - function ReparentTabletResponse(properties) { + function GetVSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109175,101 +111495,75 @@ $root.vtctldata = (function() { } /** - * ReparentTabletResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.ReparentTabletResponse - * @instance - */ - ReparentTabletResponse.prototype.keyspace = ""; - - /** - * ReparentTabletResponse shard. - * @member {string} shard - * @memberof vtctldata.ReparentTabletResponse - * @instance - */ - ReparentTabletResponse.prototype.shard = ""; - - /** - * ReparentTabletResponse primary. - * @member {topodata.ITabletAlias|null|undefined} primary - * @memberof vtctldata.ReparentTabletResponse + * GetVSchemaResponse v_schema. + * @member {vschema.IKeyspace|null|undefined} v_schema + * @memberof vtctldata.GetVSchemaResponse * @instance */ - ReparentTabletResponse.prototype.primary = null; + GetVSchemaResponse.prototype.v_schema = null; /** - * Creates a new ReparentTabletResponse instance using the specified properties. + * Creates a new GetVSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static - * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse instance + * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse instance */ - ReparentTabletResponse.create = function create(properties) { - return new ReparentTabletResponse(properties); + GetVSchemaResponse.create = function create(properties) { + return new GetVSchemaResponse(properties); }; /** - * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. + * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static - * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode + * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReparentTabletResponse.encode = function encode(message, writer) { + GetVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - $root.topodata.TabletAlias.encode(message.primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) + $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. + * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static - * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode + * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReparentTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer. + * Decodes a GetVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse + * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReparentTabletResponse.decode = function decode(reader, length) { + GetVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -109280,132 +111574,114 @@ $root.vtctldata = (function() { }; /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse + * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReparentTabletResponse.decodeDelimited = function decodeDelimited(reader) { + GetVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReparentTabletResponse message. + * Verifies a GetVSchemaResponse message. * @function verify - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReparentTabletResponse.verify = function verify(message) { + GetVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.primary != null && message.hasOwnProperty("primary")) { - var error = $root.topodata.TabletAlias.verify(message.primary); + if (message.v_schema != null && message.hasOwnProperty("v_schema")) { + var error = $root.vschema.Keyspace.verify(message.v_schema); if (error) - return "primary." + error; + return "v_schema." + error; } return null; }; /** - * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse + * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse */ - ReparentTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReparentTabletResponse) + GetVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetVSchemaResponse) return object; - var message = new $root.vtctldata.ReparentTabletResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.primary != null) { - if (typeof object.primary !== "object") - throw TypeError(".vtctldata.ReparentTabletResponse.primary: object expected"); - message.primary = $root.topodata.TabletAlias.fromObject(object.primary); + var message = new $root.vtctldata.GetVSchemaResponse(); + if (object.v_schema != null) { + if (typeof object.v_schema !== "object") + throw TypeError(".vtctldata.GetVSchemaResponse.v_schema: object expected"); + message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); } return message; }; /** - * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @static - * @param {vtctldata.ReparentTabletResponse} message ReparentTabletResponse + * @param {vtctldata.GetVSchemaResponse} message GetVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReparentTabletResponse.toObject = function toObject(message, options) { + GetVSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = $root.topodata.TabletAlias.toObject(message.primary, options); + if (options.defaults) + object.v_schema = null; + if (message.v_schema != null && message.hasOwnProperty("v_schema")) + object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); return object; }; /** - * Converts this ReparentTabletResponse to JSON. + * Converts this GetVSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.ReparentTabletResponse + * @memberof vtctldata.GetVSchemaResponse * @instance * @returns {Object.} JSON object */ - ReparentTabletResponse.prototype.toJSON = function toJSON() { + GetVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReparentTabletResponse; + return GetVSchemaResponse; })(); - vtctldata.RestoreFromBackupRequest = (function() { + vtctldata.GetWorkflowsRequest = (function() { /** - * Properties of a RestoreFromBackupRequest. + * Properties of a GetWorkflowsRequest. * @memberof vtctldata - * @interface IRestoreFromBackupRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] RestoreFromBackupRequest tablet_alias - * @property {vttime.ITime|null} [backup_time] RestoreFromBackupRequest backup_time - * @property {string|null} [restore_to_pos] RestoreFromBackupRequest restore_to_pos - * @property {boolean|null} [dry_run] RestoreFromBackupRequest dry_run + * @interface IGetWorkflowsRequest + * @property {string|null} [keyspace] GetWorkflowsRequest keyspace + * @property {boolean|null} [active_only] GetWorkflowsRequest active_only + * @property {boolean|null} [name_only] GetWorkflowsRequest name_only */ /** - * Constructs a new RestoreFromBackupRequest. + * Constructs a new GetWorkflowsRequest. * @memberof vtctldata - * @classdesc Represents a RestoreFromBackupRequest. - * @implements IRestoreFromBackupRequest + * @classdesc Represents a GetWorkflowsRequest. + * @implements IGetWorkflowsRequest * @constructor - * @param {vtctldata.IRestoreFromBackupRequest=} [properties] Properties to set + * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set */ - function RestoreFromBackupRequest(properties) { + function GetWorkflowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109413,114 +111689,101 @@ $root.vtctldata = (function() { } /** - * RestoreFromBackupRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.RestoreFromBackupRequest - * @instance - */ - RestoreFromBackupRequest.prototype.tablet_alias = null; - - /** - * RestoreFromBackupRequest backup_time. - * @member {vttime.ITime|null|undefined} backup_time - * @memberof vtctldata.RestoreFromBackupRequest + * GetWorkflowsRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.GetWorkflowsRequest * @instance */ - RestoreFromBackupRequest.prototype.backup_time = null; + GetWorkflowsRequest.prototype.keyspace = ""; /** - * RestoreFromBackupRequest restore_to_pos. - * @member {string} restore_to_pos - * @memberof vtctldata.RestoreFromBackupRequest + * GetWorkflowsRequest active_only. + * @member {boolean} active_only + * @memberof vtctldata.GetWorkflowsRequest * @instance */ - RestoreFromBackupRequest.prototype.restore_to_pos = ""; + GetWorkflowsRequest.prototype.active_only = false; /** - * RestoreFromBackupRequest dry_run. - * @member {boolean} dry_run - * @memberof vtctldata.RestoreFromBackupRequest + * GetWorkflowsRequest name_only. + * @member {boolean} name_only + * @memberof vtctldata.GetWorkflowsRequest * @instance */ - RestoreFromBackupRequest.prototype.dry_run = false; + GetWorkflowsRequest.prototype.name_only = false; /** - * Creates a new RestoreFromBackupRequest instance using the specified properties. + * Creates a new GetWorkflowsRequest instance using the specified properties. * @function create - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static - * @param {vtctldata.IRestoreFromBackupRequest=} [properties] Properties to set - * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest instance + * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set + * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest instance */ - RestoreFromBackupRequest.create = function create(properties) { - return new RestoreFromBackupRequest(properties); + GetWorkflowsRequest.create = function create(properties) { + return new GetWorkflowsRequest(properties); }; /** - * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. + * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static - * @param {vtctldata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode + * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreFromBackupRequest.encode = function encode(message, writer) { + GetWorkflowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backup_time != null && Object.hasOwnProperty.call(message, "backup_time")) - $root.vttime.Time.encode(message.backup_time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.restore_to_pos != null && Object.hasOwnProperty.call(message, "restore_to_pos")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.restore_to_pos); - if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dry_run); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.active_only != null && Object.hasOwnProperty.call(message, "active_only")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.active_only); + if (message.name_only != null && Object.hasOwnProperty.call(message, "name_only")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.name_only); return writer; }; /** - * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. + * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static - * @param {vtctldata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode + * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreFromBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. + * Decodes a GetWorkflowsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest + * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreFromBackupRequest.decode = function decode(reader, length) { + GetWorkflowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RestoreFromBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.backup_time = $root.vttime.Time.decode(reader, reader.uint32()); + message.active_only = reader.bool(); break; case 3: - message.restore_to_pos = reader.string(); - break; - case 4: - message.dry_run = reader.bool(); + message.name_only = reader.bool(); break; default: reader.skipType(tag & 7); @@ -109531,145 +111794,125 @@ $root.vtctldata = (function() { }; /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest + * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreFromBackupRequest.decodeDelimited = function decodeDelimited(reader) { + GetWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreFromBackupRequest message. + * Verifies a GetWorkflowsRequest message. * @function verify - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreFromBackupRequest.verify = function verify(message) { + GetWorkflowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.backup_time != null && message.hasOwnProperty("backup_time")) { - var error = $root.vttime.Time.verify(message.backup_time); - if (error) - return "backup_time." + error; - } - if (message.restore_to_pos != null && message.hasOwnProperty("restore_to_pos")) - if (!$util.isString(message.restore_to_pos)) - return "restore_to_pos: string expected"; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - if (typeof message.dry_run !== "boolean") - return "dry_run: boolean expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.active_only != null && message.hasOwnProperty("active_only")) + if (typeof message.active_only !== "boolean") + return "active_only: boolean expected"; + if (message.name_only != null && message.hasOwnProperty("name_only")) + if (typeof message.name_only !== "boolean") + return "name_only: boolean expected"; return null; }; /** - * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest + * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest */ - RestoreFromBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RestoreFromBackupRequest) + GetWorkflowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetWorkflowsRequest) return object; - var message = new $root.vtctldata.RestoreFromBackupRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.RestoreFromBackupRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.backup_time != null) { - if (typeof object.backup_time !== "object") - throw TypeError(".vtctldata.RestoreFromBackupRequest.backup_time: object expected"); - message.backup_time = $root.vttime.Time.fromObject(object.backup_time); - } - if (object.restore_to_pos != null) - message.restore_to_pos = String(object.restore_to_pos); - if (object.dry_run != null) - message.dry_run = Boolean(object.dry_run); + var message = new $root.vtctldata.GetWorkflowsRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.active_only != null) + message.active_only = Boolean(object.active_only); + if (object.name_only != null) + message.name_only = Boolean(object.name_only); return message; }; /** - * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @static - * @param {vtctldata.RestoreFromBackupRequest} message RestoreFromBackupRequest + * @param {vtctldata.GetWorkflowsRequest} message GetWorkflowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreFromBackupRequest.toObject = function toObject(message, options) { + GetWorkflowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tablet_alias = null; - object.backup_time = null; - object.restore_to_pos = ""; - object.dry_run = false; + object.keyspace = ""; + object.active_only = false; + object.name_only = false; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.backup_time != null && message.hasOwnProperty("backup_time")) - object.backup_time = $root.vttime.Time.toObject(message.backup_time, options); - if (message.restore_to_pos != null && message.hasOwnProperty("restore_to_pos")) - object.restore_to_pos = message.restore_to_pos; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - object.dry_run = message.dry_run; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.active_only != null && message.hasOwnProperty("active_only")) + object.active_only = message.active_only; + if (message.name_only != null && message.hasOwnProperty("name_only")) + object.name_only = message.name_only; return object; }; /** - * Converts this RestoreFromBackupRequest to JSON. + * Converts this GetWorkflowsRequest to JSON. * @function toJSON - * @memberof vtctldata.RestoreFromBackupRequest + * @memberof vtctldata.GetWorkflowsRequest * @instance * @returns {Object.} JSON object */ - RestoreFromBackupRequest.prototype.toJSON = function toJSON() { + GetWorkflowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RestoreFromBackupRequest; + return GetWorkflowsRequest; })(); - vtctldata.RestoreFromBackupResponse = (function() { + vtctldata.GetWorkflowsResponse = (function() { /** - * Properties of a RestoreFromBackupResponse. + * Properties of a GetWorkflowsResponse. * @memberof vtctldata - * @interface IRestoreFromBackupResponse - * @property {topodata.ITabletAlias|null} [tablet_alias] RestoreFromBackupResponse tablet_alias - * @property {string|null} [keyspace] RestoreFromBackupResponse keyspace - * @property {string|null} [shard] RestoreFromBackupResponse shard - * @property {logutil.IEvent|null} [event] RestoreFromBackupResponse event + * @interface IGetWorkflowsResponse + * @property {Array.|null} [workflows] GetWorkflowsResponse workflows */ /** - * Constructs a new RestoreFromBackupResponse. + * Constructs a new GetWorkflowsResponse. * @memberof vtctldata - * @classdesc Represents a RestoreFromBackupResponse. - * @implements IRestoreFromBackupResponse + * @classdesc Represents a GetWorkflowsResponse. + * @implements IGetWorkflowsResponse * @constructor - * @param {vtctldata.IRestoreFromBackupResponse=} [properties] Properties to set + * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set */ - function RestoreFromBackupResponse(properties) { + function GetWorkflowsResponse(properties) { + this.workflows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109677,114 +111920,78 @@ $root.vtctldata = (function() { } /** - * RestoreFromBackupResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.RestoreFromBackupResponse - * @instance - */ - RestoreFromBackupResponse.prototype.tablet_alias = null; - - /** - * RestoreFromBackupResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.RestoreFromBackupResponse - * @instance - */ - RestoreFromBackupResponse.prototype.keyspace = ""; - - /** - * RestoreFromBackupResponse shard. - * @member {string} shard - * @memberof vtctldata.RestoreFromBackupResponse - * @instance - */ - RestoreFromBackupResponse.prototype.shard = ""; - - /** - * RestoreFromBackupResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof vtctldata.RestoreFromBackupResponse + * GetWorkflowsResponse workflows. + * @member {Array.} workflows + * @memberof vtctldata.GetWorkflowsResponse * @instance */ - RestoreFromBackupResponse.prototype.event = null; + GetWorkflowsResponse.prototype.workflows = $util.emptyArray; /** - * Creates a new RestoreFromBackupResponse instance using the specified properties. + * Creates a new GetWorkflowsResponse instance using the specified properties. * @function create - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static - * @param {vtctldata.IRestoreFromBackupResponse=} [properties] Properties to set - * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse instance + * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set + * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse instance */ - RestoreFromBackupResponse.create = function create(properties) { - return new RestoreFromBackupResponse(properties); + GetWorkflowsResponse.create = function create(properties) { + return new GetWorkflowsResponse(properties); }; /** - * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. + * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static - * @param {vtctldata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode + * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreFromBackupResponse.encode = function encode(message, writer) { + GetWorkflowsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.workflows != null && message.workflows.length) + for (var i = 0; i < message.workflows.length; ++i) + $root.vtctldata.Workflow.encode(message.workflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. + * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static - * @param {vtctldata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode + * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreFromBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. + * Decodes a GetWorkflowsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse + * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreFromBackupResponse.decode = function decode(reader, length) { + GetWorkflowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RestoreFromBackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.keyspace = reader.string(); - break; - case 3: - message.shard = reader.string(); - break; - case 4: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); + if (!(message.workflows && message.workflows.length)) + message.workflows = []; + message.workflows.push($root.vtctldata.Workflow.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -109795,142 +112002,128 @@ $root.vtctldata = (function() { }; /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse + * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreFromBackupResponse.decodeDelimited = function decodeDelimited(reader) { + GetWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreFromBackupResponse message. + * Verifies a GetWorkflowsResponse message. * @function verify - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreFromBackupResponse.verify = function verify(message) { + GetWorkflowsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); - if (error) - return "event." + error; + if (message.workflows != null && message.hasOwnProperty("workflows")) { + if (!Array.isArray(message.workflows)) + return "workflows: array expected"; + for (var i = 0; i < message.workflows.length; ++i) { + var error = $root.vtctldata.Workflow.verify(message.workflows[i]); + if (error) + return "workflows." + error; + } } return null; }; /** - * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse + * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse */ - RestoreFromBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RestoreFromBackupResponse) + GetWorkflowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.GetWorkflowsResponse) return object; - var message = new $root.vtctldata.RestoreFromBackupResponse(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.RestoreFromBackupResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".vtctldata.RestoreFromBackupResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); + var message = new $root.vtctldata.GetWorkflowsResponse(); + if (object.workflows) { + if (!Array.isArray(object.workflows)) + throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: array expected"); + message.workflows = []; + for (var i = 0; i < object.workflows.length; ++i) { + if (typeof object.workflows[i] !== "object") + throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: object expected"); + message.workflows[i] = $root.vtctldata.Workflow.fromObject(object.workflows[i]); + } } return message; }; /** - * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @static - * @param {vtctldata.RestoreFromBackupResponse} message RestoreFromBackupResponse + * @param {vtctldata.GetWorkflowsResponse} message GetWorkflowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreFromBackupResponse.toObject = function toObject(message, options) { + GetWorkflowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.keyspace = ""; - object.shard = ""; - object.event = null; + if (options.arrays || options.defaults) + object.workflows = []; + if (message.workflows && message.workflows.length) { + object.workflows = []; + for (var j = 0; j < message.workflows.length; ++j) + object.workflows[j] = $root.vtctldata.Workflow.toObject(message.workflows[j], options); } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); return object; }; /** - * Converts this RestoreFromBackupResponse to JSON. + * Converts this GetWorkflowsResponse to JSON. * @function toJSON - * @memberof vtctldata.RestoreFromBackupResponse + * @memberof vtctldata.GetWorkflowsResponse * @instance * @returns {Object.} JSON object */ - RestoreFromBackupResponse.prototype.toJSON = function toJSON() { + GetWorkflowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RestoreFromBackupResponse; + return GetWorkflowsResponse; })(); - vtctldata.RunHealthCheckRequest = (function() { + vtctldata.InitShardPrimaryRequest = (function() { /** - * Properties of a RunHealthCheckRequest. + * Properties of an InitShardPrimaryRequest. * @memberof vtctldata - * @interface IRunHealthCheckRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] RunHealthCheckRequest tablet_alias + * @interface IInitShardPrimaryRequest + * @property {string|null} [keyspace] InitShardPrimaryRequest keyspace + * @property {string|null} [shard] InitShardPrimaryRequest shard + * @property {topodata.ITabletAlias|null} [primary_elect_tablet_alias] InitShardPrimaryRequest primary_elect_tablet_alias + * @property {boolean|null} [force] InitShardPrimaryRequest force + * @property {vttime.IDuration|null} [wait_replicas_timeout] InitShardPrimaryRequest wait_replicas_timeout */ /** - * Constructs a new RunHealthCheckRequest. + * Constructs a new InitShardPrimaryRequest. * @memberof vtctldata - * @classdesc Represents a RunHealthCheckRequest. - * @implements IRunHealthCheckRequest + * @classdesc Represents an InitShardPrimaryRequest. + * @implements IInitShardPrimaryRequest * @constructor - * @param {vtctldata.IRunHealthCheckRequest=} [properties] Properties to set + * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set */ - function RunHealthCheckRequest(properties) { + function InitShardPrimaryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109938,75 +112131,127 @@ $root.vtctldata = (function() { } /** - * RunHealthCheckRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.RunHealthCheckRequest + * InitShardPrimaryRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.InitShardPrimaryRequest * @instance */ - RunHealthCheckRequest.prototype.tablet_alias = null; + InitShardPrimaryRequest.prototype.keyspace = ""; /** - * Creates a new RunHealthCheckRequest instance using the specified properties. + * InitShardPrimaryRequest shard. + * @member {string} shard + * @memberof vtctldata.InitShardPrimaryRequest + * @instance + */ + InitShardPrimaryRequest.prototype.shard = ""; + + /** + * InitShardPrimaryRequest primary_elect_tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} primary_elect_tablet_alias + * @memberof vtctldata.InitShardPrimaryRequest + * @instance + */ + InitShardPrimaryRequest.prototype.primary_elect_tablet_alias = null; + + /** + * InitShardPrimaryRequest force. + * @member {boolean} force + * @memberof vtctldata.InitShardPrimaryRequest + * @instance + */ + InitShardPrimaryRequest.prototype.force = false; + + /** + * InitShardPrimaryRequest wait_replicas_timeout. + * @member {vttime.IDuration|null|undefined} wait_replicas_timeout + * @memberof vtctldata.InitShardPrimaryRequest + * @instance + */ + InitShardPrimaryRequest.prototype.wait_replicas_timeout = null; + + /** + * Creates a new InitShardPrimaryRequest instance using the specified properties. * @function create - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static - * @param {vtctldata.IRunHealthCheckRequest=} [properties] Properties to set - * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest instance + * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set + * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest instance */ - RunHealthCheckRequest.create = function create(properties) { - return new RunHealthCheckRequest(properties); + InitShardPrimaryRequest.create = function create(properties) { + return new InitShardPrimaryRequest(properties); }; /** - * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. + * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static - * @param {vtctldata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode + * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunHealthCheckRequest.encode = function encode(message, writer) { + InitShardPrimaryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.primary_elect_tablet_alias != null && Object.hasOwnProperty.call(message, "primary_elect_tablet_alias")) + $root.topodata.TabletAlias.encode(message.primary_elect_tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); + if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) + $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. + * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static - * @param {vtctldata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode + * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunHealthCheckRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitShardPrimaryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer. + * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest + * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunHealthCheckRequest.decode = function decode(reader, length) { + InitShardPrimaryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RunHealthCheckRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.primary_elect_tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 4: + message.force = reader.bool(); + break; + case 5: + message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -110017,111 +112262,151 @@ $root.vtctldata = (function() { }; /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. + * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest + * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunHealthCheckRequest.decodeDelimited = function decodeDelimited(reader) { + InitShardPrimaryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunHealthCheckRequest message. + * Verifies an InitShardPrimaryRequest message. * @function verify - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunHealthCheckRequest.verify = function verify(message) { + InitShardPrimaryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.primary_elect_tablet_alias); if (error) - return "tablet_alias." + error; + return "primary_elect_tablet_alias." + error; + } + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { + var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + if (error) + return "wait_replicas_timeout." + error; } return null; }; /** - * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest + * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest */ - RunHealthCheckRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RunHealthCheckRequest) + InitShardPrimaryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.InitShardPrimaryRequest) return object; - var message = new $root.vtctldata.RunHealthCheckRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.RunHealthCheckRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.InitShardPrimaryRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.primary_elect_tablet_alias != null) { + if (typeof object.primary_elect_tablet_alias !== "object") + throw TypeError(".vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias: object expected"); + message.primary_elect_tablet_alias = $root.topodata.TabletAlias.fromObject(object.primary_elect_tablet_alias); + } + if (object.force != null) + message.force = Boolean(object.force); + if (object.wait_replicas_timeout != null) { + if (typeof object.wait_replicas_timeout !== "object") + throw TypeError(".vtctldata.InitShardPrimaryRequest.wait_replicas_timeout: object expected"); + message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); } return message; }; /** - * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @static - * @param {vtctldata.RunHealthCheckRequest} message RunHealthCheckRequest + * @param {vtctldata.InitShardPrimaryRequest} message InitShardPrimaryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunHealthCheckRequest.toObject = function toObject(message, options) { + InitShardPrimaryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.primary_elect_tablet_alias = null; + object.force = false; + object.wait_replicas_timeout = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) + object.primary_elect_tablet_alias = $root.topodata.TabletAlias.toObject(message.primary_elect_tablet_alias, options); + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) + object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); return object; }; /** - * Converts this RunHealthCheckRequest to JSON. + * Converts this InitShardPrimaryRequest to JSON. * @function toJSON - * @memberof vtctldata.RunHealthCheckRequest + * @memberof vtctldata.InitShardPrimaryRequest * @instance * @returns {Object.} JSON object */ - RunHealthCheckRequest.prototype.toJSON = function toJSON() { + InitShardPrimaryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunHealthCheckRequest; + return InitShardPrimaryRequest; })(); - vtctldata.RunHealthCheckResponse = (function() { + vtctldata.InitShardPrimaryResponse = (function() { /** - * Properties of a RunHealthCheckResponse. + * Properties of an InitShardPrimaryResponse. * @memberof vtctldata - * @interface IRunHealthCheckResponse + * @interface IInitShardPrimaryResponse + * @property {Array.|null} [events] InitShardPrimaryResponse events */ /** - * Constructs a new RunHealthCheckResponse. + * Constructs a new InitShardPrimaryResponse. * @memberof vtctldata - * @classdesc Represents a RunHealthCheckResponse. - * @implements IRunHealthCheckResponse + * @classdesc Represents an InitShardPrimaryResponse. + * @implements IInitShardPrimaryResponse * @constructor - * @param {vtctldata.IRunHealthCheckResponse=} [properties] Properties to set + * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set */ - function RunHealthCheckResponse(properties) { + function InitShardPrimaryResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110129,63 +112414,79 @@ $root.vtctldata = (function() { } /** - * Creates a new RunHealthCheckResponse instance using the specified properties. + * InitShardPrimaryResponse events. + * @member {Array.} events + * @memberof vtctldata.InitShardPrimaryResponse + * @instance + */ + InitShardPrimaryResponse.prototype.events = $util.emptyArray; + + /** + * Creates a new InitShardPrimaryResponse instance using the specified properties. * @function create - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static - * @param {vtctldata.IRunHealthCheckResponse=} [properties] Properties to set - * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse instance + * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set + * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse instance */ - RunHealthCheckResponse.create = function create(properties) { - return new RunHealthCheckResponse(properties); + InitShardPrimaryResponse.create = function create(properties) { + return new InitShardPrimaryResponse(properties); }; /** - * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. + * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static - * @param {vtctldata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode + * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunHealthCheckResponse.encode = function encode(message, writer) { + InitShardPrimaryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. + * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static - * @param {vtctldata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode + * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunHealthCheckResponse.encodeDelimited = function encodeDelimited(message, writer) { + InitShardPrimaryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer. + * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse + * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunHealthCheckResponse.decode = function decode(reader, length) { + InitShardPrimaryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RunHealthCheckResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -110195,95 +112496,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. + * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse + * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunHealthCheckResponse.decodeDelimited = function decodeDelimited(reader) { + InitShardPrimaryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunHealthCheckResponse message. + * Verifies an InitShardPrimaryResponse message. * @function verify - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunHealthCheckResponse.verify = function verify(message) { + InitShardPrimaryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.logutil.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } return null; }; /** - * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse + * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse */ - RunHealthCheckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RunHealthCheckResponse) + InitShardPrimaryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.InitShardPrimaryResponse) return object; - return new $root.vtctldata.RunHealthCheckResponse(); + var message = new $root.vtctldata.InitShardPrimaryResponse(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.InitShardPrimaryResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.InitShardPrimaryResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + } + } + return message; }; /** - * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. + * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @static - * @param {vtctldata.RunHealthCheckResponse} message RunHealthCheckResponse + * @param {vtctldata.InitShardPrimaryResponse} message InitShardPrimaryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunHealthCheckResponse.toObject = function toObject() { - return {}; + InitShardPrimaryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + } + return object; }; /** - * Converts this RunHealthCheckResponse to JSON. + * Converts this InitShardPrimaryResponse to JSON. * @function toJSON - * @memberof vtctldata.RunHealthCheckResponse + * @memberof vtctldata.InitShardPrimaryResponse * @instance * @returns {Object.} JSON object */ - RunHealthCheckResponse.prototype.toJSON = function toJSON() { + InitShardPrimaryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunHealthCheckResponse; + return InitShardPrimaryResponse; })(); - vtctldata.SetKeyspaceDurabilityPolicyRequest = (function() { + vtctldata.PingTabletRequest = (function() { /** - * Properties of a SetKeyspaceDurabilityPolicyRequest. + * Properties of a PingTabletRequest. * @memberof vtctldata - * @interface ISetKeyspaceDurabilityPolicyRequest - * @property {string|null} [keyspace] SetKeyspaceDurabilityPolicyRequest keyspace - * @property {string|null} [durability_policy] SetKeyspaceDurabilityPolicyRequest durability_policy + * @interface IPingTabletRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] PingTabletRequest tablet_alias */ /** - * Constructs a new SetKeyspaceDurabilityPolicyRequest. + * Constructs a new PingTabletRequest. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceDurabilityPolicyRequest. - * @implements ISetKeyspaceDurabilityPolicyRequest + * @classdesc Represents a PingTabletRequest. + * @implements IPingTabletRequest * @constructor - * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest=} [properties] Properties to set + * @param {vtctldata.IPingTabletRequest=} [properties] Properties to set */ - function SetKeyspaceDurabilityPolicyRequest(properties) { + function PingTabletRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110291,88 +112621,75 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceDurabilityPolicyRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest - * @instance - */ - SetKeyspaceDurabilityPolicyRequest.prototype.keyspace = ""; - - /** - * SetKeyspaceDurabilityPolicyRequest durability_policy. - * @member {string} durability_policy - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * PingTabletRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.PingTabletRequest * @instance */ - SetKeyspaceDurabilityPolicyRequest.prototype.durability_policy = ""; + PingTabletRequest.prototype.tablet_alias = null; /** - * Creates a new SetKeyspaceDurabilityPolicyRequest instance using the specified properties. + * Creates a new PingTabletRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest instance + * @param {vtctldata.IPingTabletRequest=} [properties] Properties to set + * @returns {vtctldata.PingTabletRequest} PingTabletRequest instance */ - SetKeyspaceDurabilityPolicyRequest.create = function create(properties) { - return new SetKeyspaceDurabilityPolicyRequest(properties); + PingTabletRequest.create = function create(properties) { + return new PingTabletRequest(properties); }; /** - * Encodes the specified SetKeyspaceDurabilityPolicyRequest message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. + * Encodes the specified PingTabletRequest message. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest message or plain object to encode + * @param {vtctldata.IPingTabletRequest} message PingTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceDurabilityPolicyRequest.encode = function encode(message, writer) { + PingTabletRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.durability_policy); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetKeyspaceDurabilityPolicyRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. + * Encodes the specified PingTabletRequest message, length delimited. Does not implicitly {@link vtctldata.PingTabletRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest message or plain object to encode + * @param {vtctldata.IPingTabletRequest} message PingTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceDurabilityPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + PingTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer. + * Decodes a PingTabletRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest + * @returns {vtctldata.PingTabletRequest} PingTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceDurabilityPolicyRequest.decode = function decode(reader, length) { + PingTabletRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceDurabilityPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PingTabletRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.durability_policy = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -110383,116 +112700,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a PingTabletRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest + * @returns {vtctldata.PingTabletRequest} PingTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceDurabilityPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + PingTabletRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceDurabilityPolicyRequest message. + * Verifies a PingTabletRequest message. * @function verify - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceDurabilityPolicyRequest.verify = function verify(message) { + PingTabletRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - if (!$util.isString(message.durability_policy)) - return "durability_policy: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a SetKeyspaceDurabilityPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PingTabletRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest + * @returns {vtctldata.PingTabletRequest} PingTabletRequest */ - SetKeyspaceDurabilityPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceDurabilityPolicyRequest) + PingTabletRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.PingTabletRequest) return object; - var message = new $root.vtctldata.SetKeyspaceDurabilityPolicyRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.durability_policy != null) - message.durability_policy = String(object.durability_policy); + var message = new $root.vtctldata.PingTabletRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.PingTabletRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } return message; }; /** - * Creates a plain object from a SetKeyspaceDurabilityPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a PingTabletRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @static - * @param {vtctldata.SetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest + * @param {vtctldata.PingTabletRequest} message PingTabletRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceDurabilityPolicyRequest.toObject = function toObject(message, options) { + PingTabletRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.durability_policy = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) - object.durability_policy = message.durability_policy; + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this SetKeyspaceDurabilityPolicyRequest to JSON. + * Converts this PingTabletRequest to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @memberof vtctldata.PingTabletRequest * @instance * @returns {Object.} JSON object */ - SetKeyspaceDurabilityPolicyRequest.prototype.toJSON = function toJSON() { + PingTabletRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceDurabilityPolicyRequest; + return PingTabletRequest; })(); - vtctldata.SetKeyspaceDurabilityPolicyResponse = (function() { + vtctldata.PingTabletResponse = (function() { /** - * Properties of a SetKeyspaceDurabilityPolicyResponse. + * Properties of a PingTabletResponse. * @memberof vtctldata - * @interface ISetKeyspaceDurabilityPolicyResponse - * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceDurabilityPolicyResponse keyspace + * @interface IPingTabletResponse */ /** - * Constructs a new SetKeyspaceDurabilityPolicyResponse. + * Constructs a new PingTabletResponse. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceDurabilityPolicyResponse. - * @implements ISetKeyspaceDurabilityPolicyResponse + * @classdesc Represents a PingTabletResponse. + * @implements IPingTabletResponse * @constructor - * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse=} [properties] Properties to set + * @param {vtctldata.IPingTabletResponse=} [properties] Properties to set */ - function SetKeyspaceDurabilityPolicyResponse(properties) { + function PingTabletResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110500,76 +112812,63 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceDurabilityPolicyResponse keyspace. - * @member {topodata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse - * @instance - */ - SetKeyspaceDurabilityPolicyResponse.prototype.keyspace = null; - - /** - * Creates a new SetKeyspaceDurabilityPolicyResponse instance using the specified properties. + * Creates a new PingTabletResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse instance + * @param {vtctldata.IPingTabletResponse=} [properties] Properties to set + * @returns {vtctldata.PingTabletResponse} PingTabletResponse instance */ - SetKeyspaceDurabilityPolicyResponse.create = function create(properties) { - return new SetKeyspaceDurabilityPolicyResponse(properties); + PingTabletResponse.create = function create(properties) { + return new PingTabletResponse(properties); }; /** - * Encodes the specified SetKeyspaceDurabilityPolicyResponse message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. + * Encodes the specified PingTabletResponse message. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse message or plain object to encode + * @param {vtctldata.IPingTabletResponse} message PingTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceDurabilityPolicyResponse.encode = function encode(message, writer) { + PingTabletResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetKeyspaceDurabilityPolicyResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. + * Encodes the specified PingTabletResponse message, length delimited. Does not implicitly {@link vtctldata.PingTabletResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static - * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse message or plain object to encode + * @param {vtctldata.IPingTabletResponse} message PingTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceDurabilityPolicyResponse.encodeDelimited = function encodeDelimited(message, writer) { + PingTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer. + * Decodes a PingTabletResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse + * @returns {vtctldata.PingTabletResponse} PingTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceDurabilityPolicyResponse.decode = function decode(reader, length) { + PingTabletResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceDurabilityPolicyResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PingTabletResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -110579,117 +112878,98 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer, length delimited. + * Decodes a PingTabletResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse + * @returns {vtctldata.PingTabletResponse} PingTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceDurabilityPolicyResponse.decodeDelimited = function decodeDelimited(reader) { + PingTabletResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceDurabilityPolicyResponse message. + * Verifies a PingTabletResponse message. * @function verify - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceDurabilityPolicyResponse.verify = function verify(message) { + PingTabletResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.topodata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } return null; }; /** - * Creates a SetKeyspaceDurabilityPolicyResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PingTabletResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse + * @returns {vtctldata.PingTabletResponse} PingTabletResponse */ - SetKeyspaceDurabilityPolicyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceDurabilityPolicyResponse) + PingTabletResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.PingTabletResponse) return object; - var message = new $root.vtctldata.SetKeyspaceDurabilityPolicyResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace: object expected"); - message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); - } - return message; + return new $root.vtctldata.PingTabletResponse(); }; /** - * Creates a plain object from a SetKeyspaceDurabilityPolicyResponse message. Also converts values to other types if specified. + * Creates a plain object from a PingTabletResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @static - * @param {vtctldata.SetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse + * @param {vtctldata.PingTabletResponse} message PingTabletResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceDurabilityPolicyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); - return object; + PingTabletResponse.toObject = function toObject() { + return {}; }; /** - * Converts this SetKeyspaceDurabilityPolicyResponse to JSON. + * Converts this PingTabletResponse to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse + * @memberof vtctldata.PingTabletResponse * @instance * @returns {Object.} JSON object */ - SetKeyspaceDurabilityPolicyResponse.prototype.toJSON = function toJSON() { + PingTabletResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceDurabilityPolicyResponse; + return PingTabletResponse; })(); - vtctldata.SetKeyspaceServedFromRequest = (function() { + vtctldata.PlannedReparentShardRequest = (function() { /** - * Properties of a SetKeyspaceServedFromRequest. + * Properties of a PlannedReparentShardRequest. * @memberof vtctldata - * @interface ISetKeyspaceServedFromRequest - * @property {string|null} [keyspace] SetKeyspaceServedFromRequest keyspace - * @property {topodata.TabletType|null} [tablet_type] SetKeyspaceServedFromRequest tablet_type - * @property {Array.|null} [cells] SetKeyspaceServedFromRequest cells - * @property {boolean|null} [remove] SetKeyspaceServedFromRequest remove - * @property {string|null} [source_keyspace] SetKeyspaceServedFromRequest source_keyspace + * @interface IPlannedReparentShardRequest + * @property {string|null} [keyspace] PlannedReparentShardRequest keyspace + * @property {string|null} [shard] PlannedReparentShardRequest shard + * @property {topodata.ITabletAlias|null} [new_primary] PlannedReparentShardRequest new_primary + * @property {topodata.ITabletAlias|null} [avoid_primary] PlannedReparentShardRequest avoid_primary + * @property {vttime.IDuration|null} [wait_replicas_timeout] PlannedReparentShardRequest wait_replicas_timeout */ /** - * Constructs a new SetKeyspaceServedFromRequest. + * Constructs a new PlannedReparentShardRequest. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceServedFromRequest. - * @implements ISetKeyspaceServedFromRequest + * @classdesc Represents a PlannedReparentShardRequest. + * @implements IPlannedReparentShardRequest * @constructor - * @param {vtctldata.ISetKeyspaceServedFromRequest=} [properties] Properties to set + * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set */ - function SetKeyspaceServedFromRequest(properties) { - this.cells = []; + function PlannedReparentShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110697,111 +112977,110 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceServedFromRequest keyspace. + * PlannedReparentShardRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @instance */ - SetKeyspaceServedFromRequest.prototype.keyspace = ""; + PlannedReparentShardRequest.prototype.keyspace = ""; /** - * SetKeyspaceServedFromRequest tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof vtctldata.SetKeyspaceServedFromRequest + * PlannedReparentShardRequest shard. + * @member {string} shard + * @memberof vtctldata.PlannedReparentShardRequest * @instance */ - SetKeyspaceServedFromRequest.prototype.tablet_type = 0; + PlannedReparentShardRequest.prototype.shard = ""; /** - * SetKeyspaceServedFromRequest cells. - * @member {Array.} cells - * @memberof vtctldata.SetKeyspaceServedFromRequest + * PlannedReparentShardRequest new_primary. + * @member {topodata.ITabletAlias|null|undefined} new_primary + * @memberof vtctldata.PlannedReparentShardRequest * @instance */ - SetKeyspaceServedFromRequest.prototype.cells = $util.emptyArray; + PlannedReparentShardRequest.prototype.new_primary = null; /** - * SetKeyspaceServedFromRequest remove. - * @member {boolean} remove - * @memberof vtctldata.SetKeyspaceServedFromRequest + * PlannedReparentShardRequest avoid_primary. + * @member {topodata.ITabletAlias|null|undefined} avoid_primary + * @memberof vtctldata.PlannedReparentShardRequest * @instance */ - SetKeyspaceServedFromRequest.prototype.remove = false; + PlannedReparentShardRequest.prototype.avoid_primary = null; /** - * SetKeyspaceServedFromRequest source_keyspace. - * @member {string} source_keyspace - * @memberof vtctldata.SetKeyspaceServedFromRequest + * PlannedReparentShardRequest wait_replicas_timeout. + * @member {vttime.IDuration|null|undefined} wait_replicas_timeout + * @memberof vtctldata.PlannedReparentShardRequest * @instance */ - SetKeyspaceServedFromRequest.prototype.source_keyspace = ""; + PlannedReparentShardRequest.prototype.wait_replicas_timeout = null; /** - * Creates a new SetKeyspaceServedFromRequest instance using the specified properties. + * Creates a new PlannedReparentShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static - * @param {vtctldata.ISetKeyspaceServedFromRequest=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest instance + * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set + * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest instance */ - SetKeyspaceServedFromRequest.create = function create(properties) { - return new SetKeyspaceServedFromRequest(properties); + PlannedReparentShardRequest.create = function create(properties) { + return new PlannedReparentShardRequest(properties); }; /** - * Encodes the specified SetKeyspaceServedFromRequest message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. + * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static - * @param {vtctldata.ISetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest message or plain object to encode + * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceServedFromRequest.encode = function encode(message, writer) { + PlannedReparentShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tablet_type); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); - if (message.remove != null && Object.hasOwnProperty.call(message, "remove")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.remove); - if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) + $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.avoid_primary != null && Object.hasOwnProperty.call(message, "avoid_primary")) + $root.topodata.TabletAlias.encode(message.avoid_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) + $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetKeyspaceServedFromRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. + * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static - * @param {vtctldata.ISetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest message or plain object to encode + * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceServedFromRequest.encodeDelimited = function encodeDelimited(message, writer) { + PlannedReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer. + * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest + * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceServedFromRequest.decode = function decode(reader, length) { + PlannedReparentShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceServedFromRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -110809,18 +113088,16 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - message.tablet_type = reader.int32(); + message.shard = reader.string(); break; case 3: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); + message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 4: - message.remove = reader.bool(); + message.avoid_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 5: - message.source_keyspace = reader.string(); + message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -110831,211 +113108,159 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer, length delimited. + * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest + * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceServedFromRequest.decodeDelimited = function decodeDelimited(reader) { + PlannedReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceServedFromRequest message. + * Verifies a PlannedReparentShardRequest message. * @function verify - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceServedFromRequest.verify = function verify(message) { + PlannedReparentShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) { + var error = $root.topodata.TabletAlias.verify(message.new_primary); + if (error) + return "new_primary." + error; + } + if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) { + var error = $root.topodata.TabletAlias.verify(message.avoid_primary); + if (error) + return "avoid_primary." + error; + } + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { + var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); + if (error) + return "wait_replicas_timeout." + error; } - if (message.remove != null && message.hasOwnProperty("remove")) - if (typeof message.remove !== "boolean") - return "remove: boolean expected"; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - if (!$util.isString(message.source_keyspace)) - return "source_keyspace: string expected"; return null; }; /** - * Creates a SetKeyspaceServedFromRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest + * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest */ - SetKeyspaceServedFromRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceServedFromRequest) + PlannedReparentShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.PlannedReparentShardRequest) return object; - var message = new $root.vtctldata.SetKeyspaceServedFromRequest(); + var message = new $root.vtctldata.PlannedReparentShardRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; + if (object.shard != null) + message.shard = String(object.shard); + if (object.new_primary != null) { + if (typeof object.new_primary !== "object") + throw TypeError(".vtctldata.PlannedReparentShardRequest.new_primary: object expected"); + message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); } - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.SetKeyspaceServedFromRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); + if (object.avoid_primary != null) { + if (typeof object.avoid_primary !== "object") + throw TypeError(".vtctldata.PlannedReparentShardRequest.avoid_primary: object expected"); + message.avoid_primary = $root.topodata.TabletAlias.fromObject(object.avoid_primary); + } + if (object.wait_replicas_timeout != null) { + if (typeof object.wait_replicas_timeout !== "object") + throw TypeError(".vtctldata.PlannedReparentShardRequest.wait_replicas_timeout: object expected"); + message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); } - if (object.remove != null) - message.remove = Boolean(object.remove); - if (object.source_keyspace != null) - message.source_keyspace = String(object.source_keyspace); return message; }; /** - * Creates a plain object from a SetKeyspaceServedFromRequest message. Also converts values to other types if specified. + * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @static - * @param {vtctldata.SetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest + * @param {vtctldata.PlannedReparentShardRequest} message PlannedReparentShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceServedFromRequest.toObject = function toObject(message, options) { + PlannedReparentShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.cells = []; if (options.defaults) { object.keyspace = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.remove = false; - object.source_keyspace = ""; + object.shard = ""; + object.new_primary = null; + object.avoid_primary = null; + object.wait_replicas_timeout = null; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.remove != null && message.hasOwnProperty("remove")) - object.remove = message.remove; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - object.source_keyspace = message.source_keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) + object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); + if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) + object.avoid_primary = $root.topodata.TabletAlias.toObject(message.avoid_primary, options); + if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) + object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); return object; }; /** - * Converts this SetKeyspaceServedFromRequest to JSON. + * Converts this PlannedReparentShardRequest to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceServedFromRequest + * @memberof vtctldata.PlannedReparentShardRequest * @instance * @returns {Object.} JSON object */ - SetKeyspaceServedFromRequest.prototype.toJSON = function toJSON() { + PlannedReparentShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceServedFromRequest; + return PlannedReparentShardRequest; })(); - vtctldata.SetKeyspaceServedFromResponse = (function() { + vtctldata.PlannedReparentShardResponse = (function() { /** - * Properties of a SetKeyspaceServedFromResponse. + * Properties of a PlannedReparentShardResponse. * @memberof vtctldata - * @interface ISetKeyspaceServedFromResponse - * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceServedFromResponse keyspace + * @interface IPlannedReparentShardResponse + * @property {string|null} [keyspace] PlannedReparentShardResponse keyspace + * @property {string|null} [shard] PlannedReparentShardResponse shard + * @property {topodata.ITabletAlias|null} [promoted_primary] PlannedReparentShardResponse promoted_primary + * @property {Array.|null} [events] PlannedReparentShardResponse events */ /** - * Constructs a new SetKeyspaceServedFromResponse. + * Constructs a new PlannedReparentShardResponse. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceServedFromResponse. - * @implements ISetKeyspaceServedFromResponse + * @classdesc Represents a PlannedReparentShardResponse. + * @implements IPlannedReparentShardResponse * @constructor - * @param {vtctldata.ISetKeyspaceServedFromResponse=} [properties] Properties to set + * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set */ - function SetKeyspaceServedFromResponse(properties) { + function PlannedReparentShardResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111043,75 +113268,117 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceServedFromResponse keyspace. - * @member {topodata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.SetKeyspaceServedFromResponse + * PlannedReparentShardResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.PlannedReparentShardResponse * @instance */ - SetKeyspaceServedFromResponse.prototype.keyspace = null; + PlannedReparentShardResponse.prototype.keyspace = ""; /** - * Creates a new SetKeyspaceServedFromResponse instance using the specified properties. + * PlannedReparentShardResponse shard. + * @member {string} shard + * @memberof vtctldata.PlannedReparentShardResponse + * @instance + */ + PlannedReparentShardResponse.prototype.shard = ""; + + /** + * PlannedReparentShardResponse promoted_primary. + * @member {topodata.ITabletAlias|null|undefined} promoted_primary + * @memberof vtctldata.PlannedReparentShardResponse + * @instance + */ + PlannedReparentShardResponse.prototype.promoted_primary = null; + + /** + * PlannedReparentShardResponse events. + * @member {Array.} events + * @memberof vtctldata.PlannedReparentShardResponse + * @instance + */ + PlannedReparentShardResponse.prototype.events = $util.emptyArray; + + /** + * Creates a new PlannedReparentShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static - * @param {vtctldata.ISetKeyspaceServedFromResponse=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse instance + * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set + * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse instance */ - SetKeyspaceServedFromResponse.create = function create(properties) { - return new SetKeyspaceServedFromResponse(properties); + PlannedReparentShardResponse.create = function create(properties) { + return new PlannedReparentShardResponse(properties); }; /** - * Encodes the specified SetKeyspaceServedFromResponse message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. + * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static - * @param {vtctldata.ISetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse message or plain object to encode + * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceServedFromResponse.encode = function encode(message, writer) { + PlannedReparentShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) + $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetKeyspaceServedFromResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. + * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static - * @param {vtctldata.ISetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse message or plain object to encode + * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceServedFromResponse.encodeDelimited = function encodeDelimited(message, writer) { + PlannedReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer. + * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse + * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceServedFromResponse.decode = function decode(reader, length) { + PlannedReparentShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceServedFromResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -111122,113 +113389,158 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer, length delimited. + * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse + * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceServedFromResponse.decodeDelimited = function decodeDelimited(reader) { + PlannedReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceServedFromResponse message. + * Verifies a PlannedReparentShardResponse message. * @function verify - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceServedFromResponse.verify = function verify(message) { + PlannedReparentShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.topodata.Keyspace.verify(message.keyspace); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { + var error = $root.topodata.TabletAlias.verify(message.promoted_primary); if (error) - return "keyspace." + error; + return "promoted_primary." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.logutil.Event.verify(message.events[i]); + if (error) + return "events." + error; + } } return null; }; /** - * Creates a SetKeyspaceServedFromResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse + * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse */ - SetKeyspaceServedFromResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceServedFromResponse) + PlannedReparentShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.PlannedReparentShardResponse) return object; - var message = new $root.vtctldata.SetKeyspaceServedFromResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.SetKeyspaceServedFromResponse.keyspace: object expected"); - message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); + var message = new $root.vtctldata.PlannedReparentShardResponse(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.promoted_primary != null) { + if (typeof object.promoted_primary !== "object") + throw TypeError(".vtctldata.PlannedReparentShardResponse.promoted_primary: object expected"); + message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.PlannedReparentShardResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.PlannedReparentShardResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + } } return message; }; /** - * Creates a plain object from a SetKeyspaceServedFromResponse message. Also converts values to other types if specified. + * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @static - * @param {vtctldata.SetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse + * @param {vtctldata.PlannedReparentShardResponse} message PlannedReparentShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceServedFromResponse.toObject = function toObject(message, options) { + PlannedReparentShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.keyspace = null; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.promoted_primary = null; + } if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) + object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + } return object; }; /** - * Converts this SetKeyspaceServedFromResponse to JSON. + * Converts this PlannedReparentShardResponse to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceServedFromResponse + * @memberof vtctldata.PlannedReparentShardResponse * @instance * @returns {Object.} JSON object */ - SetKeyspaceServedFromResponse.prototype.toJSON = function toJSON() { + PlannedReparentShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceServedFromResponse; + return PlannedReparentShardResponse; })(); - vtctldata.SetKeyspaceShardingInfoRequest = (function() { + vtctldata.RebuildKeyspaceGraphRequest = (function() { /** - * Properties of a SetKeyspaceShardingInfoRequest. + * Properties of a RebuildKeyspaceGraphRequest. * @memberof vtctldata - * @interface ISetKeyspaceShardingInfoRequest - * @property {string|null} [keyspace] SetKeyspaceShardingInfoRequest keyspace - * @property {boolean|null} [force] SetKeyspaceShardingInfoRequest force + * @interface IRebuildKeyspaceGraphRequest + * @property {string|null} [keyspace] RebuildKeyspaceGraphRequest keyspace + * @property {Array.|null} [cells] RebuildKeyspaceGraphRequest cells + * @property {boolean|null} [allow_partial] RebuildKeyspaceGraphRequest allow_partial */ /** - * Constructs a new SetKeyspaceShardingInfoRequest. + * Constructs a new RebuildKeyspaceGraphRequest. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceShardingInfoRequest. - * @implements ISetKeyspaceShardingInfoRequest + * @classdesc Represents a RebuildKeyspaceGraphRequest. + * @implements IRebuildKeyspaceGraphRequest * @constructor - * @param {vtctldata.ISetKeyspaceShardingInfoRequest=} [properties] Properties to set + * @param {vtctldata.IRebuildKeyspaceGraphRequest=} [properties] Properties to set */ - function SetKeyspaceShardingInfoRequest(properties) { + function RebuildKeyspaceGraphRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111236,88 +113548,104 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceShardingInfoRequest keyspace. + * RebuildKeyspaceGraphRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @instance */ - SetKeyspaceShardingInfoRequest.prototype.keyspace = ""; + RebuildKeyspaceGraphRequest.prototype.keyspace = ""; /** - * SetKeyspaceShardingInfoRequest force. - * @member {boolean} force - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * RebuildKeyspaceGraphRequest cells. + * @member {Array.} cells + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @instance */ - SetKeyspaceShardingInfoRequest.prototype.force = false; + RebuildKeyspaceGraphRequest.prototype.cells = $util.emptyArray; /** - * Creates a new SetKeyspaceShardingInfoRequest instance using the specified properties. + * RebuildKeyspaceGraphRequest allow_partial. + * @member {boolean} allow_partial + * @memberof vtctldata.RebuildKeyspaceGraphRequest + * @instance + */ + RebuildKeyspaceGraphRequest.prototype.allow_partial = false; + + /** + * Creates a new RebuildKeyspaceGraphRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static - * @param {vtctldata.ISetKeyspaceShardingInfoRequest=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest instance + * @param {vtctldata.IRebuildKeyspaceGraphRequest=} [properties] Properties to set + * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest instance */ - SetKeyspaceShardingInfoRequest.create = function create(properties) { - return new SetKeyspaceShardingInfoRequest(properties); + RebuildKeyspaceGraphRequest.create = function create(properties) { + return new RebuildKeyspaceGraphRequest(properties); }; /** - * Encodes the specified SetKeyspaceShardingInfoRequest message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. + * Encodes the specified RebuildKeyspaceGraphRequest message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static - * @param {vtctldata.ISetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest message or plain object to encode + * @param {vtctldata.IRebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceShardingInfoRequest.encode = function encode(message, writer) { + RebuildKeyspaceGraphRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.allow_partial != null && Object.hasOwnProperty.call(message, "allow_partial")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_partial); return writer; }; /** - * Encodes the specified SetKeyspaceShardingInfoRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. + * Encodes the specified RebuildKeyspaceGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static - * @param {vtctldata.ISetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest message or plain object to encode + * @param {vtctldata.IRebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceShardingInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + RebuildKeyspaceGraphRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer. + * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest + * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceShardingInfoRequest.decode = function decode(reader, length) { + RebuildKeyspaceGraphRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceShardingInfoRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildKeyspaceGraphRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.keyspace = reader.string(); break; - case 4: - message.force = reader.bool(); + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 3: + message.allow_partial = reader.bool(); break; default: reader.skipType(tag & 7); @@ -111328,116 +113656,136 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a RebuildKeyspaceGraphRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest + * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceShardingInfoRequest.decodeDelimited = function decodeDelimited(reader) { + RebuildKeyspaceGraphRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceShardingInfoRequest message. + * Verifies a RebuildKeyspaceGraphRequest message. * @function verify - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceShardingInfoRequest.verify = function verify(message) { + RebuildKeyspaceGraphRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.allow_partial != null && message.hasOwnProperty("allow_partial")) + if (typeof message.allow_partial !== "boolean") + return "allow_partial: boolean expected"; return null; }; /** - * Creates a SetKeyspaceShardingInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildKeyspaceGraphRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest + * @returns {vtctldata.RebuildKeyspaceGraphRequest} RebuildKeyspaceGraphRequest */ - SetKeyspaceShardingInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceShardingInfoRequest) + RebuildKeyspaceGraphRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RebuildKeyspaceGraphRequest) return object; - var message = new $root.vtctldata.SetKeyspaceShardingInfoRequest(); + var message = new $root.vtctldata.RebuildKeyspaceGraphRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.force != null) - message.force = Boolean(object.force); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.RebuildKeyspaceGraphRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.allow_partial != null) + message.allow_partial = Boolean(object.allow_partial); return message; }; /** - * Creates a plain object from a SetKeyspaceShardingInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a RebuildKeyspaceGraphRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @static - * @param {vtctldata.SetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest + * @param {vtctldata.RebuildKeyspaceGraphRequest} message RebuildKeyspaceGraphRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceShardingInfoRequest.toObject = function toObject(message, options) { + RebuildKeyspaceGraphRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.cells = []; if (options.defaults) { object.keyspace = ""; - object.force = false; + object.allow_partial = false; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.allow_partial != null && message.hasOwnProperty("allow_partial")) + object.allow_partial = message.allow_partial; return object; }; /** - * Converts this SetKeyspaceShardingInfoRequest to JSON. + * Converts this RebuildKeyspaceGraphRequest to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceShardingInfoRequest + * @memberof vtctldata.RebuildKeyspaceGraphRequest * @instance * @returns {Object.} JSON object */ - SetKeyspaceShardingInfoRequest.prototype.toJSON = function toJSON() { + RebuildKeyspaceGraphRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceShardingInfoRequest; + return RebuildKeyspaceGraphRequest; })(); - vtctldata.SetKeyspaceShardingInfoResponse = (function() { + vtctldata.RebuildKeyspaceGraphResponse = (function() { /** - * Properties of a SetKeyspaceShardingInfoResponse. + * Properties of a RebuildKeyspaceGraphResponse. * @memberof vtctldata - * @interface ISetKeyspaceShardingInfoResponse - * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceShardingInfoResponse keyspace + * @interface IRebuildKeyspaceGraphResponse */ /** - * Constructs a new SetKeyspaceShardingInfoResponse. + * Constructs a new RebuildKeyspaceGraphResponse. * @memberof vtctldata - * @classdesc Represents a SetKeyspaceShardingInfoResponse. - * @implements ISetKeyspaceShardingInfoResponse + * @classdesc Represents a RebuildKeyspaceGraphResponse. + * @implements IRebuildKeyspaceGraphResponse * @constructor - * @param {vtctldata.ISetKeyspaceShardingInfoResponse=} [properties] Properties to set + * @param {vtctldata.IRebuildKeyspaceGraphResponse=} [properties] Properties to set */ - function SetKeyspaceShardingInfoResponse(properties) { + function RebuildKeyspaceGraphResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111445,76 +113793,63 @@ $root.vtctldata = (function() { } /** - * SetKeyspaceShardingInfoResponse keyspace. - * @member {topodata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.SetKeyspaceShardingInfoResponse - * @instance - */ - SetKeyspaceShardingInfoResponse.prototype.keyspace = null; - - /** - * Creates a new SetKeyspaceShardingInfoResponse instance using the specified properties. + * Creates a new RebuildKeyspaceGraphResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static - * @param {vtctldata.ISetKeyspaceShardingInfoResponse=} [properties] Properties to set - * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse instance + * @param {vtctldata.IRebuildKeyspaceGraphResponse=} [properties] Properties to set + * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse instance */ - SetKeyspaceShardingInfoResponse.create = function create(properties) { - return new SetKeyspaceShardingInfoResponse(properties); + RebuildKeyspaceGraphResponse.create = function create(properties) { + return new RebuildKeyspaceGraphResponse(properties); }; /** - * Encodes the specified SetKeyspaceShardingInfoResponse message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. + * Encodes the specified RebuildKeyspaceGraphResponse message. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static - * @param {vtctldata.ISetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse message or plain object to encode + * @param {vtctldata.IRebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceShardingInfoResponse.encode = function encode(message, writer) { + RebuildKeyspaceGraphResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetKeyspaceShardingInfoResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. + * Encodes the specified RebuildKeyspaceGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildKeyspaceGraphResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static - * @param {vtctldata.ISetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse message or plain object to encode + * @param {vtctldata.IRebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetKeyspaceShardingInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + RebuildKeyspaceGraphResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer. + * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse + * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceShardingInfoResponse.decode = function decode(reader, length) { + RebuildKeyspaceGraphResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceShardingInfoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildKeyspaceGraphResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -111524,114 +113859,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a RebuildKeyspaceGraphResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse + * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetKeyspaceShardingInfoResponse.decodeDelimited = function decodeDelimited(reader) { + RebuildKeyspaceGraphResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetKeyspaceShardingInfoResponse message. + * Verifies a RebuildKeyspaceGraphResponse message. * @function verify - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetKeyspaceShardingInfoResponse.verify = function verify(message) { + RebuildKeyspaceGraphResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.topodata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } return null; }; /** - * Creates a SetKeyspaceShardingInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildKeyspaceGraphResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse + * @returns {vtctldata.RebuildKeyspaceGraphResponse} RebuildKeyspaceGraphResponse */ - SetKeyspaceShardingInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetKeyspaceShardingInfoResponse) + RebuildKeyspaceGraphResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RebuildKeyspaceGraphResponse) return object; - var message = new $root.vtctldata.SetKeyspaceShardingInfoResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.SetKeyspaceShardingInfoResponse.keyspace: object expected"); - message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); - } - return message; + return new $root.vtctldata.RebuildKeyspaceGraphResponse(); }; /** - * Creates a plain object from a SetKeyspaceShardingInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a RebuildKeyspaceGraphResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @static - * @param {vtctldata.SetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse + * @param {vtctldata.RebuildKeyspaceGraphResponse} message RebuildKeyspaceGraphResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetKeyspaceShardingInfoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); - return object; + RebuildKeyspaceGraphResponse.toObject = function toObject() { + return {}; }; /** - * Converts this SetKeyspaceShardingInfoResponse to JSON. + * Converts this RebuildKeyspaceGraphResponse to JSON. * @function toJSON - * @memberof vtctldata.SetKeyspaceShardingInfoResponse + * @memberof vtctldata.RebuildKeyspaceGraphResponse * @instance * @returns {Object.} JSON object */ - SetKeyspaceShardingInfoResponse.prototype.toJSON = function toJSON() { + RebuildKeyspaceGraphResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetKeyspaceShardingInfoResponse; + return RebuildKeyspaceGraphResponse; })(); - vtctldata.SetShardIsPrimaryServingRequest = (function() { + vtctldata.RebuildVSchemaGraphRequest = (function() { /** - * Properties of a SetShardIsPrimaryServingRequest. + * Properties of a RebuildVSchemaGraphRequest. * @memberof vtctldata - * @interface ISetShardIsPrimaryServingRequest - * @property {string|null} [keyspace] SetShardIsPrimaryServingRequest keyspace - * @property {string|null} [shard] SetShardIsPrimaryServingRequest shard - * @property {boolean|null} [is_serving] SetShardIsPrimaryServingRequest is_serving + * @interface IRebuildVSchemaGraphRequest + * @property {Array.|null} [cells] RebuildVSchemaGraphRequest cells */ /** - * Constructs a new SetShardIsPrimaryServingRequest. + * Constructs a new RebuildVSchemaGraphRequest. * @memberof vtctldata - * @classdesc Represents a SetShardIsPrimaryServingRequest. - * @implements ISetShardIsPrimaryServingRequest + * @classdesc Represents a RebuildVSchemaGraphRequest. + * @implements IRebuildVSchemaGraphRequest * @constructor - * @param {vtctldata.ISetShardIsPrimaryServingRequest=} [properties] Properties to set + * @param {vtctldata.IRebuildVSchemaGraphRequest=} [properties] Properties to set */ - function SetShardIsPrimaryServingRequest(properties) { + function RebuildVSchemaGraphRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111639,101 +113955,78 @@ $root.vtctldata = (function() { } /** - * SetShardIsPrimaryServingRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.SetShardIsPrimaryServingRequest - * @instance - */ - SetShardIsPrimaryServingRequest.prototype.keyspace = ""; - - /** - * SetShardIsPrimaryServingRequest shard. - * @member {string} shard - * @memberof vtctldata.SetShardIsPrimaryServingRequest - * @instance - */ - SetShardIsPrimaryServingRequest.prototype.shard = ""; - - /** - * SetShardIsPrimaryServingRequest is_serving. - * @member {boolean} is_serving - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * RebuildVSchemaGraphRequest cells. + * @member {Array.} cells + * @memberof vtctldata.RebuildVSchemaGraphRequest * @instance */ - SetShardIsPrimaryServingRequest.prototype.is_serving = false; + RebuildVSchemaGraphRequest.prototype.cells = $util.emptyArray; /** - * Creates a new SetShardIsPrimaryServingRequest instance using the specified properties. + * Creates a new RebuildVSchemaGraphRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static - * @param {vtctldata.ISetShardIsPrimaryServingRequest=} [properties] Properties to set - * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest instance + * @param {vtctldata.IRebuildVSchemaGraphRequest=} [properties] Properties to set + * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest instance */ - SetShardIsPrimaryServingRequest.create = function create(properties) { - return new SetShardIsPrimaryServingRequest(properties); + RebuildVSchemaGraphRequest.create = function create(properties) { + return new RebuildVSchemaGraphRequest(properties); }; /** - * Encodes the specified SetShardIsPrimaryServingRequest message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. + * Encodes the specified RebuildVSchemaGraphRequest message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static - * @param {vtctldata.ISetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest message or plain object to encode + * @param {vtctldata.IRebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardIsPrimaryServingRequest.encode = function encode(message, writer) { + RebuildVSchemaGraphRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.is_serving != null && Object.hasOwnProperty.call(message, "is_serving")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_serving); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cells[i]); return writer; }; /** - * Encodes the specified SetShardIsPrimaryServingRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. + * Encodes the specified RebuildVSchemaGraphRequest message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static - * @param {vtctldata.ISetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest message or plain object to encode + * @param {vtctldata.IRebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardIsPrimaryServingRequest.encodeDelimited = function encodeDelimited(message, writer) { + RebuildVSchemaGraphRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer. + * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest + * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardIsPrimaryServingRequest.decode = function decode(reader, length) { + RebuildVSchemaGraphRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardIsPrimaryServingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildVSchemaGraphRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.is_serving = reader.bool(); + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -111744,124 +114037,118 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer, length delimited. + * Decodes a RebuildVSchemaGraphRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest + * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardIsPrimaryServingRequest.decodeDelimited = function decodeDelimited(reader) { + RebuildVSchemaGraphRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetShardIsPrimaryServingRequest message. + * Verifies a RebuildVSchemaGraphRequest message. * @function verify - * @memberof vtctldata.SetShardIsPrimaryServingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetShardIsPrimaryServingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.is_serving != null && message.hasOwnProperty("is_serving")) - if (typeof message.is_serving !== "boolean") - return "is_serving: boolean expected"; + * @memberof vtctldata.RebuildVSchemaGraphRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RebuildVSchemaGraphRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a SetShardIsPrimaryServingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildVSchemaGraphRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest + * @returns {vtctldata.RebuildVSchemaGraphRequest} RebuildVSchemaGraphRequest */ - SetShardIsPrimaryServingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetShardIsPrimaryServingRequest) + RebuildVSchemaGraphRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RebuildVSchemaGraphRequest) return object; - var message = new $root.vtctldata.SetShardIsPrimaryServingRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.is_serving != null) - message.is_serving = Boolean(object.is_serving); + var message = new $root.vtctldata.RebuildVSchemaGraphRequest(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.RebuildVSchemaGraphRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } return message; }; /** - * Creates a plain object from a SetShardIsPrimaryServingRequest message. Also converts values to other types if specified. + * Creates a plain object from a RebuildVSchemaGraphRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @static - * @param {vtctldata.SetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest + * @param {vtctldata.RebuildVSchemaGraphRequest} message RebuildVSchemaGraphRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetShardIsPrimaryServingRequest.toObject = function toObject(message, options) { + RebuildVSchemaGraphRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.is_serving = false; + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.is_serving != null && message.hasOwnProperty("is_serving")) - object.is_serving = message.is_serving; return object; }; /** - * Converts this SetShardIsPrimaryServingRequest to JSON. + * Converts this RebuildVSchemaGraphRequest to JSON. * @function toJSON - * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @memberof vtctldata.RebuildVSchemaGraphRequest * @instance * @returns {Object.} JSON object */ - SetShardIsPrimaryServingRequest.prototype.toJSON = function toJSON() { + RebuildVSchemaGraphRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetShardIsPrimaryServingRequest; + return RebuildVSchemaGraphRequest; })(); - vtctldata.SetShardIsPrimaryServingResponse = (function() { + vtctldata.RebuildVSchemaGraphResponse = (function() { /** - * Properties of a SetShardIsPrimaryServingResponse. + * Properties of a RebuildVSchemaGraphResponse. * @memberof vtctldata - * @interface ISetShardIsPrimaryServingResponse - * @property {topodata.IShard|null} [shard] SetShardIsPrimaryServingResponse shard + * @interface IRebuildVSchemaGraphResponse */ /** - * Constructs a new SetShardIsPrimaryServingResponse. + * Constructs a new RebuildVSchemaGraphResponse. * @memberof vtctldata - * @classdesc Represents a SetShardIsPrimaryServingResponse. - * @implements ISetShardIsPrimaryServingResponse + * @classdesc Represents a RebuildVSchemaGraphResponse. + * @implements IRebuildVSchemaGraphResponse * @constructor - * @param {vtctldata.ISetShardIsPrimaryServingResponse=} [properties] Properties to set + * @param {vtctldata.IRebuildVSchemaGraphResponse=} [properties] Properties to set */ - function SetShardIsPrimaryServingResponse(properties) { + function RebuildVSchemaGraphResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111869,76 +114156,63 @@ $root.vtctldata = (function() { } /** - * SetShardIsPrimaryServingResponse shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.SetShardIsPrimaryServingResponse - * @instance - */ - SetShardIsPrimaryServingResponse.prototype.shard = null; - - /** - * Creates a new SetShardIsPrimaryServingResponse instance using the specified properties. + * Creates a new RebuildVSchemaGraphResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static - * @param {vtctldata.ISetShardIsPrimaryServingResponse=} [properties] Properties to set - * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse instance + * @param {vtctldata.IRebuildVSchemaGraphResponse=} [properties] Properties to set + * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse instance */ - SetShardIsPrimaryServingResponse.create = function create(properties) { - return new SetShardIsPrimaryServingResponse(properties); + RebuildVSchemaGraphResponse.create = function create(properties) { + return new RebuildVSchemaGraphResponse(properties); }; /** - * Encodes the specified SetShardIsPrimaryServingResponse message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. + * Encodes the specified RebuildVSchemaGraphResponse message. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static - * @param {vtctldata.ISetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse message or plain object to encode + * @param {vtctldata.IRebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardIsPrimaryServingResponse.encode = function encode(message, writer) { + RebuildVSchemaGraphResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetShardIsPrimaryServingResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. + * Encodes the specified RebuildVSchemaGraphResponse message, length delimited. Does not implicitly {@link vtctldata.RebuildVSchemaGraphResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static - * @param {vtctldata.ISetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse message or plain object to encode + * @param {vtctldata.IRebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardIsPrimaryServingResponse.encodeDelimited = function encodeDelimited(message, writer) { + RebuildVSchemaGraphResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer. + * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse + * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardIsPrimaryServingResponse.decode = function decode(reader, length) { + RebuildVSchemaGraphResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardIsPrimaryServingResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RebuildVSchemaGraphResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -111948,120 +114222,94 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer, length delimited. + * Decodes a RebuildVSchemaGraphResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse + * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardIsPrimaryServingResponse.decodeDelimited = function decodeDelimited(reader) { + RebuildVSchemaGraphResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetShardIsPrimaryServingResponse message. + * Verifies a RebuildVSchemaGraphResponse message. * @function verify - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetShardIsPrimaryServingResponse.verify = function verify(message) { + RebuildVSchemaGraphResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } return null; }; /** - * Creates a SetShardIsPrimaryServingResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RebuildVSchemaGraphResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse + * @returns {vtctldata.RebuildVSchemaGraphResponse} RebuildVSchemaGraphResponse */ - SetShardIsPrimaryServingResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetShardIsPrimaryServingResponse) + RebuildVSchemaGraphResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RebuildVSchemaGraphResponse) return object; - var message = new $root.vtctldata.SetShardIsPrimaryServingResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.SetShardIsPrimaryServingResponse.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); - } - return message; + return new $root.vtctldata.RebuildVSchemaGraphResponse(); }; /** - * Creates a plain object from a SetShardIsPrimaryServingResponse message. Also converts values to other types if specified. + * Creates a plain object from a RebuildVSchemaGraphResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @static - * @param {vtctldata.SetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse + * @param {vtctldata.RebuildVSchemaGraphResponse} message RebuildVSchemaGraphResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetShardIsPrimaryServingResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.shard = null; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); - return object; + RebuildVSchemaGraphResponse.toObject = function toObject() { + return {}; }; /** - * Converts this SetShardIsPrimaryServingResponse to JSON. + * Converts this RebuildVSchemaGraphResponse to JSON. * @function toJSON - * @memberof vtctldata.SetShardIsPrimaryServingResponse + * @memberof vtctldata.RebuildVSchemaGraphResponse * @instance * @returns {Object.} JSON object */ - SetShardIsPrimaryServingResponse.prototype.toJSON = function toJSON() { + RebuildVSchemaGraphResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetShardIsPrimaryServingResponse; + return RebuildVSchemaGraphResponse; })(); - vtctldata.SetShardTabletControlRequest = (function() { + vtctldata.RefreshStateRequest = (function() { /** - * Properties of a SetShardTabletControlRequest. + * Properties of a RefreshStateRequest. * @memberof vtctldata - * @interface ISetShardTabletControlRequest - * @property {string|null} [keyspace] SetShardTabletControlRequest keyspace - * @property {string|null} [shard] SetShardTabletControlRequest shard - * @property {topodata.TabletType|null} [tablet_type] SetShardTabletControlRequest tablet_type - * @property {Array.|null} [cells] SetShardTabletControlRequest cells - * @property {Array.|null} [denied_tables] SetShardTabletControlRequest denied_tables - * @property {boolean|null} [disable_query_service] SetShardTabletControlRequest disable_query_service - * @property {boolean|null} [remove] SetShardTabletControlRequest remove + * @interface IRefreshStateRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] RefreshStateRequest tablet_alias */ /** - * Constructs a new SetShardTabletControlRequest. + * Constructs a new RefreshStateRequest. * @memberof vtctldata - * @classdesc Represents a SetShardTabletControlRequest. - * @implements ISetShardTabletControlRequest + * @classdesc Represents a RefreshStateRequest. + * @implements IRefreshStateRequest * @constructor - * @param {vtctldata.ISetShardTabletControlRequest=} [properties] Properties to set + * @param {vtctldata.IRefreshStateRequest=} [properties] Properties to set */ - function SetShardTabletControlRequest(properties) { - this.cells = []; - this.denied_tables = []; + function RefreshStateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -112069,159 +114317,75 @@ $root.vtctldata = (function() { } /** - * SetShardTabletControlRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.keyspace = ""; - - /** - * SetShardTabletControlRequest shard. - * @member {string} shard - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.shard = ""; - - /** - * SetShardTabletControlRequest tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.tablet_type = 0; - - /** - * SetShardTabletControlRequest cells. - * @member {Array.} cells - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.cells = $util.emptyArray; - - /** - * SetShardTabletControlRequest denied_tables. - * @member {Array.} denied_tables - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.denied_tables = $util.emptyArray; - - /** - * SetShardTabletControlRequest disable_query_service. - * @member {boolean} disable_query_service - * @memberof vtctldata.SetShardTabletControlRequest - * @instance - */ - SetShardTabletControlRequest.prototype.disable_query_service = false; - - /** - * SetShardTabletControlRequest remove. - * @member {boolean} remove - * @memberof vtctldata.SetShardTabletControlRequest + * RefreshStateRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.RefreshStateRequest * @instance */ - SetShardTabletControlRequest.prototype.remove = false; + RefreshStateRequest.prototype.tablet_alias = null; /** - * Creates a new SetShardTabletControlRequest instance using the specified properties. + * Creates a new RefreshStateRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static - * @param {vtctldata.ISetShardTabletControlRequest=} [properties] Properties to set - * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest instance + * @param {vtctldata.IRefreshStateRequest=} [properties] Properties to set + * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest instance */ - SetShardTabletControlRequest.create = function create(properties) { - return new SetShardTabletControlRequest(properties); + RefreshStateRequest.create = function create(properties) { + return new RefreshStateRequest(properties); }; /** - * Encodes the specified SetShardTabletControlRequest message. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. + * Encodes the specified RefreshStateRequest message. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static - * @param {vtctldata.ISetShardTabletControlRequest} message SetShardTabletControlRequest message or plain object to encode + * @param {vtctldata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardTabletControlRequest.encode = function encode(message, writer) { + RefreshStateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cells[i]); - if (message.denied_tables != null && message.denied_tables.length) - for (var i = 0; i < message.denied_tables.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.denied_tables[i]); - if (message.disable_query_service != null && Object.hasOwnProperty.call(message, "disable_query_service")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disable_query_service); - if (message.remove != null && Object.hasOwnProperty.call(message, "remove")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.remove); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetShardTabletControlRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. + * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static - * @param {vtctldata.ISetShardTabletControlRequest} message SetShardTabletControlRequest message or plain object to encode + * @param {vtctldata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardTabletControlRequest.encodeDelimited = function encodeDelimited(message, writer) { + RefreshStateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetShardTabletControlRequest message from the specified reader or buffer. + * Decodes a RefreshStateRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest + * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardTabletControlRequest.decode = function decode(reader, length) { + RefreshStateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardTabletControlRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.tablet_type = reader.int32(); - break; - case 4: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 5: - if (!(message.denied_tables && message.denied_tables.length)) - message.denied_tables = []; - message.denied_tables.push(reader.string()); - break; - case 6: - message.disable_query_service = reader.bool(); - break; - case 7: - message.remove = reader.bool(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -112232,240 +114396,111 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetShardTabletControlRequest message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest + * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardTabletControlRequest.decodeDelimited = function decodeDelimited(reader) { + RefreshStateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetShardTabletControlRequest message. + * Verifies a RefreshStateRequest message. * @function verify - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetShardTabletControlRequest.verify = function verify(message) { + RefreshStateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.denied_tables != null && message.hasOwnProperty("denied_tables")) { - if (!Array.isArray(message.denied_tables)) - return "denied_tables: array expected"; - for (var i = 0; i < message.denied_tables.length; ++i) - if (!$util.isString(message.denied_tables[i])) - return "denied_tables: string[] expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } - if (message.disable_query_service != null && message.hasOwnProperty("disable_query_service")) - if (typeof message.disable_query_service !== "boolean") - return "disable_query_service: boolean expected"; - if (message.remove != null && message.hasOwnProperty("remove")) - if (typeof message.remove !== "boolean") - return "remove: boolean expected"; return null; }; /** - * Creates a SetShardTabletControlRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest + * @returns {vtctldata.RefreshStateRequest} RefreshStateRequest */ - SetShardTabletControlRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetShardTabletControlRequest) + RefreshStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RefreshStateRequest) return object; - var message = new $root.vtctldata.SetShardTabletControlRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.SetShardTabletControlRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.denied_tables) { - if (!Array.isArray(object.denied_tables)) - throw TypeError(".vtctldata.SetShardTabletControlRequest.denied_tables: array expected"); - message.denied_tables = []; - for (var i = 0; i < object.denied_tables.length; ++i) - message.denied_tables[i] = String(object.denied_tables[i]); + var message = new $root.vtctldata.RefreshStateRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.RefreshStateRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.disable_query_service != null) - message.disable_query_service = Boolean(object.disable_query_service); - if (object.remove != null) - message.remove = Boolean(object.remove); return message; }; /** - * Creates a plain object from a SetShardTabletControlRequest message. Also converts values to other types if specified. + * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @static - * @param {vtctldata.SetShardTabletControlRequest} message SetShardTabletControlRequest + * @param {vtctldata.RefreshStateRequest} message RefreshStateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetShardTabletControlRequest.toObject = function toObject(message, options) { + RefreshStateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.cells = []; - object.denied_tables = []; - } - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.disable_query_service = false; - object.remove = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.denied_tables && message.denied_tables.length) { - object.denied_tables = []; - for (var j = 0; j < message.denied_tables.length; ++j) - object.denied_tables[j] = message.denied_tables[j]; - } - if (message.disable_query_service != null && message.hasOwnProperty("disable_query_service")) - object.disable_query_service = message.disable_query_service; - if (message.remove != null && message.hasOwnProperty("remove")) - object.remove = message.remove; + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this SetShardTabletControlRequest to JSON. + * Converts this RefreshStateRequest to JSON. * @function toJSON - * @memberof vtctldata.SetShardTabletControlRequest + * @memberof vtctldata.RefreshStateRequest * @instance * @returns {Object.} JSON object */ - SetShardTabletControlRequest.prototype.toJSON = function toJSON() { + RefreshStateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetShardTabletControlRequest; + return RefreshStateRequest; })(); - vtctldata.SetShardTabletControlResponse = (function() { + vtctldata.RefreshStateResponse = (function() { /** - * Properties of a SetShardTabletControlResponse. + * Properties of a RefreshStateResponse. * @memberof vtctldata - * @interface ISetShardTabletControlResponse - * @property {topodata.IShard|null} [shard] SetShardTabletControlResponse shard + * @interface IRefreshStateResponse */ /** - * Constructs a new SetShardTabletControlResponse. + * Constructs a new RefreshStateResponse. * @memberof vtctldata - * @classdesc Represents a SetShardTabletControlResponse. - * @implements ISetShardTabletControlResponse + * @classdesc Represents a RefreshStateResponse. + * @implements IRefreshStateResponse * @constructor - * @param {vtctldata.ISetShardTabletControlResponse=} [properties] Properties to set + * @param {vtctldata.IRefreshStateResponse=} [properties] Properties to set */ - function SetShardTabletControlResponse(properties) { + function RefreshStateResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -112473,76 +114508,63 @@ $root.vtctldata = (function() { } /** - * SetShardTabletControlResponse shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.SetShardTabletControlResponse - * @instance - */ - SetShardTabletControlResponse.prototype.shard = null; - - /** - * Creates a new SetShardTabletControlResponse instance using the specified properties. + * Creates a new RefreshStateResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static - * @param {vtctldata.ISetShardTabletControlResponse=} [properties] Properties to set - * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse instance + * @param {vtctldata.IRefreshStateResponse=} [properties] Properties to set + * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse instance */ - SetShardTabletControlResponse.create = function create(properties) { - return new SetShardTabletControlResponse(properties); + RefreshStateResponse.create = function create(properties) { + return new RefreshStateResponse(properties); }; /** - * Encodes the specified SetShardTabletControlResponse message. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. + * Encodes the specified RefreshStateResponse message. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static - * @param {vtctldata.ISetShardTabletControlResponse} message SetShardTabletControlResponse message or plain object to encode + * @param {vtctldata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardTabletControlResponse.encode = function encode(message, writer) { + RefreshStateResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetShardTabletControlResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. + * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static - * @param {vtctldata.ISetShardTabletControlResponse} message SetShardTabletControlResponse message or plain object to encode + * @param {vtctldata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetShardTabletControlResponse.encodeDelimited = function encodeDelimited(message, writer) { + RefreshStateResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetShardTabletControlResponse message from the specified reader or buffer. + * Decodes a RefreshStateResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse + * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardTabletControlResponse.decode = function decode(reader, length) { + RefreshStateResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardTabletControlResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -112552,113 +114574,97 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetShardTabletControlResponse message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse + * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetShardTabletControlResponse.decodeDelimited = function decodeDelimited(reader) { + RefreshStateResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetShardTabletControlResponse message. + * Verifies a RefreshStateResponse message. * @function verify - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetShardTabletControlResponse.verify = function verify(message) { + RefreshStateResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } return null; }; /** - * Creates a SetShardTabletControlResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse + * @returns {vtctldata.RefreshStateResponse} RefreshStateResponse */ - SetShardTabletControlResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetShardTabletControlResponse) + RefreshStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RefreshStateResponse) return object; - var message = new $root.vtctldata.SetShardTabletControlResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.SetShardTabletControlResponse.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); - } - return message; + return new $root.vtctldata.RefreshStateResponse(); }; /** - * Creates a plain object from a SetShardTabletControlResponse message. Also converts values to other types if specified. + * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @static - * @param {vtctldata.SetShardTabletControlResponse} message SetShardTabletControlResponse + * @param {vtctldata.RefreshStateResponse} message RefreshStateResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetShardTabletControlResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.shard = null; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); - return object; + RefreshStateResponse.toObject = function toObject() { + return {}; }; /** - * Converts this SetShardTabletControlResponse to JSON. + * Converts this RefreshStateResponse to JSON. * @function toJSON - * @memberof vtctldata.SetShardTabletControlResponse + * @memberof vtctldata.RefreshStateResponse * @instance * @returns {Object.} JSON object */ - SetShardTabletControlResponse.prototype.toJSON = function toJSON() { + RefreshStateResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetShardTabletControlResponse; + return RefreshStateResponse; })(); - vtctldata.SetWritableRequest = (function() { + vtctldata.RefreshStateByShardRequest = (function() { /** - * Properties of a SetWritableRequest. + * Properties of a RefreshStateByShardRequest. * @memberof vtctldata - * @interface ISetWritableRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] SetWritableRequest tablet_alias - * @property {boolean|null} [writable] SetWritableRequest writable + * @interface IRefreshStateByShardRequest + * @property {string|null} [keyspace] RefreshStateByShardRequest keyspace + * @property {string|null} [shard] RefreshStateByShardRequest shard + * @property {Array.|null} [cells] RefreshStateByShardRequest cells */ /** - * Constructs a new SetWritableRequest. + * Constructs a new RefreshStateByShardRequest. * @memberof vtctldata - * @classdesc Represents a SetWritableRequest. - * @implements ISetWritableRequest + * @classdesc Represents a RefreshStateByShardRequest. + * @implements IRefreshStateByShardRequest * @constructor - * @param {vtctldata.ISetWritableRequest=} [properties] Properties to set + * @param {vtctldata.IRefreshStateByShardRequest=} [properties] Properties to set */ - function SetWritableRequest(properties) { + function RefreshStateByShardRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -112666,88 +114672,104 @@ $root.vtctldata = (function() { } /** - * SetWritableRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.SetWritableRequest + * RefreshStateByShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.RefreshStateByShardRequest * @instance */ - SetWritableRequest.prototype.tablet_alias = null; + RefreshStateByShardRequest.prototype.keyspace = ""; /** - * SetWritableRequest writable. - * @member {boolean} writable - * @memberof vtctldata.SetWritableRequest + * RefreshStateByShardRequest shard. + * @member {string} shard + * @memberof vtctldata.RefreshStateByShardRequest * @instance */ - SetWritableRequest.prototype.writable = false; + RefreshStateByShardRequest.prototype.shard = ""; /** - * Creates a new SetWritableRequest instance using the specified properties. + * RefreshStateByShardRequest cells. + * @member {Array.} cells + * @memberof vtctldata.RefreshStateByShardRequest + * @instance + */ + RefreshStateByShardRequest.prototype.cells = $util.emptyArray; + + /** + * Creates a new RefreshStateByShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static - * @param {vtctldata.ISetWritableRequest=} [properties] Properties to set - * @returns {vtctldata.SetWritableRequest} SetWritableRequest instance + * @param {vtctldata.IRefreshStateByShardRequest=} [properties] Properties to set + * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest instance */ - SetWritableRequest.create = function create(properties) { - return new SetWritableRequest(properties); + RefreshStateByShardRequest.create = function create(properties) { + return new RefreshStateByShardRequest(properties); }; /** - * Encodes the specified SetWritableRequest message. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. + * Encodes the specified RefreshStateByShardRequest message. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static - * @param {vtctldata.ISetWritableRequest} message SetWritableRequest message or plain object to encode + * @param {vtctldata.IRefreshStateByShardRequest} message RefreshStateByShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetWritableRequest.encode = function encode(message, writer) { + RefreshStateByShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.writable != null && Object.hasOwnProperty.call(message, "writable")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.writable); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); return writer; }; /** - * Encodes the specified SetWritableRequest message, length delimited. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. + * Encodes the specified RefreshStateByShardRequest message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static - * @param {vtctldata.ISetWritableRequest} message SetWritableRequest message or plain object to encode + * @param {vtctldata.IRefreshStateByShardRequest} message RefreshStateByShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetWritableRequest.encodeDelimited = function encodeDelimited(message, writer) { + RefreshStateByShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetWritableRequest message from the specified reader or buffer. + * Decodes a RefreshStateByShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetWritableRequest} SetWritableRequest + * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetWritableRequest.decode = function decode(reader, length) { + RefreshStateByShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetWritableRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateByShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.writable = reader.bool(); + message.shard = reader.string(); + break; + case 3: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -112758,120 +114780,138 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetWritableRequest message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateByShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetWritableRequest} SetWritableRequest + * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetWritableRequest.decodeDelimited = function decodeDelimited(reader) { + RefreshStateByShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetWritableRequest message. + * Verifies a RefreshStateByShardRequest message. * @function verify - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetWritableRequest.verify = function verify(message) { + RefreshStateByShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } - if (message.writable != null && message.hasOwnProperty("writable")) - if (typeof message.writable !== "boolean") - return "writable: boolean expected"; return null; }; /** - * Creates a SetWritableRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateByShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetWritableRequest} SetWritableRequest + * @returns {vtctldata.RefreshStateByShardRequest} RefreshStateByShardRequest */ - SetWritableRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetWritableRequest) + RefreshStateByShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RefreshStateByShardRequest) return object; - var message = new $root.vtctldata.SetWritableRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.SetWritableRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + var message = new $root.vtctldata.RefreshStateByShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.RefreshStateByShardRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } - if (object.writable != null) - message.writable = Boolean(object.writable); return message; }; /** - * Creates a plain object from a SetWritableRequest message. Also converts values to other types if specified. + * Creates a plain object from a RefreshStateByShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @static - * @param {vtctldata.SetWritableRequest} message SetWritableRequest + * @param {vtctldata.RefreshStateByShardRequest} message RefreshStateByShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetWritableRequest.toObject = function toObject(message, options) { + RefreshStateByShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.cells = []; if (options.defaults) { - object.tablet_alias = null; - object.writable = false; + object.keyspace = ""; + object.shard = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.writable != null && message.hasOwnProperty("writable")) - object.writable = message.writable; return object; }; /** - * Converts this SetWritableRequest to JSON. + * Converts this RefreshStateByShardRequest to JSON. * @function toJSON - * @memberof vtctldata.SetWritableRequest + * @memberof vtctldata.RefreshStateByShardRequest * @instance * @returns {Object.} JSON object */ - SetWritableRequest.prototype.toJSON = function toJSON() { + RefreshStateByShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetWritableRequest; + return RefreshStateByShardRequest; })(); - vtctldata.SetWritableResponse = (function() { + vtctldata.RefreshStateByShardResponse = (function() { /** - * Properties of a SetWritableResponse. + * Properties of a RefreshStateByShardResponse. * @memberof vtctldata - * @interface ISetWritableResponse + * @interface IRefreshStateByShardResponse + * @property {boolean|null} [is_partial_refresh] RefreshStateByShardResponse is_partial_refresh + * @property {string|null} [partial_refresh_details] RefreshStateByShardResponse partial_refresh_details */ /** - * Constructs a new SetWritableResponse. + * Constructs a new RefreshStateByShardResponse. * @memberof vtctldata - * @classdesc Represents a SetWritableResponse. - * @implements ISetWritableResponse + * @classdesc Represents a RefreshStateByShardResponse. + * @implements IRefreshStateByShardResponse * @constructor - * @param {vtctldata.ISetWritableResponse=} [properties] Properties to set + * @param {vtctldata.IRefreshStateByShardResponse=} [properties] Properties to set */ - function SetWritableResponse(properties) { + function RefreshStateByShardResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -112879,63 +114919,89 @@ $root.vtctldata = (function() { } /** - * Creates a new SetWritableResponse instance using the specified properties. + * RefreshStateByShardResponse is_partial_refresh. + * @member {boolean} is_partial_refresh + * @memberof vtctldata.RefreshStateByShardResponse + * @instance + */ + RefreshStateByShardResponse.prototype.is_partial_refresh = false; + + /** + * RefreshStateByShardResponse partial_refresh_details. + * @member {string} partial_refresh_details + * @memberof vtctldata.RefreshStateByShardResponse + * @instance + */ + RefreshStateByShardResponse.prototype.partial_refresh_details = ""; + + /** + * Creates a new RefreshStateByShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static - * @param {vtctldata.ISetWritableResponse=} [properties] Properties to set - * @returns {vtctldata.SetWritableResponse} SetWritableResponse instance + * @param {vtctldata.IRefreshStateByShardResponse=} [properties] Properties to set + * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse instance */ - SetWritableResponse.create = function create(properties) { - return new SetWritableResponse(properties); + RefreshStateByShardResponse.create = function create(properties) { + return new RefreshStateByShardResponse(properties); }; /** - * Encodes the specified SetWritableResponse message. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. + * Encodes the specified RefreshStateByShardResponse message. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static - * @param {vtctldata.ISetWritableResponse} message SetWritableResponse message or plain object to encode + * @param {vtctldata.IRefreshStateByShardResponse} message RefreshStateByShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetWritableResponse.encode = function encode(message, writer) { + RefreshStateByShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.is_partial_refresh != null && Object.hasOwnProperty.call(message, "is_partial_refresh")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.is_partial_refresh); + if (message.partial_refresh_details != null && Object.hasOwnProperty.call(message, "partial_refresh_details")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.partial_refresh_details); return writer; }; /** - * Encodes the specified SetWritableResponse message, length delimited. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. + * Encodes the specified RefreshStateByShardResponse message, length delimited. Does not implicitly {@link vtctldata.RefreshStateByShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static - * @param {vtctldata.ISetWritableResponse} message SetWritableResponse message or plain object to encode + * @param {vtctldata.IRefreshStateByShardResponse} message RefreshStateByShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetWritableResponse.encodeDelimited = function encodeDelimited(message, writer) { + RefreshStateByShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetWritableResponse message from the specified reader or buffer. + * Decodes a RefreshStateByShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SetWritableResponse} SetWritableResponse + * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetWritableResponse.decode = function decode(reader, length) { + RefreshStateByShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetWritableResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RefreshStateByShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.is_partial_refresh = reader.bool(); + break; + case 2: + message.partial_refresh_details = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -112945,96 +115011,116 @@ $root.vtctldata = (function() { }; /** - * Decodes a SetWritableResponse message from the specified reader or buffer, length delimited. + * Decodes a RefreshStateByShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SetWritableResponse} SetWritableResponse + * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetWritableResponse.decodeDelimited = function decodeDelimited(reader) { + RefreshStateByShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetWritableResponse message. + * Verifies a RefreshStateByShardResponse message. * @function verify - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetWritableResponse.verify = function verify(message) { + RefreshStateByShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.is_partial_refresh != null && message.hasOwnProperty("is_partial_refresh")) + if (typeof message.is_partial_refresh !== "boolean") + return "is_partial_refresh: boolean expected"; + if (message.partial_refresh_details != null && message.hasOwnProperty("partial_refresh_details")) + if (!$util.isString(message.partial_refresh_details)) + return "partial_refresh_details: string expected"; return null; }; /** - * Creates a SetWritableResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RefreshStateByShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SetWritableResponse} SetWritableResponse + * @returns {vtctldata.RefreshStateByShardResponse} RefreshStateByShardResponse */ - SetWritableResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SetWritableResponse) + RefreshStateByShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RefreshStateByShardResponse) return object; - return new $root.vtctldata.SetWritableResponse(); + var message = new $root.vtctldata.RefreshStateByShardResponse(); + if (object.is_partial_refresh != null) + message.is_partial_refresh = Boolean(object.is_partial_refresh); + if (object.partial_refresh_details != null) + message.partial_refresh_details = String(object.partial_refresh_details); + return message; }; /** - * Creates a plain object from a SetWritableResponse message. Also converts values to other types if specified. + * Creates a plain object from a RefreshStateByShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @static - * @param {vtctldata.SetWritableResponse} message SetWritableResponse + * @param {vtctldata.RefreshStateByShardResponse} message RefreshStateByShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetWritableResponse.toObject = function toObject() { - return {}; + RefreshStateByShardResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.is_partial_refresh = false; + object.partial_refresh_details = ""; + } + if (message.is_partial_refresh != null && message.hasOwnProperty("is_partial_refresh")) + object.is_partial_refresh = message.is_partial_refresh; + if (message.partial_refresh_details != null && message.hasOwnProperty("partial_refresh_details")) + object.partial_refresh_details = message.partial_refresh_details; + return object; }; /** - * Converts this SetWritableResponse to JSON. + * Converts this RefreshStateByShardResponse to JSON. * @function toJSON - * @memberof vtctldata.SetWritableResponse + * @memberof vtctldata.RefreshStateByShardResponse * @instance * @returns {Object.} JSON object */ - SetWritableResponse.prototype.toJSON = function toJSON() { + RefreshStateByShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetWritableResponse; + return RefreshStateByShardResponse; })(); - vtctldata.ShardReplicationAddRequest = (function() { + vtctldata.ReloadSchemaRequest = (function() { /** - * Properties of a ShardReplicationAddRequest. + * Properties of a ReloadSchemaRequest. * @memberof vtctldata - * @interface IShardReplicationAddRequest - * @property {string|null} [keyspace] ShardReplicationAddRequest keyspace - * @property {string|null} [shard] ShardReplicationAddRequest shard - * @property {topodata.ITabletAlias|null} [tablet_alias] ShardReplicationAddRequest tablet_alias + * @interface IReloadSchemaRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] ReloadSchemaRequest tablet_alias */ /** - * Constructs a new ShardReplicationAddRequest. + * Constructs a new ReloadSchemaRequest. * @memberof vtctldata - * @classdesc Represents a ShardReplicationAddRequest. - * @implements IShardReplicationAddRequest + * @classdesc Represents a ReloadSchemaRequest. + * @implements IReloadSchemaRequest * @constructor - * @param {vtctldata.IShardReplicationAddRequest=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaRequest=} [properties] Properties to set */ - function ShardReplicationAddRequest(properties) { + function ReloadSchemaRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113042,100 +115128,74 @@ $root.vtctldata = (function() { } /** - * ShardReplicationAddRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ShardReplicationAddRequest - * @instance - */ - ShardReplicationAddRequest.prototype.keyspace = ""; - - /** - * ShardReplicationAddRequest shard. - * @member {string} shard - * @memberof vtctldata.ShardReplicationAddRequest - * @instance - */ - ShardReplicationAddRequest.prototype.shard = ""; - - /** - * ShardReplicationAddRequest tablet_alias. + * ReloadSchemaRequest tablet_alias. * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @instance */ - ShardReplicationAddRequest.prototype.tablet_alias = null; + ReloadSchemaRequest.prototype.tablet_alias = null; /** - * Creates a new ShardReplicationAddRequest instance using the specified properties. + * Creates a new ReloadSchemaRequest instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static - * @param {vtctldata.IShardReplicationAddRequest=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest instance + * @param {vtctldata.IReloadSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest instance */ - ShardReplicationAddRequest.create = function create(properties) { - return new ShardReplicationAddRequest(properties); + ReloadSchemaRequest.create = function create(properties) { + return new ReloadSchemaRequest(properties); }; /** - * Encodes the specified ShardReplicationAddRequest message. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static - * @param {vtctldata.IShardReplicationAddRequest} message ShardReplicationAddRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationAddRequest.encode = function encode(message, writer) { + ReloadSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ShardReplicationAddRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static - * @param {vtctldata.IShardReplicationAddRequest} message ShardReplicationAddRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationAddRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationAddRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest + * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationAddRequest.decode = function decode(reader, length) { + ReloadSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationAddRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: @@ -113147,38 +115207,32 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationAddRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest + * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationAddRequest.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationAddRequest message. + * Verifies a ReloadSchemaRequest message. * @function verify - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationAddRequest.verify = function verify(message) { + ReloadSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { var error = $root.topodata.TabletAlias.verify(message.tablet_alias); if (error) @@ -113188,87 +115242,76 @@ $root.vtctldata = (function() { }; /** - * Creates a ShardReplicationAddRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest + * @returns {vtctldata.ReloadSchemaRequest} ReloadSchemaRequest */ - ShardReplicationAddRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationAddRequest) + ReloadSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaRequest) return object; - var message = new $root.vtctldata.ShardReplicationAddRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); + var message = new $root.vtctldata.ReloadSchemaRequest(); if (object.tablet_alias != null) { if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ShardReplicationAddRequest.tablet_alias: object expected"); + throw TypeError(".vtctldata.ReloadSchemaRequest.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a ShardReplicationAddRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @static - * @param {vtctldata.ShardReplicationAddRequest} message ShardReplicationAddRequest + * @param {vtctldata.ReloadSchemaRequest} message ReloadSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationAddRequest.toObject = function toObject(message, options) { + ReloadSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; + if (options.defaults) object.tablet_alias = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ShardReplicationAddRequest to JSON. + * Converts this ReloadSchemaRequest to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationAddRequest + * @memberof vtctldata.ReloadSchemaRequest * @instance * @returns {Object.} JSON object */ - ShardReplicationAddRequest.prototype.toJSON = function toJSON() { + ReloadSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationAddRequest; + return ReloadSchemaRequest; })(); - vtctldata.ShardReplicationAddResponse = (function() { + vtctldata.ReloadSchemaResponse = (function() { /** - * Properties of a ShardReplicationAddResponse. + * Properties of a ReloadSchemaResponse. * @memberof vtctldata - * @interface IShardReplicationAddResponse + * @interface IReloadSchemaResponse */ /** - * Constructs a new ShardReplicationAddResponse. + * Constructs a new ReloadSchemaResponse. * @memberof vtctldata - * @classdesc Represents a ShardReplicationAddResponse. - * @implements IShardReplicationAddResponse + * @classdesc Represents a ReloadSchemaResponse. + * @implements IReloadSchemaResponse * @constructor - * @param {vtctldata.IShardReplicationAddResponse=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaResponse=} [properties] Properties to set */ - function ShardReplicationAddResponse(properties) { + function ReloadSchemaResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113276,60 +115319,60 @@ $root.vtctldata = (function() { } /** - * Creates a new ShardReplicationAddResponse instance using the specified properties. + * Creates a new ReloadSchemaResponse instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static - * @param {vtctldata.IShardReplicationAddResponse=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse instance + * @param {vtctldata.IReloadSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse instance */ - ShardReplicationAddResponse.create = function create(properties) { - return new ShardReplicationAddResponse(properties); + ReloadSchemaResponse.create = function create(properties) { + return new ReloadSchemaResponse(properties); }; /** - * Encodes the specified ShardReplicationAddResponse message. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static - * @param {vtctldata.IShardReplicationAddResponse} message ShardReplicationAddResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationAddResponse.encode = function encode(message, writer) { + ReloadSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified ShardReplicationAddResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static - * @param {vtctldata.IShardReplicationAddResponse} message ShardReplicationAddResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationAddResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationAddResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse + * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationAddResponse.decode = function decode(reader, length) { + ReloadSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationAddResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -113342,96 +115385,97 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationAddResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse + * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationAddResponse.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationAddResponse message. + * Verifies a ReloadSchemaResponse message. * @function verify - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationAddResponse.verify = function verify(message) { + ReloadSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a ShardReplicationAddResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse + * @returns {vtctldata.ReloadSchemaResponse} ReloadSchemaResponse */ - ShardReplicationAddResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationAddResponse) + ReloadSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaResponse) return object; - return new $root.vtctldata.ShardReplicationAddResponse(); + return new $root.vtctldata.ReloadSchemaResponse(); }; /** - * Creates a plain object from a ShardReplicationAddResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @static - * @param {vtctldata.ShardReplicationAddResponse} message ShardReplicationAddResponse + * @param {vtctldata.ReloadSchemaResponse} message ReloadSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationAddResponse.toObject = function toObject() { + ReloadSchemaResponse.toObject = function toObject() { return {}; }; /** - * Converts this ShardReplicationAddResponse to JSON. + * Converts this ReloadSchemaResponse to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationAddResponse + * @memberof vtctldata.ReloadSchemaResponse * @instance * @returns {Object.} JSON object */ - ShardReplicationAddResponse.prototype.toJSON = function toJSON() { + ReloadSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationAddResponse; + return ReloadSchemaResponse; })(); - vtctldata.ShardReplicationFixRequest = (function() { + vtctldata.ReloadSchemaKeyspaceRequest = (function() { /** - * Properties of a ShardReplicationFixRequest. + * Properties of a ReloadSchemaKeyspaceRequest. * @memberof vtctldata - * @interface IShardReplicationFixRequest - * @property {string|null} [keyspace] ShardReplicationFixRequest keyspace - * @property {string|null} [shard] ShardReplicationFixRequest shard - * @property {string|null} [cell] ShardReplicationFixRequest cell + * @interface IReloadSchemaKeyspaceRequest + * @property {string|null} [keyspace] ReloadSchemaKeyspaceRequest keyspace + * @property {string|null} [wait_position] ReloadSchemaKeyspaceRequest wait_position + * @property {boolean|null} [include_primary] ReloadSchemaKeyspaceRequest include_primary + * @property {number|null} [concurrency] ReloadSchemaKeyspaceRequest concurrency */ /** - * Constructs a new ShardReplicationFixRequest. + * Constructs a new ReloadSchemaKeyspaceRequest. * @memberof vtctldata - * @classdesc Represents a ShardReplicationFixRequest. - * @implements IShardReplicationFixRequest + * @classdesc Represents a ReloadSchemaKeyspaceRequest. + * @implements IReloadSchemaKeyspaceRequest * @constructor - * @param {vtctldata.IShardReplicationFixRequest=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaKeyspaceRequest=} [properties] Properties to set */ - function ShardReplicationFixRequest(properties) { + function ReloadSchemaKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113439,90 +115483,100 @@ $root.vtctldata = (function() { } /** - * ShardReplicationFixRequest keyspace. + * ReloadSchemaKeyspaceRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @instance */ - ShardReplicationFixRequest.prototype.keyspace = ""; + ReloadSchemaKeyspaceRequest.prototype.keyspace = ""; /** - * ShardReplicationFixRequest shard. - * @member {string} shard - * @memberof vtctldata.ShardReplicationFixRequest + * ReloadSchemaKeyspaceRequest wait_position. + * @member {string} wait_position + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @instance */ - ShardReplicationFixRequest.prototype.shard = ""; + ReloadSchemaKeyspaceRequest.prototype.wait_position = ""; /** - * ShardReplicationFixRequest cell. - * @member {string} cell - * @memberof vtctldata.ShardReplicationFixRequest + * ReloadSchemaKeyspaceRequest include_primary. + * @member {boolean} include_primary + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @instance */ - ShardReplicationFixRequest.prototype.cell = ""; + ReloadSchemaKeyspaceRequest.prototype.include_primary = false; /** - * Creates a new ShardReplicationFixRequest instance using the specified properties. + * ReloadSchemaKeyspaceRequest concurrency. + * @member {number} concurrency + * @memberof vtctldata.ReloadSchemaKeyspaceRequest + * @instance + */ + ReloadSchemaKeyspaceRequest.prototype.concurrency = 0; + + /** + * Creates a new ReloadSchemaKeyspaceRequest instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static - * @param {vtctldata.IShardReplicationFixRequest=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest instance + * @param {vtctldata.IReloadSchemaKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest instance */ - ShardReplicationFixRequest.create = function create(properties) { - return new ShardReplicationFixRequest(properties); + ReloadSchemaKeyspaceRequest.create = function create(properties) { + return new ReloadSchemaKeyspaceRequest(properties); }; /** - * Encodes the specified ShardReplicationFixRequest message. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static - * @param {vtctldata.IShardReplicationFixRequest} message ShardReplicationFixRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationFixRequest.encode = function encode(message, writer) { + ReloadSchemaKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); + if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.wait_position); + if (message.include_primary != null && Object.hasOwnProperty.call(message, "include_primary")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.include_primary); + if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.concurrency); return writer; }; /** - * Encodes the specified ShardReplicationFixRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static - * @param {vtctldata.IShardReplicationFixRequest} message ShardReplicationFixRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationFixRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationFixRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest + * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationFixRequest.decode = function decode(reader, length) { + ReloadSchemaKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationFixRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -113530,10 +115584,13 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - message.shard = reader.string(); + message.wait_position = reader.string(); break; case 3: - message.cell = reader.string(); + message.include_primary = reader.bool(); + break; + case 4: + message.concurrency = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -113544,124 +115601,133 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationFixRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest + * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationFixRequest.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationFixRequest message. + * Verifies a ReloadSchemaKeyspaceRequest message. * @function verify - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationFixRequest.verify = function verify(message) { + ReloadSchemaKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; + if (message.wait_position != null && message.hasOwnProperty("wait_position")) + if (!$util.isString(message.wait_position)) + return "wait_position: string expected"; + if (message.include_primary != null && message.hasOwnProperty("include_primary")) + if (typeof message.include_primary !== "boolean") + return "include_primary: boolean expected"; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (!$util.isInteger(message.concurrency)) + return "concurrency: integer expected"; return null; }; /** - * Creates a ShardReplicationFixRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest + * @returns {vtctldata.ReloadSchemaKeyspaceRequest} ReloadSchemaKeyspaceRequest */ - ShardReplicationFixRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationFixRequest) + ReloadSchemaKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaKeyspaceRequest) return object; - var message = new $root.vtctldata.ShardReplicationFixRequest(); + var message = new $root.vtctldata.ReloadSchemaKeyspaceRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cell != null) - message.cell = String(object.cell); + if (object.wait_position != null) + message.wait_position = String(object.wait_position); + if (object.include_primary != null) + message.include_primary = Boolean(object.include_primary); + if (object.concurrency != null) + message.concurrency = object.concurrency >>> 0; return message; }; /** - * Creates a plain object from a ShardReplicationFixRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @static - * @param {vtctldata.ShardReplicationFixRequest} message ShardReplicationFixRequest + * @param {vtctldata.ReloadSchemaKeyspaceRequest} message ReloadSchemaKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationFixRequest.toObject = function toObject(message, options) { + ReloadSchemaKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.keyspace = ""; - object.shard = ""; - object.cell = ""; + object.wait_position = ""; + object.include_primary = false; + object.concurrency = 0; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; + if (message.wait_position != null && message.hasOwnProperty("wait_position")) + object.wait_position = message.wait_position; + if (message.include_primary != null && message.hasOwnProperty("include_primary")) + object.include_primary = message.include_primary; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + object.concurrency = message.concurrency; return object; }; /** - * Converts this ShardReplicationFixRequest to JSON. + * Converts this ReloadSchemaKeyspaceRequest to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationFixRequest + * @memberof vtctldata.ReloadSchemaKeyspaceRequest * @instance * @returns {Object.} JSON object */ - ShardReplicationFixRequest.prototype.toJSON = function toJSON() { + ReloadSchemaKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationFixRequest; + return ReloadSchemaKeyspaceRequest; })(); - vtctldata.ShardReplicationFixResponse = (function() { + vtctldata.ReloadSchemaKeyspaceResponse = (function() { /** - * Properties of a ShardReplicationFixResponse. + * Properties of a ReloadSchemaKeyspaceResponse. * @memberof vtctldata - * @interface IShardReplicationFixResponse - * @property {topodata.IShardReplicationError|null} [error] ShardReplicationFixResponse error + * @interface IReloadSchemaKeyspaceResponse + * @property {Array.|null} [events] ReloadSchemaKeyspaceResponse events */ /** - * Constructs a new ShardReplicationFixResponse. + * Constructs a new ReloadSchemaKeyspaceResponse. * @memberof vtctldata - * @classdesc Represents a ShardReplicationFixResponse. - * @implements IShardReplicationFixResponse + * @classdesc Represents a ReloadSchemaKeyspaceResponse. + * @implements IReloadSchemaKeyspaceResponse * @constructor - * @param {vtctldata.IShardReplicationFixResponse=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaKeyspaceResponse=} [properties] Properties to set */ - function ShardReplicationFixResponse(properties) { + function ReloadSchemaKeyspaceResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113669,75 +115735,78 @@ $root.vtctldata = (function() { } /** - * ShardReplicationFixResponse error. - * @member {topodata.IShardReplicationError|null|undefined} error - * @memberof vtctldata.ShardReplicationFixResponse + * ReloadSchemaKeyspaceResponse events. + * @member {Array.} events + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @instance */ - ShardReplicationFixResponse.prototype.error = null; + ReloadSchemaKeyspaceResponse.prototype.events = $util.emptyArray; /** - * Creates a new ShardReplicationFixResponse instance using the specified properties. + * Creates a new ReloadSchemaKeyspaceResponse instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static - * @param {vtctldata.IShardReplicationFixResponse=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse instance + * @param {vtctldata.IReloadSchemaKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse instance */ - ShardReplicationFixResponse.create = function create(properties) { - return new ShardReplicationFixResponse(properties); + ReloadSchemaKeyspaceResponse.create = function create(properties) { + return new ReloadSchemaKeyspaceResponse(properties); }; /** - * Encodes the specified ShardReplicationFixResponse message. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static - * @param {vtctldata.IShardReplicationFixResponse} message ShardReplicationFixResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationFixResponse.encode = function encode(message, writer) { + ReloadSchemaKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.topodata.ShardReplicationError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ShardReplicationFixResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static - * @param {vtctldata.IShardReplicationFixResponse} message ShardReplicationFixResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationFixResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationFixResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse + * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationFixResponse.decode = function decode(reader, length) { + ReloadSchemaKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationFixResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaKeyspaceResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.topodata.ShardReplicationError.decode(reader, reader.uint32()); + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -113748,113 +115817,128 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationFixResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse + * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationFixResponse.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationFixResponse message. + * Verifies a ReloadSchemaKeyspaceResponse message. * @function verify - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationFixResponse.verify = function verify(message) { + ReloadSchemaKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.topodata.ShardReplicationError.verify(message.error); - if (error) - return "error." + error; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.logutil.Event.verify(message.events[i]); + if (error) + return "events." + error; + } } return null; }; /** - * Creates a ShardReplicationFixResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse + * @returns {vtctldata.ReloadSchemaKeyspaceResponse} ReloadSchemaKeyspaceResponse */ - ShardReplicationFixResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationFixResponse) + ReloadSchemaKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaKeyspaceResponse) return object; - var message = new $root.vtctldata.ShardReplicationFixResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".vtctldata.ShardReplicationFixResponse.error: object expected"); - message.error = $root.topodata.ShardReplicationError.fromObject(object.error); + var message = new $root.vtctldata.ReloadSchemaKeyspaceResponse(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.ReloadSchemaKeyspaceResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.ReloadSchemaKeyspaceResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); + } } return message; }; /** - * Creates a plain object from a ShardReplicationFixResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @static - * @param {vtctldata.ShardReplicationFixResponse} message ShardReplicationFixResponse + * @param {vtctldata.ReloadSchemaKeyspaceResponse} message ReloadSchemaKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationFixResponse.toObject = function toObject(message, options) { + ReloadSchemaKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.error = null; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.topodata.ShardReplicationError.toObject(message.error, options); + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); + } return object; }; /** - * Converts this ShardReplicationFixResponse to JSON. + * Converts this ReloadSchemaKeyspaceResponse to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationFixResponse + * @memberof vtctldata.ReloadSchemaKeyspaceResponse * @instance * @returns {Object.} JSON object */ - ShardReplicationFixResponse.prototype.toJSON = function toJSON() { + ReloadSchemaKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationFixResponse; + return ReloadSchemaKeyspaceResponse; })(); - vtctldata.ShardReplicationPositionsRequest = (function() { + vtctldata.ReloadSchemaShardRequest = (function() { /** - * Properties of a ShardReplicationPositionsRequest. + * Properties of a ReloadSchemaShardRequest. * @memberof vtctldata - * @interface IShardReplicationPositionsRequest - * @property {string|null} [keyspace] ShardReplicationPositionsRequest keyspace - * @property {string|null} [shard] ShardReplicationPositionsRequest shard + * @interface IReloadSchemaShardRequest + * @property {string|null} [keyspace] ReloadSchemaShardRequest keyspace + * @property {string|null} [shard] ReloadSchemaShardRequest shard + * @property {string|null} [wait_position] ReloadSchemaShardRequest wait_position + * @property {boolean|null} [include_primary] ReloadSchemaShardRequest include_primary + * @property {number|null} [concurrency] ReloadSchemaShardRequest concurrency */ /** - * Constructs a new ShardReplicationPositionsRequest. + * Constructs a new ReloadSchemaShardRequest. * @memberof vtctldata - * @classdesc Represents a ShardReplicationPositionsRequest. - * @implements IShardReplicationPositionsRequest + * @classdesc Represents a ReloadSchemaShardRequest. + * @implements IReloadSchemaShardRequest * @constructor - * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaShardRequest=} [properties] Properties to set */ - function ShardReplicationPositionsRequest(properties) { + function ReloadSchemaShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113862,80 +115946,110 @@ $root.vtctldata = (function() { } /** - * ShardReplicationPositionsRequest keyspace. + * ReloadSchemaShardRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @instance */ - ShardReplicationPositionsRequest.prototype.keyspace = ""; + ReloadSchemaShardRequest.prototype.keyspace = ""; /** - * ShardReplicationPositionsRequest shard. + * ReloadSchemaShardRequest shard. * @member {string} shard - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @instance */ - ShardReplicationPositionsRequest.prototype.shard = ""; + ReloadSchemaShardRequest.prototype.shard = ""; /** - * Creates a new ShardReplicationPositionsRequest instance using the specified properties. + * ReloadSchemaShardRequest wait_position. + * @member {string} wait_position + * @memberof vtctldata.ReloadSchemaShardRequest + * @instance + */ + ReloadSchemaShardRequest.prototype.wait_position = ""; + + /** + * ReloadSchemaShardRequest include_primary. + * @member {boolean} include_primary + * @memberof vtctldata.ReloadSchemaShardRequest + * @instance + */ + ReloadSchemaShardRequest.prototype.include_primary = false; + + /** + * ReloadSchemaShardRequest concurrency. + * @member {number} concurrency + * @memberof vtctldata.ReloadSchemaShardRequest + * @instance + */ + ReloadSchemaShardRequest.prototype.concurrency = 0; + + /** + * Creates a new ReloadSchemaShardRequest instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static - * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest instance + * @param {vtctldata.IReloadSchemaShardRequest=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest instance */ - ShardReplicationPositionsRequest.create = function create(properties) { - return new ShardReplicationPositionsRequest(properties); + ReloadSchemaShardRequest.create = function create(properties) { + return new ReloadSchemaShardRequest(properties); }; /** - * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaShardRequest message. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static - * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaShardRequest} message ReloadSchemaShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationPositionsRequest.encode = function encode(message, writer) { + ReloadSchemaShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.wait_position); + if (message.include_primary != null && Object.hasOwnProperty.call(message, "include_primary")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_primary); + if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.concurrency); return writer; }; /** - * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. + * Encodes the specified ReloadSchemaShardRequest message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static - * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode + * @param {vtctldata.IReloadSchemaShardRequest} message ReloadSchemaShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationPositionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. + * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest + * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationPositionsRequest.decode = function decode(reader, length) { + ReloadSchemaShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -113945,6 +116059,15 @@ $root.vtctldata = (function() { case 2: message.shard = reader.string(); break; + case 3: + message.wait_position = reader.string(); + break; + case 4: + message.include_primary = reader.bool(); + break; + case 5: + message.concurrency = reader.uint32(); + break; default: reader.skipType(tag & 7); break; @@ -113954,30 +116077,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest + * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationPositionsRequest.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationPositionsRequest message. + * Verifies a ReloadSchemaShardRequest message. * @function verify - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationPositionsRequest.verify = function verify(message) { + ReloadSchemaShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) @@ -113986,87 +116109,109 @@ $root.vtctldata = (function() { if (message.shard != null && message.hasOwnProperty("shard")) if (!$util.isString(message.shard)) return "shard: string expected"; + if (message.wait_position != null && message.hasOwnProperty("wait_position")) + if (!$util.isString(message.wait_position)) + return "wait_position: string expected"; + if (message.include_primary != null && message.hasOwnProperty("include_primary")) + if (typeof message.include_primary !== "boolean") + return "include_primary: boolean expected"; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + if (!$util.isInteger(message.concurrency)) + return "concurrency: integer expected"; return null; }; /** - * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest + * @returns {vtctldata.ReloadSchemaShardRequest} ReloadSchemaShardRequest */ - ShardReplicationPositionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationPositionsRequest) + ReloadSchemaShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaShardRequest) return object; - var message = new $root.vtctldata.ShardReplicationPositionsRequest(); + var message = new $root.vtctldata.ReloadSchemaShardRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); + if (object.wait_position != null) + message.wait_position = String(object.wait_position); + if (object.include_primary != null) + message.include_primary = Boolean(object.include_primary); + if (object.concurrency != null) + message.concurrency = object.concurrency >>> 0; return message; }; /** - * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @static - * @param {vtctldata.ShardReplicationPositionsRequest} message ShardReplicationPositionsRequest + * @param {vtctldata.ReloadSchemaShardRequest} message ReloadSchemaShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationPositionsRequest.toObject = function toObject(message, options) { + ReloadSchemaShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.keyspace = ""; object.shard = ""; + object.wait_position = ""; + object.include_primary = false; + object.concurrency = 0; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) object.shard = message.shard; + if (message.wait_position != null && message.hasOwnProperty("wait_position")) + object.wait_position = message.wait_position; + if (message.include_primary != null && message.hasOwnProperty("include_primary")) + object.include_primary = message.include_primary; + if (message.concurrency != null && message.hasOwnProperty("concurrency")) + object.concurrency = message.concurrency; return object; }; /** - * Converts this ShardReplicationPositionsRequest to JSON. + * Converts this ReloadSchemaShardRequest to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationPositionsRequest + * @memberof vtctldata.ReloadSchemaShardRequest * @instance * @returns {Object.} JSON object */ - ShardReplicationPositionsRequest.prototype.toJSON = function toJSON() { + ReloadSchemaShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationPositionsRequest; + return ReloadSchemaShardRequest; })(); - vtctldata.ShardReplicationPositionsResponse = (function() { + vtctldata.ReloadSchemaShardResponse = (function() { /** - * Properties of a ShardReplicationPositionsResponse. + * Properties of a ReloadSchemaShardResponse. * @memberof vtctldata - * @interface IShardReplicationPositionsResponse - * @property {Object.|null} [replication_statuses] ShardReplicationPositionsResponse replication_statuses - * @property {Object.|null} [tablet_map] ShardReplicationPositionsResponse tablet_map + * @interface IReloadSchemaShardResponse + * @property {Array.|null} [events] ReloadSchemaShardResponse events */ /** - * Constructs a new ShardReplicationPositionsResponse. + * Constructs a new ReloadSchemaShardResponse. * @memberof vtctldata - * @classdesc Represents a ShardReplicationPositionsResponse. - * @implements IShardReplicationPositionsResponse + * @classdesc Represents a ReloadSchemaShardResponse. + * @implements IReloadSchemaShardResponse * @constructor - * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set + * @param {vtctldata.IReloadSchemaShardResponse=} [properties] Properties to set */ - function ShardReplicationPositionsResponse(properties) { - this.replication_statuses = {}; - this.tablet_map = {}; + function ReloadSchemaShardResponse(properties) { + this.events = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114074,132 +116219,78 @@ $root.vtctldata = (function() { } /** - * ShardReplicationPositionsResponse replication_statuses. - * @member {Object.} replication_statuses - * @memberof vtctldata.ShardReplicationPositionsResponse - * @instance - */ - ShardReplicationPositionsResponse.prototype.replication_statuses = $util.emptyObject; - - /** - * ShardReplicationPositionsResponse tablet_map. - * @member {Object.} tablet_map - * @memberof vtctldata.ShardReplicationPositionsResponse + * ReloadSchemaShardResponse events. + * @member {Array.} events + * @memberof vtctldata.ReloadSchemaShardResponse * @instance */ - ShardReplicationPositionsResponse.prototype.tablet_map = $util.emptyObject; + ReloadSchemaShardResponse.prototype.events = $util.emptyArray; /** - * Creates a new ShardReplicationPositionsResponse instance using the specified properties. + * Creates a new ReloadSchemaShardResponse instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static - * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse instance + * @param {vtctldata.IReloadSchemaShardResponse=} [properties] Properties to set + * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse instance */ - ShardReplicationPositionsResponse.create = function create(properties) { - return new ShardReplicationPositionsResponse(properties); + ReloadSchemaShardResponse.create = function create(properties) { + return new ReloadSchemaShardResponse(properties); }; /** - * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaShardResponse message. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static - * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaShardResponse} message ReloadSchemaShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationPositionsResponse.encode = function encode(message, writer) { + ReloadSchemaShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.replication_statuses != null && Object.hasOwnProperty.call(message, "replication_statuses")) - for (var keys = Object.keys(message.replication_statuses), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.replicationdata.Status.encode(message.replication_statuses[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.tablet_map != null && Object.hasOwnProperty.call(message, "tablet_map")) - for (var keys = Object.keys(message.tablet_map), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.Tablet.encode(message.tablet_map[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. + * Encodes the specified ReloadSchemaShardResponse message, length delimited. Does not implicitly {@link vtctldata.ReloadSchemaShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static - * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode + * @param {vtctldata.IReloadSchemaShardResponse} message ReloadSchemaShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationPositionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReloadSchemaShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. + * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse + * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationPositionsResponse.decode = function decode(reader, length) { + ReloadSchemaShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReloadSchemaShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.replication_statuses === $util.emptyObject) - message.replication_statuses = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.replication_statuses[key] = value; - break; case 2: - if (message.tablet_map === $util.emptyObject) - message.tablet_map = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tablet_map[key] = value; + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.logutil.Event.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -114210,155 +116301,126 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadSchemaShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse + * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationPositionsResponse.decodeDelimited = function decodeDelimited(reader) { + ReloadSchemaShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationPositionsResponse message. + * Verifies a ReloadSchemaShardResponse message. * @function verify - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationPositionsResponse.verify = function verify(message) { + ReloadSchemaShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.replication_statuses != null && message.hasOwnProperty("replication_statuses")) { - if (!$util.isObject(message.replication_statuses)) - return "replication_statuses: object expected"; - var key = Object.keys(message.replication_statuses); - for (var i = 0; i < key.length; ++i) { - var error = $root.replicationdata.Status.verify(message.replication_statuses[key[i]]); - if (error) - return "replication_statuses." + error; - } - } - if (message.tablet_map != null && message.hasOwnProperty("tablet_map")) { - if (!$util.isObject(message.tablet_map)) - return "tablet_map: object expected"; - var key = Object.keys(message.tablet_map); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.Tablet.verify(message.tablet_map[key[i]]); + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.logutil.Event.verify(message.events[i]); if (error) - return "tablet_map." + error; + return "events." + error; } } return null; }; /** - * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadSchemaShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse + * @returns {vtctldata.ReloadSchemaShardResponse} ReloadSchemaShardResponse */ - ShardReplicationPositionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationPositionsResponse) + ReloadSchemaShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReloadSchemaShardResponse) return object; - var message = new $root.vtctldata.ShardReplicationPositionsResponse(); - if (object.replication_statuses) { - if (typeof object.replication_statuses !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); - message.replication_statuses = {}; - for (var keys = Object.keys(object.replication_statuses), i = 0; i < keys.length; ++i) { - if (typeof object.replication_statuses[keys[i]] !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); - message.replication_statuses[keys[i]] = $root.replicationdata.Status.fromObject(object.replication_statuses[keys[i]]); - } - } - if (object.tablet_map) { - if (typeof object.tablet_map !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); - message.tablet_map = {}; - for (var keys = Object.keys(object.tablet_map), i = 0; i < keys.length; ++i) { - if (typeof object.tablet_map[keys[i]] !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); - message.tablet_map[keys[i]] = $root.topodata.Tablet.fromObject(object.tablet_map[keys[i]]); + var message = new $root.vtctldata.ReloadSchemaShardResponse(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".vtctldata.ReloadSchemaShardResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".vtctldata.ReloadSchemaShardResponse.events: object expected"); + message.events[i] = $root.logutil.Event.fromObject(object.events[i]); } } return message; }; /** - * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReloadSchemaShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @static - * @param {vtctldata.ShardReplicationPositionsResponse} message ShardReplicationPositionsResponse + * @param {vtctldata.ReloadSchemaShardResponse} message ReloadSchemaShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationPositionsResponse.toObject = function toObject(message, options) { + ReloadSchemaShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.replication_statuses = {}; - object.tablet_map = {}; - } - var keys2; - if (message.replication_statuses && (keys2 = Object.keys(message.replication_statuses)).length) { - object.replication_statuses = {}; - for (var j = 0; j < keys2.length; ++j) - object.replication_statuses[keys2[j]] = $root.replicationdata.Status.toObject(message.replication_statuses[keys2[j]], options); - } - if (message.tablet_map && (keys2 = Object.keys(message.tablet_map)).length) { - object.tablet_map = {}; - for (var j = 0; j < keys2.length; ++j) - object.tablet_map[keys2[j]] = $root.topodata.Tablet.toObject(message.tablet_map[keys2[j]], options); + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.logutil.Event.toObject(message.events[j], options); } return object; }; /** - * Converts this ShardReplicationPositionsResponse to JSON. + * Converts this ReloadSchemaShardResponse to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationPositionsResponse + * @memberof vtctldata.ReloadSchemaShardResponse * @instance * @returns {Object.} JSON object */ - ShardReplicationPositionsResponse.prototype.toJSON = function toJSON() { + ReloadSchemaShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationPositionsResponse; + return ReloadSchemaShardResponse; })(); - vtctldata.ShardReplicationRemoveRequest = (function() { + vtctldata.RemoveBackupRequest = (function() { /** - * Properties of a ShardReplicationRemoveRequest. + * Properties of a RemoveBackupRequest. * @memberof vtctldata - * @interface IShardReplicationRemoveRequest - * @property {string|null} [keyspace] ShardReplicationRemoveRequest keyspace - * @property {string|null} [shard] ShardReplicationRemoveRequest shard - * @property {topodata.ITabletAlias|null} [tablet_alias] ShardReplicationRemoveRequest tablet_alias + * @interface IRemoveBackupRequest + * @property {string|null} [keyspace] RemoveBackupRequest keyspace + * @property {string|null} [shard] RemoveBackupRequest shard + * @property {string|null} [name] RemoveBackupRequest name */ /** - * Constructs a new ShardReplicationRemoveRequest. + * Constructs a new RemoveBackupRequest. * @memberof vtctldata - * @classdesc Represents a ShardReplicationRemoveRequest. - * @implements IShardReplicationRemoveRequest + * @classdesc Represents a RemoveBackupRequest. + * @implements IRemoveBackupRequest * @constructor - * @param {vtctldata.IShardReplicationRemoveRequest=} [properties] Properties to set + * @param {vtctldata.IRemoveBackupRequest=} [properties] Properties to set */ - function ShardReplicationRemoveRequest(properties) { + function RemoveBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114366,90 +116428,90 @@ $root.vtctldata = (function() { } /** - * ShardReplicationRemoveRequest keyspace. + * RemoveBackupRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @instance */ - ShardReplicationRemoveRequest.prototype.keyspace = ""; + RemoveBackupRequest.prototype.keyspace = ""; /** - * ShardReplicationRemoveRequest shard. + * RemoveBackupRequest shard. * @member {string} shard - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @instance */ - ShardReplicationRemoveRequest.prototype.shard = ""; + RemoveBackupRequest.prototype.shard = ""; /** - * ShardReplicationRemoveRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ShardReplicationRemoveRequest + * RemoveBackupRequest name. + * @member {string} name + * @memberof vtctldata.RemoveBackupRequest * @instance */ - ShardReplicationRemoveRequest.prototype.tablet_alias = null; + RemoveBackupRequest.prototype.name = ""; /** - * Creates a new ShardReplicationRemoveRequest instance using the specified properties. + * Creates a new RemoveBackupRequest instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static - * @param {vtctldata.IShardReplicationRemoveRequest=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest instance + * @param {vtctldata.IRemoveBackupRequest=} [properties] Properties to set + * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest instance */ - ShardReplicationRemoveRequest.create = function create(properties) { - return new ShardReplicationRemoveRequest(properties); + RemoveBackupRequest.create = function create(properties) { + return new RemoveBackupRequest(properties); }; /** - * Encodes the specified ShardReplicationRemoveRequest message. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. + * Encodes the specified RemoveBackupRequest message. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static - * @param {vtctldata.IShardReplicationRemoveRequest} message ShardReplicationRemoveRequest message or plain object to encode + * @param {vtctldata.IRemoveBackupRequest} message RemoveBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationRemoveRequest.encode = function encode(message, writer) { + RemoveBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified ShardReplicationRemoveRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. + * Encodes the specified RemoveBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static - * @param {vtctldata.IShardReplicationRemoveRequest} message ShardReplicationRemoveRequest message or plain object to encode + * @param {vtctldata.IRemoveBackupRequest} message RemoveBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { + RemoveBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer. + * Decodes a RemoveBackupRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest + * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationRemoveRequest.decode = function decode(reader, length) { + RemoveBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationRemoveRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -114460,7 +116522,7 @@ $root.vtctldata = (function() { message.shard = reader.string(); break; case 3: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -114471,30 +116533,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest + * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationRemoveRequest.decodeDelimited = function decodeDelimited(reader) { + RemoveBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationRemoveRequest message. + * Verifies a RemoveBackupRequest message. * @function verify - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationRemoveRequest.verify = function verify(message) { + RemoveBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) @@ -114503,96 +116565,91 @@ $root.vtctldata = (function() { if (message.shard != null && message.hasOwnProperty("shard")) if (!$util.isString(message.shard)) return "shard: string expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ShardReplicationRemoveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest + * @returns {vtctldata.RemoveBackupRequest} RemoveBackupRequest */ - ShardReplicationRemoveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationRemoveRequest) + RemoveBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveBackupRequest) return object; - var message = new $root.vtctldata.ShardReplicationRemoveRequest(); + var message = new $root.vtctldata.RemoveBackupRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ShardReplicationRemoveRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ShardReplicationRemoveRequest message. Also converts values to other types if specified. + * Creates a plain object from a RemoveBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @static - * @param {vtctldata.ShardReplicationRemoveRequest} message ShardReplicationRemoveRequest + * @param {vtctldata.RemoveBackupRequest} message RemoveBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationRemoveRequest.toObject = function toObject(message, options) { + RemoveBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.keyspace = ""; object.shard = ""; - object.tablet_alias = null; + object.name = ""; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) object.shard = message.shard; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ShardReplicationRemoveRequest to JSON. + * Converts this RemoveBackupRequest to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationRemoveRequest + * @memberof vtctldata.RemoveBackupRequest * @instance * @returns {Object.} JSON object */ - ShardReplicationRemoveRequest.prototype.toJSON = function toJSON() { + RemoveBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationRemoveRequest; + return RemoveBackupRequest; })(); - vtctldata.ShardReplicationRemoveResponse = (function() { + vtctldata.RemoveBackupResponse = (function() { /** - * Properties of a ShardReplicationRemoveResponse. + * Properties of a RemoveBackupResponse. * @memberof vtctldata - * @interface IShardReplicationRemoveResponse + * @interface IRemoveBackupResponse */ /** - * Constructs a new ShardReplicationRemoveResponse. + * Constructs a new RemoveBackupResponse. * @memberof vtctldata - * @classdesc Represents a ShardReplicationRemoveResponse. - * @implements IShardReplicationRemoveResponse + * @classdesc Represents a RemoveBackupResponse. + * @implements IRemoveBackupResponse * @constructor - * @param {vtctldata.IShardReplicationRemoveResponse=} [properties] Properties to set + * @param {vtctldata.IRemoveBackupResponse=} [properties] Properties to set */ - function ShardReplicationRemoveResponse(properties) { + function RemoveBackupResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114600,60 +116657,60 @@ $root.vtctldata = (function() { } /** - * Creates a new ShardReplicationRemoveResponse instance using the specified properties. + * Creates a new RemoveBackupResponse instance using the specified properties. * @function create - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static - * @param {vtctldata.IShardReplicationRemoveResponse=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse instance + * @param {vtctldata.IRemoveBackupResponse=} [properties] Properties to set + * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse instance */ - ShardReplicationRemoveResponse.create = function create(properties) { - return new ShardReplicationRemoveResponse(properties); + RemoveBackupResponse.create = function create(properties) { + return new RemoveBackupResponse(properties); }; /** - * Encodes the specified ShardReplicationRemoveResponse message. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. + * Encodes the specified RemoveBackupResponse message. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static - * @param {vtctldata.IShardReplicationRemoveResponse} message ShardReplicationRemoveResponse message or plain object to encode + * @param {vtctldata.IRemoveBackupResponse} message RemoveBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationRemoveResponse.encode = function encode(message, writer) { + RemoveBackupResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified ShardReplicationRemoveResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. + * Encodes the specified RemoveBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveBackupResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static - * @param {vtctldata.IShardReplicationRemoveResponse} message ShardReplicationRemoveResponse message or plain object to encode + * @param {vtctldata.IRemoveBackupResponse} message RemoveBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplicationRemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { + RemoveBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer. + * Decodes a RemoveBackupResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse + * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationRemoveResponse.decode = function decode(reader, length) { + RemoveBackupResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationRemoveResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveBackupResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -114666,95 +116723,97 @@ $root.vtctldata = (function() { }; /** - * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveBackupResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse + * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardReplicationRemoveResponse.decodeDelimited = function decodeDelimited(reader) { + RemoveBackupResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplicationRemoveResponse message. + * Verifies a RemoveBackupResponse message. * @function verify - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardReplicationRemoveResponse.verify = function verify(message) { + RemoveBackupResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a ShardReplicationRemoveResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveBackupResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse + * @returns {vtctldata.RemoveBackupResponse} RemoveBackupResponse */ - ShardReplicationRemoveResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationRemoveResponse) + RemoveBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveBackupResponse) return object; - return new $root.vtctldata.ShardReplicationRemoveResponse(); + return new $root.vtctldata.RemoveBackupResponse(); }; /** - * Creates a plain object from a ShardReplicationRemoveResponse message. Also converts values to other types if specified. + * Creates a plain object from a RemoveBackupResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @static - * @param {vtctldata.ShardReplicationRemoveResponse} message ShardReplicationRemoveResponse + * @param {vtctldata.RemoveBackupResponse} message RemoveBackupResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplicationRemoveResponse.toObject = function toObject() { + RemoveBackupResponse.toObject = function toObject() { return {}; }; /** - * Converts this ShardReplicationRemoveResponse to JSON. + * Converts this RemoveBackupResponse to JSON. * @function toJSON - * @memberof vtctldata.ShardReplicationRemoveResponse + * @memberof vtctldata.RemoveBackupResponse * @instance * @returns {Object.} JSON object */ - ShardReplicationRemoveResponse.prototype.toJSON = function toJSON() { + RemoveBackupResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReplicationRemoveResponse; + return RemoveBackupResponse; })(); - vtctldata.SleepTabletRequest = (function() { + vtctldata.RemoveKeyspaceCellRequest = (function() { /** - * Properties of a SleepTabletRequest. + * Properties of a RemoveKeyspaceCellRequest. * @memberof vtctldata - * @interface ISleepTabletRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] SleepTabletRequest tablet_alias - * @property {vttime.IDuration|null} [duration] SleepTabletRequest duration + * @interface IRemoveKeyspaceCellRequest + * @property {string|null} [keyspace] RemoveKeyspaceCellRequest keyspace + * @property {string|null} [cell] RemoveKeyspaceCellRequest cell + * @property {boolean|null} [force] RemoveKeyspaceCellRequest force + * @property {boolean|null} [recursive] RemoveKeyspaceCellRequest recursive */ /** - * Constructs a new SleepTabletRequest. + * Constructs a new RemoveKeyspaceCellRequest. * @memberof vtctldata - * @classdesc Represents a SleepTabletRequest. - * @implements ISleepTabletRequest + * @classdesc Represents a RemoveKeyspaceCellRequest. + * @implements IRemoveKeyspaceCellRequest * @constructor - * @param {vtctldata.ISleepTabletRequest=} [properties] Properties to set + * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set */ - function SleepTabletRequest(properties) { + function RemoveKeyspaceCellRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114762,88 +116821,114 @@ $root.vtctldata = (function() { } /** - * SleepTabletRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.SleepTabletRequest + * RemoveKeyspaceCellRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.RemoveKeyspaceCellRequest * @instance */ - SleepTabletRequest.prototype.tablet_alias = null; + RemoveKeyspaceCellRequest.prototype.keyspace = ""; /** - * SleepTabletRequest duration. - * @member {vttime.IDuration|null|undefined} duration - * @memberof vtctldata.SleepTabletRequest + * RemoveKeyspaceCellRequest cell. + * @member {string} cell + * @memberof vtctldata.RemoveKeyspaceCellRequest * @instance */ - SleepTabletRequest.prototype.duration = null; + RemoveKeyspaceCellRequest.prototype.cell = ""; /** - * Creates a new SleepTabletRequest instance using the specified properties. + * RemoveKeyspaceCellRequest force. + * @member {boolean} force + * @memberof vtctldata.RemoveKeyspaceCellRequest + * @instance + */ + RemoveKeyspaceCellRequest.prototype.force = false; + + /** + * RemoveKeyspaceCellRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.RemoveKeyspaceCellRequest + * @instance + */ + RemoveKeyspaceCellRequest.prototype.recursive = false; + + /** + * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. * @function create - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static - * @param {vtctldata.ISleepTabletRequest=} [properties] Properties to set - * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest instance + * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set + * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest instance */ - SleepTabletRequest.create = function create(properties) { - return new SleepTabletRequest(properties); + RemoveKeyspaceCellRequest.create = function create(properties) { + return new RemoveKeyspaceCellRequest(properties); }; /** - * Encodes the specified SleepTabletRequest message. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. + * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static - * @param {vtctldata.ISleepTabletRequest} message SleepTabletRequest message or plain object to encode + * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SleepTabletRequest.encode = function encode(message, writer) { + RemoveKeyspaceCellRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.vttime.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cell); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); return writer; }; /** - * Encodes the specified SleepTabletRequest message, length delimited. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. + * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static - * @param {vtctldata.ISleepTabletRequest} message SleepTabletRequest message or plain object to encode + * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SleepTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + RemoveKeyspaceCellRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SleepTabletRequest message from the specified reader or buffer. + * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest + * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SleepTabletRequest.decode = function decode(reader, length) { + RemoveKeyspaceCellRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SleepTabletRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.duration = $root.vttime.Duration.decode(reader, reader.uint32()); + message.cell = reader.string(); + break; + case 3: + message.force = reader.bool(); + break; + case 4: + message.recursive = reader.bool(); break; default: reader.skipType(tag & 7); @@ -114854,125 +116939,131 @@ $root.vtctldata = (function() { }; /** - * Decodes a SleepTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest + * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SleepTabletRequest.decodeDelimited = function decodeDelimited(reader) { + RemoveKeyspaceCellRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SleepTabletRequest message. + * Verifies a RemoveKeyspaceCellRequest message. * @function verify - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SleepTabletRequest.verify = function verify(message) { + RemoveKeyspaceCellRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.vttime.Duration.verify(message.duration); - if (error) - return "duration." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; return null; }; /** - * Creates a SleepTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest + * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest */ - SleepTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SleepTabletRequest) + RemoveKeyspaceCellRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveKeyspaceCellRequest) return object; - var message = new $root.vtctldata.SleepTabletRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.SleepTabletRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".vtctldata.SleepTabletRequest.duration: object expected"); - message.duration = $root.vttime.Duration.fromObject(object.duration); - } + var message = new $root.vtctldata.RemoveKeyspaceCellRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.cell != null) + message.cell = String(object.cell); + if (object.force != null) + message.force = Boolean(object.force); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); return message; }; /** - * Creates a plain object from a SleepTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @static - * @param {vtctldata.SleepTabletRequest} message SleepTabletRequest + * @param {vtctldata.RemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SleepTabletRequest.toObject = function toObject(message, options) { + RemoveKeyspaceCellRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tablet_alias = null; - object.duration = null; + object.keyspace = ""; + object.cell = ""; + object.force = false; + object.recursive = false; } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.vttime.Duration.toObject(message.duration, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; return object; }; /** - * Converts this SleepTabletRequest to JSON. + * Converts this RemoveKeyspaceCellRequest to JSON. * @function toJSON - * @memberof vtctldata.SleepTabletRequest + * @memberof vtctldata.RemoveKeyspaceCellRequest * @instance * @returns {Object.} JSON object */ - SleepTabletRequest.prototype.toJSON = function toJSON() { + RemoveKeyspaceCellRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SleepTabletRequest; + return RemoveKeyspaceCellRequest; })(); - vtctldata.SleepTabletResponse = (function() { + vtctldata.RemoveKeyspaceCellResponse = (function() { /** - * Properties of a SleepTabletResponse. + * Properties of a RemoveKeyspaceCellResponse. * @memberof vtctldata - * @interface ISleepTabletResponse + * @interface IRemoveKeyspaceCellResponse */ /** - * Constructs a new SleepTabletResponse. + * Constructs a new RemoveKeyspaceCellResponse. * @memberof vtctldata - * @classdesc Represents a SleepTabletResponse. - * @implements ISleepTabletResponse + * @classdesc Represents a RemoveKeyspaceCellResponse. + * @implements IRemoveKeyspaceCellResponse * @constructor - * @param {vtctldata.ISleepTabletResponse=} [properties] Properties to set + * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set */ - function SleepTabletResponse(properties) { + function RemoveKeyspaceCellResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114980,60 +117071,60 @@ $root.vtctldata = (function() { } /** - * Creates a new SleepTabletResponse instance using the specified properties. + * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. * @function create - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static - * @param {vtctldata.ISleepTabletResponse=} [properties] Properties to set - * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse instance + * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set + * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse instance */ - SleepTabletResponse.create = function create(properties) { - return new SleepTabletResponse(properties); + RemoveKeyspaceCellResponse.create = function create(properties) { + return new RemoveKeyspaceCellResponse(properties); }; /** - * Encodes the specified SleepTabletResponse message. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. + * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static - * @param {vtctldata.ISleepTabletResponse} message SleepTabletResponse message or plain object to encode + * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SleepTabletResponse.encode = function encode(message, writer) { + RemoveKeyspaceCellResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SleepTabletResponse message, length delimited. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. + * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static - * @param {vtctldata.ISleepTabletResponse} message SleepTabletResponse message or plain object to encode + * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SleepTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { + RemoveKeyspaceCellResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SleepTabletResponse message from the specified reader or buffer. + * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse + * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SleepTabletResponse.decode = function decode(reader, length) { + RemoveKeyspaceCellResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SleepTabletResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -115046,101 +117137,98 @@ $root.vtctldata = (function() { }; /** - * Decodes a SleepTabletResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse + * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SleepTabletResponse.decodeDelimited = function decodeDelimited(reader) { + RemoveKeyspaceCellResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SleepTabletResponse message. + * Verifies a RemoveKeyspaceCellResponse message. * @function verify - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SleepTabletResponse.verify = function verify(message) { + RemoveKeyspaceCellResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SleepTabletResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse + * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse */ - SleepTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SleepTabletResponse) + RemoveKeyspaceCellResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveKeyspaceCellResponse) return object; - return new $root.vtctldata.SleepTabletResponse(); + return new $root.vtctldata.RemoveKeyspaceCellResponse(); }; /** - * Creates a plain object from a SleepTabletResponse message. Also converts values to other types if specified. + * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @static - * @param {vtctldata.SleepTabletResponse} message SleepTabletResponse + * @param {vtctldata.RemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SleepTabletResponse.toObject = function toObject() { + RemoveKeyspaceCellResponse.toObject = function toObject() { return {}; }; /** - * Converts this SleepTabletResponse to JSON. + * Converts this RemoveKeyspaceCellResponse to JSON. * @function toJSON - * @memberof vtctldata.SleepTabletResponse + * @memberof vtctldata.RemoveKeyspaceCellResponse * @instance * @returns {Object.} JSON object */ - SleepTabletResponse.prototype.toJSON = function toJSON() { + RemoveKeyspaceCellResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SleepTabletResponse; + return RemoveKeyspaceCellResponse; })(); - vtctldata.SourceShardAddRequest = (function() { + vtctldata.RemoveShardCellRequest = (function() { /** - * Properties of a SourceShardAddRequest. + * Properties of a RemoveShardCellRequest. * @memberof vtctldata - * @interface ISourceShardAddRequest - * @property {string|null} [keyspace] SourceShardAddRequest keyspace - * @property {string|null} [shard] SourceShardAddRequest shard - * @property {number|null} [uid] SourceShardAddRequest uid - * @property {string|null} [source_keyspace] SourceShardAddRequest source_keyspace - * @property {string|null} [source_shard] SourceShardAddRequest source_shard - * @property {topodata.IKeyRange|null} [key_range] SourceShardAddRequest key_range - * @property {Array.|null} [tables] SourceShardAddRequest tables + * @interface IRemoveShardCellRequest + * @property {string|null} [keyspace] RemoveShardCellRequest keyspace + * @property {string|null} [shard_name] RemoveShardCellRequest shard_name + * @property {string|null} [cell] RemoveShardCellRequest cell + * @property {boolean|null} [force] RemoveShardCellRequest force + * @property {boolean|null} [recursive] RemoveShardCellRequest recursive */ /** - * Constructs a new SourceShardAddRequest. + * Constructs a new RemoveShardCellRequest. * @memberof vtctldata - * @classdesc Represents a SourceShardAddRequest. - * @implements ISourceShardAddRequest + * @classdesc Represents a RemoveShardCellRequest. + * @implements IRemoveShardCellRequest * @constructor - * @param {vtctldata.ISourceShardAddRequest=} [properties] Properties to set + * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set */ - function SourceShardAddRequest(properties) { - this.tables = []; + function RemoveShardCellRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115148,131 +117236,110 @@ $root.vtctldata = (function() { } /** - * SourceShardAddRequest keyspace. + * RemoveShardCellRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.SourceShardAddRequest - * @instance - */ - SourceShardAddRequest.prototype.keyspace = ""; - - /** - * SourceShardAddRequest shard. - * @member {string} shard - * @memberof vtctldata.SourceShardAddRequest - * @instance - */ - SourceShardAddRequest.prototype.shard = ""; - - /** - * SourceShardAddRequest uid. - * @member {number} uid - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @instance */ - SourceShardAddRequest.prototype.uid = 0; + RemoveShardCellRequest.prototype.keyspace = ""; /** - * SourceShardAddRequest source_keyspace. - * @member {string} source_keyspace - * @memberof vtctldata.SourceShardAddRequest + * RemoveShardCellRequest shard_name. + * @member {string} shard_name + * @memberof vtctldata.RemoveShardCellRequest * @instance */ - SourceShardAddRequest.prototype.source_keyspace = ""; + RemoveShardCellRequest.prototype.shard_name = ""; /** - * SourceShardAddRequest source_shard. - * @member {string} source_shard - * @memberof vtctldata.SourceShardAddRequest + * RemoveShardCellRequest cell. + * @member {string} cell + * @memberof vtctldata.RemoveShardCellRequest * @instance */ - SourceShardAddRequest.prototype.source_shard = ""; + RemoveShardCellRequest.prototype.cell = ""; /** - * SourceShardAddRequest key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof vtctldata.SourceShardAddRequest + * RemoveShardCellRequest force. + * @member {boolean} force + * @memberof vtctldata.RemoveShardCellRequest * @instance */ - SourceShardAddRequest.prototype.key_range = null; + RemoveShardCellRequest.prototype.force = false; /** - * SourceShardAddRequest tables. - * @member {Array.} tables - * @memberof vtctldata.SourceShardAddRequest + * RemoveShardCellRequest recursive. + * @member {boolean} recursive + * @memberof vtctldata.RemoveShardCellRequest * @instance */ - SourceShardAddRequest.prototype.tables = $util.emptyArray; + RemoveShardCellRequest.prototype.recursive = false; /** - * Creates a new SourceShardAddRequest instance using the specified properties. + * Creates a new RemoveShardCellRequest instance using the specified properties. * @function create - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static - * @param {vtctldata.ISourceShardAddRequest=} [properties] Properties to set - * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest instance + * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set + * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest instance */ - SourceShardAddRequest.create = function create(properties) { - return new SourceShardAddRequest(properties); + RemoveShardCellRequest.create = function create(properties) { + return new RemoveShardCellRequest(properties); }; /** - * Encodes the specified SourceShardAddRequest message. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. + * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static - * @param {vtctldata.ISourceShardAddRequest} message SourceShardAddRequest message or plain object to encode + * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardAddRequest.encode = function encode(message, writer) { + RemoveShardCellRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.uid); - if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.source_keyspace); - if (message.source_shard != null && Object.hasOwnProperty.call(message, "source_shard")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_shard); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.tables[i]); + if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.recursive); return writer; }; /** - * Encodes the specified SourceShardAddRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. + * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static - * @param {vtctldata.ISourceShardAddRequest} message SourceShardAddRequest message or plain object to encode + * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardAddRequest.encodeDelimited = function encodeDelimited(message, writer) { + RemoveShardCellRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceShardAddRequest message from the specified reader or buffer. + * Decodes a RemoveShardCellRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest + * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardAddRequest.decode = function decode(reader, length) { + RemoveShardCellRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardAddRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -115280,24 +117347,16 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - message.shard = reader.string(); + message.shard_name = reader.string(); break; case 3: - message.uid = reader.uint32(); + message.cell = reader.string(); break; case 4: - message.source_keyspace = reader.string(); + message.force = reader.bool(); break; case 5: - message.source_shard = reader.string(); - break; - case 6: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); + message.recursive = reader.bool(); break; default: reader.skipType(tag & 7); @@ -115308,174 +117367,139 @@ $root.vtctldata = (function() { }; /** - * Decodes a SourceShardAddRequest message from the specified reader or buffer, length delimited. + * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest + * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardAddRequest.decodeDelimited = function decodeDelimited(reader) { + RemoveShardCellRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceShardAddRequest message. + * Verifies a RemoveShardCellRequest message. * @function verify - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceShardAddRequest.verify = function verify(message) { + RemoveShardCellRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isInteger(message.uid)) - return "uid: integer expected"; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - if (!$util.isString(message.source_keyspace)) - return "source_keyspace: string expected"; - if (message.source_shard != null && message.hasOwnProperty("source_shard")) - if (!$util.isString(message.source_shard)) - return "source_shard: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + if (!$util.isString(message.shard_name)) + return "shard_name: string expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; return null; }; /** - * Creates a SourceShardAddRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest + * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest */ - SourceShardAddRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SourceShardAddRequest) + RemoveShardCellRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveShardCellRequest) return object; - var message = new $root.vtctldata.SourceShardAddRequest(); + var message = new $root.vtctldata.RemoveShardCellRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.uid != null) - message.uid = object.uid >>> 0; - if (object.source_keyspace != null) - message.source_keyspace = String(object.source_keyspace); - if (object.source_shard != null) - message.source_shard = String(object.source_shard); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".vtctldata.SourceShardAddRequest.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".vtctldata.SourceShardAddRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } + if (object.shard_name != null) + message.shard_name = String(object.shard_name); + if (object.cell != null) + message.cell = String(object.cell); + if (object.force != null) + message.force = Boolean(object.force); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); return message; }; /** - * Creates a plain object from a SourceShardAddRequest message. Also converts values to other types if specified. + * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @static - * @param {vtctldata.SourceShardAddRequest} message SourceShardAddRequest + * @param {vtctldata.RemoveShardCellRequest} message RemoveShardCellRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceShardAddRequest.toObject = function toObject(message, options) { + RemoveShardCellRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tables = []; if (options.defaults) { object.keyspace = ""; - object.shard = ""; - object.uid = 0; - object.source_keyspace = ""; - object.source_shard = ""; - object.key_range = null; + object.shard_name = ""; + object.cell = ""; + object.force = false; + object.recursive = false; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - object.source_keyspace = message.source_keyspace; - if (message.source_shard != null && message.hasOwnProperty("source_shard")) - object.source_shard = message.source_shard; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } + if (message.shard_name != null && message.hasOwnProperty("shard_name")) + object.shard_name = message.shard_name; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; return object; }; /** - * Converts this SourceShardAddRequest to JSON. + * Converts this RemoveShardCellRequest to JSON. * @function toJSON - * @memberof vtctldata.SourceShardAddRequest + * @memberof vtctldata.RemoveShardCellRequest * @instance * @returns {Object.} JSON object */ - SourceShardAddRequest.prototype.toJSON = function toJSON() { + RemoveShardCellRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceShardAddRequest; + return RemoveShardCellRequest; })(); - vtctldata.SourceShardAddResponse = (function() { + vtctldata.RemoveShardCellResponse = (function() { /** - * Properties of a SourceShardAddResponse. + * Properties of a RemoveShardCellResponse. * @memberof vtctldata - * @interface ISourceShardAddResponse - * @property {topodata.IShard|null} [shard] SourceShardAddResponse shard + * @interface IRemoveShardCellResponse */ /** - * Constructs a new SourceShardAddResponse. + * Constructs a new RemoveShardCellResponse. * @memberof vtctldata - * @classdesc Represents a SourceShardAddResponse. - * @implements ISourceShardAddResponse + * @classdesc Represents a RemoveShardCellResponse. + * @implements IRemoveShardCellResponse * @constructor - * @param {vtctldata.ISourceShardAddResponse=} [properties] Properties to set + * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set */ - function SourceShardAddResponse(properties) { + function RemoveShardCellResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115483,76 +117507,63 @@ $root.vtctldata = (function() { } /** - * SourceShardAddResponse shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.SourceShardAddResponse - * @instance - */ - SourceShardAddResponse.prototype.shard = null; - - /** - * Creates a new SourceShardAddResponse instance using the specified properties. + * Creates a new RemoveShardCellResponse instance using the specified properties. * @function create - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static - * @param {vtctldata.ISourceShardAddResponse=} [properties] Properties to set - * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse instance + * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set + * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse instance */ - SourceShardAddResponse.create = function create(properties) { - return new SourceShardAddResponse(properties); + RemoveShardCellResponse.create = function create(properties) { + return new RemoveShardCellResponse(properties); }; /** - * Encodes the specified SourceShardAddResponse message. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static - * @param {vtctldata.ISourceShardAddResponse} message SourceShardAddResponse message or plain object to encode + * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardAddResponse.encode = function encode(message, writer) { + RemoveShardCellResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceShardAddResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static - * @param {vtctldata.ISourceShardAddResponse} message SourceShardAddResponse message or plain object to encode + * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardAddResponse.encodeDelimited = function encodeDelimited(message, writer) { + RemoveShardCellResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceShardAddResponse message from the specified reader or buffer. + * Decodes a RemoveShardCellResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardAddResponse.decode = function decode(reader, length) { + RemoveShardCellResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardAddResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -115562,216 +117573,170 @@ $root.vtctldata = (function() { }; /** - * Decodes a SourceShardAddResponse message from the specified reader or buffer, length delimited. + * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardAddResponse.decodeDelimited = function decodeDelimited(reader) { + RemoveShardCellResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceShardAddResponse message. + * Verifies a RemoveShardCellResponse message. * @function verify - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceShardAddResponse.verify = function verify(message) { + RemoveShardCellResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } return null; }; /** - * Creates a SourceShardAddResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse */ - SourceShardAddResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SourceShardAddResponse) + RemoveShardCellResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RemoveShardCellResponse) return object; - var message = new $root.vtctldata.SourceShardAddResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.SourceShardAddResponse.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); - } - return message; + return new $root.vtctldata.RemoveShardCellResponse(); }; /** - * Creates a plain object from a SourceShardAddResponse message. Also converts values to other types if specified. + * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @static - * @param {vtctldata.SourceShardAddResponse} message SourceShardAddResponse + * @param {vtctldata.RemoveShardCellResponse} message RemoveShardCellResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceShardAddResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.shard = null; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); - return object; + RemoveShardCellResponse.toObject = function toObject() { + return {}; }; /** - * Converts this SourceShardAddResponse to JSON. + * Converts this RemoveShardCellResponse to JSON. * @function toJSON - * @memberof vtctldata.SourceShardAddResponse + * @memberof vtctldata.RemoveShardCellResponse * @instance * @returns {Object.} JSON object */ - SourceShardAddResponse.prototype.toJSON = function toJSON() { + RemoveShardCellResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceShardAddResponse; + return RemoveShardCellResponse; })(); - vtctldata.SourceShardDeleteRequest = (function() { - - /** - * Properties of a SourceShardDeleteRequest. - * @memberof vtctldata - * @interface ISourceShardDeleteRequest - * @property {string|null} [keyspace] SourceShardDeleteRequest keyspace - * @property {string|null} [shard] SourceShardDeleteRequest shard - * @property {number|null} [uid] SourceShardDeleteRequest uid - */ + vtctldata.ReparentTabletRequest = (function() { /** - * Constructs a new SourceShardDeleteRequest. + * Properties of a ReparentTabletRequest. * @memberof vtctldata - * @classdesc Represents a SourceShardDeleteRequest. - * @implements ISourceShardDeleteRequest - * @constructor - * @param {vtctldata.ISourceShardDeleteRequest=} [properties] Properties to set - */ - function SourceShardDeleteRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceShardDeleteRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.SourceShardDeleteRequest - * @instance + * @interface IReparentTabletRequest + * @property {topodata.ITabletAlias|null} [tablet] ReparentTabletRequest tablet */ - SourceShardDeleteRequest.prototype.keyspace = ""; - - /** - * SourceShardDeleteRequest shard. - * @member {string} shard - * @memberof vtctldata.SourceShardDeleteRequest - * @instance + + /** + * Constructs a new ReparentTabletRequest. + * @memberof vtctldata + * @classdesc Represents a ReparentTabletRequest. + * @implements IReparentTabletRequest + * @constructor + * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set */ - SourceShardDeleteRequest.prototype.shard = ""; + function ReparentTabletRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * SourceShardDeleteRequest uid. - * @member {number} uid - * @memberof vtctldata.SourceShardDeleteRequest + * ReparentTabletRequest tablet. + * @member {topodata.ITabletAlias|null|undefined} tablet + * @memberof vtctldata.ReparentTabletRequest * @instance */ - SourceShardDeleteRequest.prototype.uid = 0; + ReparentTabletRequest.prototype.tablet = null; /** - * Creates a new SourceShardDeleteRequest instance using the specified properties. + * Creates a new ReparentTabletRequest instance using the specified properties. * @function create - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static - * @param {vtctldata.ISourceShardDeleteRequest=} [properties] Properties to set - * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest instance + * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set + * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest instance */ - SourceShardDeleteRequest.create = function create(properties) { - return new SourceShardDeleteRequest(properties); + ReparentTabletRequest.create = function create(properties) { + return new ReparentTabletRequest(properties); }; /** - * Encodes the specified SourceShardDeleteRequest message. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. + * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static - * @param {vtctldata.ISourceShardDeleteRequest} message SourceShardDeleteRequest message or plain object to encode + * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardDeleteRequest.encode = function encode(message, writer) { + ReparentTabletRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.uid); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceShardDeleteRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. + * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static - * @param {vtctldata.ISourceShardDeleteRequest} message SourceShardDeleteRequest message or plain object to encode + * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReparentTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceShardDeleteRequest message from the specified reader or buffer. + * Decodes a ReparentTabletRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest + * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardDeleteRequest.decode = function decode(reader, length) { + ReparentTabletRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardDeleteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.uid = reader.uint32(); + message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -115782,124 +117747,114 @@ $root.vtctldata = (function() { }; /** - * Decodes a SourceShardDeleteRequest message from the specified reader or buffer, length delimited. + * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest + * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardDeleteRequest.decodeDelimited = function decodeDelimited(reader) { + ReparentTabletRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceShardDeleteRequest message. + * Verifies a ReparentTabletRequest message. * @function verify - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceShardDeleteRequest.verify = function verify(message) { + ReparentTabletRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isInteger(message.uid)) - return "uid: integer expected"; + if (message.tablet != null && message.hasOwnProperty("tablet")) { + var error = $root.topodata.TabletAlias.verify(message.tablet); + if (error) + return "tablet." + error; + } return null; }; /** - * Creates a SourceShardDeleteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest + * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest */ - SourceShardDeleteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SourceShardDeleteRequest) + ReparentTabletRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReparentTabletRequest) return object; - var message = new $root.vtctldata.SourceShardDeleteRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.uid != null) - message.uid = object.uid >>> 0; + var message = new $root.vtctldata.ReparentTabletRequest(); + if (object.tablet != null) { + if (typeof object.tablet !== "object") + throw TypeError(".vtctldata.ReparentTabletRequest.tablet: object expected"); + message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); + } return message; }; /** - * Creates a plain object from a SourceShardDeleteRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @static - * @param {vtctldata.SourceShardDeleteRequest} message SourceShardDeleteRequest + * @param {vtctldata.ReparentTabletRequest} message ReparentTabletRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceShardDeleteRequest.toObject = function toObject(message, options) { + ReparentTabletRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.uid = 0; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; + if (options.defaults) + object.tablet = null; + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); return object; }; /** - * Converts this SourceShardDeleteRequest to JSON. + * Converts this ReparentTabletRequest to JSON. * @function toJSON - * @memberof vtctldata.SourceShardDeleteRequest + * @memberof vtctldata.ReparentTabletRequest * @instance * @returns {Object.} JSON object */ - SourceShardDeleteRequest.prototype.toJSON = function toJSON() { + ReparentTabletRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceShardDeleteRequest; + return ReparentTabletRequest; })(); - vtctldata.SourceShardDeleteResponse = (function() { + vtctldata.ReparentTabletResponse = (function() { /** - * Properties of a SourceShardDeleteResponse. + * Properties of a ReparentTabletResponse. * @memberof vtctldata - * @interface ISourceShardDeleteResponse - * @property {topodata.IShard|null} [shard] SourceShardDeleteResponse shard + * @interface IReparentTabletResponse + * @property {string|null} [keyspace] ReparentTabletResponse keyspace + * @property {string|null} [shard] ReparentTabletResponse shard + * @property {topodata.ITabletAlias|null} [primary] ReparentTabletResponse primary */ /** - * Constructs a new SourceShardDeleteResponse. + * Constructs a new ReparentTabletResponse. * @memberof vtctldata - * @classdesc Represents a SourceShardDeleteResponse. - * @implements ISourceShardDeleteResponse + * @classdesc Represents a ReparentTabletResponse. + * @implements IReparentTabletResponse * @constructor - * @param {vtctldata.ISourceShardDeleteResponse=} [properties] Properties to set + * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set */ - function SourceShardDeleteResponse(properties) { + function ReparentTabletResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115907,75 +117862,101 @@ $root.vtctldata = (function() { } /** - * SourceShardDeleteResponse shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.SourceShardDeleteResponse + * ReparentTabletResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.ReparentTabletResponse * @instance */ - SourceShardDeleteResponse.prototype.shard = null; + ReparentTabletResponse.prototype.keyspace = ""; /** - * Creates a new SourceShardDeleteResponse instance using the specified properties. + * ReparentTabletResponse shard. + * @member {string} shard + * @memberof vtctldata.ReparentTabletResponse + * @instance + */ + ReparentTabletResponse.prototype.shard = ""; + + /** + * ReparentTabletResponse primary. + * @member {topodata.ITabletAlias|null|undefined} primary + * @memberof vtctldata.ReparentTabletResponse + * @instance + */ + ReparentTabletResponse.prototype.primary = null; + + /** + * Creates a new ReparentTabletResponse instance using the specified properties. * @function create - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static - * @param {vtctldata.ISourceShardDeleteResponse=} [properties] Properties to set - * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse instance + * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set + * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse instance */ - SourceShardDeleteResponse.create = function create(properties) { - return new SourceShardDeleteResponse(properties); + ReparentTabletResponse.create = function create(properties) { + return new ReparentTabletResponse(properties); }; /** - * Encodes the specified SourceShardDeleteResponse message. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. + * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static - * @param {vtctldata.ISourceShardDeleteResponse} message SourceShardDeleteResponse message or plain object to encode + * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardDeleteResponse.encode = function encode(message, writer) { + ReparentTabletResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + $root.topodata.TabletAlias.encode(message.primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceShardDeleteResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. + * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static - * @param {vtctldata.ISourceShardDeleteResponse} message SourceShardDeleteResponse message or plain object to encode + * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceShardDeleteResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReparentTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceShardDeleteResponse message from the specified reader or buffer. + * Decodes a ReparentTabletResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse + * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardDeleteResponse.decode = function decode(reader, length) { + ReparentTabletResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardDeleteResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -115986,112 +117967,132 @@ $root.vtctldata = (function() { }; /** - * Decodes a SourceShardDeleteResponse message from the specified reader or buffer, length delimited. + * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse + * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceShardDeleteResponse.decodeDelimited = function decodeDelimited(reader) { + ReparentTabletResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceShardDeleteResponse message. + * Verifies a ReparentTabletResponse message. * @function verify - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceShardDeleteResponse.verify = function verify(message) { + ReparentTabletResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.primary != null && message.hasOwnProperty("primary")) { + var error = $root.topodata.TabletAlias.verify(message.primary); if (error) - return "shard." + error; + return "primary." + error; } return null; }; /** - * Creates a SourceShardDeleteResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse + * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse */ - SourceShardDeleteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.SourceShardDeleteResponse) + ReparentTabletResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ReparentTabletResponse) return object; - var message = new $root.vtctldata.SourceShardDeleteResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.SourceShardDeleteResponse.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); + var message = new $root.vtctldata.ReparentTabletResponse(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.primary != null) { + if (typeof object.primary !== "object") + throw TypeError(".vtctldata.ReparentTabletResponse.primary: object expected"); + message.primary = $root.topodata.TabletAlias.fromObject(object.primary); } return message; }; /** - * Creates a plain object from a SourceShardDeleteResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @static - * @param {vtctldata.SourceShardDeleteResponse} message SourceShardDeleteResponse + * @param {vtctldata.ReparentTabletResponse} message ReparentTabletResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceShardDeleteResponse.toObject = function toObject(message, options) { + ReparentTabletResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.shard = null; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.primary = null; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); + object.shard = message.shard; + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = $root.topodata.TabletAlias.toObject(message.primary, options); return object; }; /** - * Converts this SourceShardDeleteResponse to JSON. + * Converts this ReparentTabletResponse to JSON. * @function toJSON - * @memberof vtctldata.SourceShardDeleteResponse + * @memberof vtctldata.ReparentTabletResponse * @instance * @returns {Object.} JSON object */ - SourceShardDeleteResponse.prototype.toJSON = function toJSON() { + ReparentTabletResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceShardDeleteResponse; + return ReparentTabletResponse; })(); - vtctldata.StartReplicationRequest = (function() { + vtctldata.RestoreFromBackupRequest = (function() { /** - * Properties of a StartReplicationRequest. + * Properties of a RestoreFromBackupRequest. * @memberof vtctldata - * @interface IStartReplicationRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] StartReplicationRequest tablet_alias + * @interface IRestoreFromBackupRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] RestoreFromBackupRequest tablet_alias + * @property {vttime.ITime|null} [backup_time] RestoreFromBackupRequest backup_time + * @property {string|null} [restore_to_pos] RestoreFromBackupRequest restore_to_pos + * @property {boolean|null} [dry_run] RestoreFromBackupRequest dry_run */ /** - * Constructs a new StartReplicationRequest. + * Constructs a new RestoreFromBackupRequest. * @memberof vtctldata - * @classdesc Represents a StartReplicationRequest. - * @implements IStartReplicationRequest + * @classdesc Represents a RestoreFromBackupRequest. + * @implements IRestoreFromBackupRequest * @constructor - * @param {vtctldata.IStartReplicationRequest=} [properties] Properties to set + * @param {vtctldata.IRestoreFromBackupRequest=} [properties] Properties to set */ - function StartReplicationRequest(properties) { + function RestoreFromBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116099,76 +118100,115 @@ $root.vtctldata = (function() { } /** - * StartReplicationRequest tablet_alias. + * RestoreFromBackupRequest tablet_alias. * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @instance */ - StartReplicationRequest.prototype.tablet_alias = null; + RestoreFromBackupRequest.prototype.tablet_alias = null; /** - * Creates a new StartReplicationRequest instance using the specified properties. + * RestoreFromBackupRequest backup_time. + * @member {vttime.ITime|null|undefined} backup_time + * @memberof vtctldata.RestoreFromBackupRequest + * @instance + */ + RestoreFromBackupRequest.prototype.backup_time = null; + + /** + * RestoreFromBackupRequest restore_to_pos. + * @member {string} restore_to_pos + * @memberof vtctldata.RestoreFromBackupRequest + * @instance + */ + RestoreFromBackupRequest.prototype.restore_to_pos = ""; + + /** + * RestoreFromBackupRequest dry_run. + * @member {boolean} dry_run + * @memberof vtctldata.RestoreFromBackupRequest + * @instance + */ + RestoreFromBackupRequest.prototype.dry_run = false; + + /** + * Creates a new RestoreFromBackupRequest instance using the specified properties. * @function create - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static - * @param {vtctldata.IStartReplicationRequest=} [properties] Properties to set - * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest instance + * @param {vtctldata.IRestoreFromBackupRequest=} [properties] Properties to set + * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest instance */ - StartReplicationRequest.create = function create(properties) { - return new StartReplicationRequest(properties); + RestoreFromBackupRequest.create = function create(properties) { + return new RestoreFromBackupRequest(properties); }; /** - * Encodes the specified StartReplicationRequest message. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. + * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static - * @param {vtctldata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode + * @param {vtctldata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartReplicationRequest.encode = function encode(message, writer) { + RestoreFromBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backup_time != null && Object.hasOwnProperty.call(message, "backup_time")) + $root.vttime.Time.encode(message.backup_time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.restore_to_pos != null && Object.hasOwnProperty.call(message, "restore_to_pos")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.restore_to_pos); + if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dry_run); return writer; }; /** - * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. + * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static - * @param {vtctldata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode + * @param {vtctldata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + RestoreFromBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartReplicationRequest message from the specified reader or buffer. + * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest + * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartReplicationRequest.decode = function decode(reader, length) { + RestoreFromBackupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StartReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RestoreFromBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; + case 2: + message.backup_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 3: + message.restore_to_pos = reader.string(); + break; + case 4: + message.dry_run = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -116178,30 +118218,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest + * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + RestoreFromBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartReplicationRequest message. + * Verifies a RestoreFromBackupRequest message. * @function verify - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartReplicationRequest.verify = function verify(message) { + RestoreFromBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { @@ -116209,80 +118249,114 @@ $root.vtctldata = (function() { if (error) return "tablet_alias." + error; } + if (message.backup_time != null && message.hasOwnProperty("backup_time")) { + var error = $root.vttime.Time.verify(message.backup_time); + if (error) + return "backup_time." + error; + } + if (message.restore_to_pos != null && message.hasOwnProperty("restore_to_pos")) + if (!$util.isString(message.restore_to_pos)) + return "restore_to_pos: string expected"; + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + if (typeof message.dry_run !== "boolean") + return "dry_run: boolean expected"; return null; }; /** - * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest + * @returns {vtctldata.RestoreFromBackupRequest} RestoreFromBackupRequest */ - StartReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.StartReplicationRequest) + RestoreFromBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RestoreFromBackupRequest) return object; - var message = new $root.vtctldata.StartReplicationRequest(); + var message = new $root.vtctldata.RestoreFromBackupRequest(); if (object.tablet_alias != null) { if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.StartReplicationRequest.tablet_alias: object expected"); + throw TypeError(".vtctldata.RestoreFromBackupRequest.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } + if (object.backup_time != null) { + if (typeof object.backup_time !== "object") + throw TypeError(".vtctldata.RestoreFromBackupRequest.backup_time: object expected"); + message.backup_time = $root.vttime.Time.fromObject(object.backup_time); + } + if (object.restore_to_pos != null) + message.restore_to_pos = String(object.restore_to_pos); + if (object.dry_run != null) + message.dry_run = Boolean(object.dry_run); return message; }; /** - * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @static - * @param {vtctldata.StartReplicationRequest} message StartReplicationRequest + * @param {vtctldata.RestoreFromBackupRequest} message RestoreFromBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartReplicationRequest.toObject = function toObject(message, options) { + RestoreFromBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.tablet_alias = null; + object.backup_time = null; + object.restore_to_pos = ""; + object.dry_run = false; + } if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.backup_time != null && message.hasOwnProperty("backup_time")) + object.backup_time = $root.vttime.Time.toObject(message.backup_time, options); + if (message.restore_to_pos != null && message.hasOwnProperty("restore_to_pos")) + object.restore_to_pos = message.restore_to_pos; + if (message.dry_run != null && message.hasOwnProperty("dry_run")) + object.dry_run = message.dry_run; return object; }; /** - * Converts this StartReplicationRequest to JSON. + * Converts this RestoreFromBackupRequest to JSON. * @function toJSON - * @memberof vtctldata.StartReplicationRequest + * @memberof vtctldata.RestoreFromBackupRequest * @instance * @returns {Object.} JSON object */ - StartReplicationRequest.prototype.toJSON = function toJSON() { + RestoreFromBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StartReplicationRequest; + return RestoreFromBackupRequest; })(); - vtctldata.StartReplicationResponse = (function() { + vtctldata.RestoreFromBackupResponse = (function() { /** - * Properties of a StartReplicationResponse. + * Properties of a RestoreFromBackupResponse. * @memberof vtctldata - * @interface IStartReplicationResponse + * @interface IRestoreFromBackupResponse + * @property {topodata.ITabletAlias|null} [tablet_alias] RestoreFromBackupResponse tablet_alias + * @property {string|null} [keyspace] RestoreFromBackupResponse keyspace + * @property {string|null} [shard] RestoreFromBackupResponse shard + * @property {logutil.IEvent|null} [event] RestoreFromBackupResponse event */ /** - * Constructs a new StartReplicationResponse. + * Constructs a new RestoreFromBackupResponse. * @memberof vtctldata - * @classdesc Represents a StartReplicationResponse. - * @implements IStartReplicationResponse + * @classdesc Represents a RestoreFromBackupResponse. + * @implements IRestoreFromBackupResponse * @constructor - * @param {vtctldata.IStartReplicationResponse=} [properties] Properties to set + * @param {vtctldata.IRestoreFromBackupResponse=} [properties] Properties to set */ - function StartReplicationResponse(properties) { + function RestoreFromBackupResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116290,63 +118364,115 @@ $root.vtctldata = (function() { } /** - * Creates a new StartReplicationResponse instance using the specified properties. + * RestoreFromBackupResponse tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.RestoreFromBackupResponse + * @instance + */ + RestoreFromBackupResponse.prototype.tablet_alias = null; + + /** + * RestoreFromBackupResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.RestoreFromBackupResponse + * @instance + */ + RestoreFromBackupResponse.prototype.keyspace = ""; + + /** + * RestoreFromBackupResponse shard. + * @member {string} shard + * @memberof vtctldata.RestoreFromBackupResponse + * @instance + */ + RestoreFromBackupResponse.prototype.shard = ""; + + /** + * RestoreFromBackupResponse event. + * @member {logutil.IEvent|null|undefined} event + * @memberof vtctldata.RestoreFromBackupResponse + * @instance + */ + RestoreFromBackupResponse.prototype.event = null; + + /** + * Creates a new RestoreFromBackupResponse instance using the specified properties. * @function create - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static - * @param {vtctldata.IStartReplicationResponse=} [properties] Properties to set - * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse instance + * @param {vtctldata.IRestoreFromBackupResponse=} [properties] Properties to set + * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse instance */ - StartReplicationResponse.create = function create(properties) { - return new StartReplicationResponse(properties); + RestoreFromBackupResponse.create = function create(properties) { + return new RestoreFromBackupResponse(properties); }; /** - * Encodes the specified StartReplicationResponse message. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. + * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static - * @param {vtctldata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode + * @param {vtctldata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartReplicationResponse.encode = function encode(message, writer) { + RestoreFromBackupResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.logutil.Event.encode(message.event, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. + * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link vtctldata.RestoreFromBackupResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static - * @param {vtctldata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode + * @param {vtctldata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { + RestoreFromBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartReplicationResponse message from the specified reader or buffer. + * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse + * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartReplicationResponse.decode = function decode(reader, length) { + RestoreFromBackupResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StartReplicationResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RestoreFromBackupResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.keyspace = reader.string(); + break; + case 3: + message.shard = reader.string(); + break; + case 4: + message.event = $root.logutil.Event.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -116356,94 +118482,142 @@ $root.vtctldata = (function() { }; /** - * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. + * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse + * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartReplicationResponse.decodeDelimited = function decodeDelimited(reader) { + RestoreFromBackupResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartReplicationResponse message. + * Verifies a RestoreFromBackupResponse message. * @function verify - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartReplicationResponse.verify = function verify(message) { + RestoreFromBackupResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.event != null && message.hasOwnProperty("event")) { + var error = $root.logutil.Event.verify(message.event); + if (error) + return "event." + error; + } return null; }; /** - * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse + * @returns {vtctldata.RestoreFromBackupResponse} RestoreFromBackupResponse */ - StartReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.StartReplicationResponse) + RestoreFromBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RestoreFromBackupResponse) return object; - return new $root.vtctldata.StartReplicationResponse(); + var message = new $root.vtctldata.RestoreFromBackupResponse(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.RestoreFromBackupResponse.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".vtctldata.RestoreFromBackupResponse.event: object expected"); + message.event = $root.logutil.Event.fromObject(object.event); + } + return message; }; /** - * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. + * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @static - * @param {vtctldata.StartReplicationResponse} message StartReplicationResponse + * @param {vtctldata.RestoreFromBackupResponse} message RestoreFromBackupResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartReplicationResponse.toObject = function toObject() { - return {}; + RestoreFromBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tablet_alias = null; + object.keyspace = ""; + object.shard = ""; + object.event = null; + } + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.event != null && message.hasOwnProperty("event")) + object.event = $root.logutil.Event.toObject(message.event, options); + return object; }; /** - * Converts this StartReplicationResponse to JSON. + * Converts this RestoreFromBackupResponse to JSON. * @function toJSON - * @memberof vtctldata.StartReplicationResponse + * @memberof vtctldata.RestoreFromBackupResponse * @instance * @returns {Object.} JSON object */ - StartReplicationResponse.prototype.toJSON = function toJSON() { + RestoreFromBackupResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StartReplicationResponse; + return RestoreFromBackupResponse; })(); - vtctldata.StopReplicationRequest = (function() { + vtctldata.RunHealthCheckRequest = (function() { /** - * Properties of a StopReplicationRequest. + * Properties of a RunHealthCheckRequest. * @memberof vtctldata - * @interface IStopReplicationRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] StopReplicationRequest tablet_alias + * @interface IRunHealthCheckRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] RunHealthCheckRequest tablet_alias */ /** - * Constructs a new StopReplicationRequest. + * Constructs a new RunHealthCheckRequest. * @memberof vtctldata - * @classdesc Represents a StopReplicationRequest. - * @implements IStopReplicationRequest + * @classdesc Represents a RunHealthCheckRequest. + * @implements IRunHealthCheckRequest * @constructor - * @param {vtctldata.IStopReplicationRequest=} [properties] Properties to set + * @param {vtctldata.IRunHealthCheckRequest=} [properties] Properties to set */ - function StopReplicationRequest(properties) { + function RunHealthCheckRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116451,35 +118625,35 @@ $root.vtctldata = (function() { } /** - * StopReplicationRequest tablet_alias. + * RunHealthCheckRequest tablet_alias. * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @instance */ - StopReplicationRequest.prototype.tablet_alias = null; + RunHealthCheckRequest.prototype.tablet_alias = null; /** - * Creates a new StopReplicationRequest instance using the specified properties. + * Creates a new RunHealthCheckRequest instance using the specified properties. * @function create - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static - * @param {vtctldata.IStopReplicationRequest=} [properties] Properties to set - * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest instance + * @param {vtctldata.IRunHealthCheckRequest=} [properties] Properties to set + * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest instance */ - StopReplicationRequest.create = function create(properties) { - return new StopReplicationRequest(properties); + RunHealthCheckRequest.create = function create(properties) { + return new RunHealthCheckRequest(properties); }; /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. + * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static - * @param {vtctldata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {vtctldata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationRequest.encode = function encode(message, writer) { + RunHealthCheckRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) @@ -116488,33 +118662,33 @@ $root.vtctldata = (function() { }; /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. + * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static - * @param {vtctldata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {vtctldata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunHealthCheckRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. + * Decodes a RunHealthCheckRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest + * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationRequest.decode = function decode(reader, length) { + RunHealthCheckRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StopReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RunHealthCheckRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -116530,30 +118704,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest + * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + RunHealthCheckRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopReplicationRequest message. + * Verifies a RunHealthCheckRequest message. * @function verify - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopReplicationRequest.verify = function verify(message) { + RunHealthCheckRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { @@ -116565,35 +118739,35 @@ $root.vtctldata = (function() { }; /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest + * @returns {vtctldata.RunHealthCheckRequest} RunHealthCheckRequest */ - StopReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.StopReplicationRequest) + RunHealthCheckRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RunHealthCheckRequest) return object; - var message = new $root.vtctldata.StopReplicationRequest(); + var message = new $root.vtctldata.RunHealthCheckRequest(); if (object.tablet_alias != null) { if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.StopReplicationRequest.tablet_alias: object expected"); + throw TypeError(".vtctldata.RunHealthCheckRequest.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @static - * @param {vtctldata.StopReplicationRequest} message StopReplicationRequest + * @param {vtctldata.RunHealthCheckRequest} message RunHealthCheckRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopReplicationRequest.toObject = function toObject(message, options) { + RunHealthCheckRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -116605,36 +118779,36 @@ $root.vtctldata = (function() { }; /** - * Converts this StopReplicationRequest to JSON. + * Converts this RunHealthCheckRequest to JSON. * @function toJSON - * @memberof vtctldata.StopReplicationRequest + * @memberof vtctldata.RunHealthCheckRequest * @instance * @returns {Object.} JSON object */ - StopReplicationRequest.prototype.toJSON = function toJSON() { + RunHealthCheckRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StopReplicationRequest; + return RunHealthCheckRequest; })(); - vtctldata.StopReplicationResponse = (function() { + vtctldata.RunHealthCheckResponse = (function() { /** - * Properties of a StopReplicationResponse. + * Properties of a RunHealthCheckResponse. * @memberof vtctldata - * @interface IStopReplicationResponse + * @interface IRunHealthCheckResponse */ /** - * Constructs a new StopReplicationResponse. + * Constructs a new RunHealthCheckResponse. * @memberof vtctldata - * @classdesc Represents a StopReplicationResponse. - * @implements IStopReplicationResponse + * @classdesc Represents a RunHealthCheckResponse. + * @implements IRunHealthCheckResponse * @constructor - * @param {vtctldata.IStopReplicationResponse=} [properties] Properties to set + * @param {vtctldata.IRunHealthCheckResponse=} [properties] Properties to set */ - function StopReplicationResponse(properties) { + function RunHealthCheckResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116642,60 +118816,60 @@ $root.vtctldata = (function() { } /** - * Creates a new StopReplicationResponse instance using the specified properties. + * Creates a new RunHealthCheckResponse instance using the specified properties. * @function create - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static - * @param {vtctldata.IStopReplicationResponse=} [properties] Properties to set - * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse instance + * @param {vtctldata.IRunHealthCheckResponse=} [properties] Properties to set + * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse instance */ - StopReplicationResponse.create = function create(properties) { - return new StopReplicationResponse(properties); + RunHealthCheckResponse.create = function create(properties) { + return new RunHealthCheckResponse(properties); }; /** - * Encodes the specified StopReplicationResponse message. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. + * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static - * @param {vtctldata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode + * @param {vtctldata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationResponse.encode = function encode(message, writer) { + RunHealthCheckResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. + * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link vtctldata.RunHealthCheckResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static - * @param {vtctldata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode + * @param {vtctldata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { + RunHealthCheckResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopReplicationResponse message from the specified reader or buffer. + * Decodes a RunHealthCheckResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse + * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationResponse.decode = function decode(reader, length) { + RunHealthCheckResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StopReplicationResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RunHealthCheckResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -116708,94 +118882,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. + * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse + * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationResponse.decodeDelimited = function decodeDelimited(reader) { + RunHealthCheckResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopReplicationResponse message. + * Verifies a RunHealthCheckResponse message. * @function verify - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopReplicationResponse.verify = function verify(message) { + RunHealthCheckResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse + * @returns {vtctldata.RunHealthCheckResponse} RunHealthCheckResponse */ - StopReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.StopReplicationResponse) + RunHealthCheckResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.RunHealthCheckResponse) return object; - return new $root.vtctldata.StopReplicationResponse(); + return new $root.vtctldata.RunHealthCheckResponse(); }; /** - * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @static - * @param {vtctldata.StopReplicationResponse} message StopReplicationResponse + * @param {vtctldata.RunHealthCheckResponse} message RunHealthCheckResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopReplicationResponse.toObject = function toObject() { + RunHealthCheckResponse.toObject = function toObject() { return {}; }; /** - * Converts this StopReplicationResponse to JSON. + * Converts this RunHealthCheckResponse to JSON. * @function toJSON - * @memberof vtctldata.StopReplicationResponse + * @memberof vtctldata.RunHealthCheckResponse * @instance * @returns {Object.} JSON object */ - StopReplicationResponse.prototype.toJSON = function toJSON() { + RunHealthCheckResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StopReplicationResponse; + return RunHealthCheckResponse; })(); - vtctldata.TabletExternallyReparentedRequest = (function() { + vtctldata.SetKeyspaceDurabilityPolicyRequest = (function() { /** - * Properties of a TabletExternallyReparentedRequest. + * Properties of a SetKeyspaceDurabilityPolicyRequest. * @memberof vtctldata - * @interface ITabletExternallyReparentedRequest - * @property {topodata.ITabletAlias|null} [tablet] TabletExternallyReparentedRequest tablet + * @interface ISetKeyspaceDurabilityPolicyRequest + * @property {string|null} [keyspace] SetKeyspaceDurabilityPolicyRequest keyspace + * @property {string|null} [durability_policy] SetKeyspaceDurabilityPolicyRequest durability_policy */ /** - * Constructs a new TabletExternallyReparentedRequest. + * Constructs a new SetKeyspaceDurabilityPolicyRequest. * @memberof vtctldata - * @classdesc Represents a TabletExternallyReparentedRequest. - * @implements ITabletExternallyReparentedRequest + * @classdesc Represents a SetKeyspaceDurabilityPolicyRequest. + * @implements ISetKeyspaceDurabilityPolicyRequest * @constructor - * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest=} [properties] Properties to set */ - function TabletExternallyReparentedRequest(properties) { + function SetKeyspaceDurabilityPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116803,75 +118978,88 @@ $root.vtctldata = (function() { } /** - * TabletExternallyReparentedRequest tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.TabletExternallyReparentedRequest + * SetKeyspaceDurabilityPolicyRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @instance */ - TabletExternallyReparentedRequest.prototype.tablet = null; + SetKeyspaceDurabilityPolicyRequest.prototype.keyspace = ""; /** - * Creates a new TabletExternallyReparentedRequest instance using the specified properties. + * SetKeyspaceDurabilityPolicyRequest durability_policy. + * @member {string} durability_policy + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest + * @instance + */ + SetKeyspaceDurabilityPolicyRequest.prototype.durability_policy = ""; + + /** + * Creates a new SetKeyspaceDurabilityPolicyRequest instance using the specified properties. * @function create - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static - * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest instance + * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest instance */ - TabletExternallyReparentedRequest.create = function create(properties) { - return new TabletExternallyReparentedRequest(properties); + SetKeyspaceDurabilityPolicyRequest.create = function create(properties) { + return new SetKeyspaceDurabilityPolicyRequest(properties); }; /** - * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceDurabilityPolicyRequest message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static - * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TabletExternallyReparentedRequest.encode = function encode(message, writer) { + SetKeyspaceDurabilityPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.durability_policy != null && Object.hasOwnProperty.call(message, "durability_policy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.durability_policy); return writer; }; /** - * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceDurabilityPolicyRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static - * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TabletExternallyReparentedRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceDurabilityPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TabletExternallyReparentedRequest.decode = function decode(reader, length) { + SetKeyspaceDurabilityPolicyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceDurabilityPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.durability_policy = reader.string(); break; default: reader.skipType(tag & 7); @@ -116882,115 +119070,116 @@ $root.vtctldata = (function() { }; /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceDurabilityPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TabletExternallyReparentedRequest.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceDurabilityPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TabletExternallyReparentedRequest message. + * Verifies a SetKeyspaceDurabilityPolicyRequest message. * @function verify - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TabletExternallyReparentedRequest.verify = function verify(message) { + SetKeyspaceDurabilityPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + if (!$util.isString(message.durability_policy)) + return "durability_policy: string expected"; return null; }; /** - * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceDurabilityPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + * @returns {vtctldata.SetKeyspaceDurabilityPolicyRequest} SetKeyspaceDurabilityPolicyRequest */ - TabletExternallyReparentedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TabletExternallyReparentedRequest) + SetKeyspaceDurabilityPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceDurabilityPolicyRequest) return object; - var message = new $root.vtctldata.TabletExternallyReparentedRequest(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedRequest.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } + var message = new $root.vtctldata.SetKeyspaceDurabilityPolicyRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.durability_policy != null) + message.durability_policy = String(object.durability_policy); return message; }; /** - * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceDurabilityPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @static - * @param {vtctldata.TabletExternallyReparentedRequest} message TabletExternallyReparentedRequest + * @param {vtctldata.SetKeyspaceDurabilityPolicyRequest} message SetKeyspaceDurabilityPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TabletExternallyReparentedRequest.toObject = function toObject(message, options) { + SetKeyspaceDurabilityPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); + if (options.defaults) { + object.keyspace = ""; + object.durability_policy = ""; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.durability_policy != null && message.hasOwnProperty("durability_policy")) + object.durability_policy = message.durability_policy; return object; }; /** - * Converts this TabletExternallyReparentedRequest to JSON. + * Converts this SetKeyspaceDurabilityPolicyRequest to JSON. * @function toJSON - * @memberof vtctldata.TabletExternallyReparentedRequest + * @memberof vtctldata.SetKeyspaceDurabilityPolicyRequest * @instance * @returns {Object.} JSON object */ - TabletExternallyReparentedRequest.prototype.toJSON = function toJSON() { + SetKeyspaceDurabilityPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TabletExternallyReparentedRequest; + return SetKeyspaceDurabilityPolicyRequest; })(); - vtctldata.TabletExternallyReparentedResponse = (function() { + vtctldata.SetKeyspaceDurabilityPolicyResponse = (function() { /** - * Properties of a TabletExternallyReparentedResponse. + * Properties of a SetKeyspaceDurabilityPolicyResponse. * @memberof vtctldata - * @interface ITabletExternallyReparentedResponse - * @property {string|null} [keyspace] TabletExternallyReparentedResponse keyspace - * @property {string|null} [shard] TabletExternallyReparentedResponse shard - * @property {topodata.ITabletAlias|null} [new_primary] TabletExternallyReparentedResponse new_primary - * @property {topodata.ITabletAlias|null} [old_primary] TabletExternallyReparentedResponse old_primary + * @interface ISetKeyspaceDurabilityPolicyResponse + * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceDurabilityPolicyResponse keyspace */ /** - * Constructs a new TabletExternallyReparentedResponse. + * Constructs a new SetKeyspaceDurabilityPolicyResponse. * @memberof vtctldata - * @classdesc Represents a TabletExternallyReparentedResponse. - * @implements ITabletExternallyReparentedResponse + * @classdesc Represents a SetKeyspaceDurabilityPolicyResponse. + * @implements ISetKeyspaceDurabilityPolicyResponse * @constructor - * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse=} [properties] Properties to set */ - function TabletExternallyReparentedResponse(properties) { + function SetKeyspaceDurabilityPolicyResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116998,114 +119187,75 @@ $root.vtctldata = (function() { } /** - * TabletExternallyReparentedResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.keyspace = ""; - - /** - * TabletExternallyReparentedResponse shard. - * @member {string} shard - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.shard = ""; - - /** - * TabletExternallyReparentedResponse new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.new_primary = null; - - /** - * TabletExternallyReparentedResponse old_primary. - * @member {topodata.ITabletAlias|null|undefined} old_primary - * @memberof vtctldata.TabletExternallyReparentedResponse + * SetKeyspaceDurabilityPolicyResponse keyspace. + * @member {topodata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @instance */ - TabletExternallyReparentedResponse.prototype.old_primary = null; + SetKeyspaceDurabilityPolicyResponse.prototype.keyspace = null; /** - * Creates a new TabletExternallyReparentedResponse instance using the specified properties. + * Creates a new SetKeyspaceDurabilityPolicyResponse instance using the specified properties. * @function create - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static - * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse instance + * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse instance */ - TabletExternallyReparentedResponse.create = function create(properties) { - return new TabletExternallyReparentedResponse(properties); + SetKeyspaceDurabilityPolicyResponse.create = function create(properties) { + return new SetKeyspaceDurabilityPolicyResponse(properties); }; /** - * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceDurabilityPolicyResponse message. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static - * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TabletExternallyReparentedResponse.encode = function encode(message, writer) { + SetKeyspaceDurabilityPolicyResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.old_primary != null && Object.hasOwnProperty.call(message, "old_primary")) - $root.topodata.TabletAlias.encode(message.old_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceDurabilityPolicyResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceDurabilityPolicyResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static - * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TabletExternallyReparentedResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceDurabilityPolicyResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse + * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TabletExternallyReparentedResponse.decode = function decode(reader, length) { + SetKeyspaceDurabilityPolicyResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceDurabilityPolicyResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.old_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -117116,143 +119266,117 @@ $root.vtctldata = (function() { }; /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceDurabilityPolicyResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse + * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TabletExternallyReparentedResponse.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceDurabilityPolicyResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TabletExternallyReparentedResponse message. + * Verifies a SetKeyspaceDurabilityPolicyResponse message. * @function verify - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TabletExternallyReparentedResponse.verify = function verify(message) { + SetKeyspaceDurabilityPolicyResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.old_primary != null && message.hasOwnProperty("old_primary")) { - var error = $root.topodata.TabletAlias.verify(message.old_primary); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.topodata.Keyspace.verify(message.keyspace); if (error) - return "old_primary." + error; + return "keyspace." + error; } return null; }; /** - * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceDurabilityPolicyResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse + * @returns {vtctldata.SetKeyspaceDurabilityPolicyResponse} SetKeyspaceDurabilityPolicyResponse */ - TabletExternallyReparentedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TabletExternallyReparentedResponse) + SetKeyspaceDurabilityPolicyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceDurabilityPolicyResponse) return object; - var message = new $root.vtctldata.TabletExternallyReparentedResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedResponse.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.old_primary != null) { - if (typeof object.old_primary !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedResponse.old_primary: object expected"); - message.old_primary = $root.topodata.TabletAlias.fromObject(object.old_primary); + var message = new $root.vtctldata.SetKeyspaceDurabilityPolicyResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace: object expected"); + message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceDurabilityPolicyResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @static - * @param {vtctldata.TabletExternallyReparentedResponse} message TabletExternallyReparentedResponse + * @param {vtctldata.SetKeyspaceDurabilityPolicyResponse} message SetKeyspaceDurabilityPolicyResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TabletExternallyReparentedResponse.toObject = function toObject(message, options) { + SetKeyspaceDurabilityPolicyResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.old_primary = null; - } + if (options.defaults) + object.keyspace = null; if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.old_primary != null && message.hasOwnProperty("old_primary")) - object.old_primary = $root.topodata.TabletAlias.toObject(message.old_primary, options); + object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this TabletExternallyReparentedResponse to JSON. + * Converts this SetKeyspaceDurabilityPolicyResponse to JSON. * @function toJSON - * @memberof vtctldata.TabletExternallyReparentedResponse + * @memberof vtctldata.SetKeyspaceDurabilityPolicyResponse * @instance * @returns {Object.} JSON object */ - TabletExternallyReparentedResponse.prototype.toJSON = function toJSON() { + SetKeyspaceDurabilityPolicyResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TabletExternallyReparentedResponse; + return SetKeyspaceDurabilityPolicyResponse; })(); - vtctldata.UpdateCellInfoRequest = (function() { + vtctldata.SetKeyspaceServedFromRequest = (function() { /** - * Properties of an UpdateCellInfoRequest. + * Properties of a SetKeyspaceServedFromRequest. * @memberof vtctldata - * @interface IUpdateCellInfoRequest - * @property {string|null} [name] UpdateCellInfoRequest name - * @property {topodata.ICellInfo|null} [cell_info] UpdateCellInfoRequest cell_info + * @interface ISetKeyspaceServedFromRequest + * @property {string|null} [keyspace] SetKeyspaceServedFromRequest keyspace + * @property {topodata.TabletType|null} [tablet_type] SetKeyspaceServedFromRequest tablet_type + * @property {Array.|null} [cells] SetKeyspaceServedFromRequest cells + * @property {boolean|null} [remove] SetKeyspaceServedFromRequest remove + * @property {string|null} [source_keyspace] SetKeyspaceServedFromRequest source_keyspace */ /** - * Constructs a new UpdateCellInfoRequest. + * Constructs a new SetKeyspaceServedFromRequest. * @memberof vtctldata - * @classdesc Represents an UpdateCellInfoRequest. - * @implements IUpdateCellInfoRequest + * @classdesc Represents a SetKeyspaceServedFromRequest. + * @implements ISetKeyspaceServedFromRequest * @constructor - * @param {vtctldata.IUpdateCellInfoRequest=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceServedFromRequest=} [properties] Properties to set */ - function UpdateCellInfoRequest(properties) { + function SetKeyspaceServedFromRequest(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117260,88 +119384,130 @@ $root.vtctldata = (function() { } /** - * UpdateCellInfoRequest name. - * @member {string} name - * @memberof vtctldata.UpdateCellInfoRequest + * SetKeyspaceServedFromRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SetKeyspaceServedFromRequest * @instance */ - UpdateCellInfoRequest.prototype.name = ""; + SetKeyspaceServedFromRequest.prototype.keyspace = ""; /** - * UpdateCellInfoRequest cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.UpdateCellInfoRequest + * SetKeyspaceServedFromRequest tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof vtctldata.SetKeyspaceServedFromRequest * @instance */ - UpdateCellInfoRequest.prototype.cell_info = null; + SetKeyspaceServedFromRequest.prototype.tablet_type = 0; /** - * Creates a new UpdateCellInfoRequest instance using the specified properties. + * SetKeyspaceServedFromRequest cells. + * @member {Array.} cells + * @memberof vtctldata.SetKeyspaceServedFromRequest + * @instance + */ + SetKeyspaceServedFromRequest.prototype.cells = $util.emptyArray; + + /** + * SetKeyspaceServedFromRequest remove. + * @member {boolean} remove + * @memberof vtctldata.SetKeyspaceServedFromRequest + * @instance + */ + SetKeyspaceServedFromRequest.prototype.remove = false; + + /** + * SetKeyspaceServedFromRequest source_keyspace. + * @member {string} source_keyspace + * @memberof vtctldata.SetKeyspaceServedFromRequest + * @instance + */ + SetKeyspaceServedFromRequest.prototype.source_keyspace = ""; + + /** + * Creates a new SetKeyspaceServedFromRequest instance using the specified properties. * @function create - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static - * @param {vtctldata.IUpdateCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest instance + * @param {vtctldata.ISetKeyspaceServedFromRequest=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest instance */ - UpdateCellInfoRequest.create = function create(properties) { - return new UpdateCellInfoRequest(properties); + SetKeyspaceServedFromRequest.create = function create(properties) { + return new SetKeyspaceServedFromRequest(properties); }; /** - * Encodes the specified UpdateCellInfoRequest message. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceServedFromRequest message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static - * @param {vtctldata.IUpdateCellInfoRequest} message UpdateCellInfoRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellInfoRequest.encode = function encode(message, writer) { + SetKeyspaceServedFromRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tablet_type); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); + if (message.remove != null && Object.hasOwnProperty.call(message, "remove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.remove); + if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_keyspace); return writer; }; /** - * Encodes the specified UpdateCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceServedFromRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static - * @param {vtctldata.IUpdateCellInfoRequest} message UpdateCellInfoRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceServedFromRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCellInfoRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellInfoRequest.decode = function decode(reader, length) { + SetKeyspaceServedFromRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellInfoRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceServedFromRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.keyspace = reader.string(); break; case 2: - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + message.tablet_type = reader.int32(); + break; + case 3: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 4: + message.remove = reader.bool(); + break; + case 5: + message.source_keyspace = reader.string(); break; default: reader.skipType(tag & 7); @@ -117352,122 +119518,211 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateCellInfoRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceServedFromRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceServedFromRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCellInfoRequest message. + * Verifies a SetKeyspaceServedFromRequest message. * @function verify - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCellInfoRequest.verify = function verify(message) { + SetKeyspaceServedFromRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - var error = $root.topodata.CellInfo.verify(message.cell_info); - if (error) - return "cell_info." + error; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } + if (message.remove != null && message.hasOwnProperty("remove")) + if (typeof message.remove !== "boolean") + return "remove: boolean expected"; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + if (!$util.isString(message.source_keyspace)) + return "source_keyspace: string expected"; return null; }; /** - * Creates an UpdateCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceServedFromRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + * @returns {vtctldata.SetKeyspaceServedFromRequest} SetKeyspaceServedFromRequest */ - UpdateCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateCellInfoRequest) + SetKeyspaceServedFromRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceServedFromRequest) return object; - var message = new $root.vtctldata.UpdateCellInfoRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.UpdateCellInfoRequest.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + var message = new $root.vtctldata.SetKeyspaceServedFromRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + switch (object.tablet_type) { + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; + } + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.SetKeyspaceServedFromRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } + if (object.remove != null) + message.remove = Boolean(object.remove); + if (object.source_keyspace != null) + message.source_keyspace = String(object.source_keyspace); return message; }; /** - * Creates a plain object from an UpdateCellInfoRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceServedFromRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @static - * @param {vtctldata.UpdateCellInfoRequest} message UpdateCellInfoRequest + * @param {vtctldata.SetKeyspaceServedFromRequest} message SetKeyspaceServedFromRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCellInfoRequest.toObject = function toObject(message, options) { + SetKeyspaceServedFromRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.cells = []; if (options.defaults) { - object.name = ""; - object.cell_info = null; + object.keyspace = ""; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.remove = false; + object.source_keyspace = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.remove != null && message.hasOwnProperty("remove")) + object.remove = message.remove; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + object.source_keyspace = message.source_keyspace; return object; }; /** - * Converts this UpdateCellInfoRequest to JSON. + * Converts this SetKeyspaceServedFromRequest to JSON. * @function toJSON - * @memberof vtctldata.UpdateCellInfoRequest + * @memberof vtctldata.SetKeyspaceServedFromRequest * @instance * @returns {Object.} JSON object */ - UpdateCellInfoRequest.prototype.toJSON = function toJSON() { + SetKeyspaceServedFromRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateCellInfoRequest; + return SetKeyspaceServedFromRequest; })(); - vtctldata.UpdateCellInfoResponse = (function() { + vtctldata.SetKeyspaceServedFromResponse = (function() { /** - * Properties of an UpdateCellInfoResponse. + * Properties of a SetKeyspaceServedFromResponse. * @memberof vtctldata - * @interface IUpdateCellInfoResponse - * @property {string|null} [name] UpdateCellInfoResponse name - * @property {topodata.ICellInfo|null} [cell_info] UpdateCellInfoResponse cell_info + * @interface ISetKeyspaceServedFromResponse + * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceServedFromResponse keyspace */ /** - * Constructs a new UpdateCellInfoResponse. + * Constructs a new SetKeyspaceServedFromResponse. * @memberof vtctldata - * @classdesc Represents an UpdateCellInfoResponse. - * @implements IUpdateCellInfoResponse + * @classdesc Represents a SetKeyspaceServedFromResponse. + * @implements ISetKeyspaceServedFromResponse * @constructor - * @param {vtctldata.IUpdateCellInfoResponse=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceServedFromResponse=} [properties] Properties to set */ - function UpdateCellInfoResponse(properties) { + function SetKeyspaceServedFromResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117475,88 +119730,75 @@ $root.vtctldata = (function() { } /** - * UpdateCellInfoResponse name. - * @member {string} name - * @memberof vtctldata.UpdateCellInfoResponse - * @instance - */ - UpdateCellInfoResponse.prototype.name = ""; - - /** - * UpdateCellInfoResponse cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.UpdateCellInfoResponse + * SetKeyspaceServedFromResponse keyspace. + * @member {topodata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.SetKeyspaceServedFromResponse * @instance */ - UpdateCellInfoResponse.prototype.cell_info = null; + SetKeyspaceServedFromResponse.prototype.keyspace = null; /** - * Creates a new UpdateCellInfoResponse instance using the specified properties. + * Creates a new SetKeyspaceServedFromResponse instance using the specified properties. * @function create - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static - * @param {vtctldata.IUpdateCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse instance + * @param {vtctldata.ISetKeyspaceServedFromResponse=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse instance */ - UpdateCellInfoResponse.create = function create(properties) { - return new UpdateCellInfoResponse(properties); + SetKeyspaceServedFromResponse.create = function create(properties) { + return new SetKeyspaceServedFromResponse(properties); }; /** - * Encodes the specified UpdateCellInfoResponse message. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceServedFromResponse message. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static - * @param {vtctldata.IUpdateCellInfoResponse} message UpdateCellInfoResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellInfoResponse.encode = function encode(message, writer) { + SetKeyspaceServedFromResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceServedFromResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceServedFromResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static - * @param {vtctldata.IUpdateCellInfoResponse} message UpdateCellInfoResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceServedFromResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCellInfoResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse + * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellInfoResponse.decode = function decode(reader, length) { + SetKeyspaceServedFromResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellInfoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceServedFromResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -117567,122 +119809,113 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateCellInfoResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceServedFromResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse + * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceServedFromResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCellInfoResponse message. + * Verifies a SetKeyspaceServedFromResponse message. * @function verify - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCellInfoResponse.verify = function verify(message) { + SetKeyspaceServedFromResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - var error = $root.topodata.CellInfo.verify(message.cell_info); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.topodata.Keyspace.verify(message.keyspace); if (error) - return "cell_info." + error; + return "keyspace." + error; } return null; }; /** - * Creates an UpdateCellInfoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceServedFromResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse + * @returns {vtctldata.SetKeyspaceServedFromResponse} SetKeyspaceServedFromResponse */ - UpdateCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateCellInfoResponse) + SetKeyspaceServedFromResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceServedFromResponse) return object; - var message = new $root.vtctldata.UpdateCellInfoResponse(); - if (object.name != null) - message.name = String(object.name); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.UpdateCellInfoResponse.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); + var message = new $root.vtctldata.SetKeyspaceServedFromResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.SetKeyspaceServedFromResponse.keyspace: object expected"); + message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from an UpdateCellInfoResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceServedFromResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @static - * @param {vtctldata.UpdateCellInfoResponse} message UpdateCellInfoResponse + * @param {vtctldata.SetKeyspaceServedFromResponse} message SetKeyspaceServedFromResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCellInfoResponse.toObject = function toObject(message, options) { + SetKeyspaceServedFromResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.cell_info = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); + if (options.defaults) + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this UpdateCellInfoResponse to JSON. + * Converts this SetKeyspaceServedFromResponse to JSON. * @function toJSON - * @memberof vtctldata.UpdateCellInfoResponse + * @memberof vtctldata.SetKeyspaceServedFromResponse * @instance * @returns {Object.} JSON object */ - UpdateCellInfoResponse.prototype.toJSON = function toJSON() { + SetKeyspaceServedFromResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateCellInfoResponse; + return SetKeyspaceServedFromResponse; })(); - vtctldata.UpdateCellsAliasRequest = (function() { + vtctldata.SetKeyspaceShardingInfoRequest = (function() { /** - * Properties of an UpdateCellsAliasRequest. + * Properties of a SetKeyspaceShardingInfoRequest. * @memberof vtctldata - * @interface IUpdateCellsAliasRequest - * @property {string|null} [name] UpdateCellsAliasRequest name - * @property {topodata.ICellsAlias|null} [cells_alias] UpdateCellsAliasRequest cells_alias + * @interface ISetKeyspaceShardingInfoRequest + * @property {string|null} [keyspace] SetKeyspaceShardingInfoRequest keyspace + * @property {boolean|null} [force] SetKeyspaceShardingInfoRequest force */ /** - * Constructs a new UpdateCellsAliasRequest. + * Constructs a new SetKeyspaceShardingInfoRequest. * @memberof vtctldata - * @classdesc Represents an UpdateCellsAliasRequest. - * @implements IUpdateCellsAliasRequest + * @classdesc Represents a SetKeyspaceShardingInfoRequest. + * @implements ISetKeyspaceShardingInfoRequest * @constructor - * @param {vtctldata.IUpdateCellsAliasRequest=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceShardingInfoRequest=} [properties] Properties to set */ - function UpdateCellsAliasRequest(properties) { + function SetKeyspaceShardingInfoRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117690,88 +119923,88 @@ $root.vtctldata = (function() { } /** - * UpdateCellsAliasRequest name. - * @member {string} name - * @memberof vtctldata.UpdateCellsAliasRequest + * SetKeyspaceShardingInfoRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @instance */ - UpdateCellsAliasRequest.prototype.name = ""; + SetKeyspaceShardingInfoRequest.prototype.keyspace = ""; /** - * UpdateCellsAliasRequest cells_alias. - * @member {topodata.ICellsAlias|null|undefined} cells_alias - * @memberof vtctldata.UpdateCellsAliasRequest + * SetKeyspaceShardingInfoRequest force. + * @member {boolean} force + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @instance */ - UpdateCellsAliasRequest.prototype.cells_alias = null; + SetKeyspaceShardingInfoRequest.prototype.force = false; /** - * Creates a new UpdateCellsAliasRequest instance using the specified properties. + * Creates a new SetKeyspaceShardingInfoRequest instance using the specified properties. * @function create - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static - * @param {vtctldata.IUpdateCellsAliasRequest=} [properties] Properties to set - * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest instance + * @param {vtctldata.ISetKeyspaceShardingInfoRequest=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest instance */ - UpdateCellsAliasRequest.create = function create(properties) { - return new UpdateCellsAliasRequest(properties); + SetKeyspaceShardingInfoRequest.create = function create(properties) { + return new SetKeyspaceShardingInfoRequest(properties); }; /** - * Encodes the specified UpdateCellsAliasRequest message. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceShardingInfoRequest message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static - * @param {vtctldata.IUpdateCellsAliasRequest} message UpdateCellsAliasRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellsAliasRequest.encode = function encode(message, writer) { + SetKeyspaceShardingInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cells_alias != null && Object.hasOwnProperty.call(message, "cells_alias")) - $root.topodata.CellsAlias.encode(message.cells_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); return writer; }; /** - * Encodes the specified UpdateCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. + * Encodes the specified SetKeyspaceShardingInfoRequest message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static - * @param {vtctldata.IUpdateCellsAliasRequest} message UpdateCellsAliasRequest message or plain object to encode + * @param {vtctldata.ISetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceShardingInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer. + * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest + * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellsAliasRequest.decode = function decode(reader, length) { + SetKeyspaceShardingInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellsAliasRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceShardingInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.keyspace = reader.string(); break; - case 2: - message.cells_alias = $root.topodata.CellsAlias.decode(reader, reader.uint32()); + case 4: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -117782,122 +120015,116 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceShardingInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest + * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceShardingInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCellsAliasRequest message. + * Verifies a SetKeyspaceShardingInfoRequest message. * @function verify - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCellsAliasRequest.verify = function verify(message) { + SetKeyspaceShardingInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) { - var error = $root.topodata.CellsAlias.verify(message.cells_alias); - if (error) - return "cells_alias." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates an UpdateCellsAliasRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceShardingInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest + * @returns {vtctldata.SetKeyspaceShardingInfoRequest} SetKeyspaceShardingInfoRequest */ - UpdateCellsAliasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateCellsAliasRequest) + SetKeyspaceShardingInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceShardingInfoRequest) return object; - var message = new $root.vtctldata.UpdateCellsAliasRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cells_alias != null) { - if (typeof object.cells_alias !== "object") - throw TypeError(".vtctldata.UpdateCellsAliasRequest.cells_alias: object expected"); - message.cells_alias = $root.topodata.CellsAlias.fromObject(object.cells_alias); - } + var message = new $root.vtctldata.SetKeyspaceShardingInfoRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from an UpdateCellsAliasRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceShardingInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @static - * @param {vtctldata.UpdateCellsAliasRequest} message UpdateCellsAliasRequest + * @param {vtctldata.SetKeyspaceShardingInfoRequest} message SetKeyspaceShardingInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCellsAliasRequest.toObject = function toObject(message, options) { + SetKeyspaceShardingInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.cells_alias = null; + object.keyspace = ""; + object.force = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) - object.cells_alias = $root.topodata.CellsAlias.toObject(message.cells_alias, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this UpdateCellsAliasRequest to JSON. + * Converts this SetKeyspaceShardingInfoRequest to JSON. * @function toJSON - * @memberof vtctldata.UpdateCellsAliasRequest + * @memberof vtctldata.SetKeyspaceShardingInfoRequest * @instance * @returns {Object.} JSON object */ - UpdateCellsAliasRequest.prototype.toJSON = function toJSON() { + SetKeyspaceShardingInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateCellsAliasRequest; + return SetKeyspaceShardingInfoRequest; })(); - vtctldata.UpdateCellsAliasResponse = (function() { + vtctldata.SetKeyspaceShardingInfoResponse = (function() { /** - * Properties of an UpdateCellsAliasResponse. + * Properties of a SetKeyspaceShardingInfoResponse. * @memberof vtctldata - * @interface IUpdateCellsAliasResponse - * @property {string|null} [name] UpdateCellsAliasResponse name - * @property {topodata.ICellsAlias|null} [cells_alias] UpdateCellsAliasResponse cells_alias + * @interface ISetKeyspaceShardingInfoResponse + * @property {topodata.IKeyspace|null} [keyspace] SetKeyspaceShardingInfoResponse keyspace */ /** - * Constructs a new UpdateCellsAliasResponse. + * Constructs a new SetKeyspaceShardingInfoResponse. * @memberof vtctldata - * @classdesc Represents an UpdateCellsAliasResponse. - * @implements IUpdateCellsAliasResponse + * @classdesc Represents a SetKeyspaceShardingInfoResponse. + * @implements ISetKeyspaceShardingInfoResponse * @constructor - * @param {vtctldata.IUpdateCellsAliasResponse=} [properties] Properties to set + * @param {vtctldata.ISetKeyspaceShardingInfoResponse=} [properties] Properties to set */ - function UpdateCellsAliasResponse(properties) { + function SetKeyspaceShardingInfoResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117905,88 +120132,75 @@ $root.vtctldata = (function() { } /** - * UpdateCellsAliasResponse name. - * @member {string} name - * @memberof vtctldata.UpdateCellsAliasResponse - * @instance - */ - UpdateCellsAliasResponse.prototype.name = ""; - - /** - * UpdateCellsAliasResponse cells_alias. - * @member {topodata.ICellsAlias|null|undefined} cells_alias - * @memberof vtctldata.UpdateCellsAliasResponse + * SetKeyspaceShardingInfoResponse keyspace. + * @member {topodata.IKeyspace|null|undefined} keyspace + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @instance */ - UpdateCellsAliasResponse.prototype.cells_alias = null; + SetKeyspaceShardingInfoResponse.prototype.keyspace = null; /** - * Creates a new UpdateCellsAliasResponse instance using the specified properties. + * Creates a new SetKeyspaceShardingInfoResponse instance using the specified properties. * @function create - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static - * @param {vtctldata.IUpdateCellsAliasResponse=} [properties] Properties to set - * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse instance + * @param {vtctldata.ISetKeyspaceShardingInfoResponse=} [properties] Properties to set + * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse instance */ - UpdateCellsAliasResponse.create = function create(properties) { - return new UpdateCellsAliasResponse(properties); + SetKeyspaceShardingInfoResponse.create = function create(properties) { + return new SetKeyspaceShardingInfoResponse(properties); }; /** - * Encodes the specified UpdateCellsAliasResponse message. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceShardingInfoResponse message. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static - * @param {vtctldata.IUpdateCellsAliasResponse} message UpdateCellsAliasResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellsAliasResponse.encode = function encode(message, writer) { + SetKeyspaceShardingInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cells_alias != null && Object.hasOwnProperty.call(message, "cells_alias")) - $root.topodata.CellsAlias.encode(message.cells_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. + * Encodes the specified SetKeyspaceShardingInfoResponse message, length delimited. Does not implicitly {@link vtctldata.SetKeyspaceShardingInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static - * @param {vtctldata.IUpdateCellsAliasResponse} message UpdateCellsAliasResponse message or plain object to encode + * @param {vtctldata.ISetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetKeyspaceShardingInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer. + * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse + * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellsAliasResponse.decode = function decode(reader, length) { + SetKeyspaceShardingInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellsAliasResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetKeyspaceShardingInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.cells_alias = $root.topodata.CellsAlias.decode(reader, reader.uint32()); + message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -117997,121 +120211,114 @@ $root.vtctldata = (function() { }; /** - * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer, length delimited. + * Decodes a SetKeyspaceShardingInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse + * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { + SetKeyspaceShardingInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCellsAliasResponse message. + * Verifies a SetKeyspaceShardingInfoResponse message. * @function verify - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCellsAliasResponse.verify = function verify(message) { + SetKeyspaceShardingInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) { - var error = $root.topodata.CellsAlias.verify(message.cells_alias); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.topodata.Keyspace.verify(message.keyspace); if (error) - return "cells_alias." + error; + return "keyspace." + error; } return null; }; /** - * Creates an UpdateCellsAliasResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetKeyspaceShardingInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse + * @returns {vtctldata.SetKeyspaceShardingInfoResponse} SetKeyspaceShardingInfoResponse */ - UpdateCellsAliasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.UpdateCellsAliasResponse) + SetKeyspaceShardingInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetKeyspaceShardingInfoResponse) return object; - var message = new $root.vtctldata.UpdateCellsAliasResponse(); - if (object.name != null) - message.name = String(object.name); - if (object.cells_alias != null) { - if (typeof object.cells_alias !== "object") - throw TypeError(".vtctldata.UpdateCellsAliasResponse.cells_alias: object expected"); - message.cells_alias = $root.topodata.CellsAlias.fromObject(object.cells_alias); + var message = new $root.vtctldata.SetKeyspaceShardingInfoResponse(); + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtctldata.SetKeyspaceShardingInfoResponse.keyspace: object expected"); + message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from an UpdateCellsAliasResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetKeyspaceShardingInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @static - * @param {vtctldata.UpdateCellsAliasResponse} message UpdateCellsAliasResponse + * @param {vtctldata.SetKeyspaceShardingInfoResponse} message SetKeyspaceShardingInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCellsAliasResponse.toObject = function toObject(message, options) { + SetKeyspaceShardingInfoResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.cells_alias = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) - object.cells_alias = $root.topodata.CellsAlias.toObject(message.cells_alias, options); + if (options.defaults) + object.keyspace = null; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this UpdateCellsAliasResponse to JSON. + * Converts this SetKeyspaceShardingInfoResponse to JSON. * @function toJSON - * @memberof vtctldata.UpdateCellsAliasResponse + * @memberof vtctldata.SetKeyspaceShardingInfoResponse * @instance * @returns {Object.} JSON object */ - UpdateCellsAliasResponse.prototype.toJSON = function toJSON() { + SetKeyspaceShardingInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateCellsAliasResponse; + return SetKeyspaceShardingInfoResponse; })(); - vtctldata.ValidateRequest = (function() { + vtctldata.SetShardIsPrimaryServingRequest = (function() { /** - * Properties of a ValidateRequest. + * Properties of a SetShardIsPrimaryServingRequest. * @memberof vtctldata - * @interface IValidateRequest - * @property {boolean|null} [ping_tablets] ValidateRequest ping_tablets + * @interface ISetShardIsPrimaryServingRequest + * @property {string|null} [keyspace] SetShardIsPrimaryServingRequest keyspace + * @property {string|null} [shard] SetShardIsPrimaryServingRequest shard + * @property {boolean|null} [is_serving] SetShardIsPrimaryServingRequest is_serving */ /** - * Constructs a new ValidateRequest. + * Constructs a new SetShardIsPrimaryServingRequest. * @memberof vtctldata - * @classdesc Represents a ValidateRequest. - * @implements IValidateRequest + * @classdesc Represents a SetShardIsPrimaryServingRequest. + * @implements ISetShardIsPrimaryServingRequest * @constructor - * @param {vtctldata.IValidateRequest=} [properties] Properties to set + * @param {vtctldata.ISetShardIsPrimaryServingRequest=} [properties] Properties to set */ - function ValidateRequest(properties) { + function SetShardIsPrimaryServingRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118119,75 +120326,101 @@ $root.vtctldata = (function() { } /** - * ValidateRequest ping_tablets. - * @member {boolean} ping_tablets - * @memberof vtctldata.ValidateRequest + * SetShardIsPrimaryServingRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @instance */ - ValidateRequest.prototype.ping_tablets = false; + SetShardIsPrimaryServingRequest.prototype.keyspace = ""; /** - * Creates a new ValidateRequest instance using the specified properties. + * SetShardIsPrimaryServingRequest shard. + * @member {string} shard + * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @instance + */ + SetShardIsPrimaryServingRequest.prototype.shard = ""; + + /** + * SetShardIsPrimaryServingRequest is_serving. + * @member {boolean} is_serving + * @memberof vtctldata.SetShardIsPrimaryServingRequest + * @instance + */ + SetShardIsPrimaryServingRequest.prototype.is_serving = false; + + /** + * Creates a new SetShardIsPrimaryServingRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static - * @param {vtctldata.IValidateRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateRequest} ValidateRequest instance + * @param {vtctldata.ISetShardIsPrimaryServingRequest=} [properties] Properties to set + * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest instance */ - ValidateRequest.create = function create(properties) { - return new ValidateRequest(properties); + SetShardIsPrimaryServingRequest.create = function create(properties) { + return new SetShardIsPrimaryServingRequest(properties); }; /** - * Encodes the specified ValidateRequest message. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. + * Encodes the specified SetShardIsPrimaryServingRequest message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static - * @param {vtctldata.IValidateRequest} message ValidateRequest message or plain object to encode + * @param {vtctldata.ISetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateRequest.encode = function encode(message, writer) { + SetShardIsPrimaryServingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ping_tablets); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.is_serving != null && Object.hasOwnProperty.call(message, "is_serving")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_serving); return writer; }; /** - * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. + * Encodes the specified SetShardIsPrimaryServingRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static - * @param {vtctldata.IValidateRequest} message ValidateRequest message or plain object to encode + * @param {vtctldata.ISetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetShardIsPrimaryServingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateRequest message from the specified reader or buffer. + * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateRequest} ValidateRequest + * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateRequest.decode = function decode(reader, length) { + SetShardIsPrimaryServingRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardIsPrimaryServingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ping_tablets = reader.bool(); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.is_serving = reader.bool(); break; default: reader.skipType(tag & 7); @@ -118198,110 +120431,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. + * Decodes a SetShardIsPrimaryServingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateRequest} ValidateRequest + * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateRequest.decodeDelimited = function decodeDelimited(reader) { + SetShardIsPrimaryServingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateRequest message. + * Verifies a SetShardIsPrimaryServingRequest message. * @function verify - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateRequest.verify = function verify(message) { + SetShardIsPrimaryServingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - if (typeof message.ping_tablets !== "boolean") - return "ping_tablets: boolean expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.is_serving != null && message.hasOwnProperty("is_serving")) + if (typeof message.is_serving !== "boolean") + return "is_serving: boolean expected"; return null; }; /** - * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardIsPrimaryServingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateRequest} ValidateRequest + * @returns {vtctldata.SetShardIsPrimaryServingRequest} SetShardIsPrimaryServingRequest */ - ValidateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateRequest) + SetShardIsPrimaryServingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetShardIsPrimaryServingRequest) return object; - var message = new $root.vtctldata.ValidateRequest(); - if (object.ping_tablets != null) - message.ping_tablets = Boolean(object.ping_tablets); + var message = new $root.vtctldata.SetShardIsPrimaryServingRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.is_serving != null) + message.is_serving = Boolean(object.is_serving); return message; }; /** - * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetShardIsPrimaryServingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @static - * @param {vtctldata.ValidateRequest} message ValidateRequest + * @param {vtctldata.SetShardIsPrimaryServingRequest} message SetShardIsPrimaryServingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateRequest.toObject = function toObject(message, options) { + SetShardIsPrimaryServingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.ping_tablets = false; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - object.ping_tablets = message.ping_tablets; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.is_serving = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.is_serving != null && message.hasOwnProperty("is_serving")) + object.is_serving = message.is_serving; return object; }; /** - * Converts this ValidateRequest to JSON. + * Converts this SetShardIsPrimaryServingRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateRequest + * @memberof vtctldata.SetShardIsPrimaryServingRequest * @instance * @returns {Object.} JSON object */ - ValidateRequest.prototype.toJSON = function toJSON() { + SetShardIsPrimaryServingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateRequest; + return SetShardIsPrimaryServingRequest; })(); - vtctldata.ValidateResponse = (function() { + vtctldata.SetShardIsPrimaryServingResponse = (function() { /** - * Properties of a ValidateResponse. + * Properties of a SetShardIsPrimaryServingResponse. * @memberof vtctldata - * @interface IValidateResponse - * @property {Array.|null} [results] ValidateResponse results - * @property {Object.|null} [results_by_keyspace] ValidateResponse results_by_keyspace + * @interface ISetShardIsPrimaryServingResponse + * @property {topodata.IShard|null} [shard] SetShardIsPrimaryServingResponse shard */ /** - * Constructs a new ValidateResponse. + * Constructs a new SetShardIsPrimaryServingResponse. * @memberof vtctldata - * @classdesc Represents a ValidateResponse. - * @implements IValidateResponse + * @classdesc Represents a SetShardIsPrimaryServingResponse. + * @implements ISetShardIsPrimaryServingResponse * @constructor - * @param {vtctldata.IValidateResponse=} [properties] Properties to set + * @param {vtctldata.ISetShardIsPrimaryServingResponse=} [properties] Properties to set */ - function ValidateResponse(properties) { - this.results = []; - this.results_by_keyspace = {}; + function SetShardIsPrimaryServingResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118309,113 +120556,75 @@ $root.vtctldata = (function() { } /** - * ValidateResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateResponse - * @instance - */ - ValidateResponse.prototype.results = $util.emptyArray; - - /** - * ValidateResponse results_by_keyspace. - * @member {Object.} results_by_keyspace - * @memberof vtctldata.ValidateResponse + * SetShardIsPrimaryServingResponse shard. + * @member {topodata.IShard|null|undefined} shard + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @instance */ - ValidateResponse.prototype.results_by_keyspace = $util.emptyObject; + SetShardIsPrimaryServingResponse.prototype.shard = null; /** - * Creates a new ValidateResponse instance using the specified properties. + * Creates a new SetShardIsPrimaryServingResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static - * @param {vtctldata.IValidateResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateResponse} ValidateResponse instance + * @param {vtctldata.ISetShardIsPrimaryServingResponse=} [properties] Properties to set + * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse instance */ - ValidateResponse.create = function create(properties) { - return new ValidateResponse(properties); + SetShardIsPrimaryServingResponse.create = function create(properties) { + return new SetShardIsPrimaryServingResponse(properties); }; /** - * Encodes the specified ValidateResponse message. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. + * Encodes the specified SetShardIsPrimaryServingResponse message. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static - * @param {vtctldata.IValidateResponse} message ValidateResponse message or plain object to encode + * @param {vtctldata.ISetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateResponse.encode = function encode(message, writer) { + SetShardIsPrimaryServingResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.results_by_keyspace != null && Object.hasOwnProperty.call(message, "results_by_keyspace")) - for (var keys = Object.keys(message.results_by_keyspace), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.ValidateKeyspaceResponse.encode(message.results_by_keyspace[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidateResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. + * Encodes the specified SetShardIsPrimaryServingResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardIsPrimaryServingResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static - * @param {vtctldata.IValidateResponse} message ValidateResponse message or plain object to encode + * @param {vtctldata.ISetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetShardIsPrimaryServingResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateResponse message from the specified reader or buffer. + * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateResponse} ValidateResponse + * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateResponse.decode = function decode(reader, length) { + SetShardIsPrimaryServingResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardIsPrimaryServingResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; - case 2: - if (message.results_by_keyspace === $util.emptyObject) - message.results_by_keyspace = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.ValidateKeyspaceResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.results_by_keyspace[key] = value; + message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -118426,148 +120635,120 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateResponse message from the specified reader or buffer, length delimited. + * Decodes a SetShardIsPrimaryServingResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateResponse} ValidateResponse + * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateResponse.decodeDelimited = function decodeDelimited(reader) { + SetShardIsPrimaryServingResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateResponse message. + * Verifies a SetShardIsPrimaryServingResponse message. * @function verify - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateResponse.verify = function verify(message) { + SetShardIsPrimaryServingResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } - if (message.results_by_keyspace != null && message.hasOwnProperty("results_by_keyspace")) { - if (!$util.isObject(message.results_by_keyspace)) - return "results_by_keyspace: object expected"; - var key = Object.keys(message.results_by_keyspace); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.ValidateKeyspaceResponse.verify(message.results_by_keyspace[key[i]]); - if (error) - return "results_by_keyspace." + error; - } + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.topodata.Shard.verify(message.shard); + if (error) + return "shard." + error; } return null; }; /** - * Creates a ValidateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardIsPrimaryServingResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateResponse} ValidateResponse + * @returns {vtctldata.SetShardIsPrimaryServingResponse} SetShardIsPrimaryServingResponse */ - ValidateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateResponse) + SetShardIsPrimaryServingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetShardIsPrimaryServingResponse) return object; - var message = new $root.vtctldata.ValidateResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - if (object.results_by_keyspace) { - if (typeof object.results_by_keyspace !== "object") - throw TypeError(".vtctldata.ValidateResponse.results_by_keyspace: object expected"); - message.results_by_keyspace = {}; - for (var keys = Object.keys(object.results_by_keyspace), i = 0; i < keys.length; ++i) { - if (typeof object.results_by_keyspace[keys[i]] !== "object") - throw TypeError(".vtctldata.ValidateResponse.results_by_keyspace: object expected"); - message.results_by_keyspace[keys[i]] = $root.vtctldata.ValidateKeyspaceResponse.fromObject(object.results_by_keyspace[keys[i]]); - } + var message = new $root.vtctldata.SetShardIsPrimaryServingResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.SetShardIsPrimaryServingResponse.shard: object expected"); + message.shard = $root.topodata.Shard.fromObject(object.shard); } return message; }; /** - * Creates a plain object from a ValidateResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetShardIsPrimaryServingResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @static - * @param {vtctldata.ValidateResponse} message ValidateResponse + * @param {vtctldata.SetShardIsPrimaryServingResponse} message SetShardIsPrimaryServingResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateResponse.toObject = function toObject(message, options) { + SetShardIsPrimaryServingResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.objects || options.defaults) - object.results_by_keyspace = {}; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - var keys2; - if (message.results_by_keyspace && (keys2 = Object.keys(message.results_by_keyspace)).length) { - object.results_by_keyspace = {}; - for (var j = 0; j < keys2.length; ++j) - object.results_by_keyspace[keys2[j]] = $root.vtctldata.ValidateKeyspaceResponse.toObject(message.results_by_keyspace[keys2[j]], options); - } + if (options.defaults) + object.shard = null; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.topodata.Shard.toObject(message.shard, options); return object; }; /** - * Converts this ValidateResponse to JSON. + * Converts this SetShardIsPrimaryServingResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateResponse + * @memberof vtctldata.SetShardIsPrimaryServingResponse * @instance * @returns {Object.} JSON object */ - ValidateResponse.prototype.toJSON = function toJSON() { + SetShardIsPrimaryServingResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateResponse; + return SetShardIsPrimaryServingResponse; })(); - vtctldata.ValidateKeyspaceRequest = (function() { + vtctldata.SetShardTabletControlRequest = (function() { /** - * Properties of a ValidateKeyspaceRequest. + * Properties of a SetShardTabletControlRequest. * @memberof vtctldata - * @interface IValidateKeyspaceRequest - * @property {string|null} [keyspace] ValidateKeyspaceRequest keyspace - * @property {boolean|null} [ping_tablets] ValidateKeyspaceRequest ping_tablets + * @interface ISetShardTabletControlRequest + * @property {string|null} [keyspace] SetShardTabletControlRequest keyspace + * @property {string|null} [shard] SetShardTabletControlRequest shard + * @property {topodata.TabletType|null} [tablet_type] SetShardTabletControlRequest tablet_type + * @property {Array.|null} [cells] SetShardTabletControlRequest cells + * @property {Array.|null} [denied_tables] SetShardTabletControlRequest denied_tables + * @property {boolean|null} [disable_query_service] SetShardTabletControlRequest disable_query_service + * @property {boolean|null} [remove] SetShardTabletControlRequest remove */ /** - * Constructs a new ValidateKeyspaceRequest. + * Constructs a new SetShardTabletControlRequest. * @memberof vtctldata - * @classdesc Represents a ValidateKeyspaceRequest. - * @implements IValidateKeyspaceRequest + * @classdesc Represents a SetShardTabletControlRequest. + * @implements ISetShardTabletControlRequest * @constructor - * @param {vtctldata.IValidateKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.ISetShardTabletControlRequest=} [properties] Properties to set */ - function ValidateKeyspaceRequest(properties) { + function SetShardTabletControlRequest(properties) { + this.cells = []; + this.denied_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118575,80 +120756,132 @@ $root.vtctldata = (function() { } /** - * ValidateKeyspaceRequest keyspace. + * SetShardTabletControlRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @instance */ - ValidateKeyspaceRequest.prototype.keyspace = ""; + SetShardTabletControlRequest.prototype.keyspace = ""; /** - * ValidateKeyspaceRequest ping_tablets. - * @member {boolean} ping_tablets - * @memberof vtctldata.ValidateKeyspaceRequest + * SetShardTabletControlRequest shard. + * @member {string} shard + * @memberof vtctldata.SetShardTabletControlRequest * @instance */ - ValidateKeyspaceRequest.prototype.ping_tablets = false; + SetShardTabletControlRequest.prototype.shard = ""; /** - * Creates a new ValidateKeyspaceRequest instance using the specified properties. + * SetShardTabletControlRequest tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof vtctldata.SetShardTabletControlRequest + * @instance + */ + SetShardTabletControlRequest.prototype.tablet_type = 0; + + /** + * SetShardTabletControlRequest cells. + * @member {Array.} cells + * @memberof vtctldata.SetShardTabletControlRequest + * @instance + */ + SetShardTabletControlRequest.prototype.cells = $util.emptyArray; + + /** + * SetShardTabletControlRequest denied_tables. + * @member {Array.} denied_tables + * @memberof vtctldata.SetShardTabletControlRequest + * @instance + */ + SetShardTabletControlRequest.prototype.denied_tables = $util.emptyArray; + + /** + * SetShardTabletControlRequest disable_query_service. + * @member {boolean} disable_query_service + * @memberof vtctldata.SetShardTabletControlRequest + * @instance + */ + SetShardTabletControlRequest.prototype.disable_query_service = false; + + /** + * SetShardTabletControlRequest remove. + * @member {boolean} remove + * @memberof vtctldata.SetShardTabletControlRequest + * @instance + */ + SetShardTabletControlRequest.prototype.remove = false; + + /** + * Creates a new SetShardTabletControlRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static - * @param {vtctldata.IValidateKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest instance + * @param {vtctldata.ISetShardTabletControlRequest=} [properties] Properties to set + * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest instance */ - ValidateKeyspaceRequest.create = function create(properties) { - return new ValidateKeyspaceRequest(properties); + SetShardTabletControlRequest.create = function create(properties) { + return new SetShardTabletControlRequest(properties); }; /** - * Encodes the specified ValidateKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. + * Encodes the specified SetShardTabletControlRequest message. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static - * @param {vtctldata.IValidateKeyspaceRequest} message ValidateKeyspaceRequest message or plain object to encode + * @param {vtctldata.ISetShardTabletControlRequest} message SetShardTabletControlRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateKeyspaceRequest.encode = function encode(message, writer) { + SetShardTabletControlRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ping_tablets); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cells[i]); + if (message.denied_tables != null && message.denied_tables.length) + for (var i = 0; i < message.denied_tables.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.denied_tables[i]); + if (message.disable_query_service != null && Object.hasOwnProperty.call(message, "disable_query_service")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disable_query_service); + if (message.remove != null && Object.hasOwnProperty.call(message, "remove")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.remove); return writer; }; /** - * Encodes the specified ValidateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. + * Encodes the specified SetShardTabletControlRequest message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static - * @param {vtctldata.IValidateKeyspaceRequest} message ValidateKeyspaceRequest message or plain object to encode + * @param {vtctldata.ISetShardTabletControlRequest} message SetShardTabletControlRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetShardTabletControlRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer. + * Decodes a SetShardTabletControlRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest + * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateKeyspaceRequest.decode = function decode(reader, length) { + SetShardTabletControlRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardTabletControlRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -118656,7 +120889,26 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - message.ping_tablets = reader.bool(); + message.shard = reader.string(); + break; + case 3: + message.tablet_type = reader.int32(); + break; + case 4: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 5: + if (!(message.denied_tables && message.denied_tables.length)) + message.denied_tables = []; + message.denied_tables.push(reader.string()); + break; + case 6: + message.disable_query_service = reader.bool(); + break; + case 7: + message.remove = reader.bool(); break; default: reader.skipType(tag & 7); @@ -118667,119 +120919,240 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a SetShardTabletControlRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest + * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + SetShardTabletControlRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateKeyspaceRequest message. + * Verifies a SetShardTabletControlRequest message. * @function verify - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateKeyspaceRequest.verify = function verify(message) { + SetShardTabletControlRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - if (typeof message.ping_tablets !== "boolean") - return "ping_tablets: boolean expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + switch (message.tablet_type) { + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.denied_tables != null && message.hasOwnProperty("denied_tables")) { + if (!Array.isArray(message.denied_tables)) + return "denied_tables: array expected"; + for (var i = 0; i < message.denied_tables.length; ++i) + if (!$util.isString(message.denied_tables[i])) + return "denied_tables: string[] expected"; + } + if (message.disable_query_service != null && message.hasOwnProperty("disable_query_service")) + if (typeof message.disable_query_service !== "boolean") + return "disable_query_service: boolean expected"; + if (message.remove != null && message.hasOwnProperty("remove")) + if (typeof message.remove !== "boolean") + return "remove: boolean expected"; return null; }; /** - * Creates a ValidateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardTabletControlRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest + * @returns {vtctldata.SetShardTabletControlRequest} SetShardTabletControlRequest */ - ValidateKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateKeyspaceRequest) + SetShardTabletControlRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetShardTabletControlRequest) return object; - var message = new $root.vtctldata.ValidateKeyspaceRequest(); + var message = new $root.vtctldata.SetShardTabletControlRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.ping_tablets != null) - message.ping_tablets = Boolean(object.ping_tablets); + if (object.shard != null) + message.shard = String(object.shard); + switch (object.tablet_type) { + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "PRIMARY": + case 1: + message.tablet_type = 1; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; + } + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.SetShardTabletControlRequest.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.denied_tables) { + if (!Array.isArray(object.denied_tables)) + throw TypeError(".vtctldata.SetShardTabletControlRequest.denied_tables: array expected"); + message.denied_tables = []; + for (var i = 0; i < object.denied_tables.length; ++i) + message.denied_tables[i] = String(object.denied_tables[i]); + } + if (object.disable_query_service != null) + message.disable_query_service = Boolean(object.disable_query_service); + if (object.remove != null) + message.remove = Boolean(object.remove); return message; }; /** - * Creates a plain object from a ValidateKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetShardTabletControlRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @static - * @param {vtctldata.ValidateKeyspaceRequest} message ValidateKeyspaceRequest + * @param {vtctldata.SetShardTabletControlRequest} message SetShardTabletControlRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateKeyspaceRequest.toObject = function toObject(message, options) { + SetShardTabletControlRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.cells = []; + object.denied_tables = []; + } if (options.defaults) { object.keyspace = ""; - object.ping_tablets = false; + object.shard = ""; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.disable_query_service = false; + object.remove = false; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - object.ping_tablets = message.ping_tablets; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.denied_tables && message.denied_tables.length) { + object.denied_tables = []; + for (var j = 0; j < message.denied_tables.length; ++j) + object.denied_tables[j] = message.denied_tables[j]; + } + if (message.disable_query_service != null && message.hasOwnProperty("disable_query_service")) + object.disable_query_service = message.disable_query_service; + if (message.remove != null && message.hasOwnProperty("remove")) + object.remove = message.remove; return object; }; /** - * Converts this ValidateKeyspaceRequest to JSON. + * Converts this SetShardTabletControlRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateKeyspaceRequest + * @memberof vtctldata.SetShardTabletControlRequest * @instance * @returns {Object.} JSON object */ - ValidateKeyspaceRequest.prototype.toJSON = function toJSON() { + SetShardTabletControlRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateKeyspaceRequest; + return SetShardTabletControlRequest; })(); - vtctldata.ValidateKeyspaceResponse = (function() { + vtctldata.SetShardTabletControlResponse = (function() { /** - * Properties of a ValidateKeyspaceResponse. + * Properties of a SetShardTabletControlResponse. * @memberof vtctldata - * @interface IValidateKeyspaceResponse - * @property {Array.|null} [results] ValidateKeyspaceResponse results - * @property {Object.|null} [results_by_shard] ValidateKeyspaceResponse results_by_shard + * @interface ISetShardTabletControlResponse + * @property {topodata.IShard|null} [shard] SetShardTabletControlResponse shard */ /** - * Constructs a new ValidateKeyspaceResponse. + * Constructs a new SetShardTabletControlResponse. * @memberof vtctldata - * @classdesc Represents a ValidateKeyspaceResponse. - * @implements IValidateKeyspaceResponse + * @classdesc Represents a SetShardTabletControlResponse. + * @implements ISetShardTabletControlResponse * @constructor - * @param {vtctldata.IValidateKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.ISetShardTabletControlResponse=} [properties] Properties to set */ - function ValidateKeyspaceResponse(properties) { - this.results = []; - this.results_by_shard = {}; + function SetShardTabletControlResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118787,113 +121160,75 @@ $root.vtctldata = (function() { } /** - * ValidateKeyspaceResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateKeyspaceResponse - * @instance - */ - ValidateKeyspaceResponse.prototype.results = $util.emptyArray; - - /** - * ValidateKeyspaceResponse results_by_shard. - * @member {Object.} results_by_shard - * @memberof vtctldata.ValidateKeyspaceResponse + * SetShardTabletControlResponse shard. + * @member {topodata.IShard|null|undefined} shard + * @memberof vtctldata.SetShardTabletControlResponse * @instance */ - ValidateKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; + SetShardTabletControlResponse.prototype.shard = null; /** - * Creates a new ValidateKeyspaceResponse instance using the specified properties. + * Creates a new SetShardTabletControlResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static - * @param {vtctldata.IValidateKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse instance + * @param {vtctldata.ISetShardTabletControlResponse=} [properties] Properties to set + * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse instance */ - ValidateKeyspaceResponse.create = function create(properties) { - return new ValidateKeyspaceResponse(properties); + SetShardTabletControlResponse.create = function create(properties) { + return new SetShardTabletControlResponse(properties); }; /** - * Encodes the specified ValidateKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. + * Encodes the specified SetShardTabletControlResponse message. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static - * @param {vtctldata.IValidateKeyspaceResponse} message ValidateKeyspaceResponse message or plain object to encode + * @param {vtctldata.ISetShardTabletControlResponse} message SetShardTabletControlResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateKeyspaceResponse.encode = function encode(message, writer) { + SetShardTabletControlResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) - for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. + * Encodes the specified SetShardTabletControlResponse message, length delimited. Does not implicitly {@link vtctldata.SetShardTabletControlResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static - * @param {vtctldata.IValidateKeyspaceResponse} message ValidateKeyspaceResponse message or plain object to encode + * @param {vtctldata.ISetShardTabletControlResponse} message SetShardTabletControlResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetShardTabletControlResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer. + * Decodes a SetShardTabletControlResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse + * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateKeyspaceResponse.decode = function decode(reader, length) { + SetShardTabletControlResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateKeyspaceResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetShardTabletControlResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; - case 2: - if (message.results_by_shard === $util.emptyObject) - message.results_by_shard = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.results_by_shard[key] = value; + message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -118904,152 +121239,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a SetShardTabletControlResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse + * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + SetShardTabletControlResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateKeyspaceResponse message. + * Verifies a SetShardTabletControlResponse message. * @function verify - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateKeyspaceResponse.verify = function verify(message) { + SetShardTabletControlResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } - if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { - if (!$util.isObject(message.results_by_shard)) - return "results_by_shard: object expected"; - var key = Object.keys(message.results_by_shard); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); - if (error) - return "results_by_shard." + error; - } + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.topodata.Shard.verify(message.shard); + if (error) + return "shard." + error; } return null; }; /** - * Creates a ValidateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetShardTabletControlResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse + * @returns {vtctldata.SetShardTabletControlResponse} SetShardTabletControlResponse */ - ValidateKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateKeyspaceResponse) + SetShardTabletControlResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetShardTabletControlResponse) return object; - var message = new $root.vtctldata.ValidateKeyspaceResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateKeyspaceResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - if (object.results_by_shard) { - if (typeof object.results_by_shard !== "object") - throw TypeError(".vtctldata.ValidateKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard = {}; - for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { - if (typeof object.results_by_shard[keys[i]] !== "object") - throw TypeError(".vtctldata.ValidateKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); - } + var message = new $root.vtctldata.SetShardTabletControlResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.SetShardTabletControlResponse.shard: object expected"); + message.shard = $root.topodata.Shard.fromObject(object.shard); } return message; }; /** - * Creates a plain object from a ValidateKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetShardTabletControlResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @static - * @param {vtctldata.ValidateKeyspaceResponse} message ValidateKeyspaceResponse + * @param {vtctldata.SetShardTabletControlResponse} message SetShardTabletControlResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateKeyspaceResponse.toObject = function toObject(message, options) { + SetShardTabletControlResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.objects || options.defaults) - object.results_by_shard = {}; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - var keys2; - if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { - object.results_by_shard = {}; - for (var j = 0; j < keys2.length; ++j) - object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); - } + if (options.defaults) + object.shard = null; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.topodata.Shard.toObject(message.shard, options); return object; }; /** - * Converts this ValidateKeyspaceResponse to JSON. + * Converts this SetShardTabletControlResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateKeyspaceResponse + * @memberof vtctldata.SetShardTabletControlResponse * @instance * @returns {Object.} JSON object */ - ValidateKeyspaceResponse.prototype.toJSON = function toJSON() { + SetShardTabletControlResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateKeyspaceResponse; + return SetShardTabletControlResponse; })(); - vtctldata.ValidateSchemaKeyspaceRequest = (function() { + vtctldata.SetWritableRequest = (function() { /** - * Properties of a ValidateSchemaKeyspaceRequest. + * Properties of a SetWritableRequest. * @memberof vtctldata - * @interface IValidateSchemaKeyspaceRequest - * @property {string|null} [keyspace] ValidateSchemaKeyspaceRequest keyspace - * @property {Array.|null} [exclude_tables] ValidateSchemaKeyspaceRequest exclude_tables - * @property {boolean|null} [include_views] ValidateSchemaKeyspaceRequest include_views - * @property {boolean|null} [skip_no_primary] ValidateSchemaKeyspaceRequest skip_no_primary - * @property {boolean|null} [include_vschema] ValidateSchemaKeyspaceRequest include_vschema + * @interface ISetWritableRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] SetWritableRequest tablet_alias + * @property {boolean|null} [writable] SetWritableRequest writable */ /** - * Constructs a new ValidateSchemaKeyspaceRequest. + * Constructs a new SetWritableRequest. * @memberof vtctldata - * @classdesc Represents a ValidateSchemaKeyspaceRequest. - * @implements IValidateSchemaKeyspaceRequest + * @classdesc Represents a SetWritableRequest. + * @implements ISetWritableRequest * @constructor - * @param {vtctldata.IValidateSchemaKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.ISetWritableRequest=} [properties] Properties to set */ - function ValidateSchemaKeyspaceRequest(properties) { - this.exclude_tables = []; + function SetWritableRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119057,130 +121353,88 @@ $root.vtctldata = (function() { } /** - * ValidateSchemaKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ValidateSchemaKeyspaceRequest - * @instance - */ - ValidateSchemaKeyspaceRequest.prototype.keyspace = ""; - - /** - * ValidateSchemaKeyspaceRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof vtctldata.ValidateSchemaKeyspaceRequest - * @instance - */ - ValidateSchemaKeyspaceRequest.prototype.exclude_tables = $util.emptyArray; - - /** - * ValidateSchemaKeyspaceRequest include_views. - * @member {boolean} include_views - * @memberof vtctldata.ValidateSchemaKeyspaceRequest - * @instance - */ - ValidateSchemaKeyspaceRequest.prototype.include_views = false; - - /** - * ValidateSchemaKeyspaceRequest skip_no_primary. - * @member {boolean} skip_no_primary - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * SetWritableRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.SetWritableRequest * @instance */ - ValidateSchemaKeyspaceRequest.prototype.skip_no_primary = false; + SetWritableRequest.prototype.tablet_alias = null; /** - * ValidateSchemaKeyspaceRequest include_vschema. - * @member {boolean} include_vschema - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * SetWritableRequest writable. + * @member {boolean} writable + * @memberof vtctldata.SetWritableRequest * @instance */ - ValidateSchemaKeyspaceRequest.prototype.include_vschema = false; + SetWritableRequest.prototype.writable = false; /** - * Creates a new ValidateSchemaKeyspaceRequest instance using the specified properties. + * Creates a new SetWritableRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static - * @param {vtctldata.IValidateSchemaKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest instance - */ - ValidateSchemaKeyspaceRequest.create = function create(properties) { - return new ValidateSchemaKeyspaceRequest(properties); + * @param {vtctldata.ISetWritableRequest=} [properties] Properties to set + * @returns {vtctldata.SetWritableRequest} SetWritableRequest instance + */ + SetWritableRequest.create = function create(properties) { + return new SetWritableRequest(properties); }; /** - * Encodes the specified ValidateSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * Encodes the specified SetWritableRequest message. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static - * @param {vtctldata.IValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest message or plain object to encode + * @param {vtctldata.ISetWritableRequest} message SetWritableRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateSchemaKeyspaceRequest.encode = function encode(message, writer) { + SetWritableRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.exclude_tables != null && message.exclude_tables.length) - for (var i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exclude_tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.include_views); - if (message.skip_no_primary != null && Object.hasOwnProperty.call(message, "skip_no_primary")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skip_no_primary); - if (message.include_vschema != null && Object.hasOwnProperty.call(message, "include_vschema")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.include_vschema); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.writable != null && Object.hasOwnProperty.call(message, "writable")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.writable); return writer; }; /** - * Encodes the specified ValidateSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * Encodes the specified SetWritableRequest message, length delimited. Does not implicitly {@link vtctldata.SetWritableRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static - * @param {vtctldata.IValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest message or plain object to encode + * @param {vtctldata.ISetWritableRequest} message SetWritableRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateSchemaKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetWritableRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer. + * Decodes a SetWritableRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest + * @returns {vtctldata.SetWritableRequest} SetWritableRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateSchemaKeyspaceRequest.decode = function decode(reader, length) { + SetWritableRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateSchemaKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetWritableRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 2: - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - case 3: - message.include_views = reader.bool(); - break; - case 4: - message.skip_no_primary = reader.bool(); - break; - case 5: - message.include_vschema = reader.bool(); + message.writable = reader.bool(); break; default: reader.skipType(tag & 7); @@ -119191,156 +121445,120 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a SetWritableRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest + * @returns {vtctldata.SetWritableRequest} SetWritableRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateSchemaKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + SetWritableRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateSchemaKeyspaceRequest message. + * Verifies a SetWritableRequest message. * @function verify - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateSchemaKeyspaceRequest.verify = function verify(message) { + SetWritableRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (var i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; - if (message.skip_no_primary != null && message.hasOwnProperty("skip_no_primary")) - if (typeof message.skip_no_primary !== "boolean") - return "skip_no_primary: boolean expected"; - if (message.include_vschema != null && message.hasOwnProperty("include_vschema")) - if (typeof message.include_vschema !== "boolean") - return "include_vschema: boolean expected"; + if (message.writable != null && message.hasOwnProperty("writable")) + if (typeof message.writable !== "boolean") + return "writable: boolean expected"; return null; }; /** - * Creates a ValidateSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetWritableRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest + * @returns {vtctldata.SetWritableRequest} SetWritableRequest */ - ValidateSchemaKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateSchemaKeyspaceRequest) + SetWritableRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetWritableRequest) return object; - var message = new $root.vtctldata.ValidateSchemaKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".vtctldata.ValidateSchemaKeyspaceRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (var i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); + var message = new $root.vtctldata.SetWritableRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.SetWritableRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); - if (object.skip_no_primary != null) - message.skip_no_primary = Boolean(object.skip_no_primary); - if (object.include_vschema != null) - message.include_vschema = Boolean(object.include_vschema); + if (object.writable != null) + message.writable = Boolean(object.writable); return message; }; /** - * Creates a plain object from a ValidateSchemaKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetWritableRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @static - * @param {vtctldata.ValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest + * @param {vtctldata.SetWritableRequest} message SetWritableRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateSchemaKeyspaceRequest.toObject = function toObject(message, options) { + SetWritableRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.exclude_tables = []; if (options.defaults) { - object.keyspace = ""; - object.include_views = false; - object.skip_no_primary = false; - object.include_vschema = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (var j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; + object.tablet_alias = null; + object.writable = false; } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; - if (message.skip_no_primary != null && message.hasOwnProperty("skip_no_primary")) - object.skip_no_primary = message.skip_no_primary; - if (message.include_vschema != null && message.hasOwnProperty("include_vschema")) - object.include_vschema = message.include_vschema; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.writable != null && message.hasOwnProperty("writable")) + object.writable = message.writable; return object; }; /** - * Converts this ValidateSchemaKeyspaceRequest to JSON. + * Converts this SetWritableRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @memberof vtctldata.SetWritableRequest * @instance * @returns {Object.} JSON object */ - ValidateSchemaKeyspaceRequest.prototype.toJSON = function toJSON() { + SetWritableRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateSchemaKeyspaceRequest; + return SetWritableRequest; })(); - vtctldata.ValidateSchemaKeyspaceResponse = (function() { + vtctldata.SetWritableResponse = (function() { /** - * Properties of a ValidateSchemaKeyspaceResponse. + * Properties of a SetWritableResponse. * @memberof vtctldata - * @interface IValidateSchemaKeyspaceResponse - * @property {Array.|null} [results] ValidateSchemaKeyspaceResponse results - * @property {Object.|null} [results_by_shard] ValidateSchemaKeyspaceResponse results_by_shard + * @interface ISetWritableResponse */ /** - * Constructs a new ValidateSchemaKeyspaceResponse. + * Constructs a new SetWritableResponse. * @memberof vtctldata - * @classdesc Represents a ValidateSchemaKeyspaceResponse. - * @implements IValidateSchemaKeyspaceResponse + * @classdesc Represents a SetWritableResponse. + * @implements ISetWritableResponse * @constructor - * @param {vtctldata.IValidateSchemaKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.ISetWritableResponse=} [properties] Properties to set */ - function ValidateSchemaKeyspaceResponse(properties) { - this.results = []; - this.results_by_shard = {}; + function SetWritableResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119348,114 +121566,63 @@ $root.vtctldata = (function() { } /** - * ValidateSchemaKeyspaceResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateSchemaKeyspaceResponse - * @instance - */ - ValidateSchemaKeyspaceResponse.prototype.results = $util.emptyArray; - - /** - * ValidateSchemaKeyspaceResponse results_by_shard. - * @member {Object.} results_by_shard - * @memberof vtctldata.ValidateSchemaKeyspaceResponse - * @instance - */ - ValidateSchemaKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; - - /** - * Creates a new ValidateSchemaKeyspaceResponse instance using the specified properties. + * Creates a new SetWritableResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static - * @param {vtctldata.IValidateSchemaKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse instance + * @param {vtctldata.ISetWritableResponse=} [properties] Properties to set + * @returns {vtctldata.SetWritableResponse} SetWritableResponse instance */ - ValidateSchemaKeyspaceResponse.create = function create(properties) { - return new ValidateSchemaKeyspaceResponse(properties); + SetWritableResponse.create = function create(properties) { + return new SetWritableResponse(properties); }; /** - * Encodes the specified ValidateSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. + * Encodes the specified SetWritableResponse message. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static - * @param {vtctldata.IValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse message or plain object to encode + * @param {vtctldata.ISetWritableResponse} message SetWritableResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateSchemaKeyspaceResponse.encode = function encode(message, writer) { + SetWritableResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) - for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } return writer; }; /** - * Encodes the specified ValidateSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. + * Encodes the specified SetWritableResponse message, length delimited. Does not implicitly {@link vtctldata.SetWritableResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static - * @param {vtctldata.IValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse message or plain object to encode + * @param {vtctldata.ISetWritableResponse} message SetWritableResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateSchemaKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetWritableResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer. + * Decodes a SetWritableResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse + * @returns {vtctldata.SetWritableResponse} SetWritableResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateSchemaKeyspaceResponse.decode = function decode(reader, length) { + SetWritableResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateSchemaKeyspaceResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SetWritableResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; - case 2: - if (message.results_by_shard === $util.emptyObject) - message.results_by_shard = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.results_by_shard[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -119465,149 +121632,96 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a SetWritableResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse + * @returns {vtctldata.SetWritableResponse} SetWritableResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateSchemaKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + SetWritableResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateSchemaKeyspaceResponse message. + * Verifies a SetWritableResponse message. * @function verify - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateSchemaKeyspaceResponse.verify = function verify(message) { + SetWritableResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } - if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { - if (!$util.isObject(message.results_by_shard)) - return "results_by_shard: object expected"; - var key = Object.keys(message.results_by_shard); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); - if (error) - return "results_by_shard." + error; - } - } return null; }; /** - * Creates a ValidateSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetWritableResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse + * @returns {vtctldata.SetWritableResponse} SetWritableResponse */ - ValidateSchemaKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateSchemaKeyspaceResponse) + SetWritableResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SetWritableResponse) return object; - var message = new $root.vtctldata.ValidateSchemaKeyspaceResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - if (object.results_by_shard) { - if (typeof object.results_by_shard !== "object") - throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard = {}; - for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { - if (typeof object.results_by_shard[keys[i]] !== "object") - throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); - } - } - return message; + return new $root.vtctldata.SetWritableResponse(); }; /** - * Creates a plain object from a ValidateSchemaKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetWritableResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @static - * @param {vtctldata.ValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse + * @param {vtctldata.SetWritableResponse} message SetWritableResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateSchemaKeyspaceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.objects || options.defaults) - object.results_by_shard = {}; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - var keys2; - if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { - object.results_by_shard = {}; - for (var j = 0; j < keys2.length; ++j) - object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); - } - return object; + SetWritableResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ValidateSchemaKeyspaceResponse to JSON. + * Converts this SetWritableResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateSchemaKeyspaceResponse + * @memberof vtctldata.SetWritableResponse * @instance * @returns {Object.} JSON object */ - ValidateSchemaKeyspaceResponse.prototype.toJSON = function toJSON() { + SetWritableResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateSchemaKeyspaceResponse; + return SetWritableResponse; })(); - vtctldata.ValidateShardRequest = (function() { + vtctldata.ShardReplicationAddRequest = (function() { /** - * Properties of a ValidateShardRequest. + * Properties of a ShardReplicationAddRequest. * @memberof vtctldata - * @interface IValidateShardRequest - * @property {string|null} [keyspace] ValidateShardRequest keyspace - * @property {string|null} [shard] ValidateShardRequest shard - * @property {boolean|null} [ping_tablets] ValidateShardRequest ping_tablets + * @interface IShardReplicationAddRequest + * @property {string|null} [keyspace] ShardReplicationAddRequest keyspace + * @property {string|null} [shard] ShardReplicationAddRequest shard + * @property {topodata.ITabletAlias|null} [tablet_alias] ShardReplicationAddRequest tablet_alias */ /** - * Constructs a new ValidateShardRequest. + * Constructs a new ShardReplicationAddRequest. * @memberof vtctldata - * @classdesc Represents a ValidateShardRequest. - * @implements IValidateShardRequest + * @classdesc Represents a ShardReplicationAddRequest. + * @implements IShardReplicationAddRequest * @constructor - * @param {vtctldata.IValidateShardRequest=} [properties] Properties to set + * @param {vtctldata.IShardReplicationAddRequest=} [properties] Properties to set */ - function ValidateShardRequest(properties) { + function ShardReplicationAddRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119615,90 +121729,90 @@ $root.vtctldata = (function() { } /** - * ValidateShardRequest keyspace. + * ShardReplicationAddRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @instance */ - ValidateShardRequest.prototype.keyspace = ""; + ShardReplicationAddRequest.prototype.keyspace = ""; /** - * ValidateShardRequest shard. + * ShardReplicationAddRequest shard. * @member {string} shard - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @instance */ - ValidateShardRequest.prototype.shard = ""; + ShardReplicationAddRequest.prototype.shard = ""; /** - * ValidateShardRequest ping_tablets. - * @member {boolean} ping_tablets - * @memberof vtctldata.ValidateShardRequest + * ShardReplicationAddRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ShardReplicationAddRequest * @instance */ - ValidateShardRequest.prototype.ping_tablets = false; + ShardReplicationAddRequest.prototype.tablet_alias = null; /** - * Creates a new ValidateShardRequest instance using the specified properties. + * Creates a new ShardReplicationAddRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static - * @param {vtctldata.IValidateShardRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest instance + * @param {vtctldata.IShardReplicationAddRequest=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest instance */ - ValidateShardRequest.create = function create(properties) { - return new ValidateShardRequest(properties); + ShardReplicationAddRequest.create = function create(properties) { + return new ShardReplicationAddRequest(properties); }; /** - * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. + * Encodes the specified ShardReplicationAddRequest message. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static - * @param {vtctldata.IValidateShardRequest} message ValidateShardRequest message or plain object to encode + * @param {vtctldata.IShardReplicationAddRequest} message ShardReplicationAddRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateShardRequest.encode = function encode(message, writer) { + ShardReplicationAddRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ping_tablets); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. + * Encodes the specified ShardReplicationAddRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static - * @param {vtctldata.IValidateShardRequest} message ValidateShardRequest message or plain object to encode + * @param {vtctldata.IShardReplicationAddRequest} message ShardReplicationAddRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationAddRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateShardRequest message from the specified reader or buffer. + * Decodes a ShardReplicationAddRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest + * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateShardRequest.decode = function decode(reader, length) { + ShardReplicationAddRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationAddRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -119709,7 +121823,7 @@ $root.vtctldata = (function() { message.shard = reader.string(); break; case 3: - message.ping_tablets = reader.bool(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -119720,30 +121834,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationAddRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest + * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateShardRequest.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationAddRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateShardRequest message. + * Verifies a ShardReplicationAddRequest message. * @function verify - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateShardRequest.verify = function verify(message) { + ShardReplicationAddRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) @@ -119752,93 +121866,96 @@ $root.vtctldata = (function() { if (message.shard != null && message.hasOwnProperty("shard")) if (!$util.isString(message.shard)) return "shard: string expected"; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - if (typeof message.ping_tablets !== "boolean") - return "ping_tablets: boolean expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } return null; }; /** - * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationAddRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest + * @returns {vtctldata.ShardReplicationAddRequest} ShardReplicationAddRequest */ - ValidateShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateShardRequest) + ShardReplicationAddRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationAddRequest) return object; - var message = new $root.vtctldata.ValidateShardRequest(); + var message = new $root.vtctldata.ShardReplicationAddRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); - if (object.ping_tablets != null) - message.ping_tablets = Boolean(object.ping_tablets); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ShardReplicationAddRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } return message; }; /** - * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationAddRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @static - * @param {vtctldata.ValidateShardRequest} message ValidateShardRequest + * @param {vtctldata.ShardReplicationAddRequest} message ShardReplicationAddRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateShardRequest.toObject = function toObject(message, options) { + ShardReplicationAddRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.keyspace = ""; object.shard = ""; - object.ping_tablets = false; + object.tablet_alias = null; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; if (message.shard != null && message.hasOwnProperty("shard")) object.shard = message.shard; - if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) - object.ping_tablets = message.ping_tablets; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ValidateShardRequest to JSON. + * Converts this ShardReplicationAddRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateShardRequest + * @memberof vtctldata.ShardReplicationAddRequest * @instance * @returns {Object.} JSON object */ - ValidateShardRequest.prototype.toJSON = function toJSON() { + ShardReplicationAddRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateShardRequest; + return ShardReplicationAddRequest; })(); - vtctldata.ValidateShardResponse = (function() { + vtctldata.ShardReplicationAddResponse = (function() { /** - * Properties of a ValidateShardResponse. + * Properties of a ShardReplicationAddResponse. * @memberof vtctldata - * @interface IValidateShardResponse - * @property {Array.|null} [results] ValidateShardResponse results + * @interface IShardReplicationAddResponse */ /** - * Constructs a new ValidateShardResponse. + * Constructs a new ShardReplicationAddResponse. * @memberof vtctldata - * @classdesc Represents a ValidateShardResponse. - * @implements IValidateShardResponse + * @classdesc Represents a ShardReplicationAddResponse. + * @implements IShardReplicationAddResponse * @constructor - * @param {vtctldata.IValidateShardResponse=} [properties] Properties to set + * @param {vtctldata.IShardReplicationAddResponse=} [properties] Properties to set */ - function ValidateShardResponse(properties) { - this.results = []; + function ShardReplicationAddResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119846,79 +121963,63 @@ $root.vtctldata = (function() { } /** - * ValidateShardResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateShardResponse - * @instance - */ - ValidateShardResponse.prototype.results = $util.emptyArray; - - /** - * Creates a new ValidateShardResponse instance using the specified properties. + * Creates a new ShardReplicationAddResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static - * @param {vtctldata.IValidateShardResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse instance + * @param {vtctldata.IShardReplicationAddResponse=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse instance */ - ValidateShardResponse.create = function create(properties) { - return new ValidateShardResponse(properties); + ShardReplicationAddResponse.create = function create(properties) { + return new ShardReplicationAddResponse(properties); }; /** - * Encodes the specified ValidateShardResponse message. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. + * Encodes the specified ShardReplicationAddResponse message. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static - * @param {vtctldata.IValidateShardResponse} message ValidateShardResponse message or plain object to encode + * @param {vtctldata.IShardReplicationAddResponse} message ShardReplicationAddResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateShardResponse.encode = function encode(message, writer) { + ShardReplicationAddResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); return writer; }; /** - * Encodes the specified ValidateShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. + * Encodes the specified ShardReplicationAddResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationAddResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static - * @param {vtctldata.IValidateShardResponse} message ValidateShardResponse message or plain object to encode + * @param {vtctldata.IShardReplicationAddResponse} message ShardReplicationAddResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationAddResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateShardResponse message from the specified reader or buffer. + * Decodes a ShardReplicationAddResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse + * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateShardResponse.decode = function decode(reader, length) { + ShardReplicationAddResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationAddResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -119928,119 +122029,96 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateShardResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationAddResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse + * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateShardResponse.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationAddResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateShardResponse message. + * Verifies a ShardReplicationAddResponse message. * @function verify - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateShardResponse.verify = function verify(message) { + ShardReplicationAddResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } return null; }; /** - * Creates a ValidateShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationAddResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse + * @returns {vtctldata.ShardReplicationAddResponse} ShardReplicationAddResponse */ - ValidateShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateShardResponse) + ShardReplicationAddResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationAddResponse) return object; - var message = new $root.vtctldata.ValidateShardResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateShardResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - return message; + return new $root.vtctldata.ShardReplicationAddResponse(); }; /** - * Creates a plain object from a ValidateShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationAddResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @static - * @param {vtctldata.ValidateShardResponse} message ValidateShardResponse + * @param {vtctldata.ShardReplicationAddResponse} message ShardReplicationAddResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - return object; + ShardReplicationAddResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ValidateShardResponse to JSON. + * Converts this ShardReplicationAddResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateShardResponse + * @memberof vtctldata.ShardReplicationAddResponse * @instance * @returns {Object.} JSON object */ - ValidateShardResponse.prototype.toJSON = function toJSON() { + ShardReplicationAddResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateShardResponse; + return ShardReplicationAddResponse; })(); - vtctldata.ValidateVersionKeyspaceRequest = (function() { + vtctldata.ShardReplicationFixRequest = (function() { /** - * Properties of a ValidateVersionKeyspaceRequest. + * Properties of a ShardReplicationFixRequest. * @memberof vtctldata - * @interface IValidateVersionKeyspaceRequest - * @property {string|null} [keyspace] ValidateVersionKeyspaceRequest keyspace + * @interface IShardReplicationFixRequest + * @property {string|null} [keyspace] ShardReplicationFixRequest keyspace + * @property {string|null} [shard] ShardReplicationFixRequest shard + * @property {string|null} [cell] ShardReplicationFixRequest cell */ /** - * Constructs a new ValidateVersionKeyspaceRequest. + * Constructs a new ShardReplicationFixRequest. * @memberof vtctldata - * @classdesc Represents a ValidateVersionKeyspaceRequest. - * @implements IValidateVersionKeyspaceRequest + * @classdesc Represents a ShardReplicationFixRequest. + * @implements IShardReplicationFixRequest * @constructor - * @param {vtctldata.IValidateVersionKeyspaceRequest=} [properties] Properties to set + * @param {vtctldata.IShardReplicationFixRequest=} [properties] Properties to set */ - function ValidateVersionKeyspaceRequest(properties) { + function ShardReplicationFixRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120048,76 +122126,102 @@ $root.vtctldata = (function() { } /** - * ValidateVersionKeyspaceRequest keyspace. + * ShardReplicationFixRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @instance */ - ValidateVersionKeyspaceRequest.prototype.keyspace = ""; + ShardReplicationFixRequest.prototype.keyspace = ""; /** - * Creates a new ValidateVersionKeyspaceRequest instance using the specified properties. + * ShardReplicationFixRequest shard. + * @member {string} shard + * @memberof vtctldata.ShardReplicationFixRequest + * @instance + */ + ShardReplicationFixRequest.prototype.shard = ""; + + /** + * ShardReplicationFixRequest cell. + * @member {string} cell + * @memberof vtctldata.ShardReplicationFixRequest + * @instance + */ + ShardReplicationFixRequest.prototype.cell = ""; + + /** + * Creates a new ShardReplicationFixRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static - * @param {vtctldata.IValidateVersionKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest instance + * @param {vtctldata.IShardReplicationFixRequest=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest instance */ - ValidateVersionKeyspaceRequest.create = function create(properties) { - return new ValidateVersionKeyspaceRequest(properties); + ShardReplicationFixRequest.create = function create(properties) { + return new ShardReplicationFixRequest(properties); }; /** - * Encodes the specified ValidateVersionKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. + * Encodes the specified ShardReplicationFixRequest message. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static - * @param {vtctldata.IValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest message or plain object to encode + * @param {vtctldata.IShardReplicationFixRequest} message ShardReplicationFixRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionKeyspaceRequest.encode = function encode(message, writer) { + ShardReplicationFixRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); return writer; }; /** - * Encodes the specified ValidateVersionKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. + * Encodes the specified ShardReplicationFixRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static - * @param {vtctldata.IValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest message or plain object to encode + * @param {vtctldata.IShardReplicationFixRequest} message ShardReplicationFixRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationFixRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer. + * Decodes a ShardReplicationFixRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest + * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionKeyspaceRequest.decode = function decode(reader, length) { + ShardReplicationFixRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionKeyspaceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationFixRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.keyspace = reader.string(); break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.cell = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -120127,110 +122231,124 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationFixRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest + * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationFixRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVersionKeyspaceRequest message. + * Verifies a ShardReplicationFixRequest message. * @function verify - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateVersionKeyspaceRequest.verify = function verify(message) { + ShardReplicationFixRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; return null; }; /** - * Creates a ValidateVersionKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationFixRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest + * @returns {vtctldata.ShardReplicationFixRequest} ShardReplicationFixRequest */ - ValidateVersionKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVersionKeyspaceRequest) + ShardReplicationFixRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationFixRequest) return object; - var message = new $root.vtctldata.ValidateVersionKeyspaceRequest(); + var message = new $root.vtctldata.ShardReplicationFixRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.cell != null) + message.cell = String(object.cell); return message; }; /** - * Creates a plain object from a ValidateVersionKeyspaceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationFixRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @static - * @param {vtctldata.ValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest + * @param {vtctldata.ShardReplicationFixRequest} message ShardReplicationFixRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVersionKeyspaceRequest.toObject = function toObject(message, options) { + ShardReplicationFixRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.keyspace = ""; + object.shard = ""; + object.cell = ""; + } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; return object; }; /** - * Converts this ValidateVersionKeyspaceRequest to JSON. + * Converts this ShardReplicationFixRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateVersionKeyspaceRequest + * @memberof vtctldata.ShardReplicationFixRequest * @instance * @returns {Object.} JSON object */ - ValidateVersionKeyspaceRequest.prototype.toJSON = function toJSON() { + ShardReplicationFixRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVersionKeyspaceRequest; + return ShardReplicationFixRequest; })(); - vtctldata.ValidateVersionKeyspaceResponse = (function() { + vtctldata.ShardReplicationFixResponse = (function() { /** - * Properties of a ValidateVersionKeyspaceResponse. + * Properties of a ShardReplicationFixResponse. * @memberof vtctldata - * @interface IValidateVersionKeyspaceResponse - * @property {Array.|null} [results] ValidateVersionKeyspaceResponse results - * @property {Object.|null} [results_by_shard] ValidateVersionKeyspaceResponse results_by_shard + * @interface IShardReplicationFixResponse + * @property {topodata.IShardReplicationError|null} [error] ShardReplicationFixResponse error */ /** - * Constructs a new ValidateVersionKeyspaceResponse. + * Constructs a new ShardReplicationFixResponse. * @memberof vtctldata - * @classdesc Represents a ValidateVersionKeyspaceResponse. - * @implements IValidateVersionKeyspaceResponse + * @classdesc Represents a ShardReplicationFixResponse. + * @implements IShardReplicationFixResponse * @constructor - * @param {vtctldata.IValidateVersionKeyspaceResponse=} [properties] Properties to set + * @param {vtctldata.IShardReplicationFixResponse=} [properties] Properties to set */ - function ValidateVersionKeyspaceResponse(properties) { - this.results = []; - this.results_by_shard = {}; + function ShardReplicationFixResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120238,113 +122356,75 @@ $root.vtctldata = (function() { } /** - * ValidateVersionKeyspaceResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateVersionKeyspaceResponse - * @instance - */ - ValidateVersionKeyspaceResponse.prototype.results = $util.emptyArray; - - /** - * ValidateVersionKeyspaceResponse results_by_shard. - * @member {Object.} results_by_shard - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * ShardReplicationFixResponse error. + * @member {topodata.IShardReplicationError|null|undefined} error + * @memberof vtctldata.ShardReplicationFixResponse * @instance */ - ValidateVersionKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; + ShardReplicationFixResponse.prototype.error = null; /** - * Creates a new ValidateVersionKeyspaceResponse instance using the specified properties. + * Creates a new ShardReplicationFixResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static - * @param {vtctldata.IValidateVersionKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse instance + * @param {vtctldata.IShardReplicationFixResponse=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse instance */ - ValidateVersionKeyspaceResponse.create = function create(properties) { - return new ValidateVersionKeyspaceResponse(properties); + ShardReplicationFixResponse.create = function create(properties) { + return new ShardReplicationFixResponse(properties); }; /** - * Encodes the specified ValidateVersionKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. + * Encodes the specified ShardReplicationFixResponse message. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static - * @param {vtctldata.IValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse message or plain object to encode + * @param {vtctldata.IShardReplicationFixResponse} message ShardReplicationFixResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionKeyspaceResponse.encode = function encode(message, writer) { + ShardReplicationFixResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) - for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.topodata.ShardReplicationError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidateVersionKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. + * Encodes the specified ShardReplicationFixResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationFixResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static - * @param {vtctldata.IValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse message or plain object to encode + * @param {vtctldata.IShardReplicationFixResponse} message ShardReplicationFixResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationFixResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer. + * Decodes a ShardReplicationFixResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse + * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionKeyspaceResponse.decode = function decode(reader, length) { + ShardReplicationFixResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionKeyspaceResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationFixResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; - case 2: - if (message.results_by_shard === $util.emptyObject) - message.results_by_shard = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.results_by_shard[key] = value; + message.error = $root.topodata.ShardReplicationError.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -120355,148 +122435,113 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationFixResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse + * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationFixResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVersionKeyspaceResponse message. + * Verifies a ShardReplicationFixResponse message. * @function verify - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateVersionKeyspaceResponse.verify = function verify(message) { + ShardReplicationFixResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } - if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { - if (!$util.isObject(message.results_by_shard)) - return "results_by_shard: object expected"; - var key = Object.keys(message.results_by_shard); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); - if (error) - return "results_by_shard." + error; - } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.topodata.ShardReplicationError.verify(message.error); + if (error) + return "error." + error; } return null; }; /** - * Creates a ValidateVersionKeyspaceResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationFixResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse + * @returns {vtctldata.ShardReplicationFixResponse} ShardReplicationFixResponse */ - ValidateVersionKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVersionKeyspaceResponse) + ShardReplicationFixResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationFixResponse) return object; - var message = new $root.vtctldata.ValidateVersionKeyspaceResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - if (object.results_by_shard) { - if (typeof object.results_by_shard !== "object") - throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard = {}; - for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { - if (typeof object.results_by_shard[keys[i]] !== "object") - throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results_by_shard: object expected"); - message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); - } + var message = new $root.vtctldata.ShardReplicationFixResponse(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".vtctldata.ShardReplicationFixResponse.error: object expected"); + message.error = $root.topodata.ShardReplicationError.fromObject(object.error); } return message; }; /** - * Creates a plain object from a ValidateVersionKeyspaceResponse message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationFixResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @static - * @param {vtctldata.ValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse + * @param {vtctldata.ShardReplicationFixResponse} message ShardReplicationFixResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVersionKeyspaceResponse.toObject = function toObject(message, options) { + ShardReplicationFixResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.objects || options.defaults) - object.results_by_shard = {}; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - var keys2; - if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { - object.results_by_shard = {}; - for (var j = 0; j < keys2.length; ++j) - object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); - } + if (options.defaults) + object.error = null; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.topodata.ShardReplicationError.toObject(message.error, options); return object; }; /** - * Converts this ValidateVersionKeyspaceResponse to JSON. + * Converts this ShardReplicationFixResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @memberof vtctldata.ShardReplicationFixResponse * @instance * @returns {Object.} JSON object */ - ValidateVersionKeyspaceResponse.prototype.toJSON = function toJSON() { + ShardReplicationFixResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVersionKeyspaceResponse; + return ShardReplicationFixResponse; })(); - vtctldata.ValidateVersionShardRequest = (function() { + vtctldata.ShardReplicationPositionsRequest = (function() { /** - * Properties of a ValidateVersionShardRequest. + * Properties of a ShardReplicationPositionsRequest. * @memberof vtctldata - * @interface IValidateVersionShardRequest - * @property {string|null} [keyspace] ValidateVersionShardRequest keyspace - * @property {string|null} [shard] ValidateVersionShardRequest shard + * @interface IShardReplicationPositionsRequest + * @property {string|null} [keyspace] ShardReplicationPositionsRequest keyspace + * @property {string|null} [shard] ShardReplicationPositionsRequest shard */ /** - * Constructs a new ValidateVersionShardRequest. + * Constructs a new ShardReplicationPositionsRequest. * @memberof vtctldata - * @classdesc Represents a ValidateVersionShardRequest. - * @implements IValidateVersionShardRequest + * @classdesc Represents a ShardReplicationPositionsRequest. + * @implements IShardReplicationPositionsRequest * @constructor - * @param {vtctldata.IValidateVersionShardRequest=} [properties] Properties to set + * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set */ - function ValidateVersionShardRequest(properties) { + function ShardReplicationPositionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120504,43 +122549,43 @@ $root.vtctldata = (function() { } /** - * ValidateVersionShardRequest keyspace. + * ShardReplicationPositionsRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @instance */ - ValidateVersionShardRequest.prototype.keyspace = ""; + ShardReplicationPositionsRequest.prototype.keyspace = ""; /** - * ValidateVersionShardRequest shard. + * ShardReplicationPositionsRequest shard. * @member {string} shard - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @instance */ - ValidateVersionShardRequest.prototype.shard = ""; + ShardReplicationPositionsRequest.prototype.shard = ""; /** - * Creates a new ValidateVersionShardRequest instance using the specified properties. + * Creates a new ShardReplicationPositionsRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static - * @param {vtctldata.IValidateVersionShardRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest instance + * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest instance */ - ValidateVersionShardRequest.create = function create(properties) { - return new ValidateVersionShardRequest(properties); + ShardReplicationPositionsRequest.create = function create(properties) { + return new ShardReplicationPositionsRequest(properties); }; /** - * Encodes the specified ValidateVersionShardRequest message. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. + * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static - * @param {vtctldata.IValidateVersionShardRequest} message ValidateVersionShardRequest message or plain object to encode + * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionShardRequest.encode = function encode(message, writer) { + ShardReplicationPositionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) @@ -120551,33 +122596,33 @@ $root.vtctldata = (function() { }; /** - * Encodes the specified ValidateVersionShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. + * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static - * @param {vtctldata.IValidateVersionShardRequest} message ValidateVersionShardRequest message or plain object to encode + * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionShardRequest.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationPositionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVersionShardRequest message from the specified reader or buffer. + * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest + * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionShardRequest.decode = function decode(reader, length) { + ShardReplicationPositionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionShardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -120596,30 +122641,30 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVersionShardRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest + * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionShardRequest.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationPositionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVersionShardRequest message. + * Verifies a ShardReplicationPositionsRequest message. * @function verify - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateVersionShardRequest.verify = function verify(message) { + ShardReplicationPositionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) @@ -120632,17 +122677,17 @@ $root.vtctldata = (function() { }; /** - * Creates a ValidateVersionShardRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest + * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest */ - ValidateVersionShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVersionShardRequest) + ShardReplicationPositionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationPositionsRequest) return object; - var message = new $root.vtctldata.ValidateVersionShardRequest(); + var message = new $root.vtctldata.ShardReplicationPositionsRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) @@ -120651,15 +122696,15 @@ $root.vtctldata = (function() { }; /** - * Creates a plain object from a ValidateVersionShardRequest message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @static - * @param {vtctldata.ValidateVersionShardRequest} message ValidateVersionShardRequest + * @param {vtctldata.ShardReplicationPositionsRequest} message ShardReplicationPositionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVersionShardRequest.toObject = function toObject(message, options) { + ShardReplicationPositionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -120675,38 +122720,40 @@ $root.vtctldata = (function() { }; /** - * Converts this ValidateVersionShardRequest to JSON. + * Converts this ShardReplicationPositionsRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateVersionShardRequest + * @memberof vtctldata.ShardReplicationPositionsRequest * @instance * @returns {Object.} JSON object */ - ValidateVersionShardRequest.prototype.toJSON = function toJSON() { + ShardReplicationPositionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVersionShardRequest; + return ShardReplicationPositionsRequest; })(); - vtctldata.ValidateVersionShardResponse = (function() { + vtctldata.ShardReplicationPositionsResponse = (function() { /** - * Properties of a ValidateVersionShardResponse. + * Properties of a ShardReplicationPositionsResponse. * @memberof vtctldata - * @interface IValidateVersionShardResponse - * @property {Array.|null} [results] ValidateVersionShardResponse results + * @interface IShardReplicationPositionsResponse + * @property {Object.|null} [replication_statuses] ShardReplicationPositionsResponse replication_statuses + * @property {Object.|null} [tablet_map] ShardReplicationPositionsResponse tablet_map */ /** - * Constructs a new ValidateVersionShardResponse. + * Constructs a new ShardReplicationPositionsResponse. * @memberof vtctldata - * @classdesc Represents a ValidateVersionShardResponse. - * @implements IValidateVersionShardResponse + * @classdesc Represents a ShardReplicationPositionsResponse. + * @implements IShardReplicationPositionsResponse * @constructor - * @param {vtctldata.IValidateVersionShardResponse=} [properties] Properties to set + * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set */ - function ValidateVersionShardResponse(properties) { - this.results = []; + function ShardReplicationPositionsResponse(properties) { + this.replication_statuses = {}; + this.tablet_map = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120714,78 +122761,132 @@ $root.vtctldata = (function() { } /** - * ValidateVersionShardResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateVersionShardResponse + * ShardReplicationPositionsResponse replication_statuses. + * @member {Object.} replication_statuses + * @memberof vtctldata.ShardReplicationPositionsResponse * @instance */ - ValidateVersionShardResponse.prototype.results = $util.emptyArray; + ShardReplicationPositionsResponse.prototype.replication_statuses = $util.emptyObject; /** - * Creates a new ValidateVersionShardResponse instance using the specified properties. + * ShardReplicationPositionsResponse tablet_map. + * @member {Object.} tablet_map + * @memberof vtctldata.ShardReplicationPositionsResponse + * @instance + */ + ShardReplicationPositionsResponse.prototype.tablet_map = $util.emptyObject; + + /** + * Creates a new ShardReplicationPositionsResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static - * @param {vtctldata.IValidateVersionShardResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse instance + * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse instance */ - ValidateVersionShardResponse.create = function create(properties) { - return new ValidateVersionShardResponse(properties); + ShardReplicationPositionsResponse.create = function create(properties) { + return new ShardReplicationPositionsResponse(properties); }; /** - * Encodes the specified ValidateVersionShardResponse message. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. + * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static - * @param {vtctldata.IValidateVersionShardResponse} message ValidateVersionShardResponse message or plain object to encode + * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionShardResponse.encode = function encode(message, writer) { + ShardReplicationPositionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.replication_statuses != null && Object.hasOwnProperty.call(message, "replication_statuses")) + for (var keys = Object.keys(message.replication_statuses), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.replicationdata.Status.encode(message.replication_statuses[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.tablet_map != null && Object.hasOwnProperty.call(message, "tablet_map")) + for (var keys = Object.keys(message.tablet_map), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.topodata.Tablet.encode(message.tablet_map[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ValidateVersionShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. + * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static - * @param {vtctldata.IValidateVersionShardResponse} message ValidateVersionShardResponse message or plain object to encode + * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVersionShardResponse.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationPositionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVersionShardResponse message from the specified reader or buffer. + * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse + * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionShardResponse.decode = function decode(reader, length) { + ShardReplicationPositionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionShardResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); + if (message.replication_statuses === $util.emptyObject) + message.replication_statuses = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.replicationdata.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.replication_statuses[key] = value; + break; + case 2: + if (message.tablet_map === $util.emptyObject) + message.tablet_map = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.topodata.Tablet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tablet_map[key] = value; break; default: reader.skipType(tag & 7); @@ -120796,124 +122897,155 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVersionShardResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse + * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVersionShardResponse.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationPositionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVersionShardResponse message. + * Verifies a ShardReplicationPositionsResponse message. * @function verify - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateVersionShardResponse.verify = function verify(message) { + ShardReplicationPositionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; + if (message.replication_statuses != null && message.hasOwnProperty("replication_statuses")) { + if (!$util.isObject(message.replication_statuses)) + return "replication_statuses: object expected"; + var key = Object.keys(message.replication_statuses); + for (var i = 0; i < key.length; ++i) { + var error = $root.replicationdata.Status.verify(message.replication_statuses[key[i]]); + if (error) + return "replication_statuses." + error; + } + } + if (message.tablet_map != null && message.hasOwnProperty("tablet_map")) { + if (!$util.isObject(message.tablet_map)) + return "tablet_map: object expected"; + var key = Object.keys(message.tablet_map); + for (var i = 0; i < key.length; ++i) { + var error = $root.topodata.Tablet.verify(message.tablet_map[key[i]]); + if (error) + return "tablet_map." + error; + } } return null; }; /** - * Creates a ValidateVersionShardResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse + * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse */ - ValidateVersionShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVersionShardResponse) + ShardReplicationPositionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationPositionsResponse) return object; - var message = new $root.vtctldata.ValidateVersionShardResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateVersionShardResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); + var message = new $root.vtctldata.ShardReplicationPositionsResponse(); + if (object.replication_statuses) { + if (typeof object.replication_statuses !== "object") + throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); + message.replication_statuses = {}; + for (var keys = Object.keys(object.replication_statuses), i = 0; i < keys.length; ++i) { + if (typeof object.replication_statuses[keys[i]] !== "object") + throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); + message.replication_statuses[keys[i]] = $root.replicationdata.Status.fromObject(object.replication_statuses[keys[i]]); + } + } + if (object.tablet_map) { + if (typeof object.tablet_map !== "object") + throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); + message.tablet_map = {}; + for (var keys = Object.keys(object.tablet_map), i = 0; i < keys.length; ++i) { + if (typeof object.tablet_map[keys[i]] !== "object") + throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); + message.tablet_map[keys[i]] = $root.topodata.Tablet.fromObject(object.tablet_map[keys[i]]); + } } return message; }; /** - * Creates a plain object from a ValidateVersionShardResponse message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @static - * @param {vtctldata.ValidateVersionShardResponse} message ValidateVersionShardResponse + * @param {vtctldata.ShardReplicationPositionsResponse} message ShardReplicationPositionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVersionShardResponse.toObject = function toObject(message, options) { + ShardReplicationPositionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; + if (options.objects || options.defaults) { + object.replication_statuses = {}; + object.tablet_map = {}; + } + var keys2; + if (message.replication_statuses && (keys2 = Object.keys(message.replication_statuses)).length) { + object.replication_statuses = {}; + for (var j = 0; j < keys2.length; ++j) + object.replication_statuses[keys2[j]] = $root.replicationdata.Status.toObject(message.replication_statuses[keys2[j]], options); + } + if (message.tablet_map && (keys2 = Object.keys(message.tablet_map)).length) { + object.tablet_map = {}; + for (var j = 0; j < keys2.length; ++j) + object.tablet_map[keys2[j]] = $root.topodata.Tablet.toObject(message.tablet_map[keys2[j]], options); } return object; }; /** - * Converts this ValidateVersionShardResponse to JSON. + * Converts this ShardReplicationPositionsResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateVersionShardResponse + * @memberof vtctldata.ShardReplicationPositionsResponse * @instance * @returns {Object.} JSON object */ - ValidateVersionShardResponse.prototype.toJSON = function toJSON() { + ShardReplicationPositionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVersionShardResponse; + return ShardReplicationPositionsResponse; })(); - vtctldata.ValidateVSchemaRequest = (function() { + vtctldata.ShardReplicationRemoveRequest = (function() { /** - * Properties of a ValidateVSchemaRequest. + * Properties of a ShardReplicationRemoveRequest. * @memberof vtctldata - * @interface IValidateVSchemaRequest - * @property {string|null} [keyspace] ValidateVSchemaRequest keyspace - * @property {Array.|null} [shards] ValidateVSchemaRequest shards - * @property {Array.|null} [exclude_tables] ValidateVSchemaRequest exclude_tables - * @property {boolean|null} [include_views] ValidateVSchemaRequest include_views + * @interface IShardReplicationRemoveRequest + * @property {string|null} [keyspace] ShardReplicationRemoveRequest keyspace + * @property {string|null} [shard] ShardReplicationRemoveRequest shard + * @property {topodata.ITabletAlias|null} [tablet_alias] ShardReplicationRemoveRequest tablet_alias */ /** - * Constructs a new ValidateVSchemaRequest. + * Constructs a new ShardReplicationRemoveRequest. * @memberof vtctldata - * @classdesc Represents a ValidateVSchemaRequest. - * @implements IValidateVSchemaRequest + * @classdesc Represents a ShardReplicationRemoveRequest. + * @implements IShardReplicationRemoveRequest * @constructor - * @param {vtctldata.IValidateVSchemaRequest=} [properties] Properties to set + * @param {vtctldata.IShardReplicationRemoveRequest=} [properties] Properties to set */ - function ValidateVSchemaRequest(properties) { - this.shards = []; - this.exclude_tables = []; + function ShardReplicationRemoveRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120921,102 +123053,90 @@ $root.vtctldata = (function() { } /** - * ValidateVSchemaRequest keyspace. + * ShardReplicationRemoveRequest keyspace. * @member {string} keyspace - * @memberof vtctldata.ValidateVSchemaRequest - * @instance - */ - ValidateVSchemaRequest.prototype.keyspace = ""; - - /** - * ValidateVSchemaRequest shards. - * @member {Array.} shards - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @instance */ - ValidateVSchemaRequest.prototype.shards = $util.emptyArray; + ShardReplicationRemoveRequest.prototype.keyspace = ""; /** - * ValidateVSchemaRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof vtctldata.ValidateVSchemaRequest + * ShardReplicationRemoveRequest shard. + * @member {string} shard + * @memberof vtctldata.ShardReplicationRemoveRequest * @instance */ - ValidateVSchemaRequest.prototype.exclude_tables = $util.emptyArray; + ShardReplicationRemoveRequest.prototype.shard = ""; /** - * ValidateVSchemaRequest include_views. - * @member {boolean} include_views - * @memberof vtctldata.ValidateVSchemaRequest + * ShardReplicationRemoveRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.ShardReplicationRemoveRequest * @instance */ - ValidateVSchemaRequest.prototype.include_views = false; + ShardReplicationRemoveRequest.prototype.tablet_alias = null; /** - * Creates a new ValidateVSchemaRequest instance using the specified properties. + * Creates a new ShardReplicationRemoveRequest instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static - * @param {vtctldata.IValidateVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest instance + * @param {vtctldata.IShardReplicationRemoveRequest=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest instance */ - ValidateVSchemaRequest.create = function create(properties) { - return new ValidateVSchemaRequest(properties); + ShardReplicationRemoveRequest.create = function create(properties) { + return new ShardReplicationRemoveRequest(properties); }; /** - * Encodes the specified ValidateVSchemaRequest message. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. + * Encodes the specified ShardReplicationRemoveRequest message. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static - * @param {vtctldata.IValidateVSchemaRequest} message ValidateVSchemaRequest message or plain object to encode + * @param {vtctldata.IShardReplicationRemoveRequest} message ShardReplicationRemoveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVSchemaRequest.encode = function encode(message, writer) { + ShardReplicationRemoveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shards[i]); - if (message.exclude_tables != null && message.exclude_tables.length) - for (var i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidateVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. + * Encodes the specified ShardReplicationRemoveRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static - * @param {vtctldata.IValidateVSchemaRequest} message ValidateVSchemaRequest message or plain object to encode + * @param {vtctldata.IShardReplicationRemoveRequest} message ShardReplicationRemoveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVSchemaRequest message from the specified reader or buffer. + * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest + * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVSchemaRequest.decode = function decode(reader, length) { + ShardReplicationRemoveRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVSchemaRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationRemoveRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -121024,17 +123144,10 @@ $root.vtctldata = (function() { message.keyspace = reader.string(); break; case 2: - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push(reader.string()); + message.shard = reader.string(); break; case 3: - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - case 4: - message.include_views = reader.bool(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -121045,161 +123158,128 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVSchemaRequest message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationRemoveRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest + * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationRemoveRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVSchemaRequest message. + * Verifies a ShardReplicationRemoveRequest message. * @function verify - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateVSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) - if (!$util.isString(message.shards[i])) - return "shards: string[] expected"; - } - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (var i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; + */ + ShardReplicationRemoveRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; return null; }; /** - * Creates a ValidateVSchemaRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationRemoveRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest + * @returns {vtctldata.ShardReplicationRemoveRequest} ShardReplicationRemoveRequest */ - ValidateVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVSchemaRequest) + ShardReplicationRemoveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationRemoveRequest) return object; - var message = new $root.vtctldata.ValidateVSchemaRequest(); + var message = new $root.vtctldata.ShardReplicationRemoveRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.ValidateVSchemaRequest.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) - message.shards[i] = String(object.shards[i]); - } - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".vtctldata.ValidateVSchemaRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (var i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); + if (object.shard != null) + message.shard = String(object.shard); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.ShardReplicationRemoveRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); return message; }; /** - * Creates a plain object from a ValidateVSchemaRequest message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationRemoveRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @static - * @param {vtctldata.ValidateVSchemaRequest} message ValidateVSchemaRequest + * @param {vtctldata.ShardReplicationRemoveRequest} message ShardReplicationRemoveRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVSchemaRequest.toObject = function toObject(message, options) { + ShardReplicationRemoveRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.shards = []; - object.exclude_tables = []; - } if (options.defaults) { object.keyspace = ""; - object.include_views = false; + object.shard = ""; + object.tablet_alias = null; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = message.shards[j]; - } - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (var j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this ValidateVSchemaRequest to JSON. + * Converts this ShardReplicationRemoveRequest to JSON. * @function toJSON - * @memberof vtctldata.ValidateVSchemaRequest + * @memberof vtctldata.ShardReplicationRemoveRequest * @instance * @returns {Object.} JSON object */ - ValidateVSchemaRequest.prototype.toJSON = function toJSON() { + ShardReplicationRemoveRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVSchemaRequest; + return ShardReplicationRemoveRequest; })(); - vtctldata.ValidateVSchemaResponse = (function() { + vtctldata.ShardReplicationRemoveResponse = (function() { /** - * Properties of a ValidateVSchemaResponse. + * Properties of a ShardReplicationRemoveResponse. * @memberof vtctldata - * @interface IValidateVSchemaResponse - * @property {Array.|null} [results] ValidateVSchemaResponse results - * @property {Object.|null} [results_by_shard] ValidateVSchemaResponse results_by_shard + * @interface IShardReplicationRemoveResponse */ /** - * Constructs a new ValidateVSchemaResponse. + * Constructs a new ShardReplicationRemoveResponse. * @memberof vtctldata - * @classdesc Represents a ValidateVSchemaResponse. - * @implements IValidateVSchemaResponse + * @classdesc Represents a ShardReplicationRemoveResponse. + * @implements IShardReplicationRemoveResponse * @constructor - * @param {vtctldata.IValidateVSchemaResponse=} [properties] Properties to set + * @param {vtctldata.IShardReplicationRemoveResponse=} [properties] Properties to set */ - function ValidateVSchemaResponse(properties) { - this.results = []; - this.results_by_shard = {}; + function ShardReplicationRemoveResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121207,114 +123287,63 @@ $root.vtctldata = (function() { } /** - * ValidateVSchemaResponse results. - * @member {Array.} results - * @memberof vtctldata.ValidateVSchemaResponse - * @instance - */ - ValidateVSchemaResponse.prototype.results = $util.emptyArray; - - /** - * ValidateVSchemaResponse results_by_shard. - * @member {Object.} results_by_shard - * @memberof vtctldata.ValidateVSchemaResponse - * @instance - */ - ValidateVSchemaResponse.prototype.results_by_shard = $util.emptyObject; - - /** - * Creates a new ValidateVSchemaResponse instance using the specified properties. + * Creates a new ShardReplicationRemoveResponse instance using the specified properties. * @function create - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static - * @param {vtctldata.IValidateVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse instance + * @param {vtctldata.IShardReplicationRemoveResponse=} [properties] Properties to set + * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse instance */ - ValidateVSchemaResponse.create = function create(properties) { - return new ValidateVSchemaResponse(properties); + ShardReplicationRemoveResponse.create = function create(properties) { + return new ShardReplicationRemoveResponse(properties); }; /** - * Encodes the specified ValidateVSchemaResponse message. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. + * Encodes the specified ShardReplicationRemoveResponse message. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. * @function encode - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static - * @param {vtctldata.IValidateVSchemaResponse} message ValidateVSchemaResponse message or plain object to encode + * @param {vtctldata.IShardReplicationRemoveResponse} message ShardReplicationRemoveResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVSchemaResponse.encode = function encode(message, writer) { + ShardReplicationRemoveResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); - if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) - for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } return writer; }; /** - * Encodes the specified ValidateVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. + * Encodes the specified ShardReplicationRemoveResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationRemoveResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static - * @param {vtctldata.IValidateVSchemaResponse} message ValidateVSchemaResponse message or plain object to encode + * @param {vtctldata.IShardReplicationRemoveResponse} message ShardReplicationRemoveResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { + ShardReplicationRemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateVSchemaResponse message from the specified reader or buffer. + * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer. * @function decode - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse + * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVSchemaResponse.decode = function decode(reader, length) { + ShardReplicationRemoveResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVSchemaResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationRemoveResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push(reader.string()); - break; - case 2: - if (message.results_by_shard === $util.emptyObject) - message.results_by_shard = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.results_by_shard[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -121324,161 +123353,95 @@ $root.vtctldata = (function() { }; /** - * Decodes a ValidateVSchemaResponse message from the specified reader or buffer, length delimited. + * Decodes a ShardReplicationRemoveResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse + * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { + ShardReplicationRemoveResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateVSchemaResponse message. + * Verifies a ShardReplicationRemoveResponse message. * @function verify - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateVSchemaResponse.verify = function verify(message) { + ShardReplicationRemoveResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) - if (!$util.isString(message.results[i])) - return "results: string[] expected"; - } - if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { - if (!$util.isObject(message.results_by_shard)) - return "results_by_shard: object expected"; - var key = Object.keys(message.results_by_shard); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); - if (error) - return "results_by_shard." + error; - } - } return null; }; /** - * Creates a ValidateVSchemaResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ShardReplicationRemoveResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static * @param {Object.} object Plain object - * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse + * @returns {vtctldata.ShardReplicationRemoveResponse} ShardReplicationRemoveResponse */ - ValidateVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ValidateVSchemaResponse) + ShardReplicationRemoveResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ShardReplicationRemoveResponse) return object; - var message = new $root.vtctldata.ValidateVSchemaResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".vtctldata.ValidateVSchemaResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) - message.results[i] = String(object.results[i]); - } - if (object.results_by_shard) { - if (typeof object.results_by_shard !== "object") - throw TypeError(".vtctldata.ValidateVSchemaResponse.results_by_shard: object expected"); - message.results_by_shard = {}; - for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { - if (typeof object.results_by_shard[keys[i]] !== "object") - throw TypeError(".vtctldata.ValidateVSchemaResponse.results_by_shard: object expected"); - message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); - } - } - return message; + return new $root.vtctldata.ShardReplicationRemoveResponse(); }; /** - * Creates a plain object from a ValidateVSchemaResponse message. Also converts values to other types if specified. + * Creates a plain object from a ShardReplicationRemoveResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @static - * @param {vtctldata.ValidateVSchemaResponse} message ValidateVSchemaResponse + * @param {vtctldata.ShardReplicationRemoveResponse} message ShardReplicationRemoveResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateVSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.objects || options.defaults) - object.results_by_shard = {}; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = message.results[j]; - } - var keys2; - if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { - object.results_by_shard = {}; - for (var j = 0; j < keys2.length; ++j) - object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); - } - return object; + ShardReplicationRemoveResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ValidateVSchemaResponse to JSON. + * Converts this ShardReplicationRemoveResponse to JSON. * @function toJSON - * @memberof vtctldata.ValidateVSchemaResponse + * @memberof vtctldata.ShardReplicationRemoveResponse * @instance * @returns {Object.} JSON object */ - ValidateVSchemaResponse.prototype.toJSON = function toJSON() { + ShardReplicationRemoveResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidateVSchemaResponse; + return ShardReplicationRemoveResponse; })(); - return vtctldata; -})(); - -$root.binlogdata = (function() { - - /** - * Namespace binlogdata. - * @exports binlogdata - * @namespace - */ - var binlogdata = {}; - - binlogdata.Charset = (function() { + vtctldata.SleepTabletRequest = (function() { /** - * Properties of a Charset. - * @memberof binlogdata - * @interface ICharset - * @property {number|null} [client] Charset client - * @property {number|null} [conn] Charset conn - * @property {number|null} [server] Charset server + * Properties of a SleepTabletRequest. + * @memberof vtctldata + * @interface ISleepTabletRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] SleepTabletRequest tablet_alias + * @property {vttime.IDuration|null} [duration] SleepTabletRequest duration */ /** - * Constructs a new Charset. - * @memberof binlogdata - * @classdesc Represents a Charset. - * @implements ICharset + * Constructs a new SleepTabletRequest. + * @memberof vtctldata + * @classdesc Represents a SleepTabletRequest. + * @implements ISleepTabletRequest * @constructor - * @param {binlogdata.ICharset=} [properties] Properties to set + * @param {vtctldata.ISleepTabletRequest=} [properties] Properties to set */ - function Charset(properties) { + function SleepTabletRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121486,101 +123449,88 @@ $root.binlogdata = (function() { } /** - * Charset client. - * @member {number} client - * @memberof binlogdata.Charset - * @instance - */ - Charset.prototype.client = 0; - - /** - * Charset conn. - * @member {number} conn - * @memberof binlogdata.Charset + * SleepTabletRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.SleepTabletRequest * @instance */ - Charset.prototype.conn = 0; + SleepTabletRequest.prototype.tablet_alias = null; /** - * Charset server. - * @member {number} server - * @memberof binlogdata.Charset + * SleepTabletRequest duration. + * @member {vttime.IDuration|null|undefined} duration + * @memberof vtctldata.SleepTabletRequest * @instance */ - Charset.prototype.server = 0; + SleepTabletRequest.prototype.duration = null; /** - * Creates a new Charset instance using the specified properties. + * Creates a new SleepTabletRequest instance using the specified properties. * @function create - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static - * @param {binlogdata.ICharset=} [properties] Properties to set - * @returns {binlogdata.Charset} Charset instance + * @param {vtctldata.ISleepTabletRequest=} [properties] Properties to set + * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest instance */ - Charset.create = function create(properties) { - return new Charset(properties); + SleepTabletRequest.create = function create(properties) { + return new SleepTabletRequest(properties); }; /** - * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. + * Encodes the specified SleepTabletRequest message. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static - * @param {binlogdata.ICharset} message Charset message or plain object to encode + * @param {vtctldata.ISleepTabletRequest} message SleepTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Charset.encode = function encode(message, writer) { + SleepTabletRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.client != null && Object.hasOwnProperty.call(message, "client")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.client); - if (message.conn != null && Object.hasOwnProperty.call(message, "conn")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.conn); - if (message.server != null && Object.hasOwnProperty.call(message, "server")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.server); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.vttime.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. + * Encodes the specified SleepTabletRequest message, length delimited. Does not implicitly {@link vtctldata.SleepTabletRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static - * @param {binlogdata.ICharset} message Charset message or plain object to encode + * @param {vtctldata.ISleepTabletRequest} message SleepTabletRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Charset.encodeDelimited = function encodeDelimited(message, writer) { + SleepTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Charset message from the specified reader or buffer. + * Decodes a SleepTabletRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Charset} Charset + * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Charset.decode = function decode(reader, length) { + SleepTabletRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Charset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SleepTabletRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.client = reader.int32(); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 2: - message.conn = reader.int32(); - break; - case 3: - message.server = reader.int32(); + message.duration = $root.vttime.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -121591,126 +123541,125 @@ $root.binlogdata = (function() { }; /** - * Decodes a Charset message from the specified reader or buffer, length delimited. + * Decodes a SleepTabletRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Charset} Charset + * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Charset.decodeDelimited = function decodeDelimited(reader) { + SleepTabletRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Charset message. + * Verifies a SleepTabletRequest message. * @function verify - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Charset.verify = function verify(message) { + SleepTabletRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client != null && message.hasOwnProperty("client")) - if (!$util.isInteger(message.client)) - return "client: integer expected"; - if (message.conn != null && message.hasOwnProperty("conn")) - if (!$util.isInteger(message.conn)) - return "conn: integer expected"; - if (message.server != null && message.hasOwnProperty("server")) - if (!$util.isInteger(message.server)) - return "server: integer expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.vttime.Duration.verify(message.duration); + if (error) + return "duration." + error; + } return null; }; /** - * Creates a Charset message from a plain object. Also converts values to their respective internal types. + * Creates a SleepTabletRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.Charset} Charset + * @returns {vtctldata.SleepTabletRequest} SleepTabletRequest */ - Charset.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Charset) + SleepTabletRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SleepTabletRequest) return object; - var message = new $root.binlogdata.Charset(); - if (object.client != null) - message.client = object.client | 0; - if (object.conn != null) - message.conn = object.conn | 0; - if (object.server != null) - message.server = object.server | 0; + var message = new $root.vtctldata.SleepTabletRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.SleepTabletRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".vtctldata.SleepTabletRequest.duration: object expected"); + message.duration = $root.vttime.Duration.fromObject(object.duration); + } return message; }; /** - * Creates a plain object from a Charset message. Also converts values to other types if specified. + * Creates a plain object from a SleepTabletRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @static - * @param {binlogdata.Charset} message Charset + * @param {vtctldata.SleepTabletRequest} message SleepTabletRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Charset.toObject = function toObject(message, options) { + SleepTabletRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.client = 0; - object.conn = 0; - object.server = 0; + object.tablet_alias = null; + object.duration = null; } - if (message.client != null && message.hasOwnProperty("client")) - object.client = message.client; - if (message.conn != null && message.hasOwnProperty("conn")) - object.conn = message.conn; - if (message.server != null && message.hasOwnProperty("server")) - object.server = message.server; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.vttime.Duration.toObject(message.duration, options); return object; }; /** - * Converts this Charset to JSON. + * Converts this SleepTabletRequest to JSON. * @function toJSON - * @memberof binlogdata.Charset + * @memberof vtctldata.SleepTabletRequest * @instance * @returns {Object.} JSON object */ - Charset.prototype.toJSON = function toJSON() { + SleepTabletRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Charset; + return SleepTabletRequest; })(); - binlogdata.BinlogTransaction = (function() { - - /** - * Properties of a BinlogTransaction. - * @memberof binlogdata - * @interface IBinlogTransaction - * @property {Array.|null} [statements] BinlogTransaction statements - * @property {query.IEventToken|null} [event_token] BinlogTransaction event_token + vtctldata.SleepTabletResponse = (function() { + + /** + * Properties of a SleepTabletResponse. + * @memberof vtctldata + * @interface ISleepTabletResponse */ /** - * Constructs a new BinlogTransaction. - * @memberof binlogdata - * @classdesc Represents a BinlogTransaction. - * @implements IBinlogTransaction + * Constructs a new SleepTabletResponse. + * @memberof vtctldata + * @classdesc Represents a SleepTabletResponse. + * @implements ISleepTabletResponse * @constructor - * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set + * @param {vtctldata.ISleepTabletResponse=} [properties] Properties to set */ - function BinlogTransaction(properties) { - this.statements = []; + function SleepTabletResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121718,92 +123667,63 @@ $root.binlogdata = (function() { } /** - * BinlogTransaction statements. - * @member {Array.} statements - * @memberof binlogdata.BinlogTransaction - * @instance - */ - BinlogTransaction.prototype.statements = $util.emptyArray; - - /** - * BinlogTransaction event_token. - * @member {query.IEventToken|null|undefined} event_token - * @memberof binlogdata.BinlogTransaction - * @instance - */ - BinlogTransaction.prototype.event_token = null; - - /** - * Creates a new BinlogTransaction instance using the specified properties. + * Creates a new SleepTabletResponse instance using the specified properties. * @function create - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static - * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set - * @returns {binlogdata.BinlogTransaction} BinlogTransaction instance + * @param {vtctldata.ISleepTabletResponse=} [properties] Properties to set + * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse instance */ - BinlogTransaction.create = function create(properties) { - return new BinlogTransaction(properties); + SleepTabletResponse.create = function create(properties) { + return new SleepTabletResponse(properties); }; /** - * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. + * Encodes the specified SleepTabletResponse message. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static - * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode + * @param {vtctldata.ISleepTabletResponse} message SleepTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BinlogTransaction.encode = function encode(message, writer) { + SleepTabletResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.statements != null && message.statements.length) - for (var i = 0; i < message.statements.length; ++i) - $root.binlogdata.BinlogTransaction.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) - $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. + * Encodes the specified SleepTabletResponse message, length delimited. Does not implicitly {@link vtctldata.SleepTabletResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static - * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode + * @param {vtctldata.ISleepTabletResponse} message SleepTabletResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BinlogTransaction.encodeDelimited = function encodeDelimited(message, writer) { + SleepTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BinlogTransaction message from the specified reader or buffer. + * Decodes a SleepTabletResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogTransaction} BinlogTransaction + * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BinlogTransaction.decode = function decode(reader, length) { + SleepTabletResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SleepTabletResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.statements && message.statements.length)) - message.statements = []; - message.statements.push($root.binlogdata.BinlogTransaction.Statement.decode(reader, reader.uint32())); - break; - case 4: - message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -121813,469 +123733,101 @@ $root.binlogdata = (function() { }; /** - * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. + * Decodes a SleepTabletResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogTransaction} BinlogTransaction + * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BinlogTransaction.decodeDelimited = function decodeDelimited(reader) { + SleepTabletResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BinlogTransaction message. + * Verifies a SleepTabletResponse message. * @function verify - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BinlogTransaction.verify = function verify(message) { + SleepTabletResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.statements != null && message.hasOwnProperty("statements")) { - if (!Array.isArray(message.statements)) - return "statements: array expected"; - for (var i = 0; i < message.statements.length; ++i) { - var error = $root.binlogdata.BinlogTransaction.Statement.verify(message.statements[i]); - if (error) - return "statements." + error; - } - } - if (message.event_token != null && message.hasOwnProperty("event_token")) { - var error = $root.query.EventToken.verify(message.event_token); - if (error) - return "event_token." + error; - } return null; }; /** - * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. + * Creates a SleepTabletResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.BinlogTransaction} BinlogTransaction + * @returns {vtctldata.SleepTabletResponse} SleepTabletResponse */ - BinlogTransaction.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogTransaction) + SleepTabletResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SleepTabletResponse) return object; - var message = new $root.binlogdata.BinlogTransaction(); - if (object.statements) { - if (!Array.isArray(object.statements)) - throw TypeError(".binlogdata.BinlogTransaction.statements: array expected"); - message.statements = []; - for (var i = 0; i < object.statements.length; ++i) { - if (typeof object.statements[i] !== "object") - throw TypeError(".binlogdata.BinlogTransaction.statements: object expected"); - message.statements[i] = $root.binlogdata.BinlogTransaction.Statement.fromObject(object.statements[i]); - } - } - if (object.event_token != null) { - if (typeof object.event_token !== "object") - throw TypeError(".binlogdata.BinlogTransaction.event_token: object expected"); - message.event_token = $root.query.EventToken.fromObject(object.event_token); - } - return message; + return new $root.vtctldata.SleepTabletResponse(); }; /** - * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. + * Creates a plain object from a SleepTabletResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @static - * @param {binlogdata.BinlogTransaction} message BinlogTransaction + * @param {vtctldata.SleepTabletResponse} message SleepTabletResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BinlogTransaction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.statements = []; - if (options.defaults) - object.event_token = null; - if (message.statements && message.statements.length) { - object.statements = []; - for (var j = 0; j < message.statements.length; ++j) - object.statements[j] = $root.binlogdata.BinlogTransaction.Statement.toObject(message.statements[j], options); - } - if (message.event_token != null && message.hasOwnProperty("event_token")) - object.event_token = $root.query.EventToken.toObject(message.event_token, options); - return object; + SleepTabletResponse.toObject = function toObject() { + return {}; }; /** - * Converts this BinlogTransaction to JSON. + * Converts this SleepTabletResponse to JSON. * @function toJSON - * @memberof binlogdata.BinlogTransaction + * @memberof vtctldata.SleepTabletResponse * @instance * @returns {Object.} JSON object */ - BinlogTransaction.prototype.toJSON = function toJSON() { + SleepTabletResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BinlogTransaction.Statement = (function() { - - /** - * Properties of a Statement. - * @memberof binlogdata.BinlogTransaction - * @interface IStatement - * @property {binlogdata.BinlogTransaction.Statement.Category|null} [category] Statement category - * @property {binlogdata.ICharset|null} [charset] Statement charset - * @property {Uint8Array|null} [sql] Statement sql - */ - - /** - * Constructs a new Statement. - * @memberof binlogdata.BinlogTransaction - * @classdesc Represents a Statement. - * @implements IStatement - * @constructor - * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set - */ - function Statement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Statement category. - * @member {binlogdata.BinlogTransaction.Statement.Category} category - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.category = 0; - - /** - * Statement charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.charset = null; - - /** - * Statement sql. - * @member {Uint8Array} sql - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.sql = $util.newBuffer([]); - - /** - * Creates a new Statement instance using the specified properties. - * @function create - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set - * @returns {binlogdata.BinlogTransaction.Statement} Statement instance - */ - Statement.create = function create(properties) { - return new Statement(properties); - }; - - /** - * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @function encode - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.sql); - return writer; - }; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogTransaction.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction.Statement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32(); - break; - case 2: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); - break; - case 3: - message.sql = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogTransaction.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Statement message. - * @function verify - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Statement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); - if (error) - return "charset." + error; - } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) - return "sql: buffer expected"; - return null; - }; - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.BinlogTransaction.Statement} Statement - */ - Statement.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogTransaction.Statement) - return object; - var message = new $root.binlogdata.BinlogTransaction.Statement(); - switch (object.category) { - case "BL_UNRECOGNIZED": - case 0: - message.category = 0; - break; - case "BL_BEGIN": - case 1: - message.category = 1; - break; - case "BL_COMMIT": - case 2: - message.category = 2; - break; - case "BL_ROLLBACK": - case 3: - message.category = 3; - break; - case "BL_DML_DEPRECATED": - case 4: - message.category = 4; - break; - case "BL_DDL": - case 5: - message.category = 5; - break; - case "BL_SET": - case 6: - message.category = 6; - break; - case "BL_INSERT": - case 7: - message.category = 7; - break; - case "BL_UPDATE": - case 8: - message.category = 8; - break; - case "BL_DELETE": - case 9: - message.category = 9; - break; - } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.BinlogTransaction.Statement.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); - } - if (object.sql != null) - if (typeof object.sql === "string") - $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); - else if (object.sql.length) - message.sql = object.sql; - return message; - }; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.Statement} message Statement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Statement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.category = options.enums === String ? "BL_UNRECOGNIZED" : 0; - object.charset = null; - if (options.bytes === String) - object.sql = ""; - else { - object.sql = []; - if (options.bytes !== Array) - object.sql = $util.newBuffer(object.sql); - } - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.binlogdata.BinlogTransaction.Statement.Category[message.category] : message.category; - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; - return object; - }; - - /** - * Converts this Statement to JSON. - * @function toJSON - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - * @returns {Object.} JSON object - */ - Statement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Category enum. - * @name binlogdata.BinlogTransaction.Statement.Category - * @enum {number} - * @property {number} BL_UNRECOGNIZED=0 BL_UNRECOGNIZED value - * @property {number} BL_BEGIN=1 BL_BEGIN value - * @property {number} BL_COMMIT=2 BL_COMMIT value - * @property {number} BL_ROLLBACK=3 BL_ROLLBACK value - * @property {number} BL_DML_DEPRECATED=4 BL_DML_DEPRECATED value - * @property {number} BL_DDL=5 BL_DDL value - * @property {number} BL_SET=6 BL_SET value - * @property {number} BL_INSERT=7 BL_INSERT value - * @property {number} BL_UPDATE=8 BL_UPDATE value - * @property {number} BL_DELETE=9 BL_DELETE value - */ - Statement.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BL_UNRECOGNIZED"] = 0; - values[valuesById[1] = "BL_BEGIN"] = 1; - values[valuesById[2] = "BL_COMMIT"] = 2; - values[valuesById[3] = "BL_ROLLBACK"] = 3; - values[valuesById[4] = "BL_DML_DEPRECATED"] = 4; - values[valuesById[5] = "BL_DDL"] = 5; - values[valuesById[6] = "BL_SET"] = 6; - values[valuesById[7] = "BL_INSERT"] = 7; - values[valuesById[8] = "BL_UPDATE"] = 8; - values[valuesById[9] = "BL_DELETE"] = 9; - return values; - })(); - - return Statement; - })(); - - return BinlogTransaction; + return SleepTabletResponse; })(); - binlogdata.StreamKeyRangeRequest = (function() { - - /** - * Properties of a StreamKeyRangeRequest. - * @memberof binlogdata - * @interface IStreamKeyRangeRequest - * @property {string|null} [position] StreamKeyRangeRequest position - * @property {topodata.IKeyRange|null} [key_range] StreamKeyRangeRequest key_range - * @property {binlogdata.ICharset|null} [charset] StreamKeyRangeRequest charset + vtctldata.SourceShardAddRequest = (function() { + + /** + * Properties of a SourceShardAddRequest. + * @memberof vtctldata + * @interface ISourceShardAddRequest + * @property {string|null} [keyspace] SourceShardAddRequest keyspace + * @property {string|null} [shard] SourceShardAddRequest shard + * @property {number|null} [uid] SourceShardAddRequest uid + * @property {string|null} [source_keyspace] SourceShardAddRequest source_keyspace + * @property {string|null} [source_shard] SourceShardAddRequest source_shard + * @property {topodata.IKeyRange|null} [key_range] SourceShardAddRequest key_range + * @property {Array.|null} [tables] SourceShardAddRequest tables */ /** - * Constructs a new StreamKeyRangeRequest. - * @memberof binlogdata - * @classdesc Represents a StreamKeyRangeRequest. - * @implements IStreamKeyRangeRequest + * Constructs a new SourceShardAddRequest. + * @memberof vtctldata + * @classdesc Represents a SourceShardAddRequest. + * @implements ISourceShardAddRequest * @constructor - * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set + * @param {vtctldata.ISourceShardAddRequest=} [properties] Properties to set */ - function StreamKeyRangeRequest(properties) { + function SourceShardAddRequest(properties) { + this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122283,101 +123835,156 @@ $root.binlogdata = (function() { } /** - * StreamKeyRangeRequest position. - * @member {string} position - * @memberof binlogdata.StreamKeyRangeRequest + * SourceShardAddRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SourceShardAddRequest * @instance */ - StreamKeyRangeRequest.prototype.position = ""; + SourceShardAddRequest.prototype.keyspace = ""; /** - * StreamKeyRangeRequest key_range. + * SourceShardAddRequest shard. + * @member {string} shard + * @memberof vtctldata.SourceShardAddRequest + * @instance + */ + SourceShardAddRequest.prototype.shard = ""; + + /** + * SourceShardAddRequest uid. + * @member {number} uid + * @memberof vtctldata.SourceShardAddRequest + * @instance + */ + SourceShardAddRequest.prototype.uid = 0; + + /** + * SourceShardAddRequest source_keyspace. + * @member {string} source_keyspace + * @memberof vtctldata.SourceShardAddRequest + * @instance + */ + SourceShardAddRequest.prototype.source_keyspace = ""; + + /** + * SourceShardAddRequest source_shard. + * @member {string} source_shard + * @memberof vtctldata.SourceShardAddRequest + * @instance + */ + SourceShardAddRequest.prototype.source_shard = ""; + + /** + * SourceShardAddRequest key_range. * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @instance */ - StreamKeyRangeRequest.prototype.key_range = null; + SourceShardAddRequest.prototype.key_range = null; /** - * StreamKeyRangeRequest charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.StreamKeyRangeRequest + * SourceShardAddRequest tables. + * @member {Array.} tables + * @memberof vtctldata.SourceShardAddRequest * @instance */ - StreamKeyRangeRequest.prototype.charset = null; + SourceShardAddRequest.prototype.tables = $util.emptyArray; /** - * Creates a new StreamKeyRangeRequest instance using the specified properties. + * Creates a new SourceShardAddRequest instance using the specified properties. * @function create - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static - * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest instance + * @param {vtctldata.ISourceShardAddRequest=} [properties] Properties to set + * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest instance */ - StreamKeyRangeRequest.create = function create(properties) { - return new StreamKeyRangeRequest(properties); + SourceShardAddRequest.create = function create(properties) { + return new SourceShardAddRequest(properties); }; /** - * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. + * Encodes the specified SourceShardAddRequest message. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static - * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode + * @param {vtctldata.ISourceShardAddRequest} message SourceShardAddRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamKeyRangeRequest.encode = function encode(message, writer) { + SourceShardAddRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.uid); + if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.source_keyspace); + if (message.source_shard != null && Object.hasOwnProperty.call(message, "source_shard")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_shard); if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tables[i]); return writer; }; /** - * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. + * Encodes the specified SourceShardAddRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static - * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode + * @param {vtctldata.ISourceShardAddRequest} message SourceShardAddRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamKeyRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { + SourceShardAddRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. + * Decodes a SourceShardAddRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest + * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamKeyRangeRequest.decode = function decode(reader, length) { + SourceShardAddRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardAddRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.position = reader.string(); + message.keyspace = reader.string(); break; case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + message.shard = reader.string(); break; case 3: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); + message.uid = reader.int32(); + break; + case 4: + message.source_keyspace = reader.string(); + break; + case 5: + message.source_shard = reader.string(); + break; + case 6: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -122388,134 +123995,174 @@ $root.binlogdata = (function() { }; /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. + * Decodes a SourceShardAddRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest + * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamKeyRangeRequest.decodeDelimited = function decodeDelimited(reader) { + SourceShardAddRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamKeyRangeRequest message. + * Verifies a SourceShardAddRequest message. * @function verify - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamKeyRangeRequest.verify = function verify(message) { + SourceShardAddRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isInteger(message.uid)) + return "uid: integer expected"; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + if (!$util.isString(message.source_keyspace)) + return "source_keyspace: string expected"; + if (message.source_shard != null && message.hasOwnProperty("source_shard")) + if (!$util.isString(message.source_shard)) + return "source_shard: string expected"; if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); if (error) return "key_range." + error; } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); - if (error) - return "charset." + error; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; } return null; }; /** - * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardAddRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest + * @returns {vtctldata.SourceShardAddRequest} SourceShardAddRequest */ - StreamKeyRangeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamKeyRangeRequest) + SourceShardAddRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SourceShardAddRequest) return object; - var message = new $root.binlogdata.StreamKeyRangeRequest(); - if (object.position != null) - message.position = String(object.position); + var message = new $root.vtctldata.SourceShardAddRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.uid != null) + message.uid = object.uid | 0; + if (object.source_keyspace != null) + message.source_keyspace = String(object.source_keyspace); + if (object.source_shard != null) + message.source_shard = String(object.source_shard); if (object.key_range != null) { if (typeof object.key_range !== "object") - throw TypeError(".binlogdata.StreamKeyRangeRequest.key_range: object expected"); + throw TypeError(".vtctldata.SourceShardAddRequest.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.StreamKeyRangeRequest.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".vtctldata.SourceShardAddRequest.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); } return message; }; /** - * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. + * Creates a plain object from a SourceShardAddRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @static - * @param {binlogdata.StreamKeyRangeRequest} message StreamKeyRangeRequest + * @param {vtctldata.SourceShardAddRequest} message SourceShardAddRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamKeyRangeRequest.toObject = function toObject(message, options) { + SourceShardAddRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.tables = []; if (options.defaults) { - object.position = ""; + object.keyspace = ""; + object.shard = ""; + object.uid = 0; + object.source_keyspace = ""; + object.source_shard = ""; object.key_range = null; - object.charset = null; } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + object.source_keyspace = message.source_keyspace; + if (message.source_shard != null && message.hasOwnProperty("source_shard")) + object.source_shard = message.source_shard; if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } return object; }; /** - * Converts this StreamKeyRangeRequest to JSON. + * Converts this SourceShardAddRequest to JSON. * @function toJSON - * @memberof binlogdata.StreamKeyRangeRequest + * @memberof vtctldata.SourceShardAddRequest * @instance * @returns {Object.} JSON object */ - StreamKeyRangeRequest.prototype.toJSON = function toJSON() { + SourceShardAddRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamKeyRangeRequest; + return SourceShardAddRequest; })(); - binlogdata.StreamKeyRangeResponse = (function() { + vtctldata.SourceShardAddResponse = (function() { /** - * Properties of a StreamKeyRangeResponse. - * @memberof binlogdata - * @interface IStreamKeyRangeResponse - * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamKeyRangeResponse binlog_transaction + * Properties of a SourceShardAddResponse. + * @memberof vtctldata + * @interface ISourceShardAddResponse + * @property {topodata.IShard|null} [shard] SourceShardAddResponse shard */ /** - * Constructs a new StreamKeyRangeResponse. - * @memberof binlogdata - * @classdesc Represents a StreamKeyRangeResponse. - * @implements IStreamKeyRangeResponse + * Constructs a new SourceShardAddResponse. + * @memberof vtctldata + * @classdesc Represents a SourceShardAddResponse. + * @implements ISourceShardAddResponse * @constructor - * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set + * @param {vtctldata.ISourceShardAddResponse=} [properties] Properties to set */ - function StreamKeyRangeResponse(properties) { + function SourceShardAddResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122523,75 +124170,295 @@ $root.binlogdata = (function() { } /** - * StreamKeyRangeResponse binlog_transaction. - * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction - * @memberof binlogdata.StreamKeyRangeResponse + * SourceShardAddResponse shard. + * @member {topodata.IShard|null|undefined} shard + * @memberof vtctldata.SourceShardAddResponse + * @instance + */ + SourceShardAddResponse.prototype.shard = null; + + /** + * Creates a new SourceShardAddResponse instance using the specified properties. + * @function create + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {vtctldata.ISourceShardAddResponse=} [properties] Properties to set + * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse instance + */ + SourceShardAddResponse.create = function create(properties) { + return new SourceShardAddResponse(properties); + }; + + /** + * Encodes the specified SourceShardAddResponse message. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * @function encode + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {vtctldata.ISourceShardAddResponse} message SourceShardAddResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceShardAddResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceShardAddResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardAddResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {vtctldata.ISourceShardAddResponse} message SourceShardAddResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceShardAddResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceShardAddResponse message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceShardAddResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardAddResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceShardAddResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceShardAddResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceShardAddResponse message. + * @function verify + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceShardAddResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.topodata.Shard.verify(message.shard); + if (error) + return "shard." + error; + } + return null; + }; + + /** + * Creates a SourceShardAddResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.SourceShardAddResponse} SourceShardAddResponse + */ + SourceShardAddResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SourceShardAddResponse) + return object; + var message = new $root.vtctldata.SourceShardAddResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.SourceShardAddResponse.shard: object expected"); + message.shard = $root.topodata.Shard.fromObject(object.shard); + } + return message; + }; + + /** + * Creates a plain object from a SourceShardAddResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.SourceShardAddResponse + * @static + * @param {vtctldata.SourceShardAddResponse} message SourceShardAddResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceShardAddResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.shard = null; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.topodata.Shard.toObject(message.shard, options); + return object; + }; + + /** + * Converts this SourceShardAddResponse to JSON. + * @function toJSON + * @memberof vtctldata.SourceShardAddResponse + * @instance + * @returns {Object.} JSON object + */ + SourceShardAddResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourceShardAddResponse; + })(); + + vtctldata.SourceShardDeleteRequest = (function() { + + /** + * Properties of a SourceShardDeleteRequest. + * @memberof vtctldata + * @interface ISourceShardDeleteRequest + * @property {string|null} [keyspace] SourceShardDeleteRequest keyspace + * @property {string|null} [shard] SourceShardDeleteRequest shard + * @property {number|null} [uid] SourceShardDeleteRequest uid + */ + + /** + * Constructs a new SourceShardDeleteRequest. + * @memberof vtctldata + * @classdesc Represents a SourceShardDeleteRequest. + * @implements ISourceShardDeleteRequest + * @constructor + * @param {vtctldata.ISourceShardDeleteRequest=} [properties] Properties to set + */ + function SourceShardDeleteRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceShardDeleteRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.SourceShardDeleteRequest + * @instance + */ + SourceShardDeleteRequest.prototype.keyspace = ""; + + /** + * SourceShardDeleteRequest shard. + * @member {string} shard + * @memberof vtctldata.SourceShardDeleteRequest + * @instance + */ + SourceShardDeleteRequest.prototype.shard = ""; + + /** + * SourceShardDeleteRequest uid. + * @member {number} uid + * @memberof vtctldata.SourceShardDeleteRequest * @instance */ - StreamKeyRangeResponse.prototype.binlog_transaction = null; + SourceShardDeleteRequest.prototype.uid = 0; /** - * Creates a new StreamKeyRangeResponse instance using the specified properties. + * Creates a new SourceShardDeleteRequest instance using the specified properties. * @function create - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static - * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse instance + * @param {vtctldata.ISourceShardDeleteRequest=} [properties] Properties to set + * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest instance */ - StreamKeyRangeResponse.create = function create(properties) { - return new StreamKeyRangeResponse(properties); + SourceShardDeleteRequest.create = function create(properties) { + return new SourceShardDeleteRequest(properties); }; /** - * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. + * Encodes the specified SourceShardDeleteRequest message. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static - * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode + * @param {vtctldata.ISourceShardDeleteRequest} message SourceShardDeleteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamKeyRangeResponse.encode = function encode(message, writer) { + SourceShardDeleteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) - $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.uid); return writer; }; /** - * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. + * Encodes the specified SourceShardDeleteRequest message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static - * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode + * @param {vtctldata.ISourceShardDeleteRequest} message SourceShardDeleteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamKeyRangeResponse.encodeDelimited = function encodeDelimited(message, writer) { + SourceShardDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. + * Decodes a SourceShardDeleteRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse + * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamKeyRangeResponse.decode = function decode(reader, length) { + SourceShardDeleteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardDeleteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); + message.keyspace = reader.string(); + break; + case 2: + message.shard = reader.string(); + break; + case 3: + message.uid = reader.int32(); break; default: reader.skipType(tag & 7); @@ -122602,115 +124469,124 @@ $root.binlogdata = (function() { }; /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. + * Decodes a SourceShardDeleteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse + * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamKeyRangeResponse.decodeDelimited = function decodeDelimited(reader) { + SourceShardDeleteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamKeyRangeResponse message. + * Verifies a SourceShardDeleteRequest message. * @function verify - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamKeyRangeResponse.verify = function verify(message) { + SourceShardDeleteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { - var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); - if (error) - return "binlog_transaction." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isInteger(message.uid)) + return "uid: integer expected"; return null; }; /** - * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardDeleteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse + * @returns {vtctldata.SourceShardDeleteRequest} SourceShardDeleteRequest */ - StreamKeyRangeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamKeyRangeResponse) + SourceShardDeleteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SourceShardDeleteRequest) return object; - var message = new $root.binlogdata.StreamKeyRangeResponse(); - if (object.binlog_transaction != null) { - if (typeof object.binlog_transaction !== "object") - throw TypeError(".binlogdata.StreamKeyRangeResponse.binlog_transaction: object expected"); - message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); - } + var message = new $root.vtctldata.SourceShardDeleteRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.uid != null) + message.uid = object.uid | 0; return message; }; /** - * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. + * Creates a plain object from a SourceShardDeleteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @static - * @param {binlogdata.StreamKeyRangeResponse} message StreamKeyRangeResponse + * @param {vtctldata.SourceShardDeleteRequest} message SourceShardDeleteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamKeyRangeResponse.toObject = function toObject(message, options) { + SourceShardDeleteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.binlog_transaction = null; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) - object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.uid = 0; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; return object; }; /** - * Converts this StreamKeyRangeResponse to JSON. + * Converts this SourceShardDeleteRequest to JSON. * @function toJSON - * @memberof binlogdata.StreamKeyRangeResponse + * @memberof vtctldata.SourceShardDeleteRequest * @instance * @returns {Object.} JSON object */ - StreamKeyRangeResponse.prototype.toJSON = function toJSON() { + SourceShardDeleteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamKeyRangeResponse; + return SourceShardDeleteRequest; })(); - binlogdata.StreamTablesRequest = (function() { + vtctldata.SourceShardDeleteResponse = (function() { /** - * Properties of a StreamTablesRequest. - * @memberof binlogdata - * @interface IStreamTablesRequest - * @property {string|null} [position] StreamTablesRequest position - * @property {Array.|null} [tables] StreamTablesRequest tables - * @property {binlogdata.ICharset|null} [charset] StreamTablesRequest charset + * Properties of a SourceShardDeleteResponse. + * @memberof vtctldata + * @interface ISourceShardDeleteResponse + * @property {topodata.IShard|null} [shard] SourceShardDeleteResponse shard */ /** - * Constructs a new StreamTablesRequest. - * @memberof binlogdata - * @classdesc Represents a StreamTablesRequest. - * @implements IStreamTablesRequest + * Constructs a new SourceShardDeleteResponse. + * @memberof vtctldata + * @classdesc Represents a SourceShardDeleteResponse. + * @implements ISourceShardDeleteResponse * @constructor - * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set + * @param {vtctldata.ISourceShardDeleteResponse=} [properties] Properties to set */ - function StreamTablesRequest(properties) { - this.tables = []; + function SourceShardDeleteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122718,104 +124594,75 @@ $root.binlogdata = (function() { } /** - * StreamTablesRequest position. - * @member {string} position - * @memberof binlogdata.StreamTablesRequest - * @instance - */ - StreamTablesRequest.prototype.position = ""; - - /** - * StreamTablesRequest tables. - * @member {Array.} tables - * @memberof binlogdata.StreamTablesRequest - * @instance - */ - StreamTablesRequest.prototype.tables = $util.emptyArray; - - /** - * StreamTablesRequest charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.StreamTablesRequest + * SourceShardDeleteResponse shard. + * @member {topodata.IShard|null|undefined} shard + * @memberof vtctldata.SourceShardDeleteResponse * @instance */ - StreamTablesRequest.prototype.charset = null; + SourceShardDeleteResponse.prototype.shard = null; /** - * Creates a new StreamTablesRequest instance using the specified properties. + * Creates a new SourceShardDeleteResponse instance using the specified properties. * @function create - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static - * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest instance + * @param {vtctldata.ISourceShardDeleteResponse=} [properties] Properties to set + * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse instance */ - StreamTablesRequest.create = function create(properties) { - return new StreamTablesRequest(properties); + SourceShardDeleteResponse.create = function create(properties) { + return new SourceShardDeleteResponse(properties); }; /** - * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * Encodes the specified SourceShardDeleteResponse message. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static - * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode + * @param {vtctldata.ISourceShardDeleteResponse} message SourceShardDeleteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamTablesRequest.encode = function encode(message, writer) { + SourceShardDeleteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. + * Encodes the specified SourceShardDeleteResponse message, length delimited. Does not implicitly {@link vtctldata.SourceShardDeleteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static - * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode + * @param {vtctldata.ISourceShardDeleteResponse} message SourceShardDeleteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SourceShardDeleteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamTablesRequest message from the specified reader or buffer. + * Decodes a SourceShardDeleteResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamTablesRequest.decode = function decode(reader, length) { + SourceShardDeleteResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.SourceShardDeleteResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.position = reader.string(); - break; - case 2: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 3: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); + message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -122826,142 +124673,112 @@ $root.binlogdata = (function() { }; /** - * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. + * Decodes a SourceShardDeleteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamTablesRequest.decodeDelimited = function decodeDelimited(reader) { + SourceShardDeleteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamTablesRequest message. + * Verifies a SourceShardDeleteResponse message. * @function verify - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamTablesRequest.verify = function verify(message) { + SourceShardDeleteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); + if (message.shard != null && message.hasOwnProperty("shard")) { + var error = $root.topodata.Shard.verify(message.shard); if (error) - return "charset." + error; + return "shard." + error; } return null; }; /** - * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SourceShardDeleteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest + * @returns {vtctldata.SourceShardDeleteResponse} SourceShardDeleteResponse */ - StreamTablesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamTablesRequest) + SourceShardDeleteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.SourceShardDeleteResponse) return object; - var message = new $root.binlogdata.StreamTablesRequest(); - if (object.position != null) - message.position = String(object.position); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.StreamTablesRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.StreamTablesRequest.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); + var message = new $root.vtctldata.SourceShardDeleteResponse(); + if (object.shard != null) { + if (typeof object.shard !== "object") + throw TypeError(".vtctldata.SourceShardDeleteResponse.shard: object expected"); + message.shard = $root.topodata.Shard.fromObject(object.shard); } return message; }; /** - * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SourceShardDeleteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @static - * @param {binlogdata.StreamTablesRequest} message StreamTablesRequest + * @param {vtctldata.SourceShardDeleteResponse} message SourceShardDeleteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamTablesRequest.toObject = function toObject(message, options) { + SourceShardDeleteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (options.defaults) { - object.position = ""; - object.charset = null; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); + if (options.defaults) + object.shard = null; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = $root.topodata.Shard.toObject(message.shard, options); return object; }; /** - * Converts this StreamTablesRequest to JSON. + * Converts this SourceShardDeleteResponse to JSON. * @function toJSON - * @memberof binlogdata.StreamTablesRequest + * @memberof vtctldata.SourceShardDeleteResponse * @instance * @returns {Object.} JSON object */ - StreamTablesRequest.prototype.toJSON = function toJSON() { + SourceShardDeleteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamTablesRequest; + return SourceShardDeleteResponse; })(); - binlogdata.StreamTablesResponse = (function() { + vtctldata.StartReplicationRequest = (function() { /** - * Properties of a StreamTablesResponse. - * @memberof binlogdata - * @interface IStreamTablesResponse - * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamTablesResponse binlog_transaction + * Properties of a StartReplicationRequest. + * @memberof vtctldata + * @interface IStartReplicationRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] StartReplicationRequest tablet_alias */ /** - * Constructs a new StreamTablesResponse. - * @memberof binlogdata - * @classdesc Represents a StreamTablesResponse. - * @implements IStreamTablesResponse + * Constructs a new StartReplicationRequest. + * @memberof vtctldata + * @classdesc Represents a StartReplicationRequest. + * @implements IStartReplicationRequest * @constructor - * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set + * @param {vtctldata.IStartReplicationRequest=} [properties] Properties to set */ - function StreamTablesResponse(properties) { + function StartReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122969,75 +124786,75 @@ $root.binlogdata = (function() { } /** - * StreamTablesResponse binlog_transaction. - * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction - * @memberof binlogdata.StreamTablesResponse + * StartReplicationRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.StartReplicationRequest * @instance */ - StreamTablesResponse.prototype.binlog_transaction = null; + StartReplicationRequest.prototype.tablet_alias = null; /** - * Creates a new StreamTablesResponse instance using the specified properties. + * Creates a new StartReplicationRequest instance using the specified properties. * @function create - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static - * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse instance + * @param {vtctldata.IStartReplicationRequest=} [properties] Properties to set + * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest instance */ - StreamTablesResponse.create = function create(properties) { - return new StreamTablesResponse(properties); + StartReplicationRequest.create = function create(properties) { + return new StartReplicationRequest(properties); }; /** - * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. + * Encodes the specified StartReplicationRequest message. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static - * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode + * @param {vtctldata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamTablesResponse.encode = function encode(message, writer) { + StartReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) - $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. + * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StartReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static - * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode + * @param {vtctldata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { + StartReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamTablesResponse message from the specified reader or buffer. + * Decodes a StartReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse + * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamTablesResponse.decode = function decode(reader, length) { + StartReplicationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StartReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -123048,113 +124865,111 @@ $root.binlogdata = (function() { }; /** - * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. + * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse + * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamTablesResponse.decodeDelimited = function decodeDelimited(reader) { + StartReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamTablesResponse message. + * Verifies a StartReplicationRequest message. * @function verify - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamTablesResponse.verify = function verify(message) { + StartReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { - var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); if (error) - return "binlog_transaction." + error; + return "tablet_alias." + error; } return null; }; /** - * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse + * @returns {vtctldata.StartReplicationRequest} StartReplicationRequest */ - StreamTablesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamTablesResponse) + StartReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.StartReplicationRequest) return object; - var message = new $root.binlogdata.StreamTablesResponse(); - if (object.binlog_transaction != null) { - if (typeof object.binlog_transaction !== "object") - throw TypeError(".binlogdata.StreamTablesResponse.binlog_transaction: object expected"); - message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); + var message = new $root.vtctldata.StartReplicationRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.StartReplicationRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. + * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @static - * @param {binlogdata.StreamTablesResponse} message StreamTablesResponse + * @param {vtctldata.StartReplicationRequest} message StartReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamTablesResponse.toObject = function toObject(message, options) { + StartReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.binlog_transaction = null; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) - object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this StreamTablesResponse to JSON. + * Converts this StartReplicationRequest to JSON. * @function toJSON - * @memberof binlogdata.StreamTablesResponse + * @memberof vtctldata.StartReplicationRequest * @instance * @returns {Object.} JSON object */ - StreamTablesResponse.prototype.toJSON = function toJSON() { + StartReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamTablesResponse; + return StartReplicationRequest; })(); - binlogdata.CharsetConversion = (function() { + vtctldata.StartReplicationResponse = (function() { /** - * Properties of a CharsetConversion. - * @memberof binlogdata - * @interface ICharsetConversion - * @property {string|null} [from_charset] CharsetConversion from_charset - * @property {string|null} [to_charset] CharsetConversion to_charset + * Properties of a StartReplicationResponse. + * @memberof vtctldata + * @interface IStartReplicationResponse */ /** - * Constructs a new CharsetConversion. - * @memberof binlogdata - * @classdesc Represents a CharsetConversion. - * @implements ICharsetConversion + * Constructs a new StartReplicationResponse. + * @memberof vtctldata + * @classdesc Represents a StartReplicationResponse. + * @implements IStartReplicationResponse * @constructor - * @param {binlogdata.ICharsetConversion=} [properties] Properties to set + * @param {vtctldata.IStartReplicationResponse=} [properties] Properties to set */ - function CharsetConversion(properties) { + function StartReplicationResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123162,89 +124977,63 @@ $root.binlogdata = (function() { } /** - * CharsetConversion from_charset. - * @member {string} from_charset - * @memberof binlogdata.CharsetConversion - * @instance - */ - CharsetConversion.prototype.from_charset = ""; - - /** - * CharsetConversion to_charset. - * @member {string} to_charset - * @memberof binlogdata.CharsetConversion - * @instance - */ - CharsetConversion.prototype.to_charset = ""; - - /** - * Creates a new CharsetConversion instance using the specified properties. + * Creates a new StartReplicationResponse instance using the specified properties. * @function create - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static - * @param {binlogdata.ICharsetConversion=} [properties] Properties to set - * @returns {binlogdata.CharsetConversion} CharsetConversion instance + * @param {vtctldata.IStartReplicationResponse=} [properties] Properties to set + * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse instance */ - CharsetConversion.create = function create(properties) { - return new CharsetConversion(properties); + StartReplicationResponse.create = function create(properties) { + return new StartReplicationResponse(properties); }; /** - * Encodes the specified CharsetConversion message. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. + * Encodes the specified StartReplicationResponse message. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static - * @param {binlogdata.ICharsetConversion} message CharsetConversion message or plain object to encode + * @param {vtctldata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CharsetConversion.encode = function encode(message, writer) { + StartReplicationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.from_charset != null && Object.hasOwnProperty.call(message, "from_charset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_charset); - if (message.to_charset != null && Object.hasOwnProperty.call(message, "to_charset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_charset); return writer; }; /** - * Encodes the specified CharsetConversion message, length delimited. Does not implicitly {@link binlogdata.CharsetConversion.verify|verify} messages. + * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StartReplicationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static - * @param {binlogdata.ICharsetConversion} message CharsetConversion message or plain object to encode + * @param {vtctldata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CharsetConversion.encodeDelimited = function encodeDelimited(message, writer) { + StartReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CharsetConversion message from the specified reader or buffer. + * Decodes a StartReplicationResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.CharsetConversion} CharsetConversion + * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CharsetConversion.decode = function decode(reader, length) { + StartReplicationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.CharsetConversion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StartReplicationResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.from_charset = reader.string(); - break; - case 2: - message.to_charset = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -123254,126 +125043,94 @@ $root.binlogdata = (function() { }; /** - * Decodes a CharsetConversion message from the specified reader or buffer, length delimited. + * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.CharsetConversion} CharsetConversion + * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CharsetConversion.decodeDelimited = function decodeDelimited(reader) { + StartReplicationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CharsetConversion message. + * Verifies a StartReplicationResponse message. * @function verify - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CharsetConversion.verify = function verify(message) { + StartReplicationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.from_charset != null && message.hasOwnProperty("from_charset")) - if (!$util.isString(message.from_charset)) - return "from_charset: string expected"; - if (message.to_charset != null && message.hasOwnProperty("to_charset")) - if (!$util.isString(message.to_charset)) - return "to_charset: string expected"; return null; }; /** - * Creates a CharsetConversion message from a plain object. Also converts values to their respective internal types. + * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.CharsetConversion} CharsetConversion + * @returns {vtctldata.StartReplicationResponse} StartReplicationResponse */ - CharsetConversion.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.CharsetConversion) + StartReplicationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.StartReplicationResponse) return object; - var message = new $root.binlogdata.CharsetConversion(); - if (object.from_charset != null) - message.from_charset = String(object.from_charset); - if (object.to_charset != null) - message.to_charset = String(object.to_charset); - return message; + return new $root.vtctldata.StartReplicationResponse(); }; /** - * Creates a plain object from a CharsetConversion message. Also converts values to other types if specified. + * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @static - * @param {binlogdata.CharsetConversion} message CharsetConversion + * @param {vtctldata.StartReplicationResponse} message StartReplicationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CharsetConversion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.from_charset = ""; - object.to_charset = ""; - } - if (message.from_charset != null && message.hasOwnProperty("from_charset")) - object.from_charset = message.from_charset; - if (message.to_charset != null && message.hasOwnProperty("to_charset")) - object.to_charset = message.to_charset; - return object; + StartReplicationResponse.toObject = function toObject() { + return {}; }; /** - * Converts this CharsetConversion to JSON. + * Converts this StartReplicationResponse to JSON. * @function toJSON - * @memberof binlogdata.CharsetConversion + * @memberof vtctldata.StartReplicationResponse * @instance * @returns {Object.} JSON object */ - CharsetConversion.prototype.toJSON = function toJSON() { + StartReplicationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CharsetConversion; + return StartReplicationResponse; })(); - binlogdata.Rule = (function() { + vtctldata.StopReplicationRequest = (function() { /** - * Properties of a Rule. - * @memberof binlogdata - * @interface IRule - * @property {string|null} [match] Rule match - * @property {string|null} [filter] Rule filter - * @property {Object.|null} [convert_enum_to_text] Rule convert_enum_to_text - * @property {Object.|null} [convert_charset] Rule convert_charset - * @property {string|null} [source_unique_key_columns] Rule source_unique_key_columns - * @property {string|null} [target_unique_key_columns] Rule target_unique_key_columns - * @property {string|null} [source_unique_key_target_columns] Rule source_unique_key_target_columns - * @property {Object.|null} [convert_int_to_enum] Rule convert_int_to_enum + * Properties of a StopReplicationRequest. + * @memberof vtctldata + * @interface IStopReplicationRequest + * @property {topodata.ITabletAlias|null} [tablet_alias] StopReplicationRequest tablet_alias */ /** - * Constructs a new Rule. - * @memberof binlogdata - * @classdesc Represents a Rule. - * @implements IRule + * Constructs a new StopReplicationRequest. + * @memberof vtctldata + * @classdesc Represents a StopReplicationRequest. + * @implements IStopReplicationRequest * @constructor - * @param {binlogdata.IRule=} [properties] Properties to set + * @param {vtctldata.IStopReplicationRequest=} [properties] Properties to set */ - function Rule(properties) { - this.convert_enum_to_text = {}; - this.convert_charset = {}; - this.convert_int_to_enum = {}; + function StopReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123381,228 +125138,75 @@ $root.binlogdata = (function() { } /** - * Rule match. - * @member {string} match - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.match = ""; - - /** - * Rule filter. - * @member {string} filter - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.filter = ""; - - /** - * Rule convert_enum_to_text. - * @member {Object.} convert_enum_to_text - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.convert_enum_to_text = $util.emptyObject; - - /** - * Rule convert_charset. - * @member {Object.} convert_charset - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.convert_charset = $util.emptyObject; - - /** - * Rule source_unique_key_columns. - * @member {string} source_unique_key_columns - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.source_unique_key_columns = ""; - - /** - * Rule target_unique_key_columns. - * @member {string} target_unique_key_columns - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.target_unique_key_columns = ""; - - /** - * Rule source_unique_key_target_columns. - * @member {string} source_unique_key_target_columns - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.source_unique_key_target_columns = ""; - - /** - * Rule convert_int_to_enum. - * @member {Object.} convert_int_to_enum - * @memberof binlogdata.Rule + * StopReplicationRequest tablet_alias. + * @member {topodata.ITabletAlias|null|undefined} tablet_alias + * @memberof vtctldata.StopReplicationRequest * @instance */ - Rule.prototype.convert_int_to_enum = $util.emptyObject; + StopReplicationRequest.prototype.tablet_alias = null; /** - * Creates a new Rule instance using the specified properties. + * Creates a new StopReplicationRequest instance using the specified properties. * @function create - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static - * @param {binlogdata.IRule=} [properties] Properties to set - * @returns {binlogdata.Rule} Rule instance + * @param {vtctldata.IStopReplicationRequest=} [properties] Properties to set + * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest instance */ - Rule.create = function create(properties) { - return new Rule(properties); + StopReplicationRequest.create = function create(properties) { + return new StopReplicationRequest(properties); }; /** - * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static - * @param {binlogdata.IRule} message Rule message or plain object to encode + * @param {vtctldata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rule.encode = function encode(message, writer) { + StopReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.match); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.convert_enum_to_text != null && Object.hasOwnProperty.call(message, "convert_enum_to_text")) - for (var keys = Object.keys(message.convert_enum_to_text), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.convert_enum_to_text[keys[i]]).ldelim(); - if (message.convert_charset != null && Object.hasOwnProperty.call(message, "convert_charset")) - for (var keys = Object.keys(message.convert_charset), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.binlogdata.CharsetConversion.encode(message.convert_charset[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.source_unique_key_columns != null && Object.hasOwnProperty.call(message, "source_unique_key_columns")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_unique_key_columns); - if (message.target_unique_key_columns != null && Object.hasOwnProperty.call(message, "target_unique_key_columns")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.target_unique_key_columns); - if (message.source_unique_key_target_columns != null && Object.hasOwnProperty.call(message, "source_unique_key_target_columns")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.source_unique_key_target_columns); - if (message.convert_int_to_enum != null && Object.hasOwnProperty.call(message, "convert_int_to_enum")) - for (var keys = Object.keys(message.convert_int_to_enum), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).bool(message.convert_int_to_enum[keys[i]]).ldelim(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link vtctldata.StopReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static - * @param {binlogdata.IRule} message Rule message or plain object to encode + * @param {vtctldata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rule.encodeDelimited = function encodeDelimited(message, writer) { + StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Rule message from the specified reader or buffer. + * Decodes a StopReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Rule} Rule + * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rule.decode = function decode(reader, length) { + StopReplicationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Rule(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StopReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.match = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - if (message.convert_enum_to_text === $util.emptyObject) - message.convert_enum_to_text = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.convert_enum_to_text[key] = value; - break; - case 4: - if (message.convert_charset === $util.emptyObject) - message.convert_charset = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.binlogdata.CharsetConversion.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.convert_charset[key] = value; - break; - case 5: - message.source_unique_key_columns = reader.string(); - break; - case 6: - message.target_unique_key_columns = reader.string(); - break; - case 7: - message.source_unique_key_target_columns = reader.string(); - break; - case 8: - if (message.convert_int_to_enum === $util.emptyObject) - message.convert_int_to_enum = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = false; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.bool(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.convert_int_to_enum[key] = value; + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -123613,215 +125217,111 @@ $root.binlogdata = (function() { }; /** - * Decodes a Rule message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Rule} Rule + * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rule.decodeDelimited = function decodeDelimited(reader) { + StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Rule message. + * Verifies a StopReplicationRequest message. * @function verify - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Rule.verify = function verify(message) { + StopReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match != null && message.hasOwnProperty("match")) - if (!$util.isString(message.match)) - return "match: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.convert_enum_to_text != null && message.hasOwnProperty("convert_enum_to_text")) { - if (!$util.isObject(message.convert_enum_to_text)) - return "convert_enum_to_text: object expected"; - var key = Object.keys(message.convert_enum_to_text); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.convert_enum_to_text[key[i]])) - return "convert_enum_to_text: string{k:string} expected"; - } - if (message.convert_charset != null && message.hasOwnProperty("convert_charset")) { - if (!$util.isObject(message.convert_charset)) - return "convert_charset: object expected"; - var key = Object.keys(message.convert_charset); - for (var i = 0; i < key.length; ++i) { - var error = $root.binlogdata.CharsetConversion.verify(message.convert_charset[key[i]]); - if (error) - return "convert_charset." + error; - } - } - if (message.source_unique_key_columns != null && message.hasOwnProperty("source_unique_key_columns")) - if (!$util.isString(message.source_unique_key_columns)) - return "source_unique_key_columns: string expected"; - if (message.target_unique_key_columns != null && message.hasOwnProperty("target_unique_key_columns")) - if (!$util.isString(message.target_unique_key_columns)) - return "target_unique_key_columns: string expected"; - if (message.source_unique_key_target_columns != null && message.hasOwnProperty("source_unique_key_target_columns")) - if (!$util.isString(message.source_unique_key_target_columns)) - return "source_unique_key_target_columns: string expected"; - if (message.convert_int_to_enum != null && message.hasOwnProperty("convert_int_to_enum")) { - if (!$util.isObject(message.convert_int_to_enum)) - return "convert_int_to_enum: object expected"; - var key = Object.keys(message.convert_int_to_enum); - for (var i = 0; i < key.length; ++i) - if (typeof message.convert_int_to_enum[key[i]] !== "boolean") - return "convert_int_to_enum: boolean{k:string} expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { + var error = $root.topodata.TabletAlias.verify(message.tablet_alias); + if (error) + return "tablet_alias." + error; } return null; }; /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.Rule} Rule + * @returns {vtctldata.StopReplicationRequest} StopReplicationRequest */ - Rule.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Rule) + StopReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.StopReplicationRequest) return object; - var message = new $root.binlogdata.Rule(); - if (object.match != null) - message.match = String(object.match); - if (object.filter != null) - message.filter = String(object.filter); - if (object.convert_enum_to_text) { - if (typeof object.convert_enum_to_text !== "object") - throw TypeError(".binlogdata.Rule.convert_enum_to_text: object expected"); - message.convert_enum_to_text = {}; - for (var keys = Object.keys(object.convert_enum_to_text), i = 0; i < keys.length; ++i) - message.convert_enum_to_text[keys[i]] = String(object.convert_enum_to_text[keys[i]]); - } - if (object.convert_charset) { - if (typeof object.convert_charset !== "object") - throw TypeError(".binlogdata.Rule.convert_charset: object expected"); - message.convert_charset = {}; - for (var keys = Object.keys(object.convert_charset), i = 0; i < keys.length; ++i) { - if (typeof object.convert_charset[keys[i]] !== "object") - throw TypeError(".binlogdata.Rule.convert_charset: object expected"); - message.convert_charset[keys[i]] = $root.binlogdata.CharsetConversion.fromObject(object.convert_charset[keys[i]]); - } - } - if (object.source_unique_key_columns != null) - message.source_unique_key_columns = String(object.source_unique_key_columns); - if (object.target_unique_key_columns != null) - message.target_unique_key_columns = String(object.target_unique_key_columns); - if (object.source_unique_key_target_columns != null) - message.source_unique_key_target_columns = String(object.source_unique_key_target_columns); - if (object.convert_int_to_enum) { - if (typeof object.convert_int_to_enum !== "object") - throw TypeError(".binlogdata.Rule.convert_int_to_enum: object expected"); - message.convert_int_to_enum = {}; - for (var keys = Object.keys(object.convert_int_to_enum), i = 0; i < keys.length; ++i) - message.convert_int_to_enum[keys[i]] = Boolean(object.convert_int_to_enum[keys[i]]); + var message = new $root.vtctldata.StopReplicationRequest(); + if (object.tablet_alias != null) { + if (typeof object.tablet_alias !== "object") + throw TypeError(".vtctldata.StopReplicationRequest.tablet_alias: object expected"); + message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; }; /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @static - * @param {binlogdata.Rule} message Rule + * @param {vtctldata.StopReplicationRequest} message StopReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Rule.toObject = function toObject(message, options) { + StopReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.convert_enum_to_text = {}; - object.convert_charset = {}; - object.convert_int_to_enum = {}; - } - if (options.defaults) { - object.match = ""; - object.filter = ""; - object.source_unique_key_columns = ""; - object.target_unique_key_columns = ""; - object.source_unique_key_target_columns = ""; - } - if (message.match != null && message.hasOwnProperty("match")) - object.match = message.match; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - var keys2; - if (message.convert_enum_to_text && (keys2 = Object.keys(message.convert_enum_to_text)).length) { - object.convert_enum_to_text = {}; - for (var j = 0; j < keys2.length; ++j) - object.convert_enum_to_text[keys2[j]] = message.convert_enum_to_text[keys2[j]]; - } - if (message.convert_charset && (keys2 = Object.keys(message.convert_charset)).length) { - object.convert_charset = {}; - for (var j = 0; j < keys2.length; ++j) - object.convert_charset[keys2[j]] = $root.binlogdata.CharsetConversion.toObject(message.convert_charset[keys2[j]], options); - } - if (message.source_unique_key_columns != null && message.hasOwnProperty("source_unique_key_columns")) - object.source_unique_key_columns = message.source_unique_key_columns; - if (message.target_unique_key_columns != null && message.hasOwnProperty("target_unique_key_columns")) - object.target_unique_key_columns = message.target_unique_key_columns; - if (message.source_unique_key_target_columns != null && message.hasOwnProperty("source_unique_key_target_columns")) - object.source_unique_key_target_columns = message.source_unique_key_target_columns; - if (message.convert_int_to_enum && (keys2 = Object.keys(message.convert_int_to_enum)).length) { - object.convert_int_to_enum = {}; - for (var j = 0; j < keys2.length; ++j) - object.convert_int_to_enum[keys2[j]] = message.convert_int_to_enum[keys2[j]]; - } + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) + object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; /** - * Converts this Rule to JSON. + * Converts this StopReplicationRequest to JSON. * @function toJSON - * @memberof binlogdata.Rule + * @memberof vtctldata.StopReplicationRequest * @instance * @returns {Object.} JSON object */ - Rule.prototype.toJSON = function toJSON() { + StopReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Rule; + return StopReplicationRequest; })(); - binlogdata.Filter = (function() { + vtctldata.StopReplicationResponse = (function() { /** - * Properties of a Filter. - * @memberof binlogdata - * @interface IFilter - * @property {Array.|null} [rules] Filter rules - * @property {binlogdata.Filter.FieldEventMode|null} [field_event_mode] Filter field_event_mode - * @property {number|Long|null} [workflow_type] Filter workflow_type - * @property {string|null} [workflow_name] Filter workflow_name + * Properties of a StopReplicationResponse. + * @memberof vtctldata + * @interface IStopReplicationResponse */ /** - * Constructs a new Filter. - * @memberof binlogdata - * @classdesc Represents a Filter. - * @implements IFilter + * Constructs a new StopReplicationResponse. + * @memberof vtctldata + * @classdesc Represents a StopReplicationResponse. + * @implements IStopReplicationResponse * @constructor - * @param {binlogdata.IFilter=} [properties] Properties to set + * @param {vtctldata.IStopReplicationResponse=} [properties] Properties to set */ - function Filter(properties) { - this.rules = []; + function StopReplicationResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123829,118 +125329,63 @@ $root.binlogdata = (function() { } /** - * Filter rules. - * @member {Array.} rules - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.rules = $util.emptyArray; - - /** - * Filter field_event_mode. - * @member {binlogdata.Filter.FieldEventMode} field_event_mode - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.field_event_mode = 0; - - /** - * Filter workflow_type. - * @member {number|Long} workflow_type - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.workflow_type = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Filter workflow_name. - * @member {string} workflow_name - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.workflow_name = ""; - - /** - * Creates a new Filter instance using the specified properties. + * Creates a new StopReplicationResponse instance using the specified properties. * @function create - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static - * @param {binlogdata.IFilter=} [properties] Properties to set - * @returns {binlogdata.Filter} Filter instance + * @param {vtctldata.IStopReplicationResponse=} [properties] Properties to set + * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse instance */ - Filter.create = function create(properties) { - return new Filter(properties); + StopReplicationResponse.create = function create(properties) { + return new StopReplicationResponse(properties); }; /** - * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. + * Encodes the specified StopReplicationResponse message. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static - * @param {binlogdata.IFilter} message Filter message or plain object to encode + * @param {vtctldata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Filter.encode = function encode(message, writer) { + StopReplicationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.binlogdata.Rule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.field_event_mode != null && Object.hasOwnProperty.call(message, "field_event_mode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.field_event_mode); - if (message.workflow_type != null && Object.hasOwnProperty.call(message, "workflow_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.workflow_type); - if (message.workflow_name != null && Object.hasOwnProperty.call(message, "workflow_name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.workflow_name); return writer; }; /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. + * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link vtctldata.StopReplicationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static - * @param {binlogdata.IFilter} message Filter message or plain object to encode + * @param {vtctldata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { + StopReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Filter message from the specified reader or buffer. + * Decodes a StopReplicationResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Filter} Filter + * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Filter.decode = function decode(reader, length) { + StopReplicationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Filter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.StopReplicationResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.binlogdata.Rule.decode(reader, reader.uint32())); - break; - case 2: - message.field_event_mode = reader.int32(); - break; - case 3: - message.workflow_type = reader.int64(); - break; - case 4: - message.workflow_name = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -123950,257 +125395,94 @@ $root.binlogdata = (function() { }; /** - * Decodes a Filter message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Filter} Filter + * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Filter.decodeDelimited = function decodeDelimited(reader) { + StopReplicationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Filter message. + * Verifies a StopReplicationResponse message. * @function verify - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Filter.verify = function verify(message) { + StopReplicationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.binlogdata.Rule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.field_event_mode != null && message.hasOwnProperty("field_event_mode")) - switch (message.field_event_mode) { - default: - return "field_event_mode: enum value expected"; - case 0: - case 1: - break; - } - if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) - if (!$util.isInteger(message.workflow_type) && !(message.workflow_type && $util.isInteger(message.workflow_type.low) && $util.isInteger(message.workflow_type.high))) - return "workflow_type: integer|Long expected"; - if (message.workflow_name != null && message.hasOwnProperty("workflow_name")) - if (!$util.isString(message.workflow_name)) - return "workflow_name: string expected"; return null; }; /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.Filter} Filter + * @returns {vtctldata.StopReplicationResponse} StopReplicationResponse */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Filter) + StopReplicationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.StopReplicationResponse) return object; - var message = new $root.binlogdata.Filter(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".binlogdata.Filter.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".binlogdata.Filter.rules: object expected"); - message.rules[i] = $root.binlogdata.Rule.fromObject(object.rules[i]); - } - } - switch (object.field_event_mode) { - case "ERR_ON_MISMATCH": - case 0: - message.field_event_mode = 0; - break; - case "BEST_EFFORT": - case 1: - message.field_event_mode = 1; - break; - } - if (object.workflow_type != null) - if ($util.Long) - (message.workflow_type = $util.Long.fromValue(object.workflow_type)).unsigned = false; - else if (typeof object.workflow_type === "string") - message.workflow_type = parseInt(object.workflow_type, 10); - else if (typeof object.workflow_type === "number") - message.workflow_type = object.workflow_type; - else if (typeof object.workflow_type === "object") - message.workflow_type = new $util.LongBits(object.workflow_type.low >>> 0, object.workflow_type.high >>> 0).toNumber(); - if (object.workflow_name != null) - message.workflow_name = String(object.workflow_name); - return message; + return new $root.vtctldata.StopReplicationResponse(); }; /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. + * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @static - * @param {binlogdata.Filter} message Filter + * @param {vtctldata.StopReplicationResponse} message StopReplicationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) { - object.field_event_mode = options.enums === String ? "ERR_ON_MISMATCH" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.workflow_type = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.workflow_type = options.longs === String ? "0" : 0; - object.workflow_name = ""; - } - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.binlogdata.Rule.toObject(message.rules[j], options); - } - if (message.field_event_mode != null && message.hasOwnProperty("field_event_mode")) - object.field_event_mode = options.enums === String ? $root.binlogdata.Filter.FieldEventMode[message.field_event_mode] : message.field_event_mode; - if (message.workflow_type != null && message.hasOwnProperty("workflow_type")) - if (typeof message.workflow_type === "number") - object.workflow_type = options.longs === String ? String(message.workflow_type) : message.workflow_type; - else - object.workflow_type = options.longs === String ? $util.Long.prototype.toString.call(message.workflow_type) : options.longs === Number ? new $util.LongBits(message.workflow_type.low >>> 0, message.workflow_type.high >>> 0).toNumber() : message.workflow_type; - if (message.workflow_name != null && message.hasOwnProperty("workflow_name")) - object.workflow_name = message.workflow_name; - return object; + StopReplicationResponse.toObject = function toObject() { + return {}; }; /** - * Converts this Filter to JSON. + * Converts this StopReplicationResponse to JSON. * @function toJSON - * @memberof binlogdata.Filter + * @memberof vtctldata.StopReplicationResponse * @instance * @returns {Object.} JSON object */ - Filter.prototype.toJSON = function toJSON() { + StopReplicationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * FieldEventMode enum. - * @name binlogdata.Filter.FieldEventMode - * @enum {number} - * @property {number} ERR_ON_MISMATCH=0 ERR_ON_MISMATCH value - * @property {number} BEST_EFFORT=1 BEST_EFFORT value - */ - Filter.FieldEventMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERR_ON_MISMATCH"] = 0; - values[valuesById[1] = "BEST_EFFORT"] = 1; - return values; - })(); - - return Filter; - })(); - - /** - * OnDDLAction enum. - * @name binlogdata.OnDDLAction - * @enum {number} - * @property {number} IGNORE=0 IGNORE value - * @property {number} STOP=1 STOP value - * @property {number} EXEC=2 EXEC value - * @property {number} EXEC_IGNORE=3 EXEC_IGNORE value - */ - binlogdata.OnDDLAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IGNORE"] = 0; - values[valuesById[1] = "STOP"] = 1; - values[valuesById[2] = "EXEC"] = 2; - values[valuesById[3] = "EXEC_IGNORE"] = 3; - return values; - })(); - - /** - * VReplicationWorkflowType enum. - * @name binlogdata.VReplicationWorkflowType - * @enum {number} - * @property {number} Materialize=0 Materialize value - * @property {number} MoveTables=1 MoveTables value - * @property {number} CreateLookupIndex=2 CreateLookupIndex value - * @property {number} Migrate=3 Migrate value - * @property {number} Reshard=4 Reshard value - * @property {number} OnlineDDL=5 OnlineDDL value - */ - binlogdata.VReplicationWorkflowType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "Materialize"] = 0; - values[valuesById[1] = "MoveTables"] = 1; - values[valuesById[2] = "CreateLookupIndex"] = 2; - values[valuesById[3] = "Migrate"] = 3; - values[valuesById[4] = "Reshard"] = 4; - values[valuesById[5] = "OnlineDDL"] = 5; - return values; - })(); - - /** - * VReplicationWorkflowSubType enum. - * @name binlogdata.VReplicationWorkflowSubType - * @enum {number} - * @property {number} None=0 None value - * @property {number} Partial=1 Partial value - */ - binlogdata.VReplicationWorkflowSubType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "None"] = 0; - values[valuesById[1] = "Partial"] = 1; - return values; + return StopReplicationResponse; })(); - binlogdata.BinlogSource = (function() { + vtctldata.TabletExternallyReparentedRequest = (function() { /** - * Properties of a BinlogSource. - * @memberof binlogdata - * @interface IBinlogSource - * @property {string|null} [keyspace] BinlogSource keyspace - * @property {string|null} [shard] BinlogSource shard - * @property {topodata.TabletType|null} [tablet_type] BinlogSource tablet_type - * @property {topodata.IKeyRange|null} [key_range] BinlogSource key_range - * @property {Array.|null} [tables] BinlogSource tables - * @property {binlogdata.IFilter|null} [filter] BinlogSource filter - * @property {binlogdata.OnDDLAction|null} [on_ddl] BinlogSource on_ddl - * @property {string|null} [external_mysql] BinlogSource external_mysql - * @property {boolean|null} [stop_after_copy] BinlogSource stop_after_copy - * @property {string|null} [external_cluster] BinlogSource external_cluster - * @property {string|null} [source_time_zone] BinlogSource source_time_zone - * @property {string|null} [target_time_zone] BinlogSource target_time_zone + * Properties of a TabletExternallyReparentedRequest. + * @memberof vtctldata + * @interface ITabletExternallyReparentedRequest + * @property {topodata.ITabletAlias|null} [tablet] TabletExternallyReparentedRequest tablet */ /** - * Constructs a new BinlogSource. - * @memberof binlogdata - * @classdesc Represents a BinlogSource. - * @implements IBinlogSource + * Constructs a new TabletExternallyReparentedRequest. + * @memberof vtctldata + * @classdesc Represents a TabletExternallyReparentedRequest. + * @implements ITabletExternallyReparentedRequest * @constructor - * @param {binlogdata.IBinlogSource=} [properties] Properties to set + * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set */ - function BinlogSource(properties) { - this.tables = []; + function TabletExternallyReparentedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -124208,181 +125490,295 @@ $root.binlogdata = (function() { } /** - * BinlogSource keyspace. - * @member {string} keyspace - * @memberof binlogdata.BinlogSource + * TabletExternallyReparentedRequest tablet. + * @member {topodata.ITabletAlias|null|undefined} tablet + * @memberof vtctldata.TabletExternallyReparentedRequest * @instance */ - BinlogSource.prototype.keyspace = ""; + TabletExternallyReparentedRequest.prototype.tablet = null; /** - * BinlogSource shard. - * @member {string} shard - * @memberof binlogdata.BinlogSource - * @instance + * Creates a new TabletExternallyReparentedRequest instance using the specified properties. + * @function create + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set + * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest instance */ - BinlogSource.prototype.shard = ""; + TabletExternallyReparentedRequest.create = function create(properties) { + return new TabletExternallyReparentedRequest(properties); + }; /** - * BinlogSource tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof binlogdata.BinlogSource - * @instance + * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BinlogSource.prototype.tablet_type = 0; + TabletExternallyReparentedRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * BinlogSource key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof binlogdata.BinlogSource - * @instance + * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BinlogSource.prototype.key_range = null; + TabletExternallyReparentedRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * BinlogSource tables. - * @member {Array.} tables - * @memberof binlogdata.BinlogSource - * @instance + * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BinlogSource.prototype.tables = $util.emptyArray; + TabletExternallyReparentedRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * BinlogSource filter. - * @member {binlogdata.IFilter|null|undefined} filter - * @memberof binlogdata.BinlogSource + * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TabletExternallyReparentedRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TabletExternallyReparentedRequest message. + * @function verify + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TabletExternallyReparentedRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet != null && message.hasOwnProperty("tablet")) { + var error = $root.topodata.TabletAlias.verify(message.tablet); + if (error) + return "tablet." + error; + } + return null; + }; + + /** + * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest + */ + TabletExternallyReparentedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.TabletExternallyReparentedRequest) + return object; + var message = new $root.vtctldata.TabletExternallyReparentedRequest(); + if (object.tablet != null) { + if (typeof object.tablet !== "object") + throw TypeError(".vtctldata.TabletExternallyReparentedRequest.tablet: object expected"); + message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); + } + return message; + }; + + /** + * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.TabletExternallyReparentedRequest + * @static + * @param {vtctldata.TabletExternallyReparentedRequest} message TabletExternallyReparentedRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TabletExternallyReparentedRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tablet = null; + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); + return object; + }; + + /** + * Converts this TabletExternallyReparentedRequest to JSON. + * @function toJSON + * @memberof vtctldata.TabletExternallyReparentedRequest * @instance + * @returns {Object.} JSON object */ - BinlogSource.prototype.filter = null; + TabletExternallyReparentedRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TabletExternallyReparentedRequest; + })(); + + vtctldata.TabletExternallyReparentedResponse = (function() { /** - * BinlogSource on_ddl. - * @member {binlogdata.OnDDLAction} on_ddl - * @memberof binlogdata.BinlogSource - * @instance + * Properties of a TabletExternallyReparentedResponse. + * @memberof vtctldata + * @interface ITabletExternallyReparentedResponse + * @property {string|null} [keyspace] TabletExternallyReparentedResponse keyspace + * @property {string|null} [shard] TabletExternallyReparentedResponse shard + * @property {topodata.ITabletAlias|null} [new_primary] TabletExternallyReparentedResponse new_primary + * @property {topodata.ITabletAlias|null} [old_primary] TabletExternallyReparentedResponse old_primary */ - BinlogSource.prototype.on_ddl = 0; /** - * BinlogSource external_mysql. - * @member {string} external_mysql - * @memberof binlogdata.BinlogSource - * @instance + * Constructs a new TabletExternallyReparentedResponse. + * @memberof vtctldata + * @classdesc Represents a TabletExternallyReparentedResponse. + * @implements ITabletExternallyReparentedResponse + * @constructor + * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set */ - BinlogSource.prototype.external_mysql = ""; + function TabletExternallyReparentedResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * BinlogSource stop_after_copy. - * @member {boolean} stop_after_copy - * @memberof binlogdata.BinlogSource + * TabletExternallyReparentedResponse keyspace. + * @member {string} keyspace + * @memberof vtctldata.TabletExternallyReparentedResponse * @instance */ - BinlogSource.prototype.stop_after_copy = false; + TabletExternallyReparentedResponse.prototype.keyspace = ""; /** - * BinlogSource external_cluster. - * @member {string} external_cluster - * @memberof binlogdata.BinlogSource + * TabletExternallyReparentedResponse shard. + * @member {string} shard + * @memberof vtctldata.TabletExternallyReparentedResponse * @instance */ - BinlogSource.prototype.external_cluster = ""; + TabletExternallyReparentedResponse.prototype.shard = ""; /** - * BinlogSource source_time_zone. - * @member {string} source_time_zone - * @memberof binlogdata.BinlogSource + * TabletExternallyReparentedResponse new_primary. + * @member {topodata.ITabletAlias|null|undefined} new_primary + * @memberof vtctldata.TabletExternallyReparentedResponse * @instance */ - BinlogSource.prototype.source_time_zone = ""; + TabletExternallyReparentedResponse.prototype.new_primary = null; /** - * BinlogSource target_time_zone. - * @member {string} target_time_zone - * @memberof binlogdata.BinlogSource + * TabletExternallyReparentedResponse old_primary. + * @member {topodata.ITabletAlias|null|undefined} old_primary + * @memberof vtctldata.TabletExternallyReparentedResponse * @instance */ - BinlogSource.prototype.target_time_zone = ""; + TabletExternallyReparentedResponse.prototype.old_primary = null; /** - * Creates a new BinlogSource instance using the specified properties. + * Creates a new TabletExternallyReparentedResponse instance using the specified properties. * @function create - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static - * @param {binlogdata.IBinlogSource=} [properties] Properties to set - * @returns {binlogdata.BinlogSource} BinlogSource instance + * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set + * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse instance */ - BinlogSource.create = function create(properties) { - return new BinlogSource(properties); + TabletExternallyReparentedResponse.create = function create(properties) { + return new TabletExternallyReparentedResponse(properties); }; /** - * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. + * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static - * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode + * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BinlogSource.encode = function encode(message, writer) { + TabletExternallyReparentedResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.tables[i]); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.on_ddl); - if (message.external_mysql != null && Object.hasOwnProperty.call(message, "external_mysql")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_mysql); - if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.stop_after_copy); - if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.external_cluster); - if (message.source_time_zone != null && Object.hasOwnProperty.call(message, "source_time_zone")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.source_time_zone); - if (message.target_time_zone != null && Object.hasOwnProperty.call(message, "target_time_zone")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_time_zone); + if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) + $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.old_primary != null && Object.hasOwnProperty.call(message, "old_primary")) + $root.topodata.TabletAlias.encode(message.old_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. + * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static - * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode + * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BinlogSource.encodeDelimited = function encodeDelimited(message, writer) { + TabletExternallyReparentedResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BinlogSource message from the specified reader or buffer. + * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogSource} BinlogSource + * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BinlogSource.decode = function decode(reader, length) { + TabletExternallyReparentedResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -124393,36 +125789,10 @@ $root.binlogdata = (function() { message.shard = reader.string(); break; case 3: - message.tablet_type = reader.int32(); + message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; case 4: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 6: - message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); - break; - case 7: - message.on_ddl = reader.int32(); - break; - case 8: - message.external_mysql = reader.string(); - break; - case 9: - message.stop_after_copy = reader.bool(); - break; - case 10: - message.external_cluster = reader.string(); - break; - case 11: - message.source_time_zone = reader.string(); - break; - case 12: - message.target_time_zone = reader.string(); + message.old_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -124433,30 +125803,30 @@ $root.binlogdata = (function() { }; /** - * Decodes a BinlogSource message from the specified reader or buffer, length delimited. + * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogSource} BinlogSource + * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BinlogSource.decodeDelimited = function decodeDelimited(reader) { + TabletExternallyReparentedResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BinlogSource message. + * Verifies a TabletExternallyReparentedResponse message. * @function verify - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BinlogSource.verify = function verify(message) { + TabletExternallyReparentedResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) @@ -124465,321 +125835,326 @@ $root.binlogdata = (function() { if (message.shard != null && message.hasOwnProperty("shard")) if (!$util.isString(message.shard)) return "shard: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); + if (message.new_primary != null && message.hasOwnProperty("new_primary")) { + var error = $root.topodata.TabletAlias.verify(message.new_primary); if (error) - return "key_range." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; + return "new_primary." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.binlogdata.Filter.verify(message.filter); + if (message.old_primary != null && message.hasOwnProperty("old_primary")) { + var error = $root.topodata.TabletAlias.verify(message.old_primary); if (error) - return "filter." + error; + return "old_primary." + error; } - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - switch (message.on_ddl) { - default: - return "on_ddl: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) - if (!$util.isString(message.external_mysql)) - return "external_mysql: string expected"; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - if (typeof message.stop_after_copy !== "boolean") - return "stop_after_copy: boolean expected"; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - if (!$util.isString(message.external_cluster)) - return "external_cluster: string expected"; - if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) - if (!$util.isString(message.source_time_zone)) - return "source_time_zone: string expected"; - if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) - if (!$util.isString(message.target_time_zone)) - return "target_time_zone: string expected"; return null; }; /** - * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. + * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.TabletExternallyReparentedResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.BinlogSource} BinlogSource + * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse */ - BinlogSource.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogSource) + TabletExternallyReparentedResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.TabletExternallyReparentedResponse) return object; - var message = new $root.binlogdata.BinlogSource(); + var message = new $root.vtctldata.TabletExternallyReparentedResponse(); if (object.keyspace != null) message.keyspace = String(object.keyspace); if (object.shard != null) message.shard = String(object.shard); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "PRIMARY": - case 1: - message.tablet_type = 1; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; + if (object.new_primary != null) { + if (typeof object.new_primary !== "object") + throw TypeError(".vtctldata.TabletExternallyReparentedResponse.new_primary: object expected"); + message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); } - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".binlogdata.BinlogSource.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); + if (object.old_primary != null) { + if (typeof object.old_primary !== "object") + throw TypeError(".vtctldata.TabletExternallyReparentedResponse.old_primary: object expected"); + message.old_primary = $root.topodata.TabletAlias.fromObject(object.old_primary); } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.BinlogSource.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); + return message; + }; + + /** + * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.TabletExternallyReparentedResponse + * @static + * @param {vtctldata.TabletExternallyReparentedResponse} message TabletExternallyReparentedResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TabletExternallyReparentedResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.new_primary = null; + object.old_primary = null; } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".binlogdata.BinlogSource.filter: object expected"); - message.filter = $root.binlogdata.Filter.fromObject(object.filter); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.new_primary != null && message.hasOwnProperty("new_primary")) + object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); + if (message.old_primary != null && message.hasOwnProperty("old_primary")) + object.old_primary = $root.topodata.TabletAlias.toObject(message.old_primary, options); + return object; + }; + + /** + * Converts this TabletExternallyReparentedResponse to JSON. + * @function toJSON + * @memberof vtctldata.TabletExternallyReparentedResponse + * @instance + * @returns {Object.} JSON object + */ + TabletExternallyReparentedResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TabletExternallyReparentedResponse; + })(); + + vtctldata.UpdateCellInfoRequest = (function() { + + /** + * Properties of an UpdateCellInfoRequest. + * @memberof vtctldata + * @interface IUpdateCellInfoRequest + * @property {string|null} [name] UpdateCellInfoRequest name + * @property {topodata.ICellInfo|null} [cell_info] UpdateCellInfoRequest cell_info + */ + + /** + * Constructs a new UpdateCellInfoRequest. + * @memberof vtctldata + * @classdesc Represents an UpdateCellInfoRequest. + * @implements IUpdateCellInfoRequest + * @constructor + * @param {vtctldata.IUpdateCellInfoRequest=} [properties] Properties to set + */ + function UpdateCellInfoRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCellInfoRequest name. + * @member {string} name + * @memberof vtctldata.UpdateCellInfoRequest + * @instance + */ + UpdateCellInfoRequest.prototype.name = ""; + + /** + * UpdateCellInfoRequest cell_info. + * @member {topodata.ICellInfo|null|undefined} cell_info + * @memberof vtctldata.UpdateCellInfoRequest + * @instance + */ + UpdateCellInfoRequest.prototype.cell_info = null; + + /** + * Creates a new UpdateCellInfoRequest instance using the specified properties. + * @function create + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {vtctldata.IUpdateCellInfoRequest=} [properties] Properties to set + * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest instance + */ + UpdateCellInfoRequest.create = function create(properties) { + return new UpdateCellInfoRequest(properties); + }; + + /** + * Encodes the specified UpdateCellInfoRequest message. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {vtctldata.IUpdateCellInfoRequest} message UpdateCellInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCellInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) + $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {vtctldata.IUpdateCellInfoRequest} message UpdateCellInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCellInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCellInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellInfoRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCellInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCellInfoRequest message. + * @function verify + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCellInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) { + var error = $root.topodata.CellInfo.verify(message.cell_info); + if (error) + return "cell_info." + error; } - switch (object.on_ddl) { - case "IGNORE": - case 0: - message.on_ddl = 0; - break; - case "STOP": - case 1: - message.on_ddl = 1; - break; - case "EXEC": - case 2: - message.on_ddl = 2; - break; - case "EXEC_IGNORE": - case 3: - message.on_ddl = 3; - break; + return null; + }; + + /** + * Creates an UpdateCellInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.UpdateCellInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.UpdateCellInfoRequest} UpdateCellInfoRequest + */ + UpdateCellInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateCellInfoRequest) + return object; + var message = new $root.vtctldata.UpdateCellInfoRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cell_info != null) { + if (typeof object.cell_info !== "object") + throw TypeError(".vtctldata.UpdateCellInfoRequest.cell_info: object expected"); + message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); } - if (object.external_mysql != null) - message.external_mysql = String(object.external_mysql); - if (object.stop_after_copy != null) - message.stop_after_copy = Boolean(object.stop_after_copy); - if (object.external_cluster != null) - message.external_cluster = String(object.external_cluster); - if (object.source_time_zone != null) - message.source_time_zone = String(object.source_time_zone); - if (object.target_time_zone != null) - message.target_time_zone = String(object.target_time_zone); return message; }; /** - * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCellInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.UpdateCellInfoRequest * @static - * @param {binlogdata.BinlogSource} message BinlogSource + * @param {vtctldata.UpdateCellInfoRequest} message UpdateCellInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BinlogSource.toObject = function toObject(message, options) { + UpdateCellInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tables = []; if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.key_range = null; - object.filter = null; - object.on_ddl = options.enums === String ? "IGNORE" : 0; - object.external_mysql = ""; - object.stop_after_copy = false; - object.external_cluster = ""; - object.source_time_zone = ""; - object.target_time_zone = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; + object.name = ""; + object.cell_info = null; } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.binlogdata.Filter.toObject(message.filter, options); - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - object.on_ddl = options.enums === String ? $root.binlogdata.OnDDLAction[message.on_ddl] : message.on_ddl; - if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) - object.external_mysql = message.external_mysql; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - object.stop_after_copy = message.stop_after_copy; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - object.external_cluster = message.external_cluster; - if (message.source_time_zone != null && message.hasOwnProperty("source_time_zone")) - object.source_time_zone = message.source_time_zone; - if (message.target_time_zone != null && message.hasOwnProperty("target_time_zone")) - object.target_time_zone = message.target_time_zone; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) + object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); return object; }; /** - * Converts this BinlogSource to JSON. + * Converts this UpdateCellInfoRequest to JSON. * @function toJSON - * @memberof binlogdata.BinlogSource + * @memberof vtctldata.UpdateCellInfoRequest * @instance * @returns {Object.} JSON object */ - BinlogSource.prototype.toJSON = function toJSON() { + UpdateCellInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BinlogSource; - })(); - - /** - * VEventType enum. - * @name binlogdata.VEventType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} GTID=1 GTID value - * @property {number} BEGIN=2 BEGIN value - * @property {number} COMMIT=3 COMMIT value - * @property {number} ROLLBACK=4 ROLLBACK value - * @property {number} DDL=5 DDL value - * @property {number} INSERT=6 INSERT value - * @property {number} REPLACE=7 REPLACE value - * @property {number} UPDATE=8 UPDATE value - * @property {number} DELETE=9 DELETE value - * @property {number} SET=10 SET value - * @property {number} OTHER=11 OTHER value - * @property {number} ROW=12 ROW value - * @property {number} FIELD=13 FIELD value - * @property {number} HEARTBEAT=14 HEARTBEAT value - * @property {number} VGTID=15 VGTID value - * @property {number} JOURNAL=16 JOURNAL value - * @property {number} VERSION=17 VERSION value - * @property {number} LASTPK=18 LASTPK value - * @property {number} SAVEPOINT=19 SAVEPOINT value - * @property {number} COPY_COMPLETED=20 COPY_COMPLETED value - */ - binlogdata.VEventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "GTID"] = 1; - values[valuesById[2] = "BEGIN"] = 2; - values[valuesById[3] = "COMMIT"] = 3; - values[valuesById[4] = "ROLLBACK"] = 4; - values[valuesById[5] = "DDL"] = 5; - values[valuesById[6] = "INSERT"] = 6; - values[valuesById[7] = "REPLACE"] = 7; - values[valuesById[8] = "UPDATE"] = 8; - values[valuesById[9] = "DELETE"] = 9; - values[valuesById[10] = "SET"] = 10; - values[valuesById[11] = "OTHER"] = 11; - values[valuesById[12] = "ROW"] = 12; - values[valuesById[13] = "FIELD"] = 13; - values[valuesById[14] = "HEARTBEAT"] = 14; - values[valuesById[15] = "VGTID"] = 15; - values[valuesById[16] = "JOURNAL"] = 16; - values[valuesById[17] = "VERSION"] = 17; - values[valuesById[18] = "LASTPK"] = 18; - values[valuesById[19] = "SAVEPOINT"] = 19; - values[valuesById[20] = "COPY_COMPLETED"] = 20; - return values; + return UpdateCellInfoRequest; })(); - binlogdata.RowChange = (function() { + vtctldata.UpdateCellInfoResponse = (function() { /** - * Properties of a RowChange. - * @memberof binlogdata - * @interface IRowChange - * @property {query.IRow|null} [before] RowChange before - * @property {query.IRow|null} [after] RowChange after + * Properties of an UpdateCellInfoResponse. + * @memberof vtctldata + * @interface IUpdateCellInfoResponse + * @property {string|null} [name] UpdateCellInfoResponse name + * @property {topodata.ICellInfo|null} [cell_info] UpdateCellInfoResponse cell_info */ /** - * Constructs a new RowChange. - * @memberof binlogdata - * @classdesc Represents a RowChange. - * @implements IRowChange + * Constructs a new UpdateCellInfoResponse. + * @memberof vtctldata + * @classdesc Represents an UpdateCellInfoResponse. + * @implements IUpdateCellInfoResponse * @constructor - * @param {binlogdata.IRowChange=} [properties] Properties to set + * @param {vtctldata.IUpdateCellInfoResponse=} [properties] Properties to set */ - function RowChange(properties) { + function UpdateCellInfoResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -124787,88 +126162,88 @@ $root.binlogdata = (function() { } /** - * RowChange before. - * @member {query.IRow|null|undefined} before - * @memberof binlogdata.RowChange + * UpdateCellInfoResponse name. + * @member {string} name + * @memberof vtctldata.UpdateCellInfoResponse * @instance */ - RowChange.prototype.before = null; + UpdateCellInfoResponse.prototype.name = ""; /** - * RowChange after. - * @member {query.IRow|null|undefined} after - * @memberof binlogdata.RowChange + * UpdateCellInfoResponse cell_info. + * @member {topodata.ICellInfo|null|undefined} cell_info + * @memberof vtctldata.UpdateCellInfoResponse * @instance */ - RowChange.prototype.after = null; + UpdateCellInfoResponse.prototype.cell_info = null; /** - * Creates a new RowChange instance using the specified properties. + * Creates a new UpdateCellInfoResponse instance using the specified properties. * @function create - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static - * @param {binlogdata.IRowChange=} [properties] Properties to set - * @returns {binlogdata.RowChange} RowChange instance + * @param {vtctldata.IUpdateCellInfoResponse=} [properties] Properties to set + * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse instance */ - RowChange.create = function create(properties) { - return new RowChange(properties); + UpdateCellInfoResponse.create = function create(properties) { + return new UpdateCellInfoResponse(properties); }; /** - * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. + * Encodes the specified UpdateCellInfoResponse message. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static - * @param {binlogdata.IRowChange} message RowChange message or plain object to encode + * @param {vtctldata.IUpdateCellInfoResponse} message UpdateCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowChange.encode = function encode(message, writer) { + UpdateCellInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.query.Row.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.query.Row.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) + $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. + * Encodes the specified UpdateCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static - * @param {binlogdata.IRowChange} message RowChange message or plain object to encode + * @param {vtctldata.IUpdateCellInfoResponse} message UpdateCellInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowChange.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowChange message from the specified reader or buffer. + * Decodes an UpdateCellInfoResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.RowChange} RowChange + * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowChange.decode = function decode(reader, length) { + UpdateCellInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowChange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.before = $root.query.Row.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.after = $root.query.Row.decode(reader, reader.uint32()); + message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -124879,130 +126254,122 @@ $root.binlogdata = (function() { }; /** - * Decodes a RowChange message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.RowChange} RowChange + * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowChange.decodeDelimited = function decodeDelimited(reader) { + UpdateCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowChange message. + * Verifies an UpdateCellInfoResponse message. * @function verify - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RowChange.verify = function verify(message) { + UpdateCellInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.query.Row.verify(message.before); - if (error) - return "before." + error; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.query.Row.verify(message.after); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) { + var error = $root.topodata.CellInfo.verify(message.cell_info); if (error) - return "after." + error; + return "cell_info." + error; } return null; }; /** - * Creates a RowChange message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.RowChange} RowChange + * @returns {vtctldata.UpdateCellInfoResponse} UpdateCellInfoResponse */ - RowChange.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.RowChange) + UpdateCellInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateCellInfoResponse) return object; - var message = new $root.binlogdata.RowChange(); - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".binlogdata.RowChange.before: object expected"); - message.before = $root.query.Row.fromObject(object.before); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".binlogdata.RowChange.after: object expected"); - message.after = $root.query.Row.fromObject(object.after); + var message = new $root.vtctldata.UpdateCellInfoResponse(); + if (object.name != null) + message.name = String(object.name); + if (object.cell_info != null) { + if (typeof object.cell_info !== "object") + throw TypeError(".vtctldata.UpdateCellInfoResponse.cell_info: object expected"); + message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); } return message; }; /** - * Creates a plain object from a RowChange message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCellInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @static - * @param {binlogdata.RowChange} message RowChange + * @param {vtctldata.UpdateCellInfoResponse} message UpdateCellInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowChange.toObject = function toObject(message, options) { + UpdateCellInfoResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.before = null; - object.after = null; + object.name = ""; + object.cell_info = null; } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.query.Row.toObject(message.before, options); - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.query.Row.toObject(message.after, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cell_info != null && message.hasOwnProperty("cell_info")) + object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); return object; }; /** - * Converts this RowChange to JSON. + * Converts this UpdateCellInfoResponse to JSON. * @function toJSON - * @memberof binlogdata.RowChange + * @memberof vtctldata.UpdateCellInfoResponse * @instance * @returns {Object.} JSON object */ - RowChange.prototype.toJSON = function toJSON() { + UpdateCellInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RowChange; + return UpdateCellInfoResponse; })(); - binlogdata.RowEvent = (function() { + vtctldata.UpdateCellsAliasRequest = (function() { /** - * Properties of a RowEvent. - * @memberof binlogdata - * @interface IRowEvent - * @property {string|null} [table_name] RowEvent table_name - * @property {Array.|null} [row_changes] RowEvent row_changes - * @property {string|null} [keyspace] RowEvent keyspace - * @property {string|null} [shard] RowEvent shard + * Properties of an UpdateCellsAliasRequest. + * @memberof vtctldata + * @interface IUpdateCellsAliasRequest + * @property {string|null} [name] UpdateCellsAliasRequest name + * @property {topodata.ICellsAlias|null} [cells_alias] UpdateCellsAliasRequest cells_alias */ /** - * Constructs a new RowEvent. - * @memberof binlogdata - * @classdesc Represents a RowEvent. - * @implements IRowEvent + * Constructs a new UpdateCellsAliasRequest. + * @memberof vtctldata + * @classdesc Represents an UpdateCellsAliasRequest. + * @implements IUpdateCellsAliasRequest * @constructor - * @param {binlogdata.IRowEvent=} [properties] Properties to set + * @param {vtctldata.IUpdateCellsAliasRequest=} [properties] Properties to set */ - function RowEvent(properties) { - this.row_changes = []; + function UpdateCellsAliasRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125010,117 +126377,88 @@ $root.binlogdata = (function() { } /** - * RowEvent table_name. - * @member {string} table_name - * @memberof binlogdata.RowEvent - * @instance - */ - RowEvent.prototype.table_name = ""; - - /** - * RowEvent row_changes. - * @member {Array.} row_changes - * @memberof binlogdata.RowEvent - * @instance - */ - RowEvent.prototype.row_changes = $util.emptyArray; - - /** - * RowEvent keyspace. - * @member {string} keyspace - * @memberof binlogdata.RowEvent + * UpdateCellsAliasRequest name. + * @member {string} name + * @memberof vtctldata.UpdateCellsAliasRequest * @instance */ - RowEvent.prototype.keyspace = ""; + UpdateCellsAliasRequest.prototype.name = ""; /** - * RowEvent shard. - * @member {string} shard - * @memberof binlogdata.RowEvent + * UpdateCellsAliasRequest cells_alias. + * @member {topodata.ICellsAlias|null|undefined} cells_alias + * @memberof vtctldata.UpdateCellsAliasRequest * @instance */ - RowEvent.prototype.shard = ""; + UpdateCellsAliasRequest.prototype.cells_alias = null; /** - * Creates a new RowEvent instance using the specified properties. + * Creates a new UpdateCellsAliasRequest instance using the specified properties. * @function create - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static - * @param {binlogdata.IRowEvent=} [properties] Properties to set - * @returns {binlogdata.RowEvent} RowEvent instance + * @param {vtctldata.IUpdateCellsAliasRequest=} [properties] Properties to set + * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest instance */ - RowEvent.create = function create(properties) { - return new RowEvent(properties); + UpdateCellsAliasRequest.create = function create(properties) { + return new UpdateCellsAliasRequest(properties); }; /** - * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. + * Encodes the specified UpdateCellsAliasRequest message. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static - * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode + * @param {vtctldata.IUpdateCellsAliasRequest} message UpdateCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowEvent.encode = function encode(message, writer) { + UpdateCellsAliasRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); - if (message.row_changes != null && message.row_changes.length) - for (var i = 0; i < message.row_changes.length; ++i) - $root.binlogdata.RowChange.encode(message.row_changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.shard); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cells_alias != null && Object.hasOwnProperty.call(message, "cells_alias")) + $root.topodata.CellsAlias.encode(message.cells_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. + * Encodes the specified UpdateCellsAliasRequest message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static - * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode + * @param {vtctldata.IUpdateCellsAliasRequest} message UpdateCellsAliasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowEvent.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCellsAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowEvent message from the specified reader or buffer. + * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.RowEvent} RowEvent + * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowEvent.decode = function decode(reader, length) { + UpdateCellsAliasRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellsAliasRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.table_name = reader.string(); + message.name = reader.string(); break; case 2: - if (!(message.row_changes && message.row_changes.length)) - message.row_changes = []; - message.row_changes.push($root.binlogdata.RowChange.decode(reader, reader.uint32())); - break; - case 3: - message.keyspace = reader.string(); - break; - case 4: - message.shard = reader.string(); + message.cells_alias = $root.topodata.CellsAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -125131,154 +126469,122 @@ $root.binlogdata = (function() { }; /** - * Decodes a RowEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellsAliasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.RowEvent} RowEvent + * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowEvent.decodeDelimited = function decodeDelimited(reader) { + UpdateCellsAliasRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowEvent message. + * Verifies an UpdateCellsAliasRequest message. * @function verify - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RowEvent.verify = function verify(message) { + UpdateCellsAliasRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.row_changes != null && message.hasOwnProperty("row_changes")) { - if (!Array.isArray(message.row_changes)) - return "row_changes: array expected"; - for (var i = 0; i < message.row_changes.length; ++i) { - var error = $root.binlogdata.RowChange.verify(message.row_changes[i]); - if (error) - return "row_changes." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) { + var error = $root.topodata.CellsAlias.verify(message.cells_alias); + if (error) + return "cells_alias." + error; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; return null; }; /** - * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellsAliasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.RowEvent} RowEvent - */ - RowEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.RowEvent) + * @returns {vtctldata.UpdateCellsAliasRequest} UpdateCellsAliasRequest + */ + UpdateCellsAliasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateCellsAliasRequest) return object; - var message = new $root.binlogdata.RowEvent(); - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.row_changes) { - if (!Array.isArray(object.row_changes)) - throw TypeError(".binlogdata.RowEvent.row_changes: array expected"); - message.row_changes = []; - for (var i = 0; i < object.row_changes.length; ++i) { - if (typeof object.row_changes[i] !== "object") - throw TypeError(".binlogdata.RowEvent.row_changes: object expected"); - message.row_changes[i] = $root.binlogdata.RowChange.fromObject(object.row_changes[i]); - } + var message = new $root.vtctldata.UpdateCellsAliasRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cells_alias != null) { + if (typeof object.cells_alias !== "object") + throw TypeError(".vtctldata.UpdateCellsAliasRequest.cells_alias: object expected"); + message.cells_alias = $root.topodata.CellsAlias.fromObject(object.cells_alias); } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); return message; }; /** - * Creates a plain object from a RowEvent message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCellsAliasRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @static - * @param {binlogdata.RowEvent} message RowEvent + * @param {vtctldata.UpdateCellsAliasRequest} message UpdateCellsAliasRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowEvent.toObject = function toObject(message, options) { + UpdateCellsAliasRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.row_changes = []; if (options.defaults) { - object.table_name = ""; - object.keyspace = ""; - object.shard = ""; - } - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.row_changes && message.row_changes.length) { - object.row_changes = []; - for (var j = 0; j < message.row_changes.length; ++j) - object.row_changes[j] = $root.binlogdata.RowChange.toObject(message.row_changes[j], options); + object.name = ""; + object.cells_alias = null; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) + object.cells_alias = $root.topodata.CellsAlias.toObject(message.cells_alias, options); return object; }; /** - * Converts this RowEvent to JSON. + * Converts this UpdateCellsAliasRequest to JSON. * @function toJSON - * @memberof binlogdata.RowEvent + * @memberof vtctldata.UpdateCellsAliasRequest * @instance * @returns {Object.} JSON object */ - RowEvent.prototype.toJSON = function toJSON() { + UpdateCellsAliasRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RowEvent; + return UpdateCellsAliasRequest; })(); - binlogdata.FieldEvent = (function() { + vtctldata.UpdateCellsAliasResponse = (function() { /** - * Properties of a FieldEvent. - * @memberof binlogdata - * @interface IFieldEvent - * @property {string|null} [table_name] FieldEvent table_name - * @property {Array.|null} [fields] FieldEvent fields - * @property {string|null} [keyspace] FieldEvent keyspace - * @property {string|null} [shard] FieldEvent shard + * Properties of an UpdateCellsAliasResponse. + * @memberof vtctldata + * @interface IUpdateCellsAliasResponse + * @property {string|null} [name] UpdateCellsAliasResponse name + * @property {topodata.ICellsAlias|null} [cells_alias] UpdateCellsAliasResponse cells_alias */ /** - * Constructs a new FieldEvent. - * @memberof binlogdata - * @classdesc Represents a FieldEvent. - * @implements IFieldEvent + * Constructs a new UpdateCellsAliasResponse. + * @memberof vtctldata + * @classdesc Represents an UpdateCellsAliasResponse. + * @implements IUpdateCellsAliasResponse * @constructor - * @param {binlogdata.IFieldEvent=} [properties] Properties to set + * @param {vtctldata.IUpdateCellsAliasResponse=} [properties] Properties to set */ - function FieldEvent(properties) { - this.fields = []; + function UpdateCellsAliasResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125286,117 +126592,88 @@ $root.binlogdata = (function() { } /** - * FieldEvent table_name. - * @member {string} table_name - * @memberof binlogdata.FieldEvent - * @instance - */ - FieldEvent.prototype.table_name = ""; - - /** - * FieldEvent fields. - * @member {Array.} fields - * @memberof binlogdata.FieldEvent - * @instance - */ - FieldEvent.prototype.fields = $util.emptyArray; - - /** - * FieldEvent keyspace. - * @member {string} keyspace - * @memberof binlogdata.FieldEvent + * UpdateCellsAliasResponse name. + * @member {string} name + * @memberof vtctldata.UpdateCellsAliasResponse * @instance */ - FieldEvent.prototype.keyspace = ""; + UpdateCellsAliasResponse.prototype.name = ""; /** - * FieldEvent shard. - * @member {string} shard - * @memberof binlogdata.FieldEvent + * UpdateCellsAliasResponse cells_alias. + * @member {topodata.ICellsAlias|null|undefined} cells_alias + * @memberof vtctldata.UpdateCellsAliasResponse * @instance */ - FieldEvent.prototype.shard = ""; + UpdateCellsAliasResponse.prototype.cells_alias = null; /** - * Creates a new FieldEvent instance using the specified properties. + * Creates a new UpdateCellsAliasResponse instance using the specified properties. * @function create - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static - * @param {binlogdata.IFieldEvent=} [properties] Properties to set - * @returns {binlogdata.FieldEvent} FieldEvent instance + * @param {vtctldata.IUpdateCellsAliasResponse=} [properties] Properties to set + * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse instance */ - FieldEvent.create = function create(properties) { - return new FieldEvent(properties); + UpdateCellsAliasResponse.create = function create(properties) { + return new UpdateCellsAliasResponse(properties); }; /** - * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. + * Encodes the specified UpdateCellsAliasResponse message. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static - * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode + * @param {vtctldata.IUpdateCellsAliasResponse} message UpdateCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldEvent.encode = function encode(message, writer) { + UpdateCellsAliasResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.shard); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cells_alias != null && Object.hasOwnProperty.call(message, "cells_alias")) + $root.topodata.CellsAlias.encode(message.cells_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. + * Encodes the specified UpdateCellsAliasResponse message, length delimited. Does not implicitly {@link vtctldata.UpdateCellsAliasResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static - * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode + * @param {vtctldata.IUpdateCellsAliasResponse} message UpdateCellsAliasResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldEvent.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCellsAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldEvent message from the specified reader or buffer. + * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.FieldEvent} FieldEvent + * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldEvent.decode = function decode(reader, length) { + UpdateCellsAliasResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.FieldEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.UpdateCellsAliasResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.table_name = reader.string(); + message.name = reader.string(); break; case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 3: - message.keyspace = reader.string(); - break; - case 4: - message.shard = reader.string(); + message.cells_alias = $root.topodata.CellsAlias.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -125407,154 +126684,121 @@ $root.binlogdata = (function() { }; /** - * Decodes a FieldEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateCellsAliasResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.FieldEvent} FieldEvent + * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldEvent.decodeDelimited = function decodeDelimited(reader) { + UpdateCellsAliasResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldEvent message. + * Verifies an UpdateCellsAliasResponse message. * @function verify - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldEvent.verify = function verify(message) { + UpdateCellsAliasResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) { + var error = $root.topodata.CellsAlias.verify(message.cells_alias); + if (error) + return "cells_alias." + error; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; return null; }; /** - * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCellsAliasResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.FieldEvent} FieldEvent + * @returns {vtctldata.UpdateCellsAliasResponse} UpdateCellsAliasResponse */ - FieldEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.FieldEvent) + UpdateCellsAliasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.UpdateCellsAliasResponse) return object; - var message = new $root.binlogdata.FieldEvent(); - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.FieldEvent.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.FieldEvent.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } + var message = new $root.vtctldata.UpdateCellsAliasResponse(); + if (object.name != null) + message.name = String(object.name); + if (object.cells_alias != null) { + if (typeof object.cells_alias !== "object") + throw TypeError(".vtctldata.UpdateCellsAliasResponse.cells_alias: object expected"); + message.cells_alias = $root.topodata.CellsAlias.fromObject(object.cells_alias); } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); return message; }; /** - * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCellsAliasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @static - * @param {binlogdata.FieldEvent} message FieldEvent + * @param {vtctldata.UpdateCellsAliasResponse} message UpdateCellsAliasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldEvent.toObject = function toObject(message, options) { + UpdateCellsAliasResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.fields = []; if (options.defaults) { - object.table_name = ""; - object.keyspace = ""; - object.shard = ""; - } - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); + object.name = ""; + object.cells_alias = null; } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cells_alias != null && message.hasOwnProperty("cells_alias")) + object.cells_alias = $root.topodata.CellsAlias.toObject(message.cells_alias, options); return object; }; /** - * Converts this FieldEvent to JSON. + * Converts this UpdateCellsAliasResponse to JSON. * @function toJSON - * @memberof binlogdata.FieldEvent + * @memberof vtctldata.UpdateCellsAliasResponse * @instance * @returns {Object.} JSON object */ - FieldEvent.prototype.toJSON = function toJSON() { + UpdateCellsAliasResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldEvent; + return UpdateCellsAliasResponse; })(); - binlogdata.ShardGtid = (function() { + vtctldata.ValidateRequest = (function() { /** - * Properties of a ShardGtid. - * @memberof binlogdata - * @interface IShardGtid - * @property {string|null} [keyspace] ShardGtid keyspace - * @property {string|null} [shard] ShardGtid shard - * @property {string|null} [gtid] ShardGtid gtid - * @property {Array.|null} [table_p_ks] ShardGtid table_p_ks + * Properties of a ValidateRequest. + * @memberof vtctldata + * @interface IValidateRequest + * @property {boolean|null} [ping_tablets] ValidateRequest ping_tablets */ /** - * Constructs a new ShardGtid. - * @memberof binlogdata - * @classdesc Represents a ShardGtid. - * @implements IShardGtid + * Constructs a new ValidateRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateRequest. + * @implements IValidateRequest * @constructor - * @param {binlogdata.IShardGtid=} [properties] Properties to set + * @param {vtctldata.IValidateRequest=} [properties] Properties to set */ - function ShardGtid(properties) { - this.table_p_ks = []; + function ValidateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125562,117 +126806,75 @@ $root.binlogdata = (function() { } /** - * ShardGtid keyspace. - * @member {string} keyspace - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.keyspace = ""; - - /** - * ShardGtid shard. - * @member {string} shard - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.shard = ""; - - /** - * ShardGtid gtid. - * @member {string} gtid - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.gtid = ""; - - /** - * ShardGtid table_p_ks. - * @member {Array.} table_p_ks - * @memberof binlogdata.ShardGtid + * ValidateRequest ping_tablets. + * @member {boolean} ping_tablets + * @memberof vtctldata.ValidateRequest * @instance */ - ShardGtid.prototype.table_p_ks = $util.emptyArray; + ValidateRequest.prototype.ping_tablets = false; /** - * Creates a new ShardGtid instance using the specified properties. + * Creates a new ValidateRequest instance using the specified properties. * @function create - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static - * @param {binlogdata.IShardGtid=} [properties] Properties to set - * @returns {binlogdata.ShardGtid} ShardGtid instance + * @param {vtctldata.IValidateRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateRequest} ValidateRequest instance */ - ShardGtid.create = function create(properties) { - return new ShardGtid(properties); + ValidateRequest.create = function create(properties) { + return new ValidateRequest(properties); }; /** - * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. + * Encodes the specified ValidateRequest message. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static - * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode + * @param {vtctldata.IValidateRequest} message ValidateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardGtid.encode = function encode(message, writer) { + ValidateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.table_p_ks != null && message.table_p_ks.length) - for (var i = 0; i < message.table_p_ks.length; ++i) - $root.binlogdata.TableLastPK.encode(message.table_p_ks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ping_tablets); return writer; }; /** - * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. + * Encodes the specified ValidateRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static - * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode + * @param {vtctldata.IValidateRequest} message ValidateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardGtid.encodeDelimited = function encodeDelimited(message, writer) { + ValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardGtid message from the specified reader or buffer. + * Decodes a ValidateRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.ShardGtid} ShardGtid + * @returns {vtctldata.ValidateRequest} ValidateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardGtid.decode = function decode(reader, length) { + ValidateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.ShardGtid(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - if (!(message.table_p_ks && message.table_p_ks.length)) - message.table_p_ks = []; - message.table_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); + message.ping_tablets = reader.bool(); break; default: reader.skipType(tag & 7); @@ -125683,151 +126885,110 @@ $root.binlogdata = (function() { }; /** - * Decodes a ShardGtid message from the specified reader or buffer, length delimited. + * Decodes a ValidateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.ShardGtid} ShardGtid + * @returns {vtctldata.ValidateRequest} ValidateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShardGtid.decodeDelimited = function decodeDelimited(reader) { + ValidateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardGtid message. + * Verifies a ValidateRequest message. * @function verify - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShardGtid.verify = function verify(message) { + ValidateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.table_p_ks != null && message.hasOwnProperty("table_p_ks")) { - if (!Array.isArray(message.table_p_ks)) - return "table_p_ks: array expected"; - for (var i = 0; i < message.table_p_ks.length; ++i) { - var error = $root.binlogdata.TableLastPK.verify(message.table_p_ks[i]); - if (error) - return "table_p_ks." + error; - } - } + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + if (typeof message.ping_tablets !== "boolean") + return "ping_tablets: boolean expected"; return null; }; /** - * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.ShardGtid} ShardGtid + * @returns {vtctldata.ValidateRequest} ValidateRequest */ - ShardGtid.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.ShardGtid) + ValidateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateRequest) return object; - var message = new $root.binlogdata.ShardGtid(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.table_p_ks) { - if (!Array.isArray(object.table_p_ks)) - throw TypeError(".binlogdata.ShardGtid.table_p_ks: array expected"); - message.table_p_ks = []; - for (var i = 0; i < object.table_p_ks.length; ++i) { - if (typeof object.table_p_ks[i] !== "object") - throw TypeError(".binlogdata.ShardGtid.table_p_ks: object expected"); - message.table_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_p_ks[i]); - } - } + var message = new $root.vtctldata.ValidateRequest(); + if (object.ping_tablets != null) + message.ping_tablets = Boolean(object.ping_tablets); return message; }; /** - * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. + * Creates a plain object from a ValidateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @static - * @param {binlogdata.ShardGtid} message ShardGtid + * @param {vtctldata.ValidateRequest} message ValidateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardGtid.toObject = function toObject(message, options) { + ValidateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.table_p_ks = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.gtid = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.table_p_ks && message.table_p_ks.length) { - object.table_p_ks = []; - for (var j = 0; j < message.table_p_ks.length; ++j) - object.table_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_p_ks[j], options); - } + if (options.defaults) + object.ping_tablets = false; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + object.ping_tablets = message.ping_tablets; return object; }; /** - * Converts this ShardGtid to JSON. + * Converts this ValidateRequest to JSON. * @function toJSON - * @memberof binlogdata.ShardGtid + * @memberof vtctldata.ValidateRequest * @instance * @returns {Object.} JSON object */ - ShardGtid.prototype.toJSON = function toJSON() { + ValidateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardGtid; + return ValidateRequest; })(); - binlogdata.VGtid = (function() { + vtctldata.ValidateResponse = (function() { /** - * Properties of a VGtid. - * @memberof binlogdata - * @interface IVGtid - * @property {Array.|null} [shard_gtids] VGtid shard_gtids + * Properties of a ValidateResponse. + * @memberof vtctldata + * @interface IValidateResponse + * @property {Array.|null} [results] ValidateResponse results + * @property {Object.|null} [results_by_keyspace] ValidateResponse results_by_keyspace */ /** - * Constructs a new VGtid. - * @memberof binlogdata - * @classdesc Represents a VGtid. - * @implements IVGtid + * Constructs a new ValidateResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateResponse. + * @implements IValidateResponse * @constructor - * @param {binlogdata.IVGtid=} [properties] Properties to set + * @param {vtctldata.IValidateResponse=} [properties] Properties to set */ - function VGtid(properties) { - this.shard_gtids = []; + function ValidateResponse(properties) { + this.results = []; + this.results_by_keyspace = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125835,78 +126996,113 @@ $root.binlogdata = (function() { } /** - * VGtid shard_gtids. - * @member {Array.} shard_gtids - * @memberof binlogdata.VGtid + * ValidateResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateResponse * @instance */ - VGtid.prototype.shard_gtids = $util.emptyArray; + ValidateResponse.prototype.results = $util.emptyArray; /** - * Creates a new VGtid instance using the specified properties. + * ValidateResponse results_by_keyspace. + * @member {Object.} results_by_keyspace + * @memberof vtctldata.ValidateResponse + * @instance + */ + ValidateResponse.prototype.results_by_keyspace = $util.emptyObject; + + /** + * Creates a new ValidateResponse instance using the specified properties. * @function create - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static - * @param {binlogdata.IVGtid=} [properties] Properties to set - * @returns {binlogdata.VGtid} VGtid instance + * @param {vtctldata.IValidateResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateResponse} ValidateResponse instance */ - VGtid.create = function create(properties) { - return new VGtid(properties); + ValidateResponse.create = function create(properties) { + return new ValidateResponse(properties); }; /** - * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. + * Encodes the specified ValidateResponse message. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static - * @param {binlogdata.IVGtid} message VGtid message or plain object to encode + * @param {vtctldata.IValidateResponse} message ValidateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VGtid.encode = function encode(message, writer) { + ValidateResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.shard_gtids != null && message.shard_gtids.length) - for (var i = 0; i < message.shard_gtids.length; ++i) - $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.results_by_keyspace != null && Object.hasOwnProperty.call(message, "results_by_keyspace")) + for (var keys = Object.keys(message.results_by_keyspace), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.ValidateKeyspaceResponse.encode(message.results_by_keyspace[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. + * Encodes the specified ValidateResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static - * @param {binlogdata.IVGtid} message VGtid message or plain object to encode + * @param {vtctldata.IValidateResponse} message ValidateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VGtid.encodeDelimited = function encodeDelimited(message, writer) { + ValidateResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VGtid message from the specified reader or buffer. + * Decodes a ValidateResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VGtid} VGtid + * @returns {vtctldata.ValidateResponse} ValidateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VGtid.decode = function decode(reader, length) { + ValidateResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VGtid(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.shard_gtids && message.shard_gtids.length)) - message.shard_gtids = []; - message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); + break; + case 2: + if (message.results_by_keyspace === $util.emptyObject) + message.results_by_keyspace = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.ValidateKeyspaceResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.results_by_keyspace[key] = value; break; default: reader.skipType(tag & 7); @@ -125917,125 +127113,148 @@ $root.binlogdata = (function() { }; /** - * Decodes a VGtid message from the specified reader or buffer, length delimited. + * Decodes a ValidateResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VGtid} VGtid + * @returns {vtctldata.ValidateResponse} ValidateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VGtid.decodeDelimited = function decodeDelimited(reader) { + ValidateResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VGtid message. + * Verifies a ValidateResponse message. * @function verify - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VGtid.verify = function verify(message) { + ValidateResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { - if (!Array.isArray(message.shard_gtids)) - return "shard_gtids: array expected"; - for (var i = 0; i < message.shard_gtids.length; ++i) { - var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; + } + if (message.results_by_keyspace != null && message.hasOwnProperty("results_by_keyspace")) { + if (!$util.isObject(message.results_by_keyspace)) + return "results_by_keyspace: object expected"; + var key = Object.keys(message.results_by_keyspace); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.ValidateKeyspaceResponse.verify(message.results_by_keyspace[key[i]]); if (error) - return "shard_gtids." + error; + return "results_by_keyspace." + error; } } return null; }; /** - * Creates a VGtid message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.VGtid} VGtid + * @returns {vtctldata.ValidateResponse} ValidateResponse */ - VGtid.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VGtid) + ValidateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateResponse) return object; - var message = new $root.binlogdata.VGtid(); - if (object.shard_gtids) { - if (!Array.isArray(object.shard_gtids)) - throw TypeError(".binlogdata.VGtid.shard_gtids: array expected"); - message.shard_gtids = []; - for (var i = 0; i < object.shard_gtids.length; ++i) { - if (typeof object.shard_gtids[i] !== "object") - throw TypeError(".binlogdata.VGtid.shard_gtids: object expected"); - message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); + var message = new $root.vtctldata.ValidateResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); + } + if (object.results_by_keyspace) { + if (typeof object.results_by_keyspace !== "object") + throw TypeError(".vtctldata.ValidateResponse.results_by_keyspace: object expected"); + message.results_by_keyspace = {}; + for (var keys = Object.keys(object.results_by_keyspace), i = 0; i < keys.length; ++i) { + if (typeof object.results_by_keyspace[keys[i]] !== "object") + throw TypeError(".vtctldata.ValidateResponse.results_by_keyspace: object expected"); + message.results_by_keyspace[keys[i]] = $root.vtctldata.ValidateKeyspaceResponse.fromObject(object.results_by_keyspace[keys[i]]); } } return message; }; /** - * Creates a plain object from a VGtid message. Also converts values to other types if specified. + * Creates a plain object from a ValidateResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @static - * @param {binlogdata.VGtid} message VGtid + * @param {vtctldata.ValidateResponse} message ValidateResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VGtid.toObject = function toObject(message, options) { + ValidateResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.shard_gtids = []; - if (message.shard_gtids && message.shard_gtids.length) { - object.shard_gtids = []; - for (var j = 0; j < message.shard_gtids.length; ++j) - object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); + object.results = []; + if (options.objects || options.defaults) + object.results_by_keyspace = {}; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; + } + var keys2; + if (message.results_by_keyspace && (keys2 = Object.keys(message.results_by_keyspace)).length) { + object.results_by_keyspace = {}; + for (var j = 0; j < keys2.length; ++j) + object.results_by_keyspace[keys2[j]] = $root.vtctldata.ValidateKeyspaceResponse.toObject(message.results_by_keyspace[keys2[j]], options); } return object; }; /** - * Converts this VGtid to JSON. + * Converts this ValidateResponse to JSON. * @function toJSON - * @memberof binlogdata.VGtid + * @memberof vtctldata.ValidateResponse * @instance * @returns {Object.} JSON object */ - VGtid.prototype.toJSON = function toJSON() { + ValidateResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VGtid; + return ValidateResponse; })(); - binlogdata.KeyspaceShard = (function() { + vtctldata.ValidateKeyspaceRequest = (function() { /** - * Properties of a KeyspaceShard. - * @memberof binlogdata - * @interface IKeyspaceShard - * @property {string|null} [keyspace] KeyspaceShard keyspace - * @property {string|null} [shard] KeyspaceShard shard + * Properties of a ValidateKeyspaceRequest. + * @memberof vtctldata + * @interface IValidateKeyspaceRequest + * @property {string|null} [keyspace] ValidateKeyspaceRequest keyspace + * @property {boolean|null} [ping_tablets] ValidateKeyspaceRequest ping_tablets */ /** - * Constructs a new KeyspaceShard. - * @memberof binlogdata - * @classdesc Represents a KeyspaceShard. - * @implements IKeyspaceShard + * Constructs a new ValidateKeyspaceRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateKeyspaceRequest. + * @implements IValidateKeyspaceRequest * @constructor - * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set + * @param {vtctldata.IValidateKeyspaceRequest=} [properties] Properties to set */ - function KeyspaceShard(properties) { + function ValidateKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126043,80 +127262,80 @@ $root.binlogdata = (function() { } /** - * KeyspaceShard keyspace. + * ValidateKeyspaceRequest keyspace. * @member {string} keyspace - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @instance */ - KeyspaceShard.prototype.keyspace = ""; + ValidateKeyspaceRequest.prototype.keyspace = ""; /** - * KeyspaceShard shard. - * @member {string} shard - * @memberof binlogdata.KeyspaceShard + * ValidateKeyspaceRequest ping_tablets. + * @member {boolean} ping_tablets + * @memberof vtctldata.ValidateKeyspaceRequest * @instance */ - KeyspaceShard.prototype.shard = ""; + ValidateKeyspaceRequest.prototype.ping_tablets = false; /** - * Creates a new KeyspaceShard instance using the specified properties. + * Creates a new ValidateKeyspaceRequest instance using the specified properties. * @function create - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static - * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set - * @returns {binlogdata.KeyspaceShard} KeyspaceShard instance + * @param {vtctldata.IValidateKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest instance */ - KeyspaceShard.create = function create(properties) { - return new KeyspaceShard(properties); + ValidateKeyspaceRequest.create = function create(properties) { + return new ValidateKeyspaceRequest(properties); }; /** - * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. + * Encodes the specified ValidateKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static - * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode + * @param {vtctldata.IValidateKeyspaceRequest} message ValidateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyspaceShard.encode = function encode(message, writer) { + ValidateKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ping_tablets); return writer; }; /** - * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. + * Encodes the specified ValidateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static - * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode + * @param {vtctldata.IValidateKeyspaceRequest} message ValidateKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyspaceShard.encodeDelimited = function encodeDelimited(message, writer) { + ValidateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KeyspaceShard message from the specified reader or buffer. + * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.KeyspaceShard} KeyspaceShard + * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyspaceShard.decode = function decode(reader, length) { + ValidateKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.KeyspaceShard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -126124,7 +127343,7 @@ $root.binlogdata = (function() { message.keyspace = reader.string(); break; case 2: - message.shard = reader.string(); + message.ping_tablets = reader.bool(); break; default: reader.skipType(tag & 7); @@ -126135,140 +127354,119 @@ $root.binlogdata = (function() { }; /** - * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. + * Decodes a ValidateKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.KeyspaceShard} KeyspaceShard + * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyspaceShard.decodeDelimited = function decodeDelimited(reader) { + ValidateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KeyspaceShard message. + * Verifies a ValidateKeyspaceRequest message. * @function verify - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyspaceShard.verify = function verify(message) { + ValidateKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.keyspace != null && message.hasOwnProperty("keyspace")) if (!$util.isString(message.keyspace)) return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + if (typeof message.ping_tablets !== "boolean") + return "ping_tablets: boolean expected"; return null; }; /** - * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.KeyspaceShard} KeyspaceShard + * @returns {vtctldata.ValidateKeyspaceRequest} ValidateKeyspaceRequest */ - KeyspaceShard.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.KeyspaceShard) + ValidateKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateKeyspaceRequest) return object; - var message = new $root.binlogdata.KeyspaceShard(); + var message = new $root.vtctldata.ValidateKeyspaceRequest(); if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); + if (object.ping_tablets != null) + message.ping_tablets = Boolean(object.ping_tablets); return message; }; /** - * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. + * Creates a plain object from a ValidateKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @static - * @param {binlogdata.KeyspaceShard} message KeyspaceShard + * @param {vtctldata.ValidateKeyspaceRequest} message ValidateKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyspaceShard.toObject = function toObject(message, options) { + ValidateKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.keyspace = ""; - object.shard = ""; + object.ping_tablets = false; } if (message.keyspace != null && message.hasOwnProperty("keyspace")) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + object.ping_tablets = message.ping_tablets; return object; }; /** - * Converts this KeyspaceShard to JSON. + * Converts this ValidateKeyspaceRequest to JSON. * @function toJSON - * @memberof binlogdata.KeyspaceShard + * @memberof vtctldata.ValidateKeyspaceRequest * @instance * @returns {Object.} JSON object */ - KeyspaceShard.prototype.toJSON = function toJSON() { + ValidateKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return KeyspaceShard; - })(); - - /** - * MigrationType enum. - * @name binlogdata.MigrationType - * @enum {number} - * @property {number} TABLES=0 TABLES value - * @property {number} SHARDS=1 SHARDS value - */ - binlogdata.MigrationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLES"] = 0; - values[valuesById[1] = "SHARDS"] = 1; - return values; + return ValidateKeyspaceRequest; })(); - binlogdata.Journal = (function() { + vtctldata.ValidateKeyspaceResponse = (function() { /** - * Properties of a Journal. - * @memberof binlogdata - * @interface IJournal - * @property {number|Long|null} [id] Journal id - * @property {binlogdata.MigrationType|null} [migration_type] Journal migration_type - * @property {Array.|null} [tables] Journal tables - * @property {string|null} [local_position] Journal local_position - * @property {Array.|null} [shard_gtids] Journal shard_gtids - * @property {Array.|null} [participants] Journal participants - * @property {Array.|null} [source_workflows] Journal source_workflows + * Properties of a ValidateKeyspaceResponse. + * @memberof vtctldata + * @interface IValidateKeyspaceResponse + * @property {Array.|null} [results] ValidateKeyspaceResponse results + * @property {Object.|null} [results_by_shard] ValidateKeyspaceResponse results_by_shard */ /** - * Constructs a new Journal. - * @memberof binlogdata - * @classdesc Represents a Journal. - * @implements IJournal + * Constructs a new ValidateKeyspaceResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateKeyspaceResponse. + * @implements IValidateKeyspaceResponse * @constructor - * @param {binlogdata.IJournal=} [properties] Properties to set + * @param {vtctldata.IValidateKeyspaceResponse=} [properties] Properties to set */ - function Journal(properties) { - this.tables = []; - this.shard_gtids = []; - this.participants = []; - this.source_workflows = []; + function ValidateKeyspaceResponse(properties) { + this.results = []; + this.results_by_shard = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126276,165 +127474,113 @@ $root.binlogdata = (function() { } /** - * Journal id. - * @member {number|Long} id - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Journal migration_type. - * @member {binlogdata.MigrationType} migration_type - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.migration_type = 0; - - /** - * Journal tables. - * @member {Array.} tables - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.tables = $util.emptyArray; - - /** - * Journal local_position. - * @member {string} local_position - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.local_position = ""; - - /** - * Journal shard_gtids. - * @member {Array.} shard_gtids - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.shard_gtids = $util.emptyArray; - - /** - * Journal participants. - * @member {Array.} participants - * @memberof binlogdata.Journal + * ValidateKeyspaceResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateKeyspaceResponse * @instance */ - Journal.prototype.participants = $util.emptyArray; + ValidateKeyspaceResponse.prototype.results = $util.emptyArray; /** - * Journal source_workflows. - * @member {Array.} source_workflows - * @memberof binlogdata.Journal + * ValidateKeyspaceResponse results_by_shard. + * @member {Object.} results_by_shard + * @memberof vtctldata.ValidateKeyspaceResponse * @instance */ - Journal.prototype.source_workflows = $util.emptyArray; + ValidateKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; /** - * Creates a new Journal instance using the specified properties. + * Creates a new ValidateKeyspaceResponse instance using the specified properties. * @function create - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static - * @param {binlogdata.IJournal=} [properties] Properties to set - * @returns {binlogdata.Journal} Journal instance + * @param {vtctldata.IValidateKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse instance */ - Journal.create = function create(properties) { - return new Journal(properties); + ValidateKeyspaceResponse.create = function create(properties) { + return new ValidateKeyspaceResponse(properties); }; /** - * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. + * Encodes the specified ValidateKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static - * @param {binlogdata.IJournal} message Journal message or plain object to encode + * @param {vtctldata.IValidateKeyspaceResponse} message ValidateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Journal.encode = function encode(message, writer) { + ValidateKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.migration_type != null && Object.hasOwnProperty.call(message, "migration_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.migration_type); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tables[i]); - if (message.local_position != null && Object.hasOwnProperty.call(message, "local_position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.local_position); - if (message.shard_gtids != null && message.shard_gtids.length) - for (var i = 0; i < message.shard_gtids.length; ++i) - $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.binlogdata.KeyspaceShard.encode(message.participants[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.source_workflows != null && message.source_workflows.length) - for (var i = 0; i < message.source_workflows.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.source_workflows[i]); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) + for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. + * Encodes the specified ValidateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static - * @param {binlogdata.IJournal} message Journal message or plain object to encode + * @param {vtctldata.IValidateKeyspaceResponse} message ValidateKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Journal.encodeDelimited = function encodeDelimited(message, writer) { + ValidateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Journal message from the specified reader or buffer. + * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Journal} Journal + * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Journal.decode = function decode(reader, length) { + ValidateKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Journal(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateKeyspaceResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.int64(); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); break; case 2: - message.migration_type = reader.int32(); - break; - case 3: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 4: - message.local_position = reader.string(); - break; - case 5: - if (!(message.shard_gtids && message.shard_gtids.length)) - message.shard_gtids = []; - message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.binlogdata.KeyspaceShard.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.source_workflows && message.source_workflows.length)) - message.source_workflows = []; - message.source_workflows.push(reader.string()); + if (message.results_by_shard === $util.emptyObject) + message.results_by_shard = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.results_by_shard[key] = value; break; default: reader.skipType(tag & 7); @@ -126445,256 +127591,152 @@ $root.binlogdata = (function() { }; /** - * Decodes a Journal message from the specified reader or buffer, length delimited. + * Decodes a ValidateKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Journal} Journal + * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Journal.decodeDelimited = function decodeDelimited(reader) { + ValidateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Journal message. + * Verifies a ValidateKeyspaceResponse message. * @function verify - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Journal.verify = function verify(message) { + ValidateKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.migration_type != null && message.hasOwnProperty("migration_type")) - switch (message.migration_type) { - default: - return "migration_type: enum value expected"; - case 0: - case 1: - break; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.local_position != null && message.hasOwnProperty("local_position")) - if (!$util.isString(message.local_position)) - return "local_position: string expected"; - if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { - if (!Array.isArray(message.shard_gtids)) - return "shard_gtids: array expected"; - for (var i = 0; i < message.shard_gtids.length; ++i) { - var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); - if (error) - return "shard_gtids." + error; - } + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; } - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.binlogdata.KeyspaceShard.verify(message.participants[i]); + if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { + if (!$util.isObject(message.results_by_shard)) + return "results_by_shard: object expected"; + var key = Object.keys(message.results_by_shard); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); if (error) - return "participants." + error; + return "results_by_shard." + error; } } - if (message.source_workflows != null && message.hasOwnProperty("source_workflows")) { - if (!Array.isArray(message.source_workflows)) - return "source_workflows: array expected"; - for (var i = 0; i < message.source_workflows.length; ++i) - if (!$util.isString(message.source_workflows[i])) - return "source_workflows: string[] expected"; - } return null; }; /** - * Creates a Journal message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.Journal} Journal + * @returns {vtctldata.ValidateKeyspaceResponse} ValidateKeyspaceResponse */ - Journal.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Journal) + ValidateKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateKeyspaceResponse) return object; - var message = new $root.binlogdata.Journal(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - switch (object.migration_type) { - case "TABLES": - case 0: - message.migration_type = 0; - break; - case "SHARDS": - case 1: - message.migration_type = 1; - break; - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.Journal.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.local_position != null) - message.local_position = String(object.local_position); - if (object.shard_gtids) { - if (!Array.isArray(object.shard_gtids)) - throw TypeError(".binlogdata.Journal.shard_gtids: array expected"); - message.shard_gtids = []; - for (var i = 0; i < object.shard_gtids.length; ++i) { - if (typeof object.shard_gtids[i] !== "object") - throw TypeError(".binlogdata.Journal.shard_gtids: object expected"); - message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); - } + var message = new $root.vtctldata.ValidateKeyspaceResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateKeyspaceResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); } - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".binlogdata.Journal.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".binlogdata.Journal.participants: object expected"); - message.participants[i] = $root.binlogdata.KeyspaceShard.fromObject(object.participants[i]); + if (object.results_by_shard) { + if (typeof object.results_by_shard !== "object") + throw TypeError(".vtctldata.ValidateKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard = {}; + for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { + if (typeof object.results_by_shard[keys[i]] !== "object") + throw TypeError(".vtctldata.ValidateKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); } } - if (object.source_workflows) { - if (!Array.isArray(object.source_workflows)) - throw TypeError(".binlogdata.Journal.source_workflows: array expected"); - message.source_workflows = []; - for (var i = 0; i < object.source_workflows.length; ++i) - message.source_workflows[i] = String(object.source_workflows[i]); - } return message; }; /** - * Creates a plain object from a Journal message. Also converts values to other types if specified. + * Creates a plain object from a ValidateKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @static - * @param {binlogdata.Journal} message Journal + * @param {vtctldata.ValidateKeyspaceResponse} message ValidateKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Journal.toObject = function toObject(message, options) { + ValidateKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.shard_gtids = []; - object.participants = []; - object.source_workflows = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.migration_type = options.enums === String ? "TABLES" : 0; - object.local_position = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.migration_type != null && message.hasOwnProperty("migration_type")) - object.migration_type = options.enums === String ? $root.binlogdata.MigrationType[message.migration_type] : message.migration_type; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.local_position != null && message.hasOwnProperty("local_position")) - object.local_position = message.local_position; - if (message.shard_gtids && message.shard_gtids.length) { - object.shard_gtids = []; - for (var j = 0; j < message.shard_gtids.length; ++j) - object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); - } - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.binlogdata.KeyspaceShard.toObject(message.participants[j], options); + if (options.arrays || options.defaults) + object.results = []; + if (options.objects || options.defaults) + object.results_by_shard = {}; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; } - if (message.source_workflows && message.source_workflows.length) { - object.source_workflows = []; - for (var j = 0; j < message.source_workflows.length; ++j) - object.source_workflows[j] = message.source_workflows[j]; + var keys2; + if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { + object.results_by_shard = {}; + for (var j = 0; j < keys2.length; ++j) + object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); } return object; }; /** - * Converts this Journal to JSON. + * Converts this ValidateKeyspaceResponse to JSON. * @function toJSON - * @memberof binlogdata.Journal + * @memberof vtctldata.ValidateKeyspaceResponse * @instance * @returns {Object.} JSON object */ - Journal.prototype.toJSON = function toJSON() { + ValidateKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Journal; + return ValidateKeyspaceResponse; })(); - binlogdata.VEvent = (function() { + vtctldata.ValidateSchemaKeyspaceRequest = (function() { /** - * Properties of a VEvent. - * @memberof binlogdata - * @interface IVEvent - * @property {binlogdata.VEventType|null} [type] VEvent type - * @property {number|Long|null} [timestamp] VEvent timestamp - * @property {string|null} [gtid] VEvent gtid - * @property {string|null} [statement] VEvent statement - * @property {binlogdata.IRowEvent|null} [row_event] VEvent row_event - * @property {binlogdata.IFieldEvent|null} [field_event] VEvent field_event - * @property {binlogdata.IVGtid|null} [vgtid] VEvent vgtid - * @property {binlogdata.IJournal|null} [journal] VEvent journal - * @property {string|null} [dml] VEvent dml - * @property {number|Long|null} [current_time] VEvent current_time - * @property {binlogdata.ILastPKEvent|null} [last_p_k_event] VEvent last_p_k_event - * @property {string|null} [keyspace] VEvent keyspace - * @property {string|null} [shard] VEvent shard - * @property {boolean|null} [throttled] VEvent throttled + * Properties of a ValidateSchemaKeyspaceRequest. + * @memberof vtctldata + * @interface IValidateSchemaKeyspaceRequest + * @property {string|null} [keyspace] ValidateSchemaKeyspaceRequest keyspace + * @property {Array.|null} [exclude_tables] ValidateSchemaKeyspaceRequest exclude_tables + * @property {boolean|null} [include_views] ValidateSchemaKeyspaceRequest include_views + * @property {boolean|null} [skip_no_primary] ValidateSchemaKeyspaceRequest skip_no_primary + * @property {boolean|null} [include_vschema] ValidateSchemaKeyspaceRequest include_vschema */ /** - * Constructs a new VEvent. - * @memberof binlogdata - * @classdesc Represents a VEvent. - * @implements IVEvent + * Constructs a new ValidateSchemaKeyspaceRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateSchemaKeyspaceRequest. + * @implements IValidateSchemaKeyspaceRequest * @constructor - * @param {binlogdata.IVEvent=} [properties] Properties to set + * @param {vtctldata.IValidateSchemaKeyspaceRequest=} [properties] Properties to set */ - function VEvent(properties) { + function ValidateSchemaKeyspaceRequest(properties) { + this.exclude_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126702,244 +127744,404 @@ $root.binlogdata = (function() { } /** - * VEvent type. - * @member {binlogdata.VEventType} type - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance */ - VEvent.prototype.type = 0; + ValidateSchemaKeyspaceRequest.prototype.keyspace = ""; /** - * VEvent timestamp. - * @member {number|Long} timestamp - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceRequest exclude_tables. + * @member {Array.} exclude_tables + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance */ - VEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ValidateSchemaKeyspaceRequest.prototype.exclude_tables = $util.emptyArray; /** - * VEvent gtid. - * @member {string} gtid - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceRequest include_views. + * @member {boolean} include_views + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance */ - VEvent.prototype.gtid = ""; + ValidateSchemaKeyspaceRequest.prototype.include_views = false; /** - * VEvent statement. - * @member {string} statement - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceRequest skip_no_primary. + * @member {boolean} skip_no_primary + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance */ - VEvent.prototype.statement = ""; + ValidateSchemaKeyspaceRequest.prototype.skip_no_primary = false; /** - * VEvent row_event. - * @member {binlogdata.IRowEvent|null|undefined} row_event - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceRequest include_vschema. + * @member {boolean} include_vschema + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance */ - VEvent.prototype.row_event = null; + ValidateSchemaKeyspaceRequest.prototype.include_vschema = false; + + /** + * Creates a new ValidateSchemaKeyspaceRequest instance using the specified properties. + * @function create + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {vtctldata.IValidateSchemaKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest instance + */ + ValidateSchemaKeyspaceRequest.create = function create(properties) { + return new ValidateSchemaKeyspaceRequest(properties); + }; + + /** + * Encodes the specified ValidateSchemaKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * @function encode + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {vtctldata.IValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateSchemaKeyspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.exclude_tables != null && message.exclude_tables.length) + for (var i = 0; i < message.exclude_tables.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exclude_tables[i]); + if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.include_views); + if (message.skip_no_primary != null && Object.hasOwnProperty.call(message, "skip_no_primary")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skip_no_primary); + if (message.include_vschema != null && Object.hasOwnProperty.call(message, "include_vschema")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.include_vschema); + return writer; + }; + + /** + * Encodes the specified ValidateSchemaKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {vtctldata.IValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateSchemaKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateSchemaKeyspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateSchemaKeyspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyspace = reader.string(); + break; + case 2: + if (!(message.exclude_tables && message.exclude_tables.length)) + message.exclude_tables = []; + message.exclude_tables.push(reader.string()); + break; + case 3: + message.include_views = reader.bool(); + break; + case 4: + message.skip_no_primary = reader.bool(); + break; + case 5: + message.include_vschema = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateSchemaKeyspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateSchemaKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateSchemaKeyspaceRequest message. + * @function verify + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateSchemaKeyspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { + if (!Array.isArray(message.exclude_tables)) + return "exclude_tables: array expected"; + for (var i = 0; i < message.exclude_tables.length; ++i) + if (!$util.isString(message.exclude_tables[i])) + return "exclude_tables: string[] expected"; + } + if (message.include_views != null && message.hasOwnProperty("include_views")) + if (typeof message.include_views !== "boolean") + return "include_views: boolean expected"; + if (message.skip_no_primary != null && message.hasOwnProperty("skip_no_primary")) + if (typeof message.skip_no_primary !== "boolean") + return "skip_no_primary: boolean expected"; + if (message.include_vschema != null && message.hasOwnProperty("include_vschema")) + if (typeof message.include_vschema !== "boolean") + return "include_vschema: boolean expected"; + return null; + }; /** - * VEvent field_event. - * @member {binlogdata.IFieldEvent|null|undefined} field_event - * @memberof binlogdata.VEvent - * @instance + * Creates a ValidateSchemaKeyspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.ValidateSchemaKeyspaceRequest} ValidateSchemaKeyspaceRequest */ - VEvent.prototype.field_event = null; + ValidateSchemaKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateSchemaKeyspaceRequest) + return object; + var message = new $root.vtctldata.ValidateSchemaKeyspaceRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.exclude_tables) { + if (!Array.isArray(object.exclude_tables)) + throw TypeError(".vtctldata.ValidateSchemaKeyspaceRequest.exclude_tables: array expected"); + message.exclude_tables = []; + for (var i = 0; i < object.exclude_tables.length; ++i) + message.exclude_tables[i] = String(object.exclude_tables[i]); + } + if (object.include_views != null) + message.include_views = Boolean(object.include_views); + if (object.skip_no_primary != null) + message.skip_no_primary = Boolean(object.skip_no_primary); + if (object.include_vschema != null) + message.include_vschema = Boolean(object.include_vschema); + return message; + }; /** - * VEvent vgtid. - * @member {binlogdata.IVGtid|null|undefined} vgtid - * @memberof binlogdata.VEvent - * @instance + * Creates a plain object from a ValidateSchemaKeyspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.ValidateSchemaKeyspaceRequest + * @static + * @param {vtctldata.ValidateSchemaKeyspaceRequest} message ValidateSchemaKeyspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - VEvent.prototype.vgtid = null; + ValidateSchemaKeyspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exclude_tables = []; + if (options.defaults) { + object.keyspace = ""; + object.include_views = false; + object.skip_no_primary = false; + object.include_vschema = false; + } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.exclude_tables && message.exclude_tables.length) { + object.exclude_tables = []; + for (var j = 0; j < message.exclude_tables.length; ++j) + object.exclude_tables[j] = message.exclude_tables[j]; + } + if (message.include_views != null && message.hasOwnProperty("include_views")) + object.include_views = message.include_views; + if (message.skip_no_primary != null && message.hasOwnProperty("skip_no_primary")) + object.skip_no_primary = message.skip_no_primary; + if (message.include_vschema != null && message.hasOwnProperty("include_vschema")) + object.include_vschema = message.include_vschema; + return object; + }; /** - * VEvent journal. - * @member {binlogdata.IJournal|null|undefined} journal - * @memberof binlogdata.VEvent + * Converts this ValidateSchemaKeyspaceRequest to JSON. + * @function toJSON + * @memberof vtctldata.ValidateSchemaKeyspaceRequest * @instance + * @returns {Object.} JSON object */ - VEvent.prototype.journal = null; + ValidateSchemaKeyspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * VEvent dml. - * @member {string} dml - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.dml = ""; + return ValidateSchemaKeyspaceRequest; + })(); - /** - * VEvent current_time. - * @member {number|Long} current_time - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.current_time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + vtctldata.ValidateSchemaKeyspaceResponse = (function() { /** - * VEvent last_p_k_event. - * @member {binlogdata.ILastPKEvent|null|undefined} last_p_k_event - * @memberof binlogdata.VEvent - * @instance + * Properties of a ValidateSchemaKeyspaceResponse. + * @memberof vtctldata + * @interface IValidateSchemaKeyspaceResponse + * @property {Array.|null} [results] ValidateSchemaKeyspaceResponse results + * @property {Object.|null} [results_by_shard] ValidateSchemaKeyspaceResponse results_by_shard */ - VEvent.prototype.last_p_k_event = null; /** - * VEvent keyspace. - * @member {string} keyspace - * @memberof binlogdata.VEvent - * @instance + * Constructs a new ValidateSchemaKeyspaceResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateSchemaKeyspaceResponse. + * @implements IValidateSchemaKeyspaceResponse + * @constructor + * @param {vtctldata.IValidateSchemaKeyspaceResponse=} [properties] Properties to set */ - VEvent.prototype.keyspace = ""; + function ValidateSchemaKeyspaceResponse(properties) { + this.results = []; + this.results_by_shard = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * VEvent shard. - * @member {string} shard - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @instance */ - VEvent.prototype.shard = ""; + ValidateSchemaKeyspaceResponse.prototype.results = $util.emptyArray; /** - * VEvent throttled. - * @member {boolean} throttled - * @memberof binlogdata.VEvent + * ValidateSchemaKeyspaceResponse results_by_shard. + * @member {Object.} results_by_shard + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @instance */ - VEvent.prototype.throttled = false; + ValidateSchemaKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; /** - * Creates a new VEvent instance using the specified properties. + * Creates a new ValidateSchemaKeyspaceResponse instance using the specified properties. * @function create - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static - * @param {binlogdata.IVEvent=} [properties] Properties to set - * @returns {binlogdata.VEvent} VEvent instance + * @param {vtctldata.IValidateSchemaKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse instance */ - VEvent.create = function create(properties) { - return new VEvent(properties); + ValidateSchemaKeyspaceResponse.create = function create(properties) { + return new ValidateSchemaKeyspaceResponse(properties); }; /** - * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. + * Encodes the specified ValidateSchemaKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static - * @param {binlogdata.IVEvent} message VEvent message or plain object to encode + * @param {vtctldata.IValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VEvent.encode = function encode(message, writer) { + ValidateSchemaKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.statement != null && Object.hasOwnProperty.call(message, "statement")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.statement); - if (message.row_event != null && Object.hasOwnProperty.call(message, "row_event")) - $root.binlogdata.RowEvent.encode(message.row_event, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.field_event != null && Object.hasOwnProperty.call(message, "field_event")) - $root.binlogdata.FieldEvent.encode(message.field_event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.vgtid != null && Object.hasOwnProperty.call(message, "vgtid")) - $root.binlogdata.VGtid.encode(message.vgtid, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.journal != null && Object.hasOwnProperty.call(message, "journal")) - $root.binlogdata.Journal.encode(message.journal, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dml != null && Object.hasOwnProperty.call(message, "dml")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dml); - if (message.current_time != null && Object.hasOwnProperty.call(message, "current_time")) - writer.uint32(/* id 20, wireType 0 =*/160).int64(message.current_time); - if (message.last_p_k_event != null && Object.hasOwnProperty.call(message, "last_p_k_event")) - $root.binlogdata.LastPKEvent.encode(message.last_p_k_event, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.shard); - if (message.throttled != null && Object.hasOwnProperty.call(message, "throttled")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.throttled); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) + for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. + * Encodes the specified ValidateSchemaKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateSchemaKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static - * @param {binlogdata.IVEvent} message VEvent message or plain object to encode + * @param {vtctldata.IValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VEvent.encodeDelimited = function encodeDelimited(message, writer) { + ValidateSchemaKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VEvent message from the specified reader or buffer. + * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VEvent} VEvent + * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VEvent.decode = function decode(reader, length) { + ValidateSchemaKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateSchemaKeyspaceResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); break; case 2: - message.timestamp = reader.int64(); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - message.statement = reader.string(); - break; - case 5: - message.row_event = $root.binlogdata.RowEvent.decode(reader, reader.uint32()); - break; - case 6: - message.field_event = $root.binlogdata.FieldEvent.decode(reader, reader.uint32()); - break; - case 7: - message.vgtid = $root.binlogdata.VGtid.decode(reader, reader.uint32()); - break; - case 8: - message.journal = $root.binlogdata.Journal.decode(reader, reader.uint32()); - break; - case 9: - message.dml = reader.string(); - break; - case 20: - message.current_time = reader.int64(); - break; - case 21: - message.last_p_k_event = $root.binlogdata.LastPKEvent.decode(reader, reader.uint32()); - break; - case 22: - message.keyspace = reader.string(); - break; - case 23: - message.shard = reader.string(); - break; - case 24: - message.throttled = reader.bool(); + if (message.results_by_shard === $util.emptyObject) + message.results_by_shard = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.results_by_shard[key] = value; break; default: reader.skipType(tag & 7); @@ -126950,377 +128152,149 @@ $root.binlogdata = (function() { }; /** - * Decodes a VEvent message from the specified reader or buffer, length delimited. + * Decodes a ValidateSchemaKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VEvent} VEvent + * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VEvent.decodeDelimited = function decodeDelimited(reader) { + ValidateSchemaKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VEvent message. + * Verifies a ValidateSchemaKeyspaceResponse message. * @function verify - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VEvent.verify = function verify(message) { + ValidateSchemaKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - break; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.statement != null && message.hasOwnProperty("statement")) - if (!$util.isString(message.statement)) - return "statement: string expected"; - if (message.row_event != null && message.hasOwnProperty("row_event")) { - var error = $root.binlogdata.RowEvent.verify(message.row_event); - if (error) - return "row_event." + error; - } - if (message.field_event != null && message.hasOwnProperty("field_event")) { - var error = $root.binlogdata.FieldEvent.verify(message.field_event); - if (error) - return "field_event." + error; - } - if (message.vgtid != null && message.hasOwnProperty("vgtid")) { - var error = $root.binlogdata.VGtid.verify(message.vgtid); - if (error) - return "vgtid." + error; - } - if (message.journal != null && message.hasOwnProperty("journal")) { - var error = $root.binlogdata.Journal.verify(message.journal); - if (error) - return "journal." + error; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; } - if (message.dml != null && message.hasOwnProperty("dml")) - if (!$util.isString(message.dml)) - return "dml: string expected"; - if (message.current_time != null && message.hasOwnProperty("current_time")) - if (!$util.isInteger(message.current_time) && !(message.current_time && $util.isInteger(message.current_time.low) && $util.isInteger(message.current_time.high))) - return "current_time: integer|Long expected"; - if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) { - var error = $root.binlogdata.LastPKEvent.verify(message.last_p_k_event); - if (error) - return "last_p_k_event." + error; + if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { + if (!$util.isObject(message.results_by_shard)) + return "results_by_shard: object expected"; + var key = Object.keys(message.results_by_shard); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); + if (error) + return "results_by_shard." + error; + } } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.throttled != null && message.hasOwnProperty("throttled")) - if (typeof message.throttled !== "boolean") - return "throttled: boolean expected"; return null; }; /** - * Creates a VEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateSchemaKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.VEvent} VEvent + * @returns {vtctldata.ValidateSchemaKeyspaceResponse} ValidateSchemaKeyspaceResponse */ - VEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VEvent) - return object; - var message = new $root.binlogdata.VEvent(); - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "GTID": - case 1: - message.type = 1; - break; - case "BEGIN": - case 2: - message.type = 2; - break; - case "COMMIT": - case 3: - message.type = 3; - break; - case "ROLLBACK": - case 4: - message.type = 4; - break; - case "DDL": - case 5: - message.type = 5; - break; - case "INSERT": - case 6: - message.type = 6; - break; - case "REPLACE": - case 7: - message.type = 7; - break; - case "UPDATE": - case 8: - message.type = 8; - break; - case "DELETE": - case 9: - message.type = 9; - break; - case "SET": - case 10: - message.type = 10; - break; - case "OTHER": - case 11: - message.type = 11; - break; - case "ROW": - case 12: - message.type = 12; - break; - case "FIELD": - case 13: - message.type = 13; - break; - case "HEARTBEAT": - case 14: - message.type = 14; - break; - case "VGTID": - case 15: - message.type = 15; - break; - case "JOURNAL": - case 16: - message.type = 16; - break; - case "VERSION": - case 17: - message.type = 17; - break; - case "LASTPK": - case 18: - message.type = 18; - break; - case "SAVEPOINT": - case 19: - message.type = 19; - break; - case "COPY_COMPLETED": - case 20: - message.type = 20; - break; - } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.statement != null) - message.statement = String(object.statement); - if (object.row_event != null) { - if (typeof object.row_event !== "object") - throw TypeError(".binlogdata.VEvent.row_event: object expected"); - message.row_event = $root.binlogdata.RowEvent.fromObject(object.row_event); - } - if (object.field_event != null) { - if (typeof object.field_event !== "object") - throw TypeError(".binlogdata.VEvent.field_event: object expected"); - message.field_event = $root.binlogdata.FieldEvent.fromObject(object.field_event); - } - if (object.vgtid != null) { - if (typeof object.vgtid !== "object") - throw TypeError(".binlogdata.VEvent.vgtid: object expected"); - message.vgtid = $root.binlogdata.VGtid.fromObject(object.vgtid); - } - if (object.journal != null) { - if (typeof object.journal !== "object") - throw TypeError(".binlogdata.VEvent.journal: object expected"); - message.journal = $root.binlogdata.Journal.fromObject(object.journal); + ValidateSchemaKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateSchemaKeyspaceResponse) + return object; + var message = new $root.vtctldata.ValidateSchemaKeyspaceResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); } - if (object.dml != null) - message.dml = String(object.dml); - if (object.current_time != null) - if ($util.Long) - (message.current_time = $util.Long.fromValue(object.current_time)).unsigned = false; - else if (typeof object.current_time === "string") - message.current_time = parseInt(object.current_time, 10); - else if (typeof object.current_time === "number") - message.current_time = object.current_time; - else if (typeof object.current_time === "object") - message.current_time = new $util.LongBits(object.current_time.low >>> 0, object.current_time.high >>> 0).toNumber(); - if (object.last_p_k_event != null) { - if (typeof object.last_p_k_event !== "object") - throw TypeError(".binlogdata.VEvent.last_p_k_event: object expected"); - message.last_p_k_event = $root.binlogdata.LastPKEvent.fromObject(object.last_p_k_event); + if (object.results_by_shard) { + if (typeof object.results_by_shard !== "object") + throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard = {}; + for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { + if (typeof object.results_by_shard[keys[i]] !== "object") + throw TypeError(".vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); + } } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.throttled != null) - message.throttled = Boolean(object.throttled); return message; }; /** - * Creates a plain object from a VEvent message. Also converts values to other types if specified. + * Creates a plain object from a ValidateSchemaKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @static - * @param {binlogdata.VEvent} message VEvent + * @param {vtctldata.ValidateSchemaKeyspaceResponse} message ValidateSchemaKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VEvent.toObject = function toObject(message, options) { + ValidateSchemaKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.gtid = ""; - object.statement = ""; - object.row_event = null; - object.field_event = null; - object.vgtid = null; - object.journal = null; - object.dml = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.current_time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.current_time = options.longs === String ? "0" : 0; - object.last_p_k_event = null; - object.keyspace = ""; - object.shard = ""; - object.throttled = false; + if (options.arrays || options.defaults) + object.results = []; + if (options.objects || options.defaults) + object.results_by_shard = {}; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; + } + var keys2; + if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { + object.results_by_shard = {}; + for (var j = 0; j < keys2.length; ++j) + object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.binlogdata.VEventType[message.type] : message.type; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.statement != null && message.hasOwnProperty("statement")) - object.statement = message.statement; - if (message.row_event != null && message.hasOwnProperty("row_event")) - object.row_event = $root.binlogdata.RowEvent.toObject(message.row_event, options); - if (message.field_event != null && message.hasOwnProperty("field_event")) - object.field_event = $root.binlogdata.FieldEvent.toObject(message.field_event, options); - if (message.vgtid != null && message.hasOwnProperty("vgtid")) - object.vgtid = $root.binlogdata.VGtid.toObject(message.vgtid, options); - if (message.journal != null && message.hasOwnProperty("journal")) - object.journal = $root.binlogdata.Journal.toObject(message.journal, options); - if (message.dml != null && message.hasOwnProperty("dml")) - object.dml = message.dml; - if (message.current_time != null && message.hasOwnProperty("current_time")) - if (typeof message.current_time === "number") - object.current_time = options.longs === String ? String(message.current_time) : message.current_time; - else - object.current_time = options.longs === String ? $util.Long.prototype.toString.call(message.current_time) : options.longs === Number ? new $util.LongBits(message.current_time.low >>> 0, message.current_time.high >>> 0).toNumber() : message.current_time; - if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) - object.last_p_k_event = $root.binlogdata.LastPKEvent.toObject(message.last_p_k_event, options); - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.throttled != null && message.hasOwnProperty("throttled")) - object.throttled = message.throttled; return object; }; /** - * Converts this VEvent to JSON. + * Converts this ValidateSchemaKeyspaceResponse to JSON. * @function toJSON - * @memberof binlogdata.VEvent + * @memberof vtctldata.ValidateSchemaKeyspaceResponse * @instance * @returns {Object.} JSON object */ - VEvent.prototype.toJSON = function toJSON() { + ValidateSchemaKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VEvent; + return ValidateSchemaKeyspaceResponse; })(); - binlogdata.MinimalTable = (function() { + vtctldata.ValidateShardRequest = (function() { /** - * Properties of a MinimalTable. - * @memberof binlogdata - * @interface IMinimalTable - * @property {string|null} [name] MinimalTable name - * @property {Array.|null} [fields] MinimalTable fields - * @property {Array.|null} [p_k_columns] MinimalTable p_k_columns + * Properties of a ValidateShardRequest. + * @memberof vtctldata + * @interface IValidateShardRequest + * @property {string|null} [keyspace] ValidateShardRequest keyspace + * @property {string|null} [shard] ValidateShardRequest shard + * @property {boolean|null} [ping_tablets] ValidateShardRequest ping_tablets */ /** - * Constructs a new MinimalTable. - * @memberof binlogdata - * @classdesc Represents a MinimalTable. - * @implements IMinimalTable + * Constructs a new ValidateShardRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateShardRequest. + * @implements IValidateShardRequest * @constructor - * @param {binlogdata.IMinimalTable=} [properties] Properties to set + * @param {vtctldata.IValidateShardRequest=} [properties] Properties to set */ - function MinimalTable(properties) { - this.fields = []; - this.p_k_columns = []; + function ValidateShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127328,115 +128302,101 @@ $root.binlogdata = (function() { } /** - * MinimalTable name. - * @member {string} name - * @memberof binlogdata.MinimalTable + * ValidateShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ValidateShardRequest * @instance */ - MinimalTable.prototype.name = ""; + ValidateShardRequest.prototype.keyspace = ""; /** - * MinimalTable fields. - * @member {Array.} fields - * @memberof binlogdata.MinimalTable + * ValidateShardRequest shard. + * @member {string} shard + * @memberof vtctldata.ValidateShardRequest * @instance */ - MinimalTable.prototype.fields = $util.emptyArray; + ValidateShardRequest.prototype.shard = ""; /** - * MinimalTable p_k_columns. - * @member {Array.} p_k_columns - * @memberof binlogdata.MinimalTable + * ValidateShardRequest ping_tablets. + * @member {boolean} ping_tablets + * @memberof vtctldata.ValidateShardRequest * @instance */ - MinimalTable.prototype.p_k_columns = $util.emptyArray; + ValidateShardRequest.prototype.ping_tablets = false; /** - * Creates a new MinimalTable instance using the specified properties. + * Creates a new ValidateShardRequest instance using the specified properties. * @function create - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static - * @param {binlogdata.IMinimalTable=} [properties] Properties to set - * @returns {binlogdata.MinimalTable} MinimalTable instance + * @param {vtctldata.IValidateShardRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest instance */ - MinimalTable.create = function create(properties) { - return new MinimalTable(properties); + ValidateShardRequest.create = function create(properties) { + return new ValidateShardRequest(properties); }; /** - * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. + * Encodes the specified ValidateShardRequest message. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static - * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode + * @param {vtctldata.IValidateShardRequest} message ValidateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MinimalTable.encode = function encode(message, writer) { + ValidateShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.p_k_columns != null && message.p_k_columns.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.p_k_columns.length; ++i) - writer.int64(message.p_k_columns[i]); - writer.ldelim(); - } + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); + if (message.ping_tablets != null && Object.hasOwnProperty.call(message, "ping_tablets")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ping_tablets); return writer; }; /** - * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. + * Encodes the specified ValidateShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static - * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode + * @param {vtctldata.IValidateShardRequest} message ValidateShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MinimalTable.encodeDelimited = function encodeDelimited(message, writer) { + ValidateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MinimalTable message from the specified reader or buffer. + * Decodes a ValidateShardRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.MinimalTable} MinimalTable + * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MinimalTable.decode = function decode(reader, length) { + ValidateShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalTable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.keyspace = reader.string(); break; case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); + message.shard = reader.string(); break; case 3: - if (!(message.p_k_columns && message.p_k_columns.length)) - message.p_k_columns = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.p_k_columns.push(reader.int64()); - } else - message.p_k_columns.push(reader.int64()); + message.ping_tablets = reader.bool(); break; default: reader.skipType(tag & 7); @@ -127447,165 +128407,125 @@ $root.binlogdata = (function() { }; /** - * Decodes a MinimalTable message from the specified reader or buffer, length delimited. + * Decodes a ValidateShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.MinimalTable} MinimalTable + * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MinimalTable.decodeDelimited = function decodeDelimited(reader) { + ValidateShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MinimalTable message. + * Verifies a ValidateShardRequest message. * @function verify - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MinimalTable.verify = function verify(message) { + ValidateShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.p_k_columns != null && message.hasOwnProperty("p_k_columns")) { - if (!Array.isArray(message.p_k_columns)) - return "p_k_columns: array expected"; - for (var i = 0; i < message.p_k_columns.length; ++i) - if (!$util.isInteger(message.p_k_columns[i]) && !(message.p_k_columns[i] && $util.isInteger(message.p_k_columns[i].low) && $util.isInteger(message.p_k_columns[i].high))) - return "p_k_columns: integer|Long[] expected"; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + if (typeof message.ping_tablets !== "boolean") + return "ping_tablets: boolean expected"; return null; }; /** - * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.MinimalTable} MinimalTable + * @returns {vtctldata.ValidateShardRequest} ValidateShardRequest */ - MinimalTable.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.MinimalTable) + ValidateShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateShardRequest) return object; - var message = new $root.binlogdata.MinimalTable(); - if (object.name != null) - message.name = String(object.name); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.MinimalTable.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.MinimalTable.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.p_k_columns) { - if (!Array.isArray(object.p_k_columns)) - throw TypeError(".binlogdata.MinimalTable.p_k_columns: array expected"); - message.p_k_columns = []; - for (var i = 0; i < object.p_k_columns.length; ++i) - if ($util.Long) - (message.p_k_columns[i] = $util.Long.fromValue(object.p_k_columns[i])).unsigned = false; - else if (typeof object.p_k_columns[i] === "string") - message.p_k_columns[i] = parseInt(object.p_k_columns[i], 10); - else if (typeof object.p_k_columns[i] === "number") - message.p_k_columns[i] = object.p_k_columns[i]; - else if (typeof object.p_k_columns[i] === "object") - message.p_k_columns[i] = new $util.LongBits(object.p_k_columns[i].low >>> 0, object.p_k_columns[i].high >>> 0).toNumber(); - } + var message = new $root.vtctldata.ValidateShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); + if (object.ping_tablets != null) + message.ping_tablets = Boolean(object.ping_tablets); return message; }; /** - * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. + * Creates a plain object from a ValidateShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @static - * @param {binlogdata.MinimalTable} message MinimalTable + * @param {vtctldata.ValidateShardRequest} message ValidateShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MinimalTable.toObject = function toObject(message, options) { + ValidateShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.p_k_columns = []; - } - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.p_k_columns && message.p_k_columns.length) { - object.p_k_columns = []; - for (var j = 0; j < message.p_k_columns.length; ++j) - if (typeof message.p_k_columns[j] === "number") - object.p_k_columns[j] = options.longs === String ? String(message.p_k_columns[j]) : message.p_k_columns[j]; - else - object.p_k_columns[j] = options.longs === String ? $util.Long.prototype.toString.call(message.p_k_columns[j]) : options.longs === Number ? new $util.LongBits(message.p_k_columns[j].low >>> 0, message.p_k_columns[j].high >>> 0).toNumber() : message.p_k_columns[j]; + if (options.defaults) { + object.keyspace = ""; + object.shard = ""; + object.ping_tablets = false; } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.ping_tablets != null && message.hasOwnProperty("ping_tablets")) + object.ping_tablets = message.ping_tablets; return object; }; /** - * Converts this MinimalTable to JSON. + * Converts this ValidateShardRequest to JSON. * @function toJSON - * @memberof binlogdata.MinimalTable + * @memberof vtctldata.ValidateShardRequest * @instance * @returns {Object.} JSON object */ - MinimalTable.prototype.toJSON = function toJSON() { + ValidateShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MinimalTable; + return ValidateShardRequest; })(); - binlogdata.MinimalSchema = (function() { + vtctldata.ValidateShardResponse = (function() { /** - * Properties of a MinimalSchema. - * @memberof binlogdata - * @interface IMinimalSchema - * @property {Array.|null} [tables] MinimalSchema tables + * Properties of a ValidateShardResponse. + * @memberof vtctldata + * @interface IValidateShardResponse + * @property {Array.|null} [results] ValidateShardResponse results */ /** - * Constructs a new MinimalSchema. - * @memberof binlogdata - * @classdesc Represents a MinimalSchema. - * @implements IMinimalSchema + * Constructs a new ValidateShardResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateShardResponse. + * @implements IValidateShardResponse * @constructor - * @param {binlogdata.IMinimalSchema=} [properties] Properties to set + * @param {vtctldata.IValidateShardResponse=} [properties] Properties to set */ - function MinimalSchema(properties) { - this.tables = []; + function ValidateShardResponse(properties) { + this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127613,78 +128533,78 @@ $root.binlogdata = (function() { } /** - * MinimalSchema tables. - * @member {Array.} tables - * @memberof binlogdata.MinimalSchema + * ValidateShardResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateShardResponse * @instance */ - MinimalSchema.prototype.tables = $util.emptyArray; + ValidateShardResponse.prototype.results = $util.emptyArray; /** - * Creates a new MinimalSchema instance using the specified properties. + * Creates a new ValidateShardResponse instance using the specified properties. * @function create - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static - * @param {binlogdata.IMinimalSchema=} [properties] Properties to set - * @returns {binlogdata.MinimalSchema} MinimalSchema instance + * @param {vtctldata.IValidateShardResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse instance */ - MinimalSchema.create = function create(properties) { - return new MinimalSchema(properties); + ValidateShardResponse.create = function create(properties) { + return new ValidateShardResponse(properties); }; /** - * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. + * Encodes the specified ValidateShardResponse message. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static - * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode + * @param {vtctldata.IValidateShardResponse} message ValidateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MinimalSchema.encode = function encode(message, writer) { + ValidateShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - $root.binlogdata.MinimalTable.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); return writer; }; /** - * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. + * Encodes the specified ValidateShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static - * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode + * @param {vtctldata.IValidateShardResponse} message ValidateShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MinimalSchema.encodeDelimited = function encodeDelimited(message, writer) { + ValidateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MinimalSchema message from the specified reader or buffer. + * Decodes a ValidateShardResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.MinimalSchema} MinimalSchema + * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MinimalSchema.decode = function decode(reader, length) { + ValidateShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalSchema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push($root.binlogdata.MinimalTable.decode(reader, reader.uint32())); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -127695,130 +128615,119 @@ $root.binlogdata = (function() { }; /** - * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. + * Decodes a ValidateShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.MinimalSchema} MinimalSchema + * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MinimalSchema.decodeDelimited = function decodeDelimited(reader) { + ValidateShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MinimalSchema message. + * Verifies a ValidateShardResponse message. * @function verify - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MinimalSchema.verify = function verify(message) { + ValidateShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) { - var error = $root.binlogdata.MinimalTable.verify(message.tables[i]); - if (error) - return "tables." + error; - } + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; } return null; }; /** - * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.MinimalSchema - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.MinimalSchema} MinimalSchema - */ - MinimalSchema.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.MinimalSchema) - return object; - var message = new $root.binlogdata.MinimalSchema(); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.MinimalSchema.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) { - if (typeof object.tables[i] !== "object") - throw TypeError(".binlogdata.MinimalSchema.tables: object expected"); - message.tables[i] = $root.binlogdata.MinimalTable.fromObject(object.tables[i]); - } + * @memberof vtctldata.ValidateShardResponse + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.ValidateShardResponse} ValidateShardResponse + */ + ValidateShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateShardResponse) + return object; + var message = new $root.vtctldata.ValidateShardResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateShardResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); } return message; }; /** - * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. + * Creates a plain object from a ValidateShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @static - * @param {binlogdata.MinimalSchema} message MinimalSchema + * @param {vtctldata.ValidateShardResponse} message ValidateShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MinimalSchema.toObject = function toObject(message, options) { + ValidateShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.tables = []; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = $root.binlogdata.MinimalTable.toObject(message.tables[j], options); + object.results = []; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; } return object; }; /** - * Converts this MinimalSchema to JSON. + * Converts this ValidateShardResponse to JSON. * @function toJSON - * @memberof binlogdata.MinimalSchema + * @memberof vtctldata.ValidateShardResponse * @instance * @returns {Object.} JSON object */ - MinimalSchema.prototype.toJSON = function toJSON() { + ValidateShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MinimalSchema; + return ValidateShardResponse; })(); - binlogdata.VStreamRequest = (function() { + vtctldata.ValidateVersionKeyspaceRequest = (function() { /** - * Properties of a VStreamRequest. - * @memberof binlogdata - * @interface IVStreamRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRequest immediate_caller_id - * @property {query.ITarget|null} [target] VStreamRequest target - * @property {string|null} [position] VStreamRequest position - * @property {binlogdata.IFilter|null} [filter] VStreamRequest filter - * @property {Array.|null} [table_last_p_ks] VStreamRequest table_last_p_ks + * Properties of a ValidateVersionKeyspaceRequest. + * @memberof vtctldata + * @interface IValidateVersionKeyspaceRequest + * @property {string|null} [keyspace] ValidateVersionKeyspaceRequest keyspace */ /** - * Constructs a new VStreamRequest. - * @memberof binlogdata - * @classdesc Represents a VStreamRequest. - * @implements IVStreamRequest + * Constructs a new ValidateVersionKeyspaceRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateVersionKeyspaceRequest. + * @implements IValidateVersionKeyspaceRequest * @constructor - * @param {binlogdata.IVStreamRequest=} [properties] Properties to set + * @param {vtctldata.IValidateVersionKeyspaceRequest=} [properties] Properties to set */ - function VStreamRequest(properties) { - this.table_last_p_ks = []; + function ValidateVersionKeyspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127826,143 +128735,75 @@ $root.binlogdata = (function() { } /** - * VStreamRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.effective_caller_id = null; - - /** - * VStreamRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.immediate_caller_id = null; - - /** - * VStreamRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.target = null; - - /** - * VStreamRequest position. - * @member {string} position - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.position = ""; - - /** - * VStreamRequest filter. - * @member {binlogdata.IFilter|null|undefined} filter - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.filter = null; - - /** - * VStreamRequest table_last_p_ks. - * @member {Array.} table_last_p_ks - * @memberof binlogdata.VStreamRequest + * ValidateVersionKeyspaceRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @instance */ - VStreamRequest.prototype.table_last_p_ks = $util.emptyArray; + ValidateVersionKeyspaceRequest.prototype.keyspace = ""; /** - * Creates a new VStreamRequest instance using the specified properties. + * Creates a new ValidateVersionKeyspaceRequest instance using the specified properties. * @function create - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static - * @param {binlogdata.IVStreamRequest=} [properties] Properties to set - * @returns {binlogdata.VStreamRequest} VStreamRequest instance + * @param {vtctldata.IValidateVersionKeyspaceRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest instance */ - VStreamRequest.create = function create(properties) { - return new VStreamRequest(properties); + ValidateVersionKeyspaceRequest.create = function create(properties) { + return new ValidateVersionKeyspaceRequest(properties); }; /** - * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. + * Encodes the specified ValidateVersionKeyspaceRequest message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static - * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode + * @param {vtctldata.IValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRequest.encode = function encode(message, writer) { + ValidateVersionKeyspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.position); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.table_last_p_ks != null && message.table_last_p_ks.length) - for (var i = 0; i < message.table_last_p_ks.length; ++i) - $root.binlogdata.TableLastPK.encode(message.table_last_p_ks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); return writer; }; /** - * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. + * Encodes the specified ValidateVersionKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static - * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode + * @param {vtctldata.IValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVersionKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamRequest message from the specified reader or buffer. + * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRequest} VStreamRequest + * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRequest.decode = function decode(reader, length) { + ValidateVersionKeyspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionKeyspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.position = reader.string(); - break; - case 5: - message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.table_last_p_ks && message.table_last_p_ks.length)) - message.table_last_p_ks = []; - message.table_last_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); + message.keyspace = reader.string(); break; default: reader.skipType(tag & 7); @@ -127973,187 +128814,110 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionKeyspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRequest} VStreamRequest + * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRequest.decodeDelimited = function decodeDelimited(reader) { + ValidateVersionKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamRequest message. + * Verifies a ValidateVersionKeyspaceRequest message. * @function verify - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamRequest.verify = function verify(message) { + ValidateVersionKeyspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.binlogdata.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.table_last_p_ks != null && message.hasOwnProperty("table_last_p_ks")) { - if (!Array.isArray(message.table_last_p_ks)) - return "table_last_p_ks: array expected"; - for (var i = 0; i < message.table_last_p_ks.length; ++i) { - var error = $root.binlogdata.TableLastPK.verify(message.table_last_p_ks[i]); - if (error) - return "table_last_p_ks." + error; - } - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; /** - * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionKeyspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRequest} VStreamRequest + * @returns {vtctldata.ValidateVersionKeyspaceRequest} ValidateVersionKeyspaceRequest */ - VStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRequest) + ValidateVersionKeyspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVersionKeyspaceRequest) return object; - var message = new $root.binlogdata.VStreamRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".binlogdata.VStreamRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.position != null) - message.position = String(object.position); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".binlogdata.VStreamRequest.filter: object expected"); - message.filter = $root.binlogdata.Filter.fromObject(object.filter); - } - if (object.table_last_p_ks) { - if (!Array.isArray(object.table_last_p_ks)) - throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: array expected"); - message.table_last_p_ks = []; - for (var i = 0; i < object.table_last_p_ks.length; ++i) { - if (typeof object.table_last_p_ks[i] !== "object") - throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: object expected"); - message.table_last_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_last_p_ks[i]); - } - } + var message = new $root.vtctldata.ValidateVersionKeyspaceRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); return message; }; /** - * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVersionKeyspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @static - * @param {binlogdata.VStreamRequest} message VStreamRequest + * @param {vtctldata.ValidateVersionKeyspaceRequest} message ValidateVersionKeyspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamRequest.toObject = function toObject(message, options) { + ValidateVersionKeyspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.table_last_p_ks = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.position = ""; - object.filter = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.binlogdata.Filter.toObject(message.filter, options); - if (message.table_last_p_ks && message.table_last_p_ks.length) { - object.table_last_p_ks = []; - for (var j = 0; j < message.table_last_p_ks.length; ++j) - object.table_last_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_last_p_ks[j], options); - } + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; return object; }; /** - * Converts this VStreamRequest to JSON. + * Converts this ValidateVersionKeyspaceRequest to JSON. * @function toJSON - * @memberof binlogdata.VStreamRequest + * @memberof vtctldata.ValidateVersionKeyspaceRequest * @instance * @returns {Object.} JSON object */ - VStreamRequest.prototype.toJSON = function toJSON() { + ValidateVersionKeyspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamRequest; + return ValidateVersionKeyspaceRequest; })(); - binlogdata.VStreamResponse = (function() { + vtctldata.ValidateVersionKeyspaceResponse = (function() { /** - * Properties of a VStreamResponse. - * @memberof binlogdata - * @interface IVStreamResponse - * @property {Array.|null} [events] VStreamResponse events + * Properties of a ValidateVersionKeyspaceResponse. + * @memberof vtctldata + * @interface IValidateVersionKeyspaceResponse + * @property {Array.|null} [results] ValidateVersionKeyspaceResponse results + * @property {Object.|null} [results_by_shard] ValidateVersionKeyspaceResponse results_by_shard */ /** - * Constructs a new VStreamResponse. - * @memberof binlogdata - * @classdesc Represents a VStreamResponse. - * @implements IVStreamResponse + * Constructs a new ValidateVersionKeyspaceResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateVersionKeyspaceResponse. + * @implements IValidateVersionKeyspaceResponse * @constructor - * @param {binlogdata.IVStreamResponse=} [properties] Properties to set + * @param {vtctldata.IValidateVersionKeyspaceResponse=} [properties] Properties to set */ - function VStreamResponse(properties) { - this.events = []; + function ValidateVersionKeyspaceResponse(properties) { + this.results = []; + this.results_by_shard = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128161,78 +128925,113 @@ $root.binlogdata = (function() { } /** - * VStreamResponse events. - * @member {Array.} events - * @memberof binlogdata.VStreamResponse + * ValidateVersionKeyspaceResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @instance */ - VStreamResponse.prototype.events = $util.emptyArray; + ValidateVersionKeyspaceResponse.prototype.results = $util.emptyArray; /** - * Creates a new VStreamResponse instance using the specified properties. + * ValidateVersionKeyspaceResponse results_by_shard. + * @member {Object.} results_by_shard + * @memberof vtctldata.ValidateVersionKeyspaceResponse + * @instance + */ + ValidateVersionKeyspaceResponse.prototype.results_by_shard = $util.emptyObject; + + /** + * Creates a new ValidateVersionKeyspaceResponse instance using the specified properties. * @function create - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static - * @param {binlogdata.IVStreamResponse=} [properties] Properties to set - * @returns {binlogdata.VStreamResponse} VStreamResponse instance + * @param {vtctldata.IValidateVersionKeyspaceResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse instance */ - VStreamResponse.create = function create(properties) { - return new VStreamResponse(properties); + ValidateVersionKeyspaceResponse.create = function create(properties) { + return new ValidateVersionKeyspaceResponse(properties); }; /** - * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. + * Encodes the specified ValidateVersionKeyspaceResponse message. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static - * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode + * @param {vtctldata.IValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResponse.encode = function encode(message, writer) { + ValidateVersionKeyspaceResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.binlogdata.VEvent.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) + for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. + * Encodes the specified ValidateVersionKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionKeyspaceResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static - * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode + * @param {vtctldata.IValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVersionKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamResponse message from the specified reader or buffer. + * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamResponse} VStreamResponse + * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResponse.decode = function decode(reader, length) { + ValidateVersionKeyspaceResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionKeyspaceResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.binlogdata.VEvent.decode(reader, reader.uint32())); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); + break; + case 2: + if (message.results_by_shard === $util.emptyObject) + message.results_by_shard = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.results_by_shard[key] = value; break; default: reader.skipType(tag & 7); @@ -128243,128 +129042,148 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionKeyspaceResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamResponse} VStreamResponse + * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResponse.decodeDelimited = function decodeDelimited(reader) { + ValidateVersionKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamResponse message. + * Verifies a ValidateVersionKeyspaceResponse message. * @function verify - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamResponse.verify = function verify(message) { + ValidateVersionKeyspaceResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.binlogdata.VEvent.verify(message.events[i]); + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; + } + if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { + if (!$util.isObject(message.results_by_shard)) + return "results_by_shard: object expected"; + var key = Object.keys(message.results_by_shard); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); if (error) - return "events." + error; + return "results_by_shard." + error; } } return null; }; /** - * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionKeyspaceResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamResponse} VStreamResponse + * @returns {vtctldata.ValidateVersionKeyspaceResponse} ValidateVersionKeyspaceResponse */ - VStreamResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamResponse) + ValidateVersionKeyspaceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVersionKeyspaceResponse) return object; - var message = new $root.binlogdata.VStreamResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".binlogdata.VStreamResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".binlogdata.VStreamResponse.events: object expected"); - message.events[i] = $root.binlogdata.VEvent.fromObject(object.events[i]); + var message = new $root.vtctldata.ValidateVersionKeyspaceResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); + } + if (object.results_by_shard) { + if (typeof object.results_by_shard !== "object") + throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard = {}; + for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { + if (typeof object.results_by_shard[keys[i]] !== "object") + throw TypeError(".vtctldata.ValidateVersionKeyspaceResponse.results_by_shard: object expected"); + message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); } } return message; }; /** - * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVersionKeyspaceResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @static - * @param {binlogdata.VStreamResponse} message VStreamResponse + * @param {vtctldata.ValidateVersionKeyspaceResponse} message ValidateVersionKeyspaceResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamResponse.toObject = function toObject(message, options) { + ValidateVersionKeyspaceResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.binlogdata.VEvent.toObject(message.events[j], options); + object.results = []; + if (options.objects || options.defaults) + object.results_by_shard = {}; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; + } + var keys2; + if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { + object.results_by_shard = {}; + for (var j = 0; j < keys2.length; ++j) + object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); } return object; }; /** - * Converts this VStreamResponse to JSON. + * Converts this ValidateVersionKeyspaceResponse to JSON. * @function toJSON - * @memberof binlogdata.VStreamResponse + * @memberof vtctldata.ValidateVersionKeyspaceResponse * @instance * @returns {Object.} JSON object */ - VStreamResponse.prototype.toJSON = function toJSON() { + ValidateVersionKeyspaceResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamResponse; + return ValidateVersionKeyspaceResponse; })(); - binlogdata.VStreamRowsRequest = (function() { + vtctldata.ValidateVersionShardRequest = (function() { /** - * Properties of a VStreamRowsRequest. - * @memberof binlogdata - * @interface IVStreamRowsRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRowsRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRowsRequest immediate_caller_id - * @property {query.ITarget|null} [target] VStreamRowsRequest target - * @property {string|null} [query] VStreamRowsRequest query - * @property {query.IQueryResult|null} [lastpk] VStreamRowsRequest lastpk + * Properties of a ValidateVersionShardRequest. + * @memberof vtctldata + * @interface IValidateVersionShardRequest + * @property {string|null} [keyspace] ValidateVersionShardRequest keyspace + * @property {string|null} [shard] ValidateVersionShardRequest shard */ /** - * Constructs a new VStreamRowsRequest. - * @memberof binlogdata - * @classdesc Represents a VStreamRowsRequest. - * @implements IVStreamRowsRequest + * Constructs a new ValidateVersionShardRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateVersionShardRequest. + * @implements IValidateVersionShardRequest * @constructor - * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set + * @param {vtctldata.IValidateVersionShardRequest=} [properties] Properties to set */ - function VStreamRowsRequest(properties) { + function ValidateVersionShardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128372,127 +129191,88 @@ $root.binlogdata = (function() { } /** - * VStreamRowsRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.effective_caller_id = null; - - /** - * VStreamRowsRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.immediate_caller_id = null; - - /** - * VStreamRowsRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.target = null; - - /** - * VStreamRowsRequest query. - * @member {string} query - * @memberof binlogdata.VStreamRowsRequest + * ValidateVersionShardRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ValidateVersionShardRequest * @instance */ - VStreamRowsRequest.prototype.query = ""; + ValidateVersionShardRequest.prototype.keyspace = ""; /** - * VStreamRowsRequest lastpk. - * @member {query.IQueryResult|null|undefined} lastpk - * @memberof binlogdata.VStreamRowsRequest + * ValidateVersionShardRequest shard. + * @member {string} shard + * @memberof vtctldata.ValidateVersionShardRequest * @instance */ - VStreamRowsRequest.prototype.lastpk = null; + ValidateVersionShardRequest.prototype.shard = ""; /** - * Creates a new VStreamRowsRequest instance using the specified properties. + * Creates a new ValidateVersionShardRequest instance using the specified properties. * @function create - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static - * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest instance + * @param {vtctldata.IValidateVersionShardRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest instance */ - VStreamRowsRequest.create = function create(properties) { - return new VStreamRowsRequest(properties); + ValidateVersionShardRequest.create = function create(properties) { + return new ValidateVersionShardRequest(properties); }; /** - * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. + * Encodes the specified ValidateVersionShardRequest message. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static - * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode + * @param {vtctldata.IValidateVersionShardRequest} message ValidateVersionShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRowsRequest.encode = function encode(message, writer) { + ValidateVersionShardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); - if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) - $root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); return writer; }; /** - * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. + * Encodes the specified ValidateVersionShardRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static - * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode + * @param {vtctldata.IValidateVersionShardRequest} message ValidateVersionShardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVersionShardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer. + * Decodes a ValidateVersionShardRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest + * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRowsRequest.decode = function decode(reader, length) { + ValidateVersionShardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionShardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = reader.string(); - break; - case 5: - message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32()); + message.shard = reader.string(); break; default: reader.skipType(tag & 7); @@ -128503,169 +129283,117 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionShardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest + * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRowsRequest.decodeDelimited = function decodeDelimited(reader) { + ValidateVersionShardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamRowsRequest message. + * Verifies a ValidateVersionShardRequest message. * @function verify - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamRowsRequest.verify = function verify(message) { + ValidateVersionShardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) { - var error = $root.query.QueryResult.verify(message.lastpk); - if (error) - return "lastpk." + error; - } + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; return null; }; /** - * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionShardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest + * @returns {vtctldata.ValidateVersionShardRequest} ValidateVersionShardRequest */ - VStreamRowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRowsRequest) + ValidateVersionShardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVersionShardRequest) return object; - var message = new $root.binlogdata.VStreamRowsRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) - message.query = String(object.query); - if (object.lastpk != null) { - if (typeof object.lastpk !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.lastpk: object expected"); - message.lastpk = $root.query.QueryResult.fromObject(object.lastpk); - } + var message = new $root.vtctldata.ValidateVersionShardRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); return message; }; /** - * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVersionShardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @static - * @param {binlogdata.VStreamRowsRequest} message VStreamRowsRequest + * @param {vtctldata.ValidateVersionShardRequest} message ValidateVersionShardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamRowsRequest.toObject = function toObject(message, options) { + ValidateVersionShardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = ""; - object.lastpk = null; + object.keyspace = ""; + object.shard = ""; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) - object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; return object; }; /** - * Converts this VStreamRowsRequest to JSON. + * Converts this ValidateVersionShardRequest to JSON. * @function toJSON - * @memberof binlogdata.VStreamRowsRequest + * @memberof vtctldata.ValidateVersionShardRequest * @instance * @returns {Object.} JSON object */ - VStreamRowsRequest.prototype.toJSON = function toJSON() { + ValidateVersionShardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamRowsRequest; + return ValidateVersionShardRequest; })(); - binlogdata.VStreamRowsResponse = (function() { + vtctldata.ValidateVersionShardResponse = (function() { /** - * Properties of a VStreamRowsResponse. - * @memberof binlogdata - * @interface IVStreamRowsResponse - * @property {Array.|null} [fields] VStreamRowsResponse fields - * @property {Array.|null} [pkfields] VStreamRowsResponse pkfields - * @property {string|null} [gtid] VStreamRowsResponse gtid - * @property {Array.|null} [rows] VStreamRowsResponse rows - * @property {query.IRow|null} [lastpk] VStreamRowsResponse lastpk - * @property {boolean|null} [throttled] VStreamRowsResponse throttled - * @property {boolean|null} [heartbeat] VStreamRowsResponse heartbeat + * Properties of a ValidateVersionShardResponse. + * @memberof vtctldata + * @interface IValidateVersionShardResponse + * @property {Array.|null} [results] ValidateVersionShardResponse results */ /** - * Constructs a new VStreamRowsResponse. - * @memberof binlogdata - * @classdesc Represents a VStreamRowsResponse. - * @implements IVStreamRowsResponse + * Constructs a new ValidateVersionShardResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateVersionShardResponse. + * @implements IValidateVersionShardResponse * @constructor - * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set + * @param {vtctldata.IValidateVersionShardResponse=} [properties] Properties to set */ - function VStreamRowsResponse(properties) { - this.fields = []; - this.pkfields = []; - this.rows = []; + function ValidateVersionShardResponse(properties) { + this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128673,162 +129401,78 @@ $root.binlogdata = (function() { } /** - * VStreamRowsResponse fields. - * @member {Array.} fields - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.fields = $util.emptyArray; - - /** - * VStreamRowsResponse pkfields. - * @member {Array.} pkfields - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.pkfields = $util.emptyArray; - - /** - * VStreamRowsResponse gtid. - * @member {string} gtid - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.gtid = ""; - - /** - * VStreamRowsResponse rows. - * @member {Array.} rows - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.rows = $util.emptyArray; - - /** - * VStreamRowsResponse lastpk. - * @member {query.IRow|null|undefined} lastpk - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.lastpk = null; - - /** - * VStreamRowsResponse throttled. - * @member {boolean} throttled - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.throttled = false; - - /** - * VStreamRowsResponse heartbeat. - * @member {boolean} heartbeat - * @memberof binlogdata.VStreamRowsResponse + * ValidateVersionShardResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateVersionShardResponse * @instance */ - VStreamRowsResponse.prototype.heartbeat = false; + ValidateVersionShardResponse.prototype.results = $util.emptyArray; /** - * Creates a new VStreamRowsResponse instance using the specified properties. + * Creates a new ValidateVersionShardResponse instance using the specified properties. * @function create - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static - * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse instance + * @param {vtctldata.IValidateVersionShardResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse instance */ - VStreamRowsResponse.create = function create(properties) { - return new VStreamRowsResponse(properties); + ValidateVersionShardResponse.create = function create(properties) { + return new ValidateVersionShardResponse(properties); }; /** - * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. + * Encodes the specified ValidateVersionShardResponse message. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static - * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode + * @param {vtctldata.IValidateVersionShardResponse} message ValidateVersionShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRowsResponse.encode = function encode(message, writer) { + ValidateVersionShardResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pkfields != null && message.pkfields.length) - for (var i = 0; i < message.pkfields.length; ++i) - $root.query.Field.encode(message.pkfields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) - $root.query.Row.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.throttled != null && Object.hasOwnProperty.call(message, "throttled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.throttled); - if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.heartbeat); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); return writer; }; /** - * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. + * Encodes the specified ValidateVersionShardResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVersionShardResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static - * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode + * @param {vtctldata.IValidateVersionShardResponse} message ValidateVersionShardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVersionShardResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer. + * Decodes a ValidateVersionShardResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse + * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRowsResponse.decode = function decode(reader, length) { + ValidateVersionShardResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVersionShardResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.pkfields && message.pkfields.length)) - message.pkfields = []; - message.pkfields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.query.Row.decode(reader, reader.uint32())); - break; - case 5: - message.lastpk = $root.query.Row.decode(reader, reader.uint32()); - break; - case 6: - message.throttled = reader.bool(); - break; - case 7: - message.heartbeat = reader.bool(); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -128839,215 +129483,124 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateVersionShardResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse + * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamRowsResponse.decodeDelimited = function decodeDelimited(reader) { + ValidateVersionShardResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamRowsResponse message. + * Verifies a ValidateVersionShardResponse message. * @function verify - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamRowsResponse.verify = function verify(message) { + ValidateVersionShardResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.pkfields != null && message.hasOwnProperty("pkfields")) { - if (!Array.isArray(message.pkfields)) - return "pkfields: array expected"; - for (var i = 0; i < message.pkfields.length; ++i) { - var error = $root.query.Field.verify(message.pkfields[i]); - if (error) - return "pkfields." + error; - } - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.query.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.lastpk != null && message.hasOwnProperty("lastpk")) { - var error = $root.query.Row.verify(message.lastpk); - if (error) - return "lastpk." + error; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; } - if (message.throttled != null && message.hasOwnProperty("throttled")) - if (typeof message.throttled !== "boolean") - return "throttled: boolean expected"; - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) - if (typeof message.heartbeat !== "boolean") - return "heartbeat: boolean expected"; return null; }; /** - * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVersionShardResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse + * @returns {vtctldata.ValidateVersionShardResponse} ValidateVersionShardResponse */ - VStreamRowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRowsResponse) + ValidateVersionShardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVersionShardResponse) return object; - var message = new $root.binlogdata.VStreamRowsResponse(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.VStreamRowsResponse.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.pkfields) { - if (!Array.isArray(object.pkfields)) - throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: array expected"); - message.pkfields = []; - for (var i = 0; i < object.pkfields.length; ++i) { - if (typeof object.pkfields[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: object expected"); - message.pkfields[i] = $root.query.Field.fromObject(object.pkfields[i]); - } - } - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".binlogdata.VStreamRowsResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.rows: object expected"); - message.rows[i] = $root.query.Row.fromObject(object.rows[i]); - } - } - if (object.lastpk != null) { - if (typeof object.lastpk !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.lastpk: object expected"); - message.lastpk = $root.query.Row.fromObject(object.lastpk); + var message = new $root.vtctldata.ValidateVersionShardResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateVersionShardResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); } - if (object.throttled != null) - message.throttled = Boolean(object.throttled); - if (object.heartbeat != null) - message.heartbeat = Boolean(object.heartbeat); return message; }; /** - * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVersionShardResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @static - * @param {binlogdata.VStreamRowsResponse} message VStreamRowsResponse + * @param {vtctldata.ValidateVersionShardResponse} message ValidateVersionShardResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamRowsResponse.toObject = function toObject(message, options) { + ValidateVersionShardResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.pkfields = []; - object.rows = []; - } - if (options.defaults) { - object.gtid = ""; - object.lastpk = null; - object.throttled = false; - object.heartbeat = false; - } - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.pkfields && message.pkfields.length) { - object.pkfields = []; - for (var j = 0; j < message.pkfields.length; ++j) - object.pkfields[j] = $root.query.Field.toObject(message.pkfields[j], options); - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.query.Row.toObject(message.rows[j], options); + if (options.arrays || options.defaults) + object.results = []; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; } - if (message.lastpk != null && message.hasOwnProperty("lastpk")) - object.lastpk = $root.query.Row.toObject(message.lastpk, options); - if (message.throttled != null && message.hasOwnProperty("throttled")) - object.throttled = message.throttled; - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) - object.heartbeat = message.heartbeat; return object; }; /** - * Converts this VStreamRowsResponse to JSON. + * Converts this ValidateVersionShardResponse to JSON. * @function toJSON - * @memberof binlogdata.VStreamRowsResponse + * @memberof vtctldata.ValidateVersionShardResponse * @instance * @returns {Object.} JSON object */ - VStreamRowsResponse.prototype.toJSON = function toJSON() { + ValidateVersionShardResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamRowsResponse; + return ValidateVersionShardResponse; })(); - binlogdata.LastPKEvent = (function() { + vtctldata.ValidateVSchemaRequest = (function() { /** - * Properties of a LastPKEvent. - * @memberof binlogdata - * @interface ILastPKEvent - * @property {binlogdata.ITableLastPK|null} [table_last_p_k] LastPKEvent table_last_p_k - * @property {boolean|null} [completed] LastPKEvent completed + * Properties of a ValidateVSchemaRequest. + * @memberof vtctldata + * @interface IValidateVSchemaRequest + * @property {string|null} [keyspace] ValidateVSchemaRequest keyspace + * @property {Array.|null} [shards] ValidateVSchemaRequest shards + * @property {Array.|null} [exclude_tables] ValidateVSchemaRequest exclude_tables + * @property {boolean|null} [include_views] ValidateVSchemaRequest include_views */ /** - * Constructs a new LastPKEvent. - * @memberof binlogdata - * @classdesc Represents a LastPKEvent. - * @implements ILastPKEvent + * Constructs a new ValidateVSchemaRequest. + * @memberof vtctldata + * @classdesc Represents a ValidateVSchemaRequest. + * @implements IValidateVSchemaRequest * @constructor - * @param {binlogdata.ILastPKEvent=} [properties] Properties to set + * @param {vtctldata.IValidateVSchemaRequest=} [properties] Properties to set */ - function LastPKEvent(properties) { + function ValidateVSchemaRequest(properties) { + this.shards = []; + this.exclude_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129055,88 +129608,120 @@ $root.binlogdata = (function() { } /** - * LastPKEvent table_last_p_k. - * @member {binlogdata.ITableLastPK|null|undefined} table_last_p_k - * @memberof binlogdata.LastPKEvent + * ValidateVSchemaRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.ValidateVSchemaRequest * @instance */ - LastPKEvent.prototype.table_last_p_k = null; + ValidateVSchemaRequest.prototype.keyspace = ""; /** - * LastPKEvent completed. - * @member {boolean} completed - * @memberof binlogdata.LastPKEvent + * ValidateVSchemaRequest shards. + * @member {Array.} shards + * @memberof vtctldata.ValidateVSchemaRequest * @instance */ - LastPKEvent.prototype.completed = false; + ValidateVSchemaRequest.prototype.shards = $util.emptyArray; /** - * Creates a new LastPKEvent instance using the specified properties. + * ValidateVSchemaRequest exclude_tables. + * @member {Array.} exclude_tables + * @memberof vtctldata.ValidateVSchemaRequest + * @instance + */ + ValidateVSchemaRequest.prototype.exclude_tables = $util.emptyArray; + + /** + * ValidateVSchemaRequest include_views. + * @member {boolean} include_views + * @memberof vtctldata.ValidateVSchemaRequest + * @instance + */ + ValidateVSchemaRequest.prototype.include_views = false; + + /** + * Creates a new ValidateVSchemaRequest instance using the specified properties. * @function create - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static - * @param {binlogdata.ILastPKEvent=} [properties] Properties to set - * @returns {binlogdata.LastPKEvent} LastPKEvent instance + * @param {vtctldata.IValidateVSchemaRequest=} [properties] Properties to set + * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest instance */ - LastPKEvent.create = function create(properties) { - return new LastPKEvent(properties); + ValidateVSchemaRequest.create = function create(properties) { + return new ValidateVSchemaRequest(properties); }; /** - * Encodes the specified LastPKEvent message. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. + * Encodes the specified ValidateVSchemaRequest message. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static - * @param {binlogdata.ILastPKEvent} message LastPKEvent message or plain object to encode + * @param {vtctldata.IValidateVSchemaRequest} message ValidateVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LastPKEvent.encode = function encode(message, writer) { + ValidateVSchemaRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table_last_p_k != null && Object.hasOwnProperty.call(message, "table_last_p_k")) - $root.binlogdata.TableLastPK.encode(message.table_last_p_k, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.completed != null && Object.hasOwnProperty.call(message, "completed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.completed); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.shards != null && message.shards.length) + for (var i = 0; i < message.shards.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shards[i]); + if (message.exclude_tables != null && message.exclude_tables.length) + for (var i = 0; i < message.exclude_tables.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); + if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); return writer; }; /** - * Encodes the specified LastPKEvent message, length delimited. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. + * Encodes the specified ValidateVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static - * @param {binlogdata.ILastPKEvent} message LastPKEvent message or plain object to encode + * @param {vtctldata.IValidateVSchemaRequest} message ValidateVSchemaRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LastPKEvent.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LastPKEvent message from the specified reader or buffer. + * Decodes a ValidateVSchemaRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.LastPKEvent} LastPKEvent + * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LastPKEvent.decode = function decode(reader, length) { + ValidateVSchemaRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.LastPKEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVSchemaRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.table_last_p_k = $root.binlogdata.TableLastPK.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.completed = reader.bool(); + if (!(message.shards && message.shards.length)) + message.shards = []; + message.shards.push(reader.string()); + break; + case 3: + if (!(message.exclude_tables && message.exclude_tables.length)) + message.exclude_tables = []; + message.exclude_tables.push(reader.string()); + break; + case 4: + message.include_views = reader.bool(); break; default: reader.skipType(tag & 7); @@ -129147,122 +129732,161 @@ $root.binlogdata = (function() { }; /** - * Decodes a LastPKEvent message from the specified reader or buffer, length delimited. + * Decodes a ValidateVSchemaRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.LastPKEvent} LastPKEvent + * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LastPKEvent.decodeDelimited = function decodeDelimited(reader) { + ValidateVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LastPKEvent message. + * Verifies a ValidateVSchemaRequest message. * @function verify - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LastPKEvent.verify = function verify(message) { + ValidateVSchemaRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table_last_p_k != null && message.hasOwnProperty("table_last_p_k")) { - var error = $root.binlogdata.TableLastPK.verify(message.table_last_p_k); - if (error) - return "table_last_p_k." + error; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (var i = 0; i < message.shards.length; ++i) + if (!$util.isString(message.shards[i])) + return "shards: string[] expected"; } - if (message.completed != null && message.hasOwnProperty("completed")) - if (typeof message.completed !== "boolean") - return "completed: boolean expected"; + if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { + if (!Array.isArray(message.exclude_tables)) + return "exclude_tables: array expected"; + for (var i = 0; i < message.exclude_tables.length; ++i) + if (!$util.isString(message.exclude_tables[i])) + return "exclude_tables: string[] expected"; + } + if (message.include_views != null && message.hasOwnProperty("include_views")) + if (typeof message.include_views !== "boolean") + return "include_views: boolean expected"; return null; }; /** - * Creates a LastPKEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVSchemaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.LastPKEvent} LastPKEvent + * @returns {vtctldata.ValidateVSchemaRequest} ValidateVSchemaRequest */ - LastPKEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.LastPKEvent) + ValidateVSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVSchemaRequest) return object; - var message = new $root.binlogdata.LastPKEvent(); - if (object.table_last_p_k != null) { - if (typeof object.table_last_p_k !== "object") - throw TypeError(".binlogdata.LastPKEvent.table_last_p_k: object expected"); - message.table_last_p_k = $root.binlogdata.TableLastPK.fromObject(object.table_last_p_k); + var message = new $root.vtctldata.ValidateVSchemaRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".vtctldata.ValidateVSchemaRequest.shards: array expected"); + message.shards = []; + for (var i = 0; i < object.shards.length; ++i) + message.shards[i] = String(object.shards[i]); } - if (object.completed != null) - message.completed = Boolean(object.completed); + if (object.exclude_tables) { + if (!Array.isArray(object.exclude_tables)) + throw TypeError(".vtctldata.ValidateVSchemaRequest.exclude_tables: array expected"); + message.exclude_tables = []; + for (var i = 0; i < object.exclude_tables.length; ++i) + message.exclude_tables[i] = String(object.exclude_tables[i]); + } + if (object.include_views != null) + message.include_views = Boolean(object.include_views); return message; }; /** - * Creates a plain object from a LastPKEvent message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVSchemaRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @static - * @param {binlogdata.LastPKEvent} message LastPKEvent + * @param {vtctldata.ValidateVSchemaRequest} message ValidateVSchemaRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LastPKEvent.toObject = function toObject(message, options) { + ValidateVSchemaRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.shards = []; + object.exclude_tables = []; + } if (options.defaults) { - object.table_last_p_k = null; - object.completed = false; + object.keyspace = ""; + object.include_views = false; } - if (message.table_last_p_k != null && message.hasOwnProperty("table_last_p_k")) - object.table_last_p_k = $root.binlogdata.TableLastPK.toObject(message.table_last_p_k, options); - if (message.completed != null && message.hasOwnProperty("completed")) - object.completed = message.completed; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shards && message.shards.length) { + object.shards = []; + for (var j = 0; j < message.shards.length; ++j) + object.shards[j] = message.shards[j]; + } + if (message.exclude_tables && message.exclude_tables.length) { + object.exclude_tables = []; + for (var j = 0; j < message.exclude_tables.length; ++j) + object.exclude_tables[j] = message.exclude_tables[j]; + } + if (message.include_views != null && message.hasOwnProperty("include_views")) + object.include_views = message.include_views; return object; }; /** - * Converts this LastPKEvent to JSON. + * Converts this ValidateVSchemaRequest to JSON. * @function toJSON - * @memberof binlogdata.LastPKEvent + * @memberof vtctldata.ValidateVSchemaRequest * @instance * @returns {Object.} JSON object */ - LastPKEvent.prototype.toJSON = function toJSON() { + ValidateVSchemaRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LastPKEvent; + return ValidateVSchemaRequest; })(); - binlogdata.TableLastPK = (function() { + vtctldata.ValidateVSchemaResponse = (function() { /** - * Properties of a TableLastPK. - * @memberof binlogdata - * @interface ITableLastPK - * @property {string|null} [table_name] TableLastPK table_name - * @property {query.IQueryResult|null} [lastpk] TableLastPK lastpk + * Properties of a ValidateVSchemaResponse. + * @memberof vtctldata + * @interface IValidateVSchemaResponse + * @property {Array.|null} [results] ValidateVSchemaResponse results + * @property {Object.|null} [results_by_shard] ValidateVSchemaResponse results_by_shard */ /** - * Constructs a new TableLastPK. - * @memberof binlogdata - * @classdesc Represents a TableLastPK. - * @implements ITableLastPK + * Constructs a new ValidateVSchemaResponse. + * @memberof vtctldata + * @classdesc Represents a ValidateVSchemaResponse. + * @implements IValidateVSchemaResponse * @constructor - * @param {binlogdata.ITableLastPK=} [properties] Properties to set + * @param {vtctldata.IValidateVSchemaResponse=} [properties] Properties to set */ - function TableLastPK(properties) { + function ValidateVSchemaResponse(properties) { + this.results = []; + this.results_by_shard = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129270,88 +129894,113 @@ $root.binlogdata = (function() { } /** - * TableLastPK table_name. - * @member {string} table_name - * @memberof binlogdata.TableLastPK + * ValidateVSchemaResponse results. + * @member {Array.} results + * @memberof vtctldata.ValidateVSchemaResponse * @instance */ - TableLastPK.prototype.table_name = ""; + ValidateVSchemaResponse.prototype.results = $util.emptyArray; /** - * TableLastPK lastpk. - * @member {query.IQueryResult|null|undefined} lastpk - * @memberof binlogdata.TableLastPK + * ValidateVSchemaResponse results_by_shard. + * @member {Object.} results_by_shard + * @memberof vtctldata.ValidateVSchemaResponse * @instance */ - TableLastPK.prototype.lastpk = null; + ValidateVSchemaResponse.prototype.results_by_shard = $util.emptyObject; /** - * Creates a new TableLastPK instance using the specified properties. + * Creates a new ValidateVSchemaResponse instance using the specified properties. * @function create - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static - * @param {binlogdata.ITableLastPK=} [properties] Properties to set - * @returns {binlogdata.TableLastPK} TableLastPK instance + * @param {vtctldata.IValidateVSchemaResponse=} [properties] Properties to set + * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse instance */ - TableLastPK.create = function create(properties) { - return new TableLastPK(properties); + ValidateVSchemaResponse.create = function create(properties) { + return new ValidateVSchemaResponse(properties); }; /** - * Encodes the specified TableLastPK message. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. + * Encodes the specified ValidateVSchemaResponse message. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static - * @param {binlogdata.ITableLastPK} message TableLastPK message or plain object to encode + * @param {vtctldata.IValidateVSchemaResponse} message ValidateVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableLastPK.encode = function encode(message, writer) { + ValidateVSchemaResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); - if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) - $root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.results[i]); + if (message.results_by_shard != null && Object.hasOwnProperty.call(message, "results_by_shard")) + for (var keys = Object.keys(message.results_by_shard), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.vtctldata.ValidateShardResponse.encode(message.results_by_shard[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified TableLastPK message, length delimited. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. + * Encodes the specified ValidateVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.ValidateVSchemaResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static - * @param {binlogdata.ITableLastPK} message TableLastPK message or plain object to encode + * @param {vtctldata.IValidateVSchemaResponse} message ValidateVSchemaResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableLastPK.encodeDelimited = function encodeDelimited(message, writer) { + ValidateVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TableLastPK message from the specified reader or buffer. + * Decodes a ValidateVSchemaResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.TableLastPK} TableLastPK + * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableLastPK.decode = function decode(reader, length) { + ValidateVSchemaResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.TableLastPK(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ValidateVSchemaResponse(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.table_name = reader.string(); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push(reader.string()); break; - case 3: - message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32()); + case 2: + if (message.results_by_shard === $util.emptyObject) + message.results_by_shard = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.vtctldata.ValidateShardResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.results_by_shard[key] = value; break; default: reader.skipType(tag & 7); @@ -129362,124 +130011,148 @@ $root.binlogdata = (function() { }; /** - * Decodes a TableLastPK message from the specified reader or buffer, length delimited. + * Decodes a ValidateVSchemaResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.TableLastPK} TableLastPK + * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableLastPK.decodeDelimited = function decodeDelimited(reader) { + ValidateVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TableLastPK message. + * Verifies a ValidateVSchemaResponse message. * @function verify - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TableLastPK.verify = function verify(message) { + ValidateVSchemaResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) { - var error = $root.query.QueryResult.verify(message.lastpk); - if (error) - return "lastpk." + error; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) + if (!$util.isString(message.results[i])) + return "results: string[] expected"; + } + if (message.results_by_shard != null && message.hasOwnProperty("results_by_shard")) { + if (!$util.isObject(message.results_by_shard)) + return "results_by_shard: object expected"; + var key = Object.keys(message.results_by_shard); + for (var i = 0; i < key.length; ++i) { + var error = $root.vtctldata.ValidateShardResponse.verify(message.results_by_shard[key[i]]); + if (error) + return "results_by_shard." + error; + } } return null; }; /** - * Creates a TableLastPK message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateVSchemaResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.TableLastPK} TableLastPK + * @returns {vtctldata.ValidateVSchemaResponse} ValidateVSchemaResponse */ - TableLastPK.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.TableLastPK) + ValidateVSchemaResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.ValidateVSchemaResponse) return object; - var message = new $root.binlogdata.TableLastPK(); - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.lastpk != null) { - if (typeof object.lastpk !== "object") - throw TypeError(".binlogdata.TableLastPK.lastpk: object expected"); - message.lastpk = $root.query.QueryResult.fromObject(object.lastpk); + var message = new $root.vtctldata.ValidateVSchemaResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".vtctldata.ValidateVSchemaResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) + message.results[i] = String(object.results[i]); + } + if (object.results_by_shard) { + if (typeof object.results_by_shard !== "object") + throw TypeError(".vtctldata.ValidateVSchemaResponse.results_by_shard: object expected"); + message.results_by_shard = {}; + for (var keys = Object.keys(object.results_by_shard), i = 0; i < keys.length; ++i) { + if (typeof object.results_by_shard[keys[i]] !== "object") + throw TypeError(".vtctldata.ValidateVSchemaResponse.results_by_shard: object expected"); + message.results_by_shard[keys[i]] = $root.vtctldata.ValidateShardResponse.fromObject(object.results_by_shard[keys[i]]); + } } return message; }; /** - * Creates a plain object from a TableLastPK message. Also converts values to other types if specified. + * Creates a plain object from a ValidateVSchemaResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @static - * @param {binlogdata.TableLastPK} message TableLastPK + * @param {vtctldata.ValidateVSchemaResponse} message ValidateVSchemaResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TableLastPK.toObject = function toObject(message, options) { + ValidateVSchemaResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.table_name = ""; - object.lastpk = null; + if (options.arrays || options.defaults) + object.results = []; + if (options.objects || options.defaults) + object.results_by_shard = {}; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = message.results[j]; + } + var keys2; + if (message.results_by_shard && (keys2 = Object.keys(message.results_by_shard)).length) { + object.results_by_shard = {}; + for (var j = 0; j < keys2.length; ++j) + object.results_by_shard[keys2[j]] = $root.vtctldata.ValidateShardResponse.toObject(message.results_by_shard[keys2[j]], options); } - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) - object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options); return object; }; /** - * Converts this TableLastPK to JSON. + * Converts this ValidateVSchemaResponse to JSON. * @function toJSON - * @memberof binlogdata.TableLastPK + * @memberof vtctldata.ValidateVSchemaResponse * @instance * @returns {Object.} JSON object */ - TableLastPK.prototype.toJSON = function toJSON() { + ValidateVSchemaResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TableLastPK; + return ValidateVSchemaResponse; })(); - binlogdata.VStreamResultsRequest = (function() { + vtctldata.WorkflowUpdateRequest = (function() { /** - * Properties of a VStreamResultsRequest. - * @memberof binlogdata - * @interface IVStreamResultsRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamResultsRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamResultsRequest immediate_caller_id - * @property {query.ITarget|null} [target] VStreamResultsRequest target - * @property {string|null} [query] VStreamResultsRequest query + * Properties of a WorkflowUpdateRequest. + * @memberof vtctldata + * @interface IWorkflowUpdateRequest + * @property {string|null} [keyspace] WorkflowUpdateRequest keyspace + * @property {tabletmanagerdata.IUpdateVRWorkflowRequest|null} [tablet_request] WorkflowUpdateRequest tablet_request */ /** - * Constructs a new VStreamResultsRequest. - * @memberof binlogdata - * @classdesc Represents a VStreamResultsRequest. - * @implements IVStreamResultsRequest + * Constructs a new WorkflowUpdateRequest. + * @memberof vtctldata + * @classdesc Represents a WorkflowUpdateRequest. + * @implements IWorkflowUpdateRequest * @constructor - * @param {binlogdata.IVStreamResultsRequest=} [properties] Properties to set + * @param {vtctldata.IWorkflowUpdateRequest=} [properties] Properties to set */ - function VStreamResultsRequest(properties) { + function WorkflowUpdateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129487,114 +130160,88 @@ $root.binlogdata = (function() { } /** - * VStreamResultsRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof binlogdata.VStreamResultsRequest - * @instance - */ - VStreamResultsRequest.prototype.effective_caller_id = null; - - /** - * VStreamResultsRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof binlogdata.VStreamResultsRequest - * @instance - */ - VStreamResultsRequest.prototype.immediate_caller_id = null; - - /** - * VStreamResultsRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof binlogdata.VStreamResultsRequest + * WorkflowUpdateRequest keyspace. + * @member {string} keyspace + * @memberof vtctldata.WorkflowUpdateRequest * @instance */ - VStreamResultsRequest.prototype.target = null; + WorkflowUpdateRequest.prototype.keyspace = ""; /** - * VStreamResultsRequest query. - * @member {string} query - * @memberof binlogdata.VStreamResultsRequest + * WorkflowUpdateRequest tablet_request. + * @member {tabletmanagerdata.IUpdateVRWorkflowRequest|null|undefined} tablet_request + * @memberof vtctldata.WorkflowUpdateRequest * @instance */ - VStreamResultsRequest.prototype.query = ""; + WorkflowUpdateRequest.prototype.tablet_request = null; /** - * Creates a new VStreamResultsRequest instance using the specified properties. + * Creates a new WorkflowUpdateRequest instance using the specified properties. * @function create - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static - * @param {binlogdata.IVStreamResultsRequest=} [properties] Properties to set - * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest instance + * @param {vtctldata.IWorkflowUpdateRequest=} [properties] Properties to set + * @returns {vtctldata.WorkflowUpdateRequest} WorkflowUpdateRequest instance */ - VStreamResultsRequest.create = function create(properties) { - return new VStreamResultsRequest(properties); + WorkflowUpdateRequest.create = function create(properties) { + return new WorkflowUpdateRequest(properties); }; /** - * Encodes the specified VStreamResultsRequest message. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. + * Encodes the specified WorkflowUpdateRequest message. Does not implicitly {@link vtctldata.WorkflowUpdateRequest.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static - * @param {binlogdata.IVStreamResultsRequest} message VStreamResultsRequest message or plain object to encode + * @param {vtctldata.IWorkflowUpdateRequest} message WorkflowUpdateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResultsRequest.encode = function encode(message, writer) { + WorkflowUpdateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.tablet_request != null && Object.hasOwnProperty.call(message, "tablet_request")) + $root.tabletmanagerdata.UpdateVRWorkflowRequest.encode(message.tablet_request, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VStreamResultsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsRequest.verify|verify} messages. + * Encodes the specified WorkflowUpdateRequest message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static - * @param {binlogdata.IVStreamResultsRequest} message VStreamResultsRequest message or plain object to encode + * @param {vtctldata.IWorkflowUpdateRequest} message WorkflowUpdateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + WorkflowUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamResultsRequest message from the specified reader or buffer. + * Decodes a WorkflowUpdateRequest message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest + * @returns {vtctldata.WorkflowUpdateRequest} WorkflowUpdateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResultsRequest.decode = function decode(reader, length) { + WorkflowUpdateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResultsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowUpdateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); + message.keyspace = reader.string(); break; case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = reader.string(); + message.tablet_request = $root.tabletmanagerdata.UpdateVRWorkflowRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -129605,151 +130252,123 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamResultsRequest message from the specified reader or buffer, length delimited. + * Decodes a WorkflowUpdateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest + * @returns {vtctldata.WorkflowUpdateRequest} WorkflowUpdateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResultsRequest.decodeDelimited = function decodeDelimited(reader) { + WorkflowUpdateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamResultsRequest message. + * Verifies a WorkflowUpdateRequest message. * @function verify - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamResultsRequest.verify = function verify(message) { + WorkflowUpdateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.tablet_request != null && message.hasOwnProperty("tablet_request")) { + var error = $root.tabletmanagerdata.UpdateVRWorkflowRequest.verify(message.tablet_request); if (error) - return "target." + error; + return "tablet_request." + error; } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; return null; }; /** - * Creates a VStreamResultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WorkflowUpdateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamResultsRequest} VStreamResultsRequest + * @returns {vtctldata.WorkflowUpdateRequest} WorkflowUpdateRequest */ - VStreamResultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamResultsRequest) + WorkflowUpdateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.WorkflowUpdateRequest) return object; - var message = new $root.binlogdata.VStreamResultsRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".binlogdata.VStreamResultsRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".binlogdata.VStreamResultsRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".binlogdata.VStreamResultsRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); + var message = new $root.vtctldata.WorkflowUpdateRequest(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.tablet_request != null) { + if (typeof object.tablet_request !== "object") + throw TypeError(".vtctldata.WorkflowUpdateRequest.tablet_request: object expected"); + message.tablet_request = $root.tabletmanagerdata.UpdateVRWorkflowRequest.fromObject(object.tablet_request); } - if (object.query != null) - message.query = String(object.query); return message; }; /** - * Creates a plain object from a VStreamResultsRequest message. Also converts values to other types if specified. + * Creates a plain object from a WorkflowUpdateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @static - * @param {binlogdata.VStreamResultsRequest} message VStreamResultsRequest + * @param {vtctldata.WorkflowUpdateRequest} message WorkflowUpdateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamResultsRequest.toObject = function toObject(message, options) { + WorkflowUpdateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = ""; + object.keyspace = ""; + object.tablet_request = null; } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.tablet_request != null && message.hasOwnProperty("tablet_request")) + object.tablet_request = $root.tabletmanagerdata.UpdateVRWorkflowRequest.toObject(message.tablet_request, options); return object; }; /** - * Converts this VStreamResultsRequest to JSON. + * Converts this WorkflowUpdateRequest to JSON. * @function toJSON - * @memberof binlogdata.VStreamResultsRequest + * @memberof vtctldata.WorkflowUpdateRequest * @instance * @returns {Object.} JSON object */ - VStreamResultsRequest.prototype.toJSON = function toJSON() { + WorkflowUpdateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamResultsRequest; + return WorkflowUpdateRequest; })(); - binlogdata.VStreamResultsResponse = (function() { + vtctldata.WorkflowUpdateResponse = (function() { /** - * Properties of a VStreamResultsResponse. - * @memberof binlogdata - * @interface IVStreamResultsResponse - * @property {Array.|null} [fields] VStreamResultsResponse fields - * @property {string|null} [gtid] VStreamResultsResponse gtid - * @property {Array.|null} [rows] VStreamResultsResponse rows + * Properties of a WorkflowUpdateResponse. + * @memberof vtctldata + * @interface IWorkflowUpdateResponse + * @property {string|null} [summary] WorkflowUpdateResponse summary + * @property {Array.|null} [details] WorkflowUpdateResponse details */ /** - * Constructs a new VStreamResultsResponse. - * @memberof binlogdata - * @classdesc Represents a VStreamResultsResponse. - * @implements IVStreamResultsResponse + * Constructs a new WorkflowUpdateResponse. + * @memberof vtctldata + * @classdesc Represents a WorkflowUpdateResponse. + * @implements IWorkflowUpdateResponse * @constructor - * @param {binlogdata.IVStreamResultsResponse=} [properties] Properties to set + * @param {vtctldata.IWorkflowUpdateResponse=} [properties] Properties to set */ - function VStreamResultsResponse(properties) { - this.fields = []; - this.rows = []; + function WorkflowUpdateResponse(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129757,107 +130376,91 @@ $root.binlogdata = (function() { } /** - * VStreamResultsResponse fields. - * @member {Array.} fields - * @memberof binlogdata.VStreamResultsResponse - * @instance - */ - VStreamResultsResponse.prototype.fields = $util.emptyArray; - - /** - * VStreamResultsResponse gtid. - * @member {string} gtid - * @memberof binlogdata.VStreamResultsResponse + * WorkflowUpdateResponse summary. + * @member {string} summary + * @memberof vtctldata.WorkflowUpdateResponse * @instance */ - VStreamResultsResponse.prototype.gtid = ""; + WorkflowUpdateResponse.prototype.summary = ""; /** - * VStreamResultsResponse rows. - * @member {Array.} rows - * @memberof binlogdata.VStreamResultsResponse + * WorkflowUpdateResponse details. + * @member {Array.} details + * @memberof vtctldata.WorkflowUpdateResponse * @instance */ - VStreamResultsResponse.prototype.rows = $util.emptyArray; + WorkflowUpdateResponse.prototype.details = $util.emptyArray; /** - * Creates a new VStreamResultsResponse instance using the specified properties. + * Creates a new WorkflowUpdateResponse instance using the specified properties. * @function create - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static - * @param {binlogdata.IVStreamResultsResponse=} [properties] Properties to set - * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse instance + * @param {vtctldata.IWorkflowUpdateResponse=} [properties] Properties to set + * @returns {vtctldata.WorkflowUpdateResponse} WorkflowUpdateResponse instance */ - VStreamResultsResponse.create = function create(properties) { - return new VStreamResultsResponse(properties); + WorkflowUpdateResponse.create = function create(properties) { + return new WorkflowUpdateResponse(properties); }; /** - * Encodes the specified VStreamResultsResponse message. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. + * Encodes the specified WorkflowUpdateResponse message. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.verify|verify} messages. * @function encode - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static - * @param {binlogdata.IVStreamResultsResponse} message VStreamResultsResponse message or plain object to encode + * @param {vtctldata.IWorkflowUpdateResponse} message WorkflowUpdateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResultsResponse.encode = function encode(message, writer) { + WorkflowUpdateResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.vtctldata.WorkflowUpdateResponse.TabletInfo.encode(message.details[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VStreamResultsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResultsResponse.verify|verify} messages. + * Encodes the specified WorkflowUpdateResponse message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.verify|verify} messages. * @function encodeDelimited - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static - * @param {binlogdata.IVStreamResultsResponse} message VStreamResultsResponse message or plain object to encode + * @param {vtctldata.IWorkflowUpdateResponse} message WorkflowUpdateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VStreamResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + WorkflowUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VStreamResultsResponse message from the specified reader or buffer. + * Decodes a WorkflowUpdateResponse message from the specified reader or buffer. * @function decode - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse + * @returns {vtctldata.WorkflowUpdateResponse} WorkflowUpdateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResultsResponse.decode = function decode(reader, length) { + WorkflowUpdateResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowUpdateResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 3: - message.gtid = reader.string(); + message.summary = reader.string(); break; - case 4: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.query.Row.decode(reader, reader.uint32())); + case 2: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.vtctldata.WorkflowUpdateResponse.TabletInfo.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -129868,142 +130471,326 @@ $root.binlogdata = (function() { }; /** - * Decodes a VStreamResultsResponse message from the specified reader or buffer, length delimited. + * Decodes a WorkflowUpdateResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse + * @returns {vtctldata.WorkflowUpdateResponse} WorkflowUpdateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VStreamResultsResponse.decodeDelimited = function decodeDelimited(reader) { + WorkflowUpdateResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VStreamResultsResponse message. + * Verifies a WorkflowUpdateResponse message. * @function verify - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VStreamResultsResponse.verify = function verify(message) { + WorkflowUpdateResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.query.Row.verify(message.rows[i]); + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.vtctldata.WorkflowUpdateResponse.TabletInfo.verify(message.details[i]); if (error) - return "rows." + error; + return "details." + error; } } return null; }; /** - * Creates a VStreamResultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WorkflowUpdateResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static * @param {Object.} object Plain object - * @returns {binlogdata.VStreamResultsResponse} VStreamResultsResponse + * @returns {vtctldata.WorkflowUpdateResponse} WorkflowUpdateResponse */ - VStreamResultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamResultsResponse) + WorkflowUpdateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.WorkflowUpdateResponse) return object; - var message = new $root.binlogdata.VStreamResultsResponse(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.VStreamResultsResponse.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.VStreamResultsResponse.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".binlogdata.VStreamResultsResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".binlogdata.VStreamResultsResponse.rows: object expected"); - message.rows[i] = $root.query.Row.fromObject(object.rows[i]); + var message = new $root.vtctldata.WorkflowUpdateResponse(); + if (object.summary != null) + message.summary = String(object.summary); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".vtctldata.WorkflowUpdateResponse.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".vtctldata.WorkflowUpdateResponse.details: object expected"); + message.details[i] = $root.vtctldata.WorkflowUpdateResponse.TabletInfo.fromObject(object.details[i]); } } return message; }; /** - * Creates a plain object from a VStreamResultsResponse message. Also converts values to other types if specified. + * Creates a plain object from a WorkflowUpdateResponse message. Also converts values to other types if specified. * @function toObject - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @static - * @param {binlogdata.VStreamResultsResponse} message VStreamResultsResponse + * @param {vtctldata.WorkflowUpdateResponse} message WorkflowUpdateResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VStreamResultsResponse.toObject = function toObject(message, options) { + WorkflowUpdateResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.rows = []; - } + if (options.arrays || options.defaults) + object.details = []; if (options.defaults) - object.gtid = ""; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.query.Row.toObject(message.rows[j], options); + object.summary = ""; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.vtctldata.WorkflowUpdateResponse.TabletInfo.toObject(message.details[j], options); } return object; }; /** - * Converts this VStreamResultsResponse to JSON. + * Converts this WorkflowUpdateResponse to JSON. * @function toJSON - * @memberof binlogdata.VStreamResultsResponse + * @memberof vtctldata.WorkflowUpdateResponse * @instance * @returns {Object.} JSON object */ - VStreamResultsResponse.prototype.toJSON = function toJSON() { + WorkflowUpdateResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VStreamResultsResponse; + WorkflowUpdateResponse.TabletInfo = (function() { + + /** + * Properties of a TabletInfo. + * @memberof vtctldata.WorkflowUpdateResponse + * @interface ITabletInfo + * @property {string|null} [tablet] TabletInfo tablet + * @property {boolean|null} [changed] TabletInfo changed + */ + + /** + * Constructs a new TabletInfo. + * @memberof vtctldata.WorkflowUpdateResponse + * @classdesc Represents a TabletInfo. + * @implements ITabletInfo + * @constructor + * @param {vtctldata.WorkflowUpdateResponse.ITabletInfo=} [properties] Properties to set + */ + function TabletInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TabletInfo tablet. + * @member {string} tablet + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @instance + */ + TabletInfo.prototype.tablet = ""; + + /** + * TabletInfo changed. + * @member {boolean} changed + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @instance + */ + TabletInfo.prototype.changed = false; + + /** + * Creates a new TabletInfo instance using the specified properties. + * @function create + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {vtctldata.WorkflowUpdateResponse.ITabletInfo=} [properties] Properties to set + * @returns {vtctldata.WorkflowUpdateResponse.TabletInfo} TabletInfo instance + */ + TabletInfo.create = function create(properties) { + return new TabletInfo(properties); + }; + + /** + * Encodes the specified TabletInfo message. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.TabletInfo.verify|verify} messages. + * @function encode + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {vtctldata.WorkflowUpdateResponse.ITabletInfo} message TabletInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TabletInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tablet); + if (message.changed != null && Object.hasOwnProperty.call(message, "changed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.changed); + return writer; + }; + + /** + * Encodes the specified TabletInfo message, length delimited. Does not implicitly {@link vtctldata.WorkflowUpdateResponse.TabletInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {vtctldata.WorkflowUpdateResponse.ITabletInfo} message TabletInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TabletInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TabletInfo message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.WorkflowUpdateResponse.TabletInfo} TabletInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TabletInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowUpdateResponse.TabletInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tablet = reader.string(); + break; + case 2: + message.changed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TabletInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.WorkflowUpdateResponse.TabletInfo} TabletInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TabletInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TabletInfo message. + * @function verify + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TabletInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet != null && message.hasOwnProperty("tablet")) + if (!$util.isString(message.tablet)) + return "tablet: string expected"; + if (message.changed != null && message.hasOwnProperty("changed")) + if (typeof message.changed !== "boolean") + return "changed: boolean expected"; + return null; + }; + + /** + * Creates a TabletInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.WorkflowUpdateResponse.TabletInfo} TabletInfo + */ + TabletInfo.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.WorkflowUpdateResponse.TabletInfo) + return object; + var message = new $root.vtctldata.WorkflowUpdateResponse.TabletInfo(); + if (object.tablet != null) + message.tablet = String(object.tablet); + if (object.changed != null) + message.changed = Boolean(object.changed); + return message; + }; + + /** + * Creates a plain object from a TabletInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @static + * @param {vtctldata.WorkflowUpdateResponse.TabletInfo} message TabletInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TabletInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tablet = ""; + object.changed = false; + } + if (message.tablet != null && message.hasOwnProperty("tablet")) + object.tablet = message.tablet; + if (message.changed != null && message.hasOwnProperty("changed")) + object.changed = message.changed; + return object; + }; + + /** + * Converts this TabletInfo to JSON. + * @function toJSON + * @memberof vtctldata.WorkflowUpdateResponse.TabletInfo + * @instance + * @returns {Object.} JSON object + */ + TabletInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TabletInfo; + })(); + + return WorkflowUpdateResponse; })(); - return binlogdata; + return vtctldata; })(); module.exports = $root; diff --git a/web/vtadmin/src/style/fonts.css b/web/vtadmin/src/style/fonts.css new file mode 100644 index 00000000000..5030beccefa --- /dev/null +++ b/web/vtadmin/src/style/fonts.css @@ -0,0 +1,40 @@ +/** + * Copyright 2021 The Vitess Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@font-face { + font-display: swap; + font-family: NotoSans; + src: local('NotoSans-Regular'), url('../fonts/NotoSans-Regular.ttf') format('truetype'); +} + +@font-face { + font-display: swap; + font-family: NotoSans; + src: local('NotoSans-SemiBold'), url('../fonts/NotoSans-SemiBold.ttf') format('truetype'); + font-weight: 500; +} + +@font-face { + font-display: swap; + font-family: NotoSans; + src: local('NotoSans-Bold'), url('../fonts/NotoSans-Bold.ttf') format('truetype'); + font-weight: 700; +} + +@font-face { + font-display: swap; + font-family: NotoMono; + src: local('NotoMono-Regular'), url('../fonts/NotoMono-Regular.ttf') format('truetype'); +} diff --git a/web/vtadmin/src/util/queryString.ts b/web/vtadmin/src/util/queryString.ts index 9676fe89513..5329c79c205 100644 --- a/web/vtadmin/src/util/queryString.ts +++ b/web/vtadmin/src/util/queryString.ts @@ -16,7 +16,7 @@ import { merge } from 'lodash-es'; import qs from 'query-string'; -export type QueryParams = ParsedQuery; +export type QueryParams = ParsedQuery; export interface ParsedQuery { [key: string]: T | T[] | null | undefined; @@ -48,5 +48,7 @@ const DEFAULT_STRINGIFY_OPTIONS: qs.StringifyOptions = { * `stringify` is a simple wrapper around query-string's `stringify` function, specifying * VTAdmin's query stringification defaults. See https://github.com/sindresorhus/query-string. */ -export const stringify = (query: ParsedQuery, opts: qs.StringifyOptions = {}) => - qs.stringify(query, merge({}, DEFAULT_STRINGIFY_OPTIONS, opts)); +export const stringify = ( + query: ParsedQuery, + opts: qs.StringifyOptions = {} +) => qs.stringify(query, merge({}, DEFAULT_STRINGIFY_OPTIONS, opts));
VSchema Cache in JSON